[INFO] fetching crate wayland-raw-protocol-bindings 0.1.5... [INFO] checking wayland-raw-protocol-bindings-0.1.5 against try#88e773be5b0a68392bd25d47edd909e9b2d64a6a for pr-132268 [INFO] extracting crate wayland-raw-protocol-bindings 0.1.5 into /workspace/builds/worker-2-tc2/source [INFO] validating manifest of crates.io crate wayland-raw-protocol-bindings 0.1.5 on toolchain 88e773be5b0a68392bd25d47edd909e9b2d64a6a [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+88e773be5b0a68392bd25d47edd909e9b2d64a6a" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking crates.io crate wayland-raw-protocol-bindings 0.1.5 [INFO] finished tweaking crates.io crate wayland-raw-protocol-bindings 0.1.5 [INFO] tweaked toml for crates.io crate wayland-raw-protocol-bindings 0.1.5 written to /workspace/builds/worker-2-tc2/source/Cargo.toml [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+88e773be5b0a68392bd25d47edd909e9b2d64a6a" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 14 packages to latest compatible versions [INFO] [stderr] Adding bitflags v1.3.2 (available: v2.6.0) [INFO] [stderr] Adding proc-macro2 v0.4.30 (available: v1.0.92) [INFO] [stderr] Adding quote v0.6.13 (available: v1.0.37) [INFO] [stderr] Adding wayland-sys v0.23.6 (available: v0.31.5) [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+88e773be5b0a68392bd25d47edd909e9b2d64a6a" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:4a844ea9eb2546a2d2c7022eacef16ef2e8229c7fbb2c7d4d55a9ceca922f72d" "/opt/rustwide/cargo-home/bin/cargo" "+88e773be5b0a68392bd25d47edd909e9b2d64a6a" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] b82917aede31217f7247d9b7fe00f74a9e3cdf5449d975e860f40ace279ce67b [INFO] running `Command { std: "docker" "start" "-a" "b82917aede31217f7247d9b7fe00f74a9e3cdf5449d975e860f40ace279ce67b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b82917aede31217f7247d9b7fe00f74a9e3cdf5449d975e860f40ace279ce67b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b82917aede31217f7247d9b7fe00f74a9e3cdf5449d975e860f40ace279ce67b", kill_on_drop: false }` [INFO] [stdout] b82917aede31217f7247d9b7fe00f74a9e3cdf5449d975e860f40ace279ce67b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:4a844ea9eb2546a2d2c7022eacef16ef2e8229c7fbb2c7d4d55a9ceca922f72d" "/opt/rustwide/cargo-home/bin/cargo" "+88e773be5b0a68392bd25d47edd909e9b2d64a6a" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] d3be0391fb638cf5a9c93aa37580f6411a877327e4c6e150544ede7e1cb83018 [INFO] running `Command { std: "docker" "start" "-a" "d3be0391fb638cf5a9c93aa37580f6411a877327e4c6e150544ede7e1cb83018", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v0.4.30 [INFO] [stderr] Compiling unicode-xid v0.1.0 [INFO] [stderr] Compiling xml-rs v0.8.23 [INFO] [stderr] Checking bitflags v1.3.2 [INFO] [stderr] Checking libloading v0.6.7 [INFO] [stderr] Checking dlib v0.4.2 [INFO] [stderr] Checking wayland-sys v0.23.6 [INFO] [stderr] Compiling quote v0.6.13 [INFO] [stderr] Compiling wayland-raw-protocol-bindings v0.1.5 (/opt/rustwide/workdir) [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/lib.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | #![cfg_attr(feature = "cargo-clippy", allow(clippy))] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = help: consider adding `cargo-clippy` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/lib.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | #![cfg_attr(feature = "cargo-clippy", allow(clippy))] [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = help: consider adding `cargo-clippy` as a feature in `Cargo.toml` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> /opt/rustwide/target/debug/build/wayland-raw-protocol-bindings-cb634f59c146b0af/out/client.rs:1:1949 [INFO] [stdout] | [INFO] [stdout] 1 | ... { & super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1_interface as * const wl_interface } , unsafe { ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: `#[warn(static_mut_refs)]` on by default [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [ * const sys :: common :: wl_interface ; 8 ] = [ NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , ] ; pub mod zkde_screencast_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Protocol for managing PipeWire feeds of the different displays and windows." ] pub mod zkde_screencast_unstable_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zkde_screencast_unstable_v1 { } # [ doc = "Stream consumer attachment attributes" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum pointer { # [ doc = "No cursor" ] hidden = 1 , # [ doc = "Render the cursor on the stream" ] embedded = 2 , # [ doc = "Send metadata about where the cursor is through PipeWire" ] metadata = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl pointer { pub fn from_raw ( n : u32 ) -> Option < pointer > { match n { 1 => Some ( pointer :: hidden ) , 2 => Some ( pointer :: embedded ) , 4 => Some ( pointer :: metadata ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zkde_screencast_unstable_v1_requests_stream_output_types : [ * const wl_interface ; 3 ] = [ unsafe { &raw const super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1_interface as * const wl_interface } , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut zkde_screencast_unstable_v1_requests_stream_window_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zkde_screencast_unstable_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"stream_output\0" as * const u8 as * const c_char , signature : b"nou\0" as * const u8 as * const c_char , types : unsafe { & zkde_screencast_unstable_v1_requests_stream_output_types as * const _ } , } , wl_message { name : b"stream_window\0" as * const u8 as * const c_char , signature : b"nsu\0" as * const u8 as * const c_char , types : unsafe { & zkde_screencast_unstable_v1_requests_stream_window_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zkde_screencast_unstable_v1_interface : wl_interface = wl_interface { name : b"zkde_screencast_unstable_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & zkde_screencast_unstable_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zkde_screencast_unstable_v1_listener { } pub unsafe fn zkde_screencast_unstable_v1_set_user_data ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zkde_screencast_unstable_v1 as _ , user_data ) ; } pub unsafe fn zkde_screencast_unstable_v1_get_user_data ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zkde_screencast_unstable_v1 as _ ) ; } pub unsafe fn zkde_screencast_unstable_v1_get_version ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zkde_screencast_unstable_v1 as _ ) ; } pub unsafe fn zkde_screencast_unstable_v1_add_listener ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zkde_screencast_unstable_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zkde_screencast_unstable_v1_add_rust_listener ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 , listener : & dyn zkde_screencast_unstable_v1_listener ) -> bool { let to = ( listener as * const dyn zkde_screencast_unstable_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zkde_screencast_unstable_v1_add_listener ( zkde_screencast_unstable_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "requests a feed from a given source" ] pub unsafe fn zkde_screencast_unstable_v1_stream_output ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 , output : * mut super :: wl_output :: wl_output , pointer : u32 ) -> * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zkde_screencast_unstable_v1 as _ , 0u32 , & super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , output , pointer ) ; return r as _ ; } # [ doc = "requests a feed from a given source" ] pub unsafe fn zkde_screencast_unstable_v1_stream_window ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 , window_uuid : * const c_char , pointer : u32 ) -> * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zkde_screencast_unstable_v1 as _ , 1u32 , & super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , window_uuid , pointer ) ; return r as _ ; } # [ doc = "Destroy the zkde_screencast_unstable_v1\n\nDestroy the zkde_screencast_unstable_v1 object." ] pub unsafe fn zkde_screencast_unstable_v1_destroy ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zkde_screencast_unstable_v1 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zkde_screencast_unstable_v1 as _ ) ; } } pub mod zkde_screencast_stream_unstable_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zkde_screencast_stream_unstable_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zkde_screencast_stream_unstable_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"close\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zkde_screencast_stream_unstable_v1_events : [ wl_message ; 3 ] = [ wl_message { name : b"closed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"created\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"failed\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zkde_screencast_stream_unstable_v1_interface : wl_interface = wl_interface { name : b"zkde_screencast_stream_unstable_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zkde_screencast_stream_unstable_v1_requests as * const _ } , event_count : 3 , events : unsafe { & zkde_screencast_stream_unstable_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zkde_screencast_stream_unstable_v1_listener { # [ doc = "Notifies that the server has stopped the stream. Clients should now call close." ] fn closed ( & mut self , object : * mut zkde_screencast_stream_unstable_v1 , ) { } # [ doc = "Notifies about a pipewire feed being created" ] fn created ( & mut self , object : * mut zkde_screencast_stream_unstable_v1 , node : u32 ) { } # [ doc = "Offers an error message so the client knows the created event will not arrive, and the client should close the resource." ] fn failed ( & mut self , object : * mut zkde_screencast_stream_unstable_v1 , error : * mut c_char ) { } } pub unsafe fn zkde_screencast_stream_unstable_v1_set_user_data ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zkde_screencast_stream_unstable_v1 as _ , user_data ) ; } pub unsafe fn zkde_screencast_stream_unstable_v1_get_user_data ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zkde_screencast_stream_unstable_v1 as _ ) ; } pub unsafe fn zkde_screencast_stream_unstable_v1_get_version ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zkde_screencast_stream_unstable_v1 as _ ) ; } pub unsafe fn zkde_screencast_stream_unstable_v1_add_listener ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zkde_screencast_stream_unstable_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zkde_screencast_stream_unstable_v1_add_rust_listener ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 , listener : & dyn zkde_screencast_stream_unstable_v1_listener ) -> bool { let to = ( listener as * const dyn zkde_screencast_stream_unstable_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zkde_screencast_stream_unstable_v1_add_listener ( zkde_screencast_stream_unstable_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zkde_screencast_stream_unstable_v1_destroy ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zkde_screencast_stream_unstable_v1 as _ ) ; } # [ doc = "Indicates we are done with the stream and the communication is over." ] pub unsafe fn zkde_screencast_stream_unstable_v1_close ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zkde_screencast_stream_unstable_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zkde_screencast_stream_unstable_v1 as _ ) ; } } } pub mod gtk { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "gtk specific extensions\n\ngtk_shell is a protocol extension providing additional features for\nclients implementing it." ] pub mod gtk_shell1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum gtk_shell1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum capability { global_app_menu = 1 , global_menu_bar = 2 , desktop_icons = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { match n { 1 => Some ( capability :: global_app_menu ) , 2 => Some ( capability :: global_menu_bar ) , 3 => Some ( capability :: desktop_icons ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut gtk_shell1_requests_get_gtk_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: gtk_surface1 :: gtk_surface1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut gtk_shell1_requests_system_bell_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: gtk_surface1 :: gtk_surface1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut gtk_shell1_requests : [ wl_message ; 4 ] = [ wl_message { name : b"get_gtk_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & gtk_shell1_requests_get_gtk_surface_types as * const _ } , } , wl_message { name : b"set_startup_id\0" as * const u8 as * const c_char , signature : b"?s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"system_bell\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & gtk_shell1_requests_system_bell_types as * const _ } , } , wl_message { name : b"notify_launch\0" as * const u8 as * const c_char , signature : b"3s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut gtk_shell1_events : [ wl_message ; 1 ] = [ wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut gtk_shell1_interface : wl_interface = wl_interface { name : b"gtk_shell1\0" as * const u8 as * const c_char , version : 5 , request_count : 4 , requests : unsafe { & gtk_shell1_requests as * const _ } , event_count : 1 , events : unsafe { & gtk_shell1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait gtk_shell1_listener { # [ doc = "" ] fn capabilities ( & mut self , object : * mut gtk_shell1 , capabilities : u32 ) { } } pub unsafe fn gtk_shell1_set_user_data ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , gtk_shell1 as _ , user_data ) ; } pub unsafe fn gtk_shell1_get_user_data ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , gtk_shell1 as _ ) ; } pub unsafe fn gtk_shell1_get_version ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , gtk_shell1 as _ ) ; } pub unsafe fn gtk_shell1_add_listener ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , gtk_shell1 as _ , listener as _ , data as _ ) ; } pub unsafe fn gtk_shell1_add_rust_listener ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , listener : & dyn gtk_shell1_listener ) -> bool { let to = ( listener as * const dyn gtk_shell1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return gtk_shell1_add_listener ( gtk_shell1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn gtk_shell1_destroy ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , gtk_shell1 as _ ) ; } pub unsafe fn gtk_shell1_get_gtk_surface ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: gtk_surface1 :: gtk_surface1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , gtk_shell1 as _ , 0u32 , & super :: gtk_surface1 :: gtk_surface1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } pub unsafe fn gtk_shell1_set_startup_id ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , startup_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_shell1 as _ , 1u32 , startup_id , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_shell1_system_bell ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , surface : * mut super :: gtk_surface1 :: gtk_surface1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_shell1 as _ , 2u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_shell1_notify_launch ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , startup_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_shell1 as _ , 3u32 , startup_id , std :: ptr :: null :: < c_void > ( ) ) ; } } pub mod gtk_surface1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum gtk_surface1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum state { tiled = 1 , tiled_top = 2 , tiled_right = 3 , tiled_bottom = 4 , tiled_left = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl state { pub fn from_raw ( n : u32 ) -> Option < state > { match n { 1 => Some ( state :: tiled ) , 2 => Some ( state :: tiled_top ) , 3 => Some ( state :: tiled_right ) , 4 => Some ( state :: tiled_bottom ) , 5 => Some ( state :: tiled_left ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum edge_constraint { resizable_top = 1 , resizable_right = 2 , resizable_bottom = 3 , resizable_left = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl edge_constraint { pub fn from_raw ( n : u32 ) -> Option < edge_constraint > { match n { 1 => Some ( edge_constraint :: resizable_top ) , 2 => Some ( edge_constraint :: resizable_right ) , 3 => Some ( edge_constraint :: resizable_bottom ) , 4 => Some ( edge_constraint :: resizable_left ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum gesture { double_click = 1 , right_click = 2 , middle_click = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl gesture { pub fn from_raw ( n : u32 ) -> Option < gesture > { match n { 1 => Some ( gesture :: double_click ) , 2 => Some ( gesture :: right_click ) , 3 => Some ( gesture :: middle_click ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { invalid_gesture = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_gesture ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut gtk_surface1_requests_titlebar_gesture_types : [ * const wl_interface ; 3 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut gtk_surface1_requests : [ wl_message ; 7 ] = [ wl_message { name : b"set_dbus_properties\0" as * const u8 as * const c_char , signature : b"?s?s?s?s?s?s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_modal\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unset_modal\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"present\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"request_focus\0" as * const u8 as * const c_char , signature : b"3?s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"4\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"titlebar_gesture\0" as * const u8 as * const c_char , signature : b"5uou\0" as * const u8 as * const c_char , types : unsafe { & gtk_surface1_requests_titlebar_gesture_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut gtk_surface1_events : [ wl_message ; 2 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"configure_edges\0" as * const u8 as * const c_char , signature : b"2a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut gtk_surface1_interface : wl_interface = wl_interface { name : b"gtk_surface1\0" as * const u8 as * const c_char , version : 5 , request_count : 7 , requests : unsafe { & gtk_surface1_requests as * const _ } , event_count : 2 , events : unsafe { & gtk_surface1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait gtk_surface1_listener { # [ doc = "" ] fn configure ( & mut self , object : * mut gtk_surface1 , states : * mut wl_array ) { } # [ doc = "Only available since version 2 of the interface." ] fn configure_edges ( & mut self , object : * mut gtk_surface1 , constraints : * mut wl_array ) { } } pub unsafe fn gtk_surface1_set_user_data ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , gtk_surface1 as _ , user_data ) ; } pub unsafe fn gtk_surface1_get_user_data ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , gtk_surface1 as _ ) ; } pub unsafe fn gtk_surface1_get_version ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , gtk_surface1 as _ ) ; } pub unsafe fn gtk_surface1_add_listener ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , gtk_surface1 as _ , listener as _ , data as _ ) ; } pub unsafe fn gtk_surface1_add_rust_listener ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , listener : & dyn gtk_surface1_listener ) -> bool { let to = ( listener as * const dyn gtk_surface1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return gtk_surface1_add_listener ( gtk_surface1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn gtk_surface1_destroy ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , gtk_surface1 as _ ) ; } pub unsafe fn gtk_surface1_set_dbus_properties ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , application_id : * const c_char , app_menu_path : * const c_char , menubar_path : * const c_char , window_object_path : * const c_char , application_object_path : * const c_char , unique_bus_name : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 0u32 , application_id , app_menu_path , menubar_path , window_object_path , application_object_path , unique_bus_name , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_surface1_set_modal ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_surface1_unset_modal ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_surface1_present ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , time : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 3u32 , time , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_surface1_request_focus ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , startup_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 4u32 , startup_id , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_surface1_release ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 5u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , gtk_surface1 as _ ) ; } pub unsafe fn gtk_surface1_titlebar_gesture ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , serial : u32 , seat : * mut super :: wl_seat :: wl_seat , gesture : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 6u32 , serial , seat , gesture , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod wayland { # [ doc = "core global object\n\nThe core global object. This is a special singleton object. It\nis used for internal Wayland protocol features." ] pub mod wl_display { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_display { } # [ doc = "global error values\n\nThese errors are global and can be emitted in response to any\nserver request." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "server couldn't find object" ] invalid_object = 0 , # [ doc = "method doesn't exist on the specified interface" ] invalid_method = 1 , # [ doc = "server is out of memory" ] no_memory = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_object ) , 1 => Some ( error :: invalid_method ) , 2 => Some ( error :: no_memory ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_display_requests_sync_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_callback :: wl_callback_interface as * const wl_interface } , ] ; static mut wl_display_requests_get_registry_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_registry :: wl_registry_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_display_requests : [ wl_message ; 2 ] = [ wl_message { name : b"sync\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_display_requests_sync_types as * const _ } , } , wl_message { name : b"get_registry\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_display_requests_get_registry_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_display_events : [ wl_message ; 2 ] = [ wl_message { name : b"error\0" as * const u8 as * const c_char , signature : b"ous\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"delete_id\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_display_interface : wl_interface = wl_interface { name : b"wl_display\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & wl_display_requests as * const _ } , event_count : 2 , events : unsafe { & wl_display_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_display_listener { # [ doc = "fatal error event\n\nThe error event is sent out when a fatal (non-recoverable)\nerror has occurred. The object_id argument is the object\nwhere the error occurred, most often in response to a request\nto that object. The code identifies the error and is defined\nby the object interface. As such, each interface defines its\nown set of error codes. The message is a brief description\nof the error, for (debugging) convenience." ] fn error ( & mut self , object : * mut wl_display , object_id : * mut wl_proxy , code : u32 , message : * mut c_char ) { } # [ doc = "acknowledge object ID deletion\n\nThis event is used internally by the object ID management\nlogic. When a client deletes an object, the server will send\nthis event to acknowledge that it has seen the delete request.\nWhen the client receives this event, it will know that it can\nsafely reuse the object ID." ] fn delete_id ( & mut self , object : * mut wl_display , id : u32 ) { } } pub unsafe fn wl_display_set_user_data ( wl_display : * mut super :: wl_display :: wl_display , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_display as _ , user_data ) ; } pub unsafe fn wl_display_get_user_data ( wl_display : * mut super :: wl_display :: wl_display ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_display as _ ) ; } pub unsafe fn wl_display_get_version ( wl_display : * mut super :: wl_display :: wl_display ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_display as _ ) ; } pub unsafe fn wl_display_add_listener ( wl_display : * mut super :: wl_display :: wl_display , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_display as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_display_add_rust_listener ( wl_display : * mut super :: wl_display :: wl_display , listener : & dyn wl_display_listener ) -> bool { let to = ( listener as * const dyn wl_display_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_display_add_listener ( wl_display as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "asynchronous roundtrip\n\nThe sync request asks the server to emit the 'done' event\non the returned wl_callback object. Since requests are\nhandled in-order and events are delivered in-order, this can\nbe used as a barrier to ensure all previous requests and the\nresulting events have been handled.\n\nThe object returned by this request will be destroyed by the\ncompositor after the callback is fired and as such the client must not\nattempt to use it after that point.\n\nThe callback_data passed in the callback is the event serial." ] pub unsafe fn wl_display_sync ( wl_display : * mut super :: wl_display :: wl_display ) -> * mut super :: wl_callback :: wl_callback { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_display as _ , 0u32 , & super :: wl_callback :: wl_callback_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "get global registry object\n\nThis request creates a registry object that allows the client\nto list and bind the global objects available from the\ncompositor.\n\nIt should be noted that the server side resources consumed in\nresponse to a get_registry request can only be released when the\nclient disconnects, not when the client side proxy is destroyed.\nTherefore, clients should invoke get_registry as infrequently as\npossible to avoid wasting memory." ] pub unsafe fn wl_display_get_registry ( wl_display : * mut super :: wl_display :: wl_display ) -> * mut super :: wl_registry :: wl_registry { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_display as _ , 1u32 , & super :: wl_registry :: wl_registry_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "global registry object\n\nThe singleton global registry object. The server has a number of\nglobal objects that are available to all clients. These objects\ntypically represent an actual object in the server (for example,\nan input device) or they are singleton objects that provide\nextension functionality.\n\nWhen a client creates a registry object, the registry object\nwill emit a global event for each global currently in the\nregistry. Globals come and go as a result of device or\nmonitor hotplugs, reconfiguration or other events, and the\nregistry will send out global and global_remove events to\nkeep the client up to date with the changes. To mark the end\nof the initial burst of events, the client can use the\nwl_display.sync request immediately after calling\nwl_display.get_registry.\n\nA client can bind to a global object by using the bind\nrequest. This creates a client-side handle that lets the object\nemit events to the client and lets the client invoke requests on\nthe object." ] pub mod wl_registry { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_registry { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_registry_requests : [ wl_message ; 1 ] = [ wl_message { name : b"bind\0" as * const u8 as * const c_char , signature : b"usun\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_registry_events : [ wl_message ; 2 ] = [ wl_message { name : b"global\0" as * const u8 as * const c_char , signature : b"usu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"global_remove\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_registry_interface : wl_interface = wl_interface { name : b"wl_registry\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wl_registry_requests as * const _ } , event_count : 2 , events : unsafe { & wl_registry_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_registry_listener { # [ doc = "announce global object\n\nNotify the client of global objects.\n\nThe event notifies the client that a global object with\nthe given name is now available, and it implements the\ngiven version of the given interface." ] fn global ( & mut self , object : * mut wl_registry , name : u32 , interface : * mut c_char , version : u32 ) { } # [ doc = "announce removal of global object\n\nNotify the client of removed global objects.\n\nThis event notifies the client that the global identified\nby name is no longer available. If the client bound to\nthe global using the bind request, the client should now\ndestroy that object.\n\nThe object remains valid and requests to the object will be\nignored until the client destroys it, to avoid races between\nthe global going away and a client sending a request to it." ] fn global_remove ( & mut self , object : * mut wl_registry , name : u32 ) { } } pub unsafe fn wl_registry_set_user_data ( wl_registry : * mut super :: wl_registry :: wl_registry , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_registry as _ , user_data ) ; } pub unsafe fn wl_registry_get_user_data ( wl_registry : * mut super :: wl_registry :: wl_registry ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_registry as _ ) ; } pub unsafe fn wl_registry_get_version ( wl_registry : * mut super :: wl_registry :: wl_registry ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_registry as _ ) ; } pub unsafe fn wl_registry_add_listener ( wl_registry : * mut super :: wl_registry :: wl_registry , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_registry as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_registry_add_rust_listener ( wl_registry : * mut super :: wl_registry :: wl_registry , listener : & dyn wl_registry_listener ) -> bool { let to = ( listener as * const dyn wl_registry_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_registry_add_listener ( wl_registry as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_registry_destroy ( wl_registry : * mut super :: wl_registry :: wl_registry ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_registry as _ ) ; } # [ doc = "bind an object to the display\n\nBinds a new, client-created object to the server using the\nspecified name as the identifier." ] pub unsafe fn wl_registry_bind ( wl_registry : * mut super :: wl_registry :: wl_registry , name : u32 , interface : * mut wl_interface , version : u32 ) -> * mut wl_proxy { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor_versioned , wl_registry as _ , 0u32 , interface as _ , version , name , ( * interface ) . name , version , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "callback object\n\nClients can handle the 'done' event to get notified when\nthe related request is done." ] pub mod wl_callback { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_callback { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_callback_events : [ wl_message ; 1 ] = [ wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_callback_interface : wl_interface = wl_interface { name : b"wl_callback\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 1 , events : unsafe { & wl_callback_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_callback_listener { # [ doc = "done event\n\nNotify the client when the related request is done." ] fn done ( & mut self , object : * mut wl_callback , callback_data : u32 ) { } } pub unsafe fn wl_callback_set_user_data ( wl_callback : * mut super :: wl_callback :: wl_callback , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_callback as _ , user_data ) ; } pub unsafe fn wl_callback_get_user_data ( wl_callback : * mut super :: wl_callback :: wl_callback ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_callback as _ ) ; } pub unsafe fn wl_callback_get_version ( wl_callback : * mut super :: wl_callback :: wl_callback ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_callback as _ ) ; } pub unsafe fn wl_callback_add_listener ( wl_callback : * mut super :: wl_callback :: wl_callback , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_callback as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_callback_add_rust_listener ( wl_callback : * mut super :: wl_callback :: wl_callback , listener : & dyn wl_callback_listener ) -> bool { let to = ( listener as * const dyn wl_callback_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_callback_add_listener ( wl_callback as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_callback_destroy ( wl_callback : * mut super :: wl_callback :: wl_callback ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_callback as _ ) ; } } # [ doc = "the compositor singleton\n\nA compositor. This object is a singleton global. The\ncompositor is in charge of combining the contents of multiple\nsurfaces into one displayable output." ] pub mod wl_compositor { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_compositor { } static mut wl_compositor_requests_create_surface_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut wl_compositor_requests_create_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_compositor_requests : [ wl_message ; 2 ] = [ wl_message { name : b"create_surface\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_compositor_requests_create_surface_types as * const _ } , } , wl_message { name : b"create_region\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_compositor_requests_create_region_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_compositor_interface : wl_interface = wl_interface { name : b"wl_compositor\0" as * const u8 as * const c_char , version : 4 , request_count : 2 , requests : unsafe { & wl_compositor_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_compositor_listener { } pub unsafe fn wl_compositor_set_user_data ( wl_compositor : * mut super :: wl_compositor :: wl_compositor , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_compositor as _ , user_data ) ; } pub unsafe fn wl_compositor_get_user_data ( wl_compositor : * mut super :: wl_compositor :: wl_compositor ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_compositor as _ ) ; } pub unsafe fn wl_compositor_get_version ( wl_compositor : * mut super :: wl_compositor :: wl_compositor ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_compositor as _ ) ; } pub unsafe fn wl_compositor_add_listener ( wl_compositor : * mut super :: wl_compositor :: wl_compositor , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_compositor as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_compositor_add_rust_listener ( wl_compositor : * mut super :: wl_compositor :: wl_compositor , listener : & dyn wl_compositor_listener ) -> bool { let to = ( listener as * const dyn wl_compositor_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_compositor_add_listener ( wl_compositor as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_compositor_destroy ( wl_compositor : * mut super :: wl_compositor :: wl_compositor ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_compositor as _ ) ; } # [ doc = "create new surface\n\nAsk the compositor to create a new surface." ] pub unsafe fn wl_compositor_create_surface ( wl_compositor : * mut super :: wl_compositor :: wl_compositor ) -> * mut super :: wl_surface :: wl_surface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_compositor as _ , 0u32 , & super :: wl_surface :: wl_surface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "create new region\n\nAsk the compositor to create a new region." ] pub unsafe fn wl_compositor_create_region ( wl_compositor : * mut super :: wl_compositor :: wl_compositor ) -> * mut super :: wl_region :: wl_region { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_compositor as _ , 1u32 , & super :: wl_region :: wl_region_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "a shared memory pool\n\nThe wl_shm_pool object encapsulates a piece of memory shared\nbetween the compositor and client. Through the wl_shm_pool\nobject, the client can allocate shared memory wl_buffer objects.\nAll objects created through the same pool share the same\nunderlying mapped memory. Reusing the mapped memory avoids the\nsetup/teardown overhead and is useful when interactively resizing\na surface or for many small buffers." ] pub mod wl_shm_pool { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_shm_pool { } static mut wl_shm_pool_requests_create_buffer_types : [ * const wl_interface ; 6 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_shm_pool_requests : [ wl_message ; 3 ] = [ wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"niiiiu\0" as * const u8 as * const c_char , types : unsafe { & wl_shm_pool_requests_create_buffer_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"resize\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_shm_pool_interface : wl_interface = wl_interface { name : b"wl_shm_pool\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & wl_shm_pool_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_shm_pool_listener { } pub unsafe fn wl_shm_pool_set_user_data ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_shm_pool as _ , user_data ) ; } pub unsafe fn wl_shm_pool_get_user_data ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_shm_pool as _ ) ; } pub unsafe fn wl_shm_pool_get_version ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_shm_pool as _ ) ; } pub unsafe fn wl_shm_pool_add_listener ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_shm_pool as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_shm_pool_add_rust_listener ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool , listener : & dyn wl_shm_pool_listener ) -> bool { let to = ( listener as * const dyn wl_shm_pool_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_shm_pool_add_listener ( wl_shm_pool as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "create a buffer from the pool\n\nCreate a wl_buffer object from the pool.\n\nThe buffer is created offset bytes into the pool and has\nwidth and height as specified. The stride argument specifies\nthe number of bytes from the beginning of one row to the beginning\nof the next. The format is the pixel format of the buffer and\nmust be one of those advertised through the wl_shm.format event.\n\nA buffer will keep a reference to the pool it was created from\nso it is valid to destroy the pool immediately after creating\na buffer from it." ] pub unsafe fn wl_shm_pool_create_buffer ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool , offset : i32 , width : i32 , height : i32 , stride : i32 , format : u32 ) -> * mut super :: wl_buffer :: wl_buffer { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_shm_pool as _ , 0u32 , & super :: wl_buffer :: wl_buffer_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , offset , width , height , stride , format ) ; return r as _ ; } # [ doc = "destroy the pool\n\nDestroy the shared memory pool.\n\nThe mmapped memory will be released when all\nbuffers that have been created from this pool\nare gone." ] pub unsafe fn wl_shm_pool_destroy ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shm_pool as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_shm_pool as _ ) ; } # [ doc = "change the size of the pool mapping\n\nThis request will cause the server to remap the backing memory\nfor the pool from the file descriptor passed when the pool was\ncreated, but using the new size. This request can only be\nused to make the pool bigger." ] pub unsafe fn wl_shm_pool_resize ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool , size : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shm_pool as _ , 2u32 , size , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "shared memory support\n\nA singleton global object that provides support for shared\nmemory.\n\nClients can create wl_shm_pool objects using the create_pool\nrequest.\n\nAt connection setup time, the wl_shm object emits one or more\nformat events to inform clients about the valid pixel formats\nthat can be used for buffers." ] pub mod wl_shm { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_shm { } # [ doc = "wl_shm error values\n\nThese errors can be emitted in response to wl_shm requests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "buffer format is not known" ] invalid_format = 0 , # [ doc = "invalid size or stride during pool or buffer creation" ] invalid_stride = 1 , # [ doc = "mmapping the file descriptor failed" ] invalid_fd = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_format ) , 1 => Some ( error :: invalid_stride ) , 2 => Some ( error :: invalid_fd ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "pixel formats\n\nThis describes the memory layout of an individual pixel.\n\nAll renderers should support argb8888 and xrgb8888 but any other\nformats are optional and may not be supported by the particular\nrenderer in use.\n\nThe drm format codes match the macros defined in drm_fourcc.h.\nThe formats actually supported by the compositor will be\nreported by the format event." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum format { # [ doc = "32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian" ] argb8888 = 0 , # [ doc = "32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian" ] xrgb8888 = 1 , # [ doc = "8-bit color index format, [7:0] C" ] c8 = 538982467 , # [ doc = "8-bit RGB format, [7:0] R:G:B 3:3:2" ] rgb332 = 943867730 , # [ doc = "8-bit BGR format, [7:0] B:G:R 2:3:3" ] bgr233 = 944916290 , # [ doc = "16-bit xRGB format, [15:0] x:R:G:B 4:4:4:4 little endian" ] xrgb4444 = 842093144 , # [ doc = "16-bit xBGR format, [15:0] x:B:G:R 4:4:4:4 little endian" ] xbgr4444 = 842089048 , # [ doc = "16-bit RGBx format, [15:0] R:G:B:x 4:4:4:4 little endian" ] rgbx4444 = 842094674 , # [ doc = "16-bit BGRx format, [15:0] B:G:R:x 4:4:4:4 little endian" ] bgrx4444 = 842094658 , # [ doc = "16-bit ARGB format, [15:0] A:R:G:B 4:4:4:4 little endian" ] argb4444 = 842093121 , # [ doc = "16-bit ABGR format, [15:0] A:B:G:R 4:4:4:4 little endian" ] abgr4444 = 842089025 , # [ doc = "16-bit RBGA format, [15:0] R:G:B:A 4:4:4:4 little endian" ] rgba4444 = 842088786 , # [ doc = "16-bit BGRA format, [15:0] B:G:R:A 4:4:4:4 little endian" ] bgra4444 = 842088770 , # [ doc = "16-bit xRGB format, [15:0] x:R:G:B 1:5:5:5 little endian" ] xrgb1555 = 892424792 , # [ doc = "16-bit xBGR 1555 format, [15:0] x:B:G:R 1:5:5:5 little endian" ] xbgr1555 = 892420696 , # [ doc = "16-bit RGBx 5551 format, [15:0] R:G:B:x 5:5:5:1 little endian" ] rgbx5551 = 892426322 , # [ doc = "16-bit BGRx 5551 format, [15:0] B:G:R:x 5:5:5:1 little endian" ] bgrx5551 = 892426306 , # [ doc = "16-bit ARGB 1555 format, [15:0] A:R:G:B 1:5:5:5 little endian" ] argb1555 = 892424769 , # [ doc = "16-bit ABGR 1555 format, [15:0] A:B:G:R 1:5:5:5 little endian" ] abgr1555 = 892420673 , # [ doc = "16-bit RGBA 5551 format, [15:0] R:G:B:A 5:5:5:1 little endian" ] rgba5551 = 892420434 , # [ doc = "16-bit BGRA 5551 format, [15:0] B:G:R:A 5:5:5:1 little endian" ] bgra5551 = 892420418 , # [ doc = "16-bit RGB 565 format, [15:0] R:G:B 5:6:5 little endian" ] rgb565 = 909199186 , # [ doc = "16-bit BGR 565 format, [15:0] B:G:R 5:6:5 little endian" ] bgr565 = 909199170 , # [ doc = "24-bit RGB format, [23:0] R:G:B little endian" ] rgb888 = 875710290 , # [ doc = "24-bit BGR format, [23:0] B:G:R little endian" ] bgr888 = 875710274 , # [ doc = "32-bit xBGR format, [31:0] x:B:G:R 8:8:8:8 little endian" ] xbgr8888 = 875709016 , # [ doc = "32-bit RGBx format, [31:0] R:G:B:x 8:8:8:8 little endian" ] rgbx8888 = 875714642 , # [ doc = "32-bit BGRx format, [31:0] B:G:R:x 8:8:8:8 little endian" ] bgrx8888 = 875714626 , # [ doc = "32-bit ABGR format, [31:0] A:B:G:R 8:8:8:8 little endian" ] abgr8888 = 875708993 , # [ doc = "32-bit RGBA format, [31:0] R:G:B:A 8:8:8:8 little endian" ] rgba8888 = 875708754 , # [ doc = "32-bit BGRA format, [31:0] B:G:R:A 8:8:8:8 little endian" ] bgra8888 = 875708738 , # [ doc = "32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian" ] xrgb2101010 = 808669784 , # [ doc = "32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian" ] xbgr2101010 = 808665688 , # [ doc = "32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian" ] rgbx1010102 = 808671314 , # [ doc = "32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian" ] bgrx1010102 = 808671298 , # [ doc = "32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian" ] argb2101010 = 808669761 , # [ doc = "32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian" ] abgr2101010 = 808665665 , # [ doc = "32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian" ] rgba1010102 = 808665426 , # [ doc = "32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian" ] bgra1010102 = 808665410 , # [ doc = "packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian" ] yuyv = 1448695129 , # [ doc = "packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian" ] yvyu = 1431918169 , # [ doc = "packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian" ] uyvy = 1498831189 , # [ doc = "packed YCbCr format, [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian" ] vyuy = 1498765654 , # [ doc = "packed AYCbCr format, [31:0] A:Y:Cb:Cr 8:8:8:8 little endian" ] ayuv = 1448433985 , # [ doc = "2 plane YCbCr Cr:Cb format, 2x2 subsampled Cr:Cb plane" ] nv12 = 842094158 , # [ doc = "2 plane YCbCr Cb:Cr format, 2x2 subsampled Cb:Cr plane" ] nv21 = 825382478 , # [ doc = "2 plane YCbCr Cr:Cb format, 2x1 subsampled Cr:Cb plane" ] nv16 = 909203022 , # [ doc = "2 plane YCbCr Cb:Cr format, 2x1 subsampled Cb:Cr plane" ] nv61 = 825644622 , # [ doc = "3 plane YCbCr format, 4x4 subsampled Cb (1) and Cr (2) planes" ] yuv410 = 961959257 , # [ doc = "3 plane YCbCr format, 4x4 subsampled Cr (1) and Cb (2) planes" ] yvu410 = 961893977 , # [ doc = "3 plane YCbCr format, 4x1 subsampled Cb (1) and Cr (2) planes" ] yuv411 = 825316697 , # [ doc = "3 plane YCbCr format, 4x1 subsampled Cr (1) and Cb (2) planes" ] yvu411 = 825316953 , # [ doc = "3 plane YCbCr format, 2x2 subsampled Cb (1) and Cr (2) planes" ] yuv420 = 842093913 , # [ doc = "3 plane YCbCr format, 2x2 subsampled Cr (1) and Cb (2) planes" ] yvu420 = 842094169 , # [ doc = "3 plane YCbCr format, 2x1 subsampled Cb (1) and Cr (2) planes" ] yuv422 = 909202777 , # [ doc = "3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes" ] yvu422 = 909203033 , # [ doc = "3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes" ] yuv444 = 875713881 , # [ doc = "3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes" ] yvu444 = 875714137 , # [ doc ( hidden ) ] __nonexhaustive , } impl format { pub fn from_raw ( n : u32 ) -> Option < format > { match n { 0 => Some ( format :: argb8888 ) , 1 => Some ( format :: xrgb8888 ) , 538982467 => Some ( format :: c8 ) , 943867730 => Some ( format :: rgb332 ) , 944916290 => Some ( format :: bgr233 ) , 842093144 => Some ( format :: xrgb4444 ) , 842089048 => Some ( format :: xbgr4444 ) , 842094674 => Some ( format :: rgbx4444 ) , 842094658 => Some ( format :: bgrx4444 ) , 842093121 => Some ( format :: argb4444 ) , 842089025 => Some ( format :: abgr4444 ) , 842088786 => Some ( format :: rgba4444 ) , 842088770 => Some ( format :: bgra4444 ) , 892424792 => Some ( format :: xrgb1555 ) , 892420696 => Some ( format :: xbgr1555 ) , 892426322 => Some ( format :: rgbx5551 ) , 892426306 => Some ( format :: bgrx5551 ) , 892424769 => Some ( format :: argb1555 ) , 892420673 => Some ( format :: abgr1555 ) , 892420434 => Some ( format :: rgba5551 ) , 892420418 => Some ( format :: bgra5551 ) , 909199186 => Some ( format :: rgb565 ) , 909199170 => Some ( format :: bgr565 ) , 875710290 => Some ( format :: rgb888 ) , 875710274 => Some ( format :: bgr888 ) , 875709016 => Some ( format :: xbgr8888 ) , 875714642 => Some ( format :: rgbx8888 ) , 875714626 => Some ( format :: bgrx8888 ) , 875708993 => Some ( format :: abgr8888 ) , 875708754 => Some ( format :: rgba8888 ) , 875708738 => Some ( format :: bgra8888 ) , 808669784 => Some ( format :: xrgb2101010 ) , 808665688 => Some ( format :: xbgr2101010 ) , 808671314 => Some ( format :: rgbx1010102 ) , 808671298 => Some ( format :: bgrx1010102 ) , 808669761 => Some ( format :: argb2101010 ) , 808665665 => Some ( format :: abgr2101010 ) , 808665426 => Some ( format :: rgba1010102 ) , 808665410 => Some ( format :: bgra1010102 ) , 1448695129 => Some ( format :: yuyv ) , 1431918169 => Some ( format :: yvyu ) , 1498831189 => Some ( format :: uyvy ) , 1498765654 => Some ( format :: vyuy ) , 1448433985 => Some ( format :: ayuv ) , 842094158 => Some ( format :: nv12 ) , 825382478 => Some ( format :: nv21 ) , 909203022 => Some ( format :: nv16 ) , 825644622 => Some ( format :: nv61 ) , 961959257 => Some ( format :: yuv410 ) , 961893977 => Some ( format :: yvu410 ) , 825316697 => Some ( format :: yuv411 ) , 825316953 => Some ( format :: yvu411 ) , 842093913 => Some ( format :: yuv420 ) , 842094169 => Some ( format :: yvu420 ) , 909202777 => Some ( format :: yuv422 ) , 909203033 => Some ( format :: yvu422 ) , 875713881 => Some ( format :: yuv444 ) , 875714137 => Some ( format :: yvu444 ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_shm_requests_create_pool_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_shm_pool :: wl_shm_pool_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_shm_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create_pool\0" as * const u8 as * const c_char , signature : b"nhi\0" as * const u8 as * const c_char , types : unsafe { & wl_shm_requests_create_pool_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_shm_events : [ wl_message ; 1 ] = [ wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_shm_interface : wl_interface = wl_interface { name : b"wl_shm\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wl_shm_requests as * const _ } , event_count : 1 , events : unsafe { & wl_shm_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_shm_listener { # [ doc = "pixel format description\n\nInforms the client about a valid pixel format that\ncan be used for buffers. Known formats include\nargb8888 and xrgb8888." ] fn format ( & mut self , object : * mut wl_shm , format : format ) { } } pub unsafe fn wl_shm_set_user_data ( wl_shm : * mut super :: wl_shm :: wl_shm , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_shm as _ , user_data ) ; } pub unsafe fn wl_shm_get_user_data ( wl_shm : * mut super :: wl_shm :: wl_shm ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_shm as _ ) ; } pub unsafe fn wl_shm_get_version ( wl_shm : * mut super :: wl_shm :: wl_shm ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_shm as _ ) ; } pub unsafe fn wl_shm_add_listener ( wl_shm : * mut super :: wl_shm :: wl_shm , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_shm as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_shm_add_rust_listener ( wl_shm : * mut super :: wl_shm :: wl_shm , listener : & dyn wl_shm_listener ) -> bool { let to = ( listener as * const dyn wl_shm_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_shm_add_listener ( wl_shm as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_shm_destroy ( wl_shm : * mut super :: wl_shm :: wl_shm ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_shm as _ ) ; } # [ doc = "create a shm pool\n\nCreate a new wl_shm_pool object.\n\nThe pool can be used to create shared memory based buffer\nobjects. The server will mmap size bytes of the passed file\ndescriptor, to use as backing memory for the pool." ] pub unsafe fn wl_shm_create_pool ( wl_shm : * mut super :: wl_shm :: wl_shm , fd : :: std :: os :: unix :: io :: RawFd , size : i32 ) -> * mut super :: wl_shm_pool :: wl_shm_pool { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_shm as _ , 0u32 , & super :: wl_shm_pool :: wl_shm_pool_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , fd , size ) ; return r as _ ; } } # [ doc = "content for a wl_surface\n\nA buffer provides the content for a wl_surface. Buffers are\ncreated through factory interfaces such as wl_drm, wl_shm or\nsimilar. It has a width and a height and can be attached to a\nwl_surface, but the mechanism by which a client provides and\nupdates the contents is defined by the buffer factory interface." ] pub mod wl_buffer { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_buffer { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_buffer_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_buffer_events : [ wl_message ; 1 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_buffer_interface : wl_interface = wl_interface { name : b"wl_buffer\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wl_buffer_requests as * const _ } , event_count : 1 , events : unsafe { & wl_buffer_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_buffer_listener { # [ doc = "compositor releases buffer\n\nSent when this wl_buffer is no longer used by the compositor.\nThe client is now free to reuse or destroy this buffer and its\nbacking storage.\n\nIf a client receives a release event before the frame callback\nrequested in the same wl_surface.commit that attaches this\nwl_buffer to a surface, then the client is immediately free to\nreuse the buffer and its backing storage, and does not need a\nsecond buffer for the next surface content update. Typically\nthis is possible, when the compositor maintains a copy of the\nwl_surface contents, e.g. as a GL texture. This is an important\noptimization for GL(ES) compositors with wl_shm clients." ] fn release ( & mut self , object : * mut wl_buffer , ) { } } pub unsafe fn wl_buffer_set_user_data ( wl_buffer : * mut super :: wl_buffer :: wl_buffer , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_buffer as _ , user_data ) ; } pub unsafe fn wl_buffer_get_user_data ( wl_buffer : * mut super :: wl_buffer :: wl_buffer ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_buffer as _ ) ; } pub unsafe fn wl_buffer_get_version ( wl_buffer : * mut super :: wl_buffer :: wl_buffer ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_buffer as _ ) ; } pub unsafe fn wl_buffer_add_listener ( wl_buffer : * mut super :: wl_buffer :: wl_buffer , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_buffer as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_buffer_add_rust_listener ( wl_buffer : * mut super :: wl_buffer :: wl_buffer , listener : & dyn wl_buffer_listener ) -> bool { let to = ( listener as * const dyn wl_buffer_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_buffer_add_listener ( wl_buffer as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy a buffer\n\nDestroy a buffer. If and how you need to release the backing\nstorage is defined by the buffer factory interface.\n\nFor possible side-effects to a surface, see wl_surface.attach." ] pub unsafe fn wl_buffer_destroy ( wl_buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_buffer as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_buffer as _ ) ; } } # [ doc = "offer to transfer data\n\nA wl_data_offer represents a piece of data offered for transfer\nby another client (the source client). It is used by the\ncopy-and-paste and drag-and-drop mechanisms. The offer\ndescribes the different mime types that the data can be\nconverted to and provides the mechanism for transferring the\ndata directly from the source client." ] pub mod wl_data_offer { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_data_offer { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "finish request was called untimely" ] invalid_finish = 0 , # [ doc = "action mask contains invalid values" ] invalid_action_mask = 1 , # [ doc = "action argument has an invalid value" ] invalid_action = 2 , # [ doc = "offer doesn't accept this request" ] invalid_offer = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_finish ) , 1 => Some ( error :: invalid_action_mask ) , 2 => Some ( error :: invalid_action ) , 3 => Some ( error :: invalid_offer ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_offer_requests : [ wl_message ; 5 ] = [ wl_message { name : b"accept\0" as * const u8 as * const c_char , signature : b"u?s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"receive\0" as * const u8 as * const c_char , signature : b"sh\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"finish\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_actions\0" as * const u8 as * const c_char , signature : b"3uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_offer_events : [ wl_message ; 3 ] = [ wl_message { name : b"offer\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"source_actions\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"action\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_data_offer_interface : wl_interface = wl_interface { name : b"wl_data_offer\0" as * const u8 as * const c_char , version : 3 , request_count : 5 , requests : unsafe { & wl_data_offer_requests as * const _ } , event_count : 3 , events : unsafe { & wl_data_offer_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_data_offer_listener { # [ doc = "advertise offered mime type\n\nSent immediately after creating the wl_data_offer object. One\nevent per offered mime type." ] fn offer ( & mut self , object : * mut wl_data_offer , mime_type : * mut c_char ) { } # [ doc = "notify the source-side available actions\n\nThis event indicates the actions offered by the data source. It\nwill be sent right after wl_data_device.enter, or anytime the source\nside changes its offered actions through wl_data_source.set_actions.\n\nOnly available since version 3 of the interface." ] fn source_actions ( & mut self , object : * mut wl_data_offer , source_actions : u32 ) { } # [ doc = "notify the selected action\n\nThis event indicates the action selected by the compositor after\nmatching the source/destination side actions. Only one action (or\nnone) will be offered here.\n\nThis event can be emitted multiple times during the drag-and-drop\noperation in response to destination side action changes through\nwl_data_offer.set_actions.\n\nThis event will no longer be emitted after wl_data_device.drop\nhappened on the drag-and-drop destination, the client must\nhonor the last action received, or the last preferred one set\nthrough wl_data_offer.set_actions when handling an \"ask\" action.\n\nCompositors may also change the selected action on the fly, mainly\nin response to keyboard modifier changes during the drag-and-drop\noperation.\n\nThe most recent action received is always the valid one. Prior to\nreceiving wl_data_device.drop, the chosen action may change (e.g.\ndue to keyboard modifiers being pressed). At the time of receiving\nwl_data_device.drop the drag-and-drop destination must honor the\nlast action received.\n\nAction changes may still happen after wl_data_device.drop,\nespecially on \"ask\" actions, where the drag-and-drop destination\nmay choose another action afterwards. Action changes happening\nat this stage are always the result of inter-client negotiation, the\ncompositor shall no longer be able to induce a different action.\n\nUpon \"ask\" actions, it is expected that the drag-and-drop destination\nmay potentially choose a different action and/or mime type,\nbased on wl_data_offer.source_actions and finally chosen by the\nuser (e.g. popping up a menu with the available options). The\nfinal wl_data_offer.set_actions and wl_data_offer.accept requests\nmust happen before the call to wl_data_offer.finish.\n\nOnly available since version 3 of the interface." ] fn action ( & mut self , object : * mut wl_data_offer , dnd_action : u32 ) { } } pub unsafe fn wl_data_offer_set_user_data ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_data_offer as _ , user_data ) ; } pub unsafe fn wl_data_offer_get_user_data ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_data_offer as _ ) ; } pub unsafe fn wl_data_offer_get_version ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_data_offer as _ ) ; } pub unsafe fn wl_data_offer_add_listener ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_data_offer as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_data_offer_add_rust_listener ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer , listener : & dyn wl_data_offer_listener ) -> bool { let to = ( listener as * const dyn wl_data_offer_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_data_offer_add_listener ( wl_data_offer as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "accept one of the offered mime types\n\nIndicate that the client can accept the given mime type, or\nNULL for not accepted.\n\nFor objects of version 2 or older, this request is used by the\nclient to give feedback whether the client can receive the given\nmime type, or NULL if none is accepted; the feedback does not\ndetermine whether the drag-and-drop operation succeeds or not.\n\nFor objects of version 3 or newer, this request determines the\nfinal result of the drag-and-drop operation. If the end result\nis that no mime types were accepted, the drag-and-drop operation\nwill be cancelled and the corresponding drag source will receive\nwl_data_source.cancelled. Clients may still use this event in\nconjunction with wl_data_source.action for feedback." ] pub unsafe fn wl_data_offer_accept ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer , serial : u32 , mime_type : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_offer as _ , 0u32 , serial , mime_type , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "request that the data is transferred\n\nTo transfer the offered data, the client issues this request\nand indicates the mime type it wants to receive. The transfer\nhappens through the passed file descriptor (typically created\nwith the pipe system call). The source client writes the data\nin the mime type representation requested and then closes the\nfile descriptor.\n\nThe receiving client reads from the read end of the pipe until\nEOF and then closes its end, at which point the transfer is\ncomplete.\n\nThis request may happen multiple times for different mime types,\nboth before and after wl_data_device.drop. Drag-and-drop destination\nclients may preemptively fetch data or examine it more closely to\ndetermine acceptance." ] pub unsafe fn wl_data_offer_receive ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer , mime_type : * const c_char , fd : :: std :: os :: unix :: io :: RawFd ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_offer as _ , 1u32 , mime_type , fd , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy data offer\n\nDestroy the data offer." ] pub unsafe fn wl_data_offer_destroy ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_offer as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_data_offer as _ ) ; } # [ doc = "the offer will no longer be used\n\nNotifies the compositor that the drag destination successfully\nfinished the drag-and-drop operation.\n\nUpon receiving this request, the compositor will emit\nwl_data_source.dnd_finished on the drag source client.\n\nIt is a client error to perform other requests than\nwl_data_offer.destroy after this one. It is also an error to perform\nthis request after a NULL mime type has been set in\nwl_data_offer.accept or no action was received through\nwl_data_offer.action." ] pub unsafe fn wl_data_offer_finish ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_offer as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the available/preferred drag-and-drop actions\n\nSets the actions that the destination side client supports for\nthis operation. This request may trigger the emission of\nwl_data_source.action and wl_data_offer.action events if the compositor\nneeds to change the selected action.\n\nThis request can be called multiple times throughout the\ndrag-and-drop operation, typically in response to wl_data_device.enter\nor wl_data_device.motion events.\n\nThis request determines the final result of the drag-and-drop\noperation. If the end result is that no action is accepted,\nthe drag source will receive wl_drag_source.cancelled.\n\nThe dnd_actions argument must contain only values expressed in the\nwl_data_device_manager.dnd_actions enum, and the preferred_action\nargument must only contain one of those values set, otherwise it\nwill result in a protocol error.\n\nWhile managing an \"ask\" action, the destination drag-and-drop client\nmay perform further wl_data_offer.receive requests, and is expected\nto perform one last wl_data_offer.set_actions request with a preferred\naction other than \"ask\" (and optionally wl_data_offer.accept) before\nrequesting wl_data_offer.finish, in order to convey the action selected\nby the user. If the preferred action is not in the\nwl_data_offer.source_actions mask, an error will be raised.\n\nIf the \"ask\" action is dismissed (e.g. user cancellation), the client\nis expected to perform wl_data_offer.destroy right away.\n\nThis request can only be made on drag-and-drop offers, a protocol error\nwill be raised otherwise." ] pub unsafe fn wl_data_offer_set_actions ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer , dnd_actions : u32 , preferred_action : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_offer as _ , 4u32 , dnd_actions , preferred_action , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "offer to transfer data\n\nThe wl_data_source object is the source side of a wl_data_offer.\nIt is created by the source client in a data transfer and\nprovides a way to describe the offered data and a way to respond\nto requests to transfer the data." ] pub mod wl_data_source { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_data_source { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "action mask contains invalid values" ] invalid_action_mask = 0 , # [ doc = "source doesn't accept this request" ] invalid_source = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_action_mask ) , 1 => Some ( error :: invalid_source ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_source_requests : [ wl_message ; 3 ] = [ wl_message { name : b"offer\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_actions\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_source_events : [ wl_message ; 6 ] = [ wl_message { name : b"target\0" as * const u8 as * const c_char , signature : b"?s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"send\0" as * const u8 as * const c_char , signature : b"sh\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cancelled\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"dnd_drop_performed\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"dnd_finished\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"action\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_data_source_interface : wl_interface = wl_interface { name : b"wl_data_source\0" as * const u8 as * const c_char , version : 3 , request_count : 3 , requests : unsafe { & wl_data_source_requests as * const _ } , event_count : 6 , events : unsafe { & wl_data_source_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_data_source_listener { # [ doc = "a target accepts an offered mime type\n\nSent when a target accepts pointer_focus or motion events. If\na target does not accept any of the offered types, type is NULL.\n\nUsed for feedback during drag-and-drop." ] fn target ( & mut self , object : * mut wl_data_source , mime_type : Option < * mut c_char > ) { } # [ doc = "send the data\n\nRequest for data from the client. Send the data as the\nspecified mime type over the passed file descriptor, then\nclose it." ] fn send ( & mut self , object : * mut wl_data_source , mime_type : * mut c_char , fd : :: std :: os :: unix :: io :: RawFd ) { } # [ doc = "selection was cancelled\n\nThis data source is no longer valid. There are several reasons why\nthis could happen:\n\n- The data source has been replaced by another data source.\n- The drag-and-drop operation was performed, but the drop destination\ndid not accept any of the mime types offered through\nwl_data_source.target.\n- The drag-and-drop operation was performed, but the drop destination\ndid not select any of the actions present in the mask offered through\nwl_data_source.action.\n- The drag-and-drop operation was performed but didn't happen over a\nsurface.\n- The compositor cancelled the drag-and-drop operation (e.g. compositor\ndependent timeouts to avoid stale drag-and-drop transfers).\n\nThe client should clean up and destroy this data source.\n\nFor objects of version 2 or older, wl_data_source.cancelled will\nonly be emitted if the data source was replaced by another data\nsource." ] fn cancelled ( & mut self , object : * mut wl_data_source , ) { } # [ doc = "the drag-and-drop operation physically finished\n\nThe user performed the drop action. This event does not indicate\nacceptance, wl_data_source.cancelled may still be emitted afterwards\nif the drop destination does not accept any mime type.\n\nHowever, this event might however not be received if the compositor\ncancelled the drag-and-drop operation before this event could happen.\n\nNote that the data_source may still be used in the future and should\nnot be destroyed here.\n\nOnly available since version 3 of the interface." ] fn dnd_drop_performed ( & mut self , object : * mut wl_data_source , ) { } # [ doc = "the drag-and-drop operation concluded\n\nThe drop destination finished interoperating with this data\nsource, so the client is now free to destroy this data source and\nfree all associated data.\n\nIf the action used to perform the operation was \"move\", the\nsource can now delete the transferred data.\n\nOnly available since version 3 of the interface." ] fn dnd_finished ( & mut self , object : * mut wl_data_source , ) { } # [ doc = "notify the selected action\n\nThis event indicates the action selected by the compositor after\nmatching the source/destination side actions. Only one action (or\nnone) will be offered here.\n\nThis event can be emitted multiple times during the drag-and-drop\noperation, mainly in response to destination side changes through\nwl_data_offer.set_actions, and as the data device enters/leaves\nsurfaces.\n\nIt is only possible to receive this event after\nwl_data_source.dnd_drop_performed if the drag-and-drop operation\nended in an \"ask\" action, in which case the final wl_data_source.action\nevent will happen immediately before wl_data_source.dnd_finished.\n\nCompositors may also change the selected action on the fly, mainly\nin response to keyboard modifier changes during the drag-and-drop\noperation.\n\nThe most recent action received is always the valid one. The chosen\naction may change alongside negotiation (e.g. an \"ask\" action can turn\ninto a \"move\" operation), so the effects of the final action must\nalways be applied in wl_data_offer.dnd_finished.\n\nClients can trigger cursor surface changes from this point, so\nthey reflect the current action.\n\nOnly available since version 3 of the interface." ] fn action ( & mut self , object : * mut wl_data_source , dnd_action : u32 ) { } } pub unsafe fn wl_data_source_set_user_data ( wl_data_source : * mut super :: wl_data_source :: wl_data_source , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_data_source as _ , user_data ) ; } pub unsafe fn wl_data_source_get_user_data ( wl_data_source : * mut super :: wl_data_source :: wl_data_source ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_data_source as _ ) ; } pub unsafe fn wl_data_source_get_version ( wl_data_source : * mut super :: wl_data_source :: wl_data_source ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_data_source as _ ) ; } pub unsafe fn wl_data_source_add_listener ( wl_data_source : * mut super :: wl_data_source :: wl_data_source , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_data_source as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_data_source_add_rust_listener ( wl_data_source : * mut super :: wl_data_source :: wl_data_source , listener : & dyn wl_data_source_listener ) -> bool { let to = ( listener as * const dyn wl_data_source_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_data_source_add_listener ( wl_data_source as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "add an offered mime type\n\nThis request adds a mime type to the set of mime types\nadvertised to targets. Can be called several times to offer\nmultiple types." ] pub unsafe fn wl_data_source_offer ( wl_data_source : * mut super :: wl_data_source :: wl_data_source , mime_type : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_source as _ , 0u32 , mime_type , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the data source\n\nDestroy the data source." ] pub unsafe fn wl_data_source_destroy ( wl_data_source : * mut super :: wl_data_source :: wl_data_source ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_source as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_data_source as _ ) ; } # [ doc = "set the available drag-and-drop actions\n\nSets the actions that the source side client supports for this\noperation. This request may trigger wl_data_source.action and\nwl_data_offer.action events if the compositor needs to change the\nselected action.\n\nThe dnd_actions argument must contain only values expressed in the\nwl_data_device_manager.dnd_actions enum, otherwise it will result\nin a protocol error.\n\nThis request must be made once only, and can only be made on sources\nused in drag-and-drop, so it must be performed before\nwl_data_device.start_drag. Attempting to use the source other than\nfor drag-and-drop will raise a protocol error." ] pub unsafe fn wl_data_source_set_actions ( wl_data_source : * mut super :: wl_data_source :: wl_data_source , dnd_actions : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_source as _ , 2u32 , dnd_actions , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "data transfer device\n\nThere is one wl_data_device per seat which can be obtained\nfrom the global wl_data_device_manager singleton.\n\nA wl_data_device provides access to inter-client data transfer\nmechanisms such as copy-and-paste and drag-and-drop." ] pub mod wl_data_device { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_data_device { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_data_device_requests_start_drag_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_data_source :: wl_data_source_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut wl_data_device_requests_set_selection_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_data_source :: wl_data_source_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_device_requests : [ wl_message ; 3 ] = [ wl_message { name : b"start_drag\0" as * const u8 as * const c_char , signature : b"?oo?ou\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_requests_start_drag_types as * const _ } , } , wl_message { name : b"set_selection\0" as * const u8 as * const c_char , signature : b"?ou\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_requests_set_selection_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wl_data_device_events_data_offer_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_data_offer :: wl_data_offer_interface as * const wl_interface } , ] ; static mut wl_data_device_events_enter_types : [ * const wl_interface ; 5 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , unsafe { & super :: wl_data_offer :: wl_data_offer_interface as * const wl_interface } , ] ; static mut wl_data_device_events_selection_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_data_offer :: wl_data_offer_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_device_events : [ wl_message ; 6 ] = [ wl_message { name : b"data_offer\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_events_data_offer_types as * const _ } , } , wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"uoff?o\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"motion\0" as * const u8 as * const c_char , signature : b"uff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"drop\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"selection\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_events_selection_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_data_device_interface : wl_interface = wl_interface { name : b"wl_data_device\0" as * const u8 as * const c_char , version : 3 , request_count : 3 , requests : unsafe { & wl_data_device_requests as * const _ } , event_count : 6 , events : unsafe { & wl_data_device_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_data_device_listener { # [ doc = "introduce a new wl_data_offer\n\nThe data_offer event introduces a new wl_data_offer object,\nwhich will subsequently be used in either the\ndata_device.enter event (for drag-and-drop) or the\ndata_device.selection event (for selections). Immediately\nfollowing the data_device_data_offer event, the new data_offer\nobject will send out data_offer.offer events to describe the\nmime types it offers." ] fn data_offer ( & mut self , object : * mut wl_data_device , id : * mut super :: wl_data_offer :: wl_data_offer ) { } # [ doc = "initiate drag-and-drop session\n\nThis event is sent when an active drag-and-drop pointer enters\na surface owned by the client. The position of the pointer at\nenter time is provided by the x and y arguments, in surface-local\ncoordinates." ] fn enter ( & mut self , object : * mut wl_data_device , serial : u32 , surface : * mut super :: wl_surface :: wl_surface , x : wl_fixed_t , y : wl_fixed_t , id : Option < * mut super :: wl_data_offer :: wl_data_offer > ) { } # [ doc = "end drag-and-drop session\n\nThis event is sent when the drag-and-drop pointer leaves the\nsurface and the session ends. The client must destroy the\nwl_data_offer introduced at enter time at this point." ] fn leave ( & mut self , object : * mut wl_data_device , ) { } # [ doc = "drag-and-drop session motion\n\nThis event is sent when the drag-and-drop pointer moves within\nthe currently focused surface. The new position of the pointer\nis provided by the x and y arguments, in surface-local\ncoordinates." ] fn motion ( & mut self , object : * mut wl_data_device , time : u32 , x : wl_fixed_t , y : wl_fixed_t ) { } # [ doc = "end drag-and-drop session successfully\n\nThe event is sent when a drag-and-drop operation is ended\nbecause the implicit grab is removed.\n\nThe drag-and-drop destination is expected to honor the last action\nreceived through wl_data_offer.action, if the resulting action is\n\"copy\" or \"move\", the destination can still perform\nwl_data_offer.receive requests, and is expected to end all\ntransfers with a wl_data_offer.finish request.\n\nIf the resulting action is \"ask\", the action will not be considered\nfinal. The drag-and-drop destination is expected to perform one last\nwl_data_offer.set_actions request, or wl_data_offer.destroy in order\nto cancel the operation." ] fn drop ( & mut self , object : * mut wl_data_device , ) { } # [ doc = "advertise new selection\n\nThe selection event is sent out to notify the client of a new\nwl_data_offer for the selection for this device. The\ndata_device.data_offer and the data_offer.offer events are\nsent out immediately before this event to introduce the data\noffer object. The selection event is sent to a client\nimmediately before receiving keyboard focus and when a new\nselection is set while the client has keyboard focus. The\ndata_offer is valid until a new data_offer or NULL is received\nor until the client loses keyboard focus. The client must\ndestroy the previous selection data_offer, if any, upon receiving\nthis event." ] fn selection ( & mut self , object : * mut wl_data_device , id : Option < * mut super :: wl_data_offer :: wl_data_offer > ) { } } pub unsafe fn wl_data_device_set_user_data ( wl_data_device : * mut super :: wl_data_device :: wl_data_device , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_data_device as _ , user_data ) ; } pub unsafe fn wl_data_device_get_user_data ( wl_data_device : * mut super :: wl_data_device :: wl_data_device ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_data_device as _ ) ; } pub unsafe fn wl_data_device_get_version ( wl_data_device : * mut super :: wl_data_device :: wl_data_device ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_data_device as _ ) ; } pub unsafe fn wl_data_device_add_listener ( wl_data_device : * mut super :: wl_data_device :: wl_data_device , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_data_device as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_data_device_add_rust_listener ( wl_data_device : * mut super :: wl_data_device :: wl_data_device , listener : & dyn wl_data_device_listener ) -> bool { let to = ( listener as * const dyn wl_data_device_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_data_device_add_listener ( wl_data_device as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_data_device_destroy ( wl_data_device : * mut super :: wl_data_device :: wl_data_device ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_data_device as _ ) ; } # [ doc = "start drag-and-drop operation\n\nThis request asks the compositor to start a drag-and-drop\noperation on behalf of the client.\n\nThe source argument is the data source that provides the data\nfor the eventual data transfer. If source is NULL, enter, leave\nand motion events are sent only to the client that initiated the\ndrag and the client is expected to handle the data passing\ninternally.\n\nThe origin surface is the surface where the drag originates and\nthe client must have an active implicit grab that matches the\nserial.\n\nThe icon surface is an optional (can be NULL) surface that\nprovides an icon to be moved around with the cursor. Initially,\nthe top-left corner of the icon surface is placed at the cursor\nhotspot, but subsequent wl_surface.attach request can move the\nrelative position. Attach requests must be confirmed with\nwl_surface.commit as usual. The icon surface is given the role of\na drag-and-drop icon. If the icon surface already has another role,\nit raises a protocol error.\n\nThe current and pending input regions of the icon wl_surface are\ncleared, and wl_surface.set_input_region is ignored until the\nwl_surface is no longer used as the icon surface. When the use\nas an icon ends, the current and pending input regions become\nundefined, and the wl_surface is unmapped." ] pub unsafe fn wl_data_device_start_drag ( wl_data_device : * mut super :: wl_data_device :: wl_data_device , source : * mut super :: wl_data_source :: wl_data_source , origin : * mut super :: wl_surface :: wl_surface , icon : * mut super :: wl_surface :: wl_surface , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_device as _ , 0u32 , source , origin , icon , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "copy data to the selection\n\nThis request asks the compositor to set the selection\nto the data from the source on behalf of the client.\n\nTo unset the selection, set the source to NULL." ] pub unsafe fn wl_data_device_set_selection ( wl_data_device : * mut super :: wl_data_device :: wl_data_device , source : * mut super :: wl_data_source :: wl_data_source , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_device as _ , 1u32 , source , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy data device\n\nThis request destroys the data device." ] pub unsafe fn wl_data_device_release ( wl_data_device : * mut super :: wl_data_device :: wl_data_device ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_device as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_data_device as _ ) ; } } # [ doc = "data transfer interface\n\nThe wl_data_device_manager is a singleton global object that\nprovides access to inter-client data transfer mechanisms such as\ncopy-and-paste and drag-and-drop. These mechanisms are tied to\na wl_seat and this interface lets a client get a wl_data_device\ncorresponding to a wl_seat.\n\nDepending on the version bound, the objects created from the bound\nwl_data_device_manager object will have different requirements for\nfunctioning properly. See wl_data_source.set_actions,\nwl_data_offer.accept and wl_data_offer.finish for details." ] pub mod wl_data_device_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_data_device_manager { } bitflags ! { # [ doc = "drag and drop actions\n\nThis is a bitmask of the available/preferred actions in a\ndrag-and-drop operation.\n\nIn the compositor, the selected action is a result of matching the\nactions offered by the source and destination sides. \"action\" events\nwith a \"none\" action will be sent to both source and destination if\nthere is no match. All further checks will effectively happen on\n(source actions \u{2229} destination actions).\n\nIn addition, compositors may also pick different actions in\nreaction to key modifiers being pressed. One common design that\nis used in major toolkits (and the behavior recommended for\ncompositors) is:\n\n- If no modifiers are pressed, the first match (in bit order)\nwill be used.\n- Pressing Shift selects \"move\", if enabled in the mask.\n- Pressing Control selects \"copy\", if enabled in the mask.\n\nBehavior beyond that is considered implementation-dependent.\nCompositors may for example bind other modifiers (like Alt/Meta)\nor drags initiated with other buttons than BTN_LEFT to specific\nactions (e.g. \"ask\")." ] pub struct dnd_action : u32 { # [ doc = "no action" ] const none = 0 ; # [ doc = "copy action" ] const copy = 1 ; # [ doc = "move action" ] const _move = 2 ; # [ doc = "ask action" ] const ask = 4 ; } } impl dnd_action { pub fn from_raw ( n : u32 ) -> Option < dnd_action > { Some ( dnd_action :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } static mut wl_data_device_manager_requests_create_data_source_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_data_source :: wl_data_source_interface as * const wl_interface } , ] ; static mut wl_data_device_manager_requests_get_data_device_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_data_device :: wl_data_device_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_device_manager_requests : [ wl_message ; 2 ] = [ wl_message { name : b"create_data_source\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_manager_requests_create_data_source_types as * const _ } , } , wl_message { name : b"get_data_device\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_manager_requests_get_data_device_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_data_device_manager_interface : wl_interface = wl_interface { name : b"wl_data_device_manager\0" as * const u8 as * const c_char , version : 3 , request_count : 2 , requests : unsafe { & wl_data_device_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_data_device_manager_listener { } pub unsafe fn wl_data_device_manager_set_user_data ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_data_device_manager as _ , user_data ) ; } pub unsafe fn wl_data_device_manager_get_user_data ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_data_device_manager as _ ) ; } pub unsafe fn wl_data_device_manager_get_version ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_data_device_manager as _ ) ; } pub unsafe fn wl_data_device_manager_add_listener ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_data_device_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_data_device_manager_add_rust_listener ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager , listener : & dyn wl_data_device_manager_listener ) -> bool { let to = ( listener as * const dyn wl_data_device_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_data_device_manager_add_listener ( wl_data_device_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_data_device_manager_destroy ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_data_device_manager as _ ) ; } # [ doc = "create a new data source\n\nCreate a new data source." ] pub unsafe fn wl_data_device_manager_create_data_source ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager ) -> * mut super :: wl_data_source :: wl_data_source { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_data_device_manager as _ , 0u32 , & super :: wl_data_source :: wl_data_source_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "create a new data device\n\nCreate a new data device for a given seat." ] pub unsafe fn wl_data_device_manager_get_data_device ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: wl_data_device :: wl_data_device { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_data_device_manager as _ , 1u32 , & super :: wl_data_device :: wl_data_device_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat ) ; return r as _ ; } } # [ doc = "create desktop-style surfaces\n\nThis interface is implemented by servers that provide\ndesktop-style user interfaces.\n\nIt allows clients to associate a wl_shell_surface with\na basic surface.\n\nNote! This protocol is deprecated and not intended for production use.\nFor desktop-style user interfaces, use xdg_shell." ] pub mod wl_shell { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_shell { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_shell_requests_get_shell_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_shell_surface :: wl_shell_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_shell_requests : [ wl_message ; 1 ] = [ wl_message { name : b"get_shell_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_requests_get_shell_surface_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_shell_interface : wl_interface = wl_interface { name : b"wl_shell\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wl_shell_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_shell_listener { } pub unsafe fn wl_shell_set_user_data ( wl_shell : * mut super :: wl_shell :: wl_shell , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_shell as _ , user_data ) ; } pub unsafe fn wl_shell_get_user_data ( wl_shell : * mut super :: wl_shell :: wl_shell ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_shell as _ ) ; } pub unsafe fn wl_shell_get_version ( wl_shell : * mut super :: wl_shell :: wl_shell ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_shell as _ ) ; } pub unsafe fn wl_shell_add_listener ( wl_shell : * mut super :: wl_shell :: wl_shell , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_shell as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_shell_add_rust_listener ( wl_shell : * mut super :: wl_shell :: wl_shell , listener : & dyn wl_shell_listener ) -> bool { let to = ( listener as * const dyn wl_shell_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_shell_add_listener ( wl_shell as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_shell_destroy ( wl_shell : * mut super :: wl_shell :: wl_shell ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_shell as _ ) ; } # [ doc = "create a shell surface from a surface\n\nCreate a shell surface for an existing surface. This gives\nthe wl_surface the role of a shell surface. If the wl_surface\nalready has another role, it raises a protocol error.\n\nOnly one shell surface can be associated with a given surface." ] pub unsafe fn wl_shell_get_shell_surface ( wl_shell : * mut super :: wl_shell :: wl_shell , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: wl_shell_surface :: wl_shell_surface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_shell as _ , 0u32 , & super :: wl_shell_surface :: wl_shell_surface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "desktop-style metadata interface\n\nAn interface that may be implemented by a wl_surface, for\nimplementations that provide a desktop-style user interface.\n\nIt provides requests to treat surfaces like toplevel, fullscreen\nor popup windows, move, resize or maximize them, associate\nmetadata like title and class, etc.\n\nOn the server side the object is automatically destroyed when\nthe related wl_surface is destroyed. On the client side,\nwl_shell_surface_destroy() must be called before destroying\nthe wl_surface object." ] pub mod wl_shell_surface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_shell_surface { } bitflags ! { # [ doc = "edge values for resizing\n\nThese values are used to indicate which edge of a surface\nis being dragged in a resize operation. The server may\nuse this information to adapt its behavior, e.g. choose\nan appropriate cursor image." ] pub struct resize : u32 { # [ doc = "no edge" ] const none = 0 ; # [ doc = "top edge" ] const top = 1 ; # [ doc = "bottom edge" ] const bottom = 2 ; # [ doc = "left edge" ] const left = 4 ; # [ doc = "top and left edges" ] const top_left = 5 ; # [ doc = "bottom and left edges" ] const bottom_left = 6 ; # [ doc = "right edge" ] const right = 8 ; # [ doc = "top and right edges" ] const top_right = 9 ; # [ doc = "bottom and right edges" ] const bottom_right = 10 ; } } impl resize { pub fn from_raw ( n : u32 ) -> Option < resize > { Some ( resize :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } bitflags ! { # [ doc = "details of transient behaviour\n\nThese flags specify details of the expected behaviour\nof transient surfaces. Used in the set_transient request." ] pub struct transient : u32 { # [ doc = "do not set keyboard focus" ] const inactive = 1 ; } } impl transient { pub fn from_raw ( n : u32 ) -> Option < transient > { Some ( transient :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = "different method to set the surface fullscreen\n\nHints to indicate to the compositor how to deal with a conflict\nbetween the dimensions of the surface and the dimensions of the\noutput. The compositor is free to ignore this parameter." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum fullscreen_method { # [ doc = "no preference, apply default policy" ] default = 0 , # [ doc = "scale, preserve the surface's aspect ratio and center on output" ] scale = 1 , # [ doc = "switch output mode to the smallest mode that can fit the surface, add black borders to compensate size mismatch" ] driver = 2 , # [ doc = "no upscaling, center on output and add black borders to compensate size mismatch" ] fill = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl fullscreen_method { pub fn from_raw ( n : u32 ) -> Option < fullscreen_method > { match n { 0 => Some ( fullscreen_method :: default ) , 1 => Some ( fullscreen_method :: scale ) , 2 => Some ( fullscreen_method :: driver ) , 3 => Some ( fullscreen_method :: fill ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_shell_surface_requests_move_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut wl_shell_surface_requests_resize_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut wl_shell_surface_requests_set_transient_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut wl_shell_surface_requests_set_fullscreen_types : [ * const wl_interface ; 3 ] = [ NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; static mut wl_shell_surface_requests_set_popup_types : [ * const wl_interface ; 6 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut wl_shell_surface_requests_set_maximized_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_shell_surface_requests : [ wl_message ; 10 ] = [ wl_message { name : b"pong\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"move\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_surface_requests_move_types as * const _ } , } , wl_message { name : b"resize\0" as * const u8 as * const c_char , signature : b"ouu\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_surface_requests_resize_types as * const _ } , } , wl_message { name : b"set_toplevel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_transient\0" as * const u8 as * const c_char , signature : b"oiiu\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_surface_requests_set_transient_types as * const _ } , } , wl_message { name : b"set_fullscreen\0" as * const u8 as * const c_char , signature : b"uu?o\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_surface_requests_set_fullscreen_types as * const _ } , } , wl_message { name : b"set_popup\0" as * const u8 as * const c_char , signature : b"ouoiiu\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_surface_requests_set_popup_types as * const _ } , } , wl_message { name : b"set_maximized\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_surface_requests_set_maximized_types as * const _ } , } , wl_message { name : b"set_title\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_class\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_shell_surface_events : [ wl_message ; 3 ] = [ wl_message { name : b"ping\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"uii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"popup_done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_shell_surface_interface : wl_interface = wl_interface { name : b"wl_shell_surface\0" as * const u8 as * const c_char , version : 1 , request_count : 10 , requests : unsafe { & wl_shell_surface_requests as * const _ } , event_count : 3 , events : unsafe { & wl_shell_surface_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_shell_surface_listener { # [ doc = "ping client\n\nPing a client to check if it is receiving events and sending\nrequests. A client is expected to reply with a pong request." ] fn ping ( & mut self , object : * mut wl_shell_surface , serial : u32 ) { } # [ doc = "suggest resize\n\nThe configure event asks the client to resize its surface.\n\nThe size is a hint, in the sense that the client is free to\nignore it if it doesn't resize, pick a smaller size (to\nsatisfy aspect ratio or resize in steps of NxM pixels).\n\nThe edges parameter provides a hint about how the surface\nwas resized. The client may use this information to decide\nhow to adjust its content to the new size (e.g. a scrolling\narea might adjust its content position to leave the viewable\ncontent unmoved).\n\nThe client is free to dismiss all but the last configure\nevent it received.\n\nThe width and height arguments specify the size of the window\nin surface-local coordinates." ] fn configure ( & mut self , object : * mut wl_shell_surface , edges : resize , width : i32 , height : i32 ) { } # [ doc = "popup interaction is done\n\nThe popup_done event is sent out when a popup grab is broken,\nthat is, when the user clicks a surface that doesn't belong\nto the client owning the popup surface." ] fn popup_done ( & mut self , object : * mut wl_shell_surface , ) { } } pub unsafe fn wl_shell_surface_set_user_data ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_shell_surface as _ , user_data ) ; } pub unsafe fn wl_shell_surface_get_user_data ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_shell_surface as _ ) ; } pub unsafe fn wl_shell_surface_get_version ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_shell_surface as _ ) ; } pub unsafe fn wl_shell_surface_add_listener ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_shell_surface as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_shell_surface_add_rust_listener ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , listener : & dyn wl_shell_surface_listener ) -> bool { let to = ( listener as * const dyn wl_shell_surface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_shell_surface_add_listener ( wl_shell_surface as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_shell_surface_destroy ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_shell_surface as _ ) ; } # [ doc = "respond to a ping event\n\nA client must respond to a ping event with a pong request or\nthe client may be deemed unresponsive." ] pub unsafe fn wl_shell_surface_pong ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 0u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive move\n\nStart a pointer-driven move of the surface.\n\nThis request must be used in response to a button press event.\nThe server may ignore move requests depending on the state of\nthe surface (e.g. fullscreen or maximized)." ] pub unsafe fn wl_shell_surface_move ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 1u32 , seat , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive resize\n\nStart a pointer-driven resizing of the surface.\n\nThis request must be used in response to a button press event.\nThe server may ignore resize requests depending on the state of\nthe surface (e.g. fullscreen or maximized)." ] pub unsafe fn wl_shell_surface_resize ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , edges : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 2u32 , seat , serial , edges , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the surface a toplevel surface\n\nMap the surface as a toplevel surface.\n\nA toplevel surface is not fullscreen, maximized or transient." ] pub unsafe fn wl_shell_surface_set_toplevel ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the surface a transient surface\n\nMap the surface relative to an existing surface.\n\nThe x and y arguments specify the location of the upper left\ncorner of the surface relative to the upper left corner of the\nparent surface, in surface-local coordinates.\n\nThe flags argument controls details of the transient behaviour." ] pub unsafe fn wl_shell_surface_set_transient ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , parent : * mut super :: wl_surface :: wl_surface , x : i32 , y : i32 , flags : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 4u32 , parent , x , y , flags , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the surface a fullscreen surface\n\nMap the surface as a fullscreen surface.\n\nIf an output parameter is given then the surface will be made\nfullscreen on that output. If the client does not specify the\noutput then the compositor will apply its policy - usually\nchoosing the output on which the surface has the biggest surface\narea.\n\nThe client may specify a method to resolve a size conflict\nbetween the output size and the surface size - this is provided\nthrough the method parameter.\n\nThe framerate parameter is used only when the method is set\nto \"driver\", to indicate the preferred framerate. A value of 0\nindicates that the client does not care about framerate. The\nframerate is specified in mHz, that is framerate of 60000 is 60Hz.\n\nA method of \"scale\" or \"driver\" implies a scaling operation of\nthe surface, either via a direct scaling operation or a change of\nthe output mode. This will override any kind of output scaling, so\nthat mapping a surface with a buffer size equal to the mode can\nfill the screen independent of buffer_scale.\n\nA method of \"fill\" means we don't scale up the buffer, however\nany output scale is applied. This means that you may run into\nan edge case where the application maps a buffer with the same\nsize of the output mode but buffer_scale 1 (thus making a\nsurface larger than the output). In this case it is allowed to\ndownscale the results to fit the screen.\n\nThe compositor must reply to this request with a configure event\nwith the dimensions for the output on which the surface will\nbe made fullscreen." ] pub unsafe fn wl_shell_surface_set_fullscreen ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , method : u32 , framerate : u32 , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 5u32 , method , framerate , output , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the surface a popup surface\n\nMap the surface as a popup.\n\nA popup surface is a transient surface with an added pointer\ngrab.\n\nAn existing implicit grab will be changed to owner-events mode,\nand the popup grab will continue after the implicit grab ends\n(i.e. releasing the mouse button does not cause the popup to\nbe unmapped).\n\nThe popup grab continues until the window is destroyed or a\nmouse button is pressed in any other client's window. A click\nin any of the client's surfaces is reported as normal, however,\nclicks in other clients' surfaces will be discarded and trigger\nthe callback.\n\nThe x and y arguments specify the location of the upper left\ncorner of the surface relative to the upper left corner of the\nparent surface, in surface-local coordinates." ] pub unsafe fn wl_shell_surface_set_popup ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , parent : * mut super :: wl_surface :: wl_surface , x : i32 , y : i32 , flags : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 6u32 , seat , serial , parent , x , y , flags , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the surface a maximized surface\n\nMap the surface as a maximized surface.\n\nIf an output parameter is given then the surface will be\nmaximized on that output. If the client does not specify the\noutput then the compositor will apply its policy - usually\nchoosing the output on which the surface has the biggest surface\narea.\n\nThe compositor will reply with a configure event telling\nthe expected new surface size. The operation is completed\non the next buffer attach to this surface.\n\nA maximized surface typically fills the entire output it is\nbound to, except for desktop elements such as panels. This is\nthe main difference between a maximized shell surface and a\nfullscreen shell surface.\n\nThe details depend on the compositor implementation." ] pub unsafe fn wl_shell_surface_set_maximized ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 7u32 , output , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface title\n\nSet a short title for the surface.\n\nThis string may be used to identify the surface in a task bar,\nwindow list, or other user interface elements provided by the\ncompositor.\n\nThe string must be encoded in UTF-8." ] pub unsafe fn wl_shell_surface_set_title ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , title : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 8u32 , title , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface class\n\nSet a class for the surface.\n\nThe surface class identifies the general class of applications\nto which the surface belongs. A common convention is to use the\nfile name (or the full path if it is a non-standard location) of\nthe application's .desktop file as the class." ] pub unsafe fn wl_shell_surface_set_class ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , class_ : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 9u32 , class_ , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "an onscreen surface\n\nA surface is a rectangular area that is displayed on the screen.\nIt has a location, size and pixel contents.\n\nThe size of a surface (and relative positions on it) is described\nin surface-local coordinates, which may differ from the buffer\ncoordinates of the pixel content, in case a buffer_transform\nor a buffer_scale is used.\n\nA surface without a \"role\" is fairly useless: a compositor does\nnot know where, when or how to present it. The role is the\npurpose of a wl_surface. Examples of roles are a cursor for a\npointer (as set by wl_pointer.set_cursor), a drag icon\n(wl_data_device.start_drag), a sub-surface\n(wl_subcompositor.get_subsurface), and a window as defined by a\nshell protocol (e.g. wl_shell.get_shell_surface).\n\nA surface can have only one role at a time. Initially a\nwl_surface does not have a role. Once a wl_surface is given a\nrole, it is set permanently for the whole lifetime of the\nwl_surface object. Giving the current role again is allowed,\nunless explicitly forbidden by the relevant interface\nspecification.\n\nSurface roles are given by requests in other interfaces such as\nwl_pointer.set_cursor. The request should explicitly mention\nthat this request gives a role to a wl_surface. Often, this\nrequest also creates a new protocol object that represents the\nrole and adds additional functionality to wl_surface. When a\nclient wants to destroy a wl_surface, they must destroy this 'role\nobject' before the wl_surface.\n\nDestroying the role object does not remove the role from the\nwl_surface, but it may stop the wl_surface from \"playing the role\".\nFor instance, if a wl_subsurface object is destroyed, the wl_surface\nit was created for will be unmapped and forget its position and\nz-order. It is allowed to create a wl_subsurface for the same\nwl_surface again, but it is not allowed to use the wl_surface as\na cursor (cursor is a different role than sub-surface, and role\nswitching is not allowed)." ] pub mod wl_surface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_surface { } # [ doc = "wl_surface error values\n\nThese errors can be emitted in response to wl_surface requests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "buffer scale value is invalid" ] invalid_scale = 0 , # [ doc = "buffer transform value is invalid" ] invalid_transform = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_scale ) , 1 => Some ( error :: invalid_transform ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_surface_requests_attach_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut wl_surface_requests_frame_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_callback :: wl_callback_interface as * const wl_interface } , ] ; static mut wl_surface_requests_set_opaque_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; static mut wl_surface_requests_set_input_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_surface_requests : [ wl_message ; 10 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"attach\0" as * const u8 as * const c_char , signature : b"?oii\0" as * const u8 as * const c_char , types : unsafe { & wl_surface_requests_attach_types as * const _ } , } , wl_message { name : b"damage\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_surface_requests_frame_types as * const _ } , } , wl_message { name : b"set_opaque_region\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & wl_surface_requests_set_opaque_region_types as * const _ } , } , wl_message { name : b"set_input_region\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & wl_surface_requests_set_input_region_types as * const _ } , } , wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_buffer_transform\0" as * const u8 as * const c_char , signature : b"2i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_buffer_scale\0" as * const u8 as * const c_char , signature : b"3i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"damage_buffer\0" as * const u8 as * const c_char , signature : b"4iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wl_surface_events_enter_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; static mut wl_surface_events_leave_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_surface_events : [ wl_message ; 2 ] = [ wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wl_surface_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wl_surface_events_leave_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_surface_interface : wl_interface = wl_interface { name : b"wl_surface\0" as * const u8 as * const c_char , version : 4 , request_count : 10 , requests : unsafe { & wl_surface_requests as * const _ } , event_count : 2 , events : unsafe { & wl_surface_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_surface_listener { # [ doc = "surface enters an output\n\nThis is emitted whenever a surface's creation, movement, or resizing\nresults in some part of it being within the scanout region of an\noutput.\n\nNote that a surface may be overlapping with zero or more outputs." ] fn enter ( & mut self , object : * mut wl_surface , output : * mut super :: wl_output :: wl_output ) { } # [ doc = "surface leaves an output\n\nThis is emitted whenever a surface's creation, movement, or resizing\nresults in it no longer having any part of it within the scanout region\nof an output." ] fn leave ( & mut self , object : * mut wl_surface , output : * mut super :: wl_output :: wl_output ) { } } pub unsafe fn wl_surface_set_user_data ( wl_surface : * mut super :: wl_surface :: wl_surface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_surface as _ , user_data ) ; } pub unsafe fn wl_surface_get_user_data ( wl_surface : * mut super :: wl_surface :: wl_surface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_surface as _ ) ; } pub unsafe fn wl_surface_get_version ( wl_surface : * mut super :: wl_surface :: wl_surface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_surface as _ ) ; } pub unsafe fn wl_surface_add_listener ( wl_surface : * mut super :: wl_surface :: wl_surface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_surface as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_surface_add_rust_listener ( wl_surface : * mut super :: wl_surface :: wl_surface , listener : & dyn wl_surface_listener ) -> bool { let to = ( listener as * const dyn wl_surface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_surface_add_listener ( wl_surface as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "delete surface\n\nDeletes the surface and invalidates its object ID." ] pub unsafe fn wl_surface_destroy ( wl_surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_surface as _ ) ; } # [ doc = "set the surface contents\n\nSet a buffer as the content of this surface.\n\nThe new size of the surface is calculated based on the buffer\nsize transformed by the inverse buffer_transform and the\ninverse buffer_scale. This means that the supplied buffer\nmust be an integer multiple of the buffer_scale.\n\nThe x and y arguments specify the location of the new pending\nbuffer's upper left corner, relative to the current buffer's upper\nleft corner, in surface-local coordinates. In other words, the\nx and y, combined with the new surface size define in which\ndirections the surface's size changes.\n\nSurface contents are double-buffered state, see wl_surface.commit.\n\nThe initial surface contents are void; there is no content.\nwl_surface.attach assigns the given wl_buffer as the pending\nwl_buffer. wl_surface.commit makes the pending wl_buffer the new\nsurface contents, and the size of the surface becomes the size\ncalculated from the wl_buffer, as described above. After commit,\nthere is no pending buffer until the next attach.\n\nCommitting a pending wl_buffer allows the compositor to read the\npixels in the wl_buffer. The compositor may access the pixels at\nany time after the wl_surface.commit request. When the compositor\nwill not access the pixels anymore, it will send the\nwl_buffer.release event. Only after receiving wl_buffer.release,\nthe client may reuse the wl_buffer. A wl_buffer that has been\nattached and then replaced by another attach instead of committed\nwill not receive a release event, and is not used by the\ncompositor.\n\nDestroying the wl_buffer after wl_buffer.release does not change\nthe surface contents. However, if the client destroys the\nwl_buffer before receiving the wl_buffer.release event, the surface\ncontents become undefined immediately.\n\nIf wl_surface.attach is sent with a NULL wl_buffer, the\nfollowing wl_surface.commit will remove the surface content." ] pub unsafe fn wl_surface_attach ( wl_surface : * mut super :: wl_surface :: wl_surface , buffer : * mut super :: wl_buffer :: wl_buffer , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 1u32 , buffer , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "mark part of the surface damaged\n\nThis request is used to describe the regions where the pending\nbuffer is different from the current surface contents, and where\nthe surface therefore needs to be repainted. The compositor\nignores the parts of the damage that fall outside of the surface.\n\nDamage is double-buffered state, see wl_surface.commit.\n\nThe damage rectangle is specified in surface-local coordinates,\nwhere x and y specify the upper left corner of the damage rectangle.\n\nThe initial value for pending damage is empty: no damage.\nwl_surface.damage adds pending damage: the new pending damage\nis the union of old pending damage and the given rectangle.\n\nwl_surface.commit assigns pending damage as the current damage,\nand clears pending damage. The server will clear the current\ndamage as it repaints the surface.\n\nAlternatively, damage can be posted with wl_surface.damage_buffer\nwhich uses buffer coordinates instead of surface coordinates,\nand is probably the preferred and intuitive way of doing this." ] pub unsafe fn wl_surface_damage ( wl_surface : * mut super :: wl_surface :: wl_surface , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 2u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "request a frame throttling hint\n\nRequest a notification when it is a good time to start drawing a new\nframe, by creating a frame callback. This is useful for throttling\nredrawing operations, and driving animations.\n\nWhen a client is animating on a wl_surface, it can use the 'frame'\nrequest to get notified when it is a good time to draw and commit the\nnext frame of animation. If the client commits an update earlier than\nthat, it is likely that some updates will not make it to the display,\nand the client is wasting resources by drawing too often.\n\nThe frame request will take effect on the next wl_surface.commit.\nThe notification will only be posted for one frame unless\nrequested again. For a wl_surface, the notifications are posted in\nthe order the frame requests were committed.\n\nThe server must send the notifications so that a client\nwill not send excessive updates, while still allowing\nthe highest possible update rate for clients that wait for the reply\nbefore drawing again. The server should give some time for the client\nto draw and commit after sending the frame callback events to let it\nhit the next output refresh.\n\nA server should avoid signaling the frame callbacks if the\nsurface is not visible in any way, e.g. the surface is off-screen,\nor completely obscured by other opaque surfaces.\n\nThe object returned by this request will be destroyed by the\ncompositor after the callback is fired and as such the client must not\nattempt to use it after that point.\n\nThe callback_data passed in the callback is the current time, in\nmilliseconds, with an undefined base." ] pub unsafe fn wl_surface_frame ( wl_surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: wl_callback :: wl_callback { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_surface as _ , 3u32 , & super :: wl_callback :: wl_callback_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "set opaque region\n\nThis request sets the region of the surface that contains\nopaque content.\n\nThe opaque region is an optimization hint for the compositor\nthat lets it optimize the redrawing of content behind opaque\nregions. Setting an opaque region is not required for correct\nbehaviour, but marking transparent content as opaque will result\nin repaint artifacts.\n\nThe opaque region is specified in surface-local coordinates.\n\nThe compositor ignores the parts of the opaque region that fall\noutside of the surface.\n\nOpaque region is double-buffered state, see wl_surface.commit.\n\nwl_surface.set_opaque_region changes the pending opaque region.\nwl_surface.commit copies the pending region to the current region.\nOtherwise, the pending and current regions are never changed.\n\nThe initial value for an opaque region is empty. Setting the pending\nopaque region has copy semantics, and the wl_region object can be\ndestroyed immediately. A NULL wl_region causes the pending opaque\nregion to be set to empty." ] pub unsafe fn wl_surface_set_opaque_region ( wl_surface : * mut super :: wl_surface :: wl_surface , region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 4u32 , region , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set input region\n\nThis request sets the region of the surface that can receive\npointer and touch events.\n\nInput events happening outside of this region will try the next\nsurface in the server surface stack. The compositor ignores the\nparts of the input region that fall outside of the surface.\n\nThe input region is specified in surface-local coordinates.\n\nInput region is double-buffered state, see wl_surface.commit.\n\nwl_surface.set_input_region changes the pending input region.\nwl_surface.commit copies the pending region to the current region.\nOtherwise the pending and current regions are never changed,\nexcept cursor and icon surfaces are special cases, see\nwl_pointer.set_cursor and wl_data_device.start_drag.\n\nThe initial value for an input region is infinite. That means the\nwhole surface will accept input. Setting the pending input region\nhas copy semantics, and the wl_region object can be destroyed\nimmediately. A NULL wl_region causes the input region to be set\nto infinite." ] pub unsafe fn wl_surface_set_input_region ( wl_surface : * mut super :: wl_surface :: wl_surface , region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 5u32 , region , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "commit pending surface state\n\nSurface state (input, opaque, and damage regions, attached buffers,\netc.) is double-buffered. Protocol requests modify the pending state,\nas opposed to the current state in use by the compositor. A commit\nrequest atomically applies all pending state, replacing the current\nstate. After commit, the new pending state is as documented for each\nrelated request.\n\nOn commit, a pending wl_buffer is applied first, and all other state\nsecond. This means that all coordinates in double-buffered state are\nrelative to the new wl_buffer coming into use, except for\nwl_surface.attach itself. If there is no pending wl_buffer, the\ncoordinates are relative to the current surface contents.\n\nAll requests that need a commit to become effective are documented\nto affect double-buffered state.\n\nOther interfaces may add further double-buffered surface state." ] pub unsafe fn wl_surface_commit ( wl_surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 6u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets the buffer transformation\n\nThis request sets an optional transformation on how the compositor\ninterprets the contents of the buffer attached to the surface. The\naccepted values for the transform parameter are the values for\nwl_output.transform.\n\nBuffer transform is double-buffered state, see wl_surface.commit.\n\nA newly created surface has its buffer transformation set to normal.\n\nwl_surface.set_buffer_transform changes the pending buffer\ntransformation. wl_surface.commit copies the pending buffer\ntransformation to the current one. Otherwise, the pending and current\nvalues are never changed.\n\nThe purpose of this request is to allow clients to render content\naccording to the output transform, thus permitting the compositor to\nuse certain optimizations even if the display is rotated. Using\nhardware overlays and scanning out a client buffer for fullscreen\nsurfaces are examples of such optimizations. Those optimizations are\nhighly dependent on the compositor implementation, so the use of this\nrequest should be considered on a case-by-case basis.\n\nNote that if the transform value includes 90 or 270 degree rotation,\nthe width of the buffer will become the surface height and the height\nof the buffer will become the surface width.\n\nIf transform is not one of the values from the\nwl_output.transform enum the invalid_transform protocol error\nis raised." ] pub unsafe fn wl_surface_set_buffer_transform ( wl_surface : * mut super :: wl_surface :: wl_surface , transform : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 7u32 , transform , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets the buffer scaling factor\n\nThis request sets an optional scaling factor on how the compositor\ninterprets the contents of the buffer attached to the window.\n\nBuffer scale is double-buffered state, see wl_surface.commit.\n\nA newly created surface has its buffer scale set to 1.\n\nwl_surface.set_buffer_scale changes the pending buffer scale.\nwl_surface.commit copies the pending buffer scale to the current one.\nOtherwise, the pending and current values are never changed.\n\nThe purpose of this request is to allow clients to supply higher\nresolution buffer data for use on high resolution outputs. It is\nintended that you pick the same buffer scale as the scale of the\noutput that the surface is displayed on. This means the compositor\ncan avoid scaling when rendering the surface on that output.\n\nNote that if the scale is larger than 1, then you have to attach\na buffer that is larger (by a factor of scale in each dimension)\nthan the desired surface size.\n\nIf scale is not positive the invalid_scale protocol error is\nraised." ] pub unsafe fn wl_surface_set_buffer_scale ( wl_surface : * mut super :: wl_surface :: wl_surface , scale : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 8u32 , scale , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "mark part of the surface damaged using buffer coordinates\n\nThis request is used to describe the regions where the pending\nbuffer is different from the current surface contents, and where\nthe surface therefore needs to be repainted. The compositor\nignores the parts of the damage that fall outside of the surface.\n\nDamage is double-buffered state, see wl_surface.commit.\n\nThe damage rectangle is specified in buffer coordinates,\nwhere x and y specify the upper left corner of the damage rectangle.\n\nThe initial value for pending damage is empty: no damage.\nwl_surface.damage_buffer adds pending damage: the new pending\ndamage is the union of old pending damage and the given rectangle.\n\nwl_surface.commit assigns pending damage as the current damage,\nand clears pending damage. The server will clear the current\ndamage as it repaints the surface.\n\nThis request differs from wl_surface.damage in only one way - it\ntakes damage in buffer coordinates instead of surface-local\ncoordinates. While this generally is more intuitive than surface\ncoordinates, it is especially desirable when using wp_viewport\nor when a drawing library (like EGL) is unaware of buffer scale\nand buffer transform.\n\nNote: Because buffer transformation changes and damage requests may\nbe interleaved in the protocol stream, it is impossible to determine\nthe actual mapping between surface and buffer damage until\nwl_surface.commit time. Therefore, compositors wishing to take both\nkinds of damage into account will have to accumulate damage from the\ntwo requests separately and only transform from one to the other\nafter receiving the wl_surface.commit." ] pub unsafe fn wl_surface_damage_buffer ( wl_surface : * mut super :: wl_surface :: wl_surface , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 9u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "group of input devices\n\nA seat is a group of keyboards, pointer and touch devices. This\nobject is published as a global during start up, or when such a\ndevice is hot plugged. A seat typically has a pointer and\nmaintains a keyboard focus and a pointer focus." ] pub mod wl_seat { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_seat { } bitflags ! { # [ doc = "seat capability bitmask\n\nThis is a bitmask of capabilities this seat has; if a member is\nset, then it is present on the seat." ] pub struct capability : u32 { # [ doc = "the seat has pointer devices" ] const pointer = 1 ; # [ doc = "the seat has one or more keyboards" ] const keyboard = 2 ; # [ doc = "the seat has touch devices" ] const touch = 4 ; } } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { Some ( capability :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } static mut wl_seat_requests_get_pointer_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , ] ; static mut wl_seat_requests_get_keyboard_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_keyboard :: wl_keyboard_interface as * const wl_interface } , ] ; static mut wl_seat_requests_get_touch_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_touch :: wl_touch_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_seat_requests : [ wl_message ; 4 ] = [ wl_message { name : b"get_pointer\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_seat_requests_get_pointer_types as * const _ } , } , wl_message { name : b"get_keyboard\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_seat_requests_get_keyboard_types as * const _ } , } , wl_message { name : b"get_touch\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_seat_requests_get_touch_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"5\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_seat_events : [ wl_message ; 2 ] = [ wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"name\0" as * const u8 as * const c_char , signature : b"2s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_seat_interface : wl_interface = wl_interface { name : b"wl_seat\0" as * const u8 as * const c_char , version : 6 , request_count : 4 , requests : unsafe { & wl_seat_requests as * const _ } , event_count : 2 , events : unsafe { & wl_seat_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_seat_listener { # [ doc = "seat capabilities changed\n\nThis is emitted whenever a seat gains or loses the pointer,\nkeyboard or touch capabilities. The argument is a capability\nenum containing the complete set of capabilities this seat has.\n\nWhen the pointer capability is added, a client may create a\nwl_pointer object using the wl_seat.get_pointer request. This object\nwill receive pointer events until the capability is removed in the\nfuture.\n\nWhen the pointer capability is removed, a client should destroy the\nwl_pointer objects associated with the seat where the capability was\nremoved, using the wl_pointer.release request. No further pointer\nevents will be received on these objects.\n\nIn some compositors, if a seat regains the pointer capability and a\nclient has a previously obtained wl_pointer object of version 4 or\nless, that object may start sending pointer events again. This\nbehavior is considered a misinterpretation of the intended behavior\nand must not be relied upon by the client. wl_pointer objects of\nversion 5 or later must not send events if created before the most\nrecent event notifying the client of an added pointer capability.\n\nThe above behavior also applies to wl_keyboard and wl_touch with the\nkeyboard and touch capabilities, respectively." ] fn capabilities ( & mut self , object : * mut wl_seat , capabilities : capability ) { } # [ doc = "unique identifier for this seat\n\nIn a multiseat configuration this can be used by the client to help\nidentify which physical devices the seat represents. Based on\nthe seat configuration used by the compositor.\n\nOnly available since version 2 of the interface." ] fn name ( & mut self , object : * mut wl_seat , name : * mut c_char ) { } } pub unsafe fn wl_seat_set_user_data ( wl_seat : * mut super :: wl_seat :: wl_seat , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_seat as _ , user_data ) ; } pub unsafe fn wl_seat_get_user_data ( wl_seat : * mut super :: wl_seat :: wl_seat ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_seat as _ ) ; } pub unsafe fn wl_seat_get_version ( wl_seat : * mut super :: wl_seat :: wl_seat ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_seat as _ ) ; } pub unsafe fn wl_seat_add_listener ( wl_seat : * mut super :: wl_seat :: wl_seat , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_seat as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_seat_add_rust_listener ( wl_seat : * mut super :: wl_seat :: wl_seat , listener : & dyn wl_seat_listener ) -> bool { let to = ( listener as * const dyn wl_seat_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_seat_add_listener ( wl_seat as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_seat_destroy ( wl_seat : * mut super :: wl_seat :: wl_seat ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_seat as _ ) ; } # [ doc = "return pointer object\n\nThe ID provided will be initialized to the wl_pointer interface\nfor this seat.\n\nThis request only takes effect if the seat has the pointer\ncapability, or has had the pointer capability in the past.\nIt is a protocol violation to issue this request on a seat that has\nnever had the pointer capability." ] pub unsafe fn wl_seat_get_pointer ( wl_seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: wl_pointer :: wl_pointer { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_seat as _ , 0u32 , & super :: wl_pointer :: wl_pointer_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "return keyboard object\n\nThe ID provided will be initialized to the wl_keyboard interface\nfor this seat.\n\nThis request only takes effect if the seat has the keyboard\ncapability, or has had the keyboard capability in the past.\nIt is a protocol violation to issue this request on a seat that has\nnever had the keyboard capability." ] pub unsafe fn wl_seat_get_keyboard ( wl_seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: wl_keyboard :: wl_keyboard { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_seat as _ , 1u32 , & super :: wl_keyboard :: wl_keyboard_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "return touch object\n\nThe ID provided will be initialized to the wl_touch interface\nfor this seat.\n\nThis request only takes effect if the seat has the touch\ncapability, or has had the touch capability in the past.\nIt is a protocol violation to issue this request on a seat that has\nnever had the touch capability." ] pub unsafe fn wl_seat_get_touch ( wl_seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: wl_touch :: wl_touch { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_seat as _ , 2u32 , & super :: wl_touch :: wl_touch_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "release the seat object\n\nUsing this request a client can tell the server that it is not going to\nuse the seat object anymore." ] pub unsafe fn wl_seat_release ( wl_seat : * mut super :: wl_seat :: wl_seat ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_seat as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_seat as _ ) ; } } # [ doc = "pointer input device\n\nThe wl_pointer interface represents one or more input devices,\nsuch as mice, which control the pointer location and pointer_focus\nof a seat.\n\nThe wl_pointer interface generates motion, enter and leave\nevents for the surfaces that the pointer is located over,\nand button and axis events for button presses, button releases\nand scrolling." ] pub mod wl_pointer { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_pointer { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "physical button state\n\nDescribes the physical state of a button that produced the button\nevent." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum button_state { # [ doc = "the button is not pressed" ] released = 0 , # [ doc = "the button is pressed" ] pressed = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl button_state { pub fn from_raw ( n : u32 ) -> Option < button_state > { match n { 0 => Some ( button_state :: released ) , 1 => Some ( button_state :: pressed ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "axis types\n\nDescribes the axis types of scroll events." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum axis { # [ doc = "vertical axis" ] vertical_scroll = 0 , # [ doc = "horizontal axis" ] horizontal_scroll = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl axis { pub fn from_raw ( n : u32 ) -> Option < axis > { match n { 0 => Some ( axis :: vertical_scroll ) , 1 => Some ( axis :: horizontal_scroll ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "axis source types\n\nDescribes the source types for axis events. This indicates to the\nclient how an axis event was physically generated; a client may\nadjust the user interface accordingly. For example, scroll events\nfrom a \"finger\" source may be in a smooth coordinate space with\nkinetic scrolling whereas a \"wheel\" source may be in discrete steps\nof a number of lines.\n\nThe \"continuous\" axis source is a device generating events in a\ncontinuous coordinate space, but using something other than a\nfinger. One example for this source is button-based scrolling where\nthe vertical motion of a device is converted to scroll events while\na button is held down.\n\nThe \"wheel tilt\" axis source indicates that the actual device is a\nwheel but the scroll event is not caused by a rotation but a\n(usually sideways) tilt of the wheel." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum axis_source { # [ doc = "a physical wheel rotation" ] wheel = 0 , # [ doc = "finger on a touch surface" ] finger = 1 , # [ doc = "continuous coordinate space" ] continuous = 2 , # [ doc = "a physical wheel tilt" ] wheel_tilt = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl axis_source { pub fn from_raw ( n : u32 ) -> Option < axis_source > { match n { 0 => Some ( axis_source :: wheel ) , 1 => Some ( axis_source :: finger ) , 2 => Some ( axis_source :: continuous ) , 3 => Some ( axis_source :: wheel_tilt ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_pointer_requests_set_cursor_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_pointer_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_cursor\0" as * const u8 as * const c_char , signature : b"u?oii\0" as * const u8 as * const c_char , types : unsafe { & wl_pointer_requests_set_cursor_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wl_pointer_events_enter_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut wl_pointer_events_leave_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_pointer_events : [ wl_message ; 9 ] = [ wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"uoff\0" as * const u8 as * const c_char , types : unsafe { & wl_pointer_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"uo\0" as * const u8 as * const c_char , types : unsafe { & wl_pointer_events_leave_types as * const _ } , } , wl_message { name : b"motion\0" as * const u8 as * const c_char , signature : b"uff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"button\0" as * const u8 as * const c_char , signature : b"uuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"axis\0" as * const u8 as * const c_char , signature : b"uuf\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"5\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"axis_source\0" as * const u8 as * const c_char , signature : b"5u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"axis_stop\0" as * const u8 as * const c_char , signature : b"5uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"axis_discrete\0" as * const u8 as * const c_char , signature : b"5ui\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_pointer_interface : wl_interface = wl_interface { name : b"wl_pointer\0" as * const u8 as * const c_char , version : 6 , request_count : 2 , requests : unsafe { & wl_pointer_requests as * const _ } , event_count : 9 , events : unsafe { & wl_pointer_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_pointer_listener { # [ doc = "enter event\n\nNotification that this seat's pointer is focused on a certain\nsurface.\n\nWhen a seat's focus enters a surface, the pointer image\nis undefined and a client should respond to this event by setting\nan appropriate pointer image with the set_cursor request." ] fn enter ( & mut self , object : * mut wl_pointer , serial : u32 , surface : * mut super :: wl_surface :: wl_surface , surface_x : wl_fixed_t , surface_y : wl_fixed_t ) { } # [ doc = "leave event\n\nNotification that this seat's pointer is no longer focused on\na certain surface.\n\nThe leave notification is sent before the enter notification\nfor the new focus." ] fn leave ( & mut self , object : * mut wl_pointer , serial : u32 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "pointer motion event\n\nNotification of pointer location change. The arguments\nsurface_x and surface_y are the location relative to the\nfocused surface." ] fn motion ( & mut self , object : * mut wl_pointer , time : u32 , surface_x : wl_fixed_t , surface_y : wl_fixed_t ) { } # [ doc = "pointer button event\n\nMouse button click and release notifications.\n\nThe location of the click is given by the last motion or\nenter event.\nThe time argument is a timestamp with millisecond\ngranularity, with an undefined base.\n\nThe button is a button code as defined in the Linux kernel's\nlinux/input-event-codes.h header file, e.g. BTN_LEFT.\n\nAny 16-bit button code value is reserved for future additions to the\nkernel's event code list. All other button codes above 0xFFFF are\ncurrently undefined but may be used in future versions of this\nprotocol." ] fn button ( & mut self , object : * mut wl_pointer , serial : u32 , time : u32 , button : u32 , state : button_state ) { } # [ doc = "axis event\n\nScroll and other axis notifications.\n\nFor scroll events (vertical and horizontal scroll axes), the\nvalue parameter is the length of a vector along the specified\naxis in a coordinate space identical to those of motion events,\nrepresenting a relative movement along the specified axis.\n\nFor devices that support movements non-parallel to axes multiple\naxis events will be emitted.\n\nWhen applicable, for example for touch pads, the server can\nchoose to emit scroll events where the motion vector is\nequivalent to a motion event vector.\n\nWhen applicable, a client can transform its content relative to the\nscroll distance." ] fn axis ( & mut self , object : * mut wl_pointer , time : u32 , axis : axis , value : wl_fixed_t ) { } # [ doc = "end of a pointer event sequence\n\nIndicates the end of a set of events that logically belong together.\nA client is expected to accumulate the data in all events within the\nframe before proceeding.\n\nAll wl_pointer events before a wl_pointer.frame event belong\nlogically together. For example, in a diagonal scroll motion the\ncompositor will send an optional wl_pointer.axis_source event, two\nwl_pointer.axis events (horizontal and vertical) and finally a\nwl_pointer.frame event. The client may use this information to\ncalculate a diagonal vector for scrolling.\n\nWhen multiple wl_pointer.axis events occur within the same frame,\nthe motion vector is the combined motion of all events.\nWhen a wl_pointer.axis and a wl_pointer.axis_stop event occur within\nthe same frame, this indicates that axis movement in one axis has\nstopped but continues in the other axis.\nWhen multiple wl_pointer.axis_stop events occur within the same\nframe, this indicates that these axes stopped in the same instance.\n\nA wl_pointer.frame event is sent for every logical event group,\neven if the group only contains a single wl_pointer event.\nSpecifically, a client may get a sequence: motion, frame, button,\nframe, axis, frame, axis_stop, frame.\n\nThe wl_pointer.enter and wl_pointer.leave events are logical events\ngenerated by the compositor and not the hardware. These events are\nalso grouped by a wl_pointer.frame. When a pointer moves from one\nsurface to another, a compositor should group the\nwl_pointer.leave event within the same wl_pointer.frame.\nHowever, a client must not rely on wl_pointer.leave and\nwl_pointer.enter being in the same wl_pointer.frame.\nCompositor-specific policies may require the wl_pointer.leave and\nwl_pointer.enter event being split across multiple wl_pointer.frame\ngroups.\n\nOnly available since version 5 of the interface." ] fn frame ( & mut self , object : * mut wl_pointer , ) { } # [ doc = "axis source event\n\nSource information for scroll and other axes.\n\nThis event does not occur on its own. It is sent before a\nwl_pointer.frame event and carries the source information for\nall events within that frame.\n\nThe source specifies how this event was generated. If the source is\nwl_pointer.axis_source.finger, a wl_pointer.axis_stop event will be\nsent when the user lifts the finger off the device.\n\nIf the source is wl_pointer.axis_source.wheel,\nwl_pointer.axis_source.wheel_tilt or\nwl_pointer.axis_source.continuous, a wl_pointer.axis_stop event may\nor may not be sent. Whether a compositor sends an axis_stop event\nfor these sources is hardware-specific and implementation-dependent;\nclients must not rely on receiving an axis_stop event for these\nscroll sources and should treat scroll sequences from these scroll\nsources as unterminated by default.\n\nThis event is optional. If the source is unknown for a particular\naxis event sequence, no event is sent.\nOnly one wl_pointer.axis_source event is permitted per frame.\n\nThe order of wl_pointer.axis_discrete and wl_pointer.axis_source is\nnot guaranteed.\n\nOnly available since version 5 of the interface." ] fn axis_source ( & mut self , object : * mut wl_pointer , axis_source : axis_source ) { } # [ doc = "axis stop event\n\nStop notification for scroll and other axes.\n\nFor some wl_pointer.axis_source types, a wl_pointer.axis_stop event\nis sent to notify a client that the axis sequence has terminated.\nThis enables the client to implement kinetic scrolling.\nSee the wl_pointer.axis_source documentation for information on when\nthis event may be generated.\n\nAny wl_pointer.axis events with the same axis_source after this\nevent should be considered as the start of a new axis motion.\n\nThe timestamp is to be interpreted identical to the timestamp in the\nwl_pointer.axis event. The timestamp value may be the same as a\npreceding wl_pointer.axis event.\n\nOnly available since version 5 of the interface." ] fn axis_stop ( & mut self , object : * mut wl_pointer , time : u32 , axis : axis ) { } # [ doc = "axis click event\n\nDiscrete step information for scroll and other axes.\n\nThis event carries the axis value of the wl_pointer.axis event in\ndiscrete steps (e.g. mouse wheel clicks).\n\nThis event does not occur on its own, it is coupled with a\nwl_pointer.axis event that represents this axis value on a\ncontinuous scale. The protocol guarantees that each axis_discrete\nevent is always followed by exactly one axis event with the same\naxis number within the same wl_pointer.frame. Note that the protocol\nallows for other events to occur between the axis_discrete and\nits coupled axis event, including other axis_discrete or axis\nevents.\n\nThis event is optional; continuous scrolling devices\nlike two-finger scrolling on touchpads do not have discrete\nsteps and do not generate this event.\n\nThe discrete value carries the directional information. e.g. a value\nof -2 is two steps towards the negative direction of this axis.\n\nThe axis number is identical to the axis number in the associated\naxis event.\n\nThe order of wl_pointer.axis_discrete and wl_pointer.axis_source is\nnot guaranteed.\n\nOnly available since version 5 of the interface." ] fn axis_discrete ( & mut self , object : * mut wl_pointer , axis : axis , discrete : i32 ) { } } pub unsafe fn wl_pointer_set_user_data ( wl_pointer : * mut super :: wl_pointer :: wl_pointer , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_pointer as _ , user_data ) ; } pub unsafe fn wl_pointer_get_user_data ( wl_pointer : * mut super :: wl_pointer :: wl_pointer ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_pointer as _ ) ; } pub unsafe fn wl_pointer_get_version ( wl_pointer : * mut super :: wl_pointer :: wl_pointer ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_pointer as _ ) ; } pub unsafe fn wl_pointer_add_listener ( wl_pointer : * mut super :: wl_pointer :: wl_pointer , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_pointer as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_pointer_add_rust_listener ( wl_pointer : * mut super :: wl_pointer :: wl_pointer , listener : & dyn wl_pointer_listener ) -> bool { let to = ( listener as * const dyn wl_pointer_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_pointer_add_listener ( wl_pointer as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_pointer_destroy ( wl_pointer : * mut super :: wl_pointer :: wl_pointer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_pointer as _ ) ; } # [ doc = "set the pointer surface\n\nSet the pointer surface, i.e., the surface that contains the\npointer image (cursor). This request gives the surface the role\nof a cursor. If the surface already has another role, it raises\na protocol error.\n\nThe cursor actually changes only if the pointer\nfocus for this device is one of the requesting client's surfaces\nor the surface parameter is the current pointer surface. If\nthere was a previous surface set with this request it is\nreplaced. If surface is NULL, the pointer image is hidden.\n\nThe parameters hotspot_x and hotspot_y define the position of\nthe pointer surface relative to the pointer location. Its\ntop-left corner is always at (x, y) - (hotspot_x, hotspot_y),\nwhere (x, y) are the coordinates of the pointer location, in\nsurface-local coordinates.\n\nOn surface.attach requests to the pointer surface, hotspot_x\nand hotspot_y are decremented by the x and y parameters\npassed to the request. Attach must be confirmed by\nwl_surface.commit as usual.\n\nThe hotspot can also be updated by passing the currently set\npointer surface to this request with new values for hotspot_x\nand hotspot_y.\n\nThe current and pending input regions of the wl_surface are\ncleared, and wl_surface.set_input_region is ignored until the\nwl_surface is no longer used as the cursor. When the use as a\ncursor ends, the current and pending input regions become\nundefined, and the wl_surface is unmapped." ] pub unsafe fn wl_pointer_set_cursor ( wl_pointer : * mut super :: wl_pointer :: wl_pointer , serial : u32 , surface : * mut super :: wl_surface :: wl_surface , hotspot_x : i32 , hotspot_y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_pointer as _ , 0u32 , serial , surface , hotspot_x , hotspot_y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the pointer object\n\nUsing this request a client can tell the server that it is not going to\nuse the pointer object anymore.\n\nThis request destroys the pointer proxy object, so clients must not call\nwl_pointer_destroy() after using this request." ] pub unsafe fn wl_pointer_release ( wl_pointer : * mut super :: wl_pointer :: wl_pointer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_pointer as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_pointer as _ ) ; } } # [ doc = "keyboard input device\n\nThe wl_keyboard interface represents one or more keyboards\nassociated with a seat." ] pub mod wl_keyboard { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_keyboard { } # [ doc = "keyboard mapping format\n\nThis specifies the format of the keymap provided to the\nclient with the wl_keyboard.keymap event." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum keymap_format { # [ doc = "no keymap; client must understand how to interpret the raw keycode" ] no_keymap = 0 , # [ doc = "libxkbcommon compatible; to determine the xkb keycode, clients must add 8 to the key event keycode" ] xkb_v1 = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl keymap_format { pub fn from_raw ( n : u32 ) -> Option < keymap_format > { match n { 0 => Some ( keymap_format :: no_keymap ) , 1 => Some ( keymap_format :: xkb_v1 ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "physical key state\n\nDescribes the physical state of a key that produced the key event." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum key_state { # [ doc = "key is not pressed" ] released = 0 , # [ doc = "key is pressed" ] pressed = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl key_state { pub fn from_raw ( n : u32 ) -> Option < key_state > { match n { 0 => Some ( key_state :: released ) , 1 => Some ( key_state :: pressed ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_keyboard_requests : [ wl_message ; 1 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wl_keyboard_events_enter_types : [ * const wl_interface ; 3 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut wl_keyboard_events_leave_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_keyboard_events : [ wl_message ; 6 ] = [ wl_message { name : b"keymap\0" as * const u8 as * const c_char , signature : b"uhu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"uoa\0" as * const u8 as * const c_char , types : unsafe { & wl_keyboard_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"uo\0" as * const u8 as * const c_char , types : unsafe { & wl_keyboard_events_leave_types as * const _ } , } , wl_message { name : b"key\0" as * const u8 as * const c_char , signature : b"uuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifiers\0" as * const u8 as * const c_char , signature : b"uuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"repeat_info\0" as * const u8 as * const c_char , signature : b"4ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_keyboard_interface : wl_interface = wl_interface { name : b"wl_keyboard\0" as * const u8 as * const c_char , version : 6 , request_count : 1 , requests : unsafe { & wl_keyboard_requests as * const _ } , event_count : 6 , events : unsafe { & wl_keyboard_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_keyboard_listener { # [ doc = "keyboard mapping\n\nThis event provides a file descriptor to the client which can be\nmemory-mapped to provide a keyboard mapping description." ] fn keymap ( & mut self , object : * mut wl_keyboard , format : keymap_format , fd : :: std :: os :: unix :: io :: RawFd , size : u32 ) { } # [ doc = "enter event\n\nNotification that this seat's keyboard focus is on a certain\nsurface." ] fn enter ( & mut self , object : * mut wl_keyboard , serial : u32 , surface : * mut super :: wl_surface :: wl_surface , keys : * mut wl_array ) { } # [ doc = "leave event\n\nNotification that this seat's keyboard focus is no longer on\na certain surface.\n\nThe leave notification is sent before the enter notification\nfor the new focus." ] fn leave ( & mut self , object : * mut wl_keyboard , serial : u32 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "key event\n\nA key was pressed or released.\nThe time argument is a timestamp with millisecond\ngranularity, with an undefined base." ] fn key ( & mut self , object : * mut wl_keyboard , serial : u32 , time : u32 , key : u32 , state : key_state ) { } # [ doc = "modifier and group state\n\nNotifies clients that the modifier and/or group state has\nchanged, and it should update its local state." ] fn modifiers ( & mut self , object : * mut wl_keyboard , serial : u32 , mods_depressed : u32 , mods_latched : u32 , mods_locked : u32 , group : u32 ) { } # [ doc = "repeat rate and delay\n\nInforms the client about the keyboard's repeat rate and delay.\n\nThis event is sent as soon as the wl_keyboard object has been created,\nand is guaranteed to be received by the client before any key press\nevent.\n\nNegative values for either rate or delay are illegal. A rate of zero\nwill disable any repeating (regardless of the value of delay).\n\nThis event can be sent later on as well with a new value if necessary,\nso clients should continue listening for the event past the creation\nof wl_keyboard.\n\nOnly available since version 4 of the interface." ] fn repeat_info ( & mut self , object : * mut wl_keyboard , rate : i32 , delay : i32 ) { } } pub unsafe fn wl_keyboard_set_user_data ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_keyboard as _ , user_data ) ; } pub unsafe fn wl_keyboard_get_user_data ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_keyboard as _ ) ; } pub unsafe fn wl_keyboard_get_version ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_keyboard as _ ) ; } pub unsafe fn wl_keyboard_add_listener ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_keyboard as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_keyboard_add_rust_listener ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard , listener : & dyn wl_keyboard_listener ) -> bool { let to = ( listener as * const dyn wl_keyboard_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_keyboard_add_listener ( wl_keyboard as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_keyboard_destroy ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_keyboard as _ ) ; } # [ doc = "release the keyboard object" ] pub unsafe fn wl_keyboard_release ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_keyboard as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_keyboard as _ ) ; } } # [ doc = "touchscreen input device\n\nThe wl_touch interface represents a touchscreen\nassociated with a seat.\n\nTouch interactions can consist of one or more contacts.\nFor each contact, a series of events is generated, starting\nwith a down event, followed by zero or more motion events,\nand ending with an up event. Events relating to the same\ncontact point can be identified by the ID of the sequence." ] pub mod wl_touch { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_touch { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_touch_requests : [ wl_message ; 1 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wl_touch_events_down_types : [ * const wl_interface ; 6 ] = [ NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_touch_events : [ wl_message ; 7 ] = [ wl_message { name : b"down\0" as * const u8 as * const c_char , signature : b"uuoiff\0" as * const u8 as * const c_char , types : unsafe { & wl_touch_events_down_types as * const _ } , } , wl_message { name : b"up\0" as * const u8 as * const c_char , signature : b"uui\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"motion\0" as * const u8 as * const c_char , signature : b"uiff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cancel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"shape\0" as * const u8 as * const c_char , signature : b"6iff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"orientation\0" as * const u8 as * const c_char , signature : b"6if\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_touch_interface : wl_interface = wl_interface { name : b"wl_touch\0" as * const u8 as * const c_char , version : 6 , request_count : 1 , requests : unsafe { & wl_touch_requests as * const _ } , event_count : 7 , events : unsafe { & wl_touch_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_touch_listener { # [ doc = "touch down event and beginning of a touch sequence\n\nA new touch point has appeared on the surface. This touch point is\nassigned a unique ID. Future events from this touch point reference\nthis ID. The ID ceases to be valid after a touch up event and may be\nreused in the future." ] fn down ( & mut self , object : * mut wl_touch , serial : u32 , time : u32 , surface : * mut super :: wl_surface :: wl_surface , id : i32 , x : wl_fixed_t , y : wl_fixed_t ) { } # [ doc = "end of a touch event sequence\n\nThe touch point has disappeared. No further events will be sent for\nthis touch point and the touch point's ID is released and may be\nreused in a future touch down event." ] fn up ( & mut self , object : * mut wl_touch , serial : u32 , time : u32 , id : i32 ) { } # [ doc = "update of touch point coordinates\n\nA touch point has changed coordinates." ] fn motion ( & mut self , object : * mut wl_touch , time : u32 , id : i32 , x : wl_fixed_t , y : wl_fixed_t ) { } # [ doc = "end of touch frame event\n\nIndicates the end of a set of events that logically belong together.\nA client is expected to accumulate the data in all events within the\nframe before proceeding.\n\nA wl_touch.frame terminates at least one event but otherwise no\nguarantee is provided about the set of events within a frame. A client\nmust assume that any state not updated in a frame is unchanged from the\npreviously known state." ] fn frame ( & mut self , object : * mut wl_touch , ) { } # [ doc = "touch session cancelled\n\nSent if the compositor decides the touch stream is a global\ngesture. No further events are sent to the clients from that\nparticular gesture. Touch cancellation applies to all touch points\ncurrently active on this client's surface. The client is\nresponsible for finalizing the touch points, future touch points on\nthis surface may reuse the touch point ID." ] fn cancel ( & mut self , object : * mut wl_touch , ) { } # [ doc = "update shape of touch point\n\nSent when a touchpoint has changed its shape.\n\nThis event does not occur on its own. It is sent before a\nwl_touch.frame event and carries the new shape information for\nany previously reported, or new touch points of that frame.\n\nOther events describing the touch point such as wl_touch.down,\nwl_touch.motion or wl_touch.orientation may be sent within the\nsame wl_touch.frame. A client should treat these events as a single\nlogical touch point update. The order of wl_touch.shape,\nwl_touch.orientation and wl_touch.motion is not guaranteed.\nA wl_touch.down event is guaranteed to occur before the first\nwl_touch.shape event for this touch ID but both events may occur within\nthe same wl_touch.frame.\n\nA touchpoint shape is approximated by an ellipse through the major and\nminor axis length. The major axis length describes the longer diameter\nof the ellipse, while the minor axis length describes the shorter\ndiameter. Major and minor are orthogonal and both are specified in\nsurface-local coordinates. The center of the ellipse is always at the\ntouchpoint location as reported by wl_touch.down or wl_touch.move.\n\nThis event is only sent by the compositor if the touch device supports\nshape reports. The client has to make reasonable assumptions about the\nshape if it did not receive this event.\n\nOnly available since version 6 of the interface." ] fn shape ( & mut self , object : * mut wl_touch , id : i32 , major : wl_fixed_t , minor : wl_fixed_t ) { } # [ doc = "update orientation of touch point\n\nSent when a touchpoint has changed its orientation.\n\nThis event does not occur on its own. It is sent before a\nwl_touch.frame event and carries the new shape information for\nany previously reported, or new touch points of that frame.\n\nOther events describing the touch point such as wl_touch.down,\nwl_touch.motion or wl_touch.shape may be sent within the\nsame wl_touch.frame. A client should treat these events as a single\nlogical touch point update. The order of wl_touch.shape,\nwl_touch.orientation and wl_touch.motion is not guaranteed.\nA wl_touch.down event is guaranteed to occur before the first\nwl_touch.orientation event for this touch ID but both events may occur\nwithin the same wl_touch.frame.\n\nThe orientation describes the clockwise angle of a touchpoint's major\naxis to the positive surface y-axis and is normalized to the -180 to\n+180 degree range. The granularity of orientation depends on the touch\ndevice, some devices only support binary rotation values between 0 and\n90 degrees.\n\nThis event is only sent by the compositor if the touch device supports\norientation reports.\n\nOnly available since version 6 of the interface." ] fn orientation ( & mut self , object : * mut wl_touch , id : i32 , orientation : wl_fixed_t ) { } } pub unsafe fn wl_touch_set_user_data ( wl_touch : * mut super :: wl_touch :: wl_touch , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_touch as _ , user_data ) ; } pub unsafe fn wl_touch_get_user_data ( wl_touch : * mut super :: wl_touch :: wl_touch ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_touch as _ ) ; } pub unsafe fn wl_touch_get_version ( wl_touch : * mut super :: wl_touch :: wl_touch ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_touch as _ ) ; } pub unsafe fn wl_touch_add_listener ( wl_touch : * mut super :: wl_touch :: wl_touch , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_touch as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_touch_add_rust_listener ( wl_touch : * mut super :: wl_touch :: wl_touch , listener : & dyn wl_touch_listener ) -> bool { let to = ( listener as * const dyn wl_touch_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_touch_add_listener ( wl_touch as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_touch_destroy ( wl_touch : * mut super :: wl_touch :: wl_touch ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_touch as _ ) ; } # [ doc = "release the touch object" ] pub unsafe fn wl_touch_release ( wl_touch : * mut super :: wl_touch :: wl_touch ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_touch as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_touch as _ ) ; } } # [ doc = "compositor output region\n\nAn output describes part of the compositor geometry. The\ncompositor works in the 'compositor coordinate system' and an\noutput corresponds to a rectangular area in that space that is\nactually visible. This typically corresponds to a monitor that\ndisplays part of the compositor space. This object is published\nas global during start up, or when a monitor is hotplugged." ] pub mod wl_output { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_output { } # [ doc = "subpixel geometry information\n\nThis enumeration describes how the physical\npixels on an output are laid out." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum subpixel { # [ doc = "unknown geometry" ] unknown = 0 , # [ doc = "no geometry" ] none = 1 , # [ doc = "horizontal RGB" ] horizontal_rgb = 2 , # [ doc = "horizontal BGR" ] horizontal_bgr = 3 , # [ doc = "vertical RGB" ] vertical_rgb = 4 , # [ doc = "vertical BGR" ] vertical_bgr = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl subpixel { pub fn from_raw ( n : u32 ) -> Option < subpixel > { match n { 0 => Some ( subpixel :: unknown ) , 1 => Some ( subpixel :: none ) , 2 => Some ( subpixel :: horizontal_rgb ) , 3 => Some ( subpixel :: horizontal_bgr ) , 4 => Some ( subpixel :: vertical_rgb ) , 5 => Some ( subpixel :: vertical_bgr ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "transform from framebuffer to output\n\nThis describes the transform that a compositor will apply to a\nsurface to compensate for the rotation or mirroring of an\noutput device.\n\nThe flipped values correspond to an initial flip around a\nvertical axis followed by rotation.\n\nThe purpose is mainly to allow clients to render accordingly and\ntell the compositor, so that for fullscreen surfaces, the\ncompositor will still be able to scan out directly from client\nsurfaces." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum transform { # [ doc = "no transform" ] normal = 0 , # [ doc = "90 degrees counter-clockwise" ] _90 = 1 , # [ doc = "180 degrees counter-clockwise" ] _180 = 2 , # [ doc = "270 degrees counter-clockwise" ] _270 = 3 , # [ doc = "180 degree flip around a vertical axis" ] flipped = 4 , # [ doc = "flip and rotate 90 degrees counter-clockwise" ] flipped_90 = 5 , # [ doc = "flip and rotate 180 degrees counter-clockwise" ] flipped_180 = 6 , # [ doc = "flip and rotate 270 degrees counter-clockwise" ] flipped_270 = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl transform { pub fn from_raw ( n : u32 ) -> Option < transform > { match n { 0 => Some ( transform :: normal ) , 1 => Some ( transform :: _90 ) , 2 => Some ( transform :: _180 ) , 3 => Some ( transform :: _270 ) , 4 => Some ( transform :: flipped ) , 5 => Some ( transform :: flipped_90 ) , 6 => Some ( transform :: flipped_180 ) , 7 => Some ( transform :: flipped_270 ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { # [ doc = "mode information\n\nThese flags describe properties of an output mode.\nThey are used in the flags bitfield of the mode event." ] pub struct mode : u32 { # [ doc = "indicates this is the current mode" ] const current = 1 ; # [ doc = "indicates this is the preferred mode" ] const preferred = 2 ; } } impl mode { pub fn from_raw ( n : u32 ) -> Option < mode > { Some ( mode :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_output_requests : [ wl_message ; 1 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_output_events : [ wl_message ; 4 ] = [ wl_message { name : b"geometry\0" as * const u8 as * const c_char , signature : b"iiiiissi\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"uiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"scale\0" as * const u8 as * const c_char , signature : b"2i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_output_interface : wl_interface = wl_interface { name : b"wl_output\0" as * const u8 as * const c_char , version : 3 , request_count : 1 , requests : unsafe { & wl_output_requests as * const _ } , event_count : 4 , events : unsafe { & wl_output_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_output_listener { # [ doc = "properties of the output\n\nThe geometry event describes geometric properties of the output.\nThe event is sent when binding to the output object and whenever\nany of the properties change.\n\nThe physical size can be set to zero if it doesn't make sense for this\noutput (e.g. for projectors or virtual outputs)." ] fn geometry ( & mut self , object : * mut wl_output , x : i32 , y : i32 , physical_width : i32 , physical_height : i32 , subpixel : subpixel , make : * mut c_char , model : * mut c_char , transform : transform ) { } # [ doc = "advertise available modes for the output\n\nThe mode event describes an available mode for the output.\n\nThe event is sent when binding to the output object and there\nwill always be one mode, the current mode. The event is sent\nagain if an output changes mode, for the mode that is now\ncurrent. In other words, the current mode is always the last\nmode that was received with the current flag set.\n\nThe size of a mode is given in physical hardware units of\nthe output device. This is not necessarily the same as\nthe output size in the global compositor space. For instance,\nthe output may be scaled, as described in wl_output.scale,\nor transformed, as described in wl_output.transform." ] fn mode ( & mut self , object : * mut wl_output , flags : mode , width : i32 , height : i32 , refresh : i32 ) { } # [ doc = "sent all information about output\n\nThis event is sent after all other properties have been\nsent after binding to the output object and after any\nother property changes done after that. This allows\nchanges to the output properties to be seen as\natomic, even if they happen via multiple events.\n\nOnly available since version 2 of the interface." ] fn done ( & mut self , object : * mut wl_output , ) { } # [ doc = "output scaling properties\n\nThis event contains scaling geometry information\nthat is not in the geometry event. It may be sent after\nbinding the output object or if the output scale changes\nlater. If it is not sent, the client should assume a\nscale of 1.\n\nA scale larger than 1 means that the compositor will\nautomatically scale surface buffers by this amount\nwhen rendering. This is used for very high resolution\ndisplays where applications rendering at the native\nresolution would be too small to be legible.\n\nIt is intended that scaling aware clients track the\ncurrent output of a surface, and if it is on a scaled\noutput it should use wl_surface.set_buffer_scale with\nthe scale of the output. That way the compositor can\navoid scaling the surface, and the client can supply\na higher detail image.\n\nOnly available since version 2 of the interface." ] fn scale ( & mut self , object : * mut wl_output , factor : i32 ) { } } pub unsafe fn wl_output_set_user_data ( wl_output : * mut super :: wl_output :: wl_output , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_output as _ , user_data ) ; } pub unsafe fn wl_output_get_user_data ( wl_output : * mut super :: wl_output :: wl_output ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_output as _ ) ; } pub unsafe fn wl_output_get_version ( wl_output : * mut super :: wl_output :: wl_output ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_output as _ ) ; } pub unsafe fn wl_output_add_listener ( wl_output : * mut super :: wl_output :: wl_output , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_output as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_output_add_rust_listener ( wl_output : * mut super :: wl_output :: wl_output , listener : & dyn wl_output_listener ) -> bool { let to = ( listener as * const dyn wl_output_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_output_add_listener ( wl_output as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_output_destroy ( wl_output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_output as _ ) ; } # [ doc = "release the output object\n\nUsing this request a client can tell the server that it is not going to\nuse the output object anymore." ] pub unsafe fn wl_output_release ( wl_output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_output as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_output as _ ) ; } } # [ doc = "region interface\n\nA region object describes an area.\n\nRegion objects are used to describe the opaque and input\nregions of a surface." ] pub mod wl_region { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_region { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_region_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"add\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"subtract\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_region_interface : wl_interface = wl_interface { name : b"wl_region\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & wl_region_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_region_listener { } pub unsafe fn wl_region_set_user_data ( wl_region : * mut super :: wl_region :: wl_region , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_region as _ , user_data ) ; } pub unsafe fn wl_region_get_user_data ( wl_region : * mut super :: wl_region :: wl_region ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_region as _ ) ; } pub unsafe fn wl_region_get_version ( wl_region : * mut super :: wl_region :: wl_region ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_region as _ ) ; } pub unsafe fn wl_region_add_listener ( wl_region : * mut super :: wl_region :: wl_region , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_region as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_region_add_rust_listener ( wl_region : * mut super :: wl_region :: wl_region , listener : & dyn wl_region_listener ) -> bool { let to = ( listener as * const dyn wl_region_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_region_add_listener ( wl_region as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy region\n\nDestroy the region. This will invalidate the object ID." ] pub unsafe fn wl_region_destroy ( wl_region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_region as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_region as _ ) ; } # [ doc = "add rectangle to region\n\nAdd the specified rectangle to the region." ] pub unsafe fn wl_region_add ( wl_region : * mut super :: wl_region :: wl_region , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_region as _ , 1u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "subtract rectangle from region\n\nSubtract the specified rectangle from the region." ] pub unsafe fn wl_region_subtract ( wl_region : * mut super :: wl_region :: wl_region , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_region as _ , 2u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "sub-surface compositing\n\nThe global interface exposing sub-surface compositing capabilities.\nA wl_surface, that has sub-surfaces associated, is called the\nparent surface. Sub-surfaces can be arbitrarily nested and create\na tree of sub-surfaces.\n\nThe root surface in a tree of sub-surfaces is the main\nsurface. The main surface cannot be a sub-surface, because\nsub-surfaces must always have a parent.\n\nA main surface with its sub-surfaces forms a (compound) window.\nFor window management purposes, this set of wl_surface objects is\nto be considered as a single window, and it should also behave as\nsuch.\n\nThe aim of sub-surfaces is to offload some of the compositing work\nwithin a window from clients to the compositor. A prime example is\na video player with decorations and video in separate wl_surface\nobjects. This should allow the compositor to pass YUV video buffer\nprocessing to dedicated overlay hardware when possible." ] pub mod wl_subcompositor { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_subcompositor { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "the to-be sub-surface is invalid" ] bad_surface = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: bad_surface ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_subcompositor_requests_get_subsurface_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_subsurface :: wl_subsurface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_subcompositor_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_subsurface\0" as * const u8 as * const c_char , signature : b"noo\0" as * const u8 as * const c_char , types : unsafe { & wl_subcompositor_requests_get_subsurface_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_subcompositor_interface : wl_interface = wl_interface { name : b"wl_subcompositor\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & wl_subcompositor_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_subcompositor_listener { } pub unsafe fn wl_subcompositor_set_user_data ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_subcompositor as _ , user_data ) ; } pub unsafe fn wl_subcompositor_get_user_data ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_subcompositor as _ ) ; } pub unsafe fn wl_subcompositor_get_version ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_subcompositor as _ ) ; } pub unsafe fn wl_subcompositor_add_listener ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_subcompositor as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_subcompositor_add_rust_listener ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor , listener : & dyn wl_subcompositor_listener ) -> bool { let to = ( listener as * const dyn wl_subcompositor_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_subcompositor_add_listener ( wl_subcompositor as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "unbind from the subcompositor interface\n\nInforms the server that the client will not be using this\nprotocol object anymore. This does not affect any other\nobjects, wl_subsurface objects included." ] pub unsafe fn wl_subcompositor_destroy ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subcompositor as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_subcompositor as _ ) ; } # [ doc = "give a surface the role sub-surface\n\nCreate a sub-surface interface for the given surface, and\nassociate it with the given parent surface. This turns a\nplain wl_surface into a sub-surface.\n\nThe to-be sub-surface must not already have another role, and it\nmust not have an existing wl_subsurface object. Otherwise a protocol\nerror is raised.\n\nAdding sub-surfaces to a parent is a double-buffered operation on the\nparent (see wl_surface.commit). The effect of adding a sub-surface\nbecomes visible on the next time the state of the parent surface is\napplied.\n\nThis request modifies the behaviour of wl_surface.commit request on\nthe sub-surface, see the documentation on wl_subsurface interface." ] pub unsafe fn wl_subcompositor_get_subsurface ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor , surface : * mut super :: wl_surface :: wl_surface , parent : * mut super :: wl_surface :: wl_surface ) -> * mut super :: wl_subsurface :: wl_subsurface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_subcompositor as _ , 1u32 , & super :: wl_subsurface :: wl_subsurface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface , parent ) ; return r as _ ; } } # [ doc = "sub-surface interface to a wl_surface\n\nAn additional interface to a wl_surface object, which has been\nmade a sub-surface. A sub-surface has one parent surface. A\nsub-surface's size and position are not limited to that of the parent.\nParticularly, a sub-surface is not automatically clipped to its\nparent's area.\n\nA sub-surface becomes mapped, when a non-NULL wl_buffer is applied\nand the parent surface is mapped. The order of which one happens\nfirst is irrelevant. A sub-surface is hidden if the parent becomes\nhidden, or if a NULL wl_buffer is applied. These rules apply\nrecursively through the tree of surfaces.\n\nThe behaviour of a wl_surface.commit request on a sub-surface\ndepends on the sub-surface's mode. The possible modes are\nsynchronized and desynchronized, see methods\nwl_subsurface.set_sync and wl_subsurface.set_desync. Synchronized\nmode caches the wl_surface state to be applied when the parent's\nstate gets applied, and desynchronized mode applies the pending\nwl_surface state directly. A sub-surface is initially in the\nsynchronized mode.\n\nSub-surfaces have also other kind of state, which is managed by\nwl_subsurface requests, as opposed to wl_surface requests. This\nstate includes the sub-surface position relative to the parent\nsurface (wl_subsurface.set_position), and the stacking order of\nthe parent and its sub-surfaces (wl_subsurface.place_above and\n.place_below). This state is applied when the parent surface's\nwl_surface state is applied, regardless of the sub-surface's mode.\nAs the exception, set_sync and set_desync are effective immediately.\n\nThe main surface can be thought to be always in desynchronized mode,\nsince it does not have a parent in the sub-surfaces sense.\n\nEven if a sub-surface is in desynchronized mode, it will behave as\nin synchronized mode, if its parent surface behaves as in\nsynchronized mode. This rule is applied recursively throughout the\ntree of surfaces. This means, that one can set a sub-surface into\nsynchronized mode, and then assume that all its child and grand-child\nsub-surfaces are synchronized, too, without explicitly setting them.\n\nIf the wl_surface associated with the wl_subsurface is destroyed, the\nwl_subsurface object becomes inert. Note, that destroying either object\ntakes effect immediately. If you need to synchronize the removal\nof a sub-surface to the parent surface update, unmap the sub-surface\nfirst by attaching a NULL wl_buffer, update parent, and then destroy\nthe sub-surface.\n\nIf the parent wl_surface object is destroyed, the sub-surface is\nunmapped." ] pub mod wl_subsurface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_subsurface { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "wl_surface is not a sibling or the parent" ] bad_surface = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: bad_surface ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_subsurface_requests_place_above_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut wl_subsurface_requests_place_below_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_subsurface_requests : [ wl_message ; 6 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"place_above\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wl_subsurface_requests_place_above_types as * const _ } , } , wl_message { name : b"place_below\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wl_subsurface_requests_place_below_types as * const _ } , } , wl_message { name : b"set_sync\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_desync\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_subsurface_interface : wl_interface = wl_interface { name : b"wl_subsurface\0" as * const u8 as * const c_char , version : 1 , request_count : 6 , requests : unsafe { & wl_subsurface_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_subsurface_listener { } pub unsafe fn wl_subsurface_set_user_data ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_subsurface as _ , user_data ) ; } pub unsafe fn wl_subsurface_get_user_data ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_subsurface as _ ) ; } pub unsafe fn wl_subsurface_get_version ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_subsurface as _ ) ; } pub unsafe fn wl_subsurface_add_listener ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_subsurface as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_subsurface_add_rust_listener ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface , listener : & dyn wl_subsurface_listener ) -> bool { let to = ( listener as * const dyn wl_subsurface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_subsurface_add_listener ( wl_subsurface as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "remove sub-surface interface\n\nThe sub-surface interface is removed from the wl_surface object\nthat was turned into a sub-surface with a\nwl_subcompositor.get_subsurface request. The wl_surface's association\nto the parent is deleted, and the wl_surface loses its role as\na sub-surface. The wl_surface is unmapped immediately." ] pub unsafe fn wl_subsurface_destroy ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subsurface as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_subsurface as _ ) ; } # [ doc = "reposition the sub-surface\n\nThis schedules a sub-surface position change.\nThe sub-surface will be moved so that its origin (top left\ncorner pixel) will be at the location x, y of the parent surface\ncoordinate system. The coordinates are not restricted to the parent\nsurface area. Negative values are allowed.\n\nThe scheduled coordinates will take effect whenever the state of the\nparent surface is applied. When this happens depends on whether the\nparent surface is in synchronized mode or not. See\nwl_subsurface.set_sync and wl_subsurface.set_desync for details.\n\nIf more than one set_position request is invoked by the client before\nthe commit of the parent surface, the position of a new request always\nreplaces the scheduled position from any previous request.\n\nThe initial position is 0, 0." ] pub unsafe fn wl_subsurface_set_position ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subsurface as _ , 1u32 , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "restack the sub-surface\n\nThis sub-surface is taken from the stack, and put back just\nabove the reference surface, changing the z-order of the sub-surfaces.\nThe reference surface must be one of the sibling surfaces, or the\nparent surface. Using any other surface, including this sub-surface,\nwill cause a protocol error.\n\nThe z-order is double-buffered. Requests are handled in order and\napplied immediately to a pending state. The final pending state is\ncopied to the active state the next time the state of the parent\nsurface is applied. When this happens depends on whether the parent\nsurface is in synchronized mode or not. See wl_subsurface.set_sync and\nwl_subsurface.set_desync for details.\n\nA new sub-surface is initially added as the top-most in the stack\nof its siblings and parent." ] pub unsafe fn wl_subsurface_place_above ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface , sibling : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subsurface as _ , 2u32 , sibling , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "restack the sub-surface\n\nThe sub-surface is placed just below the reference surface.\nSee wl_subsurface.place_above." ] pub unsafe fn wl_subsurface_place_below ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface , sibling : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subsurface as _ , 3u32 , sibling , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set sub-surface to synchronized mode\n\nChange the commit behaviour of the sub-surface to synchronized\nmode, also described as the parent dependent mode.\n\nIn synchronized mode, wl_surface.commit on a sub-surface will\naccumulate the committed state in a cache, but the state will\nnot be applied and hence will not change the compositor output.\nThe cached state is applied to the sub-surface immediately after\nthe parent surface's state is applied. This ensures atomic\nupdates of the parent and all its synchronized sub-surfaces.\nApplying the cached state will invalidate the cache, so further\nparent surface commits do not (re-)apply old state.\n\nSee wl_subsurface for the recursive effect of this mode." ] pub unsafe fn wl_subsurface_set_sync ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subsurface as _ , 4u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set sub-surface to desynchronized mode\n\nChange the commit behaviour of the sub-surface to desynchronized\nmode, also described as independent or freely running mode.\n\nIn desynchronized mode, wl_surface.commit on a sub-surface will\napply the pending state directly, without caching, as happens\nnormally with a wl_surface. Calling wl_surface.commit on the\nparent surface has no effect on the sub-surface's wl_surface\nstate. This mode allows a sub-surface to be updated on its own.\n\nIf cached state exists when wl_surface.commit is called in\ndesynchronized mode, the pending state is added to the cached\nstate, and applied as a whole. This invalidates the cache.\n\nNote: even if a sub-surface is set to desynchronized, a parent\nsub-surface may override it to behave as synchronized. For details,\nsee wl_subsurface.\n\nIf a surface's parent surface behaves as desynchronized, then\nthe cached state is applied on set_desync." ] pub unsafe fn wl_subsurface_set_desync ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subsurface as _ , 5u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod xdg_foreign_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "interface for exporting surfaces\n\nA global interface used for exporting surfaces that can later be imported\nusing xdg_importer." ] pub mod zxdg_exporter_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_exporter_v1 { } static mut zxdg_exporter_v1_requests_export_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_exported_v1 :: zxdg_exported_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_exporter_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"export\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zxdg_exporter_v1_requests_export_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_exporter_v1_interface : wl_interface = wl_interface { name : b"zxdg_exporter_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_exporter_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_exporter_v1_listener { } pub unsafe fn zxdg_exporter_v1_set_user_data ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_exporter_v1 as _ , user_data ) ; } pub unsafe fn zxdg_exporter_v1_get_user_data ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_exporter_v1 as _ ) ; } pub unsafe fn zxdg_exporter_v1_get_version ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_exporter_v1 as _ ) ; } pub unsafe fn zxdg_exporter_v1_add_listener ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_exporter_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_exporter_v1_add_rust_listener ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 , listener : & dyn zxdg_exporter_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_exporter_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_exporter_v1_add_listener ( zxdg_exporter_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_exporter object\n\nNotify the compositor that the xdg_exporter object will no longer be\nused." ] pub unsafe fn zxdg_exporter_v1_destroy ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_exporter_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_exporter_v1 as _ ) ; } # [ doc = "export a surface\n\nThe export request exports the passed surface so that it can later be\nimported via xdg_importer. When called, a new xdg_exported object will\nbe created and xdg_exported.handle will be sent immediately. See the\ncorresponding interface and event for details.\n\nA surface may be exported multiple times, and each exported handle may\nbe used to create an xdg_imported multiple times. Only xdg_surface\nsurfaces may be exported." ] pub unsafe fn zxdg_exporter_v1_export ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_exporter_v1 as _ , 1u32 , & super :: zxdg_exported_v1 :: zxdg_exported_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "interface for importing surfaces\n\nA global interface used for importing surfaces exported by xdg_exporter.\nWith this interface, a client can create a reference to a surface of\nanother client." ] pub mod zxdg_importer_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_importer_v1 { } static mut zxdg_importer_v1_requests_import_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_imported_v1 :: zxdg_imported_v1_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_importer_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"import\0" as * const u8 as * const c_char , signature : b"ns\0" as * const u8 as * const c_char , types : unsafe { & zxdg_importer_v1_requests_import_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_importer_v1_interface : wl_interface = wl_interface { name : b"zxdg_importer_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_importer_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_importer_v1_listener { } pub unsafe fn zxdg_importer_v1_set_user_data ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_importer_v1 as _ , user_data ) ; } pub unsafe fn zxdg_importer_v1_get_user_data ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_importer_v1 as _ ) ; } pub unsafe fn zxdg_importer_v1_get_version ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_importer_v1 as _ ) ; } pub unsafe fn zxdg_importer_v1_add_listener ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_importer_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_importer_v1_add_rust_listener ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 , listener : & dyn zxdg_importer_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_importer_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_importer_v1_add_listener ( zxdg_importer_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_importer object\n\nNotify the compositor that the xdg_importer object will no longer be\nused." ] pub unsafe fn zxdg_importer_v1_destroy ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_importer_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_importer_v1 as _ ) ; } # [ doc = "import a surface\n\nThe import request imports a surface from any client given a handle\nretrieved by exporting said surface using xdg_exporter.export. When\ncalled, a new xdg_imported object will be created. This new object\nrepresents the imported surface, and the importing client can\nmanipulate its relationship using it. See xdg_imported for details." ] pub unsafe fn zxdg_importer_v1_import ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 , handle : * const c_char ) -> * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_importer_v1 as _ , 1u32 , & super :: zxdg_imported_v1 :: zxdg_imported_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , handle ) ; return r as _ ; } } # [ doc = "an exported surface handle\n\nAn xdg_exported object represents an exported reference to a surface. The\nexported surface may be referenced as long as the xdg_exported object not\ndestroyed. Destroying the xdg_exported invalidates any relationship the\nimporter may have established using xdg_imported." ] pub mod zxdg_exported_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_exported_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_exported_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_exported_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"handle\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_exported_v1_interface : wl_interface = wl_interface { name : b"zxdg_exported_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zxdg_exported_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_exported_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_exported_v1_listener { # [ doc = "the exported surface handle\n\nThe handle event contains the unique handle of this exported surface\nreference. It may be shared with any client, which then can use it to\nimport the surface by calling xdg_importer.import. A handle may be\nused to import the surface multiple times." ] fn handle ( & mut self , object : * mut zxdg_exported_v1 , handle : * mut c_char ) { } } pub unsafe fn zxdg_exported_v1_set_user_data ( zxdg_exported_v1 : * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_exported_v1 as _ , user_data ) ; } pub unsafe fn zxdg_exported_v1_get_user_data ( zxdg_exported_v1 : * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_exported_v1 as _ ) ; } pub unsafe fn zxdg_exported_v1_get_version ( zxdg_exported_v1 : * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_exported_v1 as _ ) ; } pub unsafe fn zxdg_exported_v1_add_listener ( zxdg_exported_v1 : * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_exported_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_exported_v1_add_rust_listener ( zxdg_exported_v1 : * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 , listener : & dyn zxdg_exported_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_exported_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_exported_v1_add_listener ( zxdg_exported_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "unexport the exported surface\n\nRevoke the previously exported surface. This invalidates any\nrelationship the importer may have set up using the xdg_imported created\ngiven the handle sent via xdg_exported.handle." ] pub unsafe fn zxdg_exported_v1_destroy ( zxdg_exported_v1 : * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_exported_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_exported_v1 as _ ) ; } } # [ doc = "an imported surface handle\n\nAn xdg_imported object represents an imported reference to surface exported\nby some client. A client can use this interface to manipulate\nrelationships between its own surfaces and the imported surface." ] pub mod zxdg_imported_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_imported_v1 { } static mut zxdg_imported_v1_requests_set_parent_of_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_imported_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent_of\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zxdg_imported_v1_requests_set_parent_of_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_imported_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"destroyed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_imported_v1_interface : wl_interface = wl_interface { name : b"zxdg_imported_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_imported_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_imported_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_imported_v1_listener { # [ doc = "the imported surface handle has been destroyed\n\nThe imported surface handle has been destroyed and any relationship set\nup has been invalidated. This may happen for various reasons, for\nexample if the exported surface or the exported surface handle has been\ndestroyed, if the handle used for importing was invalid." ] fn destroyed ( & mut self , object : * mut zxdg_imported_v1 , ) { } } pub unsafe fn zxdg_imported_v1_set_user_data ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_imported_v1 as _ , user_data ) ; } pub unsafe fn zxdg_imported_v1_get_user_data ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_imported_v1 as _ ) ; } pub unsafe fn zxdg_imported_v1_get_version ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_imported_v1 as _ ) ; } pub unsafe fn zxdg_imported_v1_add_listener ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_imported_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_imported_v1_add_rust_listener ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 , listener : & dyn zxdg_imported_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_imported_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_imported_v1_add_listener ( zxdg_imported_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_imported object\n\nNotify the compositor that it will no longer use the xdg_imported\nobject. Any relationship that may have been set up will at this point\nbe invalidated." ] pub unsafe fn zxdg_imported_v1_destroy ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_imported_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_imported_v1 as _ ) ; } # [ doc = "set as the parent of some surface\n\nSet the imported surface as the parent of some surface of the client.\nThe passed surface must be a toplevel xdg_surface. Calling this function\nsets up a surface to surface relation with the same stacking and positioning\nsemantics as xdg_surface.set_parent." ] pub unsafe fn zxdg_imported_v1_set_parent_of ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_imported_v1 as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod fullscreen_shell_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "displays a single surface per output\n\nDisplays a single surface per output.\n\nThis interface provides a mechanism for a single client to display\nsimple full-screen surfaces. While there technically may be multiple\nclients bound to this interface, only one of those clients should be\nshown at a time.\n\nTo present a surface, the client uses either the present_surface or\npresent_surface_for_mode requests. Presenting a surface takes effect\non the next wl_surface.commit. See the individual requests for\ndetails about scaling and mode switches.\n\nThe client can have at most one surface per output at any time.\nRequesting a surface to be presented on an output that already has a\nsurface replaces the previously presented surface. Presenting a null\nsurface removes its content and effectively disables the output.\nExactly what happens when an output is \"disabled\" is\ncompositor-specific. The same surface may be presented on multiple\noutputs simultaneously.\n\nOnce a surface is presented on an output, it stays on that output\nuntil either the client removes it or the compositor destroys the\noutput. This way, the client can update the output's contents by\nsimply attaching a new buffer.\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_fullscreen_shell_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_fullscreen_shell_v1 { } # [ doc = "capabilities advertised by the compositor\n\nVarious capabilities that can be advertised by the compositor. They\nare advertised one-at-a-time when the wl_fullscreen_shell interface is\nbound. See the wl_fullscreen_shell.capability event for more details.\n\nARBITRARY_MODES:\nThis is a hint to the client that indicates that the compositor is\ncapable of setting practically any mode on its outputs. If this\ncapability is provided, wl_fullscreen_shell.present_surface_for_mode\nwill almost never fail and clients should feel free to set whatever\nmode they like. If the compositor does not advertise this, it may\nstill support some modes that are not advertised through wl_global.mode\nbut it is less likely.\n\nCURSOR_PLANE:\nThis is a hint to the client that indicates that the compositor can\nhandle a cursor surface from the client without actually compositing.\nThis may be because of a hardware cursor plane or some other mechanism.\nIf the compositor does not advertise this capability then setting\nwl_pointer.cursor may degrade performance or be ignored entirely. If\nCURSOR_PLANE is not advertised, it is recommended that the client draw\nits own cursor and set wl_pointer.cursor(NULL)." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum capability { # [ doc = "compositor is capable of almost any output mode" ] arbitrary_modes = 1 , # [ doc = "compositor has a separate cursor plane" ] cursor_plane = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { match n { 1 => Some ( capability :: arbitrary_modes ) , 2 => Some ( capability :: cursor_plane ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "different method to set the surface fullscreen\n\nHints to indicate to the compositor how to deal with a conflict\nbetween the dimensions of the surface and the dimensions of the\noutput. The compositor is free to ignore this parameter." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum present_method { # [ doc = "no preference, apply default policy" ] default = 0 , # [ doc = "center the surface on the output" ] center = 1 , # [ doc = "scale the surface, preserving aspect ratio, to the largest size that will fit on the output" ] zoom = 2 , # [ doc = "scale the surface, preserving aspect ratio, to fully fill the output cropping if needed" ] zoom_crop = 3 , # [ doc = "scale the surface to the size of the output ignoring aspect ratio" ] stretch = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl present_method { pub fn from_raw ( n : u32 ) -> Option < present_method > { match n { 0 => Some ( present_method :: default ) , 1 => Some ( present_method :: center ) , 2 => Some ( present_method :: zoom ) , 3 => Some ( present_method :: zoom_crop ) , 4 => Some ( present_method :: stretch ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "wl_fullscreen_shell error values\n\nThese errors can be emitted in response to wl_fullscreen_shell requests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "present_method is not known" ] invalid_method = 0 , # [ doc = "given wl_surface has another role" ] role = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_method ) , 1 => Some ( error :: role ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_fullscreen_shell_v1_requests_present_surface_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; static mut zwp_fullscreen_shell_v1_requests_present_surface_for_mode_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , NULLPTR as * const wl_interface , unsafe { & super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_fullscreen_shell_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"present_surface\0" as * const u8 as * const c_char , signature : b"?ou?o\0" as * const u8 as * const c_char , types : unsafe { & zwp_fullscreen_shell_v1_requests_present_surface_types as * const _ } , } , wl_message { name : b"present_surface_for_mode\0" as * const u8 as * const c_char , signature : b"ooin\0" as * const u8 as * const c_char , types : unsafe { & zwp_fullscreen_shell_v1_requests_present_surface_for_mode_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_fullscreen_shell_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"capability\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_fullscreen_shell_v1_interface : wl_interface = wl_interface { name : b"zwp_fullscreen_shell_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & zwp_fullscreen_shell_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zwp_fullscreen_shell_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_fullscreen_shell_v1_listener { # [ doc = "advertises a capability of the compositor\n\nAdvertises a single capability of the compositor.\n\nWhen the wl_fullscreen_shell interface is bound, this event is emitted\nonce for each capability advertised. Valid capabilities are given by\nthe wl_fullscreen_shell.capability enum. If clients want to take\nadvantage of any of these capabilities, they should use a\nwl_display.sync request immediately after binding to ensure that they\nreceive all the capability events." ] fn capability ( & mut self , object : * mut zwp_fullscreen_shell_v1 , capability : capability ) { } } pub unsafe fn zwp_fullscreen_shell_v1_set_user_data ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_fullscreen_shell_v1 as _ , user_data ) ; } pub unsafe fn zwp_fullscreen_shell_v1_get_user_data ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_fullscreen_shell_v1 as _ ) ; } pub unsafe fn zwp_fullscreen_shell_v1_get_version ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_fullscreen_shell_v1 as _ ) ; } pub unsafe fn zwp_fullscreen_shell_v1_add_listener ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_fullscreen_shell_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_fullscreen_shell_v1_add_rust_listener ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 , listener : & dyn zwp_fullscreen_shell_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_fullscreen_shell_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_fullscreen_shell_v1_add_listener ( zwp_fullscreen_shell_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_fullscreen_shell_v1_destroy ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_fullscreen_shell_v1 as _ ) ; } # [ doc = "release the wl_fullscreen_shell interface\n\nRelease the binding from the wl_fullscreen_shell interface.\n\nThis destroys the server-side object and frees this binding. If\nthe client binds to wl_fullscreen_shell multiple times, it may wish\nto free some of those bindings." ] pub unsafe fn zwp_fullscreen_shell_v1_release ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_fullscreen_shell_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_fullscreen_shell_v1 as _ ) ; } # [ doc = "present surface for display\n\nPresent a surface on the given output.\n\nIf the output is null, the compositor will present the surface on\nwhatever display (or displays) it thinks best. In particular, this\nmay replace any or all surfaces currently presented so it should\nnot be used in combination with placing surfaces on specific\noutputs.\n\nThe method parameter is a hint to the compositor for how the surface\nis to be presented. In particular, it tells the compositor how to\nhandle a size mismatch between the presented surface and the\noutput. The compositor is free to ignore this parameter.\n\nThe \"zoom\", \"zoom_crop\", and \"stretch\" methods imply a scaling\noperation on the surface. This will override any kind of output\nscaling, so the buffer_scale property of the surface is effectively\nignored.\n\nThis request gives the surface the role of a fullscreen shell surface.\nIf the surface already has another role, it raises a role protocol\nerror." ] pub unsafe fn zwp_fullscreen_shell_v1_present_surface ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 , surface : * mut super :: wl_surface :: wl_surface , method : u32 , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_fullscreen_shell_v1 as _ , 1u32 , surface , method , output , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "present surface for display at a particular mode\n\nPresents a surface on the given output for a particular mode.\n\nIf the current size of the output differs from that of the surface,\nthe compositor will attempt to change the size of the output to\nmatch the surface. The result of the mode-switch operation will be\nreturned via the provided wl_fullscreen_shell_mode_feedback object.\n\nIf the current output mode matches the one requested or if the\ncompositor successfully switches the mode to match the surface,\nthen the mode_successful event will be sent and the output will\ncontain the contents of the given surface. If the compositor\ncannot match the output size to the surface size, the mode_failed\nwill be sent and the output will contain the contents of the\npreviously presented surface (if any). If another surface is\npresented on the given output before either of these has a chance\nto happen, the present_cancelled event will be sent.\n\nDue to race conditions and other issues unknown to the client, no\nmode-switch operation is guaranteed to succeed. However, if the\nmode is one advertised by wl_output.mode or if the compositor\nadvertises the ARBITRARY_MODES capability, then the client should\nexpect that the mode-switch operation will usually succeed.\n\nIf the size of the presented surface changes, the resulting output\nis undefined. The compositor may attempt to change the output mode\nto compensate. However, there is no guarantee that a suitable mode\nwill be found and the client has no way to be notified of success\nor failure.\n\nThe framerate parameter specifies the desired framerate for the\noutput in mHz. The compositor is free to ignore this parameter. A\nvalue of 0 indicates that the client has no preference.\n\nIf the value of wl_output.scale differs from wl_surface.buffer_scale,\nthen the compositor may choose a mode that matches either the buffer\nsize or the surface size. In either case, the surface will fill the\noutput.\n\nThis request gives the surface the role of a fullscreen shell surface.\nIf the surface already has another role, it raises a role protocol\nerror." ] pub unsafe fn zwp_fullscreen_shell_v1_present_surface_for_mode ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 , surface : * mut super :: wl_surface :: wl_surface , output : * mut super :: wl_output :: wl_output , framerate : i32 ) -> * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_fullscreen_shell_v1 as _ , 2u32 , & super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1_interface as * const _ , surface , output , framerate , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } pub mod zwp_fullscreen_shell_mode_feedback_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_fullscreen_shell_mode_feedback_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_fullscreen_shell_mode_feedback_v1_events : [ wl_message ; 3 ] = [ wl_message { name : b"mode_successful\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"mode_failed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"present_cancelled\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_fullscreen_shell_mode_feedback_v1_interface : wl_interface = wl_interface { name : b"zwp_fullscreen_shell_mode_feedback_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 3 , events : unsafe { & zwp_fullscreen_shell_mode_feedback_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_fullscreen_shell_mode_feedback_v1_listener { # [ doc = "mode switch succeeded\n\nThis event indicates that the attempted mode switch operation was\nsuccessful. A surface of the size requested in the mode switch\nwill fill the output without scaling.\n\nUpon receiving this event, the client should destroy the\nwl_fullscreen_shell_mode_feedback object." ] fn mode_successful ( & mut self , object : * mut zwp_fullscreen_shell_mode_feedback_v1 , ) { } # [ doc = "mode switch failed\n\nThis event indicates that the attempted mode switch operation\nfailed. This may be because the requested output mode is not\npossible or it may mean that the compositor does not want to allow it.\n\nUpon receiving this event, the client should destroy the\nwl_fullscreen_shell_mode_feedback object." ] fn mode_failed ( & mut self , object : * mut zwp_fullscreen_shell_mode_feedback_v1 , ) { } # [ doc = "mode switch cancelled\n\nThis event indicates that the attempted mode switch operation was\ncancelled. Most likely this is because the client requested a\nsecond mode switch before the first one completed.\n\nUpon receiving this event, the client should destroy the\nwl_fullscreen_shell_mode_feedback object." ] fn present_cancelled ( & mut self , object : * mut zwp_fullscreen_shell_mode_feedback_v1 , ) { } } pub unsafe fn zwp_fullscreen_shell_mode_feedback_v1_set_user_data ( zwp_fullscreen_shell_mode_feedback_v1 : * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_fullscreen_shell_mode_feedback_v1 as _ , user_data ) ; } pub unsafe fn zwp_fullscreen_shell_mode_feedback_v1_get_user_data ( zwp_fullscreen_shell_mode_feedback_v1 : * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_fullscreen_shell_mode_feedback_v1 as _ ) ; } pub unsafe fn zwp_fullscreen_shell_mode_feedback_v1_get_version ( zwp_fullscreen_shell_mode_feedback_v1 : * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_fullscreen_shell_mode_feedback_v1 as _ ) ; } pub unsafe fn zwp_fullscreen_shell_mode_feedback_v1_add_listener ( zwp_fullscreen_shell_mode_feedback_v1 : * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_fullscreen_shell_mode_feedback_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_fullscreen_shell_mode_feedback_v1_add_rust_listener ( zwp_fullscreen_shell_mode_feedback_v1 : * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 , listener : & dyn zwp_fullscreen_shell_mode_feedback_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_fullscreen_shell_mode_feedback_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_fullscreen_shell_mode_feedback_v1_add_listener ( zwp_fullscreen_shell_mode_feedback_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_fullscreen_shell_mode_feedback_v1_destroy ( zwp_fullscreen_shell_mode_feedback_v1 : * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_fullscreen_shell_mode_feedback_v1 as _ ) ; } } } pub mod pointer_gestures_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "touchpad gestures\n\nA global interface to provide semantic touchpad gestures for a given\npointer.\n\nThree gestures are currently supported: swipe, pinch, and hold.\nPinch and swipe gestures follow a three-stage cycle: begin, update,\nend, hold gestures follow a two-stage cycle: begin and end. All\ngestures are identified by a unique id.\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_pointer_gestures_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_pointer_gestures_v1 { } static mut zwp_pointer_gestures_v1_requests_get_swipe_gesture_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , ] ; static mut zwp_pointer_gestures_v1_requests_get_pinch_gesture_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , ] ; static mut zwp_pointer_gestures_v1_requests_get_hold_gesture_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gestures_v1_requests : [ wl_message ; 4 ] = [ wl_message { name : b"get_swipe_gesture\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_gestures_v1_requests_get_swipe_gesture_types as * const _ } , } , wl_message { name : b"get_pinch_gesture\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_gestures_v1_requests_get_pinch_gesture_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_hold_gesture\0" as * const u8 as * const c_char , signature : b"3no\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_gestures_v1_requests_get_hold_gesture_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_pointer_gestures_v1_interface : wl_interface = wl_interface { name : b"zwp_pointer_gestures_v1\0" as * const u8 as * const c_char , version : 3 , request_count : 4 , requests : unsafe { & zwp_pointer_gestures_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_pointer_gestures_v1_listener { } pub unsafe fn zwp_pointer_gestures_v1_set_user_data ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_pointer_gestures_v1 as _ , user_data ) ; } pub unsafe fn zwp_pointer_gestures_v1_get_user_data ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_pointer_gestures_v1 as _ ) ; } pub unsafe fn zwp_pointer_gestures_v1_get_version ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_pointer_gestures_v1 as _ ) ; } pub unsafe fn zwp_pointer_gestures_v1_add_listener ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_pointer_gestures_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_pointer_gestures_v1_add_rust_listener ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 , listener : & dyn zwp_pointer_gestures_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_pointer_gestures_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_pointer_gestures_v1_add_listener ( zwp_pointer_gestures_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_pointer_gestures_v1_destroy ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_pointer_gestures_v1 as _ ) ; } # [ doc = "get swipe gesture\n\nCreate a swipe gesture object. See the\nwl_pointer_gesture_swipe interface for details." ] pub unsafe fn zwp_pointer_gestures_v1_get_swipe_gesture ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 , pointer : * mut super :: wl_pointer :: wl_pointer ) -> * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_pointer_gestures_v1 as _ , 0u32 , & super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , pointer ) ; return r as _ ; } # [ doc = "get pinch gesture\n\nCreate a pinch gesture object. See the\nwl_pointer_gesture_pinch interface for details." ] pub unsafe fn zwp_pointer_gestures_v1_get_pinch_gesture ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 , pointer : * mut super :: wl_pointer :: wl_pointer ) -> * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_pointer_gestures_v1 as _ , 1u32 , & super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , pointer ) ; return r as _ ; } # [ doc = "destroy the pointer gesture object\n\nDestroy the pointer gesture object. Swipe, pinch and hold objects\ncreated via this gesture object remain valid." ] pub unsafe fn zwp_pointer_gestures_v1_release ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_pointer_gestures_v1 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_pointer_gestures_v1 as _ ) ; } # [ doc = "get hold gesture\n\nCreate a hold gesture object. See the\nwl_pointer_gesture_hold interface for details." ] pub unsafe fn zwp_pointer_gestures_v1_get_hold_gesture ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 , pointer : * mut super :: wl_pointer :: wl_pointer ) -> * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_pointer_gestures_v1 as _ , 3u32 , & super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , pointer ) ; return r as _ ; } } # [ doc = "a swipe gesture object\n\nA swipe gesture object notifies a client about a multi-finger swipe\ngesture detected on an indirect input device such as a touchpad.\nThe gesture is usually initiated by multiple fingers moving in the\nsame direction but once initiated the direction may change.\nThe precise conditions of when such a gesture is detected are\nimplementation-dependent.\n\nA gesture consists of three stages: begin, update (optional) and end.\nThere cannot be multiple simultaneous hold, pinch or swipe gestures on a\nsame pointer/seat, how compositors prevent these situations is\nimplementation-dependent.\n\nA gesture may be cancelled by the compositor or the hardware.\nClients should not consider performing permanent or irreversible\nactions until the end of a gesture has been received." ] pub mod zwp_pointer_gesture_swipe_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_pointer_gesture_swipe_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gesture_swipe_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_pointer_gesture_swipe_v1_events_begin_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gesture_swipe_v1_events : [ wl_message ; 3 ] = [ wl_message { name : b"begin\0" as * const u8 as * const c_char , signature : b"uuou\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_gesture_swipe_v1_events_begin_types as * const _ } , } , wl_message { name : b"update\0" as * const u8 as * const c_char , signature : b"uff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"end\0" as * const u8 as * const c_char , signature : b"uui\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_pointer_gesture_swipe_v1_interface : wl_interface = wl_interface { name : b"zwp_pointer_gesture_swipe_v1\0" as * const u8 as * const c_char , version : 2 , request_count : 1 , requests : unsafe { & zwp_pointer_gesture_swipe_v1_requests as * const _ } , event_count : 3 , events : unsafe { & zwp_pointer_gesture_swipe_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_pointer_gesture_swipe_v1_listener { # [ doc = "multi-finger swipe begin\n\nThis event is sent when a multi-finger swipe gesture is detected\non the device." ] fn begin ( & mut self , object : * mut zwp_pointer_gesture_swipe_v1 , serial : u32 , time : u32 , surface : * mut super :: wl_surface :: wl_surface , fingers : u32 ) { } # [ doc = "multi-finger swipe motion\n\nThis event is sent when a multi-finger swipe gesture changes the\nposition of the logical center.\n\nThe dx and dy coordinates are relative coordinates of the logical\ncenter of the gesture compared to the previous event." ] fn update ( & mut self , object : * mut zwp_pointer_gesture_swipe_v1 , time : u32 , dx : wl_fixed_t , dy : wl_fixed_t ) { } # [ doc = "multi-finger swipe end\n\nThis event is sent when a multi-finger swipe gesture ceases to\nbe valid. This may happen when one or more fingers are lifted or\nthe gesture is cancelled.\n\nWhen a gesture is cancelled, the client should undo state changes\ncaused by this gesture. What causes a gesture to be cancelled is\nimplementation-dependent." ] fn end ( & mut self , object : * mut zwp_pointer_gesture_swipe_v1 , serial : u32 , time : u32 , cancelled : i32 ) { } } pub unsafe fn zwp_pointer_gesture_swipe_v1_set_user_data ( zwp_pointer_gesture_swipe_v1 : * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_pointer_gesture_swipe_v1 as _ , user_data ) ; } pub unsafe fn zwp_pointer_gesture_swipe_v1_get_user_data ( zwp_pointer_gesture_swipe_v1 : * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_pointer_gesture_swipe_v1 as _ ) ; } pub unsafe fn zwp_pointer_gesture_swipe_v1_get_version ( zwp_pointer_gesture_swipe_v1 : * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_pointer_gesture_swipe_v1 as _ ) ; } pub unsafe fn zwp_pointer_gesture_swipe_v1_add_listener ( zwp_pointer_gesture_swipe_v1 : * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_pointer_gesture_swipe_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_pointer_gesture_swipe_v1_add_rust_listener ( zwp_pointer_gesture_swipe_v1 : * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 , listener : & dyn zwp_pointer_gesture_swipe_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_pointer_gesture_swipe_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_pointer_gesture_swipe_v1_add_listener ( zwp_pointer_gesture_swipe_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the pointer swipe gesture object" ] pub unsafe fn zwp_pointer_gesture_swipe_v1_destroy ( zwp_pointer_gesture_swipe_v1 : * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_pointer_gesture_swipe_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_pointer_gesture_swipe_v1 as _ ) ; } } # [ doc = "a pinch gesture object\n\nA pinch gesture object notifies a client about a multi-finger pinch\ngesture detected on an indirect input device such as a touchpad.\nThe gesture is usually initiated by multiple fingers moving towards\neach other or away from each other, or by two or more fingers rotating\naround a logical center of gravity. The precise conditions of when\nsuch a gesture is detected are implementation-dependent.\n\nA gesture consists of three stages: begin, update (optional) and end.\nThere cannot be multiple simultaneous hold, pinch or swipe gestures on a\nsame pointer/seat, how compositors prevent these situations is\nimplementation-dependent.\n\nA gesture may be cancelled by the compositor or the hardware.\nClients should not consider performing permanent or irreversible\nactions until the end of a gesture has been received." ] pub mod zwp_pointer_gesture_pinch_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_pointer_gesture_pinch_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gesture_pinch_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_pointer_gesture_pinch_v1_events_begin_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gesture_pinch_v1_events : [ wl_message ; 3 ] = [ wl_message { name : b"begin\0" as * const u8 as * const c_char , signature : b"uuou\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_gesture_pinch_v1_events_begin_types as * const _ } , } , wl_message { name : b"update\0" as * const u8 as * const c_char , signature : b"uffff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"end\0" as * const u8 as * const c_char , signature : b"uui\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_pointer_gesture_pinch_v1_interface : wl_interface = wl_interface { name : b"zwp_pointer_gesture_pinch_v1\0" as * const u8 as * const c_char , version : 2 , request_count : 1 , requests : unsafe { & zwp_pointer_gesture_pinch_v1_requests as * const _ } , event_count : 3 , events : unsafe { & zwp_pointer_gesture_pinch_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_pointer_gesture_pinch_v1_listener { # [ doc = "multi-finger pinch begin\n\nThis event is sent when a multi-finger pinch gesture is detected\non the device." ] fn begin ( & mut self , object : * mut zwp_pointer_gesture_pinch_v1 , serial : u32 , time : u32 , surface : * mut super :: wl_surface :: wl_surface , fingers : u32 ) { } # [ doc = "multi-finger pinch motion\n\nThis event is sent when a multi-finger pinch gesture changes the\nposition of the logical center, the rotation or the relative scale.\n\nThe dx and dy coordinates are relative coordinates in the\nsurface coordinate space of the logical center of the gesture.\n\nThe scale factor is an absolute scale compared to the\npointer_gesture_pinch.begin event, e.g. a scale of 2 means the fingers\nare now twice as far apart as on pointer_gesture_pinch.begin.\n\nThe rotation is the relative angle in degrees clockwise compared to the previous\npointer_gesture_pinch.begin or pointer_gesture_pinch.update event." ] fn update ( & mut self , object : * mut zwp_pointer_gesture_pinch_v1 , time : u32 , dx : wl_fixed_t , dy : wl_fixed_t , scale : wl_fixed_t , rotation : wl_fixed_t ) { } # [ doc = "multi-finger pinch end\n\nThis event is sent when a multi-finger pinch gesture ceases to\nbe valid. This may happen when one or more fingers are lifted or\nthe gesture is cancelled.\n\nWhen a gesture is cancelled, the client should undo state changes\ncaused by this gesture. What causes a gesture to be cancelled is\nimplementation-dependent." ] fn end ( & mut self , object : * mut zwp_pointer_gesture_pinch_v1 , serial : u32 , time : u32 , cancelled : i32 ) { } } pub unsafe fn zwp_pointer_gesture_pinch_v1_set_user_data ( zwp_pointer_gesture_pinch_v1 : * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_pointer_gesture_pinch_v1 as _ , user_data ) ; } pub unsafe fn zwp_pointer_gesture_pinch_v1_get_user_data ( zwp_pointer_gesture_pinch_v1 : * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_pointer_gesture_pinch_v1 as _ ) ; } pub unsafe fn zwp_pointer_gesture_pinch_v1_get_version ( zwp_pointer_gesture_pinch_v1 : * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_pointer_gesture_pinch_v1 as _ ) ; } pub unsafe fn zwp_pointer_gesture_pinch_v1_add_listener ( zwp_pointer_gesture_pinch_v1 : * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_pointer_gesture_pinch_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_pointer_gesture_pinch_v1_add_rust_listener ( zwp_pointer_gesture_pinch_v1 : * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 , listener : & dyn zwp_pointer_gesture_pinch_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_pointer_gesture_pinch_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_pointer_gesture_pinch_v1_add_listener ( zwp_pointer_gesture_pinch_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the pinch gesture object" ] pub unsafe fn zwp_pointer_gesture_pinch_v1_destroy ( zwp_pointer_gesture_pinch_v1 : * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_pointer_gesture_pinch_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_pointer_gesture_pinch_v1 as _ ) ; } } # [ doc = "a hold gesture object\n\nA hold gesture object notifies a client about a single- or\nmulti-finger hold gesture detected on an indirect input device such as\na touchpad. The gesture is usually initiated by one or more fingers\nbeing held down without significant movement. The precise conditions\nof when such a gesture is detected are implementation-dependent.\n\nIn particular, this gesture may be used to cancel kinetic scrolling.\n\nA hold gesture consists of two stages: begin and end. Unlike pinch and\nswipe there is no update stage.\nThere cannot be multiple simultaneous hold, pinch or swipe gestures on a\nsame pointer/seat, how compositors prevent these situations is\nimplementation-dependent.\n\nA gesture may be cancelled by the compositor or the hardware.\nClients should not consider performing permanent or irreversible\nactions until the end of a gesture has been received." ] pub mod zwp_pointer_gesture_hold_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_pointer_gesture_hold_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gesture_hold_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_pointer_gesture_hold_v1_events_begin_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gesture_hold_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"begin\0" as * const u8 as * const c_char , signature : b"3uuou\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_gesture_hold_v1_events_begin_types as * const _ } , } , wl_message { name : b"end\0" as * const u8 as * const c_char , signature : b"3uui\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_pointer_gesture_hold_v1_interface : wl_interface = wl_interface { name : b"zwp_pointer_gesture_hold_v1\0" as * const u8 as * const c_char , version : 3 , request_count : 1 , requests : unsafe { & zwp_pointer_gesture_hold_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_pointer_gesture_hold_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_pointer_gesture_hold_v1_listener { # [ doc = "multi-finger hold begin\n\nThis event is sent when a hold gesture is detected on the device.\n\nOnly available since version 3 of the interface." ] fn begin ( & mut self , object : * mut zwp_pointer_gesture_hold_v1 , serial : u32 , time : u32 , surface : * mut super :: wl_surface :: wl_surface , fingers : u32 ) { } # [ doc = "multi-finger hold end\n\nThis event is sent when a hold gesture ceases to\nbe valid. This may happen when the holding fingers are lifted or\nthe gesture is cancelled, for example if the fingers move past an\nimplementation-defined threshold, the finger count changes or the hold\ngesture changes into a different type of gesture.\n\nWhen a gesture is cancelled, the client may need to undo state changes\ncaused by this gesture. What causes a gesture to be cancelled is\nimplementation-dependent.\n\nOnly available since version 3 of the interface." ] fn end ( & mut self , object : * mut zwp_pointer_gesture_hold_v1 , serial : u32 , time : u32 , cancelled : i32 ) { } } pub unsafe fn zwp_pointer_gesture_hold_v1_set_user_data ( zwp_pointer_gesture_hold_v1 : * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_pointer_gesture_hold_v1 as _ , user_data ) ; } pub unsafe fn zwp_pointer_gesture_hold_v1_get_user_data ( zwp_pointer_gesture_hold_v1 : * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_pointer_gesture_hold_v1 as _ ) ; } pub unsafe fn zwp_pointer_gesture_hold_v1_get_version ( zwp_pointer_gesture_hold_v1 : * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_pointer_gesture_hold_v1 as _ ) ; } pub unsafe fn zwp_pointer_gesture_hold_v1_add_listener ( zwp_pointer_gesture_hold_v1 : * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_pointer_gesture_hold_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_pointer_gesture_hold_v1_add_rust_listener ( zwp_pointer_gesture_hold_v1 : * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 , listener : & dyn zwp_pointer_gesture_hold_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_pointer_gesture_hold_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_pointer_gesture_hold_v1_add_listener ( zwp_pointer_gesture_hold_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the hold gesture object" ] pub unsafe fn zwp_pointer_gesture_hold_v1_destroy ( zwp_pointer_gesture_hold_v1 : * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_pointer_gesture_hold_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_pointer_gesture_hold_v1 as _ ) ; } } } pub mod surface_extension { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod qt_surface_extension { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum qt_surface_extension { } static mut qt_surface_extension_requests_get_extended_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: qt_extended_surface :: qt_extended_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut qt_surface_extension_requests : [ wl_message ; 1 ] = [ wl_message { name : b"get_extended_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & qt_surface_extension_requests_get_extended_surface_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut qt_surface_extension_interface : wl_interface = wl_interface { name : b"qt_surface_extension\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & qt_surface_extension_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait qt_surface_extension_listener { } pub unsafe fn qt_surface_extension_set_user_data ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , qt_surface_extension as _ , user_data ) ; } pub unsafe fn qt_surface_extension_get_user_data ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , qt_surface_extension as _ ) ; } pub unsafe fn qt_surface_extension_get_version ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , qt_surface_extension as _ ) ; } pub unsafe fn qt_surface_extension_add_listener ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , qt_surface_extension as _ , listener as _ , data as _ ) ; } pub unsafe fn qt_surface_extension_add_rust_listener ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension , listener : & dyn qt_surface_extension_listener ) -> bool { let to = ( listener as * const dyn qt_surface_extension_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return qt_surface_extension_add_listener ( qt_surface_extension as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn qt_surface_extension_destroy ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , qt_surface_extension as _ ) ; } pub unsafe fn qt_surface_extension_get_extended_surface ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: qt_extended_surface :: qt_extended_surface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , qt_surface_extension as _ , 0u32 , & super :: qt_extended_surface :: qt_extended_surface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } pub mod qt_extended_surface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum qt_extended_surface { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum orientation { PrimaryOrientation = 0 , PortraitOrientation = 1 , LandscapeOrientation = 2 , InvertedPortraitOrientation = 4 , InvertedLandscapeOrientation = 8 , # [ doc ( hidden ) ] __nonexhaustive , } impl orientation { pub fn from_raw ( n : u32 ) -> Option < orientation > { match n { 0 => Some ( orientation :: PrimaryOrientation ) , 1 => Some ( orientation :: PortraitOrientation ) , 2 => Some ( orientation :: LandscapeOrientation ) , 4 => Some ( orientation :: InvertedPortraitOrientation ) , 8 => Some ( orientation :: InvertedLandscapeOrientation ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum windowflag { OverridesSystemGestures = 1 , StaysOnTop = 2 , BypassWindowManager = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl windowflag { pub fn from_raw ( n : u32 ) -> Option < windowflag > { match n { 1 => Some ( windowflag :: OverridesSystemGestures ) , 2 => Some ( windowflag :: StaysOnTop ) , 4 => Some ( windowflag :: BypassWindowManager ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut qt_extended_surface_requests : [ wl_message ; 5 ] = [ wl_message { name : b"update_generic_property\0" as * const u8 as * const c_char , signature : b"sa\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_content_orientation_mask\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_window_flags\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"raise\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"lower\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut qt_extended_surface_events : [ wl_message ; 3 ] = [ wl_message { name : b"onscreen_visibility\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_generic_property\0" as * const u8 as * const c_char , signature : b"sa\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"close\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut qt_extended_surface_interface : wl_interface = wl_interface { name : b"qt_extended_surface\0" as * const u8 as * const c_char , version : 1 , request_count : 5 , requests : unsafe { & qt_extended_surface_requests as * const _ } , event_count : 3 , events : unsafe { & qt_extended_surface_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait qt_extended_surface_listener { # [ doc = "" ] fn onscreen_visibility ( & mut self , object : * mut qt_extended_surface , visible : i32 ) { } # [ doc = "" ] fn set_generic_property ( & mut self , object : * mut qt_extended_surface , name : * mut c_char , value : * mut wl_array ) { } # [ doc = "" ] fn close ( & mut self , object : * mut qt_extended_surface , ) { } } pub unsafe fn qt_extended_surface_set_user_data ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , qt_extended_surface as _ , user_data ) ; } pub unsafe fn qt_extended_surface_get_user_data ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , qt_extended_surface as _ ) ; } pub unsafe fn qt_extended_surface_get_version ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , qt_extended_surface as _ ) ; } pub unsafe fn qt_extended_surface_add_listener ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , qt_extended_surface as _ , listener as _ , data as _ ) ; } pub unsafe fn qt_extended_surface_add_rust_listener ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface , listener : & dyn qt_extended_surface_listener ) -> bool { let to = ( listener as * const dyn qt_extended_surface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return qt_extended_surface_add_listener ( qt_extended_surface as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn qt_extended_surface_destroy ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , qt_extended_surface as _ ) ; } pub unsafe fn qt_extended_surface_update_generic_property ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface , name : * const c_char , value : * mut wl_array ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , qt_extended_surface as _ , 0u32 , name , value , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn qt_extended_surface_set_content_orientation_mask ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface , orientation : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , qt_extended_surface as _ , 1u32 , orientation , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn qt_extended_surface_set_window_flags ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface , flags : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , qt_extended_surface as _ , 2u32 , flags , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn qt_extended_surface_raise ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , qt_extended_surface as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn qt_extended_surface_lower ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , qt_extended_surface as _ , 4u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod blur { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod org_kde_kwin_blur_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_blur_manager { } static mut org_kde_kwin_blur_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_blur :: org_kde_kwin_blur_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut org_kde_kwin_blur_manager_requests_unset_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_blur_manager_requests : [ wl_message ; 2 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_blur_manager_requests_create_types as * const _ } , } , wl_message { name : b"unset\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_blur_manager_requests_unset_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_blur_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_blur_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_blur_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_blur_manager_listener { } pub unsafe fn org_kde_kwin_blur_manager_set_user_data ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_blur_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_blur_manager_get_user_data ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_blur_manager as _ ) ; } pub unsafe fn org_kde_kwin_blur_manager_get_version ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_blur_manager as _ ) ; } pub unsafe fn org_kde_kwin_blur_manager_add_listener ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_blur_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_blur_manager_add_rust_listener ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager , listener : & dyn org_kde_kwin_blur_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_blur_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_blur_manager_add_listener ( org_kde_kwin_blur_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_blur_manager_destroy ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_blur_manager as _ ) ; } pub unsafe fn org_kde_kwin_blur_manager_create ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_blur_manager as _ , 0u32 , & super :: org_kde_kwin_blur :: org_kde_kwin_blur_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } pub unsafe fn org_kde_kwin_blur_manager_unset ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_blur_manager as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } } pub mod org_kde_kwin_blur { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_blur { } static mut org_kde_kwin_blur_requests_set_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_blur_requests : [ wl_message ; 3 ] = [ wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_region\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_blur_requests_set_region_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_blur_interface : wl_interface = wl_interface { name : b"org_kde_kwin_blur\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & org_kde_kwin_blur_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_blur_listener { } pub unsafe fn org_kde_kwin_blur_set_user_data ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_blur as _ , user_data ) ; } pub unsafe fn org_kde_kwin_blur_get_user_data ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_blur as _ ) ; } pub unsafe fn org_kde_kwin_blur_get_version ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_blur as _ ) ; } pub unsafe fn org_kde_kwin_blur_add_listener ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_blur as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_blur_add_rust_listener ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur , listener : & dyn org_kde_kwin_blur_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_blur_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_blur_add_listener ( org_kde_kwin_blur as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_blur_destroy ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_blur as _ ) ; } pub unsafe fn org_kde_kwin_blur_commit ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_blur as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_blur_set_region ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur , region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_blur as _ , 1u32 , region , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the blur object" ] pub unsafe fn org_kde_kwin_blur_release ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_blur as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_blur as _ ) ; } } } pub mod contrast { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod org_kde_kwin_contrast_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_contrast_manager { } static mut org_kde_kwin_contrast_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_contrast :: org_kde_kwin_contrast_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut org_kde_kwin_contrast_manager_requests_unset_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_contrast_manager_requests : [ wl_message ; 2 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_contrast_manager_requests_create_types as * const _ } , } , wl_message { name : b"unset\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_contrast_manager_requests_unset_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_contrast_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_contrast_manager\0" as * const u8 as * const c_char , version : 2 , request_count : 2 , requests : unsafe { & org_kde_kwin_contrast_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_contrast_manager_listener { } pub unsafe fn org_kde_kwin_contrast_manager_set_user_data ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_contrast_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_contrast_manager_get_user_data ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_contrast_manager as _ ) ; } pub unsafe fn org_kde_kwin_contrast_manager_get_version ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_contrast_manager as _ ) ; } pub unsafe fn org_kde_kwin_contrast_manager_add_listener ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_contrast_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_contrast_manager_add_rust_listener ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager , listener : & dyn org_kde_kwin_contrast_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_contrast_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_contrast_manager_add_listener ( org_kde_kwin_contrast_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_contrast_manager_destroy ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_contrast_manager as _ ) ; } pub unsafe fn org_kde_kwin_contrast_manager_create ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_contrast_manager as _ , 0u32 , & super :: org_kde_kwin_contrast :: org_kde_kwin_contrast_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } pub unsafe fn org_kde_kwin_contrast_manager_unset ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast_manager as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } } pub mod org_kde_kwin_contrast { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_contrast { } static mut org_kde_kwin_contrast_requests_set_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_contrast_requests : [ wl_message ; 8 ] = [ wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_region\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_contrast_requests_set_region_types as * const _ } , } , wl_message { name : b"set_contrast\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_intensity\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_saturation\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_frost\0" as * const u8 as * const c_char , signature : b"2iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unset_frost\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_contrast_interface : wl_interface = wl_interface { name : b"org_kde_kwin_contrast\0" as * const u8 as * const c_char , version : 2 , request_count : 8 , requests : unsafe { & org_kde_kwin_contrast_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_contrast_listener { } pub unsafe fn org_kde_kwin_contrast_set_user_data ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_contrast as _ , user_data ) ; } pub unsafe fn org_kde_kwin_contrast_get_user_data ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_contrast as _ ) ; } pub unsafe fn org_kde_kwin_contrast_get_version ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_contrast as _ ) ; } pub unsafe fn org_kde_kwin_contrast_add_listener ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_contrast as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_contrast_add_rust_listener ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , listener : & dyn org_kde_kwin_contrast_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_contrast_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_contrast_add_listener ( org_kde_kwin_contrast as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_contrast_destroy ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_contrast as _ ) ; } pub unsafe fn org_kde_kwin_contrast_commit ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_contrast_set_region ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 1u32 , region , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_contrast_set_contrast ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , contrast : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 2u32 , contrast , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_contrast_set_intensity ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , intensity : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 3u32 , intensity , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_contrast_set_saturation ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , saturation : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 4u32 , saturation , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the contrast object" ] pub unsafe fn org_kde_kwin_contrast_release ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 5u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_contrast as _ ) ; } # [ doc = "opt into frost effect w/ given colour\n\nenables 'frost' variant of contrast effect.\n\n'frost' is an enhanced version of the contrast effect that\nuses different colour arithmetic to get backgrounds simultaneously\nhigher in contrast and (apparent) transparency.\n\nr, g, b, a are channels from 0-255, indicating a colour to use in contrast calculation.\nshould be based off of the \"main\" background colour of the surface." ] pub unsafe fn org_kde_kwin_contrast_set_frost ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , red : i32 , green : i32 , blue : i32 , alpha : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 6u32 , red , green , blue , alpha , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "opts out of frost effect" ] pub unsafe fn org_kde_kwin_contrast_unset_frost ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 7u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod server_decoration_palette { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "server side decoration palette manager interface\n\nThis interface allows a client to alter the palette of a server side decoration." ] pub mod org_kde_kwin_server_decoration_palette_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_server_decoration_palette_manager { } static mut org_kde_kwin_server_decoration_palette_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_palette_manager_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_server_decoration_palette_manager_requests_create_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_palette_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_server_decoration_palette_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_kwin_server_decoration_palette_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_server_decoration_palette_manager_listener { } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_set_user_data ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_server_decoration_palette_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_get_user_data ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_server_decoration_palette_manager as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_get_version ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_server_decoration_palette_manager as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_add_listener ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_server_decoration_palette_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_add_rust_listener ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager , listener : & dyn org_kde_kwin_server_decoration_palette_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_server_decoration_palette_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_server_decoration_palette_manager_add_listener ( org_kde_kwin_server_decoration_palette_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_destroy ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_server_decoration_palette_manager as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_create ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_server_decoration_palette_manager as _ , 0u32 , & super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "server side decoration palette interface\n\nThis interface allows a client to alter the palette of a server side decoration." ] pub mod org_kde_kwin_server_decoration_palette { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_server_decoration_palette { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_palette_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_palette\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_palette_interface : wl_interface = wl_interface { name : b"org_kde_kwin_server_decoration_palette\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_server_decoration_palette_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_server_decoration_palette_listener { } pub unsafe fn org_kde_kwin_server_decoration_palette_set_user_data ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_server_decoration_palette as _ , user_data ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_get_user_data ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_server_decoration_palette as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_get_version ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_server_decoration_palette as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_add_listener ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_server_decoration_palette as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_add_rust_listener ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette , listener : & dyn org_kde_kwin_server_decoration_palette_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_server_decoration_palette_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_server_decoration_palette_add_listener ( org_kde_kwin_server_decoration_palette as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_server_decoration_palette_destroy ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_server_decoration_palette as _ ) ; } # [ doc = "Set a on the server side window decoration\n\nColor scheme that should be applied to the window decoration.\nAbsolute file path, or name of palette in the user's config directory.\nThe server may choose not to follow the requested style." ] pub unsafe fn org_kde_kwin_server_decoration_palette_set_palette ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette , palette : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_server_decoration_palette as _ , 0u32 , palette , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the palette object" ] pub unsafe fn org_kde_kwin_server_decoration_palette_release ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_server_decoration_palette as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_server_decoration_palette as _ ) ; } } } pub mod dpms { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Output dpms manager\n\nThe Dpms manager allows to get a org_kde_kwin_dpms for a given wl_output.\nThe org_kde_kwin_dpms provides the currently used VESA Display Power Management\nSignaling state (see https://en.wikipedia.org/wiki/VESA_Display_Power_Management_Signaling ).\nIn addition it allows to request a state change. A compositor is not obliged to honor it\nand will normally automatically switch back to on state." ] pub mod org_kde_kwin_dpms_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_dpms_manager { } static mut org_kde_kwin_dpms_manager_requests_get_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_dpms :: org_kde_kwin_dpms_interface as * const wl_interface } , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_dpms_manager_requests : [ wl_message ; 1 ] = [ wl_message { name : b"get\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_dpms_manager_requests_get_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_dpms_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_dpms_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_kwin_dpms_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_dpms_manager_listener { } pub unsafe fn org_kde_kwin_dpms_manager_set_user_data ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_dpms_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_dpms_manager_get_user_data ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_dpms_manager as _ ) ; } pub unsafe fn org_kde_kwin_dpms_manager_get_version ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_dpms_manager as _ ) ; } pub unsafe fn org_kde_kwin_dpms_manager_add_listener ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_dpms_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_dpms_manager_add_rust_listener ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager , listener : & dyn org_kde_kwin_dpms_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_dpms_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_dpms_manager_add_listener ( org_kde_kwin_dpms_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_dpms_manager_destroy ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_dpms_manager as _ ) ; } # [ doc = "Get org_kde_kwin_dpms for wl_output\n\nFactory request to get the org_kde_kwin_dpms for a given wl_output." ] pub unsafe fn org_kde_kwin_dpms_manager_get ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager , output : * mut super :: wl_output :: wl_output ) -> * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_dpms_manager as _ , 0u32 , & super :: org_kde_kwin_dpms :: org_kde_kwin_dpms_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , output ) ; return r as _ ; } } # [ doc = "Dpms for a wl_output\n\nThis interface provides information about the VESA DPMS state for a wl_output.\nIt gets created through the request get on the org_kde_kwin_dpms_manager interface.\n\nOn creating the resource the server will push whether DPSM is supported for the output,\nthe currently used DPMS state and notifies the client through the done event once all\nstates are pushed. Whenever a state changes the set of changes is committed with the\ndone event." ] pub mod org_kde_kwin_dpms { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_dpms { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum mode { On = 0 , Standby = 1 , Suspend = 2 , Off = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl mode { pub fn from_raw ( n : u32 ) -> Option < mode > { match n { 0 => Some ( mode :: On ) , 1 => Some ( mode :: Standby ) , 2 => Some ( mode :: Suspend ) , 3 => Some ( mode :: Off ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_dpms_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_dpms_events : [ wl_message ; 3 ] = [ wl_message { name : b"supported\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_dpms_interface : wl_interface = wl_interface { name : b"org_kde_kwin_dpms\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_dpms_requests as * const _ } , event_count : 3 , events : unsafe { & org_kde_kwin_dpms_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_dpms_listener { # [ doc = "Event indicating whether DPMS is supported on the wl_output\n\nThis event gets pushed on binding the resource and indicates whether the wl_output\nsupports DPMS. There are operation modes of a Wayland server where DPMS might not\nmake sense (e.g. nested compositors)." ] fn supported ( & mut self , object : * mut org_kde_kwin_dpms , supported : u32 ) { } # [ doc = "Event indicating used DPMS mode\n\nThis mode gets pushed on binding the resource and provides the currently used\nDPMS mode. It also gets pushed if DPMS is not supported for the wl_output, in that\ncase the value will be On.\n\nThe event is also pushed whenever the state changes." ] fn mode ( & mut self , object : * mut org_kde_kwin_dpms , mode : u32 ) { } # [ doc = "All changes are pushed\n\nThis event gets pushed on binding the resource once all other states are pushed.\n\nIn addition it gets pushed whenever a state changes to tell the client that all\nstate changes have been pushed." ] fn done ( & mut self , object : * mut org_kde_kwin_dpms , ) { } } pub unsafe fn org_kde_kwin_dpms_set_user_data ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_dpms as _ , user_data ) ; } pub unsafe fn org_kde_kwin_dpms_get_user_data ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_dpms as _ ) ; } pub unsafe fn org_kde_kwin_dpms_get_version ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_dpms as _ ) ; } pub unsafe fn org_kde_kwin_dpms_add_listener ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_dpms as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_dpms_add_rust_listener ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms , listener : & dyn org_kde_kwin_dpms_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_dpms_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_dpms_add_listener ( org_kde_kwin_dpms as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_dpms_destroy ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_dpms as _ ) ; } # [ doc = "Request DPMS state change for the wl_output\n\nRequests that the compositor puts the wl_output into the passed mode. The compositor\nis not obliged to change the state. In addition the compositor might leave the mode\nwhenever it seems suitable. E.g. the compositor might return to On state on user input.\n\nThe client should not assume that the mode changed after requesting a new mode.\nInstead the client should listen for the mode event." ] pub unsafe fn org_kde_kwin_dpms_set ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms , mode : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_dpms as _ , 0u32 , mode , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the dpms object" ] pub unsafe fn org_kde_kwin_dpms_release ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_dpms as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_dpms as _ ) ; } } } pub mod zwp_linux_explicit_synchronization_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "protocol for providing explicit synchronization\n\nThis global is a factory interface, allowing clients to request\nexplicit synchronization for buffers on a per-surface basis.\n\nSee zwp_linux_surface_synchronization_v1 for more information.\n\nThis interface is derived from Chromium's\nzcr_linux_explicit_synchronization_v1.\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_linux_explicit_synchronization_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_linux_explicit_synchronization_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "the surface already has a synchronization object associated" ] synchronization_exists = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: synchronization_exists ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_linux_explicit_synchronization_v1_requests_get_synchronization_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_explicit_synchronization_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_synchronization\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_linux_explicit_synchronization_v1_requests_get_synchronization_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_linux_explicit_synchronization_v1_interface : wl_interface = wl_interface { name : b"zwp_linux_explicit_synchronization_v1\0" as * const u8 as * const c_char , version : 2 , request_count : 2 , requests : unsafe { & zwp_linux_explicit_synchronization_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_linux_explicit_synchronization_v1_listener { } pub unsafe fn zwp_linux_explicit_synchronization_v1_set_user_data ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_linux_explicit_synchronization_v1 as _ , user_data ) ; } pub unsafe fn zwp_linux_explicit_synchronization_v1_get_user_data ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_linux_explicit_synchronization_v1 as _ ) ; } pub unsafe fn zwp_linux_explicit_synchronization_v1_get_version ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_linux_explicit_synchronization_v1 as _ ) ; } pub unsafe fn zwp_linux_explicit_synchronization_v1_add_listener ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_linux_explicit_synchronization_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_linux_explicit_synchronization_v1_add_rust_listener ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 , listener : & dyn zwp_linux_explicit_synchronization_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_linux_explicit_synchronization_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_linux_explicit_synchronization_v1_add_listener ( zwp_linux_explicit_synchronization_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy explicit synchronization factory object\n\nDestroy this explicit synchronization factory object. Other objects,\nincluding zwp_linux_surface_synchronization_v1 objects created by this\nfactory, shall not be affected by this request." ] pub unsafe fn zwp_linux_explicit_synchronization_v1_destroy ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_explicit_synchronization_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_linux_explicit_synchronization_v1 as _ ) ; } # [ doc = "extend surface interface for explicit synchronization\n\nInstantiate an interface extension for the given wl_surface to provide\nexplicit synchronization.\n\nIf the given wl_surface already has an explicit synchronization object\nassociated, the synchronization_exists protocol error is raised.\n\nGraphics APIs, like EGL or Vulkan, that manage the buffer queue and\ncommits of a wl_surface themselves, are likely to be using this\nextension internally. If a client is using such an API for a\nwl_surface, it should not directly use this extension on that surface,\nto avoid raising a synchronization_exists protocol error." ] pub unsafe fn zwp_linux_explicit_synchronization_v1_get_synchronization ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_linux_explicit_synchronization_v1 as _ , 1u32 , & super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "per-surface explicit synchronization support\n\nThis object implements per-surface explicit synchronization.\n\nSynchronization refers to co-ordination of pipelined operations performed\non buffers. Most GPU clients will schedule an asynchronous operation to\nrender to the buffer, then immediately send the buffer to the compositor\nto be attached to a surface.\n\nIn implicit synchronization, ensuring that the rendering operation is\ncomplete before the compositor displays the buffer is an implementation\ndetail handled by either the kernel or userspace graphics driver.\n\nBy contrast, in explicit synchronization, dma_fence objects mark when the\nasynchronous operations are complete. When submitting a buffer, the\nclient provides an acquire fence which will be waited on before the\ncompositor accesses the buffer. The Wayland server, through a\nzwp_linux_buffer_release_v1 object, will inform the client with an event\nwhich may be accompanied by a release fence, when the compositor will no\nlonger access the buffer contents due to the specific commit that\nrequested the release event.\n\nEach surface can be associated with only one object of this interface at\nany time.\n\nIn version 1 of this interface, explicit synchronization is only\nguaranteed to be supported for buffers created with any version of the\nwp_linux_dmabuf buffer factory. Version 2 additionally guarantees\nexplicit synchronization support for opaque EGL buffers, which is a type\nof platform specific buffers described in the EGL_WL_bind_wayland_display\nextension. Compositors are free to support explicit synchronization for\nadditional buffer types." ] pub mod zwp_linux_surface_synchronization_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_linux_surface_synchronization_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "the fence specified by the client could not be imported" ] invalid_fence = 0 , # [ doc = "multiple fences added for a single surface commit" ] duplicate_fence = 1 , # [ doc = "multiple releases added for a single surface commit" ] duplicate_release = 2 , # [ doc = "the associated wl_surface was destroyed" ] no_surface = 3 , # [ doc = "the buffer does not support explicit synchronization" ] unsupported_buffer = 4 , # [ doc = "no buffer was attached" ] no_buffer = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_fence ) , 1 => Some ( error :: duplicate_fence ) , 2 => Some ( error :: duplicate_release ) , 3 => Some ( error :: no_surface ) , 4 => Some ( error :: unsupported_buffer ) , 5 => Some ( error :: no_buffer ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_linux_surface_synchronization_v1_requests_get_release_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_surface_synchronization_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_acquire_fence\0" as * const u8 as * const c_char , signature : b"h\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_release\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_linux_surface_synchronization_v1_requests_get_release_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_linux_surface_synchronization_v1_interface : wl_interface = wl_interface { name : b"zwp_linux_surface_synchronization_v1\0" as * const u8 as * const c_char , version : 2 , request_count : 3 , requests : unsafe { & zwp_linux_surface_synchronization_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_linux_surface_synchronization_v1_listener { } pub unsafe fn zwp_linux_surface_synchronization_v1_set_user_data ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_linux_surface_synchronization_v1 as _ , user_data ) ; } pub unsafe fn zwp_linux_surface_synchronization_v1_get_user_data ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_linux_surface_synchronization_v1 as _ ) ; } pub unsafe fn zwp_linux_surface_synchronization_v1_get_version ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_linux_surface_synchronization_v1 as _ ) ; } pub unsafe fn zwp_linux_surface_synchronization_v1_add_listener ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_linux_surface_synchronization_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_linux_surface_synchronization_v1_add_rust_listener ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 , listener : & dyn zwp_linux_surface_synchronization_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_linux_surface_synchronization_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_linux_surface_synchronization_v1_add_listener ( zwp_linux_surface_synchronization_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy synchronization object\n\nDestroy this explicit synchronization object.\n\nAny fence set by this object with set_acquire_fence since the last\ncommit will be discarded by the server. Any fences set by this object\nbefore the last commit are not affected.\n\nzwp_linux_buffer_release_v1 objects created by this object are not\naffected by this request." ] pub unsafe fn zwp_linux_surface_synchronization_v1_destroy ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_surface_synchronization_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_linux_surface_synchronization_v1 as _ ) ; } # [ doc = "set the acquire fence\n\nSet the acquire fence that must be signaled before the compositor\nmay sample from the buffer attached with wl_surface.attach. The fence\nis a dma_fence kernel object.\n\nThe acquire fence is double-buffered state, and will be applied on the\nnext wl_surface.commit request for the associated surface. Thus, it\napplies only to the buffer that is attached to the surface at commit\ntime.\n\nIf the provided fd is not a valid dma_fence fd, then an INVALID_FENCE\nerror is raised.\n\nIf a fence has already been attached during the same commit cycle, a\nDUPLICATE_FENCE error is raised.\n\nIf the associated wl_surface was destroyed, a NO_SURFACE error is\nraised.\n\nIf at surface commit time the attached buffer does not support explicit\nsynchronization, an UNSUPPORTED_BUFFER error is raised.\n\nIf at surface commit time there is no buffer attached, a NO_BUFFER\nerror is raised." ] pub unsafe fn zwp_linux_surface_synchronization_v1_set_acquire_fence ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 , fd : :: std :: os :: unix :: io :: RawFd ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_surface_synchronization_v1 as _ , 1u32 , fd , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release fence for last-attached buffer\n\nCreate a listener for the release of the buffer attached by the\nclient with wl_surface.attach. See zwp_linux_buffer_release_v1\ndocumentation for more information.\n\nThe release object is double-buffered state, and will be associated\nwith the buffer that is attached to the surface at wl_surface.commit\ntime.\n\nIf a zwp_linux_buffer_release_v1 object has already been requested for\nthe surface in the same commit cycle, a DUPLICATE_RELEASE error is\nraised.\n\nIf the associated wl_surface was destroyed, a NO_SURFACE error\nis raised.\n\nIf at surface commit time there is no buffer attached, a NO_BUFFER\nerror is raised." ] pub unsafe fn zwp_linux_surface_synchronization_v1_get_release ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 ) -> * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_linux_surface_synchronization_v1 as _ , 2u32 , & super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "buffer release explicit synchronization\n\nThis object is instantiated in response to a\nzwp_linux_surface_synchronization_v1.get_release request.\n\nIt provides an alternative to wl_buffer.release events, providing a\nunique release from a single wl_surface.commit request. The release event\nalso supports explicit synchronization, providing a fence FD for the\nclient to synchronize against.\n\nExactly one event, either a fenced_release or an immediate_release, will\nbe emitted for the wl_surface.commit request. The compositor can choose\nrelease by release which event it uses.\n\nThis event does not replace wl_buffer.release events; servers are still\nrequired to send those events.\n\nOnce a buffer release object has delivered a 'fenced_release' or an\n'immediate_release' event it is automatically destroyed." ] pub mod zwp_linux_buffer_release_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_linux_buffer_release_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_buffer_release_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"fenced_release\0" as * const u8 as * const c_char , signature : b"h\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"immediate_release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_linux_buffer_release_v1_interface : wl_interface = wl_interface { name : b"zwp_linux_buffer_release_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 2 , events : unsafe { & zwp_linux_buffer_release_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_linux_buffer_release_v1_listener { # [ doc = "release buffer with fence\n\nSent when the compositor has finalised its usage of the associated\nbuffer for the relevant commit, providing a dma_fence which will be\nsignaled when all operations by the compositor on that buffer for that\ncommit have finished.\n\nOnce the fence has signaled, and assuming the associated buffer is not\npending release from other wl_surface.commit requests, no additional\nexplicit or implicit synchronization is required to safely reuse or\ndestroy the buffer.\n\nThis event destroys the zwp_linux_buffer_release_v1 object." ] fn fenced_release ( & mut self , object : * mut zwp_linux_buffer_release_v1 , fence : :: std :: os :: unix :: io :: RawFd ) { } # [ doc = "release buffer immediately\n\nSent when the compositor has finalised its usage of the associated\nbuffer for the relevant commit, and either performed no operations\nusing it, or has a guarantee that all its operations on that buffer for\nthat commit have finished.\n\nOnce this event is received, and assuming the associated buffer is not\npending release from other wl_surface.commit requests, no additional\nexplicit or implicit synchronization is required to safely reuse or\ndestroy the buffer.\n\nThis event destroys the zwp_linux_buffer_release_v1 object." ] fn immediate_release ( & mut self , object : * mut zwp_linux_buffer_release_v1 , ) { } } pub unsafe fn zwp_linux_buffer_release_v1_set_user_data ( zwp_linux_buffer_release_v1 : * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_linux_buffer_release_v1 as _ , user_data ) ; } pub unsafe fn zwp_linux_buffer_release_v1_get_user_data ( zwp_linux_buffer_release_v1 : * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_linux_buffer_release_v1 as _ ) ; } pub unsafe fn zwp_linux_buffer_release_v1_get_version ( zwp_linux_buffer_release_v1 : * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_linux_buffer_release_v1 as _ ) ; } pub unsafe fn zwp_linux_buffer_release_v1_add_listener ( zwp_linux_buffer_release_v1 : * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_linux_buffer_release_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_linux_buffer_release_v1_add_rust_listener ( zwp_linux_buffer_release_v1 : * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 , listener : & dyn zwp_linux_buffer_release_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_linux_buffer_release_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_linux_buffer_release_v1_add_listener ( zwp_linux_buffer_release_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_linux_buffer_release_v1_destroy ( zwp_linux_buffer_release_v1 : * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_linux_buffer_release_v1 as _ ) ; } } } pub mod idle_inhibit_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "control behavior when display idles\n\nThis interface permits inhibiting the idle behavior such as screen\nblanking, locking, and screensaving. The client binds the idle manager\nglobally, then creates idle-inhibitor objects for each surface.\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_idle_inhibit_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_idle_inhibit_manager_v1 { } static mut zwp_idle_inhibit_manager_v1_requests_create_inhibitor_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_idle_inhibit_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_inhibitor\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_idle_inhibit_manager_v1_requests_create_inhibitor_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_idle_inhibit_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_idle_inhibit_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_idle_inhibit_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_idle_inhibit_manager_v1_listener { } pub unsafe fn zwp_idle_inhibit_manager_v1_set_user_data ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_idle_inhibit_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_idle_inhibit_manager_v1_get_user_data ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_idle_inhibit_manager_v1 as _ ) ; } pub unsafe fn zwp_idle_inhibit_manager_v1_get_version ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_idle_inhibit_manager_v1 as _ ) ; } pub unsafe fn zwp_idle_inhibit_manager_v1_add_listener ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_idle_inhibit_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_idle_inhibit_manager_v1_add_rust_listener ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 , listener : & dyn zwp_idle_inhibit_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_idle_inhibit_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_idle_inhibit_manager_v1_add_listener ( zwp_idle_inhibit_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the idle inhibitor object\n\nDestroy the inhibit manager." ] pub unsafe fn zwp_idle_inhibit_manager_v1_destroy ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_idle_inhibit_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_idle_inhibit_manager_v1 as _ ) ; } # [ doc = "create a new inhibitor object\n\nCreate a new inhibitor object associated with the given surface." ] pub unsafe fn zwp_idle_inhibit_manager_v1_create_inhibitor ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_idle_inhibit_manager_v1 as _ , 1u32 , & super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "context object for inhibiting idle behavior\n\nAn idle inhibitor prevents the output that the associated surface is\nvisible on from being set to a state where it is not visually usable due\nto lack of user interaction (e.g. blanked, dimmed, locked, set to power\nsave, etc.) Any screensaver processes are also blocked from displaying.\n\nIf the surface is destroyed, unmapped, becomes occluded, loses\nvisibility, or otherwise becomes not visually relevant for the user, the\nidle inhibitor will not be honored by the compositor; if the surface\nsubsequently regains visibility the inhibitor takes effect once again.\nLikewise, the inhibitor isn't honored if the system was already idled at\nthe time the inhibitor was established, although if the system later\nde-idles and re-idles the inhibitor will take effect." ] pub mod zwp_idle_inhibitor_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_idle_inhibitor_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_idle_inhibitor_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_idle_inhibitor_v1_interface : wl_interface = wl_interface { name : b"zwp_idle_inhibitor_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_idle_inhibitor_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_idle_inhibitor_v1_listener { } pub unsafe fn zwp_idle_inhibitor_v1_set_user_data ( zwp_idle_inhibitor_v1 : * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_idle_inhibitor_v1 as _ , user_data ) ; } pub unsafe fn zwp_idle_inhibitor_v1_get_user_data ( zwp_idle_inhibitor_v1 : * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_idle_inhibitor_v1 as _ ) ; } pub unsafe fn zwp_idle_inhibitor_v1_get_version ( zwp_idle_inhibitor_v1 : * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_idle_inhibitor_v1 as _ ) ; } pub unsafe fn zwp_idle_inhibitor_v1_add_listener ( zwp_idle_inhibitor_v1 : * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_idle_inhibitor_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_idle_inhibitor_v1_add_rust_listener ( zwp_idle_inhibitor_v1 : * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 , listener : & dyn zwp_idle_inhibitor_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_idle_inhibitor_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_idle_inhibitor_v1_add_listener ( zwp_idle_inhibitor_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the idle inhibitor object\n\nRemove the inhibitor effect from the associated wl_surface." ] pub unsafe fn zwp_idle_inhibitor_v1_destroy ( zwp_idle_inhibitor_v1 : * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_idle_inhibitor_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_idle_inhibitor_v1 as _ ) ; } } } pub mod fake_input { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Fake input manager\n\nThis interface allows other processes to provide fake input events.\nPurpose is on the one hand side to provide testing facilities like XTest on X11.\nBut also to support use case like kdeconnect's mouse pad interface.\n\nA compositor should not trust the input received from this interface.\nClients should not expect that the compositor honors the requests from this\ninterface." ] pub mod org_kde_kwin_fake_input { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_fake_input { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_fake_input_requests : [ wl_message ; 11 ] = [ wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"ss\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"pointer_motion\0" as * const u8 as * const c_char , signature : b"ff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"button\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"axis\0" as * const u8 as * const c_char , signature : b"uf\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"touch_down\0" as * const u8 as * const c_char , signature : b"2uff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"touch_motion\0" as * const u8 as * const c_char , signature : b"2uff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"touch_up\0" as * const u8 as * const c_char , signature : b"2u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"touch_cancel\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"touch_frame\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"pointer_motion_absolute\0" as * const u8 as * const c_char , signature : b"3ff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"keyboard_key\0" as * const u8 as * const c_char , signature : b"4uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_fake_input_interface : wl_interface = wl_interface { name : b"org_kde_kwin_fake_input\0" as * const u8 as * const c_char , version : 4 , request_count : 11 , requests : unsafe { & org_kde_kwin_fake_input_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_fake_input_listener { } pub unsafe fn org_kde_kwin_fake_input_set_user_data ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_fake_input as _ , user_data ) ; } pub unsafe fn org_kde_kwin_fake_input_get_user_data ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_fake_input as _ ) ; } pub unsafe fn org_kde_kwin_fake_input_get_version ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_fake_input as _ ) ; } pub unsafe fn org_kde_kwin_fake_input_add_listener ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_fake_input as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_fake_input_add_rust_listener ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , listener : & dyn org_kde_kwin_fake_input_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_fake_input_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_fake_input_add_listener ( org_kde_kwin_fake_input as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_fake_input_destroy ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_fake_input as _ ) ; } # [ doc = "Information why the client wants to use the interface\n\nA client should use this request to tell the compositor why it wants to\nuse this interface. The compositor might use the information to decide\nwhether it wants to grant the request. The data might also be passed to\nthe user to decide whether the application should get granted access to\nthis very privileged interface." ] pub unsafe fn org_kde_kwin_fake_input_authenticate ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , application : * const c_char , reason : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 0u32 , application , reason , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_fake_input_pointer_motion ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , delta_x : wl_fixed_t , delta_y : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 1u32 , delta_x , delta_y , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_fake_input_button ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , button : u32 , state : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 2u32 , button , state , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_fake_input_axis ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , axis : u32 , value : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 3u32 , axis , value , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "touch down event\n\nA client should use this request to send touch down event at specific\ncoordinates." ] pub unsafe fn org_kde_kwin_fake_input_touch_down ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , id : u32 , x : wl_fixed_t , y : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 4u32 , id , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "touch motion event\n\nA client should use this request to send touch motion to specific position." ] pub unsafe fn org_kde_kwin_fake_input_touch_motion ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , id : u32 , x : wl_fixed_t , y : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 5u32 , id , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "touch up event\n\nA client should use this request to send touch up event." ] pub unsafe fn org_kde_kwin_fake_input_touch_up ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , id : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 6u32 , id , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "touch cancel event\n\nA client should use this request to cancel the current\ntouch event." ] pub unsafe fn org_kde_kwin_fake_input_touch_cancel ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 7u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "touch frame event\n\nA client should use this request to send touch frame event." ] pub unsafe fn org_kde_kwin_fake_input_touch_frame ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 8u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_fake_input_pointer_motion_absolute ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , x : wl_fixed_t , y : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 9u32 , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_fake_input_keyboard_key ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , button : u32 , state : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 10u32 , button , state , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod shadow { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod org_kde_kwin_shadow_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_shadow_manager { } static mut org_kde_kwin_shadow_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_shadow :: org_kde_kwin_shadow_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_manager_requests_unset_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_shadow_manager_requests : [ wl_message ; 3 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_manager_requests_create_types as * const _ } , } , wl_message { name : b"unset\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_manager_requests_unset_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_shadow_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_shadow_manager\0" as * const u8 as * const c_char , version : 2 , request_count : 3 , requests : unsafe { & org_kde_kwin_shadow_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_shadow_manager_listener { } pub unsafe fn org_kde_kwin_shadow_manager_set_user_data ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_shadow_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_shadow_manager_get_user_data ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_shadow_manager as _ ) ; } pub unsafe fn org_kde_kwin_shadow_manager_get_version ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_shadow_manager as _ ) ; } pub unsafe fn org_kde_kwin_shadow_manager_add_listener ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_shadow_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_shadow_manager_add_rust_listener ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager , listener : & dyn org_kde_kwin_shadow_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_shadow_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_shadow_manager_add_listener ( org_kde_kwin_shadow_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_shadow_manager_create ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_shadow_manager as _ , 0u32 , & super :: org_kde_kwin_shadow :: org_kde_kwin_shadow_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } pub unsafe fn org_kde_kwin_shadow_manager_unset ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow_manager as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Destroy the org_kde_kwin_shadow_manager\n\nDestroy the org_kde_kwin_shadow_manager object." ] pub unsafe fn org_kde_kwin_shadow_manager_destroy ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow_manager as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_shadow_manager as _ ) ; } } pub mod org_kde_kwin_shadow { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_shadow { } static mut org_kde_kwin_shadow_requests_attach_left_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_top_left_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_top_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_top_right_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_right_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_bottom_right_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_bottom_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_bottom_left_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_shadow_requests : [ wl_message ; 14 ] = [ wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"attach_left\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_left_types as * const _ } , } , wl_message { name : b"attach_top_left\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_top_left_types as * const _ } , } , wl_message { name : b"attach_top\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_top_types as * const _ } , } , wl_message { name : b"attach_top_right\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_top_right_types as * const _ } , } , wl_message { name : b"attach_right\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_right_types as * const _ } , } , wl_message { name : b"attach_bottom_right\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_bottom_right_types as * const _ } , } , wl_message { name : b"attach_bottom\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_bottom_types as * const _ } , } , wl_message { name : b"attach_bottom_left\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_bottom_left_types as * const _ } , } , wl_message { name : b"set_left_offset\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_top_offset\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_right_offset\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_bottom_offset\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_shadow_interface : wl_interface = wl_interface { name : b"org_kde_kwin_shadow\0" as * const u8 as * const c_char , version : 2 , request_count : 14 , requests : unsafe { & org_kde_kwin_shadow_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_shadow_listener { } pub unsafe fn org_kde_kwin_shadow_set_user_data ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_shadow as _ , user_data ) ; } pub unsafe fn org_kde_kwin_shadow_get_user_data ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_shadow as _ ) ; } pub unsafe fn org_kde_kwin_shadow_get_version ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_shadow as _ ) ; } pub unsafe fn org_kde_kwin_shadow_add_listener ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_shadow as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_shadow_add_rust_listener ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , listener : & dyn org_kde_kwin_shadow_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_shadow_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_shadow_add_listener ( org_kde_kwin_shadow as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_shadow_commit ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_left ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 1u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_top_left ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 2u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_top ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 3u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_top_right ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 4u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_right ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 5u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_bottom_right ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 6u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_bottom ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 7u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_bottom_left ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 8u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_set_left_offset ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , offset : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 9u32 , offset , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_set_top_offset ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , offset : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 10u32 , offset , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_set_right_offset ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , offset : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 11u32 , offset , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_set_bottom_offset ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , offset : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 12u32 , offset , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Destroy the org_kde_kwin_shadow\n\nDestroy the org_kde_kwin_shadow object. If the org_kde_kwin_shadow is\nstill set on a wl_surface the shadow will be immediately removed.\nPrefer to first call the request unset on the org_kde_kwin_shadow_manager and\ncommit the wl_surface to apply the change." ] pub unsafe fn org_kde_kwin_shadow_destroy ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 13u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_shadow as _ ) ; } } } pub mod keyboard_shortcuts_inhibit_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "context object for keyboard grab_manager\n\nA global interface used for inhibiting the compositor keyboard shortcuts." ] pub mod zwp_keyboard_shortcuts_inhibit_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_keyboard_shortcuts_inhibit_manager_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "the shortcuts are already inhibited for this surface" ] already_inhibited = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: already_inhibited ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_keyboard_shortcuts_inhibit_manager_v1_requests_inhibit_shortcuts_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_keyboard_shortcuts_inhibit_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"inhibit_shortcuts\0" as * const u8 as * const c_char , signature : b"noo\0" as * const u8 as * const c_char , types : unsafe { & zwp_keyboard_shortcuts_inhibit_manager_v1_requests_inhibit_shortcuts_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_keyboard_shortcuts_inhibit_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_keyboard_shortcuts_inhibit_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_keyboard_shortcuts_inhibit_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_keyboard_shortcuts_inhibit_manager_v1_listener { } pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_set_user_data ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_get_user_data ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_get_version ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_add_listener ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_add_rust_listener ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 , listener : & dyn zwp_keyboard_shortcuts_inhibit_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_keyboard_shortcuts_inhibit_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_keyboard_shortcuts_inhibit_manager_v1_add_listener ( zwp_keyboard_shortcuts_inhibit_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the keyboard shortcuts inhibitor object\n\nDestroy the keyboard shortcuts inhibitor manager." ] pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_destroy ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ ) ; } # [ doc = "create a new keyboard shortcuts inhibitor object\n\nCreate a new keyboard shortcuts inhibitor object associated with\nthe given surface for the given seat.\n\nIf shortcuts are already inhibited for the specified seat and surface,\na protocol error \"already_inhibited\" is raised by the compositor." ] pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_inhibit_shortcuts ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 , surface : * mut super :: wl_surface :: wl_surface , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ , 1u32 , & super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface , seat ) ; return r as _ ; } } # [ doc = "context object for keyboard shortcuts inhibitor\n\nA keyboard shortcuts inhibitor instructs the compositor to ignore\nits own keyboard shortcuts when the associated surface has keyboard\nfocus. As a result, when the surface has keyboard focus on the given\nseat, it will receive all key events originating from the specified\nseat, even those which would normally be caught by the compositor for\nits own shortcuts.\n\nThe Wayland compositor is however under no obligation to disable\nall of its shortcuts, and may keep some special key combo for its own\nuse, including but not limited to one allowing the user to forcibly\nrestore normal keyboard events routing in the case of an unwilling\nclient. The compositor may also use the same key combo to reactivate\nan existing shortcut inhibitor that was previously deactivated on\nuser request.\n\nWhen the compositor restores its own keyboard shortcuts, an\n\"inactive\" event is emitted to notify the client that the keyboard\nshortcuts inhibitor is not effectively active for the surface and\nseat any more, and the client should not expect to receive all\nkeyboard events.\n\nWhen the keyboard shortcuts inhibitor is inactive, the client has\nno way to forcibly reactivate the keyboard shortcuts inhibitor.\n\nThe user can chose to re-enable a previously deactivated keyboard\nshortcuts inhibitor using any mechanism the compositor may offer,\nin which case the compositor will send an \"active\" event to notify\nthe client.\n\nIf the surface is destroyed, unmapped, or loses the seat's keyboard\nfocus, the keyboard shortcuts inhibitor becomes irrelevant and the\ncompositor will restore its own keyboard shortcuts but no \"inactive\"\nevent is emitted in this case." ] pub mod zwp_keyboard_shortcuts_inhibitor_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_keyboard_shortcuts_inhibitor_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_keyboard_shortcuts_inhibitor_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_keyboard_shortcuts_inhibitor_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"active\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"inactive\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_keyboard_shortcuts_inhibitor_v1_interface : wl_interface = wl_interface { name : b"zwp_keyboard_shortcuts_inhibitor_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_keyboard_shortcuts_inhibitor_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_keyboard_shortcuts_inhibitor_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_keyboard_shortcuts_inhibitor_v1_listener { # [ doc = "shortcuts are inhibited\n\nThis event indicates that the shortcut inhibitor is active.\n\nThe compositor sends this event every time compositor shortcuts\nare inhibited on behalf of the surface. When active, the client\nmay receive input events normally reserved by the compositor\n(see zwp_keyboard_shortcuts_inhibitor_v1).\n\nThis occurs typically when the initial request \"inhibit_shortcuts\"\nfirst becomes active or when the user instructs the compositor to\nre-enable and existing shortcuts inhibitor using any mechanism\noffered by the compositor." ] fn active ( & mut self , object : * mut zwp_keyboard_shortcuts_inhibitor_v1 , ) { } # [ doc = "shortcuts are restored\n\nThis event indicates that the shortcuts inhibitor is inactive,\nnormal shortcuts processing is restored by the compositor." ] fn inactive ( & mut self , object : * mut zwp_keyboard_shortcuts_inhibitor_v1 , ) { } } pub unsafe fn zwp_keyboard_shortcuts_inhibitor_v1_set_user_data ( zwp_keyboard_shortcuts_inhibitor_v1 : * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_keyboard_shortcuts_inhibitor_v1 as _ , user_data ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibitor_v1_get_user_data ( zwp_keyboard_shortcuts_inhibitor_v1 : * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_keyboard_shortcuts_inhibitor_v1 as _ ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibitor_v1_get_version ( zwp_keyboard_shortcuts_inhibitor_v1 : * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_keyboard_shortcuts_inhibitor_v1 as _ ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibitor_v1_add_listener ( zwp_keyboard_shortcuts_inhibitor_v1 : * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_keyboard_shortcuts_inhibitor_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibitor_v1_add_rust_listener ( zwp_keyboard_shortcuts_inhibitor_v1 : * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 , listener : & dyn zwp_keyboard_shortcuts_inhibitor_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_keyboard_shortcuts_inhibitor_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_keyboard_shortcuts_inhibitor_v1_add_listener ( zwp_keyboard_shortcuts_inhibitor_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the keyboard shortcuts inhibitor object\n\nRemove the keyboard shortcuts inhibitor from the associated wl_surface." ] pub unsafe fn zwp_keyboard_shortcuts_inhibitor_v1_destroy ( zwp_keyboard_shortcuts_inhibitor_v1 : * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_keyboard_shortcuts_inhibitor_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_keyboard_shortcuts_inhibitor_v1 as _ ) ; } } } pub mod tablet_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "controller object for graphic tablet devices\n\nAn object that provides access to the graphics tablets available on this\nsystem. All tablets are associated with a seat, to get access to the\nactual tablets, use wp_tablet_manager.get_tablet_seat." ] pub mod zwp_tablet_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_manager_v1 { } static mut zwp_tablet_manager_v1_requests_get_tablet_seat_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"get_tablet_seat\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_manager_v1_requests_get_tablet_seat_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_tablet_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_manager_v1_listener { } pub unsafe fn zwp_tablet_manager_v1_set_user_data ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_tablet_manager_v1_get_user_data ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_manager_v1 as _ ) ; } pub unsafe fn zwp_tablet_manager_v1_get_version ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_manager_v1 as _ ) ; } pub unsafe fn zwp_tablet_manager_v1_add_listener ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_manager_v1_add_rust_listener ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 , listener : & dyn zwp_tablet_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_manager_v1_add_listener ( zwp_tablet_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "get the tablet seat\n\nGet the wp_tablet_seat object for the given seat. This object\nprovides access to all graphics tablets in this seat." ] pub unsafe fn zwp_tablet_manager_v1_get_tablet_seat ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_tablet_manager_v1 as _ , 0u32 , & super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat ) ; return r as _ ; } # [ doc = "release the memory for the tablet manager object\n\nDestroy the wp_tablet_manager object. Objects created from this\nobject are unaffected and should be destroyed separately." ] pub unsafe fn zwp_tablet_manager_v1_destroy ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_manager_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_manager_v1 as _ ) ; } } # [ doc = "controller object for graphic tablet devices of a seat\n\nAn object that provides access to the graphics tablets available on this\nseat. After binding to this interface, the compositor sends a set of\nwp_tablet_seat.tablet_added and wp_tablet_seat.tool_added events." ] pub mod zwp_tablet_seat_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_seat_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_seat_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_tablet_seat_v1_events_tablet_added_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_v1 :: zwp_tablet_v1_interface as * const wl_interface } , ] ; static mut zwp_tablet_seat_v1_events_tool_added_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_seat_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"tablet_added\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_seat_v1_events_tablet_added_types as * const _ } , } , wl_message { name : b"tool_added\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_seat_v1_events_tool_added_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_seat_v1_interface : wl_interface = wl_interface { name : b"zwp_tablet_seat_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_tablet_seat_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_tablet_seat_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_seat_v1_listener { # [ doc = "new device notification\n\nThis event is sent whenever a new tablet becomes available on this\nseat. This event only provides the object id of the tablet, any\nstatic information about the tablet (device name, vid/pid, etc.) is\nsent through the wp_tablet interface." ] fn tablet_added ( & mut self , object : * mut zwp_tablet_seat_v1 , id : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 ) { } # [ doc = "a new tool has been used with a tablet\n\nThis event is sent whenever a tool that has not previously been used\nwith a tablet comes into use. This event only provides the object id\nof the tool; any static information about the tool (capabilities,\ntype, etc.) is sent through the wp_tablet_tool interface." ] fn tool_added ( & mut self , object : * mut zwp_tablet_seat_v1 , id : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 ) { } } pub unsafe fn zwp_tablet_seat_v1_set_user_data ( zwp_tablet_seat_v1 : * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_seat_v1 as _ , user_data ) ; } pub unsafe fn zwp_tablet_seat_v1_get_user_data ( zwp_tablet_seat_v1 : * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_seat_v1 as _ ) ; } pub unsafe fn zwp_tablet_seat_v1_get_version ( zwp_tablet_seat_v1 : * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_seat_v1 as _ ) ; } pub unsafe fn zwp_tablet_seat_v1_add_listener ( zwp_tablet_seat_v1 : * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_seat_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_seat_v1_add_rust_listener ( zwp_tablet_seat_v1 : * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 , listener : & dyn zwp_tablet_seat_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_seat_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_seat_v1_add_listener ( zwp_tablet_seat_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "release the memory for the tablet seat object\n\nDestroy the wp_tablet_seat object. Objects created from this\nobject are unaffected and should be destroyed separately." ] pub unsafe fn zwp_tablet_seat_v1_destroy ( zwp_tablet_seat_v1 : * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_seat_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_seat_v1 as _ ) ; } } # [ doc = "a physical tablet tool\n\nAn object that represents a physical tool that has been, or is\ncurrently in use with a tablet in this seat. Each wp_tablet_tool\nobject stays valid until the client destroys it; the compositor\nreuses the wp_tablet_tool object to indicate that the object's\nrespective physical tool has come into proximity of a tablet again.\n\nA wp_tablet_tool object's relation to a physical tool depends on the\ntablet's ability to report serial numbers. If the tablet supports\nthis capability, then the object represents a specific physical tool\nand can be identified even when used on multiple tablets.\n\nA tablet tool has a number of static characteristics, e.g. tool type,\nhardware_serial and capabilities. These capabilities are sent in an\nevent sequence after the wp_tablet_seat.tool_added event before any\nactual events from this tool. This initial event sequence is\nterminated by a wp_tablet_tool.done event.\n\nTablet tool events are grouped by wp_tablet_tool.frame events.\nAny events received before a wp_tablet_tool.frame event should be\nconsidered part of the same hardware state change." ] pub mod zwp_tablet_tool_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_tool_v1 { } # [ doc = "a physical tool type\n\nDescribes the physical type of a tool. The physical type of a tool\ngenerally defines its base usage.\n\nThe mouse tool represents a mouse-shaped tool that is not a relative\ndevice but bound to the tablet's surface, providing absolute\ncoordinates.\n\nThe lens tool is a mouse-shaped tool with an attached lens to\nprovide precision focus." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum _type { # [ doc = "Pen" ] pen = 320 , # [ doc = "Eraser" ] eraser = 321 , # [ doc = "Brush" ] brush = 322 , # [ doc = "Pencil" ] pencil = 323 , # [ doc = "Airbrush" ] airbrush = 324 , # [ doc = "Finger" ] finger = 325 , # [ doc = "Mouse" ] mouse = 326 , # [ doc = "Lens" ] lens = 327 , # [ doc ( hidden ) ] __nonexhaustive , } impl _type { pub fn from_raw ( n : u32 ) -> Option < _type > { match n { 320 => Some ( _type :: pen ) , 321 => Some ( _type :: eraser ) , 322 => Some ( _type :: brush ) , 323 => Some ( _type :: pencil ) , 324 => Some ( _type :: airbrush ) , 325 => Some ( _type :: finger ) , 326 => Some ( _type :: mouse ) , 327 => Some ( _type :: lens ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "capability flags for a tool\n\nDescribes extra capabilities on a tablet.\n\nAny tool must provide x and y values, extra axes are\ndevice-specific." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum capability { # [ doc = "Tilt axes" ] tilt = 1 , # [ doc = "Pressure axis" ] pressure = 2 , # [ doc = "Distance axis" ] distance = 3 , # [ doc = "Z-rotation axis" ] rotation = 4 , # [ doc = "Slider axis" ] slider = 5 , # [ doc = "Wheel axis" ] wheel = 6 , # [ doc ( hidden ) ] __nonexhaustive , } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { match n { 1 => Some ( capability :: tilt ) , 2 => Some ( capability :: pressure ) , 3 => Some ( capability :: distance ) , 4 => Some ( capability :: rotation ) , 5 => Some ( capability :: slider ) , 6 => Some ( capability :: wheel ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "physical button state\n\nDescribes the physical state of a button that produced the button event." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum button_state { # [ doc = "button is not pressed" ] released = 0 , # [ doc = "button is pressed" ] pressed = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl button_state { pub fn from_raw ( n : u32 ) -> Option < button_state > { match n { 0 => Some ( button_state :: released ) , 1 => Some ( button_state :: pressed ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_tablet_tool_v1_requests_set_cursor_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_tool_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_cursor\0" as * const u8 as * const c_char , signature : b"u?oii\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_tool_v1_requests_set_cursor_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_tablet_tool_v1_events_proximity_in_types : [ * const wl_interface ; 3 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: zwp_tablet_v1 :: zwp_tablet_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_tool_v1_events : [ wl_message ; 19 ] = [ wl_message { name : b"type\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hardware_serial\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hardware_id_wacom\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capability\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"proximity_in\0" as * const u8 as * const c_char , signature : b"uoo\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_tool_v1_events_proximity_in_types as * const _ } , } , wl_message { name : b"proximity_out\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"down\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"up\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"motion\0" as * const u8 as * const c_char , signature : b"ff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"pressure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"distance\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"tilt\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"rotation\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"slider\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"wheel\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"button\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_tool_v1_interface : wl_interface = wl_interface { name : b"zwp_tablet_tool_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_tool_v1_requests as * const _ } , event_count : 19 , events : unsafe { & zwp_tablet_tool_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_tool_v1_listener { # [ doc = "tool type\n\nThe tool type is the high-level type of the tool and usually decides\nthe interaction expected from this tool.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn _type ( & mut self , object : * mut zwp_tablet_tool_v1 , tool_type : _type ) { } # [ doc = "unique hardware serial number of the tool\n\nIf the physical tool can be identified by a unique 64-bit serial\nnumber, this event notifies the client of this serial number.\n\nIf multiple tablets are available in the same seat and the tool is\nuniquely identifiable by the serial number, that tool may move\nbetween tablets.\n\nOtherwise, if the tool has no serial number and this event is\nmissing, the tool is tied to the tablet it first comes into\nproximity with. Even if the physical tool is used on multiple\ntablets, separate wp_tablet_tool objects will be created, one per\ntablet.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn hardware_serial ( & mut self , object : * mut zwp_tablet_tool_v1 , hardware_serial_hi : u32 , hardware_serial_lo : u32 ) { } # [ doc = "hardware id notification in Wacom's format\n\nThis event notifies the client of a hardware id available on this tool.\n\nThe hardware id is a device-specific 64-bit id that provides extra\ninformation about the tool in use, beyond the wl_tool.type\nenumeration. The format of the id is specific to tablets made by\nWacom Inc. For example, the hardware id of a Wacom Grip\nPen (a stylus) is 0x802.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn hardware_id_wacom ( & mut self , object : * mut zwp_tablet_tool_v1 , hardware_id_hi : u32 , hardware_id_lo : u32 ) { } # [ doc = "tool capability notification\n\nThis event notifies the client of any capabilities of this tool,\nbeyond the main set of x/y axes and tip up/down detection.\n\nOne event is sent for each extra capability available on this tool.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn capability ( & mut self , object : * mut zwp_tablet_tool_v1 , capability : capability ) { } # [ doc = "tool description events sequence complete\n\nThis event signals the end of the initial burst of descriptive\nevents. A client may consider the static description of the tool to\nbe complete and finalize initialization of the tool." ] fn done ( & mut self , object : * mut zwp_tablet_tool_v1 , ) { } # [ doc = "tool removed\n\nThis event is sent when the tool is removed from the system and will\nsend no further events. Should the physical tool come back into\nproximity later, a new wp_tablet_tool object will be created.\n\nIt is compositor-dependent when a tool is removed. A compositor may\nremove a tool on proximity out, tablet removal or any other reason.\nA compositor may also keep a tool alive until shutdown.\n\nIf the tool is currently in proximity, a proximity_out event will be\nsent before the removed event. See wp_tablet_tool.proximity_out for\nthe handling of any buttons logically down.\n\nWhen this event is received, the client must wp_tablet_tool.destroy\nthe object." ] fn removed ( & mut self , object : * mut zwp_tablet_tool_v1 , ) { } # [ doc = "proximity in event\n\nNotification that this tool is focused on a certain surface.\n\nThis event can be received when the tool has moved from one surface to\nanother, or when the tool has come back into proximity above the\nsurface.\n\nIf any button is logically down when the tool comes into proximity,\nthe respective button event is sent after the proximity_in event but\nwithin the same frame as the proximity_in event." ] fn proximity_in ( & mut self , object : * mut zwp_tablet_tool_v1 , serial : u32 , tablet : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "proximity out event\n\nNotification that this tool has either left proximity, or is no\nlonger focused on a certain surface.\n\nWhen the tablet tool leaves proximity of the tablet, button release\nevents are sent for each button that was held down at the time of\nleaving proximity. These events are sent before the proximity_out\nevent but within the same wp_tablet.frame.\n\nIf the tool stays within proximity of the tablet, but the focus\nchanges from one surface to another, a button release event may not\nbe sent until the button is actually released or the tool leaves the\nproximity of the tablet." ] fn proximity_out ( & mut self , object : * mut zwp_tablet_tool_v1 , ) { } # [ doc = "tablet tool is making contact\n\nSent whenever the tablet tool comes in contact with the surface of the\ntablet.\n\nIf the tool is already in contact with the tablet when entering the\ninput region, the client owning said region will receive a\nwp_tablet.proximity_in event, followed by a wp_tablet.down\nevent and a wp_tablet.frame event.\n\nNote that this event describes logical contact, not physical\ncontact. On some devices, a compositor may not consider a tool in\nlogical contact until a minimum physical pressure threshold is\nexceeded." ] fn down ( & mut self , object : * mut zwp_tablet_tool_v1 , serial : u32 ) { } # [ doc = "tablet tool is no longer making contact\n\nSent whenever the tablet tool stops making contact with the surface of\nthe tablet, or when the tablet tool moves out of the input region\nand the compositor grab (if any) is dismissed.\n\nIf the tablet tool moves out of the input region while in contact\nwith the surface of the tablet and the compositor does not have an\nongoing grab on the surface, the client owning said region will\nreceive a wp_tablet.up event, followed by a wp_tablet.proximity_out\nevent and a wp_tablet.frame event. If the compositor has an ongoing\ngrab on this device, this event sequence is sent whenever the grab\nis dismissed in the future.\n\nNote that this event describes logical contact, not physical\ncontact. On some devices, a compositor may not consider a tool out\nof logical contact until physical pressure falls below a specific\nthreshold." ] fn up ( & mut self , object : * mut zwp_tablet_tool_v1 , ) { } # [ doc = "motion event\n\nSent whenever a tablet tool moves." ] fn motion ( & mut self , object : * mut zwp_tablet_tool_v1 , x : wl_fixed_t , y : wl_fixed_t ) { } # [ doc = "pressure change event\n\nSent whenever the pressure axis on a tool changes. The value of this\nevent is normalized to a value between 0 and 65535.\n\nNote that pressure may be nonzero even when a tool is not in logical\ncontact. See the down and up events for more details." ] fn pressure ( & mut self , object : * mut zwp_tablet_tool_v1 , pressure : u32 ) { } # [ doc = "distance change event\n\nSent whenever the distance axis on a tool changes. The value of this\nevent is normalized to a value between 0 and 65535.\n\nNote that distance may be nonzero even when a tool is not in logical\ncontact. See the down and up events for more details." ] fn distance ( & mut self , object : * mut zwp_tablet_tool_v1 , distance : u32 ) { } # [ doc = "tilt change event\n\nSent whenever one or both of the tilt axes on a tool change. Each tilt\nvalue is in 0.01 of a degree, relative to the z-axis of the tablet.\nThe angle is positive when the top of a tool tilts along the\npositive x or y axis." ] fn tilt ( & mut self , object : * mut zwp_tablet_tool_v1 , tilt_x : i32 , tilt_y : i32 ) { } # [ doc = "z-rotation change event\n\nSent whenever the z-rotation axis on the tool changes. The\nrotation value is in 0.01 of a degree clockwise from the tool's\nlogical neutral position." ] fn rotation ( & mut self , object : * mut zwp_tablet_tool_v1 , degrees : i32 ) { } # [ doc = "Slider position change event\n\nSent whenever the slider position on the tool changes. The\nvalue is normalized between -65535 and 65535, with 0 as the logical\nneutral position of the slider.\n\nThe slider is available on e.g. the Wacom Airbrush tool." ] fn slider ( & mut self , object : * mut zwp_tablet_tool_v1 , position : i32 ) { } # [ doc = "Wheel delta event\n\nSent whenever the wheel on the tool emits an event. This event\ncontains two values for the same axis change. The degrees value is\nin 0.01 of a degree in the same orientation as the\nwl_pointer.vertical_scroll axis. The clicks value is in discrete\nlogical clicks of the mouse wheel. This value may be zero if the\nmovement of the wheel was less than one logical click.\n\nClients should choose either value and avoid mixing degrees and\nclicks. The compositor may accumulate values smaller than a logical\nclick and emulate click events when a certain threshold is met.\nThus, wl_tablet_tool.wheel events with non-zero clicks values may\nhave different degrees values." ] fn wheel ( & mut self , object : * mut zwp_tablet_tool_v1 , degrees : i32 , clicks : i32 ) { } # [ doc = "button event\n\nSent whenever a button on the tool is pressed or released.\n\nIf a button is held down when the tool moves in or out of proximity,\nbutton events are generated by the compositor. See\nwp_tablet_tool.proximity_in and wp_tablet_tool.proximity_out for\ndetails." ] fn button ( & mut self , object : * mut zwp_tablet_tool_v1 , serial : u32 , button : u32 , state : button_state ) { } # [ doc = "frame event\n\nMarks the end of a series of axis and/or button updates from the\ntablet. The Wayland protocol requires axis updates to be sent\nsequentially, however all events within a frame should be considered\none hardware event." ] fn frame ( & mut self , object : * mut zwp_tablet_tool_v1 , time : u32 ) { } } pub unsafe fn zwp_tablet_tool_v1_set_user_data ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_tool_v1 as _ , user_data ) ; } pub unsafe fn zwp_tablet_tool_v1_get_user_data ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_tool_v1 as _ ) ; } pub unsafe fn zwp_tablet_tool_v1_get_version ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_tool_v1 as _ ) ; } pub unsafe fn zwp_tablet_tool_v1_add_listener ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_tool_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_tool_v1_add_rust_listener ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 , listener : & dyn zwp_tablet_tool_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_tool_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_tool_v1_add_listener ( zwp_tablet_tool_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "set the tablet tool's surface\n\nSets the surface of the cursor used for this tool on the given\ntablet. This request only takes effect if the tool is in proximity\nof one of the requesting client's surfaces or the surface parameter\nis the current pointer surface. If there was a previous surface set\nwith this request it is replaced. If surface is NULL, the cursor\nimage is hidden.\n\nThe parameters hotspot_x and hotspot_y define the position of the\npointer surface relative to the pointer location. Its top-left corner\nis always at (x, y) - (hotspot_x, hotspot_y), where (x, y) are the\ncoordinates of the pointer location, in surface-local coordinates.\n\nOn surface.attach requests to the pointer surface, hotspot_x and\nhotspot_y are decremented by the x and y parameters passed to the\nrequest. Attach must be confirmed by wl_surface.commit as usual.\n\nThe hotspot can also be updated by passing the currently set pointer\nsurface to this request with new values for hotspot_x and hotspot_y.\n\nThe current and pending input regions of the wl_surface are cleared,\nand wl_surface.set_input_region is ignored until the wl_surface is no\nlonger used as the cursor. When the use as a cursor ends, the current\nand pending input regions become undefined, and the wl_surface is\nunmapped.\n\nThis request gives the surface the role of a cursor. The role\nassigned by this request is the same as assigned by\nwl_pointer.set_cursor meaning the same surface can be\nused both as a wl_pointer cursor and a wp_tablet cursor. If the\nsurface already has another role, it raises a protocol error.\nThe surface may be used on multiple tablets and across multiple\nseats." ] pub unsafe fn zwp_tablet_tool_v1_set_cursor ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 , serial : u32 , surface : * mut super :: wl_surface :: wl_surface , hotspot_x : i32 , hotspot_y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_tool_v1 as _ , 0u32 , serial , surface , hotspot_x , hotspot_y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the tool object\n\nThis destroys the client's resource for this tool object." ] pub unsafe fn zwp_tablet_tool_v1_destroy ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_tool_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_tool_v1 as _ ) ; } } # [ doc = "graphics tablet device\n\nThe wp_tablet interface represents one graphics tablet device. The\ntablet interface itself does not generate events; all events are\ngenerated by wp_tablet_tool objects when in proximity above a tablet.\n\nA tablet has a number of static characteristics, e.g. device name and\npid/vid. These capabilities are sent in an event sequence after the\nwp_tablet_seat.tablet_added event. This initial event sequence is\nterminated by a wp_tablet.done event." ] pub mod zwp_tablet_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_v1_events : [ wl_message ; 5 ] = [ wl_message { name : b"name\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"id\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"path\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_v1_interface : wl_interface = wl_interface { name : b"zwp_tablet_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_tablet_v1_requests as * const _ } , event_count : 5 , events : unsafe { & zwp_tablet_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_v1_listener { # [ doc = "tablet device name\n\nThis event is sent in the initial burst of events before the\nwp_tablet.done event." ] fn name ( & mut self , object : * mut zwp_tablet_v1 , name : * mut c_char ) { } # [ doc = "tablet device USB vendor/product id\n\nThis event is sent in the initial burst of events before the\nwp_tablet.done event." ] fn id ( & mut self , object : * mut zwp_tablet_v1 , vid : u32 , pid : u32 ) { } # [ doc = "path to the device\n\nA system-specific device path that indicates which device is behind\nthis wp_tablet. This information may be used to gather additional\ninformation about the device, e.g. through libwacom.\n\nA device may have more than one device path. If so, multiple\nwp_tablet.path events are sent. A device may be emulated and not\nhave a device path, and in that case this event will not be sent.\n\nThe format of the path is unspecified, it may be a device node, a\nsysfs path, or some other identifier. It is up to the client to\nidentify the string provided.\n\nThis event is sent in the initial burst of events before the\nwp_tablet.done event." ] fn path ( & mut self , object : * mut zwp_tablet_v1 , path : * mut c_char ) { } # [ doc = "tablet description events sequence complete\n\nThis event is sent immediately to signal the end of the initial\nburst of descriptive events. A client may consider the static\ndescription of the tablet to be complete and finalize initialization\nof the tablet." ] fn done ( & mut self , object : * mut zwp_tablet_v1 , ) { } # [ doc = "tablet removed event\n\nSent when the tablet has been removed from the system. When a tablet\nis removed, some tools may be removed.\n\nWhen this event is received, the client must wp_tablet.destroy\nthe object." ] fn removed ( & mut self , object : * mut zwp_tablet_v1 , ) { } } pub unsafe fn zwp_tablet_v1_set_user_data ( zwp_tablet_v1 : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_v1 as _ , user_data ) ; } pub unsafe fn zwp_tablet_v1_get_user_data ( zwp_tablet_v1 : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_v1 as _ ) ; } pub unsafe fn zwp_tablet_v1_get_version ( zwp_tablet_v1 : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_v1 as _ ) ; } pub unsafe fn zwp_tablet_v1_add_listener ( zwp_tablet_v1 : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_v1_add_rust_listener ( zwp_tablet_v1 : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 , listener : & dyn zwp_tablet_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_v1_add_listener ( zwp_tablet_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the tablet object\n\nThis destroys the client's resource for this tablet object." ] pub unsafe fn zwp_tablet_v1_destroy ( zwp_tablet_v1 : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_v1 as _ ) ; } } } pub mod relative_pointer_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "get relative pointer objects\n\nA global interface used for getting the relative pointer object for a\ngiven pointer." ] pub mod zwp_relative_pointer_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_relative_pointer_manager_v1 { } static mut zwp_relative_pointer_manager_v1_requests_get_relative_pointer_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_relative_pointer_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_relative_pointer\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_relative_pointer_manager_v1_requests_get_relative_pointer_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_relative_pointer_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_relative_pointer_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_relative_pointer_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_relative_pointer_manager_v1_listener { } pub unsafe fn zwp_relative_pointer_manager_v1_set_user_data ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_relative_pointer_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_relative_pointer_manager_v1_get_user_data ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_relative_pointer_manager_v1 as _ ) ; } pub unsafe fn zwp_relative_pointer_manager_v1_get_version ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_relative_pointer_manager_v1 as _ ) ; } pub unsafe fn zwp_relative_pointer_manager_v1_add_listener ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_relative_pointer_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_relative_pointer_manager_v1_add_rust_listener ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 , listener : & dyn zwp_relative_pointer_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_relative_pointer_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_relative_pointer_manager_v1_add_listener ( zwp_relative_pointer_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the relative pointer manager object\n\nUsed by the client to notify the server that it will no longer use this\nrelative pointer manager object." ] pub unsafe fn zwp_relative_pointer_manager_v1_destroy ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_relative_pointer_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_relative_pointer_manager_v1 as _ ) ; } # [ doc = "get a relative pointer object\n\nCreate a relative pointer interface given a wl_pointer object. See the\nwp_relative_pointer interface for more details." ] pub unsafe fn zwp_relative_pointer_manager_v1_get_relative_pointer ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 , pointer : * mut super :: wl_pointer :: wl_pointer ) -> * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_relative_pointer_manager_v1 as _ , 1u32 , & super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , pointer ) ; return r as _ ; } } # [ doc = "relative pointer object\n\nA wp_relative_pointer object is an extension to the wl_pointer interface\nused for emitting relative pointer events. It shares the same focus as\nwl_pointer objects of the same seat and will only emit events when it has\nfocus." ] pub mod zwp_relative_pointer_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_relative_pointer_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_relative_pointer_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_relative_pointer_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"relative_motion\0" as * const u8 as * const c_char , signature : b"uuffff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_relative_pointer_v1_interface : wl_interface = wl_interface { name : b"zwp_relative_pointer_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_relative_pointer_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zwp_relative_pointer_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_relative_pointer_v1_listener { # [ doc = "relative pointer motion\n\nRelative x/y pointer motion from the pointer of the seat associated with\nthis object.\n\nA relative motion is in the same dimension as regular wl_pointer motion\nevents, except they do not represent an absolute position. For example,\nmoving a pointer from (x, y) to (x', y') would have the equivalent\nrelative motion (x' - x, y' - y). If a pointer motion caused the\nabsolute pointer position to be clipped by for example the edge of the\nmonitor, the relative motion is unaffected by the clipping and will\nrepresent the unclipped motion.\n\nThis event also contains non-accelerated motion deltas. The\nnon-accelerated delta is, when applicable, the regular pointer motion\ndelta as it was before having applied motion acceleration and other\ntransformations such as normalization.\n\nNote that the non-accelerated delta does not represent 'raw' events as\nthey were read from some device. Pointer motion acceleration is device-\nand configuration-specific and non-accelerated deltas and accelerated\ndeltas may have the same value on some devices.\n\nRelative motions are not coupled to wl_pointer.motion events, and can be\nsent in combination with such events, but also independently. There may\nalso be scenarios where wl_pointer.motion is sent, but there is no\nrelative motion. The order of an absolute and relative motion event\noriginating from the same physical motion is not guaranteed.\n\nIf the client needs button events or focus state, it can receive them\nfrom a wl_pointer object of the same seat that the wp_relative_pointer\nobject is associated with." ] fn relative_motion ( & mut self , object : * mut zwp_relative_pointer_v1 , utime_hi : u32 , utime_lo : u32 , dx : wl_fixed_t , dy : wl_fixed_t , dx_unaccel : wl_fixed_t , dy_unaccel : wl_fixed_t ) { } } pub unsafe fn zwp_relative_pointer_v1_set_user_data ( zwp_relative_pointer_v1 : * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_relative_pointer_v1 as _ , user_data ) ; } pub unsafe fn zwp_relative_pointer_v1_get_user_data ( zwp_relative_pointer_v1 : * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_relative_pointer_v1 as _ ) ; } pub unsafe fn zwp_relative_pointer_v1_get_version ( zwp_relative_pointer_v1 : * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_relative_pointer_v1 as _ ) ; } pub unsafe fn zwp_relative_pointer_v1_add_listener ( zwp_relative_pointer_v1 : * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_relative_pointer_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_relative_pointer_v1_add_rust_listener ( zwp_relative_pointer_v1 : * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 , listener : & dyn zwp_relative_pointer_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_relative_pointer_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_relative_pointer_v1_add_listener ( zwp_relative_pointer_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "release the relative pointer object" ] pub unsafe fn zwp_relative_pointer_v1_destroy ( zwp_relative_pointer_v1 : * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_relative_pointer_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_relative_pointer_v1 as _ ) ; } } } pub mod tablet_unstable_v2 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "controller object for graphic tablet devices\n\nAn object that provides access to the graphics tablets available on this\nsystem. All tablets are associated with a seat, to get access to the\nactual tablets, use wp_tablet_manager.get_tablet_seat." ] pub mod zwp_tablet_manager_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_manager_v2 { } static mut zwp_tablet_manager_v2_requests_get_tablet_seat_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_manager_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"get_tablet_seat\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_manager_v2_requests_get_tablet_seat_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_manager_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_manager_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_manager_v2_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_manager_v2_listener { } pub unsafe fn zwp_tablet_manager_v2_set_user_data ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_manager_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_manager_v2_get_user_data ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_manager_v2 as _ ) ; } pub unsafe fn zwp_tablet_manager_v2_get_version ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_manager_v2 as _ ) ; } pub unsafe fn zwp_tablet_manager_v2_add_listener ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_manager_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_manager_v2_add_rust_listener ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 , listener : & dyn zwp_tablet_manager_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_manager_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_manager_v2_add_listener ( zwp_tablet_manager_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "get the tablet seat\n\nGet the wp_tablet_seat object for the given seat. This object\nprovides access to all graphics tablets in this seat." ] pub unsafe fn zwp_tablet_manager_v2_get_tablet_seat ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_tablet_manager_v2 as _ , 0u32 , & super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat ) ; return r as _ ; } # [ doc = "release the memory for the tablet manager object\n\nDestroy the wp_tablet_manager object. Objects created from this\nobject are unaffected and should be destroyed separately." ] pub unsafe fn zwp_tablet_manager_v2_destroy ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_manager_v2 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_manager_v2 as _ ) ; } } # [ doc = "controller object for graphic tablet devices of a seat\n\nAn object that provides access to the graphics tablets available on this\nseat. After binding to this interface, the compositor sends a set of\nwp_tablet_seat.tablet_added and wp_tablet_seat.tool_added events." ] pub mod zwp_tablet_seat_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_seat_v2 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_seat_v2_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_tablet_seat_v2_events_tablet_added_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_v2 :: zwp_tablet_v2_interface as * const wl_interface } , ] ; static mut zwp_tablet_seat_v2_events_tool_added_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2_interface as * const wl_interface } , ] ; static mut zwp_tablet_seat_v2_events_pad_added_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_seat_v2_events : [ wl_message ; 3 ] = [ wl_message { name : b"tablet_added\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_seat_v2_events_tablet_added_types as * const _ } , } , wl_message { name : b"tool_added\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_seat_v2_events_tool_added_types as * const _ } , } , wl_message { name : b"pad_added\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_seat_v2_events_pad_added_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_seat_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_seat_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_tablet_seat_v2_requests as * const _ } , event_count : 3 , events : unsafe { & zwp_tablet_seat_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_seat_v2_listener { # [ doc = "new device notification\n\nThis event is sent whenever a new tablet becomes available on this\nseat. This event only provides the object id of the tablet, any\nstatic information about the tablet (device name, vid/pid, etc.) is\nsent through the wp_tablet interface." ] fn tablet_added ( & mut self , object : * mut zwp_tablet_seat_v2 , id : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 ) { } # [ doc = "a new tool has been used with a tablet\n\nThis event is sent whenever a tool that has not previously been used\nwith a tablet comes into use. This event only provides the object id\nof the tool; any static information about the tool (capabilities,\ntype, etc.) is sent through the wp_tablet_tool interface." ] fn tool_added ( & mut self , object : * mut zwp_tablet_seat_v2 , id : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 ) { } # [ doc = "new pad notification\n\nThis event is sent whenever a new pad is known to the system. Typically,\npads are physically attached to tablets and a pad_added event is\nsent immediately after the wp_tablet_seat.tablet_added.\nHowever, some standalone pad devices logically attach to tablets at\nruntime, and the client must wait for wp_tablet_pad.enter to know\nthe tablet a pad is attached to.\n\nThis event only provides the object id of the pad. All further\nfeatures (buttons, strips, rings) are sent through the wp_tablet_pad\ninterface." ] fn pad_added ( & mut self , object : * mut zwp_tablet_seat_v2 , id : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 ) { } } pub unsafe fn zwp_tablet_seat_v2_set_user_data ( zwp_tablet_seat_v2 : * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_seat_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_seat_v2_get_user_data ( zwp_tablet_seat_v2 : * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_seat_v2 as _ ) ; } pub unsafe fn zwp_tablet_seat_v2_get_version ( zwp_tablet_seat_v2 : * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_seat_v2 as _ ) ; } pub unsafe fn zwp_tablet_seat_v2_add_listener ( zwp_tablet_seat_v2 : * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_seat_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_seat_v2_add_rust_listener ( zwp_tablet_seat_v2 : * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 , listener : & dyn zwp_tablet_seat_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_seat_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_seat_v2_add_listener ( zwp_tablet_seat_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "release the memory for the tablet seat object\n\nDestroy the wp_tablet_seat object. Objects created from this\nobject are unaffected and should be destroyed separately." ] pub unsafe fn zwp_tablet_seat_v2_destroy ( zwp_tablet_seat_v2 : * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_seat_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_seat_v2 as _ ) ; } } # [ doc = "a physical tablet tool\n\nAn object that represents a physical tool that has been, or is\ncurrently in use with a tablet in this seat. Each wp_tablet_tool\nobject stays valid until the client destroys it; the compositor\nreuses the wp_tablet_tool object to indicate that the object's\nrespective physical tool has come into proximity of a tablet again.\n\nA wp_tablet_tool object's relation to a physical tool depends on the\ntablet's ability to report serial numbers. If the tablet supports\nthis capability, then the object represents a specific physical tool\nand can be identified even when used on multiple tablets.\n\nA tablet tool has a number of static characteristics, e.g. tool type,\nhardware_serial and capabilities. These capabilities are sent in an\nevent sequence after the wp_tablet_seat.tool_added event before any\nactual events from this tool. This initial event sequence is\nterminated by a wp_tablet_tool.done event.\n\nTablet tool events are grouped by wp_tablet_tool.frame events.\nAny events received before a wp_tablet_tool.frame event should be\nconsidered part of the same hardware state change." ] pub mod zwp_tablet_tool_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_tool_v2 { } # [ doc = "a physical tool type\n\nDescribes the physical type of a tool. The physical type of a tool\ngenerally defines its base usage.\n\nThe mouse tool represents a mouse-shaped tool that is not a relative\ndevice but bound to the tablet's surface, providing absolute\ncoordinates.\n\nThe lens tool is a mouse-shaped tool with an attached lens to\nprovide precision focus." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum _type { # [ doc = "Pen" ] pen = 320 , # [ doc = "Eraser" ] eraser = 321 , # [ doc = "Brush" ] brush = 322 , # [ doc = "Pencil" ] pencil = 323 , # [ doc = "Airbrush" ] airbrush = 324 , # [ doc = "Finger" ] finger = 325 , # [ doc = "Mouse" ] mouse = 326 , # [ doc = "Lens" ] lens = 327 , # [ doc ( hidden ) ] __nonexhaustive , } impl _type { pub fn from_raw ( n : u32 ) -> Option < _type > { match n { 320 => Some ( _type :: pen ) , 321 => Some ( _type :: eraser ) , 322 => Some ( _type :: brush ) , 323 => Some ( _type :: pencil ) , 324 => Some ( _type :: airbrush ) , 325 => Some ( _type :: finger ) , 326 => Some ( _type :: mouse ) , 327 => Some ( _type :: lens ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "capability flags for a tool\n\nDescribes extra capabilities on a tablet.\n\nAny tool must provide x and y values, extra axes are\ndevice-specific." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum capability { # [ doc = "Tilt axes" ] tilt = 1 , # [ doc = "Pressure axis" ] pressure = 2 , # [ doc = "Distance axis" ] distance = 3 , # [ doc = "Z-rotation axis" ] rotation = 4 , # [ doc = "Slider axis" ] slider = 5 , # [ doc = "Wheel axis" ] wheel = 6 , # [ doc ( hidden ) ] __nonexhaustive , } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { match n { 1 => Some ( capability :: tilt ) , 2 => Some ( capability :: pressure ) , 3 => Some ( capability :: distance ) , 4 => Some ( capability :: rotation ) , 5 => Some ( capability :: slider ) , 6 => Some ( capability :: wheel ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "physical button state\n\nDescribes the physical state of a button that produced the button event." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum button_state { # [ doc = "button is not pressed" ] released = 0 , # [ doc = "button is pressed" ] pressed = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl button_state { pub fn from_raw ( n : u32 ) -> Option < button_state > { match n { 0 => Some ( button_state :: released ) , 1 => Some ( button_state :: pressed ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_tablet_tool_v2_requests_set_cursor_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_tool_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_cursor\0" as * const u8 as * const c_char , signature : b"u?oii\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_tool_v2_requests_set_cursor_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_tablet_tool_v2_events_proximity_in_types : [ * const wl_interface ; 3 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: zwp_tablet_v2 :: zwp_tablet_v2_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_tool_v2_events : [ wl_message ; 19 ] = [ wl_message { name : b"type\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hardware_serial\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hardware_id_wacom\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capability\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"proximity_in\0" as * const u8 as * const c_char , signature : b"uoo\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_tool_v2_events_proximity_in_types as * const _ } , } , wl_message { name : b"proximity_out\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"down\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"up\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"motion\0" as * const u8 as * const c_char , signature : b"ff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"pressure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"distance\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"tilt\0" as * const u8 as * const c_char , signature : b"ff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"rotation\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"slider\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"wheel\0" as * const u8 as * const c_char , signature : b"fi\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"button\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_tool_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_tool_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_tool_v2_requests as * const _ } , event_count : 19 , events : unsafe { & zwp_tablet_tool_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_tool_v2_listener { # [ doc = "tool type\n\nThe tool type is the high-level type of the tool and usually decides\nthe interaction expected from this tool.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn _type ( & mut self , object : * mut zwp_tablet_tool_v2 , tool_type : _type ) { } # [ doc = "unique hardware serial number of the tool\n\nIf the physical tool can be identified by a unique 64-bit serial\nnumber, this event notifies the client of this serial number.\n\nIf multiple tablets are available in the same seat and the tool is\nuniquely identifiable by the serial number, that tool may move\nbetween tablets.\n\nOtherwise, if the tool has no serial number and this event is\nmissing, the tool is tied to the tablet it first comes into\nproximity with. Even if the physical tool is used on multiple\ntablets, separate wp_tablet_tool objects will be created, one per\ntablet.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn hardware_serial ( & mut self , object : * mut zwp_tablet_tool_v2 , hardware_serial_hi : u32 , hardware_serial_lo : u32 ) { } # [ doc = "hardware id notification in Wacom's format\n\nThis event notifies the client of a hardware id available on this tool.\n\nThe hardware id is a device-specific 64-bit id that provides extra\ninformation about the tool in use, beyond the wl_tool.type\nenumeration. The format of the id is specific to tablets made by\nWacom Inc. For example, the hardware id of a Wacom Grip\nPen (a stylus) is 0x802.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn hardware_id_wacom ( & mut self , object : * mut zwp_tablet_tool_v2 , hardware_id_hi : u32 , hardware_id_lo : u32 ) { } # [ doc = "tool capability notification\n\nThis event notifies the client of any capabilities of this tool,\nbeyond the main set of x/y axes and tip up/down detection.\n\nOne event is sent for each extra capability available on this tool.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn capability ( & mut self , object : * mut zwp_tablet_tool_v2 , capability : capability ) { } # [ doc = "tool description events sequence complete\n\nThis event signals the end of the initial burst of descriptive\nevents. A client may consider the static description of the tool to\nbe complete and finalize initialization of the tool." ] fn done ( & mut self , object : * mut zwp_tablet_tool_v2 , ) { } # [ doc = "tool removed\n\nThis event is sent when the tool is removed from the system and will\nsend no further events. Should the physical tool come back into\nproximity later, a new wp_tablet_tool object will be created.\n\nIt is compositor-dependent when a tool is removed. A compositor may\nremove a tool on proximity out, tablet removal or any other reason.\nA compositor may also keep a tool alive until shutdown.\n\nIf the tool is currently in proximity, a proximity_out event will be\nsent before the removed event. See wp_tablet_tool.proximity_out for\nthe handling of any buttons logically down.\n\nWhen this event is received, the client must wp_tablet_tool.destroy\nthe object." ] fn removed ( & mut self , object : * mut zwp_tablet_tool_v2 , ) { } # [ doc = "proximity in event\n\nNotification that this tool is focused on a certain surface.\n\nThis event can be received when the tool has moved from one surface to\nanother, or when the tool has come back into proximity above the\nsurface.\n\nIf any button is logically down when the tool comes into proximity,\nthe respective button event is sent after the proximity_in event but\nwithin the same frame as the proximity_in event." ] fn proximity_in ( & mut self , object : * mut zwp_tablet_tool_v2 , serial : u32 , tablet : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "proximity out event\n\nNotification that this tool has either left proximity, or is no\nlonger focused on a certain surface.\n\nWhen the tablet tool leaves proximity of the tablet, button release\nevents are sent for each button that was held down at the time of\nleaving proximity. These events are sent before the proximity_out\nevent but within the same wp_tablet.frame.\n\nIf the tool stays within proximity of the tablet, but the focus\nchanges from one surface to another, a button release event may not\nbe sent until the button is actually released or the tool leaves the\nproximity of the tablet." ] fn proximity_out ( & mut self , object : * mut zwp_tablet_tool_v2 , ) { } # [ doc = "tablet tool is making contact\n\nSent whenever the tablet tool comes in contact with the surface of the\ntablet.\n\nIf the tool is already in contact with the tablet when entering the\ninput region, the client owning said region will receive a\nwp_tablet.proximity_in event, followed by a wp_tablet.down\nevent and a wp_tablet.frame event.\n\nNote that this event describes logical contact, not physical\ncontact. On some devices, a compositor may not consider a tool in\nlogical contact until a minimum physical pressure threshold is\nexceeded." ] fn down ( & mut self , object : * mut zwp_tablet_tool_v2 , serial : u32 ) { } # [ doc = "tablet tool is no longer making contact\n\nSent whenever the tablet tool stops making contact with the surface of\nthe tablet, or when the tablet tool moves out of the input region\nand the compositor grab (if any) is dismissed.\n\nIf the tablet tool moves out of the input region while in contact\nwith the surface of the tablet and the compositor does not have an\nongoing grab on the surface, the client owning said region will\nreceive a wp_tablet.up event, followed by a wp_tablet.proximity_out\nevent and a wp_tablet.frame event. If the compositor has an ongoing\ngrab on this device, this event sequence is sent whenever the grab\nis dismissed in the future.\n\nNote that this event describes logical contact, not physical\ncontact. On some devices, a compositor may not consider a tool out\nof logical contact until physical pressure falls below a specific\nthreshold." ] fn up ( & mut self , object : * mut zwp_tablet_tool_v2 , ) { } # [ doc = "motion event\n\nSent whenever a tablet tool moves." ] fn motion ( & mut self , object : * mut zwp_tablet_tool_v2 , x : wl_fixed_t , y : wl_fixed_t ) { } # [ doc = "pressure change event\n\nSent whenever the pressure axis on a tool changes. The value of this\nevent is normalized to a value between 0 and 65535.\n\nNote that pressure may be nonzero even when a tool is not in logical\ncontact. See the down and up events for more details." ] fn pressure ( & mut self , object : * mut zwp_tablet_tool_v2 , pressure : u32 ) { } # [ doc = "distance change event\n\nSent whenever the distance axis on a tool changes. The value of this\nevent is normalized to a value between 0 and 65535.\n\nNote that distance may be nonzero even when a tool is not in logical\ncontact. See the down and up events for more details." ] fn distance ( & mut self , object : * mut zwp_tablet_tool_v2 , distance : u32 ) { } # [ doc = "tilt change event\n\nSent whenever one or both of the tilt axes on a tool change. Each tilt\nvalue is in degrees, relative to the z-axis of the tablet.\nThe angle is positive when the top of a tool tilts along the\npositive x or y axis." ] fn tilt ( & mut self , object : * mut zwp_tablet_tool_v2 , tilt_x : wl_fixed_t , tilt_y : wl_fixed_t ) { } # [ doc = "z-rotation change event\n\nSent whenever the z-rotation axis on the tool changes. The\nrotation value is in degrees clockwise from the tool's\nlogical neutral position." ] fn rotation ( & mut self , object : * mut zwp_tablet_tool_v2 , degrees : wl_fixed_t ) { } # [ doc = "Slider position change event\n\nSent whenever the slider position on the tool changes. The\nvalue is normalized between -65535 and 65535, with 0 as the logical\nneutral position of the slider.\n\nThe slider is available on e.g. the Wacom Airbrush tool." ] fn slider ( & mut self , object : * mut zwp_tablet_tool_v2 , position : i32 ) { } # [ doc = "Wheel delta event\n\nSent whenever the wheel on the tool emits an event. This event\ncontains two values for the same axis change. The degrees value is\nin the same orientation as the wl_pointer.vertical_scroll axis. The\nclicks value is in discrete logical clicks of the mouse wheel. This\nvalue may be zero if the movement of the wheel was less\nthan one logical click.\n\nClients should choose either value and avoid mixing degrees and\nclicks. The compositor may accumulate values smaller than a logical\nclick and emulate click events when a certain threshold is met.\nThus, wl_tablet_tool.wheel events with non-zero clicks values may\nhave different degrees values." ] fn wheel ( & mut self , object : * mut zwp_tablet_tool_v2 , degrees : wl_fixed_t , clicks : i32 ) { } # [ doc = "button event\n\nSent whenever a button on the tool is pressed or released.\n\nIf a button is held down when the tool moves in or out of proximity,\nbutton events are generated by the compositor. See\nwp_tablet_tool.proximity_in and wp_tablet_tool.proximity_out for\ndetails." ] fn button ( & mut self , object : * mut zwp_tablet_tool_v2 , serial : u32 , button : u32 , state : button_state ) { } # [ doc = "frame event\n\nMarks the end of a series of axis and/or button updates from the\ntablet. The Wayland protocol requires axis updates to be sent\nsequentially, however all events within a frame should be considered\none hardware event." ] fn frame ( & mut self , object : * mut zwp_tablet_tool_v2 , time : u32 ) { } } pub unsafe fn zwp_tablet_tool_v2_set_user_data ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_tool_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_tool_v2_get_user_data ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_tool_v2 as _ ) ; } pub unsafe fn zwp_tablet_tool_v2_get_version ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_tool_v2 as _ ) ; } pub unsafe fn zwp_tablet_tool_v2_add_listener ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_tool_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_tool_v2_add_rust_listener ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 , listener : & dyn zwp_tablet_tool_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_tool_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_tool_v2_add_listener ( zwp_tablet_tool_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "set the tablet tool's surface\n\nSets the surface of the cursor used for this tool on the given\ntablet. This request only takes effect if the tool is in proximity\nof one of the requesting client's surfaces or the surface parameter\nis the current pointer surface. If there was a previous surface set\nwith this request it is replaced. If surface is NULL, the cursor\nimage is hidden.\n\nThe parameters hotspot_x and hotspot_y define the position of the\npointer surface relative to the pointer location. Its top-left corner\nis always at (x, y) - (hotspot_x, hotspot_y), where (x, y) are the\ncoordinates of the pointer location, in surface-local coordinates.\n\nOn surface.attach requests to the pointer surface, hotspot_x and\nhotspot_y are decremented by the x and y parameters passed to the\nrequest. Attach must be confirmed by wl_surface.commit as usual.\n\nThe hotspot can also be updated by passing the currently set pointer\nsurface to this request with new values for hotspot_x and hotspot_y.\n\nThe current and pending input regions of the wl_surface are cleared,\nand wl_surface.set_input_region is ignored until the wl_surface is no\nlonger used as the cursor. When the use as a cursor ends, the current\nand pending input regions become undefined, and the wl_surface is\nunmapped.\n\nThis request gives the surface the role of a wp_tablet_tool cursor. A\nsurface may only ever be used as the cursor surface for one\nwp_tablet_tool. If the surface already has another role or has\npreviously been used as cursor surface for a different tool, a\nprotocol error is raised." ] pub unsafe fn zwp_tablet_tool_v2_set_cursor ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 , serial : u32 , surface : * mut super :: wl_surface :: wl_surface , hotspot_x : i32 , hotspot_y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_tool_v2 as _ , 0u32 , serial , surface , hotspot_x , hotspot_y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the tool object\n\nThis destroys the client's resource for this tool object." ] pub unsafe fn zwp_tablet_tool_v2_destroy ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_tool_v2 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_tool_v2 as _ ) ; } } # [ doc = "graphics tablet device\n\nThe wp_tablet interface represents one graphics tablet device. The\ntablet interface itself does not generate events; all events are\ngenerated by wp_tablet_tool objects when in proximity above a tablet.\n\nA tablet has a number of static characteristics, e.g. device name and\npid/vid. These capabilities are sent in an event sequence after the\nwp_tablet_seat.tablet_added event. This initial event sequence is\nterminated by a wp_tablet.done event." ] pub mod zwp_tablet_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_v2 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_v2_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_v2_events : [ wl_message ; 5 ] = [ wl_message { name : b"name\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"id\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"path\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_tablet_v2_requests as * const _ } , event_count : 5 , events : unsafe { & zwp_tablet_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_v2_listener { # [ doc = "tablet device name\n\nThis event is sent in the initial burst of events before the\nwp_tablet.done event." ] fn name ( & mut self , object : * mut zwp_tablet_v2 , name : * mut c_char ) { } # [ doc = "tablet device USB vendor/product id\n\nThis event is sent in the initial burst of events before the\nwp_tablet.done event." ] fn id ( & mut self , object : * mut zwp_tablet_v2 , vid : u32 , pid : u32 ) { } # [ doc = "path to the device\n\nA system-specific device path that indicates which device is behind\nthis wp_tablet. This information may be used to gather additional\ninformation about the device, e.g. through libwacom.\n\nA device may have more than one device path. If so, multiple\nwp_tablet.path events are sent. A device may be emulated and not\nhave a device path, and in that case this event will not be sent.\n\nThe format of the path is unspecified, it may be a device node, a\nsysfs path, or some other identifier. It is up to the client to\nidentify the string provided.\n\nThis event is sent in the initial burst of events before the\nwp_tablet.done event." ] fn path ( & mut self , object : * mut zwp_tablet_v2 , path : * mut c_char ) { } # [ doc = "tablet description events sequence complete\n\nThis event is sent immediately to signal the end of the initial\nburst of descriptive events. A client may consider the static\ndescription of the tablet to be complete and finalize initialization\nof the tablet." ] fn done ( & mut self , object : * mut zwp_tablet_v2 , ) { } # [ doc = "tablet removed event\n\nSent when the tablet has been removed from the system. When a tablet\nis removed, some tools may be removed.\n\nWhen this event is received, the client must wp_tablet.destroy\nthe object." ] fn removed ( & mut self , object : * mut zwp_tablet_v2 , ) { } } pub unsafe fn zwp_tablet_v2_set_user_data ( zwp_tablet_v2 : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_v2_get_user_data ( zwp_tablet_v2 : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_v2 as _ ) ; } pub unsafe fn zwp_tablet_v2_get_version ( zwp_tablet_v2 : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_v2 as _ ) ; } pub unsafe fn zwp_tablet_v2_add_listener ( zwp_tablet_v2 : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_v2_add_rust_listener ( zwp_tablet_v2 : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 , listener : & dyn zwp_tablet_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_v2_add_listener ( zwp_tablet_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the tablet object\n\nThis destroys the client's resource for this tablet object." ] pub unsafe fn zwp_tablet_v2_destroy ( zwp_tablet_v2 : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_v2 as _ ) ; } } # [ doc = "pad ring\n\nA circular interaction area, such as the touch ring on the Wacom Intuos\nPro series tablets.\n\nEvents on a ring are logically grouped by the wl_tablet_pad_ring.frame\nevent." ] pub mod zwp_tablet_pad_ring_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_pad_ring_v2 { } # [ doc = "ring axis source\n\nDescribes the source types for ring events. This indicates to the\nclient how a ring event was physically generated; a client may\nadjust the user interface accordingly. For example, events\nfrom a \"finger\" source may trigger kinetic scrolling." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum source { # [ doc = "finger" ] finger = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl source { pub fn from_raw ( n : u32 ) -> Option < source > { match n { 1 => Some ( source :: finger ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_ring_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_feedback\0" as * const u8 as * const c_char , signature : b"su\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_ring_v2_events : [ wl_message ; 4 ] = [ wl_message { name : b"source\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"angle\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"stop\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_pad_ring_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_pad_ring_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_pad_ring_v2_requests as * const _ } , event_count : 4 , events : unsafe { & zwp_tablet_pad_ring_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_pad_ring_v2_listener { # [ doc = "ring event source\n\nSource information for ring events.\n\nThis event does not occur on its own. It is sent before a\nwp_tablet_pad_ring.frame event and carries the source information\nfor all events within that frame.\n\nThe source specifies how this event was generated. If the source is\nwp_tablet_pad_ring.source.finger, a wp_tablet_pad_ring.stop event\nwill be sent when the user lifts the finger off the device.\n\nThis event is optional. If the source is unknown for an interaction,\nno event is sent." ] fn source ( & mut self , object : * mut zwp_tablet_pad_ring_v2 , source : source ) { } # [ doc = "angle changed\n\nSent whenever the angle on a ring changes.\n\nThe angle is provided in degrees clockwise from the logical\nnorth of the ring in the pad's current rotation." ] fn angle ( & mut self , object : * mut zwp_tablet_pad_ring_v2 , degrees : wl_fixed_t ) { } # [ doc = "interaction stopped\n\nStop notification for ring events.\n\nFor some wp_tablet_pad_ring.source types, a wp_tablet_pad_ring.stop\nevent is sent to notify a client that the interaction with the ring\nhas terminated. This enables the client to implement kinetic scrolling.\nSee the wp_tablet_pad_ring.source documentation for information on\nwhen this event may be generated.\n\nAny wp_tablet_pad_ring.angle events with the same source after this\nevent should be considered as the start of a new interaction." ] fn stop ( & mut self , object : * mut zwp_tablet_pad_ring_v2 , ) { } # [ doc = "end of a ring event sequence\n\nIndicates the end of a set of ring events that logically belong\ntogether. A client is expected to accumulate the data in all events\nwithin the frame before proceeding.\n\nAll wp_tablet_pad_ring events before a wp_tablet_pad_ring.frame event belong\nlogically together. For example, on termination of a finger interaction\non a ring the compositor will send a wp_tablet_pad_ring.source event,\na wp_tablet_pad_ring.stop event and a wp_tablet_pad_ring.frame event.\n\nA wp_tablet_pad_ring.frame event is sent for every logical event\ngroup, even if the group only contains a single wp_tablet_pad_ring\nevent. Specifically, a client may get a sequence: angle, frame,\nangle, frame, etc." ] fn frame ( & mut self , object : * mut zwp_tablet_pad_ring_v2 , time : u32 ) { } } pub unsafe fn zwp_tablet_pad_ring_v2_set_user_data ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_pad_ring_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_pad_ring_v2_get_user_data ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_pad_ring_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_ring_v2_get_version ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_pad_ring_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_ring_v2_add_listener ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_pad_ring_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_pad_ring_v2_add_rust_listener ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 , listener : & dyn zwp_tablet_pad_ring_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_pad_ring_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_pad_ring_v2_add_listener ( zwp_tablet_pad_ring_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "set compositor feedback\n\nRequest that the compositor use the provided feedback string\nassociated with this ring. This request should be issued immediately\nafter a wp_tablet_pad_group.mode_switch event from the corresponding\ngroup is received, or whenever the ring is mapped to a different\naction. See wp_tablet_pad_group.mode_switch for more details.\n\nClients are encouraged to provide context-aware descriptions for\nthe actions associated with the ring; compositors may use this\ninformation to offer visual feedback about the button layout\n(eg. on-screen displays).\n\nThe provided string 'description' is a UTF-8 encoded string to be\nassociated with this ring, and is considered user-visible; general\ninternationalization rules apply.\n\nThe serial argument will be that of the last\nwp_tablet_pad_group.mode_switch event received for the group of this\nring. Requests providing other serials than the most recent one will be\nignored." ] pub unsafe fn zwp_tablet_pad_ring_v2_set_feedback ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 , description : * const c_char , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_ring_v2 as _ , 0u32 , description , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the ring object\n\nThis destroys the client's resource for this ring object." ] pub unsafe fn zwp_tablet_pad_ring_v2_destroy ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_ring_v2 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_pad_ring_v2 as _ ) ; } } # [ doc = "pad strip\n\nA linear interaction area, such as the strips found in Wacom Cintiq\nmodels.\n\nEvents on a strip are logically grouped by the wl_tablet_pad_strip.frame\nevent." ] pub mod zwp_tablet_pad_strip_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_pad_strip_v2 { } # [ doc = "strip axis source\n\nDescribes the source types for strip events. This indicates to the\nclient how a strip event was physically generated; a client may\nadjust the user interface accordingly. For example, events\nfrom a \"finger\" source may trigger kinetic scrolling." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum source { # [ doc = "finger" ] finger = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl source { pub fn from_raw ( n : u32 ) -> Option < source > { match n { 1 => Some ( source :: finger ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_strip_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_feedback\0" as * const u8 as * const c_char , signature : b"su\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_strip_v2_events : [ wl_message ; 4 ] = [ wl_message { name : b"source\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"position\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"stop\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_pad_strip_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_pad_strip_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_pad_strip_v2_requests as * const _ } , event_count : 4 , events : unsafe { & zwp_tablet_pad_strip_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_pad_strip_v2_listener { # [ doc = "strip event source\n\nSource information for strip events.\n\nThis event does not occur on its own. It is sent before a\nwp_tablet_pad_strip.frame event and carries the source information\nfor all events within that frame.\n\nThe source specifies how this event was generated. If the source is\nwp_tablet_pad_strip.source.finger, a wp_tablet_pad_strip.stop event\nwill be sent when the user lifts their finger off the device.\n\nThis event is optional. If the source is unknown for an interaction,\nno event is sent." ] fn source ( & mut self , object : * mut zwp_tablet_pad_strip_v2 , source : source ) { } # [ doc = "position changed\n\nSent whenever the position on a strip changes.\n\nThe position is normalized to a range of [0, 65535], the 0-value\nrepresents the top-most and/or left-most position of the strip in\nthe pad's current rotation." ] fn position ( & mut self , object : * mut zwp_tablet_pad_strip_v2 , position : u32 ) { } # [ doc = "interaction stopped\n\nStop notification for strip events.\n\nFor some wp_tablet_pad_strip.source types, a wp_tablet_pad_strip.stop\nevent is sent to notify a client that the interaction with the strip\nhas terminated. This enables the client to implement kinetic\nscrolling. See the wp_tablet_pad_strip.source documentation for\ninformation on when this event may be generated.\n\nAny wp_tablet_pad_strip.position events with the same source after this\nevent should be considered as the start of a new interaction." ] fn stop ( & mut self , object : * mut zwp_tablet_pad_strip_v2 , ) { } # [ doc = "end of a strip event sequence\n\nIndicates the end of a set of events that represent one logical\nhardware strip event. A client is expected to accumulate the data\nin all events within the frame before proceeding.\n\nAll wp_tablet_pad_strip events before a wp_tablet_pad_strip.frame event belong\nlogically together. For example, on termination of a finger interaction\non a strip the compositor will send a wp_tablet_pad_strip.source event,\na wp_tablet_pad_strip.stop event and a wp_tablet_pad_strip.frame\nevent.\n\nA wp_tablet_pad_strip.frame event is sent for every logical event\ngroup, even if the group only contains a single wp_tablet_pad_strip\nevent. Specifically, a client may get a sequence: position, frame,\nposition, frame, etc." ] fn frame ( & mut self , object : * mut zwp_tablet_pad_strip_v2 , time : u32 ) { } } pub unsafe fn zwp_tablet_pad_strip_v2_set_user_data ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_pad_strip_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_pad_strip_v2_get_user_data ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_pad_strip_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_strip_v2_get_version ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_pad_strip_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_strip_v2_add_listener ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_pad_strip_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_pad_strip_v2_add_rust_listener ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 , listener : & dyn zwp_tablet_pad_strip_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_pad_strip_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_pad_strip_v2_add_listener ( zwp_tablet_pad_strip_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "set compositor feedback\n\nRequests the compositor to use the provided feedback string\nassociated with this strip. This request should be issued immediately\nafter a wp_tablet_pad_group.mode_switch event from the corresponding\ngroup is received, or whenever the strip is mapped to a different\naction. See wp_tablet_pad_group.mode_switch for more details.\n\nClients are encouraged to provide context-aware descriptions for\nthe actions associated with the strip, and compositors may use this\ninformation to offer visual feedback about the button layout\n(eg. on-screen displays).\n\nThe provided string 'description' is a UTF-8 encoded string to be\nassociated with this ring, and is considered user-visible; general\ninternationalization rules apply.\n\nThe serial argument will be that of the last\nwp_tablet_pad_group.mode_switch event received for the group of this\nstrip. Requests providing other serials than the most recent one will be\nignored." ] pub unsafe fn zwp_tablet_pad_strip_v2_set_feedback ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 , description : * const c_char , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_strip_v2 as _ , 0u32 , description , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the strip object\n\nThis destroys the client's resource for this strip object." ] pub unsafe fn zwp_tablet_pad_strip_v2_destroy ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_strip_v2 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_pad_strip_v2 as _ ) ; } } # [ doc = "a set of buttons, rings and strips\n\nA pad group describes a distinct (sub)set of buttons, rings and strips\npresent in the tablet. The criteria of this grouping is usually positional,\neg. if a tablet has buttons on the left and right side, 2 groups will be\npresented. The physical arrangement of groups is undisclosed and may\nchange on the fly.\n\nPad groups will announce their features during pad initialization. Between\nthe corresponding wp_tablet_pad.group event and wp_tablet_pad_group.done, the\npad group will announce the buttons, rings and strips contained in it,\nplus the number of supported modes.\n\nModes are a mechanism to allow multiple groups of actions for every element\nin the pad group. The number of groups and available modes in each is\npersistent across device plugs. The current mode is user-switchable, it\nwill be announced through the wp_tablet_pad_group.mode_switch event both\nwhenever it is switched, and after wp_tablet_pad.enter.\n\nThe current mode logically applies to all elements in the pad group,\nalthough it is at clients' discretion whether to actually perform different\nactions, and/or issue the respective .set_feedback requests to notify the\ncompositor. See the wp_tablet_pad_group.mode_switch event for more details." ] pub mod zwp_tablet_pad_group_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_pad_group_v2 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_group_v2_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_tablet_pad_group_v2_events_ring_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2_interface as * const wl_interface } , ] ; static mut zwp_tablet_pad_group_v2_events_strip_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_group_v2_events : [ wl_message ; 6 ] = [ wl_message { name : b"buttons\0" as * const u8 as * const c_char , signature : b"a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"ring\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_pad_group_v2_events_ring_types as * const _ } , } , wl_message { name : b"strip\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_pad_group_v2_events_strip_types as * const _ } , } , wl_message { name : b"modes\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"mode_switch\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_pad_group_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_pad_group_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_tablet_pad_group_v2_requests as * const _ } , event_count : 6 , events : unsafe { & zwp_tablet_pad_group_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_pad_group_v2_listener { # [ doc = "buttons announced\n\nSent on wp_tablet_pad_group initialization to announce the available\nbuttons in the group. Button indices start at 0, a button may only be\nin one group at a time.\n\nThis event is first sent in the initial burst of events before the\nwp_tablet_pad_group.done event.\n\nSome buttons are reserved by the compositor. These buttons may not be\nassigned to any wp_tablet_pad_group. Compositors may broadcast this\nevent in the case of changes to the mapping of these reserved buttons.\nIf the compositor happens to reserve all buttons in a group, this event\nwill be sent with an empty array." ] fn buttons ( & mut self , object : * mut zwp_tablet_pad_group_v2 , buttons : * mut wl_array ) { } # [ doc = "ring announced\n\nSent on wp_tablet_pad_group initialization to announce available rings.\nOne event is sent for each ring available on this pad group.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_pad_group.done event." ] fn ring ( & mut self , object : * mut zwp_tablet_pad_group_v2 , ring : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 ) { } # [ doc = "strip announced\n\nSent on wp_tablet_pad initialization to announce available strips.\nOne event is sent for each strip available on this pad group.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_pad_group.done event." ] fn strip ( & mut self , object : * mut zwp_tablet_pad_group_v2 , strip : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 ) { } # [ doc = "mode-switch ability announced\n\nSent on wp_tablet_pad_group initialization to announce that the pad\ngroup may switch between modes. A client may use a mode to store a\nspecific configuration for buttons, rings and strips and use the\nwl_tablet_pad_group.mode_switch event to toggle between these\nconfigurations. Mode indices start at 0.\n\nSwitching modes is compositor-dependent. See the\nwp_tablet_pad_group.mode_switch event for more details.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_pad_group.done event. This event is only sent when more than\nmore than one mode is available." ] fn modes ( & mut self , object : * mut zwp_tablet_pad_group_v2 , modes : u32 ) { } # [ doc = "tablet group description events sequence complete\n\nThis event is sent immediately to signal the end of the initial\nburst of descriptive events. A client may consider the static\ndescription of the tablet to be complete and finalize initialization\nof the tablet group." ] fn done ( & mut self , object : * mut zwp_tablet_pad_group_v2 , ) { } # [ doc = "mode switch event\n\nNotification that the mode was switched.\n\nA mode applies to all buttons, rings and strips in a group\nsimultaneously, but a client is not required to assign different actions\nfor each mode. For example, a client may have mode-specific button\nmappings but map the ring to vertical scrolling in all modes. Mode\nindices start at 0.\n\nSwitching modes is compositor-dependent. The compositor may provide\nvisual cues to the client about the mode, e.g. by toggling LEDs on\nthe tablet device. Mode-switching may be software-controlled or\ncontrolled by one or more physical buttons. For example, on a Wacom\nIntuos Pro, the button inside the ring may be assigned to switch\nbetween modes.\n\nThe compositor will also send this event after wp_tablet_pad.enter on\neach group in order to notify of the current mode. Groups that only\nfeature one mode will use mode=0 when emitting this event.\n\nIf a button action in the new mode differs from the action in the\nprevious mode, the client should immediately issue a\nwp_tablet_pad.set_feedback request for each changed button.\n\nIf a ring or strip action in the new mode differs from the action\nin the previous mode, the client should immediately issue a\nwp_tablet_ring.set_feedback or wp_tablet_strip.set_feedback request\nfor each changed ring or strip." ] fn mode_switch ( & mut self , object : * mut zwp_tablet_pad_group_v2 , time : u32 , serial : u32 , mode : u32 ) { } } pub unsafe fn zwp_tablet_pad_group_v2_set_user_data ( zwp_tablet_pad_group_v2 : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_pad_group_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_pad_group_v2_get_user_data ( zwp_tablet_pad_group_v2 : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_pad_group_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_group_v2_get_version ( zwp_tablet_pad_group_v2 : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_pad_group_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_group_v2_add_listener ( zwp_tablet_pad_group_v2 : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_pad_group_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_pad_group_v2_add_rust_listener ( zwp_tablet_pad_group_v2 : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 , listener : & dyn zwp_tablet_pad_group_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_pad_group_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_pad_group_v2_add_listener ( zwp_tablet_pad_group_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the pad object\n\nDestroy the wp_tablet_pad_group object. Objects created from this object\nare unaffected and should be destroyed separately." ] pub unsafe fn zwp_tablet_pad_group_v2_destroy ( zwp_tablet_pad_group_v2 : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_group_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_pad_group_v2 as _ ) ; } } # [ doc = "a set of buttons, rings and strips\n\nA pad device is a set of buttons, rings and strips\nusually physically present on the tablet device itself. Some\nexceptions exist where the pad device is physically detached, e.g. the\nWacom ExpressKey Remote.\n\nPad devices have no axes that control the cursor and are generally\nauxiliary devices to the tool devices used on the tablet surface.\n\nA pad device has a number of static characteristics, e.g. the number\nof rings. These capabilities are sent in an event sequence after the\nwp_tablet_seat.pad_added event before any actual events from this pad.\nThis initial event sequence is terminated by a wp_tablet_pad.done\nevent.\n\nAll pad features (buttons, rings and strips) are logically divided into\ngroups and all pads have at least one group. The available groups are\nnotified through the wp_tablet_pad.group event; the compositor will\nemit one event per group before emitting wp_tablet_pad.done.\n\nGroups may have multiple modes. Modes allow clients to map multiple\nactions to a single pad feature. Only one mode can be active per group,\nalthough different groups may have different active modes." ] pub mod zwp_tablet_pad_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_pad_v2 { } # [ doc = "physical button state\n\nDescribes the physical state of a button that caused the button\nevent." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum button_state { # [ doc = "the button is not pressed" ] released = 0 , # [ doc = "the button is pressed" ] pressed = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl button_state { pub fn from_raw ( n : u32 ) -> Option < button_state > { match n { 0 => Some ( button_state :: released ) , 1 => Some ( button_state :: pressed ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_feedback\0" as * const u8 as * const c_char , signature : b"usu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_tablet_pad_v2_events_group_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2_interface as * const wl_interface } , ] ; static mut zwp_tablet_pad_v2_events_enter_types : [ * const wl_interface ; 3 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: zwp_tablet_v2 :: zwp_tablet_v2_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut zwp_tablet_pad_v2_events_leave_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_v2_events : [ wl_message ; 8 ] = [ wl_message { name : b"group\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_pad_v2_events_group_types as * const _ } , } , wl_message { name : b"path\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"buttons\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"button\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"uoo\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_pad_v2_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"uo\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_pad_v2_events_leave_types as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_pad_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_pad_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_pad_v2_requests as * const _ } , event_count : 8 , events : unsafe { & zwp_tablet_pad_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_pad_v2_listener { # [ doc = "group announced\n\nSent on wp_tablet_pad initialization to announce available groups.\nOne event is sent for each pad group available.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_pad.done event. At least one group will be announced." ] fn group ( & mut self , object : * mut zwp_tablet_pad_v2 , pad_group : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 ) { } # [ doc = "path to the device\n\nA system-specific device path that indicates which device is behind\nthis wp_tablet_pad. This information may be used to gather additional\ninformation about the device, e.g. through libwacom.\n\nThe format of the path is unspecified, it may be a device node, a\nsysfs path, or some other identifier. It is up to the client to\nidentify the string provided.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_pad.done event." ] fn path ( & mut self , object : * mut zwp_tablet_pad_v2 , path : * mut c_char ) { } # [ doc = "buttons announced\n\nSent on wp_tablet_pad initialization to announce the available\nbuttons.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_pad.done event. This event is only sent when at least one\nbutton is available." ] fn buttons ( & mut self , object : * mut zwp_tablet_pad_v2 , buttons : u32 ) { } # [ doc = "pad description event sequence complete\n\nThis event signals the end of the initial burst of descriptive\nevents. A client may consider the static description of the pad to\nbe complete and finalize initialization of the pad." ] fn done ( & mut self , object : * mut zwp_tablet_pad_v2 , ) { } # [ doc = "physical button state\n\nSent whenever the physical state of a button changes." ] fn button ( & mut self , object : * mut zwp_tablet_pad_v2 , time : u32 , button : u32 , state : button_state ) { } # [ doc = "enter event\n\nNotification that this pad is focused on the specified surface." ] fn enter ( & mut self , object : * mut zwp_tablet_pad_v2 , serial : u32 , tablet : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "enter event\n\nNotification that this pad is no longer focused on the specified\nsurface." ] fn leave ( & mut self , object : * mut zwp_tablet_pad_v2 , serial : u32 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "pad removed event\n\nSent when the pad has been removed from the system. When a tablet\nis removed its pad(s) will be removed too.\n\nWhen this event is received, the client must destroy all rings, strips\nand groups that were offered by this pad, and issue wp_tablet_pad.destroy\nthe pad itself." ] fn removed ( & mut self , object : * mut zwp_tablet_pad_v2 , ) { } } pub unsafe fn zwp_tablet_pad_v2_set_user_data ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_pad_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_pad_v2_get_user_data ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_pad_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_v2_get_version ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_pad_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_v2_add_listener ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_pad_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_pad_v2_add_rust_listener ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 , listener : & dyn zwp_tablet_pad_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_pad_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_pad_v2_add_listener ( zwp_tablet_pad_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "set compositor feedback\n\nRequests the compositor to use the provided feedback string\nassociated with this button. This request should be issued immediately\nafter a wp_tablet_pad_group.mode_switch event from the corresponding\ngroup is received, or whenever a button is mapped to a different\naction. See wp_tablet_pad_group.mode_switch for more details.\n\nClients are encouraged to provide context-aware descriptions for\nthe actions associated with each button, and compositors may use\nthis information to offer visual feedback on the button layout\n(e.g. on-screen displays).\n\nButton indices start at 0. Setting the feedback string on a button\nthat is reserved by the compositor (i.e. not belonging to any\nwp_tablet_pad_group) does not generate an error but the compositor\nis free to ignore the request.\n\nThe provided string 'description' is a UTF-8 encoded string to be\nassociated with this ring, and is considered user-visible; general\ninternationalization rules apply.\n\nThe serial argument will be that of the last\nwp_tablet_pad_group.mode_switch event received for the group of this\nbutton. Requests providing other serials than the most recent one will\nbe ignored." ] pub unsafe fn zwp_tablet_pad_v2_set_feedback ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 , button : u32 , description : * const c_char , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_v2 as _ , 0u32 , button , description , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the pad object\n\nDestroy the wp_tablet_pad object. Objects created from this object\nare unaffected and should be destroyed separately." ] pub unsafe fn zwp_tablet_pad_v2_destroy ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_v2 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_pad_v2 as _ ) ; } } } pub mod wl_eglstream_controller { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod wl_eglstream_controller { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_eglstream_controller { } # [ doc = "Stream present mode\n\n- dont_care: Using this enum will tell the server to make its own\ndecisions regarding present mode.\n\n- fifo: Tells the server to use a fifo present mode. The decision to\nuse fifo synchronous is left up to the server.\n\n- mailbox: Tells the server to use a mailbox present mode." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum present_mode { # [ doc = "Let the Server decide present mode" ] dont_care = 0 , # [ doc = "Use a fifo present mode" ] fifo = 1 , # [ doc = "Use a mailbox mode" ] mailbox = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl present_mode { pub fn from_raw ( n : u32 ) -> Option < present_mode > { match n { 0 => Some ( present_mode :: dont_care ) , 1 => Some ( present_mode :: fifo ) , 2 => Some ( present_mode :: mailbox ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "Stream consumer attachment attributes\n\n- present_mode: Must be one of wl_eglstream_controller_present_mode. Tells the\nserver the desired present mode that should be used.\n\n- fifo_length: Only valid when the present_mode attrib is provided and its\nvalue is specified as fifo. Tells the server the desired fifo\nlength to be used when the desired present_mode is fifo." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum attrib { # [ doc = "Tells the server the desired present mode" ] present_mode = 0 , # [ doc = "Tells the server the desired fifo length when the desired presenation_mode is fifo." ] fifo_length = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl attrib { pub fn from_raw ( n : u32 ) -> Option < attrib > { match n { 0 => Some ( attrib :: present_mode ) , 1 => Some ( attrib :: fifo_length ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_eglstream_controller_requests_attach_eglstream_consumer_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut wl_eglstream_controller_requests_attach_eglstream_consumer_attribs_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_eglstream_controller_requests : [ wl_message ; 2 ] = [ wl_message { name : b"attach_eglstream_consumer\0" as * const u8 as * const c_char , signature : b"oo\0" as * const u8 as * const c_char , types : unsafe { & wl_eglstream_controller_requests_attach_eglstream_consumer_types as * const _ } , } , wl_message { name : b"attach_eglstream_consumer_attribs\0" as * const u8 as * const c_char , signature : b"2ooa\0" as * const u8 as * const c_char , types : unsafe { & wl_eglstream_controller_requests_attach_eglstream_consumer_attribs_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_eglstream_controller_interface : wl_interface = wl_interface { name : b"wl_eglstream_controller\0" as * const u8 as * const c_char , version : 2 , request_count : 2 , requests : unsafe { & wl_eglstream_controller_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_eglstream_controller_listener { } pub unsafe fn wl_eglstream_controller_set_user_data ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_eglstream_controller as _ , user_data ) ; } pub unsafe fn wl_eglstream_controller_get_user_data ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_eglstream_controller as _ ) ; } pub unsafe fn wl_eglstream_controller_get_version ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_eglstream_controller as _ ) ; } pub unsafe fn wl_eglstream_controller_add_listener ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_eglstream_controller as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_eglstream_controller_add_rust_listener ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller , listener : & dyn wl_eglstream_controller_listener ) -> bool { let to = ( listener as * const dyn wl_eglstream_controller_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_eglstream_controller_add_listener ( wl_eglstream_controller as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_eglstream_controller_destroy ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_eglstream_controller as _ ) ; } # [ doc = "Create server stream and attach consumer\n\nCreates the corresponding server side EGLStream from the given wl_buffer\nand attaches a consumer to it." ] pub unsafe fn wl_eglstream_controller_attach_eglstream_consumer ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller , wl_surface : * mut super :: wl_surface :: wl_surface , wl_resource : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_eglstream_controller as _ , 0u32 , wl_surface , wl_resource , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Create server stream and attach consumer using attributes\n\nCreates the corresponding server side EGLStream from the given wl_buffer\nand attaches a consumer to it using the given attributes." ] pub unsafe fn wl_eglstream_controller_attach_eglstream_consumer_attribs ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller , wl_surface : * mut super :: wl_surface :: wl_surface , wl_resource : * mut super :: wl_buffer :: wl_buffer , attribs : * mut wl_array ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_eglstream_controller as _ , 1u32 , wl_surface , wl_resource , attribs , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod linux_dmabuf_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "factory for creating dmabuf-based wl_buffers\n\nFollowing the interfaces from:\nhttps://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt\nhttps://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import_modifiers.txt\nand the Linux DRM sub-system's AddFb2 ioctl.\n\nThis interface offers ways to create generic dmabuf-based\nwl_buffers. Immediately after a client binds to this interface,\nthe set of supported formats and format modifiers is sent with\n'format' and 'modifier' events.\n\nThe following are required from clients:\n\n- Clients must ensure that either all data in the dma-buf is\ncoherent for all subsequent read access or that coherency is\ncorrectly handled by the underlying kernel-side dma-buf\nimplementation.\n\n- Don't make any more attachments after sending the buffer to the\ncompositor. Making more attachments later increases the risk of\nthe compositor not being able to use (re-import) an existing\ndmabuf-based wl_buffer.\n\nThe underlying graphics stack must ensure the following:\n\n- The dmabuf file descriptors relayed to the server will stay valid\nfor the whole lifetime of the wl_buffer. This means the server may\nat any time use those fds to import the dmabuf into any kernel\nsub-system that might accept it.\n\nHowever, when the underlying graphics stack fails to deliver the\npromise, because of e.g. a device hot-unplug which raises internal\nerrors, after the wl_buffer has been successfully created the\ncompositor must not raise protocol errors to the client when dmabuf\nimport later fails.\n\nTo create a wl_buffer from one or more dmabufs, a client creates a\nzwp_linux_dmabuf_params_v1 object with a zwp_linux_dmabuf_v1.create_params\nrequest. All planes required by the intended format are added with\nthe 'add' request. Finally, a 'create' or 'create_immed' request is\nissued, which has the following outcome depending on the import success.\n\nThe 'create' request,\n- on success, triggers a 'created' event which provides the final\nwl_buffer to the client.\n- on failure, triggers a 'failed' event to convey that the server\ncannot use the dmabufs received from the client.\n\nFor the 'create_immed' request,\n- on success, the server immediately imports the added dmabufs to\ncreate a wl_buffer. No event is sent from the server in this case.\n- on failure, the server can choose to either:\n- terminate the client by raising a fatal error.\n- mark the wl_buffer as failed, and send a 'failed' event to the\nclient. If the client uses a failed wl_buffer as an argument to any\nrequest, the behaviour is compositor implementation-defined.\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_linux_dmabuf_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_linux_dmabuf_v1 { } static mut zwp_linux_dmabuf_v1_requests_create_params_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_dmabuf_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_params\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_linux_dmabuf_v1_requests_create_params_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_dmabuf_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifier\0" as * const u8 as * const c_char , signature : b"3uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_linux_dmabuf_v1_interface : wl_interface = wl_interface { name : b"zwp_linux_dmabuf_v1\0" as * const u8 as * const c_char , version : 3 , request_count : 2 , requests : unsafe { & zwp_linux_dmabuf_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_linux_dmabuf_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_linux_dmabuf_v1_listener { # [ doc = "supported buffer format\n\nThis event advertises one buffer format that the server supports.\nAll the supported formats are advertised once when the client\nbinds to this interface. A roundtrip after binding guarantees\nthat the client has received all supported formats.\n\nFor the definition of the format codes, see the\nzwp_linux_buffer_params_v1::create request.\n\nWarning: the 'format' event is likely to be deprecated and replaced\nwith the 'modifier' event introduced in zwp_linux_dmabuf_v1\nversion 3, described below. Please refrain from using the information\nreceived from this event." ] fn format ( & mut self , object : * mut zwp_linux_dmabuf_v1 , format : u32 ) { } # [ doc = "supported buffer format modifier\n\nThis event advertises the formats that the server supports, along with\nthe modifiers supported for each format. All the supported modifiers\nfor all the supported formats are advertised once when the client\nbinds to this interface. A roundtrip after binding guarantees that\nthe client has received all supported format-modifier pairs.\n\nFor legacy support, DRM_FORMAT_MOD_INVALID (that is, modifier_hi ==\n0x00ffffff and modifier_lo == 0xffffffff) is allowed in this event.\nIt indicates that the server can support the format with an implicit\nmodifier. When a plane has DRM_FORMAT_MOD_INVALID as its modifier, it\nis as if no explicit modifier is specified. The effective modifier\nwill be derived from the dmabuf.\n\nA compositor that sends valid modifiers and DRM_FORMAT_MOD_INVALID for\na given format supports both explicit modifiers and implicit modifiers.\n\nFor the definition of the format and modifier codes, see the\nzwp_linux_buffer_params_v1::create and zwp_linux_buffer_params_v1::add\nrequests.\n\nOnly available since version 3 of the interface." ] fn modifier ( & mut self , object : * mut zwp_linux_dmabuf_v1 , format : u32 , modifier_hi : u32 , modifier_lo : u32 ) { } } pub unsafe fn zwp_linux_dmabuf_v1_set_user_data ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_linux_dmabuf_v1 as _ , user_data ) ; } pub unsafe fn zwp_linux_dmabuf_v1_get_user_data ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_linux_dmabuf_v1 as _ ) ; } pub unsafe fn zwp_linux_dmabuf_v1_get_version ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_linux_dmabuf_v1 as _ ) ; } pub unsafe fn zwp_linux_dmabuf_v1_add_listener ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_linux_dmabuf_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_linux_dmabuf_v1_add_rust_listener ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 , listener : & dyn zwp_linux_dmabuf_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_linux_dmabuf_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_linux_dmabuf_v1_add_listener ( zwp_linux_dmabuf_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "unbind the factory\n\nObjects created through this interface, especially wl_buffers, will\nremain valid." ] pub unsafe fn zwp_linux_dmabuf_v1_destroy ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_dmabuf_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_linux_dmabuf_v1 as _ ) ; } # [ doc = "create a temporary object for buffer parameters\n\nThis temporary object is used to collect multiple dmabuf handles into\na single batch to create a wl_buffer. It can only be used once and\nshould be destroyed after a 'created' or 'failed' event has been\nreceived." ] pub unsafe fn zwp_linux_dmabuf_v1_create_params ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 ) -> * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_linux_dmabuf_v1 as _ , 1u32 , & super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "parameters for creating a dmabuf-based wl_buffer\n\nThis temporary object is a collection of dmabufs and other\nparameters that together form a single logical buffer. The temporary\nobject may eventually create one wl_buffer unless cancelled by\ndestroying it before requesting 'create'.\n\nSingle-planar formats only require one dmabuf, however\nmulti-planar formats may require more than one dmabuf. For all\nformats, an 'add' request must be called once per plane (even if the\nunderlying dmabuf fd is identical).\n\nYou must use consecutive plane indices ('plane_idx' argument for 'add')\nfrom zero to the number of planes used by the drm_fourcc format code.\nAll planes required by the format must be given exactly once, but can\nbe given in any order. Each plane index can be set only once." ] pub mod zwp_linux_buffer_params_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_linux_buffer_params_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "the dmabuf_batch object has already been used to create a wl_buffer" ] already_used = 0 , # [ doc = "plane index out of bounds" ] plane_idx = 1 , # [ doc = "the plane index was already set" ] plane_set = 2 , # [ doc = "missing or too many planes to create a buffer" ] incomplete = 3 , # [ doc = "format not supported" ] invalid_format = 4 , # [ doc = "invalid width or height" ] invalid_dimensions = 5 , # [ doc = "offset + stride * height goes out of dmabuf bounds" ] out_of_bounds = 6 , # [ doc = "invalid wl_buffer resulted from importing dmabufs via the create_immed request on given buffer_params" ] invalid_wl_buffer = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: already_used ) , 1 => Some ( error :: plane_idx ) , 2 => Some ( error :: plane_set ) , 3 => Some ( error :: incomplete ) , 4 => Some ( error :: invalid_format ) , 5 => Some ( error :: invalid_dimensions ) , 6 => Some ( error :: out_of_bounds ) , 7 => Some ( error :: invalid_wl_buffer ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { pub struct flags : u32 { # [ doc = "contents are y-inverted" ] const y_invert = 1 ; # [ doc = "content is interlaced" ] const interlaced = 2 ; # [ doc = "bottom field first" ] const bottom_first = 4 ; } } impl flags { pub fn from_raw ( n : u32 ) -> Option < flags > { Some ( flags :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } static mut zwp_linux_buffer_params_v1_requests_create_immed_types : [ * const wl_interface ; 5 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_buffer_params_v1_requests : [ wl_message ; 4 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"add\0" as * const u8 as * const c_char , signature : b"huuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"iiuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_immed\0" as * const u8 as * const c_char , signature : b"2niiuu\0" as * const u8 as * const c_char , types : unsafe { & zwp_linux_buffer_params_v1_requests_create_immed_types as * const _ } , } , ] ; static mut zwp_linux_buffer_params_v1_events_created_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_buffer_params_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"created\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_linux_buffer_params_v1_events_created_types as * const _ } , } , wl_message { name : b"failed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_linux_buffer_params_v1_interface : wl_interface = wl_interface { name : b"zwp_linux_buffer_params_v1\0" as * const u8 as * const c_char , version : 3 , request_count : 4 , requests : unsafe { & zwp_linux_buffer_params_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_linux_buffer_params_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_linux_buffer_params_v1_listener { # [ doc = "buffer creation succeeded\n\nThis event indicates that the attempted buffer creation was\nsuccessful. It provides the new wl_buffer referencing the dmabuf(s).\n\nUpon receiving this event, the client should destroy the\nzlinux_dmabuf_params object." ] fn created ( & mut self , object : * mut zwp_linux_buffer_params_v1 , buffer : * mut super :: wl_buffer :: wl_buffer ) { } # [ doc = "buffer creation failed\n\nThis event indicates that the attempted buffer creation has\nfailed. It usually means that one of the dmabuf constraints\nhas not been fulfilled.\n\nUpon receiving this event, the client should destroy the\nzlinux_buffer_params object." ] fn failed ( & mut self , object : * mut zwp_linux_buffer_params_v1 , ) { } } pub unsafe fn zwp_linux_buffer_params_v1_set_user_data ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_linux_buffer_params_v1 as _ , user_data ) ; } pub unsafe fn zwp_linux_buffer_params_v1_get_user_data ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_linux_buffer_params_v1 as _ ) ; } pub unsafe fn zwp_linux_buffer_params_v1_get_version ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_linux_buffer_params_v1 as _ ) ; } pub unsafe fn zwp_linux_buffer_params_v1_add_listener ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_linux_buffer_params_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_linux_buffer_params_v1_add_rust_listener ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 , listener : & dyn zwp_linux_buffer_params_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_linux_buffer_params_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_linux_buffer_params_v1_add_listener ( zwp_linux_buffer_params_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "delete this object, used or not\n\nCleans up the temporary data sent to the server for dmabuf-based\nwl_buffer creation." ] pub unsafe fn zwp_linux_buffer_params_v1_destroy ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_buffer_params_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_linux_buffer_params_v1 as _ ) ; } # [ doc = "add a dmabuf to the temporary set\n\nThis request adds one dmabuf to the set in this\nzwp_linux_buffer_params_v1.\n\nThe 64-bit unsigned value combined from modifier_hi and modifier_lo\nis the dmabuf layout modifier. DRM AddFB2 ioctl calls this the\nfb modifier, which is defined in drm_mode.h of Linux UAPI.\nThis is an opaque token. Drivers use this token to express tiling,\ncompression, etc. driver-specific modifications to the base format\ndefined by the DRM fourcc code.\n\nWarning: It should be an error if the format/modifier pair was not\nadvertised with the modifier event. This is not enforced yet because\nsome implementations always accept DRM_FORMAT_MOD_INVALID. Also\nversion 2 of this protocol does not have the modifier event.\n\nThis request raises the PLANE_IDX error if plane_idx is too large.\nThe error PLANE_SET is raised if attempting to set a plane that\nwas already set." ] pub unsafe fn zwp_linux_buffer_params_v1_add ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 , fd : :: std :: os :: unix :: io :: RawFd , plane_idx : u32 , offset : u32 , stride : u32 , modifier_hi : u32 , modifier_lo : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_buffer_params_v1 as _ , 1u32 , fd , plane_idx , offset , stride , modifier_hi , modifier_lo , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "create a wl_buffer from the given dmabufs\n\nThis asks for creation of a wl_buffer from the added dmabuf\nbuffers. The wl_buffer is not created immediately but returned via\nthe 'created' event if the dmabuf sharing succeeds. The sharing\nmay fail at runtime for reasons a client cannot predict, in\nwhich case the 'failed' event is triggered.\n\nThe 'format' argument is a DRM_FORMAT code, as defined by the\nlibdrm's drm_fourcc.h. The Linux kernel's DRM sub-system is the\nauthoritative source on how the format codes should work.\n\nThe 'flags' is a bitfield of the flags defined in enum \"flags\".\n'y_invert' means the that the image needs to be y-flipped.\n\nFlag 'interlaced' means that the frame in the buffer is not\nprogressive as usual, but interlaced. An interlaced buffer as\nsupported here must always contain both top and bottom fields.\nThe top field always begins on the first pixel row. The temporal\nordering between the two fields is top field first, unless\n'bottom_first' is specified. It is undefined whether 'bottom_first'\nis ignored if 'interlaced' is not set.\n\nThis protocol does not convey any information about field rate,\nduration, or timing, other than the relative ordering between the\ntwo fields in one buffer. A compositor may have to estimate the\nintended field rate from the incoming buffer rate. It is undefined\nwhether the time of receiving wl_surface.commit with a new buffer\nattached, applying the wl_surface state, wl_surface.frame callback\ntrigger, presentation, or any other point in the compositor cycle\nis used to measure the frame or field times. There is no support\nfor detecting missed or late frames/fields/buffers either, and\nthere is no support whatsoever for cooperating with interlaced\ncompositor output.\n\nThe composited image quality resulting from the use of interlaced\nbuffers is explicitly undefined. A compositor may use elaborate\nhardware features or software to deinterlace and create progressive\noutput frames from a sequence of interlaced input buffers, or it\nmay produce substandard image quality. However, compositors that\ncannot guarantee reasonable image quality in all cases are recommended\nto just reject all interlaced buffers.\n\nAny argument errors, including non-positive width or height,\nmismatch between the number of planes and the format, bad\nformat, bad offset or stride, may be indicated by fatal protocol\nerrors: INCOMPLETE, INVALID_FORMAT, INVALID_DIMENSIONS,\nOUT_OF_BOUNDS.\n\nDmabuf import errors in the server that are not obvious client\nbugs are returned via the 'failed' event as non-fatal. This\nallows attempting dmabuf sharing and falling back in the client\nif it fails.\n\nThis request can be sent only once in the object's lifetime, after\nwhich the only legal request is destroy. This object should be\ndestroyed after issuing a 'create' request. Attempting to use this\nobject after issuing 'create' raises ALREADY_USED protocol error.\n\nIt is not mandatory to issue 'create'. If a client wants to\ncancel the buffer creation, it can just destroy this object." ] pub unsafe fn zwp_linux_buffer_params_v1_create ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 , width : i32 , height : i32 , format : u32 , flags : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_buffer_params_v1 as _ , 2u32 , width , height , format , flags , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "immediately create a wl_buffer from the given dmabufs\n\nThis asks for immediate creation of a wl_buffer by importing the\nadded dmabufs.\n\nIn case of import success, no event is sent from the server, and the\nwl_buffer is ready to be used by the client.\n\nUpon import failure, either of the following may happen, as seen fit\nby the implementation:\n- the client is terminated with one of the following fatal protocol\nerrors:\n- INCOMPLETE, INVALID_FORMAT, INVALID_DIMENSIONS, OUT_OF_BOUNDS,\nin case of argument errors such as mismatch between the number\nof planes and the format, bad format, non-positive width or\nheight, or bad offset or stride.\n- INVALID_WL_BUFFER, in case the cause for failure is unknown or\nplaform specific.\n- the server creates an invalid wl_buffer, marks it as failed and\nsends a 'failed' event to the client. The result of using this\ninvalid wl_buffer as an argument in any request by the client is\ndefined by the compositor implementation.\n\nThis takes the same arguments as a 'create' request, and obeys the\nsame restrictions." ] pub unsafe fn zwp_linux_buffer_params_v1_create_immed ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 , width : i32 , height : i32 , format : u32 , flags : u32 ) -> * mut super :: wl_buffer :: wl_buffer { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_linux_buffer_params_v1 as _ , 3u32 , & super :: wl_buffer :: wl_buffer_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , width , height , format , flags ) ; return r as _ ; } } } pub mod xdg_shell_unstable_v6 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "create desktop-style surfaces\n\nxdg_shell allows clients to turn a wl_surface into a \"real window\"\nwhich can be dragged, resized, stacked, and moved around by the\nuser. Everything about this interface is suited towards traditional\ndesktop environments." ] pub mod zxdg_shell_v6 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_shell_v6 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc = "xdg_shell was destroyed before children" ] defunct_surfaces = 1 , # [ doc = "the client tried to map or destroy a non-topmost popup" ] not_the_topmost_popup = 2 , # [ doc = "the client specified an invalid popup parent surface" ] invalid_popup_parent = 3 , # [ doc = "the client provided an invalid surface state" ] invalid_surface_state = 4 , # [ doc = "the client provided an invalid positioner" ] invalid_positioner = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , 1 => Some ( error :: defunct_surfaces ) , 2 => Some ( error :: not_the_topmost_popup ) , 3 => Some ( error :: invalid_popup_parent ) , 4 => Some ( error :: invalid_surface_state ) , 5 => Some ( error :: invalid_positioner ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zxdg_shell_v6_requests_create_positioner_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zxdg_positioner_v6 :: zxdg_positioner_v6_interface as * const wl_interface } , ] ; static mut zxdg_shell_v6_requests_get_xdg_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_surface_v6 :: zxdg_surface_v6_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_shell_v6_requests : [ wl_message ; 4 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_positioner\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zxdg_shell_v6_requests_create_positioner_types as * const _ } , } , wl_message { name : b"get_xdg_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zxdg_shell_v6_requests_get_xdg_surface_types as * const _ } , } , wl_message { name : b"pong\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_shell_v6_events : [ wl_message ; 1 ] = [ wl_message { name : b"ping\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_shell_v6_interface : wl_interface = wl_interface { name : b"zxdg_shell_v6\0" as * const u8 as * const c_char , version : 1 , request_count : 4 , requests : unsafe { & zxdg_shell_v6_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_shell_v6_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_shell_v6_listener { # [ doc = "check if the client is alive\n\nThe ping event asks the client if it's still alive. Pass the\nserial specified in the event back to the compositor by sending\na \"pong\" request back with the specified serial. See xdg_shell.ping.\n\nCompositors can use this to determine if the client is still\nalive. It's unspecified what will happen if the client doesn't\nrespond to the ping request, or in what timeframe. Clients should\ntry to respond in a reasonable amount of time.\n\nA compositor is free to ping in any way it wants, but a client must\nalways respond to any xdg_shell object it created." ] fn ping ( & mut self , object : * mut zxdg_shell_v6 , serial : u32 ) { } } pub unsafe fn zxdg_shell_v6_set_user_data ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_shell_v6 as _ , user_data ) ; } pub unsafe fn zxdg_shell_v6_get_user_data ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_shell_v6 as _ ) ; } pub unsafe fn zxdg_shell_v6_get_version ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_shell_v6 as _ ) ; } pub unsafe fn zxdg_shell_v6_add_listener ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_shell_v6 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_shell_v6_add_rust_listener ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 , listener : & dyn zxdg_shell_v6_listener ) -> bool { let to = ( listener as * const dyn zxdg_shell_v6_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_shell_v6_add_listener ( zxdg_shell_v6 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy xdg_shell\n\nDestroy this xdg_shell object.\n\nDestroying a bound xdg_shell object while there are surfaces\nstill alive created by this xdg_shell object instance is illegal\nand will result in a protocol error." ] pub unsafe fn zxdg_shell_v6_destroy ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_shell_v6 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_shell_v6 as _ ) ; } # [ doc = "create a positioner object\n\nCreate a positioner object. A positioner object is used to position\nsurfaces relative to some parent surface. See the interface description\nand xdg_surface.get_popup for details." ] pub unsafe fn zxdg_shell_v6_create_positioner ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 ) -> * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_shell_v6 as _ , 1u32 , & super :: zxdg_positioner_v6 :: zxdg_positioner_v6_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "create a shell surface from a surface\n\nThis creates an xdg_surface for the given surface. While xdg_surface\nitself is not a role, the corresponding surface may only be assigned\na role extending xdg_surface, such as xdg_toplevel or xdg_popup.\n\nThis creates an xdg_surface for the given surface. An xdg_surface is\nused as basis to define a role to a given surface, such as xdg_toplevel\nor xdg_popup. It also manages functionality shared between xdg_surface\nbased surface roles.\n\nSee the documentation of xdg_surface for more details about what an\nxdg_surface is and how it is used." ] pub unsafe fn zxdg_shell_v6_get_xdg_surface ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_shell_v6 as _ , 2u32 , & super :: zxdg_surface_v6 :: zxdg_surface_v6_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } # [ doc = "respond to a ping event\n\nA client must respond to a ping event with a pong request or\nthe client may be deemed unresponsive. See xdg_shell.ping." ] pub unsafe fn zxdg_shell_v6_pong ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_shell_v6 as _ , 3u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "child surface positioner\n\nThe xdg_positioner provides a collection of rules for the placement of a\nchild surface relative to a parent surface. Rules can be defined to ensure\nthe child surface remains within the visible area's borders, and to\nspecify how the child surface changes its position, such as sliding along\nan axis, or flipping around a rectangle. These positioner-created rules are\nconstrained by the requirement that a child surface must intersect with or\nbe at least partially adjacent to its parent surface.\n\nSee the various requests for details about possible rules.\n\nAt the time of the request, the compositor makes a copy of the rules\nspecified by the xdg_positioner. Thus, after the request is complete the\nxdg_positioner object can be destroyed or reused; further changes to the\nobject will have no effect on previous usages.\n\nFor an xdg_positioner object to be considered complete, it must have a\nnon-zero size set by set_size, and a non-zero anchor rectangle set by\nset_anchor_rect. Passing an incomplete xdg_positioner object when\npositioning a surface raises an error." ] pub mod zxdg_positioner_v6 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_positioner_v6 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "invalid input provided" ] invalid_input = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_input ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { pub struct anchor : u32 { # [ doc = "the center of the anchor rectangle" ] const none = 0 ; # [ doc = "the top edge of the anchor rectangle" ] const top = 1 ; # [ doc = "the bottom edge of the anchor rectangle" ] const bottom = 2 ; # [ doc = "the left edge of the anchor rectangle" ] const left = 4 ; # [ doc = "the right edge of the anchor rectangle" ] const right = 8 ; } } impl anchor { pub fn from_raw ( n : u32 ) -> Option < anchor > { Some ( anchor :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } bitflags ! { pub struct gravity : u32 { # [ doc = "center over the anchor edge" ] const none = 0 ; # [ doc = "position above the anchor edge" ] const top = 1 ; # [ doc = "position below the anchor edge" ] const bottom = 2 ; # [ doc = "position to the left of the anchor edge" ] const left = 4 ; # [ doc = "position to the right of the anchor edge" ] const right = 8 ; } } impl gravity { pub fn from_raw ( n : u32 ) -> Option < gravity > { Some ( gravity :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } bitflags ! { # [ doc = "constraint adjustments\n\nThe constraint adjustment value define ways the compositor will adjust\nthe position of the surface, if the unadjusted position would result\nin the surface being partly constrained.\n\nWhether a surface is considered 'constrained' is left to the compositor\nto determine. For example, the surface may be partly outside the\ncompositor's defined 'work area', thus necessitating the child surface's\nposition be adjusted until it is entirely inside the work area.\n\nThe adjustments can be combined, according to a defined precedence: 1)\nFlip, 2) Slide, 3) Resize." ] pub struct constraint_adjustment : u32 { # [ doc = "don't move the child surface when constrained\n\nDon't alter the surface position even if it is constrained on some\naxis, for example partially outside the edge of a monitor." ] const none = 0 ; # [ doc = "move along the x axis until unconstrained\n\nSlide the surface along the x axis until it is no longer constrained.\n\nFirst try to slide towards the direction of the gravity on the x axis\nuntil either the edge in the opposite direction of the gravity is\nunconstrained or the edge in the direction of the gravity is\nconstrained.\n\nThen try to slide towards the opposite direction of the gravity on the\nx axis until either the edge in the direction of the gravity is\nunconstrained or the edge in the opposite direction of the gravity is\nconstrained." ] const slide_x = 1 ; # [ doc = "move along the y axis until unconstrained\n\nSlide the surface along the y axis until it is no longer constrained.\n\nFirst try to slide towards the direction of the gravity on the y axis\nuntil either the edge in the opposite direction of the gravity is\nunconstrained or the edge in the direction of the gravity is\nconstrained.\n\nThen try to slide towards the opposite direction of the gravity on the\ny axis until either the edge in the direction of the gravity is\nunconstrained or the edge in the opposite direction of the gravity is\nconstrained." ] const slide_y = 2 ; # [ doc = "invert the anchor and gravity on the x axis\n\nInvert the anchor and gravity on the x axis if the surface is\nconstrained on the x axis. For example, if the left edge of the\nsurface is constrained, the gravity is 'left' and the anchor is\n'left', change the gravity to 'right' and the anchor to 'right'.\n\nIf the adjusted position also ends up being constrained, the resulting\nposition of the flip_x adjustment will be the one before the\nadjustment." ] const flip_x = 4 ; # [ doc = "invert the anchor and gravity on the y axis\n\nInvert the anchor and gravity on the y axis if the surface is\nconstrained on the y axis. For example, if the bottom edge of the\nsurface is constrained, the gravity is 'bottom' and the anchor is\n'bottom', change the gravity to 'top' and the anchor to 'top'.\n\nIf the adjusted position also ends up being constrained, the resulting\nposition of the flip_y adjustment will be the one before the\nadjustment." ] const flip_y = 8 ; # [ doc = "horizontally resize the surface\n\nResize the surface horizontally so that it is completely\nunconstrained." ] const resize_x = 16 ; # [ doc = "vertically resize the surface\n\nResize the surface vertically so that it is completely unconstrained." ] const resize_y = 32 ; } } impl constraint_adjustment { pub fn from_raw ( n : u32 ) -> Option < constraint_adjustment > { Some ( constraint_adjustment :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_positioner_v6_requests : [ wl_message ; 7 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_anchor_rect\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_anchor\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_gravity\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_constraint_adjustment\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_offset\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_positioner_v6_interface : wl_interface = wl_interface { name : b"zxdg_positioner_v6\0" as * const u8 as * const c_char , version : 1 , request_count : 7 , requests : unsafe { & zxdg_positioner_v6_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_positioner_v6_listener { } pub unsafe fn zxdg_positioner_v6_set_user_data ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_positioner_v6 as _ , user_data ) ; } pub unsafe fn zxdg_positioner_v6_get_user_data ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_positioner_v6 as _ ) ; } pub unsafe fn zxdg_positioner_v6_get_version ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_positioner_v6 as _ ) ; } pub unsafe fn zxdg_positioner_v6_add_listener ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_positioner_v6 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_positioner_v6_add_rust_listener ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , listener : & dyn zxdg_positioner_v6_listener ) -> bool { let to = ( listener as * const dyn zxdg_positioner_v6_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_positioner_v6_add_listener ( zxdg_positioner_v6 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_positioner object\n\nNotify the compositor that the xdg_positioner will no longer be used." ] pub unsafe fn zxdg_positioner_v6_destroy ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_positioner_v6 as _ ) ; } # [ doc = "set the size of the to-be positioned rectangle\n\nSet the size of the surface that is to be positioned with the positioner\nobject. The size is in surface-local coordinates and corresponds to the\nwindow geometry. See xdg_surface.set_window_geometry.\n\nIf a zero or negative size is set the invalid_input error is raised." ] pub unsafe fn zxdg_positioner_v6_set_size ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 1u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the anchor rectangle within the parent surface\n\nSpecify the anchor rectangle within the parent surface that the child\nsurface will be placed relative to. The rectangle is relative to the\nwindow geometry as defined by xdg_surface.set_window_geometry of the\nparent surface. The rectangle must be at least 1x1 large.\n\nWhen the xdg_positioner object is used to position a child surface, the\nanchor rectangle may not extend outside the window geometry of the\npositioned child's parent surface.\n\nIf a zero or negative size is set the invalid_input error is raised." ] pub unsafe fn zxdg_positioner_v6_set_anchor_rect ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 2u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set anchor rectangle anchor edges\n\nDefines a set of edges for the anchor rectangle. These are used to\nderive an anchor point that the child surface will be positioned\nrelative to. If two orthogonal edges are specified (e.g. 'top' and\n'left'), then the anchor point will be the intersection of the edges\n(e.g. the top left position of the rectangle); otherwise, the derived\nanchor point will be centered on the specified edge, or in the center of\nthe anchor rectangle if no edge is specified.\n\nIf two parallel anchor edges are specified (e.g. 'left' and 'right'),\nthe invalid_input error is raised." ] pub unsafe fn zxdg_positioner_v6_set_anchor ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , anchor : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 3u32 , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set child surface gravity\n\nDefines in what direction a surface should be positioned, relative to\nthe anchor point of the parent surface. If two orthogonal gravities are\nspecified (e.g. 'bottom' and 'right'), then the child surface will be\nplaced in the specified direction; otherwise, the child surface will be\ncentered over the anchor point on any axis that had no gravity\nspecified.\n\nIf two parallel gravities are specified (e.g. 'left' and 'right'), the\ninvalid_input error is raised." ] pub unsafe fn zxdg_positioner_v6_set_gravity ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , gravity : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 4u32 , gravity , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the adjustment to be done when constrained\n\nSpecify how the window should be positioned if the originally intended\nposition caused the surface to be constrained, meaning at least\npartially outside positioning boundaries set by the compositor. The\nadjustment is set by constructing a bitmask describing the adjustment to\nbe made when the surface is constrained on that axis.\n\nIf no bit for one axis is set, the compositor will assume that the child\nsurface should not change its position on that axis when constrained.\n\nIf more than one bit for one axis is set, the order of how adjustments\nare applied is specified in the corresponding adjustment descriptions.\n\nThe default adjustment is none." ] pub unsafe fn zxdg_positioner_v6_set_constraint_adjustment ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , constraint_adjustment : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 5u32 , constraint_adjustment , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface position offset\n\nSpecify the surface position offset relative to the position of the\nanchor on the anchor rectangle and the anchor on the surface. For\nexample if the anchor of the anchor rectangle is at (x, y), the surface\nhas the gravity bottom|right, and the offset is (ox, oy), the calculated\nsurface position will be (x + ox, y + oy). The offset position of the\nsurface is the one used for constraint testing. See\nset_constraint_adjustment.\n\nAn example use case is placing a popup menu on top of a user interface\nelement, while aligning the user interface element of the parent surface\nwith some user interface element placed somewhere in the popup surface." ] pub unsafe fn zxdg_positioner_v6_set_offset ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 6u32 , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "desktop user interface surface base interface\n\nAn interface that may be implemented by a wl_surface, for\nimplementations that provide a desktop-style user interface.\n\nIt provides a base set of functionality required to construct user\ninterface elements requiring management by the compositor, such as\ntoplevel windows, menus, etc. The types of functionality are split into\nxdg_surface roles.\n\nCreating an xdg_surface does not set the role for a wl_surface. In order\nto map an xdg_surface, the client must create a role-specific object\nusing, e.g., get_toplevel, get_popup. The wl_surface for any given\nxdg_surface can have at most one role, and may not be assigned any role\nnot based on xdg_surface.\n\nA role must be assigned before any other requests are made to the\nxdg_surface object.\n\nThe client must call wl_surface.commit on the corresponding wl_surface\nfor the xdg_surface state to take effect.\n\nCreating an xdg_surface from a wl_surface which has a buffer attached or\ncommitted is a client error, and any attempts by a client to attach or\nmanipulate a buffer prior to the first xdg_surface.configure call must\nalso be treated as errors.\n\nFor a surface to be mapped by the compositor, the following conditions\nmust be met: (1) the client has assigned an xdg_surface based role to the\nsurface, (2) the client has set and committed the xdg_surface state and\nthe role dependent state to the surface and (3) the client has committed a\nbuffer to the surface." ] pub mod zxdg_surface_v6 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_surface_v6 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { not_constructed = 1 , already_constructed = 2 , unconfigured_buffer = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 1 => Some ( error :: not_constructed ) , 2 => Some ( error :: already_constructed ) , 3 => Some ( error :: unconfigured_buffer ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zxdg_surface_v6_requests_get_toplevel_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6_interface as * const wl_interface } , ] ; static mut zxdg_surface_v6_requests_get_popup_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: zxdg_popup_v6 :: zxdg_popup_v6_interface as * const wl_interface } , unsafe { & super :: zxdg_surface_v6 :: zxdg_surface_v6_interface as * const wl_interface } , unsafe { & super :: zxdg_positioner_v6 :: zxdg_positioner_v6_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_surface_v6_requests : [ wl_message ; 5 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_toplevel\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zxdg_surface_v6_requests_get_toplevel_types as * const _ } , } , wl_message { name : b"get_popup\0" as * const u8 as * const c_char , signature : b"noo\0" as * const u8 as * const c_char , types : unsafe { & zxdg_surface_v6_requests_get_popup_types as * const _ } , } , wl_message { name : b"set_window_geometry\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"ack_configure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_surface_v6_events : [ wl_message ; 1 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_surface_v6_interface : wl_interface = wl_interface { name : b"zxdg_surface_v6\0" as * const u8 as * const c_char , version : 1 , request_count : 5 , requests : unsafe { & zxdg_surface_v6_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_surface_v6_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_surface_v6_listener { # [ doc = "suggest a surface change\n\nThe configure event marks the end of a configure sequence. A configure\nsequence is a set of one or more events configuring the state of the\nxdg_surface, including the final xdg_surface.configure event.\n\nWhere applicable, xdg_surface surface roles will during a configure\nsequence extend this event as a latched state sent as events before the\nxdg_surface.configure event. Such events should be considered to make up\na set of atomically applied configuration states, where the\nxdg_surface.configure commits the accumulated state.\n\nClients should arrange their surface for the new states, and then send\nan ack_configure request with the serial sent in this configure event at\nsome point before committing the new surface.\n\nIf the client receives multiple configure events before it can respond\nto one, it is free to discard all but the last event it received." ] fn configure ( & mut self , object : * mut zxdg_surface_v6 , serial : u32 ) { } } pub unsafe fn zxdg_surface_v6_set_user_data ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_surface_v6 as _ , user_data ) ; } pub unsafe fn zxdg_surface_v6_get_user_data ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_surface_v6 as _ ) ; } pub unsafe fn zxdg_surface_v6_get_version ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_surface_v6 as _ ) ; } pub unsafe fn zxdg_surface_v6_add_listener ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_surface_v6 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_surface_v6_add_rust_listener ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , listener : & dyn zxdg_surface_v6_listener ) -> bool { let to = ( listener as * const dyn zxdg_surface_v6_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_surface_v6_add_listener ( zxdg_surface_v6 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_surface\n\nDestroy the xdg_surface object. An xdg_surface must only be destroyed\nafter its role object has been destroyed." ] pub unsafe fn zxdg_surface_v6_destroy ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_surface_v6 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_surface_v6 as _ ) ; } # [ doc = "assign the xdg_toplevel surface role\n\nThis creates an xdg_toplevel object for the given xdg_surface and gives\nthe associated wl_surface the xdg_toplevel role.\n\nSee the documentation of xdg_toplevel for more details about what an\nxdg_toplevel is and how it is used." ] pub unsafe fn zxdg_surface_v6_get_toplevel ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 ) -> * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_surface_v6 as _ , 1u32 , & super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "assign the xdg_popup surface role\n\nThis creates an xdg_popup object for the given xdg_surface and gives the\nassociated wl_surface the xdg_popup role.\n\nSee the documentation of xdg_popup for more details about what an\nxdg_popup is and how it is used." ] pub unsafe fn zxdg_surface_v6_get_popup ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , parent : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , positioner : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 ) -> * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_surface_v6 as _ , 2u32 , & super :: zxdg_popup_v6 :: zxdg_popup_v6_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , parent , positioner ) ; return r as _ ; } # [ doc = "set the new window geometry\n\nThe window geometry of a surface is its \"visible bounds\" from the\nuser's perspective. Client-side decorations often have invisible\nportions like drop-shadows which should be ignored for the\npurposes of aligning, placing and constraining windows.\n\nThe window geometry is double buffered, and will be applied at the\ntime wl_surface.commit of the corresponding wl_surface is called.\n\nOnce the window geometry of the surface is set, it is not possible to\nunset it, and it will remain the same until set_window_geometry is\ncalled again, even if a new subsurface or buffer is attached.\n\nIf never set, the value is the full bounds of the surface,\nincluding any subsurfaces. This updates dynamically on every\ncommit. This unset is meant for extremely simple clients.\n\nThe arguments are given in the surface-local coordinate space of\nthe wl_surface associated with this xdg_surface.\n\nThe width and height must be greater than zero. Setting an invalid size\nwill raise an error. When applied, the effective window geometry will be\nthe set window geometry clamped to the bounding rectangle of the\ncombined geometry of the surface of the xdg_surface and the associated\nsubsurfaces." ] pub unsafe fn zxdg_surface_v6_set_window_geometry ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_surface_v6 as _ , 3u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "ack a configure event\n\nWhen a configure event is received, if a client commits the\nsurface in response to the configure event, then the client\nmust make an ack_configure request sometime before the commit\nrequest, passing along the serial of the configure event.\n\nFor instance, for toplevel surfaces the compositor might use this\ninformation to move a surface to the top left only when the client has\ndrawn itself for the maximized or fullscreen state.\n\nIf the client receives multiple configure events before it\ncan respond to one, it only has to ack the last configure event.\n\nA client is not required to commit immediately after sending\nan ack_configure request - it may even ack_configure several times\nbefore its next surface commit.\n\nA client may send multiple ack_configure requests before committing, but\nonly the last request sent before a commit indicates which configure\nevent the client really is responding to." ] pub unsafe fn zxdg_surface_v6_ack_configure ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_surface_v6 as _ , 4u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "toplevel surface\n\nThis interface defines an xdg_surface role which allows a surface to,\namong other things, set window-like properties such as maximize,\nfullscreen, and minimize, set application-specific metadata like title and\nid, and well as trigger user interactive operations such as interactive\nresize and move." ] pub mod zxdg_toplevel_v6 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_toplevel_v6 { } # [ doc = "edge values for resizing\n\nThese values are used to indicate which edge of a surface\nis being dragged in a resize operation." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum resize_edge { none = 0 , top = 1 , bottom = 2 , left = 4 , top_left = 5 , bottom_left = 6 , right = 8 , top_right = 9 , bottom_right = 10 , # [ doc ( hidden ) ] __nonexhaustive , } impl resize_edge { pub fn from_raw ( n : u32 ) -> Option < resize_edge > { match n { 0 => Some ( resize_edge :: none ) , 1 => Some ( resize_edge :: top ) , 2 => Some ( resize_edge :: bottom ) , 4 => Some ( resize_edge :: left ) , 5 => Some ( resize_edge :: top_left ) , 6 => Some ( resize_edge :: bottom_left ) , 8 => Some ( resize_edge :: right ) , 9 => Some ( resize_edge :: top_right ) , 10 => Some ( resize_edge :: bottom_right ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "types of state on the surface\n\nThe different state values used on the surface. This is designed for\nstate values like maximized, fullscreen. It is paired with the\nconfigure event to ensure that both the client and the compositor\nsetting the state can be synchronized.\n\nStates set in this way are double-buffered. They will get applied on\nthe next commit." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum state { # [ doc = "the surface is maximized\n\nThe surface is maximized. The window geometry specified in the configure\nevent must be obeyed by the client." ] maximized = 1 , # [ doc = "the surface is fullscreen\n\nThe surface is fullscreen. The window geometry specified in the configure\nevent must be obeyed by the client." ] fullscreen = 2 , # [ doc = "the surface is being resized\n\nThe surface is being resized. The window geometry specified in the\nconfigure event is a maximum; the client cannot resize beyond it.\nClients that have aspect ratio or cell sizing configuration can use\na smaller size, however." ] resizing = 3 , # [ doc = "the surface is now activated\n\nClient window decorations should be painted as if the window is\nactive. Do not assume this means that the window actually has\nkeyboard or pointer focus." ] activated = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl state { pub fn from_raw ( n : u32 ) -> Option < state > { match n { 1 => Some ( state :: maximized ) , 2 => Some ( state :: fullscreen ) , 3 => Some ( state :: resizing ) , 4 => Some ( state :: activated ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zxdg_toplevel_v6_requests_set_parent_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6_interface as * const wl_interface } , ] ; static mut zxdg_toplevel_v6_requests_show_window_menu_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut zxdg_toplevel_v6_requests_move_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut zxdg_toplevel_v6_requests_resize_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut zxdg_toplevel_v6_requests_set_fullscreen_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_toplevel_v6_requests : [ wl_message ; 14 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & zxdg_toplevel_v6_requests_set_parent_types as * const _ } , } , wl_message { name : b"set_title\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_app_id\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"show_window_menu\0" as * const u8 as * const c_char , signature : b"ouii\0" as * const u8 as * const c_char , types : unsafe { & zxdg_toplevel_v6_requests_show_window_menu_types as * const _ } , } , wl_message { name : b"move\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & zxdg_toplevel_v6_requests_move_types as * const _ } , } , wl_message { name : b"resize\0" as * const u8 as * const c_char , signature : b"ouu\0" as * const u8 as * const c_char , types : unsafe { & zxdg_toplevel_v6_requests_resize_types as * const _ } , } , wl_message { name : b"set_max_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_min_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_maximized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unset_maximized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_fullscreen\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & zxdg_toplevel_v6_requests_set_fullscreen_types as * const _ } , } , wl_message { name : b"unset_fullscreen\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_minimized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_toplevel_v6_events : [ wl_message ; 2 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"iia\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"close\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_toplevel_v6_interface : wl_interface = wl_interface { name : b"zxdg_toplevel_v6\0" as * const u8 as * const c_char , version : 1 , request_count : 14 , requests : unsafe { & zxdg_toplevel_v6_requests as * const _ } , event_count : 2 , events : unsafe { & zxdg_toplevel_v6_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_toplevel_v6_listener { # [ doc = "suggest a surface change\n\nThis configure event asks the client to resize its toplevel surface or\nto change its state. The configured state should not be applied\nimmediately. See xdg_surface.configure for details.\n\nThe width and height arguments specify a hint to the window\nabout how its surface should be resized in window geometry\ncoordinates. See set_window_geometry.\n\nIf the width or height arguments are zero, it means the client\nshould decide its own window dimension. This may happen when the\ncompositor needs to configure the state of the surface but doesn't\nhave any information about any previous or expected dimension.\n\nThe states listed in the event specify how the width/height\narguments should be interpreted, and possibly how it should be\ndrawn.\n\nClients must send an ack_configure in response to this event. See\nxdg_surface.configure and xdg_surface.ack_configure for details." ] fn configure ( & mut self , object : * mut zxdg_toplevel_v6 , width : i32 , height : i32 , states : * mut wl_array ) { } # [ doc = "surface wants to be closed\n\nThe close event is sent by the compositor when the user\nwants the surface to be closed. This should be equivalent to\nthe user clicking the close button in client-side decorations,\nif your application has any.\n\nThis is only a request that the user intends to close the\nwindow. The client may choose to ignore this request, or show\na dialog to ask the user to save their data, etc." ] fn close ( & mut self , object : * mut zxdg_toplevel_v6 , ) { } } pub unsafe fn zxdg_toplevel_v6_set_user_data ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_toplevel_v6 as _ , user_data ) ; } pub unsafe fn zxdg_toplevel_v6_get_user_data ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_toplevel_v6 as _ ) ; } pub unsafe fn zxdg_toplevel_v6_get_version ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_toplevel_v6 as _ ) ; } pub unsafe fn zxdg_toplevel_v6_add_listener ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_toplevel_v6 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_toplevel_v6_add_rust_listener ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , listener : & dyn zxdg_toplevel_v6_listener ) -> bool { let to = ( listener as * const dyn zxdg_toplevel_v6_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_toplevel_v6_add_listener ( zxdg_toplevel_v6 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_toplevel\n\nUnmap and destroy the window. The window will be effectively\nhidden from the user's point of view, and all state like\nmaximization, fullscreen, and so on, will be lost." ] pub unsafe fn zxdg_toplevel_v6_destroy ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_toplevel_v6 as _ ) ; } # [ doc = "set the parent of this surface\n\nSet the \"parent\" of this surface. This window should be stacked\nabove a parent. The parent surface must be mapped as long as this\nsurface is mapped.\n\nParent windows should be set on dialogs, toolboxes, or other\n\"auxiliary\" surfaces, so that the parent is raised when the dialog\nis raised." ] pub unsafe fn zxdg_toplevel_v6_set_parent ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , parent : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 1u32 , parent , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface title\n\nSet a short title for the surface.\n\nThis string may be used to identify the surface in a task bar,\nwindow list, or other user interface elements provided by the\ncompositor.\n\nThe string must be encoded in UTF-8." ] pub unsafe fn zxdg_toplevel_v6_set_title ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , title : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 2u32 , title , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set application ID\n\nSet an application identifier for the surface.\n\nThe app ID identifies the general class of applications to which\nthe surface belongs. The compositor can use this to group multiple\nsurfaces together, or to determine how to launch a new application.\n\nFor D-Bus activatable applications, the app ID is used as the D-Bus\nservice name.\n\nThe compositor shell will try to group application surfaces together\nby their app ID. As a best practice, it is suggested to select app\nID's that match the basename of the application's .desktop file.\nFor example, \"org.freedesktop.FooViewer\" where the .desktop file is\n\"org.freedesktop.FooViewer.desktop\".\n\nSee the desktop-entry specification [0] for more details on\napplication identifiers and how they relate to well-known D-Bus\nnames and .desktop files.\n\n[0] http://standards.freedesktop.org/desktop-entry-spec/" ] pub unsafe fn zxdg_toplevel_v6_set_app_id ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , app_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 3u32 , app_id , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "show the window menu\n\nClients implementing client-side decorations might want to show\na context menu when right-clicking on the decorations, giving the\nuser a menu that they can use to maximize or minimize the window.\n\nThis request asks the compositor to pop up such a window menu at\nthe given position, relative to the local surface coordinates of\nthe parent surface. There are no guarantees as to what menu items\nthe window menu contains.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event." ] pub unsafe fn zxdg_toplevel_v6_show_window_menu ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 4u32 , seat , serial , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive move\n\nStart an interactive, user-driven move of the surface.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event. The passed\nserial is used to determine the type of interactive move (touch,\npointer, etc).\n\nThe server may ignore move requests depending on the state of\nthe surface (e.g. fullscreen or maximized), or if the passed serial\nis no longer valid.\n\nIf triggered, the surface will lose the focus of the device\n(wl_pointer, wl_touch, etc) used for the move. It is up to the\ncompositor to visually indicate that the move is taking place, such as\nupdating a pointer cursor, during the move. There is no guarantee\nthat the device focus will return when the move is completed." ] pub unsafe fn zxdg_toplevel_v6_move ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , seat : * mut super :: wl_seat :: wl_seat , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 5u32 , seat , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive resize\n\nStart a user-driven, interactive resize of the surface.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event. The passed\nserial is used to determine the type of interactive resize (touch,\npointer, etc).\n\nThe server may ignore resize requests depending on the state of\nthe surface (e.g. fullscreen or maximized).\n\nIf triggered, the client will receive configure events with the\n\"resize\" state enum value and the expected sizes. See the \"resize\"\nenum value for more details about what is required. The client\nmust also acknowledge configure events using \"ack_configure\". After\nthe resize is completed, the client will receive another \"configure\"\nevent without the resize state.\n\nIf triggered, the surface also will lose the focus of the device\n(wl_pointer, wl_touch, etc) used for the resize. It is up to the\ncompositor to visually indicate that the resize is taking place,\nsuch as updating a pointer cursor, during the resize. There is no\nguarantee that the device focus will return when the resize is\ncompleted.\n\nThe edges parameter specifies how the surface should be resized,\nand is one of the values of the resize_edge enum. The compositor\nmay use this information to update the surface position for\nexample when dragging the top left corner. The compositor may also\nuse this information to adapt its behavior, e.g. choose an\nappropriate cursor image." ] pub unsafe fn zxdg_toplevel_v6_resize ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , edges : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 6u32 , seat , serial , edges , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the maximum size\n\nSet a maximum size for the window.\n\nThe client can specify a maximum size so that the compositor does\nnot try to configure the window beyond this size.\n\nThe width and height arguments are in window geometry coordinates.\nSee xdg_surface.set_window_geometry.\n\nValues set in this way are double-buffered. They will get applied\non the next commit.\n\nThe compositor can use this information to allow or disallow\ndifferent states like maximize or fullscreen and draw accurate\nanimations.\n\nSimilarly, a tiling window manager may use this information to\nplace and resize client windows in a more effective way.\n\nThe client should not rely on the compositor to obey the maximum\nsize. The compositor may decide to ignore the values set by the\nclient and request a larger size.\n\nIf never set, or a value of zero in the request, means that the\nclient has no expected maximum size in the given dimension.\nAs a result, a client wishing to reset the maximum size\nto an unspecified state can use zero for width and height in the\nrequest.\n\nRequesting a maximum size to be smaller than the minimum size of\na surface is illegal and will result in a protocol error.\n\nThe width and height must be greater than or equal to zero. Using\nstrictly negative values for width and height will result in a\nprotocol error." ] pub unsafe fn zxdg_toplevel_v6_set_max_size ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 7u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the minimum size\n\nSet a minimum size for the window.\n\nThe client can specify a minimum size so that the compositor does\nnot try to configure the window below this size.\n\nThe width and height arguments are in window geometry coordinates.\nSee xdg_surface.set_window_geometry.\n\nValues set in this way are double-buffered. They will get applied\non the next commit.\n\nThe compositor can use this information to allow or disallow\ndifferent states like maximize or fullscreen and draw accurate\nanimations.\n\nSimilarly, a tiling window manager may use this information to\nplace and resize client windows in a more effective way.\n\nThe client should not rely on the compositor to obey the minimum\nsize. The compositor may decide to ignore the values set by the\nclient and request a smaller size.\n\nIf never set, or a value of zero in the request, means that the\nclient has no expected minimum size in the given dimension.\nAs a result, a client wishing to reset the minimum size\nto an unspecified state can use zero for width and height in the\nrequest.\n\nRequesting a minimum size to be larger than the maximum size of\na surface is illegal and will result in a protocol error.\n\nThe width and height must be greater than or equal to zero. Using\nstrictly negative values for width and height will result in a\nprotocol error." ] pub unsafe fn zxdg_toplevel_v6_set_min_size ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 8u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "maximize the window\n\nMaximize the surface.\n\nAfter requesting that the surface should be maximized, the compositor\nwill respond by emitting a configure event with the \"maximized\" state\nand the required window geometry. The client should then update its\ncontent, drawing it in a maximized state, i.e. without shadow or other\ndecoration outside of the window geometry. The client must also\nacknowledge the configure when committing the new content (see\nack_configure).\n\nIt is up to the compositor to decide how and where to maximize the\nsurface, for example which output and what region of the screen should\nbe used.\n\nIf the surface was already maximized, the compositor will still emit\na configure event with the \"maximized\" state." ] pub unsafe fn zxdg_toplevel_v6_set_maximized ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 9u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "unmaximize the window\n\nUnmaximize the surface.\n\nAfter requesting that the surface should be unmaximized, the compositor\nwill respond by emitting a configure event without the \"maximized\"\nstate. If available, the compositor will include the window geometry\ndimensions the window had prior to being maximized in the configure\nrequest. The client must then update its content, drawing it in a\nregular state, i.e. potentially with shadow, etc. The client must also\nacknowledge the configure when committing the new content (see\nack_configure).\n\nIt is up to the compositor to position the surface after it was\nunmaximized; usually the position the surface had before maximizing, if\napplicable.\n\nIf the surface was already not maximized, the compositor will still\nemit a configure event without the \"maximized\" state." ] pub unsafe fn zxdg_toplevel_v6_unset_maximized ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 10u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the window as fullscreen on a monitor\n\nMake the surface fullscreen.\n\nYou can specify an output that you would prefer to be fullscreen.\nIf this value is NULL, it's up to the compositor to choose which\ndisplay will be used to map this surface.\n\nIf the surface doesn't cover the whole output, the compositor will\nposition the surface in the center of the output and compensate with\nblack borders filling the rest of the output." ] pub unsafe fn zxdg_toplevel_v6_set_fullscreen ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 11u32 , output , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zxdg_toplevel_v6_unset_fullscreen ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 12u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the window as minimized\n\nRequest that the compositor minimize your surface. There is no\nway to know if the surface is currently minimized, nor is there\nany way to unset minimization on this surface.\n\nIf you are looking to throttle redrawing when minimized, please\ninstead use the wl_surface.frame event for this, as this will\nalso work with live previews on windows in Alt-Tab, Expose or\nsimilar compositor features." ] pub unsafe fn zxdg_toplevel_v6_set_minimized ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 13u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "short-lived, popup surfaces for menus\n\nA popup surface is a short-lived, temporary surface. It can be used to\nimplement for example menus, popovers, tooltips and other similar user\ninterface concepts.\n\nA popup can be made to take an explicit grab. See xdg_popup.grab for\ndetails.\n\nWhen the popup is dismissed, a popup_done event will be sent out, and at\nthe same time the surface will be unmapped. See the xdg_popup.popup_done\nevent for details.\n\nExplicitly destroying the xdg_popup object will also dismiss the popup and\nunmap the surface. Clients that want to dismiss the popup when another\nsurface of their own is clicked should dismiss the popup using the destroy\nrequest.\n\nThe parent surface must have either the xdg_toplevel or xdg_popup surface\nrole.\n\nA newly created xdg_popup will be stacked on top of all previously created\nxdg_popup surfaces associated with the same xdg_toplevel.\n\nThe parent of an xdg_popup must be mapped (see the xdg_surface\ndescription) before the xdg_popup itself.\n\nThe x and y arguments passed when creating the popup object specify\nwhere the top left of the popup should be placed, relative to the\nlocal surface coordinates of the parent surface. See\nxdg_surface.get_popup. An xdg_popup must intersect with or be at least\npartially adjacent to its parent surface.\n\nThe client must call wl_surface.commit on the corresponding wl_surface\nfor the xdg_popup state to take effect." ] pub mod zxdg_popup_v6 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_popup_v6 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "tried to grab after being mapped" ] invalid_grab = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_grab ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zxdg_popup_v6_requests_grab_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_popup_v6_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"grab\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & zxdg_popup_v6_requests_grab_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_popup_v6_events : [ wl_message ; 2 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"popup_done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_popup_v6_interface : wl_interface = wl_interface { name : b"zxdg_popup_v6\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_popup_v6_requests as * const _ } , event_count : 2 , events : unsafe { & zxdg_popup_v6_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_popup_v6_listener { # [ doc = "configure the popup surface\n\nThis event asks the popup surface to configure itself given the\nconfiguration. The configured state should not be applied immediately.\nSee xdg_surface.configure for details.\n\nThe x and y arguments represent the position the popup was placed at\ngiven the xdg_positioner rule, relative to the upper left corner of the\nwindow geometry of the parent surface." ] fn configure ( & mut self , object : * mut zxdg_popup_v6 , x : i32 , y : i32 , width : i32 , height : i32 ) { } # [ doc = "popup interaction is done\n\nThe popup_done event is sent out when a popup is dismissed by the\ncompositor. The client should destroy the xdg_popup object at this\npoint." ] fn popup_done ( & mut self , object : * mut zxdg_popup_v6 , ) { } } pub unsafe fn zxdg_popup_v6_set_user_data ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_popup_v6 as _ , user_data ) ; } pub unsafe fn zxdg_popup_v6_get_user_data ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_popup_v6 as _ ) ; } pub unsafe fn zxdg_popup_v6_get_version ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_popup_v6 as _ ) ; } pub unsafe fn zxdg_popup_v6_add_listener ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_popup_v6 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_popup_v6_add_rust_listener ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 , listener : & dyn zxdg_popup_v6_listener ) -> bool { let to = ( listener as * const dyn zxdg_popup_v6_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_popup_v6_add_listener ( zxdg_popup_v6 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "remove xdg_popup interface\n\nThis destroys the popup. Explicitly destroying the xdg_popup\nobject will also dismiss the popup, and unmap the surface.\n\nIf this xdg_popup is not the \"topmost\" popup, a protocol error\nwill be sent." ] pub unsafe fn zxdg_popup_v6_destroy ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_popup_v6 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_popup_v6 as _ ) ; } # [ doc = "make the popup take an explicit grab\n\nThis request makes the created popup take an explicit grab. An explicit\ngrab will be dismissed when the user dismisses the popup, or when the\nclient destroys the xdg_popup. This can be done by the user clicking\noutside the surface, using the keyboard, or even locking the screen\nthrough closing the lid or a timeout.\n\nIf the compositor denies the grab, the popup will be immediately\ndismissed.\n\nThis request must be used in response to some sort of user action like a\nbutton press, key press, or touch down event. The serial number of the\nevent should be passed as 'serial'.\n\nThe parent of a grabbing popup must either be an xdg_toplevel surface or\nanother xdg_popup with an explicit grab. If the parent is another\nxdg_popup it means that the popups are nested, with this popup now being\nthe topmost popup.\n\nNested popups must be destroyed in the reverse order they were created\nin, e.g. the only popup you are allowed to destroy at all times is the\ntopmost one.\n\nWhen compositors choose to dismiss a popup, they may dismiss every\nnested grabbing popup as well. When a compositor dismisses popups, it\nwill follow the same dismissing order as required from the client.\n\nThe parent of a grabbing popup must either be another xdg_popup with an\nactive explicit grab, or an xdg_popup or xdg_toplevel, if there are no\nexplicit grabs already taken.\n\nIf the topmost grabbing popup is destroyed, the grab will be returned to\nthe parent of the popup, if that parent previously had an explicit grab.\n\nIf the parent is a grabbing popup which has already been dismissed, this\npopup will be immediately dismissed. If the parent is a popup that did\nnot take an explicit grab, an error will be raised.\n\nDuring a popup grab, the client owning the grab will receive pointer\nand touch events for all their surfaces as normal (similar to an\n\"owner-events\" grab in X11 parlance), while the top most grabbing popup\nwill always have keyboard focus." ] pub unsafe fn zxdg_popup_v6_grab ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 , seat : * mut super :: wl_seat :: wl_seat , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_popup_v6 as _ , 1u32 , seat , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod presentation_time { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "timed presentation related wl_surface requests\n\nThe main feature of this interface is accurate presentation\ntiming feedback to ensure smooth video playback while maintaining\naudio/video synchronization. Some features use the concept of a\npresentation clock, which is defined in the\npresentation.clock_id event.\n\nA content update for a wl_surface is submitted by a\nwl_surface.commit request. Request 'feedback' associates with\nthe wl_surface.commit and provides feedback on the content\nupdate, particularly the final realized presentation time.\n\n\n\nWhen the final realized presentation time is available, e.g.\nafter a framebuffer flip completes, the requested\npresentation_feedback.presented events are sent. The final\npresentation time can differ from the compositor's predicted\ndisplay update time and the update's target time, especially\nwhen the compositor misses its target vertical blanking period." ] pub mod wp_presentation { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_presentation { } # [ doc = "fatal presentation errors\n\nThese fatal protocol errors may be emitted in response to\nillegal presentation requests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "invalid value in tv_nsec" ] invalid_timestamp = 0 , # [ doc = "invalid flag" ] invalid_flag = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_timestamp ) , 1 => Some ( error :: invalid_flag ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wp_presentation_requests_feedback_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wp_presentation_feedback :: wp_presentation_feedback_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_presentation_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"feedback\0" as * const u8 as * const c_char , signature : b"on\0" as * const u8 as * const c_char , types : unsafe { & wp_presentation_requests_feedback_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_presentation_events : [ wl_message ; 1 ] = [ wl_message { name : b"clock_id\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_presentation_interface : wl_interface = wl_interface { name : b"wp_presentation\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & wp_presentation_requests as * const _ } , event_count : 1 , events : unsafe { & wp_presentation_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wp_presentation_listener { # [ doc = "clock ID for timestamps\n\nThis event tells the client in which clock domain the\ncompositor interprets the timestamps used by the presentation\nextension. This clock is called the presentation clock.\n\nThe compositor sends this event when the client binds to the\npresentation interface. The presentation clock does not change\nduring the lifetime of the client connection.\n\nThe clock identifier is platform dependent. On Linux/glibc,\nthe identifier value is one of the clockid_t values accepted\nby clock_gettime(). clock_gettime() is defined by\nPOSIX.1-2001.\n\nTimestamps in this clock domain are expressed as tv_sec_hi,\ntv_sec_lo, tv_nsec triples, each component being an unsigned\n32-bit value. Whole seconds are in tv_sec which is a 64-bit\nvalue combined from tv_sec_hi and tv_sec_lo, and the\nadditional fractional part in tv_nsec as nanoseconds. Hence,\nfor valid timestamps tv_nsec must be in [0, 999999999].\n\nNote that clock_id applies only to the presentation clock,\nand implies nothing about e.g. the timestamps used in the\nWayland core protocol input events.\n\nCompositors should prefer a clock which does not jump and is\nnot slewed e.g. by NTP. The absolute value of the clock is\nirrelevant. Precision of one millisecond or better is\nrecommended. Clients must be able to query the current clock\nvalue directly, not by asking the compositor." ] fn clock_id ( & mut self , object : * mut wp_presentation , clk_id : u32 ) { } } pub unsafe fn wp_presentation_set_user_data ( wp_presentation : * mut super :: wp_presentation :: wp_presentation , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_presentation as _ , user_data ) ; } pub unsafe fn wp_presentation_get_user_data ( wp_presentation : * mut super :: wp_presentation :: wp_presentation ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_presentation as _ ) ; } pub unsafe fn wp_presentation_get_version ( wp_presentation : * mut super :: wp_presentation :: wp_presentation ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_presentation as _ ) ; } pub unsafe fn wp_presentation_add_listener ( wp_presentation : * mut super :: wp_presentation :: wp_presentation , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_presentation as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_presentation_add_rust_listener ( wp_presentation : * mut super :: wp_presentation :: wp_presentation , listener : & dyn wp_presentation_listener ) -> bool { let to = ( listener as * const dyn wp_presentation_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_presentation_add_listener ( wp_presentation as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "unbind from the presentation interface\n\nInforms the server that the client will no longer be using\nthis protocol object. Existing objects created by this object\nare not affected." ] pub unsafe fn wp_presentation_destroy ( wp_presentation : * mut super :: wp_presentation :: wp_presentation ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_presentation as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_presentation as _ ) ; } # [ doc = "request presentation feedback information\n\nRequest presentation feedback for the current content submission\non the given surface. This creates a new presentation_feedback\nobject, which will deliver the feedback information once. If\nmultiple presentation_feedback objects are created for the same\nsubmission, they will all deliver the same information.\n\nFor details on what information is returned, see the\npresentation_feedback interface." ] pub unsafe fn wp_presentation_feedback ( wp_presentation : * mut super :: wp_presentation :: wp_presentation , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: wp_presentation_feedback :: wp_presentation_feedback { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wp_presentation as _ , 1u32 , & super :: wp_presentation_feedback :: wp_presentation_feedback_interface as * const _ , surface , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "presentation time feedback event\n\nA presentation_feedback object returns an indication that a\nwl_surface content update has become visible to the user.\nOne object corresponds to one content update submission\n(wl_surface.commit). There are two possible outcomes: the\ncontent update is presented to the user, and a presentation\ntimestamp delivered; or, the user did not see the content\nupdate because it was superseded or its surface destroyed,\nand the content update is discarded.\n\nOnce a presentation_feedback object has delivered a 'presented'\nor 'discarded' event it is automatically destroyed." ] pub mod wp_presentation_feedback { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_presentation_feedback { } bitflags ! { # [ doc = "bitmask of flags in presented event\n\nThese flags provide information about how the presentation of\nthe related content update was done. The intent is to help\nclients assess the reliability of the feedback and the visual\nquality with respect to possible tearing and timings." ] pub struct kind : u32 { # [ doc = "presentation was vsync'd\n\nThe presentation was synchronized to the \"vertical retrace\" by\nthe display hardware such that tearing does not happen.\nRelying on user space scheduling is not acceptable for this\nflag. If presentation is done by a copy to the active\nfrontbuffer, then it must guarantee that tearing cannot\nhappen." ] const vsync = 1 ; # [ doc = "hardware provided the presentation timestamp\n\nThe display hardware provided measurements that the hardware\ndriver converted into a presentation timestamp. Sampling a\nclock in user space is not acceptable for this flag." ] const hw_clock = 2 ; # [ doc = "hardware signalled the start of the presentation\n\nThe display hardware signalled that it started using the new\nimage content. The opposite of this is e.g. a timer being used\nto guess when the display hardware has switched to the new\nimage content." ] const hw_completion = 4 ; # [ doc = "presentation was done zero-copy\n\nThe presentation of this update was done zero-copy. This means\nthe buffer from the client was given to display hardware as\nis, without copying it. Compositing with OpenGL counts as\ncopying, even if textured directly from the client buffer.\nPossible zero-copy cases include direct scanout of a\nfullscreen surface and a surface on a hardware overlay." ] const zero_copy = 8 ; } } impl kind { pub fn from_raw ( n : u32 ) -> Option < kind > { Some ( kind :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } static mut wp_presentation_feedback_events_sync_output_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_presentation_feedback_events : [ wl_message ; 3 ] = [ wl_message { name : b"sync_output\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wp_presentation_feedback_events_sync_output_types as * const _ } , } , wl_message { name : b"presented\0" as * const u8 as * const c_char , signature : b"uuuuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"discarded\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_presentation_feedback_interface : wl_interface = wl_interface { name : b"wp_presentation_feedback\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 3 , events : unsafe { & wp_presentation_feedback_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wp_presentation_feedback_listener { # [ doc = "presentation synchronized to this output\n\nAs presentation can be synchronized to only one output at a\ntime, this event tells which output it was. This event is only\nsent prior to the presented event.\n\nAs clients may bind to the same global wl_output multiple\ntimes, this event is sent for each bound instance that matches\nthe synchronized output. If a client has not bound to the\nright wl_output global at all, this event is not sent." ] fn sync_output ( & mut self , object : * mut wp_presentation_feedback , output : * mut super :: wl_output :: wl_output ) { } # [ doc = "the content update was displayed\n\nThe associated content update was displayed to the user at the\nindicated time (tv_sec_hi/lo, tv_nsec). For the interpretation of\nthe timestamp, see presentation.clock_id event.\n\nThe timestamp corresponds to the time when the content update\nturned into light the first time on the surface's main output.\nCompositors may approximate this from the framebuffer flip\ncompletion events from the system, and the latency of the\nphysical display path if known.\n\nThis event is preceded by all related sync_output events\ntelling which output's refresh cycle the feedback corresponds\nto, i.e. the main output for the surface. Compositors are\nrecommended to choose the output containing the largest part\nof the wl_surface, or keeping the output they previously\nchose. Having a stable presentation output association helps\nclients predict future output refreshes (vblank).\n\nThe 'refresh' argument gives the compositor's prediction of how\nmany nanoseconds after tv_sec, tv_nsec the very next output\nrefresh may occur. This is to further aid clients in\npredicting future refreshes, i.e., estimating the timestamps\ntargeting the next few vblanks. If such prediction cannot\nusefully be done, the argument is zero.\n\nIf the output does not have a constant refresh rate, explicit\nvideo mode switches excluded, then the refresh argument must\nbe zero.\n\nThe 64-bit value combined from seq_hi and seq_lo is the value\nof the output's vertical retrace counter when the content\nupdate was first scanned out to the display. This value must\nbe compatible with the definition of MSC in\nGLX_OML_sync_control specification. Note, that if the display\npath has a non-zero latency, the time instant specified by\nthis counter may differ from the timestamp's.\n\nIf the output does not have a concept of vertical retrace or a\nrefresh cycle, or the output device is self-refreshing without\na way to query the refresh count, then the arguments seq_hi\nand seq_lo must be zero." ] fn presented ( & mut self , object : * mut wp_presentation_feedback , tv_sec_hi : u32 , tv_sec_lo : u32 , tv_nsec : u32 , refresh : u32 , seq_hi : u32 , seq_lo : u32 , flags : kind ) { } # [ doc = "the content update was not displayed\n\nThe content update was never displayed to the user." ] fn discarded ( & mut self , object : * mut wp_presentation_feedback , ) { } } pub unsafe fn wp_presentation_feedback_set_user_data ( wp_presentation_feedback : * mut super :: wp_presentation_feedback :: wp_presentation_feedback , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_presentation_feedback as _ , user_data ) ; } pub unsafe fn wp_presentation_feedback_get_user_data ( wp_presentation_feedback : * mut super :: wp_presentation_feedback :: wp_presentation_feedback ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_presentation_feedback as _ ) ; } pub unsafe fn wp_presentation_feedback_get_version ( wp_presentation_feedback : * mut super :: wp_presentation_feedback :: wp_presentation_feedback ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_presentation_feedback as _ ) ; } pub unsafe fn wp_presentation_feedback_add_listener ( wp_presentation_feedback : * mut super :: wp_presentation_feedback :: wp_presentation_feedback , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_presentation_feedback as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_presentation_feedback_add_rust_listener ( wp_presentation_feedback : * mut super :: wp_presentation_feedback :: wp_presentation_feedback , listener : & dyn wp_presentation_feedback_listener ) -> bool { let to = ( listener as * const dyn wp_presentation_feedback_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_presentation_feedback_add_listener ( wp_presentation_feedback as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wp_presentation_feedback_destroy ( wp_presentation_feedback : * mut super :: wp_presentation_feedback :: wp_presentation_feedback ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_presentation_feedback as _ ) ; } } } pub mod fullscreen_shell { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Displays a single surface per output\n\nDisplays a single surface per output.\n\nThis interface provides a mechanism for a single client to display\nsimple full-screen surfaces. While there technically may be multiple\nclients bound to this interface, only one of those clients should be\nshown at a time.\n\nTo present a surface, the client uses either the present_surface or\npresent_surface_for_mode requests. Presenting a surface takes effect\non the next wl_surface.commit. See the individual requests for\ndetails about scaling and mode switches.\n\nThe client can have at most one surface per output at any time.\nRequesting a surface be presented on an output that already has a\nsurface replaces the previously presented surface. Presenting a null\nsurface removes its content and effectively disables the output.\nExactly what happens when an output is \"disabled\" is\ncompositor-specific. The same surface may be presented on multiple\noutputs simultaneously.\n\nOnce a surface is presented on an output, it stays on that output\nuntil either the client removes it or the compositor destroys the\noutput. This way, the client can update the output's contents by\nsimply attaching a new buffer." ] pub mod _wl_fullscreen_shell { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum _wl_fullscreen_shell { } # [ doc = "capabilities advertised by the compositor\n\nVarious capabilities that can be advertised by the compositor. They\nare advertised one-at-a-time when the wl_fullscreen_shell interface is\nbound. See the wl_fullscreen_shell.capability event for more details.\n\nARBITRARY_MODE:\nThis is a hint to the client that indicates that the compositor is\ncapable of setting practically any mode on its outputs. If this\ncapability is provided, wl_fullscreen_shell.present_surface_for_mode\nwill almost never fail and clients should feel free to set whatever\nmode they like. If the compositor does not advertise this, it may\nstill support some modes that are not advertised through wl_global.mode\nbut it is less likely.\n\nCURSOR_PLANE:\nThis is a hint to the client that indicates that the compositor can\nhandle a cursor surface from the client without actually compositing.\nThis may be because of a hardware cursor plane or some other mechanism.\nIf the compositor does not advertise this capability then setting\nwl_pointer.cursor may degrade performance or be ignored entirely. If\nCURSOR_PLANE is not advertised, it is recommended that the client draw\nits own cursor and set wl_pointer.cursor(NULL)." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum capability { # [ doc = "compositor is capable of almost any output mode" ] arbitrary_modes = 1 , # [ doc = "compositor has a separate cursor plane" ] cursor_plane = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { match n { 1 => Some ( capability :: arbitrary_modes ) , 2 => Some ( capability :: cursor_plane ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "different method to set the surface fullscreen\n\nHints to indicate to the compositor how to deal with a conflict\nbetween the dimensions of the surface and the dimensions of the\noutput. The compositor is free to ignore this parameter." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum present_method { # [ doc = "no preference, apply default policy" ] default = 0 , # [ doc = "center the surface on the output" ] center = 1 , # [ doc = "scale the surface, preserving aspect ratio, to the largest size that will fit on the output" ] zoom = 2 , # [ doc = "scale the surface, preserving aspect ratio, to fully fill the output cropping if needed" ] zoom_crop = 3 , # [ doc = "scale the surface to the size of the output ignoring aspect ratio" ] stretch = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl present_method { pub fn from_raw ( n : u32 ) -> Option < present_method > { match n { 0 => Some ( present_method :: default ) , 1 => Some ( present_method :: center ) , 2 => Some ( present_method :: zoom ) , 3 => Some ( present_method :: zoom_crop ) , 4 => Some ( present_method :: stretch ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "wl_fullscreen_shell error values\n\nThese errors can be emitted in response to wl_fullscreen_shell requests" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "present_method is not known" ] invalid_method = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_method ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut _wl_fullscreen_shell_requests_present_surface_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; static mut _wl_fullscreen_shell_requests_present_surface_for_mode_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , NULLPTR as * const wl_interface , unsafe { & super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut _wl_fullscreen_shell_requests : [ wl_message ; 3 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"present_surface\0" as * const u8 as * const c_char , signature : b"?ou?o\0" as * const u8 as * const c_char , types : unsafe { & _wl_fullscreen_shell_requests_present_surface_types as * const _ } , } , wl_message { name : b"present_surface_for_mode\0" as * const u8 as * const c_char , signature : b"ooin\0" as * const u8 as * const c_char , types : unsafe { & _wl_fullscreen_shell_requests_present_surface_for_mode_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut _wl_fullscreen_shell_events : [ wl_message ; 1 ] = [ wl_message { name : b"capability\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut _wl_fullscreen_shell_interface : wl_interface = wl_interface { name : b"_wl_fullscreen_shell\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & _wl_fullscreen_shell_requests as * const _ } , event_count : 1 , events : unsafe { & _wl_fullscreen_shell_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait _wl_fullscreen_shell_listener { # [ doc = "advertises a capability of the compositor\n\nAdvertises a single capability of the compositor.\n\nWhen the wl_fullscreen_shell interface is bound, this event is emitted\nonce for each capability advertised. Valid capabilities are given by\nthe wl_fullscreen_shell.capability enum. If clients want to take\nadvantage of any of these capabilities, they should use a\nwl_display.sync request immediately after binding to ensure that they\nreceive all the capability events." ] fn capability ( & mut self , object : * mut _wl_fullscreen_shell , capability : u32 ) { } } pub unsafe fn _wl_fullscreen_shell_set_user_data ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , _wl_fullscreen_shell as _ , user_data ) ; } pub unsafe fn _wl_fullscreen_shell_get_user_data ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , _wl_fullscreen_shell as _ ) ; } pub unsafe fn _wl_fullscreen_shell_get_version ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , _wl_fullscreen_shell as _ ) ; } pub unsafe fn _wl_fullscreen_shell_add_listener ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , _wl_fullscreen_shell as _ , listener as _ , data as _ ) ; } pub unsafe fn _wl_fullscreen_shell_add_rust_listener ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell , listener : & dyn _wl_fullscreen_shell_listener ) -> bool { let to = ( listener as * const dyn _wl_fullscreen_shell_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return _wl_fullscreen_shell_add_listener ( _wl_fullscreen_shell as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn _wl_fullscreen_shell_destroy ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , _wl_fullscreen_shell as _ ) ; } # [ doc = "release the wl_fullscreen_shell interface\n\nRelease the binding from the wl_fullscreen_shell interface\n\nThis destroys the server-side object and frees this binding. If\nthe client binds to wl_fullscreen_shell multiple times, it may wish\nto free some of those bindings." ] pub unsafe fn _wl_fullscreen_shell_release ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , _wl_fullscreen_shell as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , _wl_fullscreen_shell as _ ) ; } # [ doc = "present surface for display\n\nPresent a surface on the given output.\n\nIf the output is null, the compositor will present the surface on\nwhatever display (or displays) it thinks best. In particular, this\nmay replace any or all surfaces currently presented so it should\nnot be used in combination with placing surfaces on specific\noutputs.\n\nThe method parameter is a hint to the compositor for how the surface\nis to be presented. In particular, it tells the compostior how to\nhandle a size mismatch between the presented surface and the\noutput. The compositor is free to ignore this parameter.\n\nThe \"zoom\", \"zoom_crop\", and \"stretch\" methods imply a scaling\noperation on the surface. This will override any kind of output\nscaling, so the buffer_scale property of the surface is effectively\nignored." ] pub unsafe fn _wl_fullscreen_shell_present_surface ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell , surface : * mut super :: wl_surface :: wl_surface , method : u32 , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , _wl_fullscreen_shell as _ , 1u32 , surface , method , output , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "present surface for display at a particular mode\n\nPresents a surface on the given output for a particular mode.\n\nIf the current size of the output differs from that of the surface,\nthe compositor will attempt to change the size of the output to\nmatch the surface. The result of the mode-switch operation will be\nreturned via the provided wl_fullscreen_shell_mode_feedback object.\n\nIf the current output mode matches the one requested or if the\ncompositor successfully switches the mode to match the surface,\nthen the mode_successful event will be sent and the output will\ncontain the contents of the given surface. If the compositor\ncannot match the output size to the surface size, the mode_failed\nwill be sent and the output will contain the contents of the\npreviously presented surface (if any). If another surface is\npresented on the given output before either of these has a chance\nto happen, the present_cancelled event will be sent.\n\nDue to race conditions and other issues unknown to the client, no\nmode-switch operation is guaranteed to succeed. However, if the\nmode is one advertised by wl_output.mode or if the compositor\nadvertises the ARBITRARY_MODES capability, then the client should\nexpect that the mode-switch operation will usually succeed.\n\nIf the size of the presented surface changes, the resulting output\nis undefined. The compositor may attempt to change the output mode\nto compensate. However, there is no guarantee that a suitable mode\nwill be found and the client has no way to be notified of success\nor failure.\n\nThe framerate parameter specifies the desired framerate for the\noutput in mHz. The compositor is free to ignore this parameter. A\nvalue of 0 indicates that the client has no preference.\n\nIf the value of wl_output.scale differs from wl_surface.buffer_scale,\nthen the compositor may choose a mode that matches either the buffer\nsize or the surface size. In either case, the surface will fill the\noutput." ] pub unsafe fn _wl_fullscreen_shell_present_surface_for_mode ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell , surface : * mut super :: wl_surface :: wl_surface , output : * mut super :: wl_output :: wl_output , framerate : i32 ) -> * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , _wl_fullscreen_shell as _ , 2u32 , & super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback_interface as * const _ , surface , output , framerate , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } pub mod _wl_fullscreen_shell_mode_feedback { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum _wl_fullscreen_shell_mode_feedback { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut _wl_fullscreen_shell_mode_feedback_events : [ wl_message ; 3 ] = [ wl_message { name : b"mode_successful\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"mode_failed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"present_cancelled\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut _wl_fullscreen_shell_mode_feedback_interface : wl_interface = wl_interface { name : b"_wl_fullscreen_shell_mode_feedback\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 3 , events : unsafe { & _wl_fullscreen_shell_mode_feedback_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait _wl_fullscreen_shell_mode_feedback_listener { # [ doc = "mode switch succeeded\n\nThis event indicates that the attempted mode switch operation was\nsuccessful. A surface of the size requested in the mode switch\nwill fill the output without scaling.\n\nUpon receiving this event, the client should destroy the\nwl_fullscreen_shell_mode_feedback object." ] fn mode_successful ( & mut self , object : * mut _wl_fullscreen_shell_mode_feedback , ) { } # [ doc = "mode switch failed\n\nThis event indicates that the attempted mode switch operation\nfailed. This may be because the requested output mode is not\npossible or it may mean that the compositor does not want to allow it.\n\nUpon receiving this event, the client should destroy the\nwl_fullscreen_shell_mode_feedback object." ] fn mode_failed ( & mut self , object : * mut _wl_fullscreen_shell_mode_feedback , ) { } # [ doc = "mode switch cancelled\n\nThis event indicates that the attempted mode switch operation was\ncancelled. Most likely this is because the client requested a\nsecond mode switch before the first one completed.\n\nUpon receiving this event, the client should destroy the\nwl_fullscreen_shell_mode_feedback object." ] fn present_cancelled ( & mut self , object : * mut _wl_fullscreen_shell_mode_feedback , ) { } } pub unsafe fn _wl_fullscreen_shell_mode_feedback_set_user_data ( _wl_fullscreen_shell_mode_feedback : * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , _wl_fullscreen_shell_mode_feedback as _ , user_data ) ; } pub unsafe fn _wl_fullscreen_shell_mode_feedback_get_user_data ( _wl_fullscreen_shell_mode_feedback : * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , _wl_fullscreen_shell_mode_feedback as _ ) ; } pub unsafe fn _wl_fullscreen_shell_mode_feedback_get_version ( _wl_fullscreen_shell_mode_feedback : * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , _wl_fullscreen_shell_mode_feedback as _ ) ; } pub unsafe fn _wl_fullscreen_shell_mode_feedback_add_listener ( _wl_fullscreen_shell_mode_feedback : * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , _wl_fullscreen_shell_mode_feedback as _ , listener as _ , data as _ ) ; } pub unsafe fn _wl_fullscreen_shell_mode_feedback_add_rust_listener ( _wl_fullscreen_shell_mode_feedback : * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback , listener : & dyn _wl_fullscreen_shell_mode_feedback_listener ) -> bool { let to = ( listener as * const dyn _wl_fullscreen_shell_mode_feedback_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return _wl_fullscreen_shell_mode_feedback_add_listener ( _wl_fullscreen_shell_mode_feedback as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn _wl_fullscreen_shell_mode_feedback_destroy ( _wl_fullscreen_shell_mode_feedback : * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , _wl_fullscreen_shell_mode_feedback as _ ) ; } } } pub mod xdg_shell { use super :: wayland :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "create desktop-style surfaces\n\nThe xdg_wm_base interface is exposed as a global object enabling clients\nto turn their wl_surfaces into windows in a desktop environment. It\ndefines the basic functionality needed for clients and the compositor to\ncreate windows that can be dragged, resized, maximized, etc, as well as\ncreating transient windows such as popup menus." ] pub mod xdg_wm_base { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_wm_base { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc = "xdg_wm_base was destroyed before children" ] defunct_surfaces = 1 , # [ doc = "the client tried to map or destroy a non-topmost popup" ] not_the_topmost_popup = 2 , # [ doc = "the client specified an invalid popup parent surface" ] invalid_popup_parent = 3 , # [ doc = "the client provided an invalid surface state" ] invalid_surface_state = 4 , # [ doc = "the client provided an invalid positioner" ] invalid_positioner = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , 1 => Some ( error :: defunct_surfaces ) , 2 => Some ( error :: not_the_topmost_popup ) , 3 => Some ( error :: invalid_popup_parent ) , 4 => Some ( error :: invalid_surface_state ) , 5 => Some ( error :: invalid_positioner ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_wm_base_requests_create_positioner_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: xdg_positioner :: xdg_positioner_interface as * const wl_interface } , ] ; static mut xdg_wm_base_requests_get_xdg_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: xdg_surface :: xdg_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_wm_base_requests : [ wl_message ; 4 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_positioner\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & xdg_wm_base_requests_create_positioner_types as * const _ } , } , wl_message { name : b"get_xdg_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & xdg_wm_base_requests_get_xdg_surface_types as * const _ } , } , wl_message { name : b"pong\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_wm_base_events : [ wl_message ; 1 ] = [ wl_message { name : b"ping\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_wm_base_interface : wl_interface = wl_interface { name : b"xdg_wm_base\0" as * const u8 as * const c_char , version : 3 , request_count : 4 , requests : unsafe { & xdg_wm_base_requests as * const _ } , event_count : 1 , events : unsafe { & xdg_wm_base_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_wm_base_listener { # [ doc = "check if the client is alive\n\nThe ping event asks the client if it's still alive. Pass the\nserial specified in the event back to the compositor by sending\na \"pong\" request back with the specified serial. See xdg_wm_base.pong.\n\nCompositors can use this to determine if the client is still\nalive. It's unspecified what will happen if the client doesn't\nrespond to the ping request, or in what timeframe. Clients should\ntry to respond in a reasonable amount of time.\n\nA compositor is free to ping in any way it wants, but a client must\nalways respond to any xdg_wm_base object it created." ] fn ping ( & mut self , object : * mut xdg_wm_base , serial : u32 ) { } } pub unsafe fn xdg_wm_base_set_user_data ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_wm_base as _ , user_data ) ; } pub unsafe fn xdg_wm_base_get_user_data ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_wm_base as _ ) ; } pub unsafe fn xdg_wm_base_get_version ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_wm_base as _ ) ; } pub unsafe fn xdg_wm_base_add_listener ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_wm_base as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_wm_base_add_rust_listener ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base , listener : & dyn xdg_wm_base_listener ) -> bool { let to = ( listener as * const dyn xdg_wm_base_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_wm_base_add_listener ( xdg_wm_base as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy xdg_wm_base\n\nDestroy this xdg_wm_base object.\n\nDestroying a bound xdg_wm_base object while there are surfaces\nstill alive created by this xdg_wm_base object instance is illegal\nand will result in a protocol error." ] pub unsafe fn xdg_wm_base_destroy ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_wm_base as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_wm_base as _ ) ; } # [ doc = "create a positioner object\n\nCreate a positioner object. A positioner object is used to position\nsurfaces relative to some parent surface. See the interface description\nand xdg_surface.get_popup for details." ] pub unsafe fn xdg_wm_base_create_positioner ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base ) -> * mut super :: xdg_positioner :: xdg_positioner { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_wm_base as _ , 1u32 , & super :: xdg_positioner :: xdg_positioner_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "create a shell surface from a surface\n\nThis creates an xdg_surface for the given surface. While xdg_surface\nitself is not a role, the corresponding surface may only be assigned\na role extending xdg_surface, such as xdg_toplevel or xdg_popup. It is\nillegal to create an xdg_surface for a wl_surface which already has an\nassigned role and this will result in a protocol error.\n\nThis creates an xdg_surface for the given surface. An xdg_surface is\nused as basis to define a role to a given surface, such as xdg_toplevel\nor xdg_popup. It also manages functionality shared between xdg_surface\nbased surface roles.\n\nSee the documentation of xdg_surface for more details about what an\nxdg_surface is and how it is used." ] pub unsafe fn xdg_wm_base_get_xdg_surface ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: xdg_surface :: xdg_surface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_wm_base as _ , 2u32 , & super :: xdg_surface :: xdg_surface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } # [ doc = "respond to a ping event\n\nA client must respond to a ping event with a pong request or\nthe client may be deemed unresponsive. See xdg_wm_base.ping." ] pub unsafe fn xdg_wm_base_pong ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_wm_base as _ , 3u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "child surface positioner\n\nThe xdg_positioner provides a collection of rules for the placement of a\nchild surface relative to a parent surface. Rules can be defined to ensure\nthe child surface remains within the visible area's borders, and to\nspecify how the child surface changes its position, such as sliding along\nan axis, or flipping around a rectangle. These positioner-created rules are\nconstrained by the requirement that a child surface must intersect with or\nbe at least partially adjacent to its parent surface.\n\nSee the various requests for details about possible rules.\n\nAt the time of the request, the compositor makes a copy of the rules\nspecified by the xdg_positioner. Thus, after the request is complete the\nxdg_positioner object can be destroyed or reused; further changes to the\nobject will have no effect on previous usages.\n\nFor an xdg_positioner object to be considered complete, it must have a\nnon-zero size set by set_size, and a non-zero anchor rectangle set by\nset_anchor_rect. Passing an incomplete xdg_positioner object when\npositioning a surface raises an error." ] pub mod xdg_positioner { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_positioner { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "invalid input provided" ] invalid_input = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_input ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum anchor { none = 0 , top = 1 , bottom = 2 , left = 3 , right = 4 , top_left = 5 , bottom_left = 6 , top_right = 7 , bottom_right = 8 , # [ doc ( hidden ) ] __nonexhaustive , } impl anchor { pub fn from_raw ( n : u32 ) -> Option < anchor > { match n { 0 => Some ( anchor :: none ) , 1 => Some ( anchor :: top ) , 2 => Some ( anchor :: bottom ) , 3 => Some ( anchor :: left ) , 4 => Some ( anchor :: right ) , 5 => Some ( anchor :: top_left ) , 6 => Some ( anchor :: bottom_left ) , 7 => Some ( anchor :: top_right ) , 8 => Some ( anchor :: bottom_right ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum gravity { none = 0 , top = 1 , bottom = 2 , left = 3 , right = 4 , top_left = 5 , bottom_left = 6 , top_right = 7 , bottom_right = 8 , # [ doc ( hidden ) ] __nonexhaustive , } impl gravity { pub fn from_raw ( n : u32 ) -> Option < gravity > { match n { 0 => Some ( gravity :: none ) , 1 => Some ( gravity :: top ) , 2 => Some ( gravity :: bottom ) , 3 => Some ( gravity :: left ) , 4 => Some ( gravity :: right ) , 5 => Some ( gravity :: top_left ) , 6 => Some ( gravity :: bottom_left ) , 7 => Some ( gravity :: top_right ) , 8 => Some ( gravity :: bottom_right ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { # [ doc = "constraint adjustments\n\nThe constraint adjustment value define ways the compositor will adjust\nthe position of the surface, if the unadjusted position would result\nin the surface being partly constrained.\n\nWhether a surface is considered 'constrained' is left to the compositor\nto determine. For example, the surface may be partly outside the\ncompositor's defined 'work area', thus necessitating the child surface's\nposition be adjusted until it is entirely inside the work area.\n\nThe adjustments can be combined, according to a defined precedence: 1)\nFlip, 2) Slide, 3) Resize." ] pub struct constraint_adjustment : u32 { # [ doc = "don't move the child surface when constrained\n\nDon't alter the surface position even if it is constrained on some\naxis, for example partially outside the edge of an output." ] const none = 0 ; # [ doc = "move along the x axis until unconstrained\n\nSlide the surface along the x axis until it is no longer constrained.\n\nFirst try to slide towards the direction of the gravity on the x axis\nuntil either the edge in the opposite direction of the gravity is\nunconstrained or the edge in the direction of the gravity is\nconstrained.\n\nThen try to slide towards the opposite direction of the gravity on the\nx axis until either the edge in the direction of the gravity is\nunconstrained or the edge in the opposite direction of the gravity is\nconstrained." ] const slide_x = 1 ; # [ doc = "move along the y axis until unconstrained\n\nSlide the surface along the y axis until it is no longer constrained.\n\nFirst try to slide towards the direction of the gravity on the y axis\nuntil either the edge in the opposite direction of the gravity is\nunconstrained or the edge in the direction of the gravity is\nconstrained.\n\nThen try to slide towards the opposite direction of the gravity on the\ny axis until either the edge in the direction of the gravity is\nunconstrained or the edge in the opposite direction of the gravity is\nconstrained." ] const slide_y = 2 ; # [ doc = "invert the anchor and gravity on the x axis\n\nInvert the anchor and gravity on the x axis if the surface is\nconstrained on the x axis. For example, if the left edge of the\nsurface is constrained, the gravity is 'left' and the anchor is\n'left', change the gravity to 'right' and the anchor to 'right'.\n\nIf the adjusted position also ends up being constrained, the resulting\nposition of the flip_x adjustment will be the one before the\nadjustment." ] const flip_x = 4 ; # [ doc = "invert the anchor and gravity on the y axis\n\nInvert the anchor and gravity on the y axis if the surface is\nconstrained on the y axis. For example, if the bottom edge of the\nsurface is constrained, the gravity is 'bottom' and the anchor is\n'bottom', change the gravity to 'top' and the anchor to 'top'.\n\nThe adjusted position is calculated given the original anchor\nrectangle and offset, but with the new flipped anchor and gravity\nvalues.\n\nIf the adjusted position also ends up being constrained, the resulting\nposition of the flip_y adjustment will be the one before the\nadjustment." ] const flip_y = 8 ; # [ doc = "horizontally resize the surface\n\nResize the surface horizontally so that it is completely\nunconstrained." ] const resize_x = 16 ; # [ doc = "vertically resize the surface\n\nResize the surface vertically so that it is completely unconstrained." ] const resize_y = 32 ; } } impl constraint_adjustment { pub fn from_raw ( n : u32 ) -> Option < constraint_adjustment > { Some ( constraint_adjustment :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_positioner_requests : [ wl_message ; 10 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_anchor_rect\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_anchor\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_gravity\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_constraint_adjustment\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_offset\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_reactive\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent_size\0" as * const u8 as * const c_char , signature : b"3ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent_configure\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_positioner_interface : wl_interface = wl_interface { name : b"xdg_positioner\0" as * const u8 as * const c_char , version : 3 , request_count : 10 , requests : unsafe { & xdg_positioner_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_positioner_listener { } pub unsafe fn xdg_positioner_set_user_data ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_positioner as _ , user_data ) ; } pub unsafe fn xdg_positioner_get_user_data ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_positioner as _ ) ; } pub unsafe fn xdg_positioner_get_version ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_positioner as _ ) ; } pub unsafe fn xdg_positioner_add_listener ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_positioner as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_positioner_add_rust_listener ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , listener : & dyn xdg_positioner_listener ) -> bool { let to = ( listener as * const dyn xdg_positioner_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_positioner_add_listener ( xdg_positioner as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_positioner object\n\nNotify the compositor that the xdg_positioner will no longer be used." ] pub unsafe fn xdg_positioner_destroy ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_positioner as _ ) ; } # [ doc = "set the size of the to-be positioned rectangle\n\nSet the size of the surface that is to be positioned with the positioner\nobject. The size is in surface-local coordinates and corresponds to the\nwindow geometry. See xdg_surface.set_window_geometry.\n\nIf a zero or negative size is set the invalid_input error is raised." ] pub unsafe fn xdg_positioner_set_size ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 1u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the anchor rectangle within the parent surface\n\nSpecify the anchor rectangle within the parent surface that the child\nsurface will be placed relative to. The rectangle is relative to the\nwindow geometry as defined by xdg_surface.set_window_geometry of the\nparent surface.\n\nWhen the xdg_positioner object is used to position a child surface, the\nanchor rectangle may not extend outside the window geometry of the\npositioned child's parent surface.\n\nIf a negative size is set the invalid_input error is raised." ] pub unsafe fn xdg_positioner_set_anchor_rect ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 2u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set anchor rectangle anchor\n\nDefines the anchor point for the anchor rectangle. The specified anchor\nis used derive an anchor point that the child surface will be\npositioned relative to. If a corner anchor is set (e.g. 'top_left' or\n'bottom_right'), the anchor point will be at the specified corner;\notherwise, the derived anchor point will be centered on the specified\nedge, or in the center of the anchor rectangle if no edge is specified." ] pub unsafe fn xdg_positioner_set_anchor ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , anchor : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 3u32 , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set child surface gravity\n\nDefines in what direction a surface should be positioned, relative to\nthe anchor point of the parent surface. If a corner gravity is\nspecified (e.g. 'bottom_right' or 'top_left'), then the child surface\nwill be placed towards the specified gravity; otherwise, the child\nsurface will be centered over the anchor point on any axis that had no\ngravity specified." ] pub unsafe fn xdg_positioner_set_gravity ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , gravity : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 4u32 , gravity , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the adjustment to be done when constrained\n\nSpecify how the window should be positioned if the originally intended\nposition caused the surface to be constrained, meaning at least\npartially outside positioning boundaries set by the compositor. The\nadjustment is set by constructing a bitmask describing the adjustment to\nbe made when the surface is constrained on that axis.\n\nIf no bit for one axis is set, the compositor will assume that the child\nsurface should not change its position on that axis when constrained.\n\nIf more than one bit for one axis is set, the order of how adjustments\nare applied is specified in the corresponding adjustment descriptions.\n\nThe default adjustment is none." ] pub unsafe fn xdg_positioner_set_constraint_adjustment ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , constraint_adjustment : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 5u32 , constraint_adjustment , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface position offset\n\nSpecify the surface position offset relative to the position of the\nanchor on the anchor rectangle and the anchor on the surface. For\nexample if the anchor of the anchor rectangle is at (x, y), the surface\nhas the gravity bottom|right, and the offset is (ox, oy), the calculated\nsurface position will be (x + ox, y + oy). The offset position of the\nsurface is the one used for constraint testing. See\nset_constraint_adjustment.\n\nAn example use case is placing a popup menu on top of a user interface\nelement, while aligning the user interface element of the parent surface\nwith some user interface element placed somewhere in the popup surface." ] pub unsafe fn xdg_positioner_set_offset ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 6u32 , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "continuously reconstrain the surface\n\nWhen set reactive, the surface is reconstrained if the conditions used\nfor constraining changed, e.g. the parent window moved.\n\nIf the conditions changed and the popup was reconstrained, an\nxdg_popup.configure event is sent with updated geometry, followed by an\nxdg_surface.configure event." ] pub unsafe fn xdg_positioner_set_reactive ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 7u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Set the parent window geometry the compositor should use when\npositioning the popup. The compositor may use this information to\ndetermine the future state the popup should be constrained using. If\nthis doesn't match the dimension of the parent the popup is eventually\npositioned against, the behavior is undefined.\n\nThe arguments are given in the surface-local coordinate space." ] pub unsafe fn xdg_positioner_set_parent_size ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , parent_width : i32 , parent_height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 8u32 , parent_width , parent_height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set parent configure this is a response to\n\nSet the serial of an xdg_surface.configure event this positioner will be\nused in response to. The compositor may use this information together\nwith set_parent_size to determine what future state the popup should be\nconstrained using." ] pub unsafe fn xdg_positioner_set_parent_configure ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 9u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "desktop user interface surface base interface\n\nAn interface that may be implemented by a wl_surface, for\nimplementations that provide a desktop-style user interface.\n\nIt provides a base set of functionality required to construct user\ninterface elements requiring management by the compositor, such as\ntoplevel windows, menus, etc. The types of functionality are split into\nxdg_surface roles.\n\nCreating an xdg_surface does not set the role for a wl_surface. In order\nto map an xdg_surface, the client must create a role-specific object\nusing, e.g., get_toplevel, get_popup. The wl_surface for any given\nxdg_surface can have at most one role, and may not be assigned any role\nnot based on xdg_surface.\n\nA role must be assigned before any other requests are made to the\nxdg_surface object.\n\nThe client must call wl_surface.commit on the corresponding wl_surface\nfor the xdg_surface state to take effect.\n\nCreating an xdg_surface from a wl_surface which has a buffer attached or\ncommitted is a client error, and any attempts by a client to attach or\nmanipulate a buffer prior to the first xdg_surface.configure call must\nalso be treated as errors.\n\nAfter creating a role-specific object and setting it up, the client must\nperform an initial commit without any buffer attached. The compositor\nwill reply with an xdg_surface.configure event. The client must\nacknowledge it and is then allowed to attach a buffer to map the surface.\n\nMapping an xdg_surface-based role surface is defined as making it\npossible for the surface to be shown by the compositor. Note that\na mapped surface is not guaranteed to be visible once it is mapped.\n\nFor an xdg_surface to be mapped by the compositor, the following\nconditions must be met:\n(1) the client has assigned an xdg_surface-based role to the surface\n(2) the client has set and committed the xdg_surface state and the\nrole-dependent state to the surface\n(3) the client has committed a buffer to the surface\n\nA newly-unmapped surface is considered to have met condition (1) out\nof the 3 required conditions for mapping a surface if its role surface\nhas not been destroyed." ] pub mod xdg_surface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_surface { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { not_constructed = 1 , already_constructed = 2 , unconfigured_buffer = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 1 => Some ( error :: not_constructed ) , 2 => Some ( error :: already_constructed ) , 3 => Some ( error :: unconfigured_buffer ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_surface_requests_get_toplevel_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: xdg_toplevel :: xdg_toplevel_interface as * const wl_interface } , ] ; static mut xdg_surface_requests_get_popup_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: xdg_popup :: xdg_popup_interface as * const wl_interface } , unsafe { & super :: xdg_surface :: xdg_surface_interface as * const wl_interface } , unsafe { & super :: xdg_positioner :: xdg_positioner_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_surface_requests : [ wl_message ; 5 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_toplevel\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_get_toplevel_types as * const _ } , } , wl_message { name : b"get_popup\0" as * const u8 as * const c_char , signature : b"n?oo\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_get_popup_types as * const _ } , } , wl_message { name : b"set_window_geometry\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"ack_configure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_surface_events : [ wl_message ; 1 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_surface_interface : wl_interface = wl_interface { name : b"xdg_surface\0" as * const u8 as * const c_char , version : 3 , request_count : 5 , requests : unsafe { & xdg_surface_requests as * const _ } , event_count : 1 , events : unsafe { & xdg_surface_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_surface_listener { # [ doc = "suggest a surface change\n\nThe configure event marks the end of a configure sequence. A configure\nsequence is a set of one or more events configuring the state of the\nxdg_surface, including the final xdg_surface.configure event.\n\nWhere applicable, xdg_surface surface roles will during a configure\nsequence extend this event as a latched state sent as events before the\nxdg_surface.configure event. Such events should be considered to make up\na set of atomically applied configuration states, where the\nxdg_surface.configure commits the accumulated state.\n\nClients should arrange their surface for the new states, and then send\nan ack_configure request with the serial sent in this configure event at\nsome point before committing the new surface.\n\nIf the client receives multiple configure events before it can respond\nto one, it is free to discard all but the last event it received." ] fn configure ( & mut self , object : * mut xdg_surface , serial : u32 ) { } } pub unsafe fn xdg_surface_set_user_data ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_surface as _ , user_data ) ; } pub unsafe fn xdg_surface_get_user_data ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_surface as _ ) ; } pub unsafe fn xdg_surface_get_version ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_surface as _ ) ; } pub unsafe fn xdg_surface_add_listener ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_surface as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_surface_add_rust_listener ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , listener : & dyn xdg_surface_listener ) -> bool { let to = ( listener as * const dyn xdg_surface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_surface_add_listener ( xdg_surface as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_surface\n\nDestroy the xdg_surface object. An xdg_surface must only be destroyed\nafter its role object has been destroyed." ] pub unsafe fn xdg_surface_destroy ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_surface as _ ) ; } # [ doc = "assign the xdg_toplevel surface role\n\nThis creates an xdg_toplevel object for the given xdg_surface and gives\nthe associated wl_surface the xdg_toplevel role.\n\nSee the documentation of xdg_toplevel for more details about what an\nxdg_toplevel is and how it is used." ] pub unsafe fn xdg_surface_get_toplevel ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) -> * mut super :: xdg_toplevel :: xdg_toplevel { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_surface as _ , 1u32 , & super :: xdg_toplevel :: xdg_toplevel_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "assign the xdg_popup surface role\n\nThis creates an xdg_popup object for the given xdg_surface and gives\nthe associated wl_surface the xdg_popup role.\n\nIf null is passed as a parent, a parent surface must be specified using\nsome other protocol, before committing the initial state.\n\nSee the documentation of xdg_popup for more details about what an\nxdg_popup is and how it is used." ] pub unsafe fn xdg_surface_get_popup ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , parent : * mut super :: xdg_surface :: xdg_surface , positioner : * mut super :: xdg_positioner :: xdg_positioner ) -> * mut super :: xdg_popup :: xdg_popup { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_surface as _ , 2u32 , & super :: xdg_popup :: xdg_popup_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , parent , positioner ) ; return r as _ ; } # [ doc = "set the new window geometry\n\nThe window geometry of a surface is its \"visible bounds\" from the\nuser's perspective. Client-side decorations often have invisible\nportions like drop-shadows which should be ignored for the\npurposes of aligning, placing and constraining windows.\n\nThe window geometry is double buffered, and will be applied at the\ntime wl_surface.commit of the corresponding wl_surface is called.\n\nWhen maintaining a position, the compositor should treat the (x, y)\ncoordinate of the window geometry as the top left corner of the window.\nA client changing the (x, y) window geometry coordinate should in\ngeneral not alter the position of the window.\n\nOnce the window geometry of the surface is set, it is not possible to\nunset it, and it will remain the same until set_window_geometry is\ncalled again, even if a new subsurface or buffer is attached.\n\nIf never set, the value is the full bounds of the surface,\nincluding any subsurfaces. This updates dynamically on every\ncommit. This unset is meant for extremely simple clients.\n\nThe arguments are given in the surface-local coordinate space of\nthe wl_surface associated with this xdg_surface.\n\nThe width and height must be greater than zero. Setting an invalid size\nwill raise an error. When applied, the effective window geometry will be\nthe set window geometry clamped to the bounding rectangle of the\ncombined geometry of the surface of the xdg_surface and the associated\nsubsurfaces." ] pub unsafe fn xdg_surface_set_window_geometry ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 3u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "ack a configure event\n\nWhen a configure event is received, if a client commits the\nsurface in response to the configure event, then the client\nmust make an ack_configure request sometime before the commit\nrequest, passing along the serial of the configure event.\n\nFor instance, for toplevel surfaces the compositor might use this\ninformation to move a surface to the top left only when the client has\ndrawn itself for the maximized or fullscreen state.\n\nIf the client receives multiple configure events before it\ncan respond to one, it only has to ack the last configure event.\n\nA client is not required to commit immediately after sending\nan ack_configure request - it may even ack_configure several times\nbefore its next surface commit.\n\nA client may send multiple ack_configure requests before committing, but\nonly the last request sent before a commit indicates which configure\nevent the client really is responding to." ] pub unsafe fn xdg_surface_ack_configure ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 4u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "toplevel surface\n\nThis interface defines an xdg_surface role which allows a surface to,\namong other things, set window-like properties such as maximize,\nfullscreen, and minimize, set application-specific metadata like title and\nid, and well as trigger user interactive operations such as interactive\nresize and move.\n\nUnmapping an xdg_toplevel means that the surface cannot be shown\nby the compositor until it is explicitly mapped again.\nAll active operations (e.g., move, resize) are canceled and all\nattributes (e.g. title, state, stacking, ...) are discarded for\nan xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to\nthe state it had right after xdg_surface.get_toplevel. The client\ncan re-map the toplevel by perfoming a commit without any buffer\nattached, waiting for a configure event and handling it as usual (see\nxdg_surface description).\n\nAttaching a null buffer to a toplevel unmaps the surface." ] pub mod xdg_toplevel { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_toplevel { } # [ doc = "edge values for resizing\n\nThese values are used to indicate which edge of a surface\nis being dragged in a resize operation." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum resize_edge { none = 0 , top = 1 , bottom = 2 , left = 4 , top_left = 5 , bottom_left = 6 , right = 8 , top_right = 9 , bottom_right = 10 , # [ doc ( hidden ) ] __nonexhaustive , } impl resize_edge { pub fn from_raw ( n : u32 ) -> Option < resize_edge > { match n { 0 => Some ( resize_edge :: none ) , 1 => Some ( resize_edge :: top ) , 2 => Some ( resize_edge :: bottom ) , 4 => Some ( resize_edge :: left ) , 5 => Some ( resize_edge :: top_left ) , 6 => Some ( resize_edge :: bottom_left ) , 8 => Some ( resize_edge :: right ) , 9 => Some ( resize_edge :: top_right ) , 10 => Some ( resize_edge :: bottom_right ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "types of state on the surface\n\nThe different state values used on the surface. This is designed for\nstate values like maximized, fullscreen. It is paired with the\nconfigure event to ensure that both the client and the compositor\nsetting the state can be synchronized.\n\nStates set in this way are double-buffered. They will get applied on\nthe next commit." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum state { # [ doc = "the surface is maximized\n\nThe surface is maximized. The window geometry specified in the configure\nevent must be obeyed by the client.\n\nThe client should draw without shadow or other\ndecoration outside of the window geometry." ] maximized = 1 , # [ doc = "the surface is fullscreen\n\nThe surface is fullscreen. The window geometry specified in the\nconfigure event is a maximum; the client cannot resize beyond it. For\na surface to cover the whole fullscreened area, the geometry\ndimensions must be obeyed by the client. For more details, see\nxdg_toplevel.set_fullscreen." ] fullscreen = 2 , # [ doc = "the surface is being resized\n\nThe surface is being resized. The window geometry specified in the\nconfigure event is a maximum; the client cannot resize beyond it.\nClients that have aspect ratio or cell sizing configuration can use\na smaller size, however." ] resizing = 3 , # [ doc = "the surface is now activated\n\nClient window decorations should be painted as if the window is\nactive. Do not assume this means that the window actually has\nkeyboard or pointer focus." ] activated = 4 , # [ doc = "the surface is tiled\n\nThe window is currently in a tiled layout and the left edge is\nconsidered to be adjacent to another part of the tiling grid." ] tiled_left = 5 , # [ doc = "the surface is tiled\n\nThe window is currently in a tiled layout and the right edge is\nconsidered to be adjacent to another part of the tiling grid." ] tiled_right = 6 , # [ doc = "the surface is tiled\n\nThe window is currently in a tiled layout and the top edge is\nconsidered to be adjacent to another part of the tiling grid." ] tiled_top = 7 , # [ doc = "the surface is tiled\n\nThe window is currently in a tiled layout and the bottom edge is\nconsidered to be adjacent to another part of the tiling grid." ] tiled_bottom = 8 , # [ doc ( hidden ) ] __nonexhaustive , } impl state { pub fn from_raw ( n : u32 ) -> Option < state > { match n { 1 => Some ( state :: maximized ) , 2 => Some ( state :: fullscreen ) , 3 => Some ( state :: resizing ) , 4 => Some ( state :: activated ) , 5 => Some ( state :: tiled_left ) , 6 => Some ( state :: tiled_right ) , 7 => Some ( state :: tiled_top ) , 8 => Some ( state :: tiled_bottom ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_toplevel_requests_set_parent_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: xdg_toplevel :: xdg_toplevel_interface as * const wl_interface } , ] ; static mut xdg_toplevel_requests_show_window_menu_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut xdg_toplevel_requests_move_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut xdg_toplevel_requests_resize_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut xdg_toplevel_requests_set_fullscreen_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_toplevel_requests : [ wl_message ; 14 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & xdg_toplevel_requests_set_parent_types as * const _ } , } , wl_message { name : b"set_title\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_app_id\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"show_window_menu\0" as * const u8 as * const c_char , signature : b"ouii\0" as * const u8 as * const c_char , types : unsafe { & xdg_toplevel_requests_show_window_menu_types as * const _ } , } , wl_message { name : b"move\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & xdg_toplevel_requests_move_types as * const _ } , } , wl_message { name : b"resize\0" as * const u8 as * const c_char , signature : b"ouu\0" as * const u8 as * const c_char , types : unsafe { & xdg_toplevel_requests_resize_types as * const _ } , } , wl_message { name : b"set_max_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_min_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_maximized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unset_maximized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_fullscreen\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & xdg_toplevel_requests_set_fullscreen_types as * const _ } , } , wl_message { name : b"unset_fullscreen\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_minimized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_toplevel_events : [ wl_message ; 2 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"iia\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"close\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_toplevel_interface : wl_interface = wl_interface { name : b"xdg_toplevel\0" as * const u8 as * const c_char , version : 3 , request_count : 14 , requests : unsafe { & xdg_toplevel_requests as * const _ } , event_count : 2 , events : unsafe { & xdg_toplevel_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_toplevel_listener { # [ doc = "suggest a surface change\n\nThis configure event asks the client to resize its toplevel surface or\nto change its state. The configured state should not be applied\nimmediately. See xdg_surface.configure for details.\n\nThe width and height arguments specify a hint to the window\nabout how its surface should be resized in window geometry\ncoordinates. See set_window_geometry.\n\nIf the width or height arguments are zero, it means the client\nshould decide its own window dimension. This may happen when the\ncompositor needs to configure the state of the surface but doesn't\nhave any information about any previous or expected dimension.\n\nThe states listed in the event specify how the width/height\narguments should be interpreted, and possibly how it should be\ndrawn.\n\nClients must send an ack_configure in response to this event. See\nxdg_surface.configure and xdg_surface.ack_configure for details." ] fn configure ( & mut self , object : * mut xdg_toplevel , width : i32 , height : i32 , states : * mut wl_array ) { } # [ doc = "surface wants to be closed\n\nThe close event is sent by the compositor when the user\nwants the surface to be closed. This should be equivalent to\nthe user clicking the close button in client-side decorations,\nif your application has any.\n\nThis is only a request that the user intends to close the\nwindow. The client may choose to ignore this request, or show\na dialog to ask the user to save their data, etc." ] fn close ( & mut self , object : * mut xdg_toplevel , ) { } } pub unsafe fn xdg_toplevel_set_user_data ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_toplevel as _ , user_data ) ; } pub unsafe fn xdg_toplevel_get_user_data ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_toplevel as _ ) ; } pub unsafe fn xdg_toplevel_get_version ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_toplevel as _ ) ; } pub unsafe fn xdg_toplevel_add_listener ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_toplevel as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_toplevel_add_rust_listener ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , listener : & dyn xdg_toplevel_listener ) -> bool { let to = ( listener as * const dyn xdg_toplevel_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_toplevel_add_listener ( xdg_toplevel as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_toplevel\n\nThis request destroys the role surface and unmaps the surface;\nsee \"Unmapping\" behavior in interface section for details." ] pub unsafe fn xdg_toplevel_destroy ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_toplevel as _ ) ; } # [ doc = "set the parent of this surface\n\nSet the \"parent\" of this surface. This surface should be stacked\nabove the parent surface and all other ancestor surfaces.\n\nParent windows should be set on dialogs, toolboxes, or other\n\"auxiliary\" surfaces, so that the parent is raised when the dialog\nis raised.\n\nSetting a null parent for a child window removes any parent-child\nrelationship for the child. Setting a null parent for a window which\ncurrently has no parent is a no-op.\n\nIf the parent is unmapped then its children are managed as\nthough the parent of the now-unmapped parent has become the\nparent of this surface. If no parent exists for the now-unmapped\nparent then the children are managed as though they have no\nparent surface." ] pub unsafe fn xdg_toplevel_set_parent ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , parent : * mut super :: xdg_toplevel :: xdg_toplevel ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 1u32 , parent , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface title\n\nSet a short title for the surface.\n\nThis string may be used to identify the surface in a task bar,\nwindow list, or other user interface elements provided by the\ncompositor.\n\nThe string must be encoded in UTF-8." ] pub unsafe fn xdg_toplevel_set_title ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , title : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 2u32 , title , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set application ID\n\nSet an application identifier for the surface.\n\nThe app ID identifies the general class of applications to which\nthe surface belongs. The compositor can use this to group multiple\nsurfaces together, or to determine how to launch a new application.\n\nFor D-Bus activatable applications, the app ID is used as the D-Bus\nservice name.\n\nThe compositor shell will try to group application surfaces together\nby their app ID. As a best practice, it is suggested to select app\nID's that match the basename of the application's .desktop file.\nFor example, \"org.freedesktop.FooViewer\" where the .desktop file is\n\"org.freedesktop.FooViewer.desktop\".\n\nLike other properties, a set_app_id request can be sent after the\nxdg_toplevel has been mapped to update the property.\n\nSee the desktop-entry specification [0] for more details on\napplication identifiers and how they relate to well-known D-Bus\nnames and .desktop files.\n\n[0] http://standards.freedesktop.org/desktop-entry-spec/" ] pub unsafe fn xdg_toplevel_set_app_id ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , app_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 3u32 , app_id , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "show the window menu\n\nClients implementing client-side decorations might want to show\na context menu when right-clicking on the decorations, giving the\nuser a menu that they can use to maximize or minimize the window.\n\nThis request asks the compositor to pop up such a window menu at\nthe given position, relative to the local surface coordinates of\nthe parent surface. There are no guarantees as to what menu items\nthe window menu contains.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event." ] pub unsafe fn xdg_toplevel_show_window_menu ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 4u32 , seat , serial , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive move\n\nStart an interactive, user-driven move of the surface.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event. The passed\nserial is used to determine the type of interactive move (touch,\npointer, etc).\n\nThe server may ignore move requests depending on the state of\nthe surface (e.g. fullscreen or maximized), or if the passed serial\nis no longer valid.\n\nIf triggered, the surface will lose the focus of the device\n(wl_pointer, wl_touch, etc) used for the move. It is up to the\ncompositor to visually indicate that the move is taking place, such as\nupdating a pointer cursor, during the move. There is no guarantee\nthat the device focus will return when the move is completed." ] pub unsafe fn xdg_toplevel_move ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , seat : * mut super :: wl_seat :: wl_seat , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 5u32 , seat , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive resize\n\nStart a user-driven, interactive resize of the surface.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event. The passed\nserial is used to determine the type of interactive resize (touch,\npointer, etc).\n\nThe server may ignore resize requests depending on the state of\nthe surface (e.g. fullscreen or maximized).\n\nIf triggered, the client will receive configure events with the\n\"resize\" state enum value and the expected sizes. See the \"resize\"\nenum value for more details about what is required. The client\nmust also acknowledge configure events using \"ack_configure\". After\nthe resize is completed, the client will receive another \"configure\"\nevent without the resize state.\n\nIf triggered, the surface also will lose the focus of the device\n(wl_pointer, wl_touch, etc) used for the resize. It is up to the\ncompositor to visually indicate that the resize is taking place,\nsuch as updating a pointer cursor, during the resize. There is no\nguarantee that the device focus will return when the resize is\ncompleted.\n\nThe edges parameter specifies how the surface should be resized,\nand is one of the values of the resize_edge enum. The compositor\nmay use this information to update the surface position for\nexample when dragging the top left corner. The compositor may also\nuse this information to adapt its behavior, e.g. choose an\nappropriate cursor image." ] pub unsafe fn xdg_toplevel_resize ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , edges : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 6u32 , seat , serial , edges , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the maximum size\n\nSet a maximum size for the window.\n\nThe client can specify a maximum size so that the compositor does\nnot try to configure the window beyond this size.\n\nThe width and height arguments are in window geometry coordinates.\nSee xdg_surface.set_window_geometry.\n\nValues set in this way are double-buffered. They will get applied\non the next commit.\n\nThe compositor can use this information to allow or disallow\ndifferent states like maximize or fullscreen and draw accurate\nanimations.\n\nSimilarly, a tiling window manager may use this information to\nplace and resize client windows in a more effective way.\n\nThe client should not rely on the compositor to obey the maximum\nsize. The compositor may decide to ignore the values set by the\nclient and request a larger size.\n\nIf never set, or a value of zero in the request, means that the\nclient has no expected maximum size in the given dimension.\nAs a result, a client wishing to reset the maximum size\nto an unspecified state can use zero for width and height in the\nrequest.\n\nRequesting a maximum size to be smaller than the minimum size of\na surface is illegal and will result in a protocol error.\n\nThe width and height must be greater than or equal to zero. Using\nstrictly negative values for width and height will result in a\nprotocol error." ] pub unsafe fn xdg_toplevel_set_max_size ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 7u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the minimum size\n\nSet a minimum size for the window.\n\nThe client can specify a minimum size so that the compositor does\nnot try to configure the window below this size.\n\nThe width and height arguments are in window geometry coordinates.\nSee xdg_surface.set_window_geometry.\n\nValues set in this way are double-buffered. They will get applied\non the next commit.\n\nThe compositor can use this information to allow or disallow\ndifferent states like maximize or fullscreen and draw accurate\nanimations.\n\nSimilarly, a tiling window manager may use this information to\nplace and resize client windows in a more effective way.\n\nThe client should not rely on the compositor to obey the minimum\nsize. The compositor may decide to ignore the values set by the\nclient and request a smaller size.\n\nIf never set, or a value of zero in the request, means that the\nclient has no expected minimum size in the given dimension.\nAs a result, a client wishing to reset the minimum size\nto an unspecified state can use zero for width and height in the\nrequest.\n\nRequesting a minimum size to be larger than the maximum size of\na surface is illegal and will result in a protocol error.\n\nThe width and height must be greater than or equal to zero. Using\nstrictly negative values for width and height will result in a\nprotocol error." ] pub unsafe fn xdg_toplevel_set_min_size ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 8u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "maximize the window\n\nMaximize the surface.\n\nAfter requesting that the surface should be maximized, the compositor\nwill respond by emitting a configure event. Whether this configure\nactually sets the window maximized is subject to compositor policies.\nThe client must then update its content, drawing in the configured\nstate. The client must also acknowledge the configure when committing\nthe new content (see ack_configure).\n\nIt is up to the compositor to decide how and where to maximize the\nsurface, for example which output and what region of the screen should\nbe used.\n\nIf the surface was already maximized, the compositor will still emit\na configure event with the \"maximized\" state.\n\nIf the surface is in a fullscreen state, this request has no direct\neffect. It may alter the state the surface is returned to when\nunmaximized unless overridden by the compositor." ] pub unsafe fn xdg_toplevel_set_maximized ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 9u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "unmaximize the window\n\nUnmaximize the surface.\n\nAfter requesting that the surface should be unmaximized, the compositor\nwill respond by emitting a configure event. Whether this actually\nun-maximizes the window is subject to compositor policies.\nIf available and applicable, the compositor will include the window\ngeometry dimensions the window had prior to being maximized in the\nconfigure event. The client must then update its content, drawing it in\nthe configured state. The client must also acknowledge the configure\nwhen committing the new content (see ack_configure).\n\nIt is up to the compositor to position the surface after it was\nunmaximized; usually the position the surface had before maximizing, if\napplicable.\n\nIf the surface was already not maximized, the compositor will still\nemit a configure event without the \"maximized\" state.\n\nIf the surface is in a fullscreen state, this request has no direct\neffect. It may alter the state the surface is returned to when\nunmaximized unless overridden by the compositor." ] pub unsafe fn xdg_toplevel_unset_maximized ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 10u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the window as fullscreen on an output\n\nMake the surface fullscreen.\n\nAfter requesting that the surface should be fullscreened, the\ncompositor will respond by emitting a configure event. Whether the\nclient is actually put into a fullscreen state is subject to compositor\npolicies. The client must also acknowledge the configure when\ncommitting the new content (see ack_configure).\n\nThe output passed by the request indicates the client's preference as\nto which display it should be set fullscreen on. If this value is NULL,\nit's up to the compositor to choose which display will be used to map\nthis surface.\n\nIf the surface doesn't cover the whole output, the compositor will\nposition the surface in the center of the output and compensate with\nwith border fill covering the rest of the output. The content of the\nborder fill is undefined, but should be assumed to be in some way that\nattempts to blend into the surrounding area (e.g. solid black).\n\nIf the fullscreened surface is not opaque, the compositor must make\nsure that other screen content not part of the same surface tree (made\nup of subsurfaces, popups or similarly coupled surfaces) are not\nvisible below the fullscreened surface." ] pub unsafe fn xdg_toplevel_set_fullscreen ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 11u32 , output , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "unset the window as fullscreen\n\nMake the surface no longer fullscreen.\n\nAfter requesting that the surface should be unfullscreened, the\ncompositor will respond by emitting a configure event.\nWhether this actually removes the fullscreen state of the client is\nsubject to compositor policies.\n\nMaking a surface unfullscreen sets states for the surface based on the following:\n* the state(s) it may have had before becoming fullscreen\n* any state(s) decided by the compositor\n* any state(s) requested by the client while the surface was fullscreen\n\nThe compositor may include the previous window geometry dimensions in\nthe configure event, if applicable.\n\nThe client must also acknowledge the configure when committing the new\ncontent (see ack_configure)." ] pub unsafe fn xdg_toplevel_unset_fullscreen ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 12u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the window as minimized\n\nRequest that the compositor minimize your surface. There is no\nway to know if the surface is currently minimized, nor is there\nany way to unset minimization on this surface.\n\nIf you are looking to throttle redrawing when minimized, please\ninstead use the wl_surface.frame event for this, as this will\nalso work with live previews on windows in Alt-Tab, Expose or\nsimilar compositor features." ] pub unsafe fn xdg_toplevel_set_minimized ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 13u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "short-lived, popup surfaces for menus\n\nA popup surface is a short-lived, temporary surface. It can be used to\nimplement for example menus, popovers, tooltips and other similar user\ninterface concepts.\n\nA popup can be made to take an explicit grab. See xdg_popup.grab for\ndetails.\n\nWhen the popup is dismissed, a popup_done event will be sent out, and at\nthe same time the surface will be unmapped. See the xdg_popup.popup_done\nevent for details.\n\nExplicitly destroying the xdg_popup object will also dismiss the popup and\nunmap the surface. Clients that want to dismiss the popup when another\nsurface of their own is clicked should dismiss the popup using the destroy\nrequest.\n\nA newly created xdg_popup will be stacked on top of all previously created\nxdg_popup surfaces associated with the same xdg_toplevel.\n\nThe parent of an xdg_popup must be mapped (see the xdg_surface\ndescription) before the xdg_popup itself.\n\nThe client must call wl_surface.commit on the corresponding wl_surface\nfor the xdg_popup state to take effect." ] pub mod xdg_popup { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_popup { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "tried to grab after being mapped" ] invalid_grab = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_grab ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_popup_requests_grab_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut xdg_popup_requests_reposition_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: xdg_positioner :: xdg_positioner_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_popup_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"grab\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & xdg_popup_requests_grab_types as * const _ } , } , wl_message { name : b"reposition\0" as * const u8 as * const c_char , signature : b"3ou\0" as * const u8 as * const c_char , types : unsafe { & xdg_popup_requests_reposition_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_popup_events : [ wl_message ; 3 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"popup_done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"repositioned\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_popup_interface : wl_interface = wl_interface { name : b"xdg_popup\0" as * const u8 as * const c_char , version : 3 , request_count : 3 , requests : unsafe { & xdg_popup_requests as * const _ } , event_count : 3 , events : unsafe { & xdg_popup_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_popup_listener { # [ doc = "configure the popup surface\n\nThis event asks the popup surface to configure itself given the\nconfiguration. The configured state should not be applied immediately.\nSee xdg_surface.configure for details.\n\nThe x and y arguments represent the position the popup was placed at\ngiven the xdg_positioner rule, relative to the upper left corner of the\nwindow geometry of the parent surface.\n\nFor version 2 or older, the configure event for an xdg_popup is only\never sent once for the initial configuration. Starting with version 3,\nit may be sent again if the popup is setup with an xdg_positioner with\nset_reactive requested, or in response to xdg_popup.reposition requests." ] fn configure ( & mut self , object : * mut xdg_popup , x : i32 , y : i32 , width : i32 , height : i32 ) { } # [ doc = "popup interaction is done\n\nThe popup_done event is sent out when a popup is dismissed by the\ncompositor. The client should destroy the xdg_popup object at this\npoint." ] fn popup_done ( & mut self , object : * mut xdg_popup , ) { } # [ doc = "signal the completion of a repositioned request\n\nThe repositioned event is sent as part of a popup configuration\nsequence, together with xdg_popup.configure and lastly\nxdg_surface.configure to notify the completion of a reposition request.\n\nThe repositioned event is to notify about the completion of a\nxdg_popup.reposition request. The token argument is the token passed\nin the xdg_popup.reposition request.\n\nImmediately after this event is emitted, xdg_popup.configure and\nxdg_surface.configure will be sent with the updated size and position,\nas well as a new configure serial.\n\nThe client should optionally update the content of the popup, but must\nacknowledge the new popup configuration for the new position to take\neffect. See xdg_surface.ack_configure for details.\n\nOnly available since version 3 of the interface." ] fn repositioned ( & mut self , object : * mut xdg_popup , token : u32 ) { } } pub unsafe fn xdg_popup_set_user_data ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_popup as _ , user_data ) ; } pub unsafe fn xdg_popup_get_user_data ( xdg_popup : * mut super :: xdg_popup :: xdg_popup ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_popup as _ ) ; } pub unsafe fn xdg_popup_get_version ( xdg_popup : * mut super :: xdg_popup :: xdg_popup ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_popup as _ ) ; } pub unsafe fn xdg_popup_add_listener ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_popup as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_popup_add_rust_listener ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , listener : & dyn xdg_popup_listener ) -> bool { let to = ( listener as * const dyn xdg_popup_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_popup_add_listener ( xdg_popup as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "remove xdg_popup interface\n\nThis destroys the popup. Explicitly destroying the xdg_popup\nobject will also dismiss the popup, and unmap the surface.\n\nIf this xdg_popup is not the \"topmost\" popup, a protocol error\nwill be sent." ] pub unsafe fn xdg_popup_destroy ( xdg_popup : * mut super :: xdg_popup :: xdg_popup ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_popup as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_popup as _ ) ; } # [ doc = "make the popup take an explicit grab\n\nThis request makes the created popup take an explicit grab. An explicit\ngrab will be dismissed when the user dismisses the popup, or when the\nclient destroys the xdg_popup. This can be done by the user clicking\noutside the surface, using the keyboard, or even locking the screen\nthrough closing the lid or a timeout.\n\nIf the compositor denies the grab, the popup will be immediately\ndismissed.\n\nThis request must be used in response to some sort of user action like a\nbutton press, key press, or touch down event. The serial number of the\nevent should be passed as 'serial'.\n\nThe parent of a grabbing popup must either be an xdg_toplevel surface or\nanother xdg_popup with an explicit grab. If the parent is another\nxdg_popup it means that the popups are nested, with this popup now being\nthe topmost popup.\n\nNested popups must be destroyed in the reverse order they were created\nin, e.g. the only popup you are allowed to destroy at all times is the\ntopmost one.\n\nWhen compositors choose to dismiss a popup, they may dismiss every\nnested grabbing popup as well. When a compositor dismisses popups, it\nwill follow the same dismissing order as required from the client.\n\nThe parent of a grabbing popup must either be another xdg_popup with an\nactive explicit grab, or an xdg_popup or xdg_toplevel, if there are no\nexplicit grabs already taken.\n\nIf the topmost grabbing popup is destroyed, the grab will be returned to\nthe parent of the popup, if that parent previously had an explicit grab.\n\nIf the parent is a grabbing popup which has already been dismissed, this\npopup will be immediately dismissed. If the parent is a popup that did\nnot take an explicit grab, an error will be raised.\n\nDuring a popup grab, the client owning the grab will receive pointer\nand touch events for all their surfaces as normal (similar to an\n\"owner-events\" grab in X11 parlance), while the top most grabbing popup\nwill always have keyboard focus." ] pub unsafe fn xdg_popup_grab ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , seat : * mut super :: wl_seat :: wl_seat , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_popup as _ , 1u32 , seat , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "recalculate the popup's location\n\nReposition an already-mapped popup. The popup will be placed given the\ndetails in the passed xdg_positioner object, and a\nxdg_popup.repositioned followed by xdg_popup.configure and\nxdg_surface.configure will be emitted in response. Any parameters set\nby the previous positioner will be discarded.\n\nThe passed token will be sent in the corresponding\nxdg_popup.repositioned event. The new popup position will not take\neffect until the corresponding configure event is acknowledged by the\nclient. See xdg_popup.repositioned for details. The token itself is\nopaque, and has no other special meaning.\n\nIf multiple reposition requests are sent, the compositor may skip all\nbut the last one.\n\nIf the popup is repositioned in response to a configure event for its\nparent, the client should send an xdg_positioner.set_parent_configure\nand possibly an xdg_positioner.set_parent_size request to allow the\ncompositor to properly constrain the popup.\n\nIf the popup is repositioned together with a parent that is being\nresized, but not in response to a configure event, the client should\nsend an xdg_positioner.set_parent_size request." ] pub unsafe fn xdg_popup_reposition ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , positioner : * mut super :: xdg_positioner :: xdg_positioner , token : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_popup as _ , 2u32 , positioner , token , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod xdg_activation_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "interface for activating surfaces\n\nA global interface used for informing the compositor about applications\nbeing activated or started, or for applications to request to be\nactivated." ] pub mod xdg_activation_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_activation_v1 { } static mut xdg_activation_v1_requests_get_activation_token_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: xdg_activation_token_v1 :: xdg_activation_token_v1_interface as * const wl_interface } , ] ; static mut xdg_activation_v1_requests_activate_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_activation_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_activation_token\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & xdg_activation_v1_requests_get_activation_token_types as * const _ } , } , wl_message { name : b"activate\0" as * const u8 as * const c_char , signature : b"so\0" as * const u8 as * const c_char , types : unsafe { & xdg_activation_v1_requests_activate_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_activation_v1_interface : wl_interface = wl_interface { name : b"xdg_activation_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & xdg_activation_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_activation_v1_listener { } pub unsafe fn xdg_activation_v1_set_user_data ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_activation_v1 as _ , user_data ) ; } pub unsafe fn xdg_activation_v1_get_user_data ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_activation_v1 as _ ) ; } pub unsafe fn xdg_activation_v1_get_version ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_activation_v1 as _ ) ; } pub unsafe fn xdg_activation_v1_add_listener ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_activation_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_activation_v1_add_rust_listener ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 , listener : & dyn xdg_activation_v1_listener ) -> bool { let to = ( listener as * const dyn xdg_activation_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_activation_v1_add_listener ( xdg_activation_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_activation object\n\nNotify the compositor that the xdg_activation object will no longer be\nused.\n\nThe child objects created via this interface are unaffected and should\nbe destroyed separately." ] pub unsafe fn xdg_activation_v1_destroy ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_activation_v1 as _ ) ; } # [ doc = "requests a token\n\nCreates an xdg_activation_token_v1 object that will provide\nthe initiating client with a unique token for this activation. This\ntoken should be offered to the clients to be activated." ] pub unsafe fn xdg_activation_v1_get_activation_token ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 ) -> * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_activation_v1 as _ , 1u32 , & super :: xdg_activation_token_v1 :: xdg_activation_token_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "notify new interaction being available\n\nRequests surface activation. It's up to the compositor to display\nthis information as desired, for example by placing the surface above\nthe rest.\n\nThe compositor may know who requested this by checking the activation\ntoken and might decide not to follow through with the activation if it's\nconsidered unwanted.\n\nCompositors can ignore unknown activation tokens when an invalid\ntoken is passed." ] pub unsafe fn xdg_activation_v1_activate ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 , token : * const c_char , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_v1 as _ , 2u32 , token , surface , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "an exported activation handle\n\nAn object for setting up a token and receiving a token handle that can\nbe passed as an activation token to another client.\n\nThe object is created using the xdg_activation_v1.get_activation_token\nrequest. This object should then be populated with the app_id, surface\nand serial information and committed. The compositor shall then issue a\ndone event with the token. In case the request's parameters are invalid,\nthe compositor will provide an invalid token." ] pub mod xdg_activation_token_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_activation_token_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "The token has already been used previously" ] already_used = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: already_used ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_activation_token_v1_requests_set_serial_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; static mut xdg_activation_token_v1_requests_set_surface_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_activation_token_v1_requests : [ wl_message ; 5 ] = [ wl_message { name : b"set_serial\0" as * const u8 as * const c_char , signature : b"uo\0" as * const u8 as * const c_char , types : unsafe { & xdg_activation_token_v1_requests_set_serial_types as * const _ } , } , wl_message { name : b"set_app_id\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_surface\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & xdg_activation_token_v1_requests_set_surface_types as * const _ } , } , wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_activation_token_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_activation_token_v1_interface : wl_interface = wl_interface { name : b"xdg_activation_token_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 5 , requests : unsafe { & xdg_activation_token_v1_requests as * const _ } , event_count : 1 , events : unsafe { & xdg_activation_token_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_activation_token_v1_listener { # [ doc = "the exported activation token\n\nThe 'done' event contains the unique token of this activation request\nand notifies that the provider is done." ] fn done ( & mut self , object : * mut xdg_activation_token_v1 , token : * mut c_char ) { } } pub unsafe fn xdg_activation_token_v1_set_user_data ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_activation_token_v1 as _ , user_data ) ; } pub unsafe fn xdg_activation_token_v1_get_user_data ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_activation_token_v1 as _ ) ; } pub unsafe fn xdg_activation_token_v1_get_version ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_activation_token_v1 as _ ) ; } pub unsafe fn xdg_activation_token_v1_add_listener ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_activation_token_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_activation_token_v1_add_rust_listener ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 , listener : & dyn xdg_activation_token_v1_listener ) -> bool { let to = ( listener as * const dyn xdg_activation_token_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_activation_token_v1_add_listener ( xdg_activation_token_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "specifies the seat and serial of the activating event\n\nProvides information about the seat and serial event that requested the\ntoken.\n\nThe serial can come from an input or focus event. For instance, if a\nclick triggers the launch of a third-party client, the launcher client\nshould send a set_serial request with the serial and seat from the\nwl_pointer.button event.\n\nSome compositors might refuse to activate toplevels when the token\ndoesn't have a valid and recent enough event serial.\n\nMust be sent before commit. This information is optional." ] pub unsafe fn xdg_activation_token_v1_set_serial ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 , serial : u32 , seat : * mut super :: wl_seat :: wl_seat ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_token_v1 as _ , 0u32 , serial , seat , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "specifies the application being activated\n\nThe requesting client can specify an app_id to associate the token\nbeing created with it.\n\nMust be sent before commit. This information is optional." ] pub unsafe fn xdg_activation_token_v1_set_app_id ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 , app_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_token_v1 as _ , 1u32 , app_id , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "specifies the surface requesting activation\n\nThis request sets the surface requesting the activation. Note, this is\ndifferent from the surface that will be activated.\n\nSome compositors might refuse to activate toplevels when the token\ndoesn't have a requesting surface.\n\nMust be sent before commit. This information is optional." ] pub unsafe fn xdg_activation_token_v1_set_surface ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_token_v1 as _ , 2u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "issues the token request\n\nRequests an activation token based on the different parameters that\nhave been offered through set_serial, set_surface and set_app_id." ] pub unsafe fn xdg_activation_token_v1_commit ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_token_v1 as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the xdg_activation_token_v1 object\n\nNotify the compositor that the xdg_activation_token_v1 object will no\nlonger be used." ] pub unsafe fn xdg_activation_token_v1_destroy ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_token_v1 as _ , 4u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_activation_token_v1 as _ ) ; } } } pub mod text { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "text input\n\nAn object used for text input. Adds support for text input and input\nmethods to applications. A text-input object is created from a\nwl_text_input_manager and corresponds typically to a text entry in an\napplication.\nRequests are used to activate/deactivate the text-input object and set\nstate information like surrounding and selected text or the content type.\nThe information about entered text is sent to the text-input object via\nthe pre-edit and commit events. Using this interface removes the need\nfor applications to directly process hardware key events and compose text\nout of them.\n\nText is generally UTF-8 encoded, indices and lengths are in bytes.\n\nSerials are used to synchronize the state between the text input and\nan input method. New serials are sent by the text input in the\ncommit_state request and are used by the input method to indicate\nthe known text input state in events like preedit_string, commit_string,\nand keysym. The text input can then ignore events from the input method\nwhich are based on an outdated state (for example after a reset)." ] pub mod wl_text_input { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_text_input { } # [ doc = "content hint\n\nContent hint is a bitmask to allow to modify the behavior of the text\ninput." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum content_hint { # [ doc = "no special behaviour" ] none = 0 , # [ doc = "auto completion, correction and capitalization" ] default = 7 , # [ doc = "hidden and sensitive text" ] password = 192 , # [ doc = "suggest word completions" ] auto_completion = 1 , # [ doc = "suggest word corrections" ] auto_correction = 2 , # [ doc = "switch to uppercase letters at the start of a sentence" ] auto_capitalization = 4 , # [ doc = "prefer lowercase letters" ] lowercase = 8 , # [ doc = "prefer uppercase letters" ] uppercase = 16 , # [ doc = "prefer casing for titles and headings (can be language dependent)" ] titlecase = 32 , # [ doc = "characters should be hidden" ] hidden_text = 64 , # [ doc = "typed text should not be stored" ] sensitive_data = 128 , # [ doc = "just latin characters should be entered" ] latin = 256 , # [ doc = "the text input is multiline" ] multiline = 512 , # [ doc ( hidden ) ] __nonexhaustive , } impl content_hint { pub fn from_raw ( n : u32 ) -> Option < content_hint > { match n { 0 => Some ( content_hint :: none ) , 7 => Some ( content_hint :: default ) , 192 => Some ( content_hint :: password ) , 1 => Some ( content_hint :: auto_completion ) , 2 => Some ( content_hint :: auto_correction ) , 4 => Some ( content_hint :: auto_capitalization ) , 8 => Some ( content_hint :: lowercase ) , 16 => Some ( content_hint :: uppercase ) , 32 => Some ( content_hint :: titlecase ) , 64 => Some ( content_hint :: hidden_text ) , 128 => Some ( content_hint :: sensitive_data ) , 256 => Some ( content_hint :: latin ) , 512 => Some ( content_hint :: multiline ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "content purpose\n\nThe content purpose allows to specify the primary purpose of a text\ninput.\n\nThis allows an input method to show special purpose input panels with\nextra characters or to disallow some characters." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum content_purpose { # [ doc = "default input, allowing all characters" ] normal = 0 , # [ doc = "allow only alphabetic characters" ] alpha = 1 , # [ doc = "allow only digits" ] digits = 2 , # [ doc = "input a number (including decimal separator and sign)" ] number = 3 , # [ doc = "input a phone number" ] phone = 4 , # [ doc = "input an URL" ] url = 5 , # [ doc = "input an email address" ] email = 6 , # [ doc = "input a name of a person" ] name = 7 , # [ doc = "input a password (combine with password or sensitive_data hint)" ] password = 8 , # [ doc = "input a date" ] date = 9 , # [ doc = "input a time" ] time = 10 , # [ doc = "input a date and time" ] datetime = 11 , # [ doc = "input for a terminal" ] terminal = 12 , # [ doc ( hidden ) ] __nonexhaustive , } impl content_purpose { pub fn from_raw ( n : u32 ) -> Option < content_purpose > { match n { 0 => Some ( content_purpose :: normal ) , 1 => Some ( content_purpose :: alpha ) , 2 => Some ( content_purpose :: digits ) , 3 => Some ( content_purpose :: number ) , 4 => Some ( content_purpose :: phone ) , 5 => Some ( content_purpose :: url ) , 6 => Some ( content_purpose :: email ) , 7 => Some ( content_purpose :: name ) , 8 => Some ( content_purpose :: password ) , 9 => Some ( content_purpose :: date ) , 10 => Some ( content_purpose :: time ) , 11 => Some ( content_purpose :: datetime ) , 12 => Some ( content_purpose :: terminal ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum preedit_style { # [ doc = "default style for composing text" ] default = 0 , # [ doc = "style should be the same as in non-composing text" ] none = 1 , active = 2 , inactive = 3 , highlight = 4 , underline = 5 , selection = 6 , incorrect = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl preedit_style { pub fn from_raw ( n : u32 ) -> Option < preedit_style > { match n { 0 => Some ( preedit_style :: default ) , 1 => Some ( preedit_style :: none ) , 2 => Some ( preedit_style :: active ) , 3 => Some ( preedit_style :: inactive ) , 4 => Some ( preedit_style :: highlight ) , 5 => Some ( preedit_style :: underline ) , 6 => Some ( preedit_style :: selection ) , 7 => Some ( preedit_style :: incorrect ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum text_direction { # [ doc = "automatic text direction based on text and language" ] auto = 0 , # [ doc = "left-to-right" ] ltr = 1 , # [ doc = "right-to-left" ] rtl = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl text_direction { pub fn from_raw ( n : u32 ) -> Option < text_direction > { match n { 0 => Some ( text_direction :: auto ) , 1 => Some ( text_direction :: ltr ) , 2 => Some ( text_direction :: rtl ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_text_input_requests_activate_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut wl_text_input_requests_deactivate_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_text_input_requests : [ wl_message ; 11 ] = [ wl_message { name : b"activate\0" as * const u8 as * const c_char , signature : b"oo\0" as * const u8 as * const c_char , types : unsafe { & wl_text_input_requests_activate_types as * const _ } , } , wl_message { name : b"deactivate\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wl_text_input_requests_deactivate_types as * const _ } , } , wl_message { name : b"show_input_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hide_input_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"reset\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_surrounding_text\0" as * const u8 as * const c_char , signature : b"suu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_content_type\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_cursor_rectangle\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_preferred_language\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_state\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"invoke_action\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wl_text_input_events_enter_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_text_input_events : [ wl_message ; 13 ] = [ wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wl_text_input_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifiers_map\0" as * const u8 as * const c_char , signature : b"a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"input_panel_state\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_string\0" as * const u8 as * const c_char , signature : b"uss\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_styling\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_cursor\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_string\0" as * const u8 as * const c_char , signature : b"us\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cursor_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"delete_surrounding_text\0" as * const u8 as * const c_char , signature : b"iu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"keysym\0" as * const u8 as * const c_char , signature : b"uuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"language\0" as * const u8 as * const c_char , signature : b"us\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"text_direction\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_text_input_interface : wl_interface = wl_interface { name : b"wl_text_input\0" as * const u8 as * const c_char , version : 1 , request_count : 11 , requests : unsafe { & wl_text_input_requests as * const _ } , event_count : 13 , events : unsafe { & wl_text_input_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_text_input_listener { # [ doc = "enter event\n\nNotify the text-input object when it received focus. Typically in\nresponse to an activate request." ] fn enter ( & mut self , object : * mut wl_text_input , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "leave event\n\nNotify the text-input object when it lost focus. Either in response\nto a deactivate request or when the assigned surface lost focus or was\ndestroyed." ] fn leave ( & mut self , object : * mut wl_text_input , ) { } # [ doc = "modifiers map\n\nTransfer an array of 0-terminated modifiers names. The position in\nthe array is the index of the modifier as used in the modifiers\nbitmask in the keysym event." ] fn modifiers_map ( & mut self , object : * mut wl_text_input , map : * mut wl_array ) { } # [ doc = "state of the input panel\n\nNotify when the visibility state of the input panel changed." ] fn input_panel_state ( & mut self , object : * mut wl_text_input , state : u32 ) { } # [ doc = "pre-edit\n\nNotify when a new composing text (pre-edit) should be set around the\ncurrent cursor position. Any previously set composing text should\nbe removed.\n\nThe commit text can be used to replace the preedit text on reset\n(for example on unfocus).\n\nThe text input should also handle all preedit_style and preedit_cursor\nevents occurring directly before preedit_string." ] fn preedit_string ( & mut self , object : * mut wl_text_input , serial : u32 , text : * mut c_char , commit : * mut c_char ) { } # [ doc = "pre-edit styling\n\nSets styling information on composing text. The style is applied for\nlength bytes from index relative to the beginning of the composing\ntext (as byte offset). Multiple styles can\nbe applied to a composing text by sending multiple preedit_styling\nevents.\n\nThis event is handled as part of a following preedit_string event." ] fn preedit_styling ( & mut self , object : * mut wl_text_input , index : u32 , length : u32 , style : u32 ) { } # [ doc = "pre-edit cursor\n\nSets the cursor position inside the composing text (as byte\noffset) relative to the start of the composing text. When index is a\nnegative number no cursor is shown.\n\nThis event is handled as part of a following preedit_string event." ] fn preedit_cursor ( & mut self , object : * mut wl_text_input , index : i32 ) { } # [ doc = "commit\n\nNotify when text should be inserted into the editor widget. The text to\ncommit could be either just a single character after a key press or the\nresult of some composing (pre-edit). It could be also an empty text\nwhen some text should be removed (see delete_surrounding_text) or when\nthe input cursor should be moved (see cursor_position).\n\nAny previously set composing text should be removed." ] fn commit_string ( & mut self , object : * mut wl_text_input , serial : u32 , text : * mut c_char ) { } # [ doc = "set cursor to new position\n\nNotify when the cursor or anchor position should be modified.\n\nThis event should be handled as part of a following commit_string\nevent." ] fn cursor_position ( & mut self , object : * mut wl_text_input , index : i32 , anchor : i32 ) { } # [ doc = "delete surrounding text\n\nNotify when the text around the current cursor position should be\ndeleted.\n\nIndex is relative to the current cursor (in bytes).\nLength is the length of deleted text (in bytes).\n\nThis event should be handled as part of a following commit_string\nevent." ] fn delete_surrounding_text ( & mut self , object : * mut wl_text_input , index : i32 , length : u32 ) { } # [ doc = "keysym\n\nNotify when a key event was sent. Key events should not be used\nfor normal text input operations, which should be done with\ncommit_string, delete_surrounding_text, etc. The key event follows\nthe wl_keyboard key event convention. Sym is a XKB keysym, state a\nwl_keyboard key_state. Modifiers are a mask for effective modifiers\n(where the modifier indices are set by the modifiers_map event)" ] fn keysym ( & mut self , object : * mut wl_text_input , serial : u32 , time : u32 , sym : u32 , state : u32 , modifiers : u32 ) { } # [ doc = "language\n\nSets the language of the input text. The \"language\" argument is a RFC-3066\nformat language tag." ] fn language ( & mut self , object : * mut wl_text_input , serial : u32 , language : * mut c_char ) { } # [ doc = "text direction\n\nSets the text direction of input text.\n\nIt is mainly needed for showing input cursor on correct side of the\neditor when there is no input yet done and making sure neutral\ndirection text is laid out properly." ] fn text_direction ( & mut self , object : * mut wl_text_input , serial : u32 , direction : u32 ) { } } pub unsafe fn wl_text_input_set_user_data ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_text_input as _ , user_data ) ; } pub unsafe fn wl_text_input_get_user_data ( wl_text_input : * mut super :: wl_text_input :: wl_text_input ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_text_input as _ ) ; } pub unsafe fn wl_text_input_get_version ( wl_text_input : * mut super :: wl_text_input :: wl_text_input ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_text_input as _ ) ; } pub unsafe fn wl_text_input_add_listener ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_text_input as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_text_input_add_rust_listener ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , listener : & dyn wl_text_input_listener ) -> bool { let to = ( listener as * const dyn wl_text_input_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_text_input_add_listener ( wl_text_input as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_text_input_destroy ( wl_text_input : * mut super :: wl_text_input :: wl_text_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_text_input as _ ) ; } # [ doc = "request activation\n\nRequests the text-input object to be activated (typically when the\ntext entry gets focus).\nThe seat argument is a wl_seat which maintains the focus for this\nactivation. The surface argument is a wl_surface assigned to the\ntext-input object and tracked for focus lost. The enter event\nis emitted on successful activation." ] pub unsafe fn wl_text_input_activate ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , seat : * mut super :: wl_seat :: wl_seat , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 0u32 , seat , surface , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "request deactivation\n\nRequests the text-input object to be deactivated (typically when the\ntext entry lost focus). The seat argument is a wl_seat which was used\nfor activation." ] pub unsafe fn wl_text_input_deactivate ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , seat : * mut super :: wl_seat :: wl_seat ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 1u32 , seat , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "show input panels\n\nRequests input panels (virtual keyboard) to show." ] pub unsafe fn wl_text_input_show_input_panel ( wl_text_input : * mut super :: wl_text_input :: wl_text_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "hide input panels\n\nRequests input panels (virtual keyboard) to hide." ] pub unsafe fn wl_text_input_hide_input_panel ( wl_text_input : * mut super :: wl_text_input :: wl_text_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "reset\n\nShould be called by an editor widget when the input state should be\nreset, for example after the text was changed outside of the normal\ninput method flow." ] pub unsafe fn wl_text_input_reset ( wl_text_input : * mut super :: wl_text_input :: wl_text_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 4u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets the surrounding text\n\nSets the plain surrounding text around the input position. Text is\nUTF-8 encoded. Cursor is the byte offset within the\nsurrounding text. Anchor is the byte offset of the\nselection anchor within the surrounding text. If there is no selected\ntext anchor is the same as cursor." ] pub unsafe fn wl_text_input_set_surrounding_text ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , text : * const c_char , cursor : u32 , anchor : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 5u32 , text , cursor , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set content purpose and hint\n\nSets the content purpose and content hint. While the purpose is the\nbasic purpose of an input field, the hint flags allow to modify some\nof the behavior.\n\nWhen no content type is explicitly set, a normal content purpose with\ndefault hints (auto completion, auto correction, auto capitalization)\nshould be assumed." ] pub unsafe fn wl_text_input_set_content_type ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , hint : u32 , purpose : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 6u32 , hint , purpose , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn wl_text_input_set_cursor_rectangle ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 7u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets preferred language\n\nSets a specific language. This allows for example a virtual keyboard to\nshow a language specific layout. The \"language\" argument is a RFC-3066\nformat language tag.\n\nIt could be used for example in a word processor to indicate language of\ncurrently edited document or in an instant message application which tracks\nlanguages of contacts." ] pub unsafe fn wl_text_input_set_preferred_language ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , language : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 8u32 , language , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn wl_text_input_commit_state ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 9u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn wl_text_input_invoke_action ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , button : u32 , index : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 10u32 , button , index , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "text input manager\n\nA factory for text-input objects. This object is a global singleton." ] pub mod wl_text_input_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_text_input_manager { } static mut wl_text_input_manager_requests_create_text_input_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_text_input :: wl_text_input_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_text_input_manager_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create_text_input\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_text_input_manager_requests_create_text_input_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_text_input_manager_interface : wl_interface = wl_interface { name : b"wl_text_input_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wl_text_input_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_text_input_manager_listener { } pub unsafe fn wl_text_input_manager_set_user_data ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_text_input_manager as _ , user_data ) ; } pub unsafe fn wl_text_input_manager_get_user_data ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_text_input_manager as _ ) ; } pub unsafe fn wl_text_input_manager_get_version ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_text_input_manager as _ ) ; } pub unsafe fn wl_text_input_manager_add_listener ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_text_input_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_text_input_manager_add_rust_listener ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager , listener : & dyn wl_text_input_manager_listener ) -> bool { let to = ( listener as * const dyn wl_text_input_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_text_input_manager_add_listener ( wl_text_input_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_text_input_manager_destroy ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_text_input_manager as _ ) ; } # [ doc = "create text input\n\nCreates a new text-input object." ] pub unsafe fn wl_text_input_manager_create_text_input ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager ) -> * mut super :: wl_text_input :: wl_text_input { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_text_input_manager as _ , 0u32 , & super :: wl_text_input :: wl_text_input_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } } pub mod appmenu { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "appmenu dbus address interface\n\nThis interface allows a client to link a window (or wl_surface) to an com.canonical.dbusmenu\ninterface registered on DBus." ] pub mod org_kde_kwin_appmenu_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_appmenu_manager { } static mut org_kde_kwin_appmenu_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_appmenu_manager_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_appmenu_manager_requests_create_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_appmenu_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_appmenu_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_kwin_appmenu_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_appmenu_manager_listener { } pub unsafe fn org_kde_kwin_appmenu_manager_set_user_data ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_appmenu_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_appmenu_manager_get_user_data ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_appmenu_manager as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_manager_get_version ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_appmenu_manager as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_manager_add_listener ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_appmenu_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_manager_add_rust_listener ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager , listener : & dyn org_kde_kwin_appmenu_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_appmenu_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_appmenu_manager_add_listener ( org_kde_kwin_appmenu_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_appmenu_manager_destroy ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_appmenu_manager as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_manager_create ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_appmenu_manager as _ , 0u32 , & super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "appmenu dbus address interface\n\nThe DBus service name and object path where the appmenu interface is present\nThe object should be registered on the session bus before sending this request.\nIf not applicable, clients should remove this object." ] pub mod org_kde_kwin_appmenu { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_appmenu { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_appmenu_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_address\0" as * const u8 as * const c_char , signature : b"ss\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_appmenu_interface : wl_interface = wl_interface { name : b"org_kde_kwin_appmenu\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_appmenu_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_appmenu_listener { } pub unsafe fn org_kde_kwin_appmenu_set_user_data ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_appmenu as _ , user_data ) ; } pub unsafe fn org_kde_kwin_appmenu_get_user_data ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_appmenu as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_get_version ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_appmenu as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_add_listener ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_appmenu as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_add_rust_listener ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu , listener : & dyn org_kde_kwin_appmenu_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_appmenu_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_appmenu_add_listener ( org_kde_kwin_appmenu as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_appmenu_destroy ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_appmenu as _ ) ; } # [ doc = "initialise or update the location of the AppMenu interface\n\nSet or update the service name and object path.\nStrings should be formatted in Latin-1 matching the relevant DBus specifications." ] pub unsafe fn org_kde_kwin_appmenu_set_address ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu , service_name : * const c_char , object_path : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_appmenu as _ , 0u32 , service_name , object_path , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the appmenu object" ] pub unsafe fn org_kde_kwin_appmenu_release ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_appmenu as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_appmenu as _ ) ; } } } pub mod plasma_shell { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "create shell windows and helpers\n\nThis interface is used by KF5 powered Wayland shells to communicate with\nthe compositor and can only be bound one time." ] pub mod org_kde_plasma_shell { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_plasma_shell { } static mut org_kde_plasma_shell_requests_get_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_plasma_surface :: org_kde_plasma_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_shell_requests : [ wl_message ; 1 ] = [ wl_message { name : b"get_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_plasma_shell_requests_get_surface_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_plasma_shell_interface : wl_interface = wl_interface { name : b"org_kde_plasma_shell\0" as * const u8 as * const c_char , version : 6 , request_count : 1 , requests : unsafe { & org_kde_plasma_shell_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_plasma_shell_listener { } pub unsafe fn org_kde_plasma_shell_set_user_data ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_plasma_shell as _ , user_data ) ; } pub unsafe fn org_kde_plasma_shell_get_user_data ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_plasma_shell as _ ) ; } pub unsafe fn org_kde_plasma_shell_get_version ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_plasma_shell as _ ) ; } pub unsafe fn org_kde_plasma_shell_add_listener ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_plasma_shell as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_plasma_shell_add_rust_listener ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell , listener : & dyn org_kde_plasma_shell_listener ) -> bool { let to = ( listener as * const dyn org_kde_plasma_shell_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_plasma_shell_add_listener ( org_kde_plasma_shell as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_plasma_shell_destroy ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_plasma_shell as _ ) ; } # [ doc = "create a shell surface from a surface\n\nCreate a shell surface for an existing surface.\n\nOnly one shell surface can be associated with a given\nsurface." ] pub unsafe fn org_kde_plasma_shell_get_surface ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_plasma_shell as _ , 0u32 , & super :: org_kde_plasma_surface :: org_kde_plasma_surface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "metadata interface\n\nAn interface that may be implemented by a wl_surface, for\nimplementations that provide the shell user interface.\n\nIt provides requests to set surface roles, assign an output\nor set the position in output coordinates.\n\nOn the server side the object is automatically destroyed when\nthe related wl_surface is destroyed. On client side,\norg_kde_plasma_surface.destroy() must be called before\ndestroying the wl_surface object." ] pub mod org_kde_plasma_surface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_plasma_surface { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum role { normal = 0 , desktop = 1 , panel = 2 , onscreendisplay = 3 , notification = 4 , tooltip = 5 , criticalnotification = 6 , # [ doc ( hidden ) ] __nonexhaustive , } impl role { pub fn from_raw ( n : u32 ) -> Option < role > { match n { 0 => Some ( role :: normal ) , 1 => Some ( role :: desktop ) , 2 => Some ( role :: panel ) , 3 => Some ( role :: onscreendisplay ) , 4 => Some ( role :: notification ) , 5 => Some ( role :: tooltip ) , 6 => Some ( role :: criticalnotification ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "Behavior for panel surface" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum panel_behavior { # [ doc = "normal panel visibility\n\nThe panel is on top of other surfaces, windows cannot cover (full screen\nwindows excluded)." ] always_visible = 1 , # [ doc = "hide automatically\n\nThe panel is hidden automatically and restored when the mouse is over." ] auto_hide = 2 , # [ doc = "windows can cover\n\nWindows can cover the panel." ] windows_can_cover = 3 , # [ doc = "windows go below\n\nMaximized windows take the whole screen space but the panel is above\nthe windows." ] windows_go_below = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl panel_behavior { pub fn from_raw ( n : u32 ) -> Option < panel_behavior > { match n { 1 => Some ( panel_behavior :: always_visible ) , 2 => Some ( panel_behavior :: auto_hide ) , 3 => Some ( panel_behavior :: windows_can_cover ) , 4 => Some ( panel_behavior :: windows_go_below ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "Request panel_auto_hide performed on a surface which does not correspond to an auto-hide panel." ] panel_not_auto_hide = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: panel_not_auto_hide ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut org_kde_plasma_surface_requests_set_output_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_surface_requests : [ wl_message ; 10 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_output\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_plasma_surface_requests_set_output_types as * const _ } , } , wl_message { name : b"set_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_role\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_panel_behavior\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_skip_taskbar\0" as * const u8 as * const c_char , signature : b"2u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"panel_auto_hide_hide\0" as * const u8 as * const c_char , signature : b"4\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"panel_auto_hide_show\0" as * const u8 as * const c_char , signature : b"4\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_panel_takes_focus\0" as * const u8 as * const c_char , signature : b"4u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_skip_switcher\0" as * const u8 as * const c_char , signature : b"5u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_surface_events : [ wl_message ; 2 ] = [ wl_message { name : b"auto_hidden_panel_hidden\0" as * const u8 as * const c_char , signature : b"4\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"auto_hidden_panel_shown\0" as * const u8 as * const c_char , signature : b"4\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_plasma_surface_interface : wl_interface = wl_interface { name : b"org_kde_plasma_surface\0" as * const u8 as * const c_char , version : 6 , request_count : 10 , requests : unsafe { & org_kde_plasma_surface_requests as * const _ } , event_count : 2 , events : unsafe { & org_kde_plasma_surface_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_plasma_surface_listener { # [ doc = "Auto-hiding panel is hidden\n\nAn auto-hiding panel got hidden by the compositor.\n\nOnly available since version 4 of the interface." ] fn auto_hidden_panel_hidden ( & mut self , object : * mut org_kde_plasma_surface , ) { } # [ doc = "Auto-hiding panel is shown\n\nAn auto-hiding panel got shown by the compositor.\n\nOnly available since version 4 of the interface." ] fn auto_hidden_panel_shown ( & mut self , object : * mut org_kde_plasma_surface , ) { } } pub unsafe fn org_kde_plasma_surface_set_user_data ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_plasma_surface as _ , user_data ) ; } pub unsafe fn org_kde_plasma_surface_get_user_data ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_plasma_surface as _ ) ; } pub unsafe fn org_kde_plasma_surface_get_version ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_plasma_surface as _ ) ; } pub unsafe fn org_kde_plasma_surface_add_listener ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_plasma_surface as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_plasma_surface_add_rust_listener ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , listener : & dyn org_kde_plasma_surface_listener ) -> bool { let to = ( listener as * const dyn org_kde_plasma_surface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_plasma_surface_add_listener ( org_kde_plasma_surface as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "remove org_kde_plasma_surface interface\n\nThe org_kde_plasma_surface interface is removed from the\nwl_surface object that was turned into a shell surface with the\norg_kde_plasma_shell.get_surface request.\nThe shell surface role is lost and wl_surface is unmapped." ] pub unsafe fn org_kde_plasma_surface_destroy ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_plasma_surface as _ ) ; } # [ doc = "assign an output to this shell surface\n\nAssign an output to this shell surface.\nThe compositor will use this information to set the position\nwhen org_kde_plasma_surface.set_position request is\ncalled." ] pub unsafe fn org_kde_plasma_surface_set_output ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 1u32 , output , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "change the shell surface position\n\nMove the surface to new coordinates.\n\nCoordinates are global, for example 50,50 for a 1920,0+1920x1080 output\nis 1970,50 in global coordinates space.\n\nUse org_kde_plasma_surface.set_output to assign an output\nto this surface." ] pub unsafe fn org_kde_plasma_surface_set_position ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 2u32 , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "assign a role to this surface\n\nAssign a role to a shell surface.\n\nThe compositor handles surfaces depending on their role.\nSee the explanation below.\n\nThis request fails if the surface already has a role, this means\nthe surface role may be assigned only once.\n\n== Surfaces with splash role ==\n\nSplash surfaces are placed above every other surface during the\nshell startup phase.\n\nThe surfaces are placed according to the output coordinates.\nNo size is imposed to those surfaces, the shell has to resize\nthem according to output size.\n\nThese surfaces are meant to hide the desktop during the startup\nphase so that the user will always see a ready to work desktop.\n\nA shell might not create splash surfaces if the compositor reveals\nthe desktop in an alternative fashion, for example with a fade\nin effect.\n\nThat depends on how much time the desktop usually need to prepare\nthe workspace or specific design decisions.\nThis specification doesn't impose any particular design.\n\nWhen the startup phase is finished, the shell will send the\norg_kde_plasma.desktop_ready request to the compositor.\n\n== Surfaces with desktop role ==\n\nDesktop surfaces are placed below all other surfaces and are used\nto show the actual desktop view with icons, search results or\ncontrols the user will interact with. What to show depends on the\nshell implementation.\n\nThe surfaces are placed according to the output coordinates.\nNo size is imposed to those surfaces, the shell has to resize\nthem according to output size.\n\nOnly one surface per output can have the desktop role.\n\n== Surfaces with dashboard role ==\n\nDashboard surfaces are placed above desktop surfaces and are used to\nshow additional widgets and controls.\n\nThe surfaces are placed according to the output coordinates.\nNo size is imposed to those surfaces, the shell has to resize\nthem according to output size.\n\nOnly one surface per output can have the dashboard role.\n\n== Surfaces with config role ==\n\nA configuration surface is shown when the user wants to configure\npanel or desktop views.\n\nOnly one surface per output can have the config role.\n\nTODO: This should grab the input like popup menus, right?\n\n== Surfaces with overlay role ==\n\nOverlays are special surfaces that shows for a limited amount\nof time. Such surfaces are useful to display things like volume,\nbrightness and status changes.\n\nCompositors may decide to show those surfaces in a layer above\nall surfaces, even full screen ones if so is desired.\n\n== Surfaces with notification role ==\n\nNotification surfaces display informative content for a limited\namount of time. The compositor may decide to show them in a corner\ndepending on the configuration.\n\nThese surfaces are shown in a layer above all other surfaces except\nfor full screen ones.\n\n== Surfaces with lock role ==\n\nThe lock surface is shown by the compositor when the session is\nlocked, users interact with it to unlock the session.\n\nCompositors should move lock surfaces to 0,0 in output\ncoordinates space and hide all other surfaces for security sake.\nFor the same reason it is recommended that clients make the\nlock surface as big as the screen.\n\nOnly one surface per output can have the lock role." ] pub unsafe fn org_kde_plasma_surface_set_role ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , role : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 3u32 , role , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set or unset the panel\n\nSet flags bitmask as described by the flag enum.\nPass 0 to unset any flag, the surface will adjust its behavior to\nthe default." ] pub unsafe fn org_kde_plasma_surface_set_panel_behavior ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , flag : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 4u32 , flag , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the window skip the taskbar\n\nSetting this bit to the window, will make it say it prefers to not be listed in the taskbar. Taskbar implementations may or may not follow this hint." ] pub unsafe fn org_kde_plasma_surface_set_skip_taskbar ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , skip : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 5u32 , skip , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Hide the auto-hiding panel\n\nA panel surface with panel_behavior auto_hide can perform this request to hide the panel\non a screen edge without unmapping it. The compositor informs the client about the panel\nbeing hidden with the event auto_hidden_panel_hidden.\n\nThe compositor will restore the visibility state of the\nsurface when the pointer touches the screen edge the panel borders. Once the compositor restores\nthe visibility the event auto_hidden_panel_shown will be sent. This event will also be sent\nif the compositor is unable to hide the panel.\n\nThe client can also request to show the panel again with the request panel_auto_hide_show." ] pub unsafe fn org_kde_plasma_surface_panel_auto_hide_hide ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 6u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Show the auto-hiding panel\n\nA panel surface with panel_behavior auto_hide can perform this request to show the panel\nagain which got hidden with panel_auto_hide_hide." ] pub unsafe fn org_kde_plasma_surface_panel_auto_hide_show ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 7u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Whether a panel takes focus\n\nBy default various org_kde_plasma_surface roles do not take focus and cannot be\nactivated. With this request the compositor can be instructed to pass focus also to this\norg_kde_plasma_surface." ] pub unsafe fn org_kde_plasma_surface_set_panel_takes_focus ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , takes_focus : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 8u32 , takes_focus , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the window not appear in a switcher\n\nSetting this bit will indicate that the window prefers not to be listed in a switcher." ] pub unsafe fn org_kde_plasma_surface_set_skip_switcher ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , skip : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 9u32 , skip , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod slide { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod org_kde_kwin_slide_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_slide_manager { } static mut org_kde_kwin_slide_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_slide :: org_kde_kwin_slide_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut org_kde_kwin_slide_manager_requests_unset_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_slide_manager_requests : [ wl_message ; 2 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_slide_manager_requests_create_types as * const _ } , } , wl_message { name : b"unset\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_slide_manager_requests_unset_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_slide_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_slide_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_slide_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_slide_manager_listener { } pub unsafe fn org_kde_kwin_slide_manager_set_user_data ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_slide_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_slide_manager_get_user_data ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_slide_manager as _ ) ; } pub unsafe fn org_kde_kwin_slide_manager_get_version ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_slide_manager as _ ) ; } pub unsafe fn org_kde_kwin_slide_manager_add_listener ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_slide_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_slide_manager_add_rust_listener ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager , listener : & dyn org_kde_kwin_slide_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_slide_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_slide_manager_add_listener ( org_kde_kwin_slide_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_slide_manager_destroy ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_slide_manager as _ ) ; } pub unsafe fn org_kde_kwin_slide_manager_create ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_slide_manager as _ , 0u32 , & super :: org_kde_kwin_slide :: org_kde_kwin_slide_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } pub unsafe fn org_kde_kwin_slide_manager_unset ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_slide_manager as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "slide a surface from a location to another\n\nAsk the compositor to move the surface from a location to another\nwith a slide animation.\n\nThe from argument provides a clue about where the slide animation\nbegins, offset is the distance from screen edge to begin the animation." ] pub mod org_kde_kwin_slide { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_slide { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum location { left = 0 , top = 1 , right = 2 , bottom = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl location { pub fn from_raw ( n : u32 ) -> Option < location > { match n { 0 => Some ( location :: left ) , 1 => Some ( location :: top ) , 2 => Some ( location :: right ) , 3 => Some ( location :: bottom ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_slide_requests : [ wl_message ; 4 ] = [ wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_location\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_offset\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_slide_interface : wl_interface = wl_interface { name : b"org_kde_kwin_slide\0" as * const u8 as * const c_char , version : 1 , request_count : 4 , requests : unsafe { & org_kde_kwin_slide_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_slide_listener { } pub unsafe fn org_kde_kwin_slide_set_user_data ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_slide as _ , user_data ) ; } pub unsafe fn org_kde_kwin_slide_get_user_data ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_slide as _ ) ; } pub unsafe fn org_kde_kwin_slide_get_version ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_slide as _ ) ; } pub unsafe fn org_kde_kwin_slide_add_listener ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_slide as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_slide_add_rust_listener ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide , listener : & dyn org_kde_kwin_slide_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_slide_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_slide_add_listener ( org_kde_kwin_slide as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_slide_destroy ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_slide as _ ) ; } pub unsafe fn org_kde_kwin_slide_commit ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_slide as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_slide_set_location ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide , location : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_slide as _ , 1u32 , location , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_slide_set_offset ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide , offset : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_slide as _ , 2u32 , offset , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the slide object" ] pub unsafe fn org_kde_kwin_slide_release ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_slide as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_slide as _ ) ; } } } pub mod wp_primary_selection_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "X primary selection emulation\n\nThe primary selection device manager is a singleton global object that\nprovides access to the primary selection. It allows to create\nwp_primary_selection_source objects, as well as retrieving the per-seat\nwp_primary_selection_device objects." ] pub mod zwp_primary_selection_device_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_primary_selection_device_manager_v1 { } static mut zwp_primary_selection_device_manager_v1_requests_create_source_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1_interface as * const wl_interface } , ] ; static mut zwp_primary_selection_device_manager_v1_requests_get_device_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_device_manager_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"create_source\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_primary_selection_device_manager_v1_requests_create_source_types as * const _ } , } , wl_message { name : b"get_device\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_primary_selection_device_manager_v1_requests_get_device_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_primary_selection_device_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_primary_selection_device_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & zwp_primary_selection_device_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_primary_selection_device_manager_v1_listener { } pub unsafe fn zwp_primary_selection_device_manager_v1_set_user_data ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_primary_selection_device_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_primary_selection_device_manager_v1_get_user_data ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_primary_selection_device_manager_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_device_manager_v1_get_version ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_primary_selection_device_manager_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_device_manager_v1_add_listener ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_primary_selection_device_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_primary_selection_device_manager_v1_add_rust_listener ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 , listener : & dyn zwp_primary_selection_device_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_primary_selection_device_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_primary_selection_device_manager_v1_add_listener ( zwp_primary_selection_device_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "create a new primary selection source\n\nCreate a new primary selection source." ] pub unsafe fn zwp_primary_selection_device_manager_v1_create_source ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 ) -> * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_primary_selection_device_manager_v1 as _ , 0u32 , & super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "create a new primary selection device\n\nCreate a new data device for a given seat." ] pub unsafe fn zwp_primary_selection_device_manager_v1_get_device ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_primary_selection_device_manager_v1 as _ , 1u32 , & super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat ) ; return r as _ ; } # [ doc = "destroy the primary selection device manager\n\nDestroy the primary selection device manager." ] pub unsafe fn zwp_primary_selection_device_manager_v1_destroy ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_device_manager_v1 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_primary_selection_device_manager_v1 as _ ) ; } } pub mod zwp_primary_selection_device_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_primary_selection_device_v1 { } static mut zwp_primary_selection_device_v1_requests_set_selection_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_device_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_selection\0" as * const u8 as * const c_char , signature : b"?ou\0" as * const u8 as * const c_char , types : unsafe { & zwp_primary_selection_device_v1_requests_set_selection_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_primary_selection_device_v1_events_data_offer_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1_interface as * const wl_interface } , ] ; static mut zwp_primary_selection_device_v1_events_selection_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_device_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"data_offer\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_primary_selection_device_v1_events_data_offer_types as * const _ } , } , wl_message { name : b"selection\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & zwp_primary_selection_device_v1_events_selection_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_primary_selection_device_v1_interface : wl_interface = wl_interface { name : b"zwp_primary_selection_device_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_primary_selection_device_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_primary_selection_device_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_primary_selection_device_v1_listener { # [ doc = "introduce a new wp_primary_selection_offer\n\nIntroduces a new wp_primary_selection_offer object that may be used\nto receive the current primary selection. Immediately following this\nevent, the new wp_primary_selection_offer object will send\nwp_primary_selection_offer.offer events to describe the offered mime\ntypes." ] fn data_offer ( & mut self , object : * mut zwp_primary_selection_device_v1 , offer : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 ) { } # [ doc = "advertise a new primary selection\n\nThe wp_primary_selection_device.selection event is sent to notify the\nclient of a new primary selection. This event is sent after the\nwp_primary_selection.data_offer event introducing this object, and after\nthe offer has announced its mimetypes through\nwp_primary_selection_offer.offer.\n\nThe data_offer is valid until a new offer or NULL is received\nor until the client loses keyboard focus. The client must destroy the\nprevious selection data_offer, if any, upon receiving this event." ] fn selection ( & mut self , object : * mut zwp_primary_selection_device_v1 , id : Option < * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 > ) { } } pub unsafe fn zwp_primary_selection_device_v1_set_user_data ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_primary_selection_device_v1 as _ , user_data ) ; } pub unsafe fn zwp_primary_selection_device_v1_get_user_data ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_primary_selection_device_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_device_v1_get_version ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_primary_selection_device_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_device_v1_add_listener ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_primary_selection_device_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_primary_selection_device_v1_add_rust_listener ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 , listener : & dyn zwp_primary_selection_device_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_primary_selection_device_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_primary_selection_device_v1_add_listener ( zwp_primary_selection_device_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "set the primary selection\n\nReplaces the current selection. The previous owner of the primary\nselection will receive a wp_primary_selection_source.cancelled event.\n\nTo unset the selection, set the source to NULL." ] pub unsafe fn zwp_primary_selection_device_v1_set_selection ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 , source : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_device_v1 as _ , 0u32 , source , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the primary selection device\n\nDestroy the primary selection device." ] pub unsafe fn zwp_primary_selection_device_v1_destroy ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_device_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_primary_selection_device_v1 as _ ) ; } } # [ doc = "offer to transfer primary selection contents\n\nA wp_primary_selection_offer represents an offer to transfer the contents\nof the primary selection clipboard to the client. Similar to\nwl_data_offer, the offer also describes the mime types that the data can\nbe converted to and provides the mechanisms for transferring the data\ndirectly to the client." ] pub mod zwp_primary_selection_offer_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_primary_selection_offer_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_offer_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"receive\0" as * const u8 as * const c_char , signature : b"sh\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_offer_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"offer\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_primary_selection_offer_v1_interface : wl_interface = wl_interface { name : b"zwp_primary_selection_offer_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_primary_selection_offer_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zwp_primary_selection_offer_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_primary_selection_offer_v1_listener { # [ doc = "advertise offered mime type\n\nSent immediately after creating announcing the\nwp_primary_selection_offer through\nwp_primary_selection_device.data_offer. One event is sent per offered\nmime type." ] fn offer ( & mut self , object : * mut zwp_primary_selection_offer_v1 , mime_type : * mut c_char ) { } } pub unsafe fn zwp_primary_selection_offer_v1_set_user_data ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_primary_selection_offer_v1 as _ , user_data ) ; } pub unsafe fn zwp_primary_selection_offer_v1_get_user_data ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_primary_selection_offer_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_offer_v1_get_version ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_primary_selection_offer_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_offer_v1_add_listener ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_primary_selection_offer_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_primary_selection_offer_v1_add_rust_listener ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 , listener : & dyn zwp_primary_selection_offer_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_primary_selection_offer_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_primary_selection_offer_v1_add_listener ( zwp_primary_selection_offer_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "request that the data is transferred\n\nTo transfer the contents of the primary selection clipboard, the client\nissues this request and indicates the mime type that it wants to\nreceive. The transfer happens through the passed file descriptor\n(typically created with the pipe system call). The source client writes\nthe data in the mime type representation requested and then closes the\nfile descriptor.\n\nThe receiving client reads from the read end of the pipe until EOF and\ncloses its end, at which point the transfer is complete." ] pub unsafe fn zwp_primary_selection_offer_v1_receive ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 , mime_type : * const c_char , fd : :: std :: os :: unix :: io :: RawFd ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_offer_v1 as _ , 0u32 , mime_type , fd , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the primary selection offer\n\nDestroy the primary selection offer." ] pub unsafe fn zwp_primary_selection_offer_v1_destroy ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_offer_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_primary_selection_offer_v1 as _ ) ; } } # [ doc = "offer to replace the contents of the primary selection\n\nThe source side of a wp_primary_selection_offer, it provides a way to\ndescribe the offered data and respond to requests to transfer the\nrequested contents of the primary selection clipboard." ] pub mod zwp_primary_selection_source_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_primary_selection_source_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_source_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"offer\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_source_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"send\0" as * const u8 as * const c_char , signature : b"sh\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cancelled\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_primary_selection_source_v1_interface : wl_interface = wl_interface { name : b"zwp_primary_selection_source_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_primary_selection_source_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_primary_selection_source_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_primary_selection_source_v1_listener { # [ doc = "send the primary selection contents\n\nRequest for the current primary selection contents from the client.\nSend the specified mime type over the passed file descriptor, then\nclose it." ] fn send ( & mut self , object : * mut zwp_primary_selection_source_v1 , mime_type : * mut c_char , fd : :: std :: os :: unix :: io :: RawFd ) { } # [ doc = "request for primary selection contents was canceled\n\nThis primary selection source is no longer valid. The client should\nclean up and destroy this primary selection source." ] fn cancelled ( & mut self , object : * mut zwp_primary_selection_source_v1 , ) { } } pub unsafe fn zwp_primary_selection_source_v1_set_user_data ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_primary_selection_source_v1 as _ , user_data ) ; } pub unsafe fn zwp_primary_selection_source_v1_get_user_data ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_primary_selection_source_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_source_v1_get_version ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_primary_selection_source_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_source_v1_add_listener ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_primary_selection_source_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_primary_selection_source_v1_add_rust_listener ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 , listener : & dyn zwp_primary_selection_source_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_primary_selection_source_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_primary_selection_source_v1_add_listener ( zwp_primary_selection_source_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "add an offered mime type\n\nThis request adds a mime type to the set of mime types advertised to\ntargets. Can be called several times to offer multiple types." ] pub unsafe fn zwp_primary_selection_source_v1_offer ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 , mime_type : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_source_v1 as _ , 0u32 , mime_type , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the primary selection source\n\nDestroy the primary selection source." ] pub unsafe fn zwp_primary_selection_source_v1_destroy ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_source_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_primary_selection_source_v1 as _ ) ; } } } pub mod idle { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "User idle time manager\n\nThis interface allows to monitor user idle time on a given seat. The interface\nallows to register timers which trigger after no user activity was registered\non the seat for a given interval. It notifies when user activity resumes.\n\nThis is useful for applications wanting to perform actions when the user is not\ninteracting with the system, e.g. chat applications setting the user as away, power\nmanagement features to dim screen, etc.." ] pub mod org_kde_kwin_idle { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_idle { } static mut org_kde_kwin_idle_requests_get_idle_timeout_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_idle_requests : [ wl_message ; 1 ] = [ wl_message { name : b"get_idle_timeout\0" as * const u8 as * const c_char , signature : b"nou\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_idle_requests_get_idle_timeout_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_idle_interface : wl_interface = wl_interface { name : b"org_kde_kwin_idle\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_kwin_idle_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_idle_listener { } pub unsafe fn org_kde_kwin_idle_set_user_data ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_idle as _ , user_data ) ; } pub unsafe fn org_kde_kwin_idle_get_user_data ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_idle as _ ) ; } pub unsafe fn org_kde_kwin_idle_get_version ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_idle as _ ) ; } pub unsafe fn org_kde_kwin_idle_add_listener ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_idle as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_idle_add_rust_listener ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle , listener : & dyn org_kde_kwin_idle_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_idle_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_idle_add_listener ( org_kde_kwin_idle as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_idle_destroy ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_idle as _ ) ; } pub unsafe fn org_kde_kwin_idle_get_idle_timeout ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle , seat : * mut super :: wl_seat :: wl_seat , timeout : u32 ) -> * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_idle as _ , 0u32 , & super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat , timeout ) ; return r as _ ; } } pub mod org_kde_kwin_idle_timeout { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_idle_timeout { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_idle_timeout_requests : [ wl_message ; 2 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"simulate_user_activity\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_idle_timeout_events : [ wl_message ; 2 ] = [ wl_message { name : b"idle\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"resumed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_idle_timeout_interface : wl_interface = wl_interface { name : b"org_kde_kwin_idle_timeout\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_idle_timeout_requests as * const _ } , event_count : 2 , events : unsafe { & org_kde_kwin_idle_timeout_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_idle_timeout_listener { # [ doc = "Triggered when there has not been any user activity in the requested idle time interval" ] fn idle ( & mut self , object : * mut org_kde_kwin_idle_timeout , ) { } # [ doc = "Triggered on the first user activity after an idle event" ] fn resumed ( & mut self , object : * mut org_kde_kwin_idle_timeout , ) { } } pub unsafe fn org_kde_kwin_idle_timeout_set_user_data ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_idle_timeout as _ , user_data ) ; } pub unsafe fn org_kde_kwin_idle_timeout_get_user_data ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_idle_timeout as _ ) ; } pub unsafe fn org_kde_kwin_idle_timeout_get_version ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_idle_timeout as _ ) ; } pub unsafe fn org_kde_kwin_idle_timeout_add_listener ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_idle_timeout as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_idle_timeout_add_rust_listener ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout , listener : & dyn org_kde_kwin_idle_timeout_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_idle_timeout_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_idle_timeout_add_listener ( org_kde_kwin_idle_timeout as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_idle_timeout_destroy ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_idle_timeout as _ ) ; } # [ doc = "release the timeout object" ] pub unsafe fn org_kde_kwin_idle_timeout_release ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_idle_timeout as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_idle_timeout as _ ) ; } # [ doc = "Simulates user activity for this timeout, behaves just like real user activity on the seat" ] pub unsafe fn org_kde_kwin_idle_timeout_simulate_user_activity ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_idle_timeout as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod remote_access { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Protocol for managing rendered GBM buffers passing" ] pub mod org_kde_kwin_remote_access_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_remote_access_manager { } static mut org_kde_kwin_remote_access_manager_requests_get_buffer_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_remote_access_manager_requests : [ wl_message ; 2 ] = [ wl_message { name : b"get_buffer\0" as * const u8 as * const c_char , signature : b"ni\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_remote_access_manager_requests_get_buffer_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut org_kde_kwin_remote_access_manager_events_buffer_ready_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_remote_access_manager_events : [ wl_message ; 1 ] = [ wl_message { name : b"buffer_ready\0" as * const u8 as * const c_char , signature : b"io\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_remote_access_manager_events_buffer_ready_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_remote_access_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_remote_access_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_remote_access_manager_requests as * const _ } , event_count : 1 , events : unsafe { & org_kde_kwin_remote_access_manager_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_remote_access_manager_listener { # [ doc = "Signals about buffer ready to be consumed by clients" ] fn buffer_ready ( & mut self , object : * mut org_kde_kwin_remote_access_manager , id : i32 , output : * mut super :: wl_output :: wl_output ) { } } pub unsafe fn org_kde_kwin_remote_access_manager_set_user_data ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_remote_access_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_remote_access_manager_get_user_data ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_remote_access_manager as _ ) ; } pub unsafe fn org_kde_kwin_remote_access_manager_get_version ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_remote_access_manager as _ ) ; } pub unsafe fn org_kde_kwin_remote_access_manager_add_listener ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_remote_access_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_remote_access_manager_add_rust_listener ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager , listener : & dyn org_kde_kwin_remote_access_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_remote_access_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_remote_access_manager_add_listener ( org_kde_kwin_remote_access_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_remote_access_manager_destroy ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_remote_access_manager as _ ) ; } # [ doc = "Answer on buffer_ready event, retrieves new buffer from server" ] pub unsafe fn org_kde_kwin_remote_access_manager_get_buffer ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager , internal_buffer_id : i32 ) -> * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_remote_access_manager as _ , 0u32 , & super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , internal_buffer_id ) ; return r as _ ; } # [ doc = "release org_kde_kwin_remote_access_manager interface" ] pub unsafe fn org_kde_kwin_remote_access_manager_release ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_remote_access_manager as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_remote_access_manager as _ ) ; } } # [ doc = "This interface allows finer control of remote buffer lifecycle" ] pub mod org_kde_kwin_remote_buffer { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_remote_buffer { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_remote_buffer_requests : [ wl_message ; 1 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_remote_buffer_events : [ wl_message ; 1 ] = [ wl_message { name : b"gbm_handle\0" as * const u8 as * const c_char , signature : b"huuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_remote_buffer_interface : wl_interface = wl_interface { name : b"org_kde_kwin_remote_buffer\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_kwin_remote_buffer_requests as * const _ } , event_count : 1 , events : unsafe { & org_kde_kwin_remote_buffer_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_remote_buffer_listener { # [ doc = "This is sent after binding to remote access manager" ] fn gbm_handle ( & mut self , object : * mut org_kde_kwin_remote_buffer , fd : :: std :: os :: unix :: io :: RawFd , width : u32 , height : u32 , stride : u32 , format : u32 ) { } } pub unsafe fn org_kde_kwin_remote_buffer_set_user_data ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_remote_buffer as _ , user_data ) ; } pub unsafe fn org_kde_kwin_remote_buffer_get_user_data ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_remote_buffer as _ ) ; } pub unsafe fn org_kde_kwin_remote_buffer_get_version ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_remote_buffer as _ ) ; } pub unsafe fn org_kde_kwin_remote_buffer_add_listener ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_remote_buffer as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_remote_buffer_add_rust_listener ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer , listener : & dyn org_kde_kwin_remote_buffer_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_remote_buffer_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_remote_buffer_add_listener ( org_kde_kwin_remote_buffer as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_remote_buffer_destroy ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_remote_buffer as _ ) ; } # [ doc = "This request comes once client no longer needs this buffer." ] pub unsafe fn org_kde_kwin_remote_buffer_release ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_remote_buffer as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_remote_buffer as _ ) ; } } } pub mod org_kde_plasma_virtual_desktop { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod org_kde_plasma_virtual_desktop_management { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_plasma_virtual_desktop_management { } static mut org_kde_plasma_virtual_desktop_management_requests_get_virtual_desktop_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_virtual_desktop_management_requests : [ wl_message ; 3 ] = [ wl_message { name : b"get_virtual_desktop\0" as * const u8 as * const c_char , signature : b"ns\0" as * const u8 as * const c_char , types : unsafe { & org_kde_plasma_virtual_desktop_management_requests_get_virtual_desktop_types as * const _ } , } , wl_message { name : b"request_create_virtual_desktop\0" as * const u8 as * const c_char , signature : b"su\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"request_remove_virtual_desktop\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_virtual_desktop_management_events : [ wl_message ; 4 ] = [ wl_message { name : b"desktop_created\0" as * const u8 as * const c_char , signature : b"su\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"desktop_removed\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"rows\0" as * const u8 as * const c_char , signature : b"2u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_plasma_virtual_desktop_management_interface : wl_interface = wl_interface { name : b"org_kde_plasma_virtual_desktop_management\0" as * const u8 as * const c_char , version : 2 , request_count : 3 , requests : unsafe { & org_kde_plasma_virtual_desktop_management_requests as * const _ } , event_count : 4 , events : unsafe { & org_kde_plasma_virtual_desktop_management_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_plasma_virtual_desktop_management_listener { # [ doc = "Emitted when a new desktop has been created" ] fn desktop_created ( & mut self , object : * mut org_kde_plasma_virtual_desktop_management , desktop_id : * mut c_char , position : u32 ) { } # [ doc = "Emitted when a desktop has been removed" ] fn desktop_removed ( & mut self , object : * mut org_kde_plasma_virtual_desktop_management , desktop_id : * mut c_char ) { } # [ doc = "sent all information about desktops\n\nThis event is sent after all other properties has been\nsent after binding to the desktop manager object and after any\nother property changes done after that. This allows\nchanges to the org_kde_plasma_virtual_desktop_management properties to be seen as\natomic, even if they happen via multiple events." ] fn done ( & mut self , object : * mut org_kde_plasma_virtual_desktop_management , ) { } # [ doc = "Only available since version 2 of the interface." ] fn rows ( & mut self , object : * mut org_kde_plasma_virtual_desktop_management , rows : u32 ) { } } pub unsafe fn org_kde_plasma_virtual_desktop_management_set_user_data ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_plasma_virtual_desktop_management as _ , user_data ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_management_get_user_data ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_plasma_virtual_desktop_management as _ ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_management_get_version ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_plasma_virtual_desktop_management as _ ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_management_add_listener ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_plasma_virtual_desktop_management as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_management_add_rust_listener ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management , listener : & dyn org_kde_plasma_virtual_desktop_management_listener ) -> bool { let to = ( listener as * const dyn org_kde_plasma_virtual_desktop_management_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_plasma_virtual_desktop_management_add_listener ( org_kde_plasma_virtual_desktop_management as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_plasma_virtual_desktop_management_destroy ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_plasma_virtual_desktop_management as _ ) ; } # [ doc = "get the org_kde_plasma_virtual_desktop interface for a desktop\n\nGiven the id of a particular virtual desktop, get the corresponding org_kde_plasma_virtual_desktop which represents only the desktop with that id;" ] pub unsafe fn org_kde_plasma_virtual_desktop_management_get_virtual_desktop ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management , desktop_id : * const c_char ) -> * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_plasma_virtual_desktop_management as _ , 0u32 , & super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , desktop_id ) ; return r as _ ; } # [ doc = "ask for the creation of a new desktop at a specified position\n\nAsk the server to create a new virtual desktop, and position it at a specified position. If the position is zero or less, it will be positioned at the beginning, if the cosition is the count or more, it will be positioned at the end." ] pub unsafe fn org_kde_plasma_virtual_desktop_management_request_create_virtual_desktop ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management , name : * const c_char , position : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_virtual_desktop_management as _ , 1u32 , name , position , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "ask for a desktop removal identified by id\n\nAsk the server to get rid of a virtual desktop, the server may or may not acconsent to the request." ] pub unsafe fn org_kde_plasma_virtual_desktop_management_request_remove_virtual_desktop ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management , desktop_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_virtual_desktop_management as _ , 2u32 , desktop_id , std :: ptr :: null :: < c_void > ( ) ) ; } } pub mod org_kde_plasma_virtual_desktop { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_plasma_virtual_desktop { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_virtual_desktop_requests : [ wl_message ; 1 ] = [ wl_message { name : b"request_activate\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_virtual_desktop_events : [ wl_message ; 6 ] = [ wl_message { name : b"desktop_id\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"name\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"activated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"deactivated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_plasma_virtual_desktop_interface : wl_interface = wl_interface { name : b"org_kde_plasma_virtual_desktop\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_plasma_virtual_desktop_requests as * const _ } , event_count : 6 , events : unsafe { & org_kde_plasma_virtual_desktop_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_plasma_virtual_desktop_listener { # [ doc = "The desktop got an id\n\nThe format of the id is decided by the compositor implementation. A desktop id univocally identifies a virtual desktop and must be guaranteed to never exist two desktops with the same id. The format of the string id is up to the server implementation." ] fn desktop_id ( & mut self , object : * mut org_kde_plasma_virtual_desktop , desktop_id : * mut c_char ) { } # [ doc = "" ] fn name ( & mut self , object : * mut org_kde_plasma_virtual_desktop , name : * mut c_char ) { } # [ doc = "The desktop has been activated\n\nThe desktop will be the new \"current\" desktop of the system. The server may support either one virtual desktop active at a time, or other combinations such as one virtual desktop active per screen.\nWindows associated to this virtual desktop will be shown." ] fn activated ( & mut self , object : * mut org_kde_plasma_virtual_desktop , ) { } # [ doc = "This desktop is no longer active\n\nWindows that were associated only to this desktop will be hidden." ] fn deactivated ( & mut self , object : * mut org_kde_plasma_virtual_desktop , ) { } # [ doc = "sent all information about desktops\n\nThis event is sent after all other properties has been\nsent after binding to the desktop object and after any\nother property changes done after that. This allows\nchanges to the org_kde_plasma_virtual_desktop properties to be seen as\natomic, even if they happen via multiple events." ] fn done ( & mut self , object : * mut org_kde_plasma_virtual_desktop , ) { } # [ doc = "This desktop has been removed\n\nThis virtual desktop has just been removed by the server:\nAll windows will lose the association to this desktop." ] fn removed ( & mut self , object : * mut org_kde_plasma_virtual_desktop , ) { } } pub unsafe fn org_kde_plasma_virtual_desktop_set_user_data ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_plasma_virtual_desktop as _ , user_data ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_get_user_data ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_plasma_virtual_desktop as _ ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_get_version ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_plasma_virtual_desktop as _ ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_add_listener ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_plasma_virtual_desktop as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_add_rust_listener ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop , listener : & dyn org_kde_plasma_virtual_desktop_listener ) -> bool { let to = ( listener as * const dyn org_kde_plasma_virtual_desktop_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_plasma_virtual_desktop_add_listener ( org_kde_plasma_virtual_desktop as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_plasma_virtual_desktop_destroy ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_plasma_virtual_desktop as _ ) ; } # [ doc = "Requests this desktop to be activated\n\nRequest the server to set the status of this desktop to active: The server is free to consent or deny the request. This will be the new \"current\" virtual desktop of the system." ] pub unsafe fn org_kde_plasma_virtual_desktop_request_activate ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_virtual_desktop as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod xdg_output_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "manage xdg_output objects\n\nA global factory interface for xdg_output objects." ] pub mod zxdg_output_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_output_manager_v1 { } static mut zxdg_output_manager_v1_requests_get_xdg_output_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_output_v1 :: zxdg_output_v1_interface as * const wl_interface } , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_output_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_xdg_output\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zxdg_output_manager_v1_requests_get_xdg_output_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_output_manager_v1_interface : wl_interface = wl_interface { name : b"zxdg_output_manager_v1\0" as * const u8 as * const c_char , version : 3 , request_count : 2 , requests : unsafe { & zxdg_output_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_output_manager_v1_listener { } pub unsafe fn zxdg_output_manager_v1_set_user_data ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_output_manager_v1 as _ , user_data ) ; } pub unsafe fn zxdg_output_manager_v1_get_user_data ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_output_manager_v1 as _ ) ; } pub unsafe fn zxdg_output_manager_v1_get_version ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_output_manager_v1 as _ ) ; } pub unsafe fn zxdg_output_manager_v1_add_listener ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_output_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_output_manager_v1_add_rust_listener ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 , listener : & dyn zxdg_output_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_output_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_output_manager_v1_add_listener ( zxdg_output_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_output_manager object\n\nUsing this request a client can tell the server that it is not\ngoing to use the xdg_output_manager object anymore.\n\nAny objects already created through this instance are not affected." ] pub unsafe fn zxdg_output_manager_v1_destroy ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_output_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_output_manager_v1 as _ ) ; } # [ doc = "create an xdg output from a wl_output\n\nThis creates a new xdg_output object for the given wl_output." ] pub unsafe fn zxdg_output_manager_v1_get_xdg_output ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 , output : * mut super :: wl_output :: wl_output ) -> * mut super :: zxdg_output_v1 :: zxdg_output_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_output_manager_v1 as _ , 1u32 , & super :: zxdg_output_v1 :: zxdg_output_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , output ) ; return r as _ ; } } # [ doc = "compositor logical output region\n\nAn xdg_output describes part of the compositor geometry.\n\nThis typically corresponds to a monitor that displays part of the\ncompositor space.\n\nFor objects version 3 onwards, after all xdg_output properties have been\nsent (when the object is created and when properties are updated), a\nwl_output.done event is sent. This allows changes to the output\nproperties to be seen as atomic, even if they happen via multiple events." ] pub mod zxdg_output_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_output_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_output_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_output_v1_events : [ wl_message ; 5 ] = [ wl_message { name : b"logical_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"logical_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"name\0" as * const u8 as * const c_char , signature : b"2s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"description\0" as * const u8 as * const c_char , signature : b"2s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_output_v1_interface : wl_interface = wl_interface { name : b"zxdg_output_v1\0" as * const u8 as * const c_char , version : 3 , request_count : 1 , requests : unsafe { & zxdg_output_v1_requests as * const _ } , event_count : 5 , events : unsafe { & zxdg_output_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_output_v1_listener { # [ doc = "position of the output within the global compositor space\n\nThe position event describes the location of the wl_output within\nthe global compositor space.\n\nThe logical_position event is sent after creating an xdg_output\n(see xdg_output_manager.get_xdg_output) and whenever the location\nof the output changes within the global compositor space." ] fn logical_position ( & mut self , object : * mut zxdg_output_v1 , x : i32 , y : i32 ) { } # [ doc = "size of the output in the global compositor space\n\nThe logical_size event describes the size of the output in the\nglobal compositor space.\n\nFor example, a surface without any buffer scale, transformation\nnor rotation set, with the size matching the logical_size will\nhave the same size as the corresponding output when displayed.\n\nMost regular Wayland clients should not pay attention to the\nlogical size and would rather rely on xdg_shell interfaces.\n\nSome clients such as Xwayland, however, need this to configure\ntheir surfaces in the global compositor space as the compositor\nmay apply a different scale from what is advertised by the output\nscaling property (to achieve fractional scaling, for example).\n\nFor example, for a wl_output mode 3840\u{d7}2160 and a scale factor 2:\n\n- A compositor not scaling the surface buffers will advertise a\nlogical size of 3840\u{d7}2160,\n\n- A compositor automatically scaling the surface buffers will\nadvertise a logical size of 1920\u{d7}1080,\n\n- A compositor using a fractional scale of 1.5 will advertise a\nlogical size of 2560\u{d7}1440.\n\nFor example, for a wl_output mode 1920\u{d7}1080 and a 90 degree rotation,\nthe compositor will advertise a logical size of 1080x1920.\n\nThe logical_size event is sent after creating an xdg_output\n(see xdg_output_manager.get_xdg_output) and whenever the logical\nsize of the output changes, either as a result of a change in the\napplied scale or because of a change in the corresponding output\nmode(see wl_output.mode) or transform (see wl_output.transform)." ] fn logical_size ( & mut self , object : * mut zxdg_output_v1 , width : i32 , height : i32 ) { } # [ doc = "all information about the output have been sent\n\nThis event is sent after all other properties of an xdg_output\nhave been sent.\n\nThis allows changes to the xdg_output properties to be seen as\natomic, even if they happen via multiple events.\n\nFor objects version 3 onwards, this event is deprecated. Compositors\nare not required to send it anymore and must send wl_output.done\ninstead." ] fn done ( & mut self , object : * mut zxdg_output_v1 , ) { } # [ doc = "name of this output\n\nMany compositors will assign names to their outputs, show them to the\nuser, allow them to be configured by name, etc. The client may wish to\nknow this name as well to offer the user similar behaviors.\n\nThe naming convention is compositor defined, but limited to\nalphanumeric characters and dashes (-). Each name is unique among all\nwl_output globals, but if a wl_output global is destroyed the same name\nmay be reused later. The names will also remain consistent across\nsessions with the same hardware and software configuration.\n\nExamples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc. However, do\nnot assume that the name is a reflection of an underlying DRM\nconnector, X11 connection, etc.\n\nThe name event is sent after creating an xdg_output (see\nxdg_output_manager.get_xdg_output). This event is only sent once per\nxdg_output, and the name does not change over the lifetime of the\nwl_output global.\n\nOnly available since version 2 of the interface." ] fn name ( & mut self , object : * mut zxdg_output_v1 , name : * mut c_char ) { } # [ doc = "human-readable description of this output\n\nMany compositors can produce human-readable descriptions of their\noutputs. The client may wish to know this description as well, to\ncommunicate the user for various purposes.\n\nThe description is a UTF-8 string with no convention defined for its\ncontents. Examples might include 'Foocorp 11\" Display' or 'Virtual X11\noutput via :1'.\n\nThe description event is sent after creating an xdg_output (see\nxdg_output_manager.get_xdg_output) and whenever the description\nchanges. The description is optional, and may not be sent at all.\n\nFor objects of version 2 and lower, this event is only sent once per\nxdg_output, and the description does not change over the lifetime of\nthe wl_output global.\n\nOnly available since version 2 of the interface." ] fn description ( & mut self , object : * mut zxdg_output_v1 , description : * mut c_char ) { } } pub unsafe fn zxdg_output_v1_set_user_data ( zxdg_output_v1 : * mut super :: zxdg_output_v1 :: zxdg_output_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_output_v1 as _ , user_data ) ; } pub unsafe fn zxdg_output_v1_get_user_data ( zxdg_output_v1 : * mut super :: zxdg_output_v1 :: zxdg_output_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_output_v1 as _ ) ; } pub unsafe fn zxdg_output_v1_get_version ( zxdg_output_v1 : * mut super :: zxdg_output_v1 :: zxdg_output_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_output_v1 as _ ) ; } pub unsafe fn zxdg_output_v1_add_listener ( zxdg_output_v1 : * mut super :: zxdg_output_v1 :: zxdg_output_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_output_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_output_v1_add_rust_listener ( zxdg_output_v1 : * mut super :: zxdg_output_v1 :: zxdg_output_v1 , listener : & dyn zxdg_output_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_output_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_output_v1_add_listener ( zxdg_output_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_output object\n\nUsing this request a client can tell the server that it is not\ngoing to use the xdg_output object anymore." ] pub unsafe fn zxdg_output_v1_destroy ( zxdg_output_v1 : * mut super :: zxdg_output_v1 :: zxdg_output_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_output_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_output_v1 as _ ) ; } } } pub mod keystate { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Key States\n\nKeeps track of the states of the different keys that have a state attached to it." ] pub mod org_kde_kwin_keystate { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_keystate { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum key { capslock = 0 , numlock = 1 , scrolllock = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl key { pub fn from_raw ( n : u32 ) -> Option < key > { match n { 0 => Some ( key :: capslock ) , 1 => Some ( key :: numlock ) , 2 => Some ( key :: scrolllock ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum state { unlocked = 0 , latched = 1 , locked = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl state { pub fn from_raw ( n : u32 ) -> Option < state > { match n { 0 => Some ( state :: unlocked ) , 1 => Some ( state :: latched ) , 2 => Some ( state :: locked ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_keystate_requests : [ wl_message ; 1 ] = [ wl_message { name : b"fetchStates\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_keystate_events : [ wl_message ; 1 ] = [ wl_message { name : b"stateChanged\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_keystate_interface : wl_interface = wl_interface { name : b"org_kde_kwin_keystate\0" as * const u8 as * const c_char , version : 3 , request_count : 1 , requests : unsafe { & org_kde_kwin_keystate_requests as * const _ } , event_count : 1 , events : unsafe { & org_kde_kwin_keystate_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_keystate_listener { # [ doc = "Updates the state for a said key" ] fn stateChanged ( & mut self , object : * mut org_kde_kwin_keystate , key : u32 , state : u32 ) { } } pub unsafe fn org_kde_kwin_keystate_set_user_data ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_keystate as _ , user_data ) ; } pub unsafe fn org_kde_kwin_keystate_get_user_data ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_keystate as _ ) ; } pub unsafe fn org_kde_kwin_keystate_get_version ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_keystate as _ ) ; } pub unsafe fn org_kde_kwin_keystate_add_listener ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_keystate as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_keystate_add_rust_listener ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate , listener : & dyn org_kde_kwin_keystate_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_keystate_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_keystate_add_listener ( org_kde_kwin_keystate as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_keystate_destroy ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_keystate as _ ) ; } pub unsafe fn org_kde_kwin_keystate_fetchStates ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_keystate as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod input_timestamps_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "context object for high-resolution input timestamps\n\nA global interface used for requesting high-resolution timestamps\nfor input events." ] pub mod zwp_input_timestamps_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_input_timestamps_manager_v1 { } static mut zwp_input_timestamps_manager_v1_requests_get_keyboard_timestamps_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1_interface as * const wl_interface } , unsafe { & super :: wl_keyboard :: wl_keyboard_interface as * const wl_interface } , ] ; static mut zwp_input_timestamps_manager_v1_requests_get_pointer_timestamps_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , ] ; static mut zwp_input_timestamps_manager_v1_requests_get_touch_timestamps_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1_interface as * const wl_interface } , unsafe { & super :: wl_touch :: wl_touch_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_timestamps_manager_v1_requests : [ wl_message ; 4 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_keyboard_timestamps\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_timestamps_manager_v1_requests_get_keyboard_timestamps_types as * const _ } , } , wl_message { name : b"get_pointer_timestamps\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_timestamps_manager_v1_requests_get_pointer_timestamps_types as * const _ } , } , wl_message { name : b"get_touch_timestamps\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_timestamps_manager_v1_requests_get_touch_timestamps_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_input_timestamps_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_input_timestamps_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 4 , requests : unsafe { & zwp_input_timestamps_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_input_timestamps_manager_v1_listener { } pub unsafe fn zwp_input_timestamps_manager_v1_set_user_data ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_input_timestamps_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_input_timestamps_manager_v1_get_user_data ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_input_timestamps_manager_v1 as _ ) ; } pub unsafe fn zwp_input_timestamps_manager_v1_get_version ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_input_timestamps_manager_v1 as _ ) ; } pub unsafe fn zwp_input_timestamps_manager_v1_add_listener ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_input_timestamps_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_input_timestamps_manager_v1_add_rust_listener ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 , listener : & dyn zwp_input_timestamps_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_input_timestamps_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_input_timestamps_manager_v1_add_listener ( zwp_input_timestamps_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the input timestamps manager object\n\nInforms the server that the client will no longer be using this\nprotocol object. Existing objects created by this object are not\naffected." ] pub unsafe fn zwp_input_timestamps_manager_v1_destroy ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_timestamps_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_input_timestamps_manager_v1 as _ ) ; } # [ doc = "subscribe to high-resolution keyboard timestamp events\n\nCreates a new input timestamps object that represents a subscription\nto high-resolution timestamp events for all wl_keyboard events that\ncarry a timestamp.\n\nIf the associated wl_keyboard object is invalidated, either through\nclient action (e.g. release) or server-side changes, the input\ntimestamps object becomes inert and the client should destroy it\nby calling zwp_input_timestamps_v1.destroy." ] pub unsafe fn zwp_input_timestamps_manager_v1_get_keyboard_timestamps ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 , keyboard : * mut super :: wl_keyboard :: wl_keyboard ) -> * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_input_timestamps_manager_v1 as _ , 1u32 , & super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , keyboard ) ; return r as _ ; } # [ doc = "subscribe to high-resolution pointer timestamp events\n\nCreates a new input timestamps object that represents a subscription\nto high-resolution timestamp events for all wl_pointer events that\ncarry a timestamp.\n\nIf the associated wl_pointer object is invalidated, either through\nclient action (e.g. release) or server-side changes, the input\ntimestamps object becomes inert and the client should destroy it\nby calling zwp_input_timestamps_v1.destroy." ] pub unsafe fn zwp_input_timestamps_manager_v1_get_pointer_timestamps ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 , pointer : * mut super :: wl_pointer :: wl_pointer ) -> * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_input_timestamps_manager_v1 as _ , 2u32 , & super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , pointer ) ; return r as _ ; } # [ doc = "subscribe to high-resolution touch timestamp events\n\nCreates a new input timestamps object that represents a subscription\nto high-resolution timestamp events for all wl_touch events that\ncarry a timestamp.\n\nIf the associated wl_touch object becomes invalid, either through\nclient action (e.g. release) or server-side changes, the input\ntimestamps object becomes inert and the client should destroy it\nby calling zwp_input_timestamps_v1.destroy." ] pub unsafe fn zwp_input_timestamps_manager_v1_get_touch_timestamps ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 , touch : * mut super :: wl_touch :: wl_touch ) -> * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_input_timestamps_manager_v1 as _ , 3u32 , & super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , touch ) ; return r as _ ; } } # [ doc = "context object for input timestamps\n\nProvides high-resolution timestamp events for a set of subscribed input\nevents. The set of subscribed input events is determined by the\nzwp_input_timestamps_manager_v1 request used to create this object." ] pub mod zwp_input_timestamps_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_input_timestamps_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_timestamps_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_timestamps_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"timestamp\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_input_timestamps_v1_interface : wl_interface = wl_interface { name : b"zwp_input_timestamps_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_input_timestamps_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zwp_input_timestamps_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_input_timestamps_v1_listener { # [ doc = "high-resolution timestamp event\n\nThe timestamp event is associated with the first subsequent input event\ncarrying a timestamp which belongs to the set of input events this\nobject is subscribed to.\n\nThe timestamp provided by this event is a high-resolution version of\nthe timestamp argument of the associated input event. The provided\ntimestamp is in the same clock domain and is at least as accurate as\nthe associated input event timestamp.\n\nThe timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples,\neach component being an unsigned 32-bit value. Whole seconds are in\ntv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo,\nand the additional fractional part in tv_nsec as nanoseconds. Hence,\nfor valid timestamps tv_nsec must be in [0, 999999999]." ] fn timestamp ( & mut self , object : * mut zwp_input_timestamps_v1 , tv_sec_hi : u32 , tv_sec_lo : u32 , tv_nsec : u32 ) { } } pub unsafe fn zwp_input_timestamps_v1_set_user_data ( zwp_input_timestamps_v1 : * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_input_timestamps_v1 as _ , user_data ) ; } pub unsafe fn zwp_input_timestamps_v1_get_user_data ( zwp_input_timestamps_v1 : * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_input_timestamps_v1 as _ ) ; } pub unsafe fn zwp_input_timestamps_v1_get_version ( zwp_input_timestamps_v1 : * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_input_timestamps_v1 as _ ) ; } pub unsafe fn zwp_input_timestamps_v1_add_listener ( zwp_input_timestamps_v1 : * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_input_timestamps_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_input_timestamps_v1_add_rust_listener ( zwp_input_timestamps_v1 : * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 , listener : & dyn zwp_input_timestamps_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_input_timestamps_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_input_timestamps_v1_add_listener ( zwp_input_timestamps_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the input timestamps object\n\nInforms the server that the client will no longer be using this\nprotocol object. After the server processes the request, no more\ntimestamp events will be emitted." ] pub unsafe fn zwp_input_timestamps_v1_destroy ( zwp_input_timestamps_v1 : * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_timestamps_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_input_timestamps_v1 as _ ) ; } } } pub mod text_input_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "text input\n\nAn object used for text input. Adds support for text input and input\nmethods to applications. A text_input object is created from a\nwl_text_input_manager and corresponds typically to a text entry in an\napplication.\n\nRequests are used to activate/deactivate the text_input object and set\nstate information like surrounding and selected text or the content type.\nThe information about entered text is sent to the text_input object via\nthe pre-edit and commit events. Using this interface removes the need\nfor applications to directly process hardware key events and compose text\nout of them.\n\nText is generally UTF-8 encoded, indices and lengths are in bytes.\n\nSerials are used to synchronize the state between the text input and\nan input method. New serials are sent by the text input in the\ncommit_state request and are used by the input method to indicate\nthe known text input state in events like preedit_string, commit_string,\nand keysym. The text input can then ignore events from the input method\nwhich are based on an outdated state (for example after a reset).\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_text_input_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_text_input_v1 { } bitflags ! { # [ doc = "content hint\n\nContent hint is a bitmask to allow to modify the behavior of the text\ninput." ] pub struct content_hint : u32 { # [ doc = "no special behaviour" ] const none = 0 ; # [ doc = "auto completion, correction and capitalization" ] const default = 7 ; # [ doc = "hidden and sensitive text" ] const password = 192 ; # [ doc = "suggest word completions" ] const auto_completion = 1 ; # [ doc = "suggest word corrections" ] const auto_correction = 2 ; # [ doc = "switch to uppercase letters at the start of a sentence" ] const auto_capitalization = 4 ; # [ doc = "prefer lowercase letters" ] const lowercase = 8 ; # [ doc = "prefer uppercase letters" ] const uppercase = 16 ; # [ doc = "prefer casing for titles and headings (can be language dependent)" ] const titlecase = 32 ; # [ doc = "characters should be hidden" ] const hidden_text = 64 ; # [ doc = "typed text should not be stored" ] const sensitive_data = 128 ; # [ doc = "just latin characters should be entered" ] const latin = 256 ; # [ doc = "the text input is multiline" ] const multiline = 512 ; } } impl content_hint { pub fn from_raw ( n : u32 ) -> Option < content_hint > { Some ( content_hint :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = "content purpose\n\nThe content purpose allows to specify the primary purpose of a text\ninput.\n\nThis allows an input method to show special purpose input panels with\nextra characters or to disallow some characters." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum content_purpose { # [ doc = "default input, allowing all characters" ] normal = 0 , # [ doc = "allow only alphabetic characters" ] alpha = 1 , # [ doc = "allow only digits" ] digits = 2 , # [ doc = "input a number (including decimal separator and sign)" ] number = 3 , # [ doc = "input a phone number" ] phone = 4 , # [ doc = "input an URL" ] url = 5 , # [ doc = "input an email address" ] email = 6 , # [ doc = "input a name of a person" ] name = 7 , # [ doc = "input a password (combine with password or sensitive_data hint)" ] password = 8 , # [ doc = "input a date" ] date = 9 , # [ doc = "input a time" ] time = 10 , # [ doc = "input a date and time" ] datetime = 11 , # [ doc = "input for a terminal" ] terminal = 12 , # [ doc ( hidden ) ] __nonexhaustive , } impl content_purpose { pub fn from_raw ( n : u32 ) -> Option < content_purpose > { match n { 0 => Some ( content_purpose :: normal ) , 1 => Some ( content_purpose :: alpha ) , 2 => Some ( content_purpose :: digits ) , 3 => Some ( content_purpose :: number ) , 4 => Some ( content_purpose :: phone ) , 5 => Some ( content_purpose :: url ) , 6 => Some ( content_purpose :: email ) , 7 => Some ( content_purpose :: name ) , 8 => Some ( content_purpose :: password ) , 9 => Some ( content_purpose :: date ) , 10 => Some ( content_purpose :: time ) , 11 => Some ( content_purpose :: datetime ) , 12 => Some ( content_purpose :: terminal ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum preedit_style { # [ doc = "default style for composing text" ] default = 0 , # [ doc = "style should be the same as in non-composing text" ] none = 1 , active = 2 , inactive = 3 , highlight = 4 , underline = 5 , selection = 6 , incorrect = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl preedit_style { pub fn from_raw ( n : u32 ) -> Option < preedit_style > { match n { 0 => Some ( preedit_style :: default ) , 1 => Some ( preedit_style :: none ) , 2 => Some ( preedit_style :: active ) , 3 => Some ( preedit_style :: inactive ) , 4 => Some ( preedit_style :: highlight ) , 5 => Some ( preedit_style :: underline ) , 6 => Some ( preedit_style :: selection ) , 7 => Some ( preedit_style :: incorrect ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum text_direction { # [ doc = "automatic text direction based on text and language" ] auto = 0 , # [ doc = "left-to-right" ] ltr = 1 , # [ doc = "right-to-left" ] rtl = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl text_direction { pub fn from_raw ( n : u32 ) -> Option < text_direction > { match n { 0 => Some ( text_direction :: auto ) , 1 => Some ( text_direction :: ltr ) , 2 => Some ( text_direction :: rtl ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_text_input_v1_requests_activate_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut zwp_text_input_v1_requests_deactivate_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_v1_requests : [ wl_message ; 11 ] = [ wl_message { name : b"activate\0" as * const u8 as * const c_char , signature : b"oo\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v1_requests_activate_types as * const _ } , } , wl_message { name : b"deactivate\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v1_requests_deactivate_types as * const _ } , } , wl_message { name : b"show_input_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hide_input_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"reset\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_surrounding_text\0" as * const u8 as * const c_char , signature : b"suu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_content_type\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_cursor_rectangle\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_preferred_language\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_state\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"invoke_action\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_text_input_v1_events_enter_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_v1_events : [ wl_message ; 13 ] = [ wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v1_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifiers_map\0" as * const u8 as * const c_char , signature : b"a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"input_panel_state\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_string\0" as * const u8 as * const c_char , signature : b"uss\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_styling\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_cursor\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_string\0" as * const u8 as * const c_char , signature : b"us\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cursor_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"delete_surrounding_text\0" as * const u8 as * const c_char , signature : b"iu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"keysym\0" as * const u8 as * const c_char , signature : b"uuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"language\0" as * const u8 as * const c_char , signature : b"us\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"text_direction\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_text_input_v1_interface : wl_interface = wl_interface { name : b"zwp_text_input_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 11 , requests : unsafe { & zwp_text_input_v1_requests as * const _ } , event_count : 13 , events : unsafe { & zwp_text_input_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_text_input_v1_listener { # [ doc = "enter event\n\nNotify the text_input object when it received focus. Typically in\nresponse to an activate request." ] fn enter ( & mut self , object : * mut zwp_text_input_v1 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "leave event\n\nNotify the text_input object when it lost focus. Either in response\nto a deactivate request or when the assigned surface lost focus or was\ndestroyed." ] fn leave ( & mut self , object : * mut zwp_text_input_v1 , ) { } # [ doc = "modifiers map\n\nTransfer an array of 0-terminated modifier names. The position in\nthe array is the index of the modifier as used in the modifiers\nbitmask in the keysym event." ] fn modifiers_map ( & mut self , object : * mut zwp_text_input_v1 , map : * mut wl_array ) { } # [ doc = "state of the input panel\n\nNotify when the visibility state of the input panel changed." ] fn input_panel_state ( & mut self , object : * mut zwp_text_input_v1 , state : u32 ) { } # [ doc = "pre-edit\n\nNotify when a new composing text (pre-edit) should be set around the\ncurrent cursor position. Any previously set composing text should\nbe removed.\n\nThe commit text can be used to replace the preedit text on reset\n(for example on unfocus).\n\nThe text input should also handle all preedit_style and preedit_cursor\nevents occurring directly before preedit_string." ] fn preedit_string ( & mut self , object : * mut zwp_text_input_v1 , serial : u32 , text : * mut c_char , commit : * mut c_char ) { } # [ doc = "pre-edit styling\n\nSets styling information on composing text. The style is applied for\nlength bytes from index relative to the beginning of the composing\ntext (as byte offset). Multiple styles can\nbe applied to a composing text by sending multiple preedit_styling\nevents.\n\nThis event is handled as part of a following preedit_string event." ] fn preedit_styling ( & mut self , object : * mut zwp_text_input_v1 , index : u32 , length : u32 , style : preedit_style ) { } # [ doc = "pre-edit cursor\n\nSets the cursor position inside the composing text (as byte\noffset) relative to the start of the composing text. When index is a\nnegative number no cursor is shown.\n\nThis event is handled as part of a following preedit_string event." ] fn preedit_cursor ( & mut self , object : * mut zwp_text_input_v1 , index : i32 ) { } # [ doc = "commit\n\nNotify when text should be inserted into the editor widget. The text to\ncommit could be either just a single character after a key press or the\nresult of some composing (pre-edit). It could also be an empty text\nwhen some text should be removed (see delete_surrounding_text) or when\nthe input cursor should be moved (see cursor_position).\n\nAny previously set composing text should be removed." ] fn commit_string ( & mut self , object : * mut zwp_text_input_v1 , serial : u32 , text : * mut c_char ) { } # [ doc = "set cursor to new position\n\nNotify when the cursor or anchor position should be modified.\n\nThis event should be handled as part of a following commit_string\nevent." ] fn cursor_position ( & mut self , object : * mut zwp_text_input_v1 , index : i32 , anchor : i32 ) { } # [ doc = "delete surrounding text\n\nNotify when the text around the current cursor position should be\ndeleted.\n\nIndex is relative to the current cursor (in bytes).\nLength is the length of deleted text (in bytes).\n\nThis event should be handled as part of a following commit_string\nevent." ] fn delete_surrounding_text ( & mut self , object : * mut zwp_text_input_v1 , index : i32 , length : u32 ) { } # [ doc = "keysym\n\nNotify when a key event was sent. Key events should not be used\nfor normal text input operations, which should be done with\ncommit_string, delete_surrounding_text, etc. The key event follows\nthe wl_keyboard key event convention. Sym is an XKB keysym, state a\nwl_keyboard key_state. Modifiers are a mask for effective modifiers\n(where the modifier indices are set by the modifiers_map event)" ] fn keysym ( & mut self , object : * mut zwp_text_input_v1 , serial : u32 , time : u32 , sym : u32 , state : u32 , modifiers : u32 ) { } # [ doc = "language\n\nSets the language of the input text. The \"language\" argument is an\nRFC-3066 format language tag." ] fn language ( & mut self , object : * mut zwp_text_input_v1 , serial : u32 , language : * mut c_char ) { } # [ doc = "text direction\n\nSets the text direction of input text.\n\nIt is mainly needed for showing an input cursor on the correct side of\nthe editor when there is no input done yet and making sure neutral\ndirection text is laid out properly." ] fn text_direction ( & mut self , object : * mut zwp_text_input_v1 , serial : u32 , direction : text_direction ) { } } pub unsafe fn zwp_text_input_v1_set_user_data ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_text_input_v1 as _ , user_data ) ; } pub unsafe fn zwp_text_input_v1_get_user_data ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_text_input_v1 as _ ) ; } pub unsafe fn zwp_text_input_v1_get_version ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_text_input_v1 as _ ) ; } pub unsafe fn zwp_text_input_v1_add_listener ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_text_input_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_text_input_v1_add_rust_listener ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , listener : & dyn zwp_text_input_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_text_input_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_text_input_v1_add_listener ( zwp_text_input_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_text_input_v1_destroy ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_text_input_v1 as _ ) ; } # [ doc = "request activation\n\nRequests the text_input object to be activated (typically when the\ntext entry gets focus).\n\nThe seat argument is a wl_seat which maintains the focus for this\nactivation. The surface argument is a wl_surface assigned to the\ntext_input object and tracked for focus lost. The enter event\nis emitted on successful activation." ] pub unsafe fn zwp_text_input_v1_activate ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , seat : * mut super :: wl_seat :: wl_seat , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 0u32 , seat , surface , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "request deactivation\n\nRequests the text_input object to be deactivated (typically when the\ntext entry lost focus). The seat argument is a wl_seat which was used\nfor activation." ] pub unsafe fn zwp_text_input_v1_deactivate ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , seat : * mut super :: wl_seat :: wl_seat ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 1u32 , seat , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "show input panels\n\nRequests input panels (virtual keyboard) to show." ] pub unsafe fn zwp_text_input_v1_show_input_panel ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "hide input panels\n\nRequests input panels (virtual keyboard) to hide." ] pub unsafe fn zwp_text_input_v1_hide_input_panel ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "reset\n\nShould be called by an editor widget when the input state should be\nreset, for example after the text was changed outside of the normal\ninput method flow." ] pub unsafe fn zwp_text_input_v1_reset ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 4u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets the surrounding text\n\nSets the plain surrounding text around the input position. Text is\nUTF-8 encoded. Cursor is the byte offset within the\nsurrounding text. Anchor is the byte offset of the\nselection anchor within the surrounding text. If there is no selected\ntext anchor, then it is the same as cursor." ] pub unsafe fn zwp_text_input_v1_set_surrounding_text ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , text : * const c_char , cursor : u32 , anchor : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 5u32 , text , cursor , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set content purpose and hint\n\nSets the content purpose and content hint. While the purpose is the\nbasic purpose of an input field, the hint flags allow to modify some\nof the behavior.\n\nWhen no content type is explicitly set, a normal content purpose with\ndefault hints (auto completion, auto correction, auto capitalization)\nshould be assumed." ] pub unsafe fn zwp_text_input_v1_set_content_type ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , hint : u32 , purpose : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 6u32 , hint , purpose , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zwp_text_input_v1_set_cursor_rectangle ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 7u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets preferred language\n\nSets a specific language. This allows for example a virtual keyboard to\nshow a language specific layout. The \"language\" argument is an RFC-3066\nformat language tag.\n\nIt could be used for example in a word processor to indicate the\nlanguage of the currently edited document or in an instant message\napplication which tracks languages of contacts." ] pub unsafe fn zwp_text_input_v1_set_preferred_language ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , language : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 8u32 , language , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zwp_text_input_v1_commit_state ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 9u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zwp_text_input_v1_invoke_action ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , button : u32 , index : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 10u32 , button , index , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "text input manager\n\nA factory for text_input objects. This object is a global singleton." ] pub mod zwp_text_input_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_text_input_manager_v1 { } static mut zwp_text_input_manager_v1_requests_create_text_input_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_text_input_v1 :: zwp_text_input_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_manager_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create_text_input\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_manager_v1_requests_create_text_input_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_text_input_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_text_input_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_text_input_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_text_input_manager_v1_listener { } pub unsafe fn zwp_text_input_manager_v1_set_user_data ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_text_input_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_text_input_manager_v1_get_user_data ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_text_input_manager_v1 as _ ) ; } pub unsafe fn zwp_text_input_manager_v1_get_version ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_text_input_manager_v1 as _ ) ; } pub unsafe fn zwp_text_input_manager_v1_add_listener ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_text_input_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_text_input_manager_v1_add_rust_listener ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 , listener : & dyn zwp_text_input_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_text_input_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_text_input_manager_v1_add_listener ( zwp_text_input_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_text_input_manager_v1_destroy ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_text_input_manager_v1 as _ ) ; } # [ doc = "create text input\n\nCreates a new text_input object." ] pub unsafe fn zwp_text_input_manager_v1_create_text_input ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 ) -> * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_text_input_manager_v1 as _ , 0u32 , & super :: zwp_text_input_v1 :: zwp_text_input_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } } pub mod server_decoration { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Server side window decoration manager\n\nThis interface allows to coordinate whether the server should create\na server-side window decoration around a wl_surface representing a\nshell surface (wl_shell_surface or similar). By announcing support\nfor this interface the server indicates that it supports server\nside decorations.\n\nUse in conjunction with zxdg_decoration_manager_v1 is undefined." ] pub mod org_kde_kwin_server_decoration_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_server_decoration_manager { } # [ doc = "Possible values to use in request_mode and the event mode." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum mode { # [ doc = "Undecorated: The surface is not decorated at all, neither server nor client-side. An example is a popup surface which should not be decorated." ] None = 0 , # [ doc = "Client-side decoration: The decoration is part of the surface and the client." ] Client = 1 , # [ doc = "Server-side decoration: The server embeds the surface into a decoration frame." ] Server = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl mode { pub fn from_raw ( n : u32 ) -> Option < mode > { match n { 0 => Some ( mode :: None ) , 1 => Some ( mode :: Client ) , 2 => Some ( mode :: Server ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut org_kde_kwin_server_decoration_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_manager_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_server_decoration_manager_requests_create_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_manager_events : [ wl_message ; 1 ] = [ wl_message { name : b"default_mode\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_server_decoration_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_kwin_server_decoration_manager_requests as * const _ } , event_count : 1 , events : unsafe { & org_kde_kwin_server_decoration_manager_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_server_decoration_manager_listener { # [ doc = "The default mode used on the server\n\nThis event is emitted directly after binding the interface. It contains\nthe default mode for the decoration. When a new server decoration object\nis created this new object will be in the default mode until the first\nrequest_mode is requested.\n\nThe server may change the default mode at any time." ] fn default_mode ( & mut self , object : * mut org_kde_kwin_server_decoration_manager , mode : u32 ) { } } pub unsafe fn org_kde_kwin_server_decoration_manager_set_user_data ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_server_decoration_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_server_decoration_manager_get_user_data ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_server_decoration_manager as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_manager_get_version ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_server_decoration_manager as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_manager_add_listener ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_server_decoration_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_manager_add_rust_listener ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager , listener : & dyn org_kde_kwin_server_decoration_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_server_decoration_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_server_decoration_manager_add_listener ( org_kde_kwin_server_decoration_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_server_decoration_manager_destroy ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_server_decoration_manager as _ ) ; } # [ doc = "Create a server-side decoration object for a given surface\n\nWhen a client creates a server-side decoration object it indicates\nthat it supports the protocol. The client is supposed to tell the\nserver whether it wants server-side decorations or will provide\nclient-side decorations.\n\nIf the client does not create a server-side decoration object for\na surface the server interprets this as lack of support for this\nprotocol and considers it as client-side decorated. Nevertheless a\nclient-side decorated surface should use this protocol to indicate\nto the server that it does not want a server-side deco." ] pub unsafe fn org_kde_kwin_server_decoration_manager_create ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_server_decoration_manager as _ , 0u32 , & super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } pub mod org_kde_kwin_server_decoration { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_server_decoration { } # [ doc = "Possible values to use in request_mode and the event mode." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum mode { # [ doc = "Undecorated: The surface is not decorated at all, neither server nor client-side. An example is a popup surface which should not be decorated." ] None = 0 , # [ doc = "Client-side decoration: The decoration is part of the surface and the client." ] Client = 1 , # [ doc = "Server-side decoration: The server embeds the surface into a decoration frame." ] Server = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl mode { pub fn from_raw ( n : u32 ) -> Option < mode > { match n { 0 => Some ( mode :: None ) , 1 => Some ( mode :: Client ) , 2 => Some ( mode :: Server ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_requests : [ wl_message ; 2 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"request_mode\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_events : [ wl_message ; 1 ] = [ wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_interface : wl_interface = wl_interface { name : b"org_kde_kwin_server_decoration\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_server_decoration_requests as * const _ } , event_count : 1 , events : unsafe { & org_kde_kwin_server_decoration_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_server_decoration_listener { # [ doc = "The new decoration mode applied by the server\n\nThis event is emitted directly after the decoration is created and\nrepresents the base decoration policy by the server. E.g. a server\nwhich wants all surfaces to be client-side decorated will send Client,\na server which wants server-side decoration will send Server.\n\nThe client can request a different mode through the decoration request.\nThe server will acknowledge this by another event with the same mode. So\neven if a server prefers server-side decoration it's possible to force a\nclient-side decoration.\n\nThe server may emit this event at any time. In this case the client can\nagain request a different mode. It's the responsibility of the server to\nprevent a feedback loop." ] fn mode ( & mut self , object : * mut org_kde_kwin_server_decoration , mode : u32 ) { } } pub unsafe fn org_kde_kwin_server_decoration_set_user_data ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_server_decoration as _ , user_data ) ; } pub unsafe fn org_kde_kwin_server_decoration_get_user_data ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_server_decoration as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_get_version ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_server_decoration as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_add_listener ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_server_decoration as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_add_rust_listener ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration , listener : & dyn org_kde_kwin_server_decoration_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_server_decoration_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_server_decoration_add_listener ( org_kde_kwin_server_decoration as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_server_decoration_destroy ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_server_decoration as _ ) ; } # [ doc = "release the server decoration object" ] pub unsafe fn org_kde_kwin_server_decoration_release ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_server_decoration as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_server_decoration as _ ) ; } # [ doc = "The decoration mode the surface wants to use." ] pub unsafe fn org_kde_kwin_server_decoration_request_mode ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration , mode : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_server_decoration as _ , 1u32 , mode , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod text_input_unstable_v2 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "text input\n\nThe zwp_text_input_v2 interface represents text input and input methods\nassociated with a seat. It provides enter/leave events to follow the\ntext input focus for a seat.\n\nRequests are used to enable/disable the text-input object and set\nstate information like surrounding and selected text or the content type.\nThe information about the entered text is sent to the text-input object\nvia the pre-edit and commit events. Using this interface removes the need\nfor applications to directly process hardware key events and compose text\nout of them.\n\nText is valid UTF-8 encoded, indices and lengths are in bytes. Indices\nhave to always point to the first byte of an UTF-8 encoded code point.\nLengths are not allowed to contain just a part of an UTF-8 encoded code\npoint.\n\nState is sent by the state requests (set_surrounding_text,\nset_content_type, set_cursor_rectangle and set_preferred_language) and\nan update_state request. After an enter or an input_method_change event\nall state information is invalidated and needs to be resent from the\nclient. A reset or entering a new widget on client side also\ninvalidates all current state information." ] pub mod zwp_text_input_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_text_input_v2 { } bitflags ! { # [ doc = "content hint\n\nContent hint is a bitmask to allow to modify the behavior of the text\ninput." ] pub struct content_hint : u32 { # [ doc = "no special behaviour" ] const none = 0 ; # [ doc = "suggest word completions" ] const auto_completion = 1 ; # [ doc = "suggest word corrections" ] const auto_correction = 2 ; # [ doc = "switch to uppercase letters at the start of a sentence" ] const auto_capitalization = 4 ; # [ doc = "prefer lowercase letters" ] const lowercase = 8 ; # [ doc = "prefer uppercase letters" ] const uppercase = 16 ; # [ doc = "prefer casing for titles and headings (can be language dependent)" ] const titlecase = 32 ; # [ doc = "characters should be hidden" ] const hidden_text = 64 ; # [ doc = "typed text should not be stored" ] const sensitive_data = 128 ; # [ doc = "just latin characters should be entered" ] const latin = 256 ; # [ doc = "the text input is multiline" ] const multiline = 512 ; } } impl content_hint { pub fn from_raw ( n : u32 ) -> Option < content_hint > { Some ( content_hint :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = "content purpose\n\nThe content purpose allows to specify the primary purpose of a text\ninput.\n\nThis allows an input method to show special purpose input panels with\nextra characters or to disallow some characters." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum content_purpose { # [ doc = "default input, allowing all characters" ] normal = 0 , # [ doc = "allow only alphabetic characters" ] alpha = 1 , # [ doc = "allow only digits" ] digits = 2 , # [ doc = "input a number (including decimal separator and sign)" ] number = 3 , # [ doc = "input a phone number" ] phone = 4 , # [ doc = "input an URL" ] url = 5 , # [ doc = "input an email address" ] email = 6 , # [ doc = "input a name of a person" ] name = 7 , # [ doc = "input a password (combine with password or sensitive_data hint)" ] password = 8 , # [ doc = "input a date" ] date = 9 , # [ doc = "input a time" ] time = 10 , # [ doc = "input a date and time" ] datetime = 11 , # [ doc = "input for a terminal" ] terminal = 12 , # [ doc ( hidden ) ] __nonexhaustive , } impl content_purpose { pub fn from_raw ( n : u32 ) -> Option < content_purpose > { match n { 0 => Some ( content_purpose :: normal ) , 1 => Some ( content_purpose :: alpha ) , 2 => Some ( content_purpose :: digits ) , 3 => Some ( content_purpose :: number ) , 4 => Some ( content_purpose :: phone ) , 5 => Some ( content_purpose :: url ) , 6 => Some ( content_purpose :: email ) , 7 => Some ( content_purpose :: name ) , 8 => Some ( content_purpose :: password ) , 9 => Some ( content_purpose :: date ) , 10 => Some ( content_purpose :: time ) , 11 => Some ( content_purpose :: datetime ) , 12 => Some ( content_purpose :: terminal ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "update_state flags\n\nDefines the reason for sending an updated state." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum update_state { # [ doc = "updated state because it changed" ] change = 0 , # [ doc = "full state after enter or input_method_changed event" ] full = 1 , # [ doc = "full state after reset" ] reset = 2 , # [ doc = "full state after switching focus to a different widget on client side" ] enter = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl update_state { pub fn from_raw ( n : u32 ) -> Option < update_state > { match n { 0 => Some ( update_state :: change ) , 1 => Some ( update_state :: full ) , 2 => Some ( update_state :: reset ) , 3 => Some ( update_state :: enter ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum input_panel_visibility { # [ doc = "the input panel (virtual keyboard) is hidden" ] hidden = 0 , # [ doc = "the input panel (virtual keyboard) is visible" ] visible = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl input_panel_visibility { pub fn from_raw ( n : u32 ) -> Option < input_panel_visibility > { match n { 0 => Some ( input_panel_visibility :: hidden ) , 1 => Some ( input_panel_visibility :: visible ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum preedit_style { # [ doc = "default style for composing text" ] default = 0 , # [ doc = "composing text should be shown the same as non-composing text" ] none = 1 , # [ doc = "composing text might be bold" ] active = 2 , # [ doc = "composing text might be cursive" ] inactive = 3 , # [ doc = "composing text might have a different background color" ] highlight = 4 , # [ doc = "composing text might be underlined" ] underline = 5 , # [ doc = "composing text should be shown the same as selected text" ] selection = 6 , # [ doc = "composing text might be underlined with a red wavy line" ] incorrect = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl preedit_style { pub fn from_raw ( n : u32 ) -> Option < preedit_style > { match n { 0 => Some ( preedit_style :: default ) , 1 => Some ( preedit_style :: none ) , 2 => Some ( preedit_style :: active ) , 3 => Some ( preedit_style :: inactive ) , 4 => Some ( preedit_style :: highlight ) , 5 => Some ( preedit_style :: underline ) , 6 => Some ( preedit_style :: selection ) , 7 => Some ( preedit_style :: incorrect ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum text_direction { # [ doc = "automatic text direction based on text and language" ] auto = 0 , # [ doc = "left-to-right" ] ltr = 1 , # [ doc = "right-to-left" ] rtl = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl text_direction { pub fn from_raw ( n : u32 ) -> Option < text_direction > { match n { 0 => Some ( text_direction :: auto ) , 1 => Some ( text_direction :: ltr ) , 2 => Some ( text_direction :: rtl ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_text_input_v2_requests_enable_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut zwp_text_input_v2_requests_disable_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_v2_requests : [ wl_message ; 10 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"enable\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v2_requests_enable_types as * const _ } , } , wl_message { name : b"disable\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v2_requests_disable_types as * const _ } , } , wl_message { name : b"show_input_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hide_input_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_surrounding_text\0" as * const u8 as * const c_char , signature : b"sii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_content_type\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_cursor_rectangle\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_preferred_language\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"update_state\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_text_input_v2_events_enter_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut zwp_text_input_v2_events_leave_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_v2_events : [ wl_message ; 15 ] = [ wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"uo\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v2_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"uo\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v2_events_leave_types as * const _ } , } , wl_message { name : b"input_panel_state\0" as * const u8 as * const c_char , signature : b"uiiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_string\0" as * const u8 as * const c_char , signature : b"ss\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_styling\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_cursor\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_string\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cursor_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"delete_surrounding_text\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifiers_map\0" as * const u8 as * const c_char , signature : b"a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"keysym\0" as * const u8 as * const c_char , signature : b"uuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"language\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"text_direction\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"configure_surrounding_text\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"input_method_changed\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_text_input_v2_interface : wl_interface = wl_interface { name : b"zwp_text_input_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 10 , requests : unsafe { & zwp_text_input_v2_requests as * const _ } , event_count : 15 , events : unsafe { & zwp_text_input_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_text_input_v2_listener { # [ doc = "enter event\n\nNotification that this seat's text-input focus is on a certain surface.\n\nWhen the seat has the keyboard capability the text-input focus follows\nthe keyboard focus." ] fn enter ( & mut self , object : * mut zwp_text_input_v2 , serial : u32 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "leave event\n\nNotification that this seat's text-input focus is no longer on\na certain surface.\n\nThe leave notification is sent before the enter notification\nfor the new focus.\n\nWhen the seat has the keyboard capability the text-input focus follows\nthe keyboard focus." ] fn leave ( & mut self , object : * mut zwp_text_input_v2 , serial : u32 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "state of the input panel\n\nNotification that the visibility of the input panel (virtual keyboard)\nchanged.\n\nThe rectangle x, y, width, height defines the area overlapped by the\ninput panel (virtual keyboard) on the surface having the text\nfocus in surface local coordinates.\n\nThat can be used to make sure widgets are visible and not covered by\na virtual keyboard." ] fn input_panel_state ( & mut self , object : * mut zwp_text_input_v2 , state : input_panel_visibility , x : i32 , y : i32 , width : i32 , height : i32 ) { } # [ doc = "pre-edit\n\nNotify when a new composing text (pre-edit) should be set around the\ncurrent cursor position. Any previously set composing text should\nbe removed.\n\nThe commit text can be used to replace the composing text in some cases\n(for example when losing focus).\n\nThe text input should also handle all preedit_style and preedit_cursor\nevents occurring directly before preedit_string." ] fn preedit_string ( & mut self , object : * mut zwp_text_input_v2 , text : * mut c_char , commit : * mut c_char ) { } # [ doc = "pre-edit styling\n\nSets styling information on composing text. The style is applied for\nlength bytes from index relative to the beginning of the composing\ntext (as byte offset). Multiple styles can be applied to a composing\ntext by sending multiple preedit_styling events.\n\nThis event is handled as part of a following preedit_string event." ] fn preedit_styling ( & mut self , object : * mut zwp_text_input_v2 , index : u32 , length : u32 , style : preedit_style ) { } # [ doc = "pre-edit cursor\n\nSets the cursor position inside the composing text (as byte\noffset) relative to the start of the composing text. When index is a\nnegative number no cursor is shown.\n\nWhen no preedit_cursor event is sent the cursor will be at the end of\nthe composing text by default.\n\nThis event is handled as part of a following preedit_string event." ] fn preedit_cursor ( & mut self , object : * mut zwp_text_input_v2 , index : i32 ) { } # [ doc = "commit\n\nNotify when text should be inserted into the editor widget. The text to\ncommit could be either just a single character after a key press or the\nresult of some composing (pre-edit). It could be also an empty text\nwhen some text should be removed (see delete_surrounding_text) or when\nthe input cursor should be moved (see cursor_position).\n\nAny previously set composing text should be removed." ] fn commit_string ( & mut self , object : * mut zwp_text_input_v2 , text : * mut c_char ) { } # [ doc = "set cursor to new position\n\nNotify when the cursor or anchor position should be modified.\n\nThis event should be handled as part of a following commit_string\nevent.\n\nThe text between anchor and index should be selected." ] fn cursor_position ( & mut self , object : * mut zwp_text_input_v2 , index : i32 , anchor : i32 ) { } # [ doc = "delete surrounding text\n\nNotify when the text around the current cursor position should be\ndeleted. BeforeLength and afterLength is the length (in bytes) of text\nbefore and after the current cursor position (excluding the selection)\nto delete.\n\nThis event should be handled as part of a following commit_string\nor preedit_string event." ] fn delete_surrounding_text ( & mut self , object : * mut zwp_text_input_v2 , before_length : u32 , after_length : u32 ) { } # [ doc = "modifiers map\n\nTransfer an array of 0-terminated modifiers names. The position in\nthe array is the index of the modifier as used in the modifiers\nbitmask in the keysym event." ] fn modifiers_map ( & mut self , object : * mut zwp_text_input_v2 , map : * mut wl_array ) { } # [ doc = "keysym\n\nNotify when a key event was sent. Key events should not be used\nfor normal text input operations, which should be done with\ncommit_string, delete_surrounding_text, etc. The key event follows\nthe wl_keyboard key event convention. Sym is a XKB keysym, state a\nwl_keyboard key_state. Modifiers are a mask for effective modifiers\n(where the modifier indices are set by the modifiers_map event)" ] fn keysym ( & mut self , object : * mut zwp_text_input_v2 , time : u32 , sym : u32 , state : u32 , modifiers : u32 ) { } # [ doc = "language\n\nSets the language of the input text. The \"language\" argument is a RFC-3066\nformat language tag." ] fn language ( & mut self , object : * mut zwp_text_input_v2 , language : * mut c_char ) { } # [ doc = "text direction\n\nSets the text direction of input text.\n\nIt is mainly needed for showing input cursor on correct side of the\neditor when there is no input yet done and making sure neutral\ndirection text is laid out properly." ] fn text_direction ( & mut self , object : * mut zwp_text_input_v2 , direction : text_direction ) { } # [ doc = "configure amount of surrounding text to be sent\n\nConfigure what amount of surrounding text is expected by the\ninput method. The surrounding text will be sent in the\nset_surrounding_text request on the following state information updates." ] fn configure_surrounding_text ( & mut self , object : * mut zwp_text_input_v2 , before_cursor : i32 , after_cursor : i32 ) { } # [ doc = "Notifies about a changed input method\n\nThe input method changed on compositor side, which invalidates all\ncurrent state information. New state information should be sent from\nthe client via state requests (set_surrounding_text,\nset_content_hint, ...) and update_state." ] fn input_method_changed ( & mut self , object : * mut zwp_text_input_v2 , serial : u32 , flags : u32 ) { } } pub unsafe fn zwp_text_input_v2_set_user_data ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_text_input_v2 as _ , user_data ) ; } pub unsafe fn zwp_text_input_v2_get_user_data ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_text_input_v2 as _ ) ; } pub unsafe fn zwp_text_input_v2_get_version ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_text_input_v2 as _ ) ; } pub unsafe fn zwp_text_input_v2_add_listener ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_text_input_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_text_input_v2_add_rust_listener ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , listener : & dyn zwp_text_input_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_text_input_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_text_input_v2_add_listener ( zwp_text_input_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "Destroy the wp_text_input\n\nDestroy the wp_text_input object. Also disables all surfaces enabled\nthrough this wp_text_input object" ] pub unsafe fn zwp_text_input_v2_destroy ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_text_input_v2 as _ ) ; } # [ doc = "enable text input for surface\n\nEnable text input in a surface (usually when a text entry inside of it\nhas focus).\n\nThis can be called before or after a surface gets text (or keyboard)\nfocus via the enter event. Text input to a surface is only active\nwhen it has the current text (or keyboard) focus and is enabled." ] pub unsafe fn zwp_text_input_v2_enable ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "disable text input for surface\n\nDisable text input in a surface (typically when there is no focus on any\ntext entry inside the surface)." ] pub unsafe fn zwp_text_input_v2_disable ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 2u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "show input panels\n\nRequests input panels (virtual keyboard) to show.\n\nThis should be used for example to show a virtual keyboard again\n(with a tap) after it was closed by pressing on a close button on the\nkeyboard." ] pub unsafe fn zwp_text_input_v2_show_input_panel ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "hide input panels\n\nRequests input panels (virtual keyboard) to hide." ] pub unsafe fn zwp_text_input_v2_hide_input_panel ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 4u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets the surrounding text\n\nSets the plain surrounding text around the input position. Text is\nUTF-8 encoded. Cursor is the byte offset within the surrounding text.\nAnchor is the byte offset of the selection anchor within the\nsurrounding text. If there is no selected text, anchor is the same as\ncursor.\n\nMake sure to always send some text before and after the cursor\nexcept when the cursor is at the beginning or end of text.\n\nWhen there was a configure_surrounding_text event take the\nbefore_cursor and after_cursor arguments into account for picking how\nmuch surrounding text to send.\n\nThere is a maximum length of wayland messages so text can not be\nlonger than 4000 bytes." ] pub unsafe fn zwp_text_input_v2_set_surrounding_text ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , text : * const c_char , cursor : i32 , anchor : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 5u32 , text , cursor , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set content purpose and hint\n\nSets the content purpose and content hint. While the purpose is the\nbasic purpose of an input field, the hint flags allow to modify some\nof the behavior.\n\nWhen no content type is explicitly set, a normal content purpose with\nnone hint should be assumed." ] pub unsafe fn zwp_text_input_v2_set_content_type ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , hint : u32 , purpose : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 6u32 , hint , purpose , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set cursor position\n\nSets the cursor outline as a x, y, width, height rectangle in surface\nlocal coordinates.\n\nAllows the compositor to put a window with word suggestions near the\ncursor." ] pub unsafe fn zwp_text_input_v2_set_cursor_rectangle ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 7u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets preferred language\n\nSets a specific language. This allows for example a virtual keyboard to\nshow a language specific layout. The \"language\" argument is a RFC-3066\nformat language tag.\n\nIt could be used for example in a word processor to indicate language of\ncurrently edited document or in an instant message application which\ntracks languages of contacts." ] pub unsafe fn zwp_text_input_v2_set_preferred_language ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , language : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 8u32 , language , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "update state\n\nAllows to atomically send state updates from client.\n\nThis request should follow after a batch of state updating requests\nlike set_surrounding_text, set_content_type, set_cursor_rectangle and\nset_preferred_language.\n\nThe flags field indicates why an updated state is sent to the input\nmethod.\n\nReset should be used by an editor widget after the text was changed\noutside of the normal input method flow.\n\nFor \"change\" it is enough to send the changed state, else the full\nstate should be send.\n\nSerial should be set to the serial from the last enter or\ninput_method_changed event.\n\nTo make sure to not receive outdated input method events after a\nreset or switching to a new widget wl_display_sync() should be used\nafter update_state in these cases." ] pub unsafe fn zwp_text_input_v2_update_state ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , serial : u32 , reason : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 9u32 , serial , reason , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "text input manager\n\nA factory for text-input objects. This object is a global singleton." ] pub mod zwp_text_input_manager_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_text_input_manager_v2 { } static mut zwp_text_input_manager_v2_requests_get_text_input_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_text_input_v2 :: zwp_text_input_v2_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_manager_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_text_input\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_manager_v2_requests_get_text_input_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_text_input_manager_v2_interface : wl_interface = wl_interface { name : b"zwp_text_input_manager_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_text_input_manager_v2_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_text_input_manager_v2_listener { } pub unsafe fn zwp_text_input_manager_v2_set_user_data ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_text_input_manager_v2 as _ , user_data ) ; } pub unsafe fn zwp_text_input_manager_v2_get_user_data ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_text_input_manager_v2 as _ ) ; } pub unsafe fn zwp_text_input_manager_v2_get_version ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_text_input_manager_v2 as _ ) ; } pub unsafe fn zwp_text_input_manager_v2_add_listener ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_text_input_manager_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_text_input_manager_v2_add_rust_listener ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 , listener : & dyn zwp_text_input_manager_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_text_input_manager_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_text_input_manager_v2_add_listener ( zwp_text_input_manager_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "Destroy the wp_text_input_manager\n\nDestroy the wp_text_input_manager object." ] pub unsafe fn zwp_text_input_manager_v2_destroy ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_manager_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_text_input_manager_v2 as _ ) ; } # [ doc = "create a new text input object\n\nCreates a new text-input object for a given seat." ] pub unsafe fn zwp_text_input_manager_v2_get_text_input ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_text_input_manager_v2 as _ , 1u32 , & super :: zwp_text_input_v2 :: zwp_text_input_v2_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat ) ; return r as _ ; } } } pub mod org_kde_kwin_outputdevice { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "output configuration representation\n\nAn outputdevice describes a display device available to the compositor.\noutputdevice is similar to wl_output, but focuses on output\nconfiguration management.\n\nA client can query all global outputdevice objects to enlist all\navailable display devices, even those that may currently not be\nrepresented by the compositor as a wl_output.\n\nThe client sends configuration changes to the server through the\noutputconfiguration interface, and the server applies the configuration\nchanges to the hardware and signals changes to the outputdevices\naccordingly.\n\nThis object is published as global during start up for every available\ndisplay devices, or when one later becomes available, for example by\nbeing hotplugged via a physical connector." ] pub mod org_kde_kwin_outputdevice { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_outputdevice { } # [ doc = "subpixel geometry information\n\nThis enumeration describes how the physical pixels on an output are\nlaid out." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum subpixel { unknown = 0 , none = 1 , horizontal_rgb = 2 , horizontal_bgr = 3 , vertical_rgb = 4 , vertical_bgr = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl subpixel { pub fn from_raw ( n : u32 ) -> Option < subpixel > { match n { 0 => Some ( subpixel :: unknown ) , 1 => Some ( subpixel :: none ) , 2 => Some ( subpixel :: horizontal_rgb ) , 3 => Some ( subpixel :: horizontal_bgr ) , 4 => Some ( subpixel :: vertical_rgb ) , 5 => Some ( subpixel :: vertical_bgr ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "transform from framebuffer to output\n\nThis describes the transform, that a compositor will apply to a\nsurface to compensate for the rotation or mirroring of an\noutput device.\n\nThe flipped values correspond to an initial flip around a\nvertical axis followed by rotation.\n\nThe purpose is mainly to allow clients to render accordingly and\ntell the compositor, so that for fullscreen surfaces, the\ncompositor is still able to scan out directly client surfaces." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum transform { normal = 0 , _90 = 1 , _180 = 2 , _270 = 3 , flipped = 4 , flipped_90 = 5 , flipped_180 = 6 , flipped_270 = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl transform { pub fn from_raw ( n : u32 ) -> Option < transform > { match n { 0 => Some ( transform :: normal ) , 1 => Some ( transform :: _90 ) , 2 => Some ( transform :: _180 ) , 3 => Some ( transform :: _270 ) , 4 => Some ( transform :: flipped ) , 5 => Some ( transform :: flipped_90 ) , 6 => Some ( transform :: flipped_180 ) , 7 => Some ( transform :: flipped_270 ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "mode information\n\nThese flags describe properties of an output mode. They are\nused in the flags bitfield of the mode event." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum mode { # [ doc = "indicates this is the current mode" ] current = 1 , # [ doc = "indicates this is the preferred mode" ] preferred = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl mode { pub fn from_raw ( n : u32 ) -> Option < mode > { match n { 1 => Some ( mode :: current ) , 2 => Some ( mode :: preferred ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "describes enabled state\n\nDescribes whether a device is enabled, i.e. device is used to\ndisplay content by the compositor. This wraps a boolean around\nan int to avoid a boolean trap." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum enablement { disabled = 0 , enabled = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl enablement { pub fn from_raw ( n : u32 ) -> Option < enablement > { match n { 0 => Some ( enablement :: disabled ) , 1 => Some ( enablement :: enabled ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { # [ doc = "describes capabilities of the outputdevice\n\nDescribes what capabilities this device has." ] pub struct capability : u32 { # [ doc = "if this outputdevice can use overscan" ] const overscan = 1 ; # [ doc = "if this outputdevice supports variable refresh rate" ] const vrr = 2 ; } } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { Some ( capability :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = "describes vrr policy\n\nDescribes when the compositor may employ variable refresh rate" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum vrr_policy { never = 0 , always = 1 , automatic = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl vrr_policy { pub fn from_raw ( n : u32 ) -> Option < vrr_policy > { match n { 0 => Some ( vrr_policy :: never ) , 1 => Some ( vrr_policy :: always ) , 2 => Some ( vrr_policy :: automatic ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_outputdevice_events : [ wl_message ; 14 ] = [ wl_message { name : b"geometry\0" as * const u8 as * const c_char , signature : b"iiiiissi\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"uiiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"scale\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"edid\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"enabled\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"uuid\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"scalef\0" as * const u8 as * const c_char , signature : b"2f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"colorcurves\0" as * const u8 as * const c_char , signature : b"2aaa\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"serial_number\0" as * const u8 as * const c_char , signature : b"2s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"eisa_id\0" as * const u8 as * const c_char , signature : b"2s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"overscan\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"vrr_policy\0" as * const u8 as * const c_char , signature : b"4u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_outputdevice_interface : wl_interface = wl_interface { name : b"org_kde_kwin_outputdevice\0" as * const u8 as * const c_char , version : 4 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 14 , events : unsafe { & org_kde_kwin_outputdevice_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_outputdevice_listener { # [ doc = "geometric properties of the output\n\nThe geometry event describes geometric properties of the output.\nThe event is sent when binding to the output object and whenever\nany of the properties change." ] fn geometry ( & mut self , object : * mut org_kde_kwin_outputdevice , x : i32 , y : i32 , physical_width : i32 , physical_height : i32 , subpixel : i32 , make : * mut c_char , model : * mut c_char , transform : i32 ) { } # [ doc = "advertise available output modes and current one\n\nThe mode event describes an available mode for the output.\n\nWhen the client binds to the outputdevice object, the server sends this\nevent once for every available mode the outputdevice can be operated by.\n\nThere will always be at least one event sent out on initial binding,\nwhich represents the current mode.\n\nLater on if an output changes its mode the event is sent again, whereby\nthis event represents the mode that has now become current. In other\nwords, the current mode is always represented by the latest event sent\nwith the current flag set.\n\nThe size of a mode is given in physical hardware units of the output device.\nThis is not necessarily the same as the output size in the global compositor\nspace. For instance, the output may be scaled, as described in\norg_kde_kwin_outputdevice.scale, or transformed, as described in\norg_kde_kwin_outputdevice.transform.\n\nThe id can be used to refer to a mode when calling set_mode on an\norg_kde_kwin_outputconfiguration object." ] fn mode ( & mut self , object : * mut org_kde_kwin_outputdevice , flags : u32 , width : i32 , height : i32 , refresh : i32 , mode_id : i32 ) { } # [ doc = "sent all information about output\n\nThis event is sent after all other properties have been\nsent on binding to the output object as well as after any\nother output property change have been applied later on.\nThis allows to see changes to the output properties as atomic,\neven if multiple events successively announce them." ] fn done ( & mut self , object : * mut org_kde_kwin_outputdevice , ) { } # [ doc = "output scaling properties\n\nThis event contains scaling geometry information\nthat is not in the geometry event. It may be sent after\nbinding the output object or if the output scale changes\nlater. If it is not sent, the client should assume a\nscale of 1.\n\nA scale larger than 1 means that the compositor will\nautomatically scale surface buffers by this amount\nwhen rendering. This is used for high resolution\ndisplays where applications rendering at the native\nresolution would be too small to be legible.\n\nIt is intended that scaling aware clients track the\ncurrent output of a surface, and if it is on a scaled\noutput it should use wl_surface.set_buffer_scale with\nthe scale of the output. That way the compositor can\navoid scaling the surface, and the client can supply\na higher detail image." ] fn scale ( & mut self , object : * mut org_kde_kwin_outputdevice , factor : i32 ) { } # [ doc = "advertise EDID data for the output\n\nThe edid event encapsulates the EDID data for the outputdevice.\n\nThe event is sent when binding to the output object. The EDID\ndata may be empty, in which case this event is sent anyway.\nIf the EDID information is empty, you can fall back to the name\net al. properties of the outputdevice." ] fn edid ( & mut self , object : * mut org_kde_kwin_outputdevice , raw : * mut c_char ) { } # [ doc = "output is enabled or disabled\n\nThe enabled event notifies whether this output is currently\nenabled and used for displaying content by the server.\nThe event is sent when binding to the output object and\nwhenever later on an output changes its state by becoming\nenabled or disabled." ] fn enabled ( & mut self , object : * mut org_kde_kwin_outputdevice , enabled : i32 ) { } # [ doc = "A unique id for this outputdevice\n\nThe uuid can be used to identify the output. It's controlled by\nthe server entirely. The server should make sure the uuid is\npersistent across restarts. An empty uuid is considered invalid." ] fn uuid ( & mut self , object : * mut org_kde_kwin_outputdevice , uuid : * mut c_char ) { } # [ doc = "output scaling properties\n\nThis event contains scaling geometry information\nthat is not in the geometry event. It may be sent after\nbinding the output object or if the output scale changes\nlater. If it is not sent, the client should assume a\nscale of 1.\n\nA scale larger than 1 means that the compositor will\nautomatically scale surface buffers by this amount\nwhen rendering. This is used for high resolution\ndisplays where applications rendering at the native\nresolution would be too small to be legible.\n\nIt is intended that scaling aware clients track the\ncurrent output of a surface, and if it is on a scaled\noutput it should use wl_surface.set_buffer_scale with\nthe scale of the output. That way the compositor can\navoid scaling the surface, and the client can supply\na higher detail image.\n\nwl_output will keep the output scale as an integer. In every situation except\nconfiguring the window manager you want to use that.\n\nOnly available since version 2 of the interface." ] fn scalef ( & mut self , object : * mut org_kde_kwin_outputdevice , factor : wl_fixed_t ) { } # [ doc = "output color curves\n\nDescribes the color intensity profile of the output.\nCommonly used for gamma/color correction.\n\nThe array contains all color ramp values of the output.\nFor example on 8bit screens there are 256 of them.\n\nThe array elements are unsigned 16bit integers.\n\nOnly available since version 2 of the interface." ] fn colorcurves ( & mut self , object : * mut org_kde_kwin_outputdevice , red : * mut wl_array , green : * mut wl_array , blue : * mut wl_array ) { } # [ doc = "Serial Number\n\nSerial ID of the monitor, sent on startup before the first done event.\n\nOnly available since version 2 of the interface." ] fn serial_number ( & mut self , object : * mut org_kde_kwin_outputdevice , serialNumber : * mut c_char ) { } # [ doc = "EISA ID\n\nEISA ID of the monitor, sent on startup before the first done event.\n\nOnly available since version 2 of the interface." ] fn eisa_id ( & mut self , object : * mut org_kde_kwin_outputdevice , eisaId : * mut c_char ) { } # [ doc = "capability flags\n\nWhat capabilities this device has, sent on startup before the first\ndone event.\n\nOnly available since version 3 of the interface." ] fn capabilities ( & mut self , object : * mut org_kde_kwin_outputdevice , flags : capability ) { } # [ doc = "overscan\n\nOverscan value of the monitor in percent, sent on startup before the\nfirst done event.\n\nOnly available since version 3 of the interface." ] fn overscan ( & mut self , object : * mut org_kde_kwin_outputdevice , overscan : u32 ) { } # [ doc = "Variable Refresh Rate Policy\n\nWhat policy the compositor will employ regarding its use of variable\nrefresh rate.\n\nOnly available since version 4 of the interface." ] fn vrr_policy ( & mut self , object : * mut org_kde_kwin_outputdevice , vrr_policy : vrr_policy ) { } } pub unsafe fn org_kde_kwin_outputdevice_set_user_data ( org_kde_kwin_outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_outputdevice as _ , user_data ) ; } pub unsafe fn org_kde_kwin_outputdevice_get_user_data ( org_kde_kwin_outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_outputdevice as _ ) ; } pub unsafe fn org_kde_kwin_outputdevice_get_version ( org_kde_kwin_outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_outputdevice as _ ) ; } pub unsafe fn org_kde_kwin_outputdevice_add_listener ( org_kde_kwin_outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_outputdevice as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_outputdevice_add_rust_listener ( org_kde_kwin_outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , listener : & dyn org_kde_kwin_outputdevice_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_outputdevice_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_outputdevice_add_listener ( org_kde_kwin_outputdevice as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_outputdevice_destroy ( org_kde_kwin_outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_outputdevice as _ ) ; } } } pub mod xwayland_keyboard_grab_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "context object for keyboard grab manager\n\nA global interface used for grabbing the keyboard." ] pub mod zwp_xwayland_keyboard_grab_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_xwayland_keyboard_grab_manager_v1 { } static mut zwp_xwayland_keyboard_grab_manager_v1_requests_grab_keyboard_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_xwayland_keyboard_grab_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"grab_keyboard\0" as * const u8 as * const c_char , signature : b"noo\0" as * const u8 as * const c_char , types : unsafe { & zwp_xwayland_keyboard_grab_manager_v1_requests_grab_keyboard_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_xwayland_keyboard_grab_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_xwayland_keyboard_grab_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_xwayland_keyboard_grab_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_xwayland_keyboard_grab_manager_v1_listener { } pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_set_user_data ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_xwayland_keyboard_grab_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_get_user_data ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_xwayland_keyboard_grab_manager_v1 as _ ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_get_version ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_xwayland_keyboard_grab_manager_v1 as _ ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_add_listener ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_xwayland_keyboard_grab_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_add_rust_listener ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 , listener : & dyn zwp_xwayland_keyboard_grab_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_xwayland_keyboard_grab_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_xwayland_keyboard_grab_manager_v1_add_listener ( zwp_xwayland_keyboard_grab_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the keyboard grab manager\n\nDestroy the keyboard grab manager." ] pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_destroy ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_xwayland_keyboard_grab_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_xwayland_keyboard_grab_manager_v1 as _ ) ; } # [ doc = "grab the keyboard to a surface\n\nThe grab_keyboard request asks for a grab of the keyboard, forcing\nthe keyboard focus for the given seat upon the given surface.\n\nThe protocol provides no guarantee that the grab is ever satisfied,\nand does not require the compositor to send an error if the grab\ncannot ever be satisfied. It is thus possible to request a keyboard\ngrab that will never be effective.\n\nThe protocol:\n\n* does not guarantee that the grab itself is applied for a surface,\nthe grab request may be silently ignored by the compositor,\n* does not guarantee that any events are sent to this client even\nif the grab is applied to a surface,\n* does not guarantee that events sent to this client are exhaustive,\na compositor may filter some events for its own consumption,\n* does not guarantee that events sent to this client are continuous,\na compositor may change and reroute keyboard events while the grab\nis nominally active." ] pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_grab_keyboard ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 , surface : * mut super :: wl_surface :: wl_surface , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_xwayland_keyboard_grab_manager_v1 as _ , 1u32 , & super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface , seat ) ; return r as _ ; } } # [ doc = "interface for grabbing the keyboard\n\nA global interface used for grabbing the keyboard." ] pub mod zwp_xwayland_keyboard_grab_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_xwayland_keyboard_grab_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_xwayland_keyboard_grab_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_xwayland_keyboard_grab_v1_interface : wl_interface = wl_interface { name : b"zwp_xwayland_keyboard_grab_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_xwayland_keyboard_grab_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_xwayland_keyboard_grab_v1_listener { } pub unsafe fn zwp_xwayland_keyboard_grab_v1_set_user_data ( zwp_xwayland_keyboard_grab_v1 : * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_xwayland_keyboard_grab_v1 as _ , user_data ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_v1_get_user_data ( zwp_xwayland_keyboard_grab_v1 : * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_xwayland_keyboard_grab_v1 as _ ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_v1_get_version ( zwp_xwayland_keyboard_grab_v1 : * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_xwayland_keyboard_grab_v1 as _ ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_v1_add_listener ( zwp_xwayland_keyboard_grab_v1 : * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_xwayland_keyboard_grab_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_v1_add_rust_listener ( zwp_xwayland_keyboard_grab_v1 : * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 , listener : & dyn zwp_xwayland_keyboard_grab_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_xwayland_keyboard_grab_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_xwayland_keyboard_grab_v1_add_listener ( zwp_xwayland_keyboard_grab_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the grabbed keyboard object\n\nDestroy the grabbed keyboard object. If applicable, the compositor\nwill ungrab the keyboard." ] pub unsafe fn zwp_xwayland_keyboard_grab_v1_destroy ( zwp_xwayland_keyboard_grab_v1 : * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_xwayland_keyboard_grab_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_xwayland_keyboard_grab_v1 as _ ) ; } } } pub mod xdg_foreign_unstable_v2 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "interface for exporting surfaces\n\nA global interface used for exporting surfaces that can later be imported\nusing xdg_importer." ] pub mod zxdg_exporter_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_exporter_v2 { } # [ doc = "error values\n\nThese errors can be emitted in response to invalid xdg_exporter\nrequests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "surface is not an xdg_toplevel" ] invalid_surface = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_surface ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zxdg_exporter_v2_requests_export_toplevel_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_exported_v2 :: zxdg_exported_v2_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_exporter_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"export_toplevel\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zxdg_exporter_v2_requests_export_toplevel_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_exporter_v2_interface : wl_interface = wl_interface { name : b"zxdg_exporter_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_exporter_v2_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_exporter_v2_listener { } pub unsafe fn zxdg_exporter_v2_set_user_data ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_exporter_v2 as _ , user_data ) ; } pub unsafe fn zxdg_exporter_v2_get_user_data ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_exporter_v2 as _ ) ; } pub unsafe fn zxdg_exporter_v2_get_version ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_exporter_v2 as _ ) ; } pub unsafe fn zxdg_exporter_v2_add_listener ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_exporter_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_exporter_v2_add_rust_listener ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 , listener : & dyn zxdg_exporter_v2_listener ) -> bool { let to = ( listener as * const dyn zxdg_exporter_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_exporter_v2_add_listener ( zxdg_exporter_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_exporter object\n\nNotify the compositor that the xdg_exporter object will no longer be\nused." ] pub unsafe fn zxdg_exporter_v2_destroy ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_exporter_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_exporter_v2 as _ ) ; } # [ doc = "export a toplevel surface\n\nThe export_toplevel request exports the passed surface so that it can later be\nimported via xdg_importer. When called, a new xdg_exported object will\nbe created and xdg_exported.handle will be sent immediately. See the\ncorresponding interface and event for details.\n\nA surface may be exported multiple times, and each exported handle may\nbe used to create an xdg_imported multiple times. Only xdg_toplevel\nequivalent surfaces may be exported, otherwise an invalid_surface\nprotocol error is sent." ] pub unsafe fn zxdg_exporter_v2_export_toplevel ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_exporter_v2 as _ , 1u32 , & super :: zxdg_exported_v2 :: zxdg_exported_v2_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "interface for importing surfaces\n\nA global interface used for importing surfaces exported by xdg_exporter.\nWith this interface, a client can create a reference to a surface of\nanother client." ] pub mod zxdg_importer_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_importer_v2 { } static mut zxdg_importer_v2_requests_import_toplevel_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_imported_v2 :: zxdg_imported_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_importer_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"import_toplevel\0" as * const u8 as * const c_char , signature : b"ns\0" as * const u8 as * const c_char , types : unsafe { & zxdg_importer_v2_requests_import_toplevel_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_importer_v2_interface : wl_interface = wl_interface { name : b"zxdg_importer_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_importer_v2_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_importer_v2_listener { } pub unsafe fn zxdg_importer_v2_set_user_data ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_importer_v2 as _ , user_data ) ; } pub unsafe fn zxdg_importer_v2_get_user_data ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_importer_v2 as _ ) ; } pub unsafe fn zxdg_importer_v2_get_version ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_importer_v2 as _ ) ; } pub unsafe fn zxdg_importer_v2_add_listener ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_importer_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_importer_v2_add_rust_listener ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 , listener : & dyn zxdg_importer_v2_listener ) -> bool { let to = ( listener as * const dyn zxdg_importer_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_importer_v2_add_listener ( zxdg_importer_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_importer object\n\nNotify the compositor that the xdg_importer object will no longer be\nused." ] pub unsafe fn zxdg_importer_v2_destroy ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_importer_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_importer_v2 as _ ) ; } # [ doc = "import a toplevel surface\n\nThe import_toplevel request imports a surface from any client given a handle\nretrieved by exporting said surface using xdg_exporter.export_toplevel.\nWhen called, a new xdg_imported object will be created. This new object\nrepresents the imported surface, and the importing client can\nmanipulate its relationship using it. See xdg_imported for details." ] pub unsafe fn zxdg_importer_v2_import_toplevel ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 , handle : * const c_char ) -> * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_importer_v2 as _ , 1u32 , & super :: zxdg_imported_v2 :: zxdg_imported_v2_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , handle ) ; return r as _ ; } } # [ doc = "an exported surface handle\n\nAn xdg_exported object represents an exported reference to a surface. The\nexported surface may be referenced as long as the xdg_exported object not\ndestroyed. Destroying the xdg_exported invalidates any relationship the\nimporter may have established using xdg_imported." ] pub mod zxdg_exported_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_exported_v2 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_exported_v2_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_exported_v2_events : [ wl_message ; 1 ] = [ wl_message { name : b"handle\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_exported_v2_interface : wl_interface = wl_interface { name : b"zxdg_exported_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zxdg_exported_v2_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_exported_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_exported_v2_listener { # [ doc = "the exported surface handle\n\nThe handle event contains the unique handle of this exported surface\nreference. It may be shared with any client, which then can use it to\nimport the surface by calling xdg_importer.import_toplevel. A handle\nmay be used to import the surface multiple times." ] fn handle ( & mut self , object : * mut zxdg_exported_v2 , handle : * mut c_char ) { } } pub unsafe fn zxdg_exported_v2_set_user_data ( zxdg_exported_v2 : * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_exported_v2 as _ , user_data ) ; } pub unsafe fn zxdg_exported_v2_get_user_data ( zxdg_exported_v2 : * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_exported_v2 as _ ) ; } pub unsafe fn zxdg_exported_v2_get_version ( zxdg_exported_v2 : * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_exported_v2 as _ ) ; } pub unsafe fn zxdg_exported_v2_add_listener ( zxdg_exported_v2 : * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_exported_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_exported_v2_add_rust_listener ( zxdg_exported_v2 : * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 , listener : & dyn zxdg_exported_v2_listener ) -> bool { let to = ( listener as * const dyn zxdg_exported_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_exported_v2_add_listener ( zxdg_exported_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "unexport the exported surface\n\nRevoke the previously exported surface. This invalidates any\nrelationship the importer may have set up using the xdg_imported created\ngiven the handle sent via xdg_exported.handle." ] pub unsafe fn zxdg_exported_v2_destroy ( zxdg_exported_v2 : * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_exported_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_exported_v2 as _ ) ; } } # [ doc = "an imported surface handle\n\nAn xdg_imported object represents an imported reference to surface exported\nby some client. A client can use this interface to manipulate\nrelationships between its own surfaces and the imported surface." ] pub mod zxdg_imported_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_imported_v2 { } # [ doc = "error values\n\nThese errors can be emitted in response to invalid xdg_imported\nrequests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "surface is not an xdg_toplevel" ] invalid_surface = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_surface ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zxdg_imported_v2_requests_set_parent_of_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_imported_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent_of\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zxdg_imported_v2_requests_set_parent_of_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_imported_v2_events : [ wl_message ; 1 ] = [ wl_message { name : b"destroyed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_imported_v2_interface : wl_interface = wl_interface { name : b"zxdg_imported_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_imported_v2_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_imported_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_imported_v2_listener { # [ doc = "the imported surface handle has been destroyed\n\nThe imported surface handle has been destroyed and any relationship set\nup has been invalidated. This may happen for various reasons, for\nexample if the exported surface or the exported surface handle has been\ndestroyed, if the handle used for importing was invalid." ] fn destroyed ( & mut self , object : * mut zxdg_imported_v2 , ) { } } pub unsafe fn zxdg_imported_v2_set_user_data ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_imported_v2 as _ , user_data ) ; } pub unsafe fn zxdg_imported_v2_get_user_data ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_imported_v2 as _ ) ; } pub unsafe fn zxdg_imported_v2_get_version ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_imported_v2 as _ ) ; } pub unsafe fn zxdg_imported_v2_add_listener ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_imported_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_imported_v2_add_rust_listener ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 , listener : & dyn zxdg_imported_v2_listener ) -> bool { let to = ( listener as * const dyn zxdg_imported_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_imported_v2_add_listener ( zxdg_imported_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_imported object\n\nNotify the compositor that it will no longer use the xdg_imported\nobject. Any relationship that may have been set up will at this point\nbe invalidated." ] pub unsafe fn zxdg_imported_v2_destroy ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_imported_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_imported_v2 as _ ) ; } # [ doc = "set as the parent of some surface\n\nSet the imported surface as the parent of some surface of the client.\nThe passed surface must be an xdg_toplevel equivalent, otherwise an\ninvalid_surface protocol error is sent. Calling this function sets up\na surface to surface relation with the same stacking and positioning\nsemantics as xdg_toplevel.set_parent." ] pub unsafe fn zxdg_imported_v2_set_parent_of ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_imported_v2 as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod xdg_decoration_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "window decoration manager\n\nThis interface allows a compositor to announce support for server-side\ndecorations.\n\nA window decoration is a set of window controls as deemed appropriate by\nthe party managing them, such as user interface components used to move,\nresize and change a window's state.\n\nA client can use this protocol to request being decorated by a supporting\ncompositor.\n\nIf compositor and client do not negotiate the use of a server-side\ndecoration using this protocol, clients continue to self-decorate as they\nsee fit.\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zxdg_decoration_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_decoration_manager_v1 { } static mut zxdg_decoration_manager_v1_requests_get_toplevel_decoration_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1_interface as * const wl_interface } , unsafe { & super :: xdg_toplevel :: xdg_toplevel_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_decoration_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_toplevel_decoration\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zxdg_decoration_manager_v1_requests_get_toplevel_decoration_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_decoration_manager_v1_interface : wl_interface = wl_interface { name : b"zxdg_decoration_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_decoration_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_decoration_manager_v1_listener { } pub unsafe fn zxdg_decoration_manager_v1_set_user_data ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_decoration_manager_v1 as _ , user_data ) ; } pub unsafe fn zxdg_decoration_manager_v1_get_user_data ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_decoration_manager_v1 as _ ) ; } pub unsafe fn zxdg_decoration_manager_v1_get_version ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_decoration_manager_v1 as _ ) ; } pub unsafe fn zxdg_decoration_manager_v1_add_listener ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_decoration_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_decoration_manager_v1_add_rust_listener ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 , listener : & dyn zxdg_decoration_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_decoration_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_decoration_manager_v1_add_listener ( zxdg_decoration_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the decoration manager object\n\nDestroy the decoration manager. This doesn't destroy objects created\nwith the manager." ] pub unsafe fn zxdg_decoration_manager_v1_destroy ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_decoration_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_decoration_manager_v1 as _ ) ; } # [ doc = "create a new toplevel decoration object\n\nCreate a new decoration object associated with the given toplevel.\n\nCreating an xdg_toplevel_decoration from an xdg_toplevel which has a\nbuffer attached or committed is a client error, and any attempts by a\nclient to attach or manipulate a buffer prior to the first\nxdg_toplevel_decoration.configure event must also be treated as\nerrors." ] pub unsafe fn zxdg_decoration_manager_v1_get_toplevel_decoration ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 , toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) -> * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_decoration_manager_v1 as _ , 1u32 , & super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , toplevel ) ; return r as _ ; } } # [ doc = "decoration object for a toplevel surface\n\nThe decoration object allows the compositor to toggle server-side window\ndecorations for a toplevel surface. The client can request to switch to\nanother mode.\n\nThe xdg_toplevel_decoration object must be destroyed before its\nxdg_toplevel." ] pub mod zxdg_toplevel_decoration_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_toplevel_decoration_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "xdg_toplevel has a buffer attached before configure" ] unconfigured_buffer = 0 , # [ doc = "xdg_toplevel already has a decoration object" ] already_constructed = 1 , # [ doc = "xdg_toplevel destroyed before the decoration object" ] orphaned = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: unconfigured_buffer ) , 1 => Some ( error :: already_constructed ) , 2 => Some ( error :: orphaned ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "window decoration modes\n\nThese values describe window decoration modes." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum mode { # [ doc = "no server-side window decoration" ] client_side = 1 , # [ doc = "server-side window decoration" ] server_side = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl mode { pub fn from_raw ( n : u32 ) -> Option < mode > { match n { 1 => Some ( mode :: client_side ) , 2 => Some ( mode :: server_side ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_toplevel_decoration_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_mode\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unset_mode\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_toplevel_decoration_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_toplevel_decoration_v1_interface : wl_interface = wl_interface { name : b"zxdg_toplevel_decoration_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & zxdg_toplevel_decoration_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_toplevel_decoration_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_toplevel_decoration_v1_listener { # [ doc = "suggest a surface change\n\nThe configure event asks the client to change its decoration mode. The\nconfigured state should not be applied immediately. Clients must send an\nack_configure in response to this event. See xdg_surface.configure and\nxdg_surface.ack_configure for details.\n\nA configure event can be sent at any time. The specified mode must be\nobeyed by the client." ] fn configure ( & mut self , object : * mut zxdg_toplevel_decoration_v1 , mode : mode ) { } } pub unsafe fn zxdg_toplevel_decoration_v1_set_user_data ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_toplevel_decoration_v1 as _ , user_data ) ; } pub unsafe fn zxdg_toplevel_decoration_v1_get_user_data ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_toplevel_decoration_v1 as _ ) ; } pub unsafe fn zxdg_toplevel_decoration_v1_get_version ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_toplevel_decoration_v1 as _ ) ; } pub unsafe fn zxdg_toplevel_decoration_v1_add_listener ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_toplevel_decoration_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_toplevel_decoration_v1_add_rust_listener ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 , listener : & dyn zxdg_toplevel_decoration_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_toplevel_decoration_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_toplevel_decoration_v1_add_listener ( zxdg_toplevel_decoration_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the decoration object\n\nSwitch back to a mode without any server-side decorations at the next\ncommit." ] pub unsafe fn zxdg_toplevel_decoration_v1_destroy ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_decoration_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_toplevel_decoration_v1 as _ ) ; } # [ doc = "set the decoration mode\n\nSet the toplevel surface decoration mode. This informs the compositor\nthat the client prefers the provided decoration mode.\n\nAfter requesting a decoration mode, the compositor will respond by\nemitting an xdg_surface.configure event. The client should then update\nits content, drawing it without decorations if the received mode is\nserver-side decorations. The client must also acknowledge the configure\nwhen committing the new content (see xdg_surface.ack_configure).\n\nThe compositor can decide not to use the client's mode and enforce a\ndifferent mode instead.\n\nClients whose decoration mode depend on the xdg_toplevel state may send\na set_mode request in response to an xdg_surface.configure event and wait\nfor the next xdg_surface.configure event to prevent unwanted state.\nSuch clients are responsible for preventing configure loops and must\nmake sure not to send multiple successive set_mode requests with the\nsame decoration mode." ] pub unsafe fn zxdg_toplevel_decoration_v1_set_mode ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 , mode : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_decoration_v1 as _ , 1u32 , mode , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "unset the decoration mode\n\nUnset the toplevel surface decoration mode. This informs the compositor\nthat the client doesn't prefer a particular decoration mode.\n\nThis request has the same semantics as set_mode." ] pub unsafe fn zxdg_toplevel_decoration_v1_unset_mode ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_decoration_v1 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod drm_lease_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "lease device\n\nThis protocol is used by Wayland compositors which act as Direct\nRenderering Manager (DRM) masters to lease DRM resources to Wayland\nclients.\n\nThe compositor will advertise one wp_drm_lease_device_v1 global for each\nDRM node. Some time after a client binds to the wp_drm_lease_device_v1\nglobal, the compositor will send a drm_fd event followed by zero, one or\nmore connector events. After all currently available connectors have been\nsent, the compositor will send a wp_drm_lease_device_v1.done event.\n\nWhen the list of connectors available for lease changes the compositor\nwill send wp_drm_lease_device_v1.connector events for added connectors and\nwp_drm_lease_connector_v1.withdrawn events for removed connectors,\nfollowed by a wp_drm_lease_device_v1.done event.\n\nThe compositor will indicate when a device is gone by removing the global\nvia a wl_registry.global_remove event. Upon receiving this event, the\nclient should destroy any matching wp_drm_lease_device_v1 object.\n\nTo destroy a wp_drm_lease_device_v1 object, the client must first issue\na release request. Upon receiving this request, the compositor will\nimmediately send a released event and destroy the object. The client must\ncontinue to process and discard drm_fd and connector events until it\nreceives the released event. Upon receiving the released event, the\nclient can safely cleanup any client-side resources.\n\nWarning! The protocol described in this file is currently in the testing\nphase. Backward compatible changes may be added together with the\ncorresponding interface version bump. Backward incompatible changes can\nonly be done by creating a new major version of the extension." ] pub mod wp_drm_lease_device_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_drm_lease_device_v1 { } static mut wp_drm_lease_device_v1_requests_create_lease_request_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_device_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"create_lease_request\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wp_drm_lease_device_v1_requests_create_lease_request_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wp_drm_lease_device_v1_events_connector_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_device_v1_events : [ wl_message ; 4 ] = [ wl_message { name : b"drm_fd\0" as * const u8 as * const c_char , signature : b"h\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"connector\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wp_drm_lease_device_v1_events_connector_types as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"released\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_drm_lease_device_v1_interface : wl_interface = wl_interface { name : b"wp_drm_lease_device_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & wp_drm_lease_device_v1_requests as * const _ } , event_count : 4 , events : unsafe { & wp_drm_lease_device_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wp_drm_lease_device_v1_listener { # [ doc = "open a non-master fd for this DRM node\n\nThe compositor will send this event when the wp_drm_lease_device_v1\nglobal is bound, although there are no guarantees as to how long this\ntakes - the compositor might need to wait until regaining DRM master.\nThe included fd is a non-master DRM file descriptor opened for this\ndevice and the compositor must not authenticate it.\nThe purpose of this event is to give the client the ability to\nquery DRM and discover information which may help them pick the\nappropriate DRM device or select the appropriate connectors therein." ] fn drm_fd ( & mut self , object : * mut wp_drm_lease_device_v1 , fd : :: std :: os :: unix :: io :: RawFd ) { } # [ doc = "advertise connectors available for leases\n\nThe compositor will use this event to advertise connectors available for\nlease by clients. This object may be passed into a lease request to\nindicate the client would like to lease that connector, see\nwp_drm_lease_request_v1.request_connector for details. While the\ncompositor will make a best effort to not send disconnected connectors,\nno guarantees can be made.\n\nThe compositor must send the drm_fd event before sending connectors.\nAfter the drm_fd event it will send all available connectors but may\nsend additional connectors at any time." ] fn connector ( & mut self , object : * mut wp_drm_lease_device_v1 , id : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 ) { } # [ doc = "signals grouping of connectors\n\nThe compositor will send this event to indicate that it has sent all\ncurrently available connectors after the client binds to the global or\nwhen it updates the connector list, for example on hotplug, drm master\nchange or when a leased connector becomes available again. It will\nsimilarly send this event to group wp_drm_lease_connector_v1.withdrawn\nevents of connectors of this device." ] fn done ( & mut self , object : * mut wp_drm_lease_device_v1 , ) { } # [ doc = "the compositor has finished using the device\n\nThis event is sent in response to the release request and indicates\nthat the compositor is done sending connector events.\nThe compositor will destroy this object immediately after sending the\nevent and it will become invalid. The client should release any\nresources associated with this device after receiving this event." ] fn released ( & mut self , object : * mut wp_drm_lease_device_v1 , ) { } } pub unsafe fn wp_drm_lease_device_v1_set_user_data ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_drm_lease_device_v1 as _ , user_data ) ; } pub unsafe fn wp_drm_lease_device_v1_get_user_data ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_drm_lease_device_v1 as _ ) ; } pub unsafe fn wp_drm_lease_device_v1_get_version ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_drm_lease_device_v1 as _ ) ; } pub unsafe fn wp_drm_lease_device_v1_add_listener ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_drm_lease_device_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_drm_lease_device_v1_add_rust_listener ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 , listener : & dyn wp_drm_lease_device_v1_listener ) -> bool { let to = ( listener as * const dyn wp_drm_lease_device_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_drm_lease_device_v1_add_listener ( wp_drm_lease_device_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wp_drm_lease_device_v1_destroy ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_drm_lease_device_v1 as _ ) ; } # [ doc = "create a lease request object\n\nCreates a lease request object.\n\nSee the documentation for wp_drm_lease_request_v1 for details." ] pub unsafe fn wp_drm_lease_device_v1_create_lease_request ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 ) -> * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wp_drm_lease_device_v1 as _ , 0u32 , & super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "release this object\n\nIndicates the client no longer wishes to use this object. In response\nthe compositor will immediately send the released event and destroy\nthis object. It can however not guarantee that the client won't receive\nconnector events before the released event. The client must not send any\nrequests after this one, doing so will raise a wl_display error.\nExisting connectors, lease request and leases will not be affected." ] pub unsafe fn wp_drm_lease_device_v1_release ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_drm_lease_device_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "a leasable DRM connector\n\nRepresents a DRM connector which is available for lease. These objects are\ncreated via wp_drm_lease_device_v1.connector events, and should be passed\nto lease requests via wp_drm_lease_request_v1.request_connector.\nImmediately after the wp_drm_lease_connector_v1 object is created the\ncompositor will send a name, a description, a connector_id and a done\nevent. When the description is updated the compositor will send a\ndescription event followed by a done event." ] pub mod wp_drm_lease_connector_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_drm_lease_connector_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_connector_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_connector_v1_events : [ wl_message ; 5 ] = [ wl_message { name : b"name\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"description\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"connector_id\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"withdrawn\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_drm_lease_connector_v1_interface : wl_interface = wl_interface { name : b"wp_drm_lease_connector_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wp_drm_lease_connector_v1_requests as * const _ } , event_count : 5 , events : unsafe { & wp_drm_lease_connector_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wp_drm_lease_connector_v1_listener { # [ doc = "name\n\nThe compositor sends this event once the connector is created to\nindicate the name of this connector. This will not change for the\nduration of the Wayland session, but is not guaranteed to be consistent\nbetween sessions." ] fn name ( & mut self , object : * mut wp_drm_lease_connector_v1 , name : * mut c_char ) { } # [ doc = "description\n\nThe compositor sends this event once the connector is created to provide\na human-readable description for this connector, which may be presented\nto the user. The compositor may send this event multiple times over the\nlifetime of this object to reflect changes in the description." ] fn description ( & mut self , object : * mut wp_drm_lease_connector_v1 , description : * mut c_char ) { } # [ doc = "connector_id\n\nThe compositor sends this event once the connector is created to\nindicate the DRM object ID which represents the underlying connector\nthat is being offered. Note that the final lease may include additional\nobject IDs, such as CRTCs and planes." ] fn connector_id ( & mut self , object : * mut wp_drm_lease_connector_v1 , connector_id : u32 ) { } # [ doc = "all properties have been sent\n\nThis event is sent after all properties of a connector have been sent.\nThis allows changes to the properties to be seen as atomic even if they\nhappen via multiple events." ] fn done ( & mut self , object : * mut wp_drm_lease_connector_v1 , ) { } # [ doc = "lease offer withdrawn\n\nSent to indicate that the compositor will no longer honor requests for\nDRM leases which include this connector. The client may still issue a\nlease request including this connector, but the compositor will send\nwp_drm_lease_v1.finished without issuing a lease fd. Compositors are\nencouraged to send this event when they lose access to connector, for\nexample when the connector is hot-unplugged, when the connector gets\nleased to a client or when the compositor loses DRM master." ] fn withdrawn ( & mut self , object : * mut wp_drm_lease_connector_v1 , ) { } } pub unsafe fn wp_drm_lease_connector_v1_set_user_data ( wp_drm_lease_connector_v1 : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_drm_lease_connector_v1 as _ , user_data ) ; } pub unsafe fn wp_drm_lease_connector_v1_get_user_data ( wp_drm_lease_connector_v1 : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_drm_lease_connector_v1 as _ ) ; } pub unsafe fn wp_drm_lease_connector_v1_get_version ( wp_drm_lease_connector_v1 : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_drm_lease_connector_v1 as _ ) ; } pub unsafe fn wp_drm_lease_connector_v1_add_listener ( wp_drm_lease_connector_v1 : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_drm_lease_connector_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_drm_lease_connector_v1_add_rust_listener ( wp_drm_lease_connector_v1 : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 , listener : & dyn wp_drm_lease_connector_v1_listener ) -> bool { let to = ( listener as * const dyn wp_drm_lease_connector_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_drm_lease_connector_v1_add_listener ( wp_drm_lease_connector_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy connector\n\nThe client may send this request to indicate that it will not use this\nconnector. Clients are encouraged to send this after receiving the\n\"withdrawn\" event so that the server can release the resources\nassociated with this connector offer. Neither existing lease requests\nnor leases will be affected." ] pub unsafe fn wp_drm_lease_connector_v1_destroy ( wp_drm_lease_connector_v1 : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_drm_lease_connector_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_drm_lease_connector_v1 as _ ) ; } } # [ doc = "DRM lease request\n\nA client that wishes to lease DRM resources will attach the list of\nconnectors advertised with wp_drm_lease_device_v1.connector that they\nwish to lease, then use wp_drm_lease_request_v1.submit to submit the\nrequest." ] pub mod wp_drm_lease_request_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_drm_lease_request_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "requested a connector from a different lease device" ] wrong_device = 0 , # [ doc = "requested a connector twice" ] duplicate_connector = 1 , # [ doc = "requested a lease without requesting a connector" ] empty_lease = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: wrong_device ) , 1 => Some ( error :: duplicate_connector ) , 2 => Some ( error :: empty_lease ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wp_drm_lease_request_v1_requests_request_connector_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1_interface as * const wl_interface } , ] ; static mut wp_drm_lease_request_v1_requests_submit_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wp_drm_lease_v1 :: wp_drm_lease_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_request_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"request_connector\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wp_drm_lease_request_v1_requests_request_connector_types as * const _ } , } , wl_message { name : b"submit\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wp_drm_lease_request_v1_requests_submit_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_drm_lease_request_v1_interface : wl_interface = wl_interface { name : b"wp_drm_lease_request_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & wp_drm_lease_request_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wp_drm_lease_request_v1_listener { } pub unsafe fn wp_drm_lease_request_v1_set_user_data ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_drm_lease_request_v1 as _ , user_data ) ; } pub unsafe fn wp_drm_lease_request_v1_get_user_data ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_drm_lease_request_v1 as _ ) ; } pub unsafe fn wp_drm_lease_request_v1_get_version ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_drm_lease_request_v1 as _ ) ; } pub unsafe fn wp_drm_lease_request_v1_add_listener ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_drm_lease_request_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_drm_lease_request_v1_add_rust_listener ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 , listener : & dyn wp_drm_lease_request_v1_listener ) -> bool { let to = ( listener as * const dyn wp_drm_lease_request_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_drm_lease_request_v1_add_listener ( wp_drm_lease_request_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wp_drm_lease_request_v1_destroy ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_drm_lease_request_v1 as _ ) ; } # [ doc = "request a connector for this lease\n\nIndicates that the client would like to lease the given connector.\nThis is only used as a suggestion, the compositor may choose to\ninclude any resources in the lease it issues, or change the set of\nleased resources at any time. Compositors are however encouraged to\ninclude the requested connector and other resources necessary\nto drive the connected output in the lease.\n\nRequesting a connector that was created from a different lease device\nthan this lease request raises the wrong_device error. Requesting a\nconnector twice will raise the duplicate_connector error." ] pub unsafe fn wp_drm_lease_request_v1_request_connector ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 , connector : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_drm_lease_request_v1 as _ , 0u32 , connector , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "submit the lease request\n\nSubmits the lease request and creates a new wp_drm_lease_v1 object.\nAfter calling submit the compositor will immediately destroy this\nobject, issuing any more requests will cause a wl_diplay error.\nThe compositor doesn't make any guarantees about the events of the\nlease object, clients cannot expect an immediate response.\nNot requesting any connectors before submitting the lease request\nwill raise the empty_lease error." ] pub unsafe fn wp_drm_lease_request_v1_submit ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 ) -> * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wp_drm_lease_request_v1 as _ , 1u32 , & super :: wp_drm_lease_v1 :: wp_drm_lease_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_drm_lease_request_v1 as _ ) ; return r as _ ; } } # [ doc = "a DRM lease\n\nA DRM lease object is used to transfer the DRM file descriptor to the\nclient and manage the lifetime of the lease.\n\nSome time after the wp_drm_lease_v1 object is created, the compositor\nwill reply with the lease request's result. If the lease request is\ngranted, the compositor will send a lease_fd event. If the lease request\nis denied, the compositor will send a finished event without a lease_fd\nevent." ] pub mod wp_drm_lease_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_drm_lease_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"lease_fd\0" as * const u8 as * const c_char , signature : b"h\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"finished\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_drm_lease_v1_interface : wl_interface = wl_interface { name : b"wp_drm_lease_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wp_drm_lease_v1_requests as * const _ } , event_count : 2 , events : unsafe { & wp_drm_lease_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wp_drm_lease_v1_listener { # [ doc = "shares the DRM file descriptor\n\nThis event returns a file descriptor suitable for use with DRM-related\nioctls. The client should use drmModeGetLease to enumerate the DRM\nobjects which have been leased to them. The compositor guarantees it\nwill not use the leased DRM objects itself until it sends the finished\nevent. If the compositor cannot or will not grant a lease for the\nrequested connectors, it will not send this event, instead sending the\nfinished event.\n\nThe compositor will send this event at most once during this objects\nlifetime." ] fn lease_fd ( & mut self , object : * mut wp_drm_lease_v1 , leased_fd : :: std :: os :: unix :: io :: RawFd ) { } # [ doc = "sent when the lease has been revoked\n\nThe compositor uses this event to either reject a lease request, or if\nit previously sent a lease_fd, to notify the client that the lease has\nbeen revoked. If the client requires a new lease, they should destroy\nthis object and submit a new lease request. The compositor will send\nno further events for this object after sending the finish event.\nCompositors should revoke the lease when any of the leased resources\nbecome unavailable, namely when a hot-unplug occurs or when the\ncompositor loses DRM master." ] fn finished ( & mut self , object : * mut wp_drm_lease_v1 , ) { } } pub unsafe fn wp_drm_lease_v1_set_user_data ( wp_drm_lease_v1 : * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_drm_lease_v1 as _ , user_data ) ; } pub unsafe fn wp_drm_lease_v1_get_user_data ( wp_drm_lease_v1 : * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_drm_lease_v1 as _ ) ; } pub unsafe fn wp_drm_lease_v1_get_version ( wp_drm_lease_v1 : * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_drm_lease_v1 as _ ) ; } pub unsafe fn wp_drm_lease_v1_add_listener ( wp_drm_lease_v1 : * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_drm_lease_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_drm_lease_v1_add_rust_listener ( wp_drm_lease_v1 : * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 , listener : & dyn wp_drm_lease_v1_listener ) -> bool { let to = ( listener as * const dyn wp_drm_lease_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_drm_lease_v1_add_listener ( wp_drm_lease_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroys the lease object\n\nThe client should send this to indicate that it no longer wishes to use\nthis lease. The compositor should use drmModeRevokeLease on the\nappropriate file descriptor, if necessary." ] pub unsafe fn wp_drm_lease_v1_destroy ( wp_drm_lease_v1 : * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_drm_lease_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_drm_lease_v1 as _ ) ; } } } pub mod xdg_shell_unstable_v5 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "create desktop-style surfaces\n\nxdg_shell allows clients to turn a wl_surface into a \"real window\"\nwhich can be dragged, resized, stacked, and moved around by the\nuser. Everything about this interface is suited towards traditional\ndesktop environments." ] pub mod xdg_shell { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_shell { } # [ doc = "latest protocol version\n\nThe 'current' member of this enum gives the version of the\nprotocol. Implementations can compare this to the version\nthey implement using static_assert to ensure the protocol and\nimplementation versions match." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum version { # [ doc = "Always the latest version" ] current = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl version { pub fn from_raw ( n : u32 ) -> Option < version > { match n { 5 => Some ( version :: current ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc = "xdg_shell was destroyed before children" ] defunct_surfaces = 1 , # [ doc = "the client tried to map or destroy a non-topmost popup" ] not_the_topmost_popup = 2 , # [ doc = "the client specified an invalid popup parent surface" ] invalid_popup_parent = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , 1 => Some ( error :: defunct_surfaces ) , 2 => Some ( error :: not_the_topmost_popup ) , 3 => Some ( error :: invalid_popup_parent ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_shell_requests_get_xdg_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: xdg_surface :: xdg_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut xdg_shell_requests_get_xdg_popup_types : [ * const wl_interface ; 7 ] = [ unsafe { & super :: xdg_popup :: xdg_popup_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_shell_requests : [ wl_message ; 5 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"use_unstable_version\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_xdg_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & xdg_shell_requests_get_xdg_surface_types as * const _ } , } , wl_message { name : b"get_xdg_popup\0" as * const u8 as * const c_char , signature : b"nooouii\0" as * const u8 as * const c_char , types : unsafe { & xdg_shell_requests_get_xdg_popup_types as * const _ } , } , wl_message { name : b"pong\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_shell_events : [ wl_message ; 1 ] = [ wl_message { name : b"ping\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_shell_interface : wl_interface = wl_interface { name : b"xdg_shell\0" as * const u8 as * const c_char , version : 1 , request_count : 5 , requests : unsafe { & xdg_shell_requests as * const _ } , event_count : 1 , events : unsafe { & xdg_shell_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_shell_listener { # [ doc = "check if the client is alive\n\nThe ping event asks the client if it's still alive. Pass the\nserial specified in the event back to the compositor by sending\na \"pong\" request back with the specified serial.\n\nCompositors can use this to determine if the client is still\nalive. It's unspecified what will happen if the client doesn't\nrespond to the ping request, or in what timeframe. Clients should\ntry to respond in a reasonable amount of time.\n\nA compositor is free to ping in any way it wants, but a client must\nalways respond to any xdg_shell object it created." ] fn ping ( & mut self , object : * mut xdg_shell , serial : u32 ) { } } pub unsafe fn xdg_shell_set_user_data ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_shell as _ , user_data ) ; } pub unsafe fn xdg_shell_get_user_data ( xdg_shell : * mut super :: xdg_shell :: xdg_shell ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_shell as _ ) ; } pub unsafe fn xdg_shell_get_version ( xdg_shell : * mut super :: xdg_shell :: xdg_shell ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_shell as _ ) ; } pub unsafe fn xdg_shell_add_listener ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_shell as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_shell_add_rust_listener ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , listener : & dyn xdg_shell_listener ) -> bool { let to = ( listener as * const dyn xdg_shell_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_shell_add_listener ( xdg_shell as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy xdg_shell\n\nDestroy this xdg_shell object.\n\nDestroying a bound xdg_shell object while there are surfaces\nstill alive created by this xdg_shell object instance is illegal\nand will result in a protocol error." ] pub unsafe fn xdg_shell_destroy ( xdg_shell : * mut super :: xdg_shell :: xdg_shell ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_shell as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_shell as _ ) ; } # [ doc = "enable use of this unstable version\n\nNegotiate the unstable version of the interface. This\nmechanism is in place to ensure client and server agree on the\nunstable versions of the protocol that they speak or exit\ncleanly if they don't agree. This request will go away once\nthe xdg-shell protocol is stable." ] pub unsafe fn xdg_shell_use_unstable_version ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , version : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_shell as _ , 1u32 , version , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "create a shell surface from a surface\n\nThis creates an xdg_surface for the given surface and gives it the\nxdg_surface role. A wl_surface can only be given an xdg_surface role\nonce. If get_xdg_surface is called with a wl_surface that already has\nan active xdg_surface associated with it, or if it had any other role,\nan error is raised.\n\nSee the documentation of xdg_surface for more details about what an\nxdg_surface is and how it is used." ] pub unsafe fn xdg_shell_get_xdg_surface ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: xdg_surface :: xdg_surface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_shell as _ , 2u32 , & super :: xdg_surface :: xdg_surface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } # [ doc = "create a popup for a surface\n\nThis creates an xdg_popup for the given surface and gives it the\nxdg_popup role. A wl_surface can only be given an xdg_popup role\nonce. If get_xdg_popup is called with a wl_surface that already has\nan active xdg_popup associated with it, or if it had any other role,\nan error is raised.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event.\n\nSee the documentation of xdg_popup for more details about what an\nxdg_popup is and how it is used." ] pub unsafe fn xdg_shell_get_xdg_popup ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , surface : * mut super :: wl_surface :: wl_surface , parent : * mut super :: wl_surface :: wl_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , x : i32 , y : i32 ) -> * mut super :: xdg_popup :: xdg_popup { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_shell as _ , 3u32 , & super :: xdg_popup :: xdg_popup_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface , parent , seat , serial , x , y ) ; return r as _ ; } # [ doc = "respond to a ping event\n\nA client must respond to a ping event with a pong request or\nthe client may be deemed unresponsive." ] pub unsafe fn xdg_shell_pong ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_shell as _ , 4u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "A desktop window\n\nAn interface that may be implemented by a wl_surface, for\nimplementations that provide a desktop-style user interface.\n\nIt provides requests to treat surfaces like windows, allowing to set\nproperties like maximized, fullscreen, minimized, and to move and resize\nthem, and associate metadata like title and app id.\n\nThe client must call wl_surface.commit on the corresponding wl_surface\nfor the xdg_surface state to take effect. Prior to committing the new\nstate, it can set up initial configuration, such as maximizing or setting\na window geometry.\n\nEven without attaching a buffer the compositor must respond to initial\ncommitted configuration, for instance sending a configure event with\nexpected window geometry if the client maximized its surface during\ninitialization.\n\nFor a surface to be mapped by the compositor the client must have\ncommitted both an xdg_surface state and a buffer." ] pub mod xdg_surface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_surface { } # [ doc = "edge values for resizing\n\nThese values are used to indicate which edge of a surface\nis being dragged in a resize operation." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum resize_edge { none = 0 , top = 1 , bottom = 2 , left = 4 , top_left = 5 , bottom_left = 6 , right = 8 , top_right = 9 , bottom_right = 10 , # [ doc ( hidden ) ] __nonexhaustive , } impl resize_edge { pub fn from_raw ( n : u32 ) -> Option < resize_edge > { match n { 0 => Some ( resize_edge :: none ) , 1 => Some ( resize_edge :: top ) , 2 => Some ( resize_edge :: bottom ) , 4 => Some ( resize_edge :: left ) , 5 => Some ( resize_edge :: top_left ) , 6 => Some ( resize_edge :: bottom_left ) , 8 => Some ( resize_edge :: right ) , 9 => Some ( resize_edge :: top_right ) , 10 => Some ( resize_edge :: bottom_right ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "types of state on the surface\n\nThe different state values used on the surface. This is designed for\nstate values like maximized, fullscreen. It is paired with the\nconfigure event to ensure that both the client and the compositor\nsetting the state can be synchronized.\n\nStates set in this way are double-buffered. They will get applied on\nthe next commit.\n\nDesktop environments may extend this enum by taking up a range of\nvalues and documenting the range they chose in this description.\nThey are not required to document the values for the range that they\nchose. Ideally, any good extensions from a desktop environment should\nmake its way into standardization into this enum.\n\nThe current reserved ranges are:\n\n0x0000 - 0x0FFF: xdg-shell core values, documented below.\n0x1000 - 0x1FFF: GNOME\n0x2000 - 0x2FFF: EFL" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum state { # [ doc = "the surface is maximized\n\nThe surface is maximized. The window geometry specified in the configure\nevent must be obeyed by the client." ] maximized = 1 , # [ doc = "the surface is fullscreen\n\nThe surface is fullscreen. The window geometry specified in the configure\nevent must be obeyed by the client." ] fullscreen = 2 , # [ doc = "the surface is being resized\n\nThe surface is being resized. The window geometry specified in the\nconfigure event is a maximum; the client cannot resize beyond it.\nClients that have aspect ratio or cell sizing configuration can use\na smaller size, however." ] resizing = 3 , # [ doc = "the surface is now activated\n\nClient window decorations should be painted as if the window is\nactive. Do not assume this means that the window actually has\nkeyboard or pointer focus." ] activated = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl state { pub fn from_raw ( n : u32 ) -> Option < state > { match n { 1 => Some ( state :: maximized ) , 2 => Some ( state :: fullscreen ) , 3 => Some ( state :: resizing ) , 4 => Some ( state :: activated ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_surface_requests_set_parent_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: xdg_surface :: xdg_surface_interface as * const wl_interface } , ] ; static mut xdg_surface_requests_show_window_menu_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut xdg_surface_requests_move_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut xdg_surface_requests_resize_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut xdg_surface_requests_set_fullscreen_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_surface_requests : [ wl_message ; 14 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_set_parent_types as * const _ } , } , wl_message { name : b"set_title\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_app_id\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"show_window_menu\0" as * const u8 as * const c_char , signature : b"ouii\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_show_window_menu_types as * const _ } , } , wl_message { name : b"move\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_move_types as * const _ } , } , wl_message { name : b"resize\0" as * const u8 as * const c_char , signature : b"ouu\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_resize_types as * const _ } , } , wl_message { name : b"ack_configure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_window_geometry\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_maximized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unset_maximized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_fullscreen\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_set_fullscreen_types as * const _ } , } , wl_message { name : b"unset_fullscreen\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_minimized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_surface_events : [ wl_message ; 2 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"iiau\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"close\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_surface_interface : wl_interface = wl_interface { name : b"xdg_surface\0" as * const u8 as * const c_char , version : 1 , request_count : 14 , requests : unsafe { & xdg_surface_requests as * const _ } , event_count : 2 , events : unsafe { & xdg_surface_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_surface_listener { # [ doc = "suggest a surface change\n\nThe configure event asks the client to resize its surface or to\nchange its state.\n\nThe width and height arguments specify a hint to the window\nabout how its surface should be resized in window geometry\ncoordinates. See set_window_geometry.\n\nIf the width or height arguments are zero, it means the client\nshould decide its own window dimension. This may happen when the\ncompositor need to configure the state of the surface but doesn't\nhave any information about any previous or expected dimension.\n\nThe states listed in the event specify how the width/height\narguments should be interpreted, and possibly how it should be\ndrawn.\n\nClients should arrange their surface for the new size and\nstates, and then send a ack_configure request with the serial\nsent in this configure event at some point before committing\nthe new surface.\n\nIf the client receives multiple configure events before it\ncan respond to one, it is free to discard all but the last\nevent it received." ] fn configure ( & mut self , object : * mut xdg_surface , width : i32 , height : i32 , states : * mut wl_array , serial : u32 ) { } # [ doc = "surface wants to be closed\n\nThe close event is sent by the compositor when the user\nwants the surface to be closed. This should be equivalent to\nthe user clicking the close button in client-side decorations,\nif your application has any...\n\nThis is only a request that the user intends to close your\nwindow. The client may choose to ignore this request, or show\na dialog to ask the user to save their data..." ] fn close ( & mut self , object : * mut xdg_surface , ) { } } pub unsafe fn xdg_surface_set_user_data ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_surface as _ , user_data ) ; } pub unsafe fn xdg_surface_get_user_data ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_surface as _ ) ; } pub unsafe fn xdg_surface_get_version ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_surface as _ ) ; } pub unsafe fn xdg_surface_add_listener ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_surface as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_surface_add_rust_listener ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , listener : & dyn xdg_surface_listener ) -> bool { let to = ( listener as * const dyn xdg_surface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_surface_add_listener ( xdg_surface as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "Destroy the xdg_surface\n\nUnmap and destroy the window. The window will be effectively\nhidden from the user's point of view, and all state like\nmaximization, fullscreen, and so on, will be lost." ] pub unsafe fn xdg_surface_destroy ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_surface as _ ) ; } # [ doc = "set the parent of this surface\n\nSet the \"parent\" of this surface. This window should be stacked\nabove a parent. The parent surface must be mapped as long as this\nsurface is mapped.\n\nParent windows should be set on dialogs, toolboxes, or other\n\"auxiliary\" surfaces, so that the parent is raised when the dialog\nis raised." ] pub unsafe fn xdg_surface_set_parent ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , parent : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 1u32 , parent , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface title\n\nSet a short title for the surface.\n\nThis string may be used to identify the surface in a task bar,\nwindow list, or other user interface elements provided by the\ncompositor.\n\nThe string must be encoded in UTF-8." ] pub unsafe fn xdg_surface_set_title ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , title : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 2u32 , title , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set application ID\n\nSet an application identifier for the surface.\n\nThe app ID identifies the general class of applications to which\nthe surface belongs. The compositor can use this to group multiple\nsurfaces together, or to determine how to launch a new application.\n\nFor D-Bus activatable applications, the app ID is used as the D-Bus\nservice name.\n\nThe compositor shell will try to group application surfaces together\nby their app ID. As a best practice, it is suggested to select app\nID's that match the basename of the application's .desktop file.\nFor example, \"org.freedesktop.FooViewer\" where the .desktop file is\n\"org.freedesktop.FooViewer.desktop\".\n\nSee the desktop-entry specification [0] for more details on\napplication identifiers and how they relate to well-known D-Bus\nnames and .desktop files.\n\n[0] http://standards.freedesktop.org/desktop-entry-spec/" ] pub unsafe fn xdg_surface_set_app_id ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , app_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 3u32 , app_id , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "show the window menu\n\nClients implementing client-side decorations might want to show\na context menu when right-clicking on the decorations, giving the\nuser a menu that they can use to maximize or minimize the window.\n\nThis request asks the compositor to pop up such a window menu at\nthe given position, relative to the local surface coordinates of\nthe parent surface. There are no guarantees as to what menu items\nthe window menu contains.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event." ] pub unsafe fn xdg_surface_show_window_menu ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 4u32 , seat , serial , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive move\n\nStart an interactive, user-driven move of the surface.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event. The passed\nserial is used to determine the type of interactive move (touch,\npointer, etc).\n\nThe server may ignore move requests depending on the state of\nthe surface (e.g. fullscreen or maximized), or if the passed serial\nis no longer valid.\n\nIf triggered, the surface will lose the focus of the device\n(wl_pointer, wl_touch, etc) used for the move. It is up to the\ncompositor to visually indicate that the move is taking place, such as\nupdating a pointer cursor, during the move. There is no guarantee\nthat the device focus will return when the move is completed." ] pub unsafe fn xdg_surface_move ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 5u32 , seat , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive resize\n\nStart a user-driven, interactive resize of the surface.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event. The passed\nserial is used to determine the type of interactive resize (touch,\npointer, etc).\n\nThe server may ignore resize requests depending on the state of\nthe surface (e.g. fullscreen or maximized).\n\nIf triggered, the client will receive configure events with the\n\"resize\" state enum value and the expected sizes. See the \"resize\"\nenum value for more details about what is required. The client\nmust also acknowledge configure events using \"ack_configure\". After\nthe resize is completed, the client will receive another \"configure\"\nevent without the resize state.\n\nIf triggered, the surface also will lose the focus of the device\n(wl_pointer, wl_touch, etc) used for the resize. It is up to the\ncompositor to visually indicate that the resize is taking place,\nsuch as updating a pointer cursor, during the resize. There is no\nguarantee that the device focus will return when the resize is\ncompleted.\n\nThe edges parameter specifies how the surface should be resized,\nand is one of the values of the resize_edge enum. The compositor\nmay use this information to update the surface position for\nexample when dragging the top left corner. The compositor may also\nuse this information to adapt its behavior, e.g. choose an\nappropriate cursor image." ] pub unsafe fn xdg_surface_resize ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , edges : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 6u32 , seat , serial , edges , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "ack a configure event\n\nWhen a configure event is received, if a client commits the\nsurface in response to the configure event, then the client\nmust make an ack_configure request sometime before the commit\nrequest, passing along the serial of the configure event.\n\nFor instance, the compositor might use this information to move\na surface to the top left only when the client has drawn itself\nfor the maximized or fullscreen state.\n\nIf the client receives multiple configure events before it\ncan respond to one, it only has to ack the last configure event.\n\nA client is not required to commit immediately after sending\nan ack_configure request - it may even ack_configure several times\nbefore its next surface commit.\n\nThe compositor expects that the most recently received\nack_configure request at the time of a commit indicates which\nconfigure event the client is responding to." ] pub unsafe fn xdg_surface_ack_configure ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 7u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the new window geometry\n\nThe window geometry of a window is its \"visible bounds\" from the\nuser's perspective. Client-side decorations often have invisible\nportions like drop-shadows which should be ignored for the\npurposes of aligning, placing and constraining windows.\n\nThe window geometry is double buffered, and will be applied at the\ntime wl_surface.commit of the corresponding wl_surface is called.\n\nOnce the window geometry of the surface is set once, it is not\npossible to unset it, and it will remain the same until\nset_window_geometry is called again, even if a new subsurface or\nbuffer is attached.\n\nIf never set, the value is the full bounds of the surface,\nincluding any subsurfaces. This updates dynamically on every\ncommit. This unset mode is meant for extremely simple clients.\n\nIf responding to a configure event, the window geometry in here\nmust respect the sizing negotiations specified by the states in\nthe configure event.\n\nThe arguments are given in the surface local coordinate space of\nthe wl_surface associated with this xdg_surface.\n\nThe width and height must be greater than zero." ] pub unsafe fn xdg_surface_set_window_geometry ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 8u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "maximize the window\n\nMaximize the surface.\n\nAfter requesting that the surface should be maximized, the compositor\nwill respond by emitting a configure event with the \"maximized\" state\nand the required window geometry. The client should then update its\ncontent, drawing it in a maximized state, i.e. without shadow or other\ndecoration outside of the window geometry. The client must also\nacknowledge the configure when committing the new content (see\nack_configure).\n\nIt is up to the compositor to decide how and where to maximize the\nsurface, for example which output and what region of the screen should\nbe used.\n\nIf the surface was already maximized, the compositor will still emit\na configure event with the \"maximized\" state." ] pub unsafe fn xdg_surface_set_maximized ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 9u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "unmaximize the window\n\nUnmaximize the surface.\n\nAfter requesting that the surface should be unmaximized, the compositor\nwill respond by emitting a configure event without the \"maximized\"\nstate. If available, the compositor will include the window geometry\ndimensions the window had prior to being maximized in the configure\nrequest. The client must then update its content, drawing it in a\nregular state, i.e. potentially with shadow, etc. The client must also\nacknowledge the configure when committing the new content (see\nack_configure).\n\nIt is up to the compositor to position the surface after it was\nunmaximized; usually the position the surface had before maximizing, if\napplicable.\n\nIf the surface was already not maximized, the compositor will still\nemit a configure event without the \"maximized\" state." ] pub unsafe fn xdg_surface_unset_maximized ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 10u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the window as fullscreen on a monitor\n\nMake the surface fullscreen.\n\nYou can specify an output that you would prefer to be fullscreen.\nIf this value is NULL, it's up to the compositor to choose which\ndisplay will be used to map this surface.\n\nIf the surface doesn't cover the whole output, the compositor will\nposition the surface in the center of the output and compensate with\nblack borders filling the rest of the output." ] pub unsafe fn xdg_surface_set_fullscreen ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 11u32 , output , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn xdg_surface_unset_fullscreen ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 12u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the window as minimized\n\nRequest that the compositor minimize your surface. There is no\nway to know if the surface is currently minimized, nor is there\nany way to unset minimization on this surface.\n\nIf you are looking to throttle redrawing when minimized, please\ninstead use the wl_surface.frame event for this, as this will\nalso work with live previews on windows in Alt-Tab, Expose or\nsimilar compositor features." ] pub unsafe fn xdg_surface_set_minimized ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 13u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "short-lived, popup surfaces for menus\n\nA popup surface is a short-lived, temporary surface that can be\nused to implement menus. It takes an explicit grab on the surface\nthat will be dismissed when the user dismisses the popup. This can\nbe done by the user clicking outside the surface, using the keyboard,\nor even locking the screen through closing the lid or a timeout.\n\nWhen the popup is dismissed, a popup_done event will be sent out,\nand at the same time the surface will be unmapped. The xdg_popup\nobject is now inert and cannot be reactivated, so clients should\ndestroy it. Explicitly destroying the xdg_popup object will also\ndismiss the popup and unmap the surface.\n\nClients will receive events for all their surfaces during this\ngrab (which is an \"owner-events\" grab in X11 parlance). This is\ndone so that users can navigate through submenus and other\n\"nested\" popup windows without having to dismiss the topmost\npopup.\n\nClients that want to dismiss the popup when another surface of\ntheir own is clicked should dismiss the popup using the destroy\nrequest.\n\nThe parent surface must have either an xdg_surface or xdg_popup\nrole.\n\nSpecifying an xdg_popup for the parent means that the popups are\nnested, with this popup now being the topmost popup. Nested\npopups must be destroyed in the reverse order they were created\nin, e.g. the only popup you are allowed to destroy at all times\nis the topmost one.\n\nIf there is an existing popup when creating a new popup, the\nparent must be the current topmost popup.\n\nA parent surface must be mapped before the new popup is mapped.\n\nWhen compositors choose to dismiss a popup, they will likely\ndismiss every nested popup as well. When a compositor dismisses\npopups, it will follow the same dismissing order as required\nfrom the client.\n\nThe x and y arguments passed when creating the popup object specify\nwhere the top left of the popup should be placed, relative to the\nlocal surface coordinates of the parent surface. See\nxdg_shell.get_xdg_popup.\n\nThe client must call wl_surface.commit on the corresponding wl_surface\nfor the xdg_popup state to take effect.\n\nFor a surface to be mapped by the compositor the client must have\ncommitted both the xdg_popup state and a buffer." ] pub mod xdg_popup { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_popup { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_popup_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_popup_events : [ wl_message ; 1 ] = [ wl_message { name : b"popup_done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_popup_interface : wl_interface = wl_interface { name : b"xdg_popup\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & xdg_popup_requests as * const _ } , event_count : 1 , events : unsafe { & xdg_popup_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_popup_listener { # [ doc = "popup interaction is done\n\nThe popup_done event is sent out when a popup is dismissed by the\ncompositor. The client should destroy the xdg_popup object at this\npoint." ] fn popup_done ( & mut self , object : * mut xdg_popup , ) { } } pub unsafe fn xdg_popup_set_user_data ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_popup as _ , user_data ) ; } pub unsafe fn xdg_popup_get_user_data ( xdg_popup : * mut super :: xdg_popup :: xdg_popup ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_popup as _ ) ; } pub unsafe fn xdg_popup_get_version ( xdg_popup : * mut super :: xdg_popup :: xdg_popup ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_popup as _ ) ; } pub unsafe fn xdg_popup_add_listener ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_popup as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_popup_add_rust_listener ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , listener : & dyn xdg_popup_listener ) -> bool { let to = ( listener as * const dyn xdg_popup_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_popup_add_listener ( xdg_popup as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "remove xdg_popup interface\n\nThis destroys the popup. Explicitly destroying the xdg_popup\nobject will also dismiss the popup, and unmap the surface.\n\nIf this xdg_popup is not the \"topmost\" popup, a protocol error\nwill be sent." ] pub unsafe fn xdg_popup_destroy ( xdg_popup : * mut super :: xdg_popup :: xdg_popup ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_popup as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_popup as _ ) ; } } } pub mod outputmanagement { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "configuration of server outputs through clients\n\nThis interface enables clients to set properties of output devices for screen\nconfiguration purposes via the server. To this end output devices are referenced\nby global org_kde_kwin_outputdevice objects.\n\noutputmanagement (wl_global)\n--------------------------\nrequest:\n* create_configuration -> outputconfiguration (wl_resource)\n\noutputconfiguration (wl_resource)\n--------------------------\nrequests:\n* enable(outputdevice, bool)\n* mode(outputdevice, mode_id)\n* transformation(outputdevice, flag)\n* position(outputdevice, x, y)\n* apply\n\nevents:\n* applied\n* failed\n\nThe server registers one outputmanagement object as a global object. In order\nto configure outputs a client requests create_configuration, which provides a\nresource referencing an outputconfiguration for one-time configuration. That\nway the server knows which requests belong together and can group them by that.\n\nOn the outputconfiguration object the client calls for each output whether the\noutput should be enabled, which mode should be set (by referencing the mode from\nthe list of announced modes) and the output's global position. Once all outputs\nare configured that way, the client calls apply.\nAt that point and not earlier the server should try to apply the configuration.\nIf this succeeds the server emits the applied signal, otherwise the failed\nsignal, such that the configuring client is noticed about the success of its\nconfiguration request.\n\nThrough this design the interface enables atomic output configuration changes if\ninternally supported by the server." ] pub mod org_kde_kwin_outputmanagement { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_outputmanagement { } static mut org_kde_kwin_outputmanagement_requests_create_configuration_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_outputmanagement_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create_configuration\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputmanagement_requests_create_configuration_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_outputmanagement_interface : wl_interface = wl_interface { name : b"org_kde_kwin_outputmanagement\0" as * const u8 as * const c_char , version : 4 , request_count : 1 , requests : unsafe { & org_kde_kwin_outputmanagement_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_outputmanagement_listener { } pub unsafe fn org_kde_kwin_outputmanagement_set_user_data ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_outputmanagement as _ , user_data ) ; } pub unsafe fn org_kde_kwin_outputmanagement_get_user_data ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_outputmanagement as _ ) ; } pub unsafe fn org_kde_kwin_outputmanagement_get_version ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_outputmanagement as _ ) ; } pub unsafe fn org_kde_kwin_outputmanagement_add_listener ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_outputmanagement as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_outputmanagement_add_rust_listener ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement , listener : & dyn org_kde_kwin_outputmanagement_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_outputmanagement_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_outputmanagement_add_listener ( org_kde_kwin_outputmanagement as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_outputmanagement_destroy ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_outputmanagement as _ ) ; } # [ doc = "provide outputconfiguration object for configuring outputs\n\nRequest an outputconfiguration object through which the client can configure\noutput devices." ] pub unsafe fn org_kde_kwin_outputmanagement_create_configuration ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement ) -> * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_outputmanagement as _ , 0u32 , & super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "configure single output devices\n\noutputconfiguration is a client-specific resource that can be used to ask\nthe server to apply changes to available output devices.\n\nThe client receives a list of output devices from the registry. When it wants\nto apply new settings, it creates a configuration object from the\noutputmanagement global, writes changes through this object's enable, scale,\ntransform and mode calls. It then asks the server to apply these settings in\nan atomic fashion, for example through Linux' DRM interface.\n\nThe server signals back whether the new settings have applied successfully\nor failed to apply. outputdevice objects are updated after the changes have been\napplied to the hardware and before the server side sends the applied event." ] pub mod org_kde_kwin_outputconfiguration { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_outputconfiguration { } # [ doc = "describes vrr policy\n\nDescribes when the compositor may employ variable refresh rate" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum vrr_policy { never = 0 , always = 1 , automatic = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl vrr_policy { pub fn from_raw ( n : u32 ) -> Option < vrr_policy > { match n { 0 => Some ( vrr_policy :: never ) , 1 => Some ( vrr_policy :: always ) , 2 => Some ( vrr_policy :: automatic ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut org_kde_kwin_outputconfiguration_requests_enable_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_mode_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_transform_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_position_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_scale_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_scalef_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_colorcurves_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_overscan_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_set_vrr_policy_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_outputconfiguration_requests : [ wl_message ; 11 ] = [ wl_message { name : b"enable\0" as * const u8 as * const c_char , signature : b"oi\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_enable_types as * const _ } , } , wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"oi\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_mode_types as * const _ } , } , wl_message { name : b"transform\0" as * const u8 as * const c_char , signature : b"oi\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_transform_types as * const _ } , } , wl_message { name : b"position\0" as * const u8 as * const c_char , signature : b"oii\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_position_types as * const _ } , } , wl_message { name : b"scale\0" as * const u8 as * const c_char , signature : b"oi\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_scale_types as * const _ } , } , wl_message { name : b"apply\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"scalef\0" as * const u8 as * const c_char , signature : b"2of\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_scalef_types as * const _ } , } , wl_message { name : b"colorcurves\0" as * const u8 as * const c_char , signature : b"2oaaa\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_colorcurves_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"overscan\0" as * const u8 as * const c_char , signature : b"3ou\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_overscan_types as * const _ } , } , wl_message { name : b"set_vrr_policy\0" as * const u8 as * const c_char , signature : b"4ou\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_set_vrr_policy_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_outputconfiguration_events : [ wl_message ; 2 ] = [ wl_message { name : b"applied\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"failed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_outputconfiguration_interface : wl_interface = wl_interface { name : b"org_kde_kwin_outputconfiguration\0" as * const u8 as * const c_char , version : 4 , request_count : 11 , requests : unsafe { & org_kde_kwin_outputconfiguration_requests as * const _ } , event_count : 2 , events : unsafe { & org_kde_kwin_outputconfiguration_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_outputconfiguration_listener { # [ doc = "configuration changes have been applied\n\nSent after the server has successfully applied the changes.\n." ] fn applied ( & mut self , object : * mut org_kde_kwin_outputconfiguration , ) { } # [ doc = "configuration changes failed to apply\n\nSent if the server rejects the changes or failed to apply them." ] fn failed ( & mut self , object : * mut org_kde_kwin_outputconfiguration , ) { } } pub unsafe fn org_kde_kwin_outputconfiguration_set_user_data ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_outputconfiguration as _ , user_data ) ; } pub unsafe fn org_kde_kwin_outputconfiguration_get_user_data ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_outputconfiguration as _ ) ; } pub unsafe fn org_kde_kwin_outputconfiguration_get_version ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_outputconfiguration as _ ) ; } pub unsafe fn org_kde_kwin_outputconfiguration_add_listener ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_outputconfiguration as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_outputconfiguration_add_rust_listener ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , listener : & dyn org_kde_kwin_outputconfiguration_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_outputconfiguration_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_outputconfiguration_add_listener ( org_kde_kwin_outputconfiguration as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "enable or disable an output\n\nMark the output as enabled or disabled." ] pub unsafe fn org_kde_kwin_outputconfiguration_enable ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , enable : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 0u32 , outputdevice , enable , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "switch outputdevice to mode\n\nSets the mode for a given output by its mode size (width and height) and refresh rate." ] pub unsafe fn org_kde_kwin_outputconfiguration_mode ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , mode_id : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 1u32 , outputdevice , mode_id , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "transform outputdevice\n\nSets the transformation for a given output." ] pub unsafe fn org_kde_kwin_outputconfiguration_transform ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , transform : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 2u32 , outputdevice , transform , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "position output in global space\n\nSets the position for this output device. (x,y) describe the top-left corner\nof the output in global space, whereby the origin (0,0) of the global space\nhas to be aligned with the top-left corner of the most left and in case this\ndoes not define a single one the top output.\n\nThere may be no gaps or overlaps between outputs, i.e. the outputs are\nstacked horizontally, vertically, or both on each other." ] pub unsafe fn org_kde_kwin_outputconfiguration_position ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 3u32 , outputdevice , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set scaling factor of this output\n\nSets the scaling factor for this output device." ] pub unsafe fn org_kde_kwin_outputconfiguration_scale ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , scale : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 4u32 , outputdevice , scale , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "apply configuration changes to all output devices\n\nAsks the server to apply property changes requested through this outputconfiguration\nobject to all outputs on the server side." ] pub unsafe fn org_kde_kwin_outputconfiguration_apply ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 5u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set scaling factor of this output\n\nSets the scaling factor for this output device.\nSending both scale and scalef is undefined." ] pub unsafe fn org_kde_kwin_outputconfiguration_scalef ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , scale : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 6u32 , outputdevice , scale , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set output color curves\n\nSet color curves of output devices through RGB color ramps. Allows color\ncorrection of output device from user space.\n\nThese are the raw values. A compositor might opt to adjust these values\ninternally, for example to shift color temperature at night." ] pub unsafe fn org_kde_kwin_outputconfiguration_colorcurves ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , red : * mut wl_array , green : * mut wl_array , blue : * mut wl_array ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 7u32 , outputdevice , red , green , blue , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the outputconfiguration object" ] pub unsafe fn org_kde_kwin_outputconfiguration_destroy ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 8u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_outputconfiguration as _ ) ; } # [ doc = "set overscan value\n\nSet the overscan value of this output device with a value in percent." ] pub unsafe fn org_kde_kwin_outputconfiguration_overscan ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , overscan : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 9u32 , outputdevice , overscan , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the VRR policy\n\nSet what policy the compositor should employ regarding its use of\nvariable refresh rate." ] pub unsafe fn org_kde_kwin_outputconfiguration_set_vrr_policy ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , policy : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 10u32 , outputdevice , policy , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod viewporter { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "surface cropping and scaling\n\nThe global interface exposing surface cropping and scaling\ncapabilities is used to instantiate an interface extension for a\nwl_surface object. This extended interface will then allow\ncropping and scaling the surface contents, effectively\ndisconnecting the direct relationship between the buffer and the\nsurface size." ] pub mod wp_viewporter { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_viewporter { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "the surface already has a viewport object associated" ] viewport_exists = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: viewport_exists ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wp_viewporter_requests_get_viewport_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wp_viewport :: wp_viewport_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_viewporter_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_viewport\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & wp_viewporter_requests_get_viewport_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_viewporter_interface : wl_interface = wl_interface { name : b"wp_viewporter\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & wp_viewporter_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wp_viewporter_listener { } pub unsafe fn wp_viewporter_set_user_data ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_viewporter as _ , user_data ) ; } pub unsafe fn wp_viewporter_get_user_data ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_viewporter as _ ) ; } pub unsafe fn wp_viewporter_get_version ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_viewporter as _ ) ; } pub unsafe fn wp_viewporter_add_listener ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_viewporter as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_viewporter_add_rust_listener ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter , listener : & dyn wp_viewporter_listener ) -> bool { let to = ( listener as * const dyn wp_viewporter_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_viewporter_add_listener ( wp_viewporter as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "unbind from the cropping and scaling interface\n\nInforms the server that the client will not be using this\nprotocol object anymore. This does not affect any other objects,\nwp_viewport objects included." ] pub unsafe fn wp_viewporter_destroy ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_viewporter as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_viewporter as _ ) ; } # [ doc = "extend surface interface for crop and scale\n\nInstantiate an interface extension for the given wl_surface to\ncrop and scale its content. If the given wl_surface already has\na wp_viewport object associated, the viewport_exists\nprotocol error is raised." ] pub unsafe fn wp_viewporter_get_viewport ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: wp_viewport :: wp_viewport { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wp_viewporter as _ , 1u32 , & super :: wp_viewport :: wp_viewport_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "crop and scale interface to a wl_surface\n\nAn additional interface to a wl_surface object, which allows the\nclient to specify the cropping and scaling of the surface\ncontents.\n\nThis interface works with two concepts: the source rectangle (src_x,\nsrc_y, src_width, src_height), and the destination size (dst_width,\ndst_height). The contents of the source rectangle are scaled to the\ndestination size, and content outside the source rectangle is ignored.\nThis state is double-buffered, and is applied on the next\nwl_surface.commit.\n\nThe two parts of crop and scale state are independent: the source\nrectangle, and the destination size. Initially both are unset, that\nis, no scaling is applied. The whole of the current wl_buffer is\nused as the source, and the surface size is as defined in\nwl_surface.attach.\n\nIf the destination size is set, it causes the surface size to become\ndst_width, dst_height. The source (rectangle) is scaled to exactly\nthis size. This overrides whatever the attached wl_buffer size is,\nunless the wl_buffer is NULL. If the wl_buffer is NULL, the surface\nhas no content and therefore no size. Otherwise, the size is always\nat least 1x1 in surface local coordinates.\n\nIf the source rectangle is set, it defines what area of the wl_buffer is\ntaken as the source. If the source rectangle is set and the destination\nsize is not set, then src_width and src_height must be integers, and the\nsurface size becomes the source rectangle size. This results in cropping\nwithout scaling. If src_width or src_height are not integers and\ndestination size is not set, the bad_size protocol error is raised when\nthe surface state is applied.\n\nThe coordinate transformations from buffer pixel coordinates up to\nthe surface-local coordinates happen in the following order:\n1. buffer_transform (wl_surface.set_buffer_transform)\n2. buffer_scale (wl_surface.set_buffer_scale)\n3. crop and scale (wp_viewport.set*)\nThis means, that the source rectangle coordinates of crop and scale\nare given in the coordinates after the buffer transform and scale,\ni.e. in the coordinates that would be the surface-local coordinates\nif the crop and scale was not applied.\n\nIf src_x or src_y are negative, the bad_value protocol error is raised.\nOtherwise, if the source rectangle is partially or completely outside of\nthe non-NULL wl_buffer, then the out_of_buffer protocol error is raised\nwhen the surface state is applied. A NULL wl_buffer does not raise the\nout_of_buffer error.\n\nThe x, y arguments of wl_surface.attach are applied as normal to\nthe surface. They indicate how many pixels to remove from the\nsurface size from the left and the top. In other words, they are\nstill in the surface-local coordinate system, just like dst_width\nand dst_height are.\n\nIf the wl_surface associated with the wp_viewport is destroyed,\nall wp_viewport requests except 'destroy' raise the protocol error\nno_surface.\n\nIf the wp_viewport object is destroyed, the crop and scale\nstate is removed from the wl_surface. The change will be applied\non the next wl_surface.commit." ] pub mod wp_viewport { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_viewport { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "negative or zero values in width or height" ] bad_value = 0 , # [ doc = "destination size is not integer" ] bad_size = 1 , # [ doc = "source rectangle extends outside of the content area" ] out_of_buffer = 2 , # [ doc = "the wl_surface was destroyed" ] no_surface = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: bad_value ) , 1 => Some ( error :: bad_size ) , 2 => Some ( error :: out_of_buffer ) , 3 => Some ( error :: no_surface ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_viewport_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_source\0" as * const u8 as * const c_char , signature : b"ffff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_destination\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_viewport_interface : wl_interface = wl_interface { name : b"wp_viewport\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & wp_viewport_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wp_viewport_listener { } pub unsafe fn wp_viewport_set_user_data ( wp_viewport : * mut super :: wp_viewport :: wp_viewport , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_viewport as _ , user_data ) ; } pub unsafe fn wp_viewport_get_user_data ( wp_viewport : * mut super :: wp_viewport :: wp_viewport ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_viewport as _ ) ; } pub unsafe fn wp_viewport_get_version ( wp_viewport : * mut super :: wp_viewport :: wp_viewport ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_viewport as _ ) ; } pub unsafe fn wp_viewport_add_listener ( wp_viewport : * mut super :: wp_viewport :: wp_viewport , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_viewport as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_viewport_add_rust_listener ( wp_viewport : * mut super :: wp_viewport :: wp_viewport , listener : & dyn wp_viewport_listener ) -> bool { let to = ( listener as * const dyn wp_viewport_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_viewport_add_listener ( wp_viewport as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "remove scaling and cropping from the surface\n\nThe associated wl_surface's crop and scale state is removed.\nThe change is applied on the next wl_surface.commit." ] pub unsafe fn wp_viewport_destroy ( wp_viewport : * mut super :: wp_viewport :: wp_viewport ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_viewport as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_viewport as _ ) ; } # [ doc = "set the source rectangle for cropping\n\nSet the source rectangle of the associated wl_surface. See\nwp_viewport for the description, and relation to the wl_buffer\nsize.\n\nIf all of x, y, width and height are -1.0, the source rectangle is\nunset instead. Any other set of values where width or height are zero\nor negative, or x or y are negative, raise the bad_value protocol\nerror.\n\nThe crop and scale state is double-buffered state, and will be\napplied on the next wl_surface.commit." ] pub unsafe fn wp_viewport_set_source ( wp_viewport : * mut super :: wp_viewport :: wp_viewport , x : wl_fixed_t , y : wl_fixed_t , width : wl_fixed_t , height : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_viewport as _ , 1u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the surface size for scaling\n\nSet the destination size of the associated wl_surface. See\nwp_viewport for the description, and relation to the wl_buffer\nsize.\n\nIf width is -1 and height is -1, the destination size is unset\ninstead. Any other pair of values for width and height that\ncontains zero or negative values raises the bad_value protocol\nerror.\n\nThe crop and scale state is double-buffered state, and will be\napplied on the next wl_surface.commit." ] pub unsafe fn wp_viewport_set_destination ( wp_viewport : * mut super :: wp_viewport :: wp_viewport , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_viewport as _ , 2u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod text_input_unstable_v3 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "text input\n\nThe zwp_text_input_v3 interface represents text input and input methods\nassociated with a seat. It provides enter/leave events to follow the\ntext input focus for a seat.\n\nRequests are used to enable/disable the text-input object and set\nstate information like surrounding and selected text or the content type.\nThe information about the entered text is sent to the text-input object\nvia the preedit_string and commit_string events.\n\nText is valid UTF-8 encoded, indices and lengths are in bytes. Indices\nmust not point to middle bytes inside a code point: they must either\npoint to the first byte of a code point or to the end of the buffer.\nLengths must be measured between two valid indices.\n\nFocus moving throughout surfaces will result in the emission of\nzwp_text_input_v3.enter and zwp_text_input_v3.leave events. The focused\nsurface must commit zwp_text_input_v3.enable and\nzwp_text_input_v3.disable requests as the keyboard focus moves across\neditable and non-editable elements of the UI. Those two requests are not\nexpected to be paired with each other, the compositor must be able to\nhandle consecutive series of the same request.\n\nState is sent by the state requests (set_surrounding_text,\nset_content_type and set_cursor_rectangle) and a commit request. After an\nenter event or disable request all state information is invalidated and\nneeds to be resent by the client." ] pub mod zwp_text_input_v3 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_text_input_v3 { } # [ doc = "text change reason\n\nReason for the change of surrounding text or cursor posision." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum change_cause { # [ doc = "input method caused the change" ] input_method = 0 , # [ doc = "something else than the input method caused the change" ] other = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl change_cause { pub fn from_raw ( n : u32 ) -> Option < change_cause > { match n { 0 => Some ( change_cause :: input_method ) , 1 => Some ( change_cause :: other ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { # [ doc = "content hint\n\nContent hint is a bitmask to allow to modify the behavior of the text\ninput." ] pub struct content_hint : u32 { # [ doc = "no special behavior" ] const none = 0 ; # [ doc = "suggest word completions" ] const completion = 1 ; # [ doc = "suggest word corrections" ] const spellcheck = 2 ; # [ doc = "switch to uppercase letters at the start of a sentence" ] const auto_capitalization = 4 ; # [ doc = "prefer lowercase letters" ] const lowercase = 8 ; # [ doc = "prefer uppercase letters" ] const uppercase = 16 ; # [ doc = "prefer casing for titles and headings (can be language dependent)" ] const titlecase = 32 ; # [ doc = "characters should be hidden" ] const hidden_text = 64 ; # [ doc = "typed text should not be stored" ] const sensitive_data = 128 ; # [ doc = "just Latin characters should be entered" ] const latin = 256 ; # [ doc = "the text input is multiline" ] const multiline = 512 ; } } impl content_hint { pub fn from_raw ( n : u32 ) -> Option < content_hint > { Some ( content_hint :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = "content purpose\n\nThe content purpose allows to specify the primary purpose of a text\ninput.\n\nThis allows an input method to show special purpose input panels with\nextra characters or to disallow some characters." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum content_purpose { # [ doc = "default input, allowing all characters" ] normal = 0 , # [ doc = "allow only alphabetic characters" ] alpha = 1 , # [ doc = "allow only digits" ] digits = 2 , # [ doc = "input a number (including decimal separator and sign)" ] number = 3 , # [ doc = "input a phone number" ] phone = 4 , # [ doc = "input an URL" ] url = 5 , # [ doc = "input an email address" ] email = 6 , # [ doc = "input a name of a person" ] name = 7 , # [ doc = "input a password (combine with sensitive_data hint)" ] password = 8 , # [ doc = "input is a numeric password (combine with sensitive_data hint)" ] pin = 9 , # [ doc = "input a date" ] date = 10 , # [ doc = "input a time" ] time = 11 , # [ doc = "input a date and time" ] datetime = 12 , # [ doc = "input for a terminal" ] terminal = 13 , # [ doc ( hidden ) ] __nonexhaustive , } impl content_purpose { pub fn from_raw ( n : u32 ) -> Option < content_purpose > { match n { 0 => Some ( content_purpose :: normal ) , 1 => Some ( content_purpose :: alpha ) , 2 => Some ( content_purpose :: digits ) , 3 => Some ( content_purpose :: number ) , 4 => Some ( content_purpose :: phone ) , 5 => Some ( content_purpose :: url ) , 6 => Some ( content_purpose :: email ) , 7 => Some ( content_purpose :: name ) , 8 => Some ( content_purpose :: password ) , 9 => Some ( content_purpose :: pin ) , 10 => Some ( content_purpose :: date ) , 11 => Some ( content_purpose :: time ) , 12 => Some ( content_purpose :: datetime ) , 13 => Some ( content_purpose :: terminal ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_v3_requests : [ wl_message ; 8 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"enable\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"disable\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_surrounding_text\0" as * const u8 as * const c_char , signature : b"sii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_text_change_cause\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_content_type\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_cursor_rectangle\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_text_input_v3_events_enter_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut zwp_text_input_v3_events_leave_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_v3_events : [ wl_message ; 6 ] = [ wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v3_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v3_events_leave_types as * const _ } , } , wl_message { name : b"preedit_string\0" as * const u8 as * const c_char , signature : b"?sii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_string\0" as * const u8 as * const c_char , signature : b"?s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"delete_surrounding_text\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_text_input_v3_interface : wl_interface = wl_interface { name : b"zwp_text_input_v3\0" as * const u8 as * const c_char , version : 1 , request_count : 8 , requests : unsafe { & zwp_text_input_v3_requests as * const _ } , event_count : 6 , events : unsafe { & zwp_text_input_v3_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_text_input_v3_listener { # [ doc = "enter event\n\nNotification that this seat's text-input focus is on a certain surface.\n\nIf client has created multiple text input objects, compositor must send\nthis event to all of them.\n\nWhen the seat has the keyboard capability the text-input focus follows\nthe keyboard focus. This event sets the current surface for the\ntext-input object." ] fn enter ( & mut self , object : * mut zwp_text_input_v3 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "leave event\n\nNotification that this seat's text-input focus is no longer on a\ncertain surface. The client should reset any preedit string previously\nset.\n\nThe leave notification clears the current surface. It is sent before\nthe enter notification for the new focus. After leave event, compositor\nmust ignore requests from any text input instances until next enter\nevent.\n\nWhen the seat has the keyboard capability the text-input focus follows\nthe keyboard focus." ] fn leave ( & mut self , object : * mut zwp_text_input_v3 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "pre-edit\n\nNotify when a new composing text (pre-edit) should be set at the\ncurrent cursor position. Any previously set composing text must be\nremoved. Any previously existing selected text must be removed.\n\nThe argument text contains the pre-edit string buffer.\n\nThe parameters cursor_begin and cursor_end are counted in bytes\nrelative to the beginning of the submitted text buffer. Cursor should\nbe hidden when both are equal to -1.\n\nThey could be represented by the client as a line if both values are\nthe same, or as a text highlight otherwise.\n\nValues set with this event are double-buffered. They must be applied\nand reset to initial on the next zwp_text_input_v3.done event.\n\nThe initial value of text is an empty string, and cursor_begin,\ncursor_end and cursor_hidden are all 0." ] fn preedit_string ( & mut self , object : * mut zwp_text_input_v3 , text : Option < * mut c_char > , cursor_begin : i32 , cursor_end : i32 ) { } # [ doc = "text commit\n\nNotify when text should be inserted into the editor widget. The text to\ncommit could be either just a single character after a key press or the\nresult of some composing (pre-edit).\n\nValues set with this event are double-buffered. They must be applied\nand reset to initial on the next zwp_text_input_v3.done event.\n\nThe initial value of text is an empty string." ] fn commit_string ( & mut self , object : * mut zwp_text_input_v3 , text : Option < * mut c_char > ) { } # [ doc = "delete surrounding text\n\nNotify when the text around the current cursor position should be\ndeleted.\n\nBefore_length and after_length are the number of bytes before and after\nthe current cursor index (excluding the selection) to delete.\n\nIf a preedit text is present, in effect before_length is counted from\nthe beginning of it, and after_length from its end (see done event\nsequence).\n\nValues set with this event are double-buffered. They must be applied\nand reset to initial on the next zwp_text_input_v3.done event.\n\nThe initial values of both before_length and after_length are 0." ] fn delete_surrounding_text ( & mut self , object : * mut zwp_text_input_v3 , before_length : u32 , after_length : u32 ) { } # [ doc = "apply changes\n\nInstruct the application to apply changes to state requested by the\npreedit_string, commit_string and delete_surrounding_text events. The\nstate relating to these events is double-buffered, and each one\nmodifies the pending state. This event replaces the current state with\nthe pending state.\n\nThe application must proceed by evaluating the changes in the following\norder:\n\n1. Replace existing preedit string with the cursor.\n2. Delete requested surrounding text.\n3. Insert commit string with the cursor at its end.\n4. Calculate surrounding text to send.\n5. Insert new preedit text in cursor position.\n6. Place cursor inside preedit text.\n\nThe serial number reflects the last state of the zwp_text_input_v3\nobject known to the compositor. The value of the serial argument must\nbe equal to the number of commit requests already issued on that object.\nWhen the client receives a done event with a serial different than the\nnumber of past commit requests, it must proceed as normal, except it\nshould not change the current state of the zwp_text_input_v3 object." ] fn done ( & mut self , object : * mut zwp_text_input_v3 , serial : u32 ) { } } pub unsafe fn zwp_text_input_v3_set_user_data ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_text_input_v3 as _ , user_data ) ; } pub unsafe fn zwp_text_input_v3_get_user_data ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_text_input_v3 as _ ) ; } pub unsafe fn zwp_text_input_v3_get_version ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_text_input_v3 as _ ) ; } pub unsafe fn zwp_text_input_v3_add_listener ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_text_input_v3 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_text_input_v3_add_rust_listener ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , listener : & dyn zwp_text_input_v3_listener ) -> bool { let to = ( listener as * const dyn zwp_text_input_v3_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_text_input_v3_add_listener ( zwp_text_input_v3 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "Destroy the wp_text_input\n\nDestroy the wp_text_input object. Also disables all surfaces enabled\nthrough this wp_text_input object." ] pub unsafe fn zwp_text_input_v3_destroy ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_text_input_v3 as _ ) ; } # [ doc = "Request text input to be enabled\n\nRequests text input on the surface previously obtained from the enter\nevent.\n\nThis request must be issued every time the active text input changes\nto a new one, including within the current surface. Use\nzwp_text_input_v3.disable when there is no longer any input focus on\nthe current surface.\n\nClients must not enable more than one text input on the single seat\nand should disable the current text input before enabling the new one.\nAt most one instance of text input may be in enabled state per instance,\nRequests to enable the another text input when some text input is active\nmust be ignored by compositor.\n\nThis request resets all state associated with previous enable, disable,\nset_surrounding_text, set_text_change_cause, set_content_type, and\nset_cursor_rectangle requests, as well as the state associated with\npreedit_string, commit_string, and delete_surrounding_text events.\n\nThe set_surrounding_text, set_content_type and set_cursor_rectangle\nrequests must follow if the text input supports the necessary\nfunctionality.\n\nState set with this request is double-buffered. It will get applied on\nthe next zwp_text_input_v3.commit request, and stay valid until the\nnext committed enable or disable request.\n\nThe changes must be applied by the compositor after issuing a\nzwp_text_input_v3.commit request." ] pub unsafe fn zwp_text_input_v3_enable ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Disable text input on a surface\n\nExplicitly disable text input on the current surface (typically when\nthere is no focus on any text entry inside the surface).\n\nState set with this request is double-buffered. It will get applied on\nthe next zwp_text_input_v3.commit request." ] pub unsafe fn zwp_text_input_v3_disable ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets the surrounding text\n\nSets the surrounding plain text around the input, excluding the preedit\ntext.\n\nThe client should notify the compositor of any changes in any of the\nvalues carried with this request, including changes caused by handling\nincoming text-input events as well as changes caused by other\nmechanisms like keyboard typing.\n\nIf the client is unaware of the text around the cursor, it should not\nissue this request, to signify lack of support to the compositor.\n\nText is UTF-8 encoded, and should include the cursor position, the\ncomplete selection and additional characters before and after them.\nThere is a maximum length of wayland messages, so text can not be\nlonger than 4000 bytes.\n\nCursor is the byte offset of the cursor within text buffer.\n\nAnchor is the byte offset of the selection anchor within text buffer.\nIf there is no selected text, anchor is the same as cursor.\n\nIf any preedit text is present, it is replaced with a cursor for the\npurpose of this event.\n\nValues set with this request are double-buffered. They will get applied\non the next zwp_text_input_v3.commit request, and stay valid until the\nnext committed enable or disable request.\n\nThe initial state for affected fields is empty, meaning that the text\ninput does not support sending surrounding text. If the empty values\nget applied, subsequent attempts to change them may have no effect." ] pub unsafe fn zwp_text_input_v3_set_surrounding_text ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , text : * const c_char , cursor : i32 , anchor : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 3u32 , text , cursor , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "indicates the cause of surrounding text change\n\nTells the compositor why the text surrounding the cursor changed.\n\nWhenever the client detects an external change in text, cursor, or\nanchor posision, it must issue this request to the compositor. This\nrequest is intended to give the input method a chance to update the\npreedit text in an appropriate way, e.g. by removing it when the user\nstarts typing with a keyboard.\n\ncause describes the source of the change.\n\nThe value set with this request is double-buffered. It must be applied\nand reset to initial at the next zwp_text_input_v3.commit request.\n\nThe initial value of cause is input_method." ] pub unsafe fn zwp_text_input_v3_set_text_change_cause ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , cause : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 4u32 , cause , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set content purpose and hint\n\nSets the content purpose and content hint. While the purpose is the\nbasic purpose of an input field, the hint flags allow to modify some of\nthe behavior.\n\nValues set with this request are double-buffered. They will get applied\non the next zwp_text_input_v3.commit request.\nSubsequent attempts to update them may have no effect. The values\nremain valid until the next committed enable or disable request.\n\nThe initial value for hint is none, and the initial value for purpose\nis normal." ] pub unsafe fn zwp_text_input_v3_set_content_type ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , hint : u32 , purpose : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 5u32 , hint , purpose , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set cursor position\n\nMarks an area around the cursor as a x, y, width, height rectangle in\nsurface local coordinates.\n\nAllows the compositor to put a window with word suggestions near the\ncursor, without obstructing the text being input.\n\nIf the client is unaware of the position of edited text, it should not\nissue this request, to signify lack of support to the compositor.\n\nValues set with this request are double-buffered. They will get applied\non the next zwp_text_input_v3.commit request, and stay valid until the\nnext committed enable or disable request.\n\nThe initial values describing a cursor rectangle are empty. That means\nthe text input does not support describing the cursor area. If the\nempty values get applied, subsequent attempts to change them may have\nno effect." ] pub unsafe fn zwp_text_input_v3_set_cursor_rectangle ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 6u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "commit state\n\nAtomically applies state changes recently sent to the compositor.\n\nThe commit request establishes and updates the state of the client, and\nmust be issued after any changes to apply them.\n\nText input state (enabled status, content purpose, content hint,\nsurrounding text and change cause, cursor rectangle) is conceptually\ndouble-buffered within the context of a text input, i.e. between a\ncommitted enable request and the following committed enable or disable\nrequest.\n\nProtocol requests modify the pending state, as opposed to the current\nstate in use by the input method. A commit request atomically applies\nall pending state, replacing the current state. After commit, the new\npending state is as documented for each related request.\n\nRequests are applied in the order of arrival.\n\nNeither current nor pending state are modified unless noted otherwise.\n\nThe compositor must count the number of commit requests coming from\neach zwp_text_input_v3 object and use the count as the serial in done\nevents." ] pub unsafe fn zwp_text_input_v3_commit ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 7u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "text input manager\n\nA factory for text-input objects. This object is a global singleton." ] pub mod zwp_text_input_manager_v3 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_text_input_manager_v3 { } static mut zwp_text_input_manager_v3_requests_get_text_input_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_text_input_v3 :: zwp_text_input_v3_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_manager_v3_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_text_input\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_manager_v3_requests_get_text_input_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_text_input_manager_v3_interface : wl_interface = wl_interface { name : b"zwp_text_input_manager_v3\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_text_input_manager_v3_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_text_input_manager_v3_listener { } pub unsafe fn zwp_text_input_manager_v3_set_user_data ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_text_input_manager_v3 as _ , user_data ) ; } pub unsafe fn zwp_text_input_manager_v3_get_user_data ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_text_input_manager_v3 as _ ) ; } pub unsafe fn zwp_text_input_manager_v3_get_version ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_text_input_manager_v3 as _ ) ; } pub unsafe fn zwp_text_input_manager_v3_add_listener ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_text_input_manager_v3 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_text_input_manager_v3_add_rust_listener ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 , listener : & dyn zwp_text_input_manager_v3_listener ) -> bool { let to = ( listener as * const dyn zwp_text_input_manager_v3_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_text_input_manager_v3_add_listener ( zwp_text_input_manager_v3 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "Destroy the wp_text_input_manager\n\nDestroy the wp_text_input_manager object." ] pub unsafe fn zwp_text_input_manager_v3_destroy ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_manager_v3 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_text_input_manager_v3 as _ ) ; } # [ doc = "create a new text input object\n\nCreates a new text-input object for a given seat." ] pub unsafe fn zwp_text_input_manager_v3_get_text_input ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_text_input_manager_v3 as _ , 1u32 , & super :: zwp_text_input_v3 :: zwp_text_input_v3_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat ) ; return r as _ ; } } } pub mod pointer_constraints_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "constrain the movement of a pointer\n\nThe global interface exposing pointer constraining functionality. It\nexposes two requests: lock_pointer for locking the pointer to its\nposition, and confine_pointer for locking the pointer to a region.\n\nThe lock_pointer and confine_pointer requests create the objects\nwp_locked_pointer and wp_confined_pointer respectively, and the client can\nuse these objects to interact with the lock.\n\nFor any surface, only one lock or confinement may be active across all\nwl_pointer objects of the same seat. If a lock or confinement is requested\nwhen another lock or confinement is active or requested on the same surface\nand with any of the wl_pointer objects of the same seat, an\n'already_constrained' error will be raised." ] pub mod zwp_pointer_constraints_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_pointer_constraints_v1 { } # [ doc = "wp_pointer_constraints error values\n\nThese errors can be emitted in response to wp_pointer_constraints\nrequests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "pointer constraint already requested on that surface" ] already_constrained = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 1 => Some ( error :: already_constrained ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "constraint lifetime\n\nThese values represent different lifetime semantics. They are passed\nas arguments to the factory requests to specify how the constraint\nlifetimes should be managed." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum lifetime { # [ doc = "the pointer constraint is defunct once deactivated\n\nA oneshot pointer constraint will never reactivate once it has been\ndeactivated. See the corresponding deactivation event\n(wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for\ndetails." ] oneshot = 1 , # [ doc = "the pointer constraint may reactivate\n\nA persistent pointer constraint may again reactivate once it has\nbeen deactivated. See the corresponding deactivation event\n(wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for\ndetails." ] persistent = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl lifetime { pub fn from_raw ( n : u32 ) -> Option < lifetime > { match n { 1 => Some ( lifetime :: oneshot ) , 2 => Some ( lifetime :: persistent ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_pointer_constraints_v1_requests_lock_pointer_types : [ * const wl_interface ; 5 ] = [ unsafe { & super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut zwp_pointer_constraints_v1_requests_confine_pointer_types : [ * const wl_interface ; 5 ] = [ unsafe { & super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_constraints_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"lock_pointer\0" as * const u8 as * const c_char , signature : b"noo?ou\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_constraints_v1_requests_lock_pointer_types as * const _ } , } , wl_message { name : b"confine_pointer\0" as * const u8 as * const c_char , signature : b"noo?ou\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_constraints_v1_requests_confine_pointer_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_pointer_constraints_v1_interface : wl_interface = wl_interface { name : b"zwp_pointer_constraints_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & zwp_pointer_constraints_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_pointer_constraints_v1_listener { } pub unsafe fn zwp_pointer_constraints_v1_set_user_data ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_pointer_constraints_v1 as _ , user_data ) ; } pub unsafe fn zwp_pointer_constraints_v1_get_user_data ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_pointer_constraints_v1 as _ ) ; } pub unsafe fn zwp_pointer_constraints_v1_get_version ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_pointer_constraints_v1 as _ ) ; } pub unsafe fn zwp_pointer_constraints_v1_add_listener ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_pointer_constraints_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_pointer_constraints_v1_add_rust_listener ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 , listener : & dyn zwp_pointer_constraints_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_pointer_constraints_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_pointer_constraints_v1_add_listener ( zwp_pointer_constraints_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the pointer constraints manager object\n\nUsed by the client to notify the server that it will no longer use this\npointer constraints object." ] pub unsafe fn zwp_pointer_constraints_v1_destroy ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_pointer_constraints_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_pointer_constraints_v1 as _ ) ; } # [ doc = "lock pointer to a position\n\nThe lock_pointer request lets the client request to disable movements of\nthe virtual pointer (i.e. the cursor), effectively locking the pointer\nto a position. This request may not take effect immediately; in the\nfuture, when the compositor deems implementation-specific constraints\nare satisfied, the pointer lock will be activated and the compositor\nsends a locked event.\n\nThe protocol provides no guarantee that the constraints are ever\nsatisfied, and does not require the compositor to send an error if the\nconstraints cannot ever be satisfied. It is thus possible to request a\nlock that will never activate.\n\nThere may not be another pointer constraint of any kind requested or\nactive on the surface for any of the wl_pointer objects of the seat of\nthe passed pointer when requesting a lock. If there is, an error will be\nraised. See general pointer lock documentation for more details.\n\nThe intersection of the region passed with this request and the input\nregion of the surface is used to determine where the pointer must be\nin order for the lock to activate. It is up to the compositor whether to\nwarp the pointer or require some kind of user interaction for the lock\nto activate. If the region is null the surface input region is used.\n\nA surface may receive pointer focus without the lock being activated.\n\nThe request creates a new object wp_locked_pointer which is used to\ninteract with the lock as well as receive updates about its state. See\nthe the description of wp_locked_pointer for further information.\n\nNote that while a pointer is locked, the wl_pointer objects of the\ncorresponding seat will not emit any wl_pointer.motion events, but\nrelative motion events will still be emitted via wp_relative_pointer\nobjects of the same seat. wl_pointer.axis and wl_pointer.button events\nare unaffected." ] pub unsafe fn zwp_pointer_constraints_v1_lock_pointer ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 , surface : * mut super :: wl_surface :: wl_surface , pointer : * mut super :: wl_pointer :: wl_pointer , region : * mut super :: wl_region :: wl_region , lifetime : u32 ) -> * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_pointer_constraints_v1 as _ , 1u32 , & super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface , pointer , region , lifetime ) ; return r as _ ; } # [ doc = "confine pointer to a region\n\nThe confine_pointer request lets the client request to confine the\npointer cursor to a given region. This request may not take effect\nimmediately; in the future, when the compositor deems implementation-\nspecific constraints are satisfied, the pointer confinement will be\nactivated and the compositor sends a confined event.\n\nThe intersection of the region passed with this request and the input\nregion of the surface is used to determine where the pointer must be\nin order for the confinement to activate. It is up to the compositor\nwhether to warp the pointer or require some kind of user interaction for\nthe confinement to activate. If the region is null the surface input\nregion is used.\n\nThe request will create a new object wp_confined_pointer which is used\nto interact with the confinement as well as receive updates about its\nstate. See the the description of wp_confined_pointer for further\ninformation." ] pub unsafe fn zwp_pointer_constraints_v1_confine_pointer ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 , surface : * mut super :: wl_surface :: wl_surface , pointer : * mut super :: wl_pointer :: wl_pointer , region : * mut super :: wl_region :: wl_region , lifetime : u32 ) -> * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_pointer_constraints_v1 as _ , 2u32 , & super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface , pointer , region , lifetime ) ; return r as _ ; } } # [ doc = "receive relative pointer motion events\n\nThe wp_locked_pointer interface represents a locked pointer state.\n\nWhile the lock of this object is active, the wl_pointer objects of the\nassociated seat will not emit any wl_pointer.motion events.\n\nThis object will send the event 'locked' when the lock is activated.\nWhenever the lock is activated, it is guaranteed that the locked surface\nwill already have received pointer focus and that the pointer will be\nwithin the region passed to the request creating this object.\n\nTo unlock the pointer, send the destroy request. This will also destroy\nthe wp_locked_pointer object.\n\nIf the compositor decides to unlock the pointer the unlocked event is\nsent. See wp_locked_pointer.unlock for details.\n\nWhen unlocking, the compositor may warp the cursor position to the set\ncursor position hint. If it does, it will not result in any relative\nmotion events emitted via wp_relative_pointer.\n\nIf the surface the lock was requested on is destroyed and the lock is not\nyet activated, the wp_locked_pointer object is now defunct and must be\ndestroyed." ] pub mod zwp_locked_pointer_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_locked_pointer_v1 { } static mut zwp_locked_pointer_v1_requests_set_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_locked_pointer_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_cursor_position_hint\0" as * const u8 as * const c_char , signature : b"ff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_region\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & zwp_locked_pointer_v1_requests_set_region_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_locked_pointer_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"locked\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unlocked\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_locked_pointer_v1_interface : wl_interface = wl_interface { name : b"zwp_locked_pointer_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & zwp_locked_pointer_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_locked_pointer_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_locked_pointer_v1_listener { # [ doc = "lock activation event\n\nNotification that the pointer lock of the seat's pointer is activated." ] fn locked ( & mut self , object : * mut zwp_locked_pointer_v1 , ) { } # [ doc = "lock deactivation event\n\nNotification that the pointer lock of the seat's pointer is no longer\nactive. If this is a oneshot pointer lock (see\nwp_pointer_constraints.lifetime) this object is now defunct and should\nbe destroyed. If this is a persistent pointer lock (see\nwp_pointer_constraints.lifetime) this pointer lock may again\nreactivate in the future." ] fn unlocked ( & mut self , object : * mut zwp_locked_pointer_v1 , ) { } } pub unsafe fn zwp_locked_pointer_v1_set_user_data ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_locked_pointer_v1 as _ , user_data ) ; } pub unsafe fn zwp_locked_pointer_v1_get_user_data ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_locked_pointer_v1 as _ ) ; } pub unsafe fn zwp_locked_pointer_v1_get_version ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_locked_pointer_v1 as _ ) ; } pub unsafe fn zwp_locked_pointer_v1_add_listener ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_locked_pointer_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_locked_pointer_v1_add_rust_listener ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 , listener : & dyn zwp_locked_pointer_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_locked_pointer_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_locked_pointer_v1_add_listener ( zwp_locked_pointer_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the locked pointer object\n\nDestroy the locked pointer object. If applicable, the compositor will\nunlock the pointer." ] pub unsafe fn zwp_locked_pointer_v1_destroy ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_locked_pointer_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_locked_pointer_v1 as _ ) ; } # [ doc = "set the pointer cursor position hint\n\nSet the cursor position hint relative to the top left corner of the\nsurface.\n\nIf the client is drawing its own cursor, it should update the position\nhint to the position of its own cursor. A compositor may use this\ninformation to warp the pointer upon unlock in order to avoid pointer\njumps.\n\nThe cursor position hint is double buffered. The new hint will only take\neffect when the associated surface gets it pending state applied. See\nwl_surface.commit for details." ] pub unsafe fn zwp_locked_pointer_v1_set_cursor_position_hint ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 , surface_x : wl_fixed_t , surface_y : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_locked_pointer_v1 as _ , 1u32 , surface_x , surface_y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set a new lock region\n\nSet a new region used to lock the pointer.\n\nThe new lock region is double-buffered. The new lock region will\nonly take effect when the associated surface gets its pending state\napplied. See wl_surface.commit for details.\n\nFor details about the lock region, see wp_locked_pointer." ] pub unsafe fn zwp_locked_pointer_v1_set_region ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 , region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_locked_pointer_v1 as _ , 2u32 , region , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "confined pointer object\n\nThe wp_confined_pointer interface represents a confined pointer state.\n\nThis object will send the event 'confined' when the confinement is\nactivated. Whenever the confinement is activated, it is guaranteed that\nthe surface the pointer is confined to will already have received pointer\nfocus and that the pointer will be within the region passed to the request\ncreating this object. It is up to the compositor to decide whether this\nrequires some user interaction and if the pointer will warp to within the\npassed region if outside.\n\nTo unconfine the pointer, send the destroy request. This will also destroy\nthe wp_confined_pointer object.\n\nIf the compositor decides to unconfine the pointer the unconfined event is\nsent. The wp_confined_pointer object is at this point defunct and should\nbe destroyed." ] pub mod zwp_confined_pointer_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_confined_pointer_v1 { } static mut zwp_confined_pointer_v1_requests_set_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_confined_pointer_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_region\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & zwp_confined_pointer_v1_requests_set_region_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_confined_pointer_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"confined\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unconfined\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_confined_pointer_v1_interface : wl_interface = wl_interface { name : b"zwp_confined_pointer_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_confined_pointer_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_confined_pointer_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_confined_pointer_v1_listener { # [ doc = "pointer confined\n\nNotification that the pointer confinement of the seat's pointer is\nactivated." ] fn confined ( & mut self , object : * mut zwp_confined_pointer_v1 , ) { } # [ doc = "pointer unconfined\n\nNotification that the pointer confinement of the seat's pointer is no\nlonger active. If this is a oneshot pointer confinement (see\nwp_pointer_constraints.lifetime) this object is now defunct and should\nbe destroyed. If this is a persistent pointer confinement (see\nwp_pointer_constraints.lifetime) this pointer confinement may again\nreactivate in the future." ] fn unconfined ( & mut self , object : * mut zwp_confined_pointer_v1 , ) { } } pub unsafe fn zwp_confined_pointer_v1_set_user_data ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_confined_pointer_v1 as _ , user_data ) ; } pub unsafe fn zwp_confined_pointer_v1_get_user_data ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_confined_pointer_v1 as _ ) ; } pub unsafe fn zwp_confined_pointer_v1_get_version ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_confined_pointer_v1 as _ ) ; } pub unsafe fn zwp_confined_pointer_v1_add_listener ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_confined_pointer_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_confined_pointer_v1_add_rust_listener ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 , listener : & dyn zwp_confined_pointer_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_confined_pointer_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_confined_pointer_v1_add_listener ( zwp_confined_pointer_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the confined pointer object\n\nDestroy the confined pointer object. If applicable, the compositor will\nunconfine the pointer." ] pub unsafe fn zwp_confined_pointer_v1_destroy ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_confined_pointer_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_confined_pointer_v1 as _ ) ; } # [ doc = "set a new confine region\n\nSet a new region used to confine the pointer.\n\nThe new confine region is double-buffered. The new confine region will\nonly take effect when the associated surface gets its pending state\napplied. See wl_surface.commit for details.\n\nIf the confinement is active when the new confinement region is applied\nand the pointer ends up outside of newly applied region, the pointer may\nwarped to a position within the new confinement region. If warped, a\nwl_pointer.motion event will be emitted, but no\nwp_relative_pointer.relative_motion event.\n\nThe compositor may also, instead of using the new region, unconfine the\npointer.\n\nFor details about the confine region, see wp_confined_pointer." ] pub unsafe fn zwp_confined_pointer_v1_set_region ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 , region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_confined_pointer_v1 as _ , 1u32 , region , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod input_method_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "input method context\n\nCorresponds to a text input on the input method side. An input method context\nis created on text input activation on the input method side. It allows\nreceiving information about the text input from the application via events.\nInput method contexts do not keep state after deactivation and should be\ndestroyed after deactivation is handled.\n\nText is generally UTF-8 encoded, indices and lengths are in bytes.\n\nSerials are used to synchronize the state between the text input and\nan input method. New serials are sent by the text input in the\ncommit_state request and are used by the input method to indicate\nthe known text input state in events like preedit_string, commit_string,\nand keysym. The text input can then ignore events from the input method\nwhich are based on an outdated state (for example after a reset).\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_input_method_context_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_input_method_context_v1 { } static mut zwp_input_method_context_v1_requests_grab_keyboard_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_keyboard :: wl_keyboard_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_method_context_v1_requests : [ wl_message ; 14 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_string\0" as * const u8 as * const c_char , signature : b"us\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_string\0" as * const u8 as * const c_char , signature : b"uss\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_styling\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_cursor\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"delete_surrounding_text\0" as * const u8 as * const c_char , signature : b"iu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cursor_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifiers_map\0" as * const u8 as * const c_char , signature : b"a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"keysym\0" as * const u8 as * const c_char , signature : b"uuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"grab_keyboard\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_method_context_v1_requests_grab_keyboard_types as * const _ } , } , wl_message { name : b"key\0" as * const u8 as * const c_char , signature : b"uuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifiers\0" as * const u8 as * const c_char , signature : b"uuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"language\0" as * const u8 as * const c_char , signature : b"us\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"text_direction\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_method_context_v1_events : [ wl_message ; 6 ] = [ wl_message { name : b"surrounding_text\0" as * const u8 as * const c_char , signature : b"suu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"reset\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"content_type\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"invoke_action\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_state\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preferred_language\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_input_method_context_v1_interface : wl_interface = wl_interface { name : b"zwp_input_method_context_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 14 , requests : unsafe { & zwp_input_method_context_v1_requests as * const _ } , event_count : 6 , events : unsafe { & zwp_input_method_context_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_input_method_context_v1_listener { # [ doc = "surrounding text event\n\nThe plain surrounding text around the input position. Cursor is the\nposition in bytes within the surrounding text relative to the beginning\nof the text. Anchor is the position in bytes of the selection anchor\nwithin the surrounding text relative to the beginning of the text. If\nthere is no selected text then anchor is the same as cursor." ] fn surrounding_text ( & mut self , object : * mut zwp_input_method_context_v1 , text : * mut c_char , cursor : u32 , anchor : u32 ) { } # [ doc = "" ] fn reset ( & mut self , object : * mut zwp_input_method_context_v1 , ) { } # [ doc = "" ] fn content_type ( & mut self , object : * mut zwp_input_method_context_v1 , hint : u32 , purpose : u32 ) { } # [ doc = "" ] fn invoke_action ( & mut self , object : * mut zwp_input_method_context_v1 , button : u32 , index : u32 ) { } # [ doc = "" ] fn commit_state ( & mut self , object : * mut zwp_input_method_context_v1 , serial : u32 ) { } # [ doc = "" ] fn preferred_language ( & mut self , object : * mut zwp_input_method_context_v1 , language : * mut c_char ) { } } pub unsafe fn zwp_input_method_context_v1_set_user_data ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_input_method_context_v1 as _ , user_data ) ; } pub unsafe fn zwp_input_method_context_v1_get_user_data ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_input_method_context_v1 as _ ) ; } pub unsafe fn zwp_input_method_context_v1_get_version ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_input_method_context_v1 as _ ) ; } pub unsafe fn zwp_input_method_context_v1_add_listener ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_input_method_context_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_input_method_context_v1_add_rust_listener ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , listener : & dyn zwp_input_method_context_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_input_method_context_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_input_method_context_v1_add_listener ( zwp_input_method_context_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_input_method_context_v1_destroy ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_input_method_context_v1 as _ ) ; } # [ doc = "commit string\n\nSend the commit string text for insertion to the application.\n\nThe text to commit could be either just a single character after a key\npress or the result of some composing (pre-edit). It could be also an\nempty text when some text should be removed (see\ndelete_surrounding_text) or when the input cursor should be moved (see\ncursor_position).\n\nAny previously set composing text will be removed." ] pub unsafe fn zwp_input_method_context_v1_commit_string ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , text : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 1u32 , serial , text , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "pre-edit string\n\nSend the pre-edit string text to the application text input.\n\nThe commit text can be used to replace the pre-edit text on reset (for\nexample on unfocus).\n\nPreviously sent preedit_style and preedit_cursor requests are also\nprocessed by the text_input." ] pub unsafe fn zwp_input_method_context_v1_preedit_string ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , text : * const c_char , commit : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 2u32 , serial , text , commit , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "pre-edit styling\n\nSet the styling information on composing text. The style is applied for\nlength in bytes from index relative to the beginning of\nthe composing text (as byte offset). Multiple styles can\nbe applied to a composing text.\n\nThis request should be sent before sending a preedit_string request." ] pub unsafe fn zwp_input_method_context_v1_preedit_styling ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , index : u32 , length : u32 , style : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 3u32 , index , length , style , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "pre-edit cursor\n\nSet the cursor position inside the composing text (as byte offset)\nrelative to the start of the composing text.\n\nWhen index is negative no cursor should be displayed.\n\nThis request should be sent before sending a preedit_string request." ] pub unsafe fn zwp_input_method_context_v1_preedit_cursor ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , index : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 4u32 , index , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "delete text\n\nRemove the surrounding text.\n\nThis request will be handled on the text_input side directly following\na commit_string request." ] pub unsafe fn zwp_input_method_context_v1_delete_surrounding_text ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , index : i32 , length : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 5u32 , index , length , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set cursor to a new position\n\nSet the cursor and anchor to a new position. Index is the new cursor\nposition in bytes (when >= 0 this is relative to the end of the inserted text,\notherwise it is relative to the beginning of the inserted text). Anchor is\nthe new anchor position in bytes (when >= 0 this is relative to the end of the\ninserted text, otherwise it is relative to the beginning of the inserted\ntext). When there should be no selected text, anchor should be the same\nas index.\n\nThis request will be handled on the text_input side directly following\na commit_string request." ] pub unsafe fn zwp_input_method_context_v1_cursor_position ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , index : i32 , anchor : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 6u32 , index , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zwp_input_method_context_v1_modifiers_map ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , map : * mut wl_array ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 7u32 , map , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "keysym\n\nNotify when a key event was sent. Key events should not be used for\nnormal text input operations, which should be done with commit_string,\ndelete_surrounding_text, etc. The key event follows the wl_keyboard key\nevent convention. Sym is an XKB keysym, state is a wl_keyboard key_state." ] pub unsafe fn zwp_input_method_context_v1_keysym ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , time : u32 , sym : u32 , state : u32 , modifiers : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 8u32 , serial , time , sym , state , modifiers , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "grab hardware keyboard\n\nAllow an input method to receive hardware keyboard input and process\nkey events to generate text events (with pre-edit) over the wire. This\nallows input methods which compose multiple key events for inputting\ntext like it is done for CJK languages." ] pub unsafe fn zwp_input_method_context_v1_grab_keyboard ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 ) -> * mut super :: wl_keyboard :: wl_keyboard { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_input_method_context_v1 as _ , 9u32 , & super :: wl_keyboard :: wl_keyboard_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "forward key event\n\nForward a wl_keyboard::key event to the client that was not processed\nby the input method itself. Should be used when filtering key events\nwith grab_keyboard. The arguments should be the ones from the\nwl_keyboard::key event.\n\nFor generating custom key events use the keysym request instead." ] pub unsafe fn zwp_input_method_context_v1_key ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , time : u32 , key : u32 , state : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 10u32 , serial , time , key , state , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "forward modifiers event\n\nForward a wl_keyboard::modifiers event to the client that was not\nprocessed by the input method itself. Should be used when filtering\nkey events with grab_keyboard. The arguments should be the ones\nfrom the wl_keyboard::modifiers event." ] pub unsafe fn zwp_input_method_context_v1_modifiers ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , mods_depressed : u32 , mods_latched : u32 , mods_locked : u32 , group : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 11u32 , serial , mods_depressed , mods_latched , mods_locked , group , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zwp_input_method_context_v1_language ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , language : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 12u32 , serial , language , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zwp_input_method_context_v1_text_direction ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , direction : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 13u32 , serial , direction , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "input method\n\nAn input method object is responsible for composing text in response to\ninput from hardware or virtual keyboards. There is one input method\nobject per seat. On activate there is a new input method context object\ncreated which allows the input method to communicate with the text input." ] pub mod zwp_input_method_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_input_method_v1 { } static mut zwp_input_method_v1_events_activate_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1_interface as * const wl_interface } , ] ; static mut zwp_input_method_v1_events_deactivate_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_method_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"activate\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_method_v1_events_activate_types as * const _ } , } , wl_message { name : b"deactivate\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_method_v1_events_deactivate_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_input_method_v1_interface : wl_interface = wl_interface { name : b"zwp_input_method_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 2 , events : unsafe { & zwp_input_method_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_input_method_v1_listener { # [ doc = "activate event\n\nA text input was activated. Creates an input method context object\nwhich allows communication with the text input." ] fn activate ( & mut self , object : * mut zwp_input_method_v1 , id : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 ) { } # [ doc = "deactivate event\n\nThe text input corresponding to the context argument was deactivated.\nThe input method context should be destroyed after deactivation is\nhandled." ] fn deactivate ( & mut self , object : * mut zwp_input_method_v1 , context : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 ) { } } pub unsafe fn zwp_input_method_v1_set_user_data ( zwp_input_method_v1 : * mut super :: zwp_input_method_v1 :: zwp_input_method_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_input_method_v1 as _ , user_data ) ; } pub unsafe fn zwp_input_method_v1_get_user_data ( zwp_input_method_v1 : * mut super :: zwp_input_method_v1 :: zwp_input_method_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_input_method_v1 as _ ) ; } pub unsafe fn zwp_input_method_v1_get_version ( zwp_input_method_v1 : * mut super :: zwp_input_method_v1 :: zwp_input_method_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_input_method_v1 as _ ) ; } pub unsafe fn zwp_input_method_v1_add_listener ( zwp_input_method_v1 : * mut super :: zwp_input_method_v1 :: zwp_input_method_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_input_method_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_input_method_v1_add_rust_listener ( zwp_input_method_v1 : * mut super :: zwp_input_method_v1 :: zwp_input_method_v1 , listener : & dyn zwp_input_method_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_input_method_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_input_method_v1_add_listener ( zwp_input_method_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_input_method_v1_destroy ( zwp_input_method_v1 : * mut super :: zwp_input_method_v1 :: zwp_input_method_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_input_method_v1 as _ ) ; } } # [ doc = "interface for implementing keyboards\n\nOnly one client can bind this interface at a time." ] pub mod zwp_input_panel_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_input_panel_v1 { } static mut zwp_input_panel_v1_requests_get_input_panel_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_panel_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"get_input_panel_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_panel_v1_requests_get_input_panel_surface_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_input_panel_v1_interface : wl_interface = wl_interface { name : b"zwp_input_panel_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_input_panel_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_input_panel_v1_listener { } pub unsafe fn zwp_input_panel_v1_set_user_data ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_input_panel_v1 as _ , user_data ) ; } pub unsafe fn zwp_input_panel_v1_get_user_data ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_input_panel_v1 as _ ) ; } pub unsafe fn zwp_input_panel_v1_get_version ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_input_panel_v1 as _ ) ; } pub unsafe fn zwp_input_panel_v1_add_listener ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_input_panel_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_input_panel_v1_add_rust_listener ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 , listener : & dyn zwp_input_panel_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_input_panel_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_input_panel_v1_add_listener ( zwp_input_panel_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_input_panel_v1_destroy ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_input_panel_v1 as _ ) ; } pub unsafe fn zwp_input_panel_v1_get_input_panel_surface ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_input_panel_v1 as _ , 0u32 , & super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } pub mod zwp_input_panel_surface_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_input_panel_surface_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum position { center_bottom = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl position { pub fn from_raw ( n : u32 ) -> Option < position > { match n { 0 => Some ( position :: center_bottom ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_input_panel_surface_v1_requests_set_toplevel_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_panel_surface_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_toplevel\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_panel_surface_v1_requests_set_toplevel_types as * const _ } , } , wl_message { name : b"set_overlay_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_input_panel_surface_v1_interface : wl_interface = wl_interface { name : b"zwp_input_panel_surface_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_input_panel_surface_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_input_panel_surface_v1_listener { } pub unsafe fn zwp_input_panel_surface_v1_set_user_data ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_input_panel_surface_v1 as _ , user_data ) ; } pub unsafe fn zwp_input_panel_surface_v1_get_user_data ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_input_panel_surface_v1 as _ ) ; } pub unsafe fn zwp_input_panel_surface_v1_get_version ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_input_panel_surface_v1 as _ ) ; } pub unsafe fn zwp_input_panel_surface_v1_add_listener ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_input_panel_surface_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_input_panel_surface_v1_add_rust_listener ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 , listener : & dyn zwp_input_panel_surface_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_input_panel_surface_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_input_panel_surface_v1_add_listener ( zwp_input_panel_surface_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_input_panel_surface_v1_destroy ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_input_panel_surface_v1 as _ ) ; } # [ doc = "set the surface type as a keyboard\n\nSet the input_panel_surface type to keyboard.\n\nA keyboard surface is only shown when a text input is active." ] pub unsafe fn zwp_input_panel_surface_v1_set_toplevel ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 , output : * mut super :: wl_output :: wl_output , position : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_panel_surface_v1 as _ , 0u32 , output , position , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the surface type as an overlay panel\n\nSet the input_panel_surface to be an overlay panel.\n\nThis is shown near the input cursor above the application window when\na text input is active." ] pub unsafe fn zwp_input_panel_surface_v1_set_overlay_panel ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_panel_surface_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod kde_output_device_v2 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; # [ doc = "output configuration representation\n\nAn output device describes a display device available to the compositor.\noutput_device is similar to wl_output, but focuses on output\nconfiguration management.\n\nA client can query all global output_device objects to enlist all\navailable display devices, even those that may currently not be\nrepresented by the compositor as a wl_output.\n\nThe client sends configuration changes to the server through the\noutputconfiguration interface, and the server applies the configuration\nchanges to the hardware and signals changes to the output devices\naccordingly.\n\nThis object is published as global during start up for every available\ndisplay devices, or when one later becomes available, for example by\nbeing hotplugged via a physical connector." ] pub mod kde_output_device_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum kde_output_device_v2 { } # [ doc = "subpixel geometry information\n\nThis enumeration describes how the physical pixels on an output are\nlaid out." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum subpixel { unknown = 0 , none = 1 , horizontal_rgb = 2 , horizontal_bgr = 3 , vertical_rgb = 4 , vertical_bgr = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl subpixel { pub fn from_raw ( n : u32 ) -> Option < subpixel > { match n { 0 => Some ( subpixel :: unknown ) , 1 => Some ( subpixel :: none ) , 2 => Some ( subpixel :: horizontal_rgb ) , 3 => Some ( subpixel :: horizontal_bgr ) , 4 => Some ( subpixel :: vertical_rgb ) , 5 => Some ( subpixel :: vertical_bgr ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "transform from framebuffer to output\n\nThis describes the transform, that a compositor will apply to a\nsurface to compensate for the rotation or mirroring of an\noutput device.\n\nThe flipped values correspond to an initial flip around a\nvertical axis followed by rotation.\n\nThe purpose is mainly to allow clients to render accordingly and\ntell the compositor, so that for fullscreen surfaces, the\ncompositor is still able to scan out directly client surfaces." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum transform { normal = 0 , _90 = 1 , _180 = 2 , _270 = 3 , flipped = 4 , flipped_90 = 5 , flipped_180 = 6 , flipped_270 = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl transform { pub fn from_raw ( n : u32 ) -> Option < transform > { match n { 0 => Some ( transform :: normal ) , 1 => Some ( transform :: _90 ) , 2 => Some ( transform :: _180 ) , 3 => Some ( transform :: _270 ) , 4 => Some ( transform :: flipped ) , 5 => Some ( transform :: flipped_90 ) , 6 => Some ( transform :: flipped_180 ) , 7 => Some ( transform :: flipped_270 ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { # [ doc = "describes capabilities of the outputdevice\n\nDescribes what capabilities this device has." ] pub struct capability : u32 { # [ doc = "if this output_device can use overscan" ] const overscan = 1 ; # [ doc = "if this outputdevice supports variable refresh rate" ] const vrr = 2 ; # [ doc = "if setting the rgb range is possible" ] const rgb_range = 4 ; } } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { Some ( capability :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = "describes vrr policy\n\nDescribes when the compositor may employ variable refresh rate" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum vrr_policy { never = 0 , always = 1 , automatic = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl vrr_policy { pub fn from_raw ( n : u32 ) -> Option < vrr_policy > { match n { 0 => Some ( vrr_policy :: never ) , 1 => Some ( vrr_policy :: always ) , 2 => Some ( vrr_policy :: automatic ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "describes RGB range policy\n\nWhether full or limited color range should be used" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum rgb_range { automatic = 0 , full = 1 , limited = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl rgb_range { pub fn from_raw ( n : u32 ) -> Option < rgb_range > { match n { 0 => Some ( rgb_range :: automatic ) , 1 => Some ( rgb_range :: full ) , 2 => Some ( rgb_range :: limited ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut kde_output_device_v2_events_current_mode_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2_interface as * const wl_interface } , ] ; static mut kde_output_device_v2_events_mode_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut kde_output_device_v2_events : [ wl_message ; 14 ] = [ wl_message { name : b"geometry\0" as * const u8 as * const c_char , signature : b"iiiiissi\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"current_mode\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & kde_output_device_v2_events_current_mode_types as * const _ } , } , wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & kde_output_device_v2_events_mode_types as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"scale\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"edid\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"enabled\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"uuid\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"serial_number\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"eisa_id\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"overscan\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"vrr_policy\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"rgb_range\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut kde_output_device_v2_interface : wl_interface = wl_interface { name : b"kde_output_device_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 14 , events : unsafe { & kde_output_device_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait kde_output_device_v2_listener { # [ doc = "geometric properties of the output\n\nThe geometry event describes geometric properties of the output.\nThe event is sent when binding to the output object and whenever\nany of the properties change." ] fn geometry ( & mut self , object : * mut kde_output_device_v2 , x : i32 , y : i32 , physical_width : i32 , physical_height : i32 , subpixel : i32 , make : * mut c_char , model : * mut c_char , transform : i32 ) { } # [ doc = "current mode\n\nThis event describes the mode currently in use for this head. It is only\nsent if the output is enabled." ] fn current_mode ( & mut self , object : * mut kde_output_device_v2 , mode : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 ) { } # [ doc = "advertise available output modes and current one\n\nThe mode event describes an available mode for the output.\n\nWhen the client binds to the output_device object, the server sends this\nevent once for every available mode the output_device can be operated by.\n\nThere will always be at least one event sent out on initial binding,\nwhich represents the current mode.\n\nLater if an output changes, its mode event is sent again for the\neventual added modes and lastly the current mode. In other words, the\ncurrent mode is always represented by the latest event sent with the current\nflag set.\n\nThe size of a mode is given in physical hardware units of the output device.\nThis is not necessarily the same as the output size in the global compositor\nspace. For instance, the output may be scaled, as described in\nkde_output_device_v2.scale, or transformed, as described in\nkde_output_device_v2.transform." ] fn mode ( & mut self , object : * mut kde_output_device_v2 , mode : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 ) { } # [ doc = "sent all information about output\n\nThis event is sent after all other properties have been\nsent on binding to the output object as well as after any\nother output property change have been applied later on.\nThis allows to see changes to the output properties as atomic,\neven if multiple events successively announce them." ] fn done ( & mut self , object : * mut kde_output_device_v2 , ) { } # [ doc = "output scaling properties\n\nThis event contains scaling geometry information\nthat is not in the geometry event. It may be sent after\nbinding the output object or if the output scale changes\nlater. If it is not sent, the client should assume a\nscale of 1.\n\nA scale larger than 1 means that the compositor will\nautomatically scale surface buffers by this amount\nwhen rendering. This is used for high resolution\ndisplays where applications rendering at the native\nresolution would be too small to be legible.\n\nIt is intended that scaling aware clients track the\ncurrent output of a surface, and if it is on a scaled\noutput it should use wl_surface.set_buffer_scale with\nthe scale of the output. That way the compositor can\navoid scaling the surface, and the client can supply\na higher detail image." ] fn scale ( & mut self , object : * mut kde_output_device_v2 , factor : wl_fixed_t ) { } # [ doc = "advertise EDID data for the output\n\nThe edid event encapsulates the EDID data for the outputdevice.\n\nThe event is sent when binding to the output object. The EDID\ndata may be empty, in which case this event is sent anyway.\nIf the EDID information is empty, you can fall back to the name\net al. properties of the outputdevice." ] fn edid ( & mut self , object : * mut kde_output_device_v2 , raw : * mut c_char ) { } # [ doc = "output is enabled or disabled\n\nThe enabled event notifies whether this output is currently\nenabled and used for displaying content by the server.\nThe event is sent when binding to the output object and\nwhenever later on an output changes its state by becoming\nenabled or disabled." ] fn enabled ( & mut self , object : * mut kde_output_device_v2 , enabled : i32 ) { } # [ doc = "A unique id for this outputdevice\n\nThe uuid can be used to identify the output. It's controlled by\nthe server entirely. The server should make sure the uuid is\npersistent across restarts. An empty uuid is considered invalid." ] fn uuid ( & mut self , object : * mut kde_output_device_v2 , uuid : * mut c_char ) { } # [ doc = "Serial Number\n\nSerial ID of the monitor, sent on startup before the first done event." ] fn serial_number ( & mut self , object : * mut kde_output_device_v2 , serialNumber : * mut c_char ) { } # [ doc = "EISA ID\n\nEISA ID of the monitor, sent on startup before the first done event." ] fn eisa_id ( & mut self , object : * mut kde_output_device_v2 , eisaId : * mut c_char ) { } # [ doc = "capability flags\n\nWhat capabilities this device has, sent on startup before the first\ndone event." ] fn capabilities ( & mut self , object : * mut kde_output_device_v2 , flags : capability ) { } # [ doc = "overscan\n\nOverscan value of the monitor in percent, sent on startup before the\nfirst done event." ] fn overscan ( & mut self , object : * mut kde_output_device_v2 , overscan : u32 ) { } # [ doc = "Variable Refresh Rate Policy\n\nWhat policy the compositor will employ regarding its use of variable\nrefresh rate." ] fn vrr_policy ( & mut self , object : * mut kde_output_device_v2 , vrr_policy : vrr_policy ) { } # [ doc = "RGB range\n\nWhat rgb range the compositor is using for this output" ] fn rgb_range ( & mut self , object : * mut kde_output_device_v2 , rgb_range : rgb_range ) { } } pub unsafe fn kde_output_device_v2_set_user_data ( kde_output_device_v2 : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , kde_output_device_v2 as _ , user_data ) ; } pub unsafe fn kde_output_device_v2_get_user_data ( kde_output_device_v2 : * mut super :: kde_output_device_v2 :: kde_output_device_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , kde_output_device_v2 as _ ) ; } pub unsafe fn kde_output_device_v2_get_version ( kde_output_device_v2 : * mut super :: kde_output_device_v2 :: kde_output_device_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , kde_output_device_v2 as _ ) ; } pub unsafe fn kde_output_device_v2_add_listener ( kde_output_device_v2 : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , kde_output_device_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn kde_output_device_v2_add_rust_listener ( kde_output_device_v2 : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , listener : & dyn kde_output_device_v2_listener ) -> bool { let to = ( listener as * const dyn kde_output_device_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return kde_output_device_v2_add_listener ( kde_output_device_v2 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn kde_output_device_v2_destroy ( kde_output_device_v2 : * mut super :: kde_output_device_v2 :: kde_output_device_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , kde_output_device_v2 as _ ) ; } } # [ doc = "output mode\n\nThis object describes an output mode.\n\nSome heads don't support output modes, in which case modes won't be\nadvertised.\n\nProperties sent via this interface are applied atomically via the\nkde_output_device.done event. No guarantees are made regarding the order\nin which properties are sent." ] pub mod kde_output_device_mode_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum kde_output_device_mode_v2 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut kde_output_device_mode_v2_events : [ wl_message ; 4 ] = [ wl_message { name : b"size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"refresh\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preferred\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut kde_output_device_mode_v2_interface : wl_interface = wl_interface { name : b"kde_output_device_mode_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 4 , events : unsafe { & kde_output_device_mode_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait kde_output_device_mode_v2_listener { # [ doc = "mode size\n\nThis event describes the mode size. The size is given in physical\nhardware units of the output device. This is not necessarily the same as\nthe output size in the global compositor space. For instance, the output\nmay be scaled or transformed." ] fn size ( & mut self , object : * mut kde_output_device_mode_v2 , width : i32 , height : i32 ) { } # [ doc = "mode refresh rate\n\nThis event describes the mode's fixed vertical refresh rate. It is only\nsent if the mode has a fixed refresh rate." ] fn refresh ( & mut self , object : * mut kde_output_device_mode_v2 , refresh : i32 ) { } # [ doc = "mode is preferred\n\nThis event advertises this mode as preferred." ] fn preferred ( & mut self , object : * mut kde_output_device_mode_v2 , ) { } # [ doc = "the mode has been destroyed\n\nThe compositor will destroy the object immediately after sending this\nevent, so it will become invalid and the client should release any\nresources associated with it." ] fn removed ( & mut self , object : * mut kde_output_device_mode_v2 , ) { } } pub unsafe fn kde_output_device_mode_v2_set_user_data ( kde_output_device_mode_v2 : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , kde_output_device_mode_v2 as _ , user_data ) ; } pub unsafe fn kde_output_device_mode_v2_get_user_data ( kde_output_device_mode_v2 : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , kde_output_device_mode_v2 as _ ) ; } pub unsafe fn kde_output_device_mode_v2_get_version ( kde_output_device_mode_v2 : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , kde_output_device_mode_v2 as _ ) ; } pub unsafe fn kde_output_device_mode_v2_add_listener ( kde_output_device_mode_v2 : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , kde_output_device_mode_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn kde_output_device_mode_v2_add_rust_listener ( kde_output_device_mode_v2 : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 , listener : & dyn kde_output_device_mode_v2_listener ) -> bool { let to = ( listener as * const dyn kde_output_device_mode_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return kde_output_device_mode_v2_add_listener ( kde_output_device_mode_v2 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn kde_output_device_mode_v2_destroy ( kde_output_device_mode_v2 : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , kde_output_device_mode_v2 as _ ) ; } } } pub mod kde_output_management_v2 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "configuration of server outputs through clients\n\nThis interface enables clients to set properties of output devices for screen\nconfiguration purposes via the server. To this end output devices are referenced\nby global kde_output_device_v2 objects.\n\noutputmanagement (wl_global)\n--------------------------\nrequest:\n* create_configuration -> outputconfiguration (wl_resource)\n\noutputconfiguration (wl_resource)\n--------------------------\nrequests:\n* enable(outputdevice, bool)\n* mode(outputdevice, mode)\n* transformation(outputdevice, flag)\n* position(outputdevice, x, y)\n* apply\n\nevents:\n* applied\n* failed\n\nThe server registers one outputmanagement object as a global object. In order\nto configure outputs a client requests create_configuration, which provides a\nresource referencing an outputconfiguration for one-time configuration. That\nway the server knows which requests belong together and can group them by that.\n\nOn the outputconfiguration object the client calls for each output whether the\noutput should be enabled, which mode should be set (by referencing the mode from\nthe list of announced modes) and the output's global position. Once all outputs\nare configured that way, the client calls apply.\nAt that point and not earlier the server should try to apply the configuration.\nIf this succeeds the server emits the applied signal, otherwise the failed\nsignal, such that the configuring client is noticed about the success of its\nconfiguration request.\n\nThrough this design the interface enables atomic output configuration changes if\ninternally supported by the server." ] pub mod kde_output_management_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum kde_output_management_v2 { } static mut kde_output_management_v2_requests_create_configuration_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: kde_output_configuration_v2 :: kde_output_configuration_v2_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut kde_output_management_v2_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create_configuration\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & kde_output_management_v2_requests_create_configuration_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut kde_output_management_v2_interface : wl_interface = wl_interface { name : b"kde_output_management_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & kde_output_management_v2_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait kde_output_management_v2_listener { } pub unsafe fn kde_output_management_v2_set_user_data ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , kde_output_management_v2 as _ , user_data ) ; } pub unsafe fn kde_output_management_v2_get_user_data ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , kde_output_management_v2 as _ ) ; } pub unsafe fn kde_output_management_v2_get_version ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , kde_output_management_v2 as _ ) ; } pub unsafe fn kde_output_management_v2_add_listener ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , kde_output_management_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn kde_output_management_v2_add_rust_listener ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 , listener : & dyn kde_output_management_v2_listener ) -> bool { let to = ( listener as * const dyn kde_output_management_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return kde_output_management_v2_add_listener ( kde_output_management_v2 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn kde_output_management_v2_destroy ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , kde_output_management_v2 as _ ) ; } # [ doc = "provide outputconfiguration object for configuring outputs\n\nRequest an outputconfiguration object through which the client can configure\noutput devices." ] pub unsafe fn kde_output_management_v2_create_configuration ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 ) -> * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , kde_output_management_v2 as _ , 0u32 , & super :: kde_output_configuration_v2 :: kde_output_configuration_v2_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "configure single output devices\n\noutputconfiguration is a client-specific resource that can be used to ask\nthe server to apply changes to available output devices.\n\nThe client receives a list of output devices from the registry. When it wants\nto apply new settings, it creates a configuration object from the\noutputmanagement global, writes changes through this object's enable, scale,\ntransform and mode calls. It then asks the server to apply these settings in\nan atomic fashion, for example through Linux' DRM interface.\n\nThe server signals back whether the new settings have applied successfully\nor failed to apply. outputdevice objects are updated after the changes have been\napplied to the hardware and before the server side sends the applied event." ] pub mod kde_output_configuration_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum kde_output_configuration_v2 { } # [ doc = "describes vrr policy\n\nDescribes when the compositor may employ variable refresh rate" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum vrr_policy { never = 0 , always = 1 , automatic = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl vrr_policy { pub fn from_raw ( n : u32 ) -> Option < vrr_policy > { match n { 0 => Some ( vrr_policy :: never ) , 1 => Some ( vrr_policy :: always ) , 2 => Some ( vrr_policy :: automatic ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "describes RGB range policy\n\nWhether this output should use full or limited rgb." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum rgb_range { automatic = 0 , full = 1 , limited = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl rgb_range { pub fn from_raw ( n : u32 ) -> Option < rgb_range > { match n { 0 => Some ( rgb_range :: automatic ) , 1 => Some ( rgb_range :: full ) , 2 => Some ( rgb_range :: limited ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut kde_output_configuration_v2_requests_enable_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut kde_output_configuration_v2_requests_mode_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , unsafe { & super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2_interface as * const wl_interface } , ] ; static mut kde_output_configuration_v2_requests_transform_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut kde_output_configuration_v2_requests_position_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut kde_output_configuration_v2_requests_scale_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut kde_output_configuration_v2_requests_overscan_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut kde_output_configuration_v2_requests_set_vrr_policy_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut kde_output_configuration_v2_requests_set_rgb_range_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut kde_output_configuration_v2_requests : [ wl_message ; 10 ] = [ wl_message { name : b"enable\0" as * const u8 as * const c_char , signature : b"oi\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_enable_types as * const _ } , } , wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"oo\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_mode_types as * const _ } , } , wl_message { name : b"transform\0" as * const u8 as * const c_char , signature : b"oi\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_transform_types as * const _ } , } , wl_message { name : b"position\0" as * const u8 as * const c_char , signature : b"oii\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_position_types as * const _ } , } , wl_message { name : b"scale\0" as * const u8 as * const c_char , signature : b"of\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_scale_types as * const _ } , } , wl_message { name : b"apply\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"overscan\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_overscan_types as * const _ } , } , wl_message { name : b"set_vrr_policy\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_set_vrr_policy_types as * const _ } , } , wl_message { name : b"set_rgb_range\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_set_rgb_range_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut kde_output_configuration_v2_events : [ wl_message ; 2 ] = [ wl_message { name : b"applied\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"failed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut kde_output_configuration_v2_interface : wl_interface = wl_interface { name : b"kde_output_configuration_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 10 , requests : unsafe { & kde_output_configuration_v2_requests as * const _ } , event_count : 2 , events : unsafe { & kde_output_configuration_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait kde_output_configuration_v2_listener { # [ doc = "configuration changes have been applied\n\nSent after the server has successfully applied the changes.\n." ] fn applied ( & mut self , object : * mut kde_output_configuration_v2 , ) { } # [ doc = "configuration changes failed to apply\n\nSent if the server rejects the changes or failed to apply them." ] fn failed ( & mut self , object : * mut kde_output_configuration_v2 , ) { } } pub unsafe fn kde_output_configuration_v2_set_user_data ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , kde_output_configuration_v2 as _ , user_data ) ; } pub unsafe fn kde_output_configuration_v2_get_user_data ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , kde_output_configuration_v2 as _ ) ; } pub unsafe fn kde_output_configuration_v2_get_version ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , kde_output_configuration_v2 as _ ) ; } pub unsafe fn kde_output_configuration_v2_add_listener ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , kde_output_configuration_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn kde_output_configuration_v2_add_rust_listener ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , listener : & dyn kde_output_configuration_v2_listener ) -> bool { let to = ( listener as * const dyn kde_output_configuration_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return kde_output_configuration_v2_add_listener ( kde_output_configuration_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "enable or disable an output\n\nMark the output as enabled or disabled." ] pub unsafe fn kde_output_configuration_v2_enable ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , enable : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 0u32 , outputdevice , enable , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "switch output-device to mode\n\nSets the mode for a given output." ] pub unsafe fn kde_output_configuration_v2_mode ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , mode : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 1u32 , outputdevice , mode , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "transform output-device\n\nSets the transformation for a given output." ] pub unsafe fn kde_output_configuration_v2_transform ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , transform : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 2u32 , outputdevice , transform , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "position output in global space\n\nSets the position for this output device. (x,y) describe the top-left corner\nof the output in global space, whereby the origin (0,0) of the global space\nhas to be aligned with the top-left corner of the most left and in case this\ndoes not define a single one the top output.\n\nThere may be no gaps or overlaps between outputs, i.e. the outputs are\nstacked horizontally, vertically, or both on each other." ] pub unsafe fn kde_output_configuration_v2_position ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 3u32 , outputdevice , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set scaling factor of this output\n\nSets the scaling factor for this output device." ] pub unsafe fn kde_output_configuration_v2_scale ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , scale : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 4u32 , outputdevice , scale , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "apply configuration changes to all output devices\n\nAsks the server to apply property changes requested through this outputconfiguration\nobject to all outputs on the server side." ] pub unsafe fn kde_output_configuration_v2_apply ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 5u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the outputconfiguration object" ] pub unsafe fn kde_output_configuration_v2_destroy ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 6u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , kde_output_configuration_v2 as _ ) ; } # [ doc = "set overscan value\n\nSet the overscan value of this output device with a value in percent." ] pub unsafe fn kde_output_configuration_v2_overscan ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , overscan : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 7u32 , outputdevice , overscan , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the VRR policy\n\nSet what policy the compositor should employ regarding its use of\nvariable refresh rate." ] pub unsafe fn kde_output_configuration_v2_set_vrr_policy ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , policy : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 8u32 , outputdevice , policy , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "RGB range\n\nWhether full or limited color range should be used" ] pub unsafe fn kde_output_configuration_v2_set_rgb_range ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , rgb_range : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 9u32 , outputdevice , rgb_range , std :: ptr :: null :: < c_void > ( ) ) ; } } } [INFO] [stdout] | ~~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> /opt/rustwide/target/debug/build/wayland-raw-protocol-bindings-cb634f59c146b0af/out/client.rs:1:2080 [INFO] [stdout] | [INFO] [stdout] 1 | ...t wl_interface } , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , NULLPTR as * const wl_interface , ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [ * const sys :: common :: wl_interface ; 8 ] = [ NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , ] ; pub mod zkde_screencast_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Protocol for managing PipeWire feeds of the different displays and windows." ] pub mod zkde_screencast_unstable_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zkde_screencast_unstable_v1 { } # [ doc = "Stream consumer attachment attributes" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum pointer { # [ doc = "No cursor" ] hidden = 1 , # [ doc = "Render the cursor on the stream" ] embedded = 2 , # [ doc = "Send metadata about where the cursor is through PipeWire" ] metadata = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl pointer { pub fn from_raw ( n : u32 ) -> Option < pointer > { match n { 1 => Some ( pointer :: hidden ) , 2 => Some ( pointer :: embedded ) , 4 => Some ( pointer :: metadata ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zkde_screencast_unstable_v1_requests_stream_output_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1_interface as * const wl_interface } , unsafe { &raw const super :: wl_output :: wl_output_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut zkde_screencast_unstable_v1_requests_stream_window_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zkde_screencast_unstable_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"stream_output\0" as * const u8 as * const c_char , signature : b"nou\0" as * const u8 as * const c_char , types : unsafe { & zkde_screencast_unstable_v1_requests_stream_output_types as * const _ } , } , wl_message { name : b"stream_window\0" as * const u8 as * const c_char , signature : b"nsu\0" as * const u8 as * const c_char , types : unsafe { & zkde_screencast_unstable_v1_requests_stream_window_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zkde_screencast_unstable_v1_interface : wl_interface = wl_interface { name : b"zkde_screencast_unstable_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & zkde_screencast_unstable_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zkde_screencast_unstable_v1_listener { } pub unsafe fn zkde_screencast_unstable_v1_set_user_data ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zkde_screencast_unstable_v1 as _ , user_data ) ; } pub unsafe fn zkde_screencast_unstable_v1_get_user_data ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zkde_screencast_unstable_v1 as _ ) ; } pub unsafe fn zkde_screencast_unstable_v1_get_version ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zkde_screencast_unstable_v1 as _ ) ; } pub unsafe fn zkde_screencast_unstable_v1_add_listener ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zkde_screencast_unstable_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zkde_screencast_unstable_v1_add_rust_listener ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 , listener : & dyn zkde_screencast_unstable_v1_listener ) -> bool { let to = ( listener as * const dyn zkde_screencast_unstable_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zkde_screencast_unstable_v1_add_listener ( zkde_screencast_unstable_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "requests a feed from a given source" ] pub unsafe fn zkde_screencast_unstable_v1_stream_output ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 , output : * mut super :: wl_output :: wl_output , pointer : u32 ) -> * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zkde_screencast_unstable_v1 as _ , 0u32 , & super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , output , pointer ) ; return r as _ ; } # [ doc = "requests a feed from a given source" ] pub unsafe fn zkde_screencast_unstable_v1_stream_window ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 , window_uuid : * const c_char , pointer : u32 ) -> * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zkde_screencast_unstable_v1 as _ , 1u32 , & super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , window_uuid , pointer ) ; return r as _ ; } # [ doc = "Destroy the zkde_screencast_unstable_v1\n\nDestroy the zkde_screencast_unstable_v1 object." ] pub unsafe fn zkde_screencast_unstable_v1_destroy ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zkde_screencast_unstable_v1 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zkde_screencast_unstable_v1 as _ ) ; } } pub mod zkde_screencast_stream_unstable_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zkde_screencast_stream_unstable_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zkde_screencast_stream_unstable_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"close\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zkde_screencast_stream_unstable_v1_events : [ wl_message ; 3 ] = [ wl_message { name : b"closed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"created\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"failed\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zkde_screencast_stream_unstable_v1_interface : wl_interface = wl_interface { name : b"zkde_screencast_stream_unstable_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zkde_screencast_stream_unstable_v1_requests as * const _ } , event_count : 3 , events : unsafe { & zkde_screencast_stream_unstable_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zkde_screencast_stream_unstable_v1_listener { # [ doc = "Notifies that the server has stopped the stream. Clients should now call close." ] fn closed ( & mut self , object : * mut zkde_screencast_stream_unstable_v1 , ) { } # [ doc = "Notifies about a pipewire feed being created" ] fn created ( & mut self , object : * mut zkde_screencast_stream_unstable_v1 , node : u32 ) { } # [ doc = "Offers an error message so the client knows the created event will not arrive, and the client should close the resource." ] fn failed ( & mut self , object : * mut zkde_screencast_stream_unstable_v1 , error : * mut c_char ) { } } pub unsafe fn zkde_screencast_stream_unstable_v1_set_user_data ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zkde_screencast_stream_unstable_v1 as _ , user_data ) ; } pub unsafe fn zkde_screencast_stream_unstable_v1_get_user_data ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zkde_screencast_stream_unstable_v1 as _ ) ; } pub unsafe fn zkde_screencast_stream_unstable_v1_get_version ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zkde_screencast_stream_unstable_v1 as _ ) ; } pub unsafe fn zkde_screencast_stream_unstable_v1_add_listener ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zkde_screencast_stream_unstable_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zkde_screencast_stream_unstable_v1_add_rust_listener ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 , listener : & dyn zkde_screencast_stream_unstable_v1_listener ) -> bool { let to = ( listener as * const dyn zkde_screencast_stream_unstable_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zkde_screencast_stream_unstable_v1_add_listener ( zkde_screencast_stream_unstable_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zkde_screencast_stream_unstable_v1_destroy ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zkde_screencast_stream_unstable_v1 as _ ) ; } # [ doc = "Indicates we are done with the stream and the communication is over." ] pub unsafe fn zkde_screencast_stream_unstable_v1_close ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zkde_screencast_stream_unstable_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zkde_screencast_stream_unstable_v1 as _ ) ; } } } pub mod gtk { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "gtk specific extensions\n\ngtk_shell is a protocol extension providing additional features for\nclients implementing it." ] pub mod gtk_shell1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum gtk_shell1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum capability { global_app_menu = 1 , global_menu_bar = 2 , desktop_icons = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { match n { 1 => Some ( capability :: global_app_menu ) , 2 => Some ( capability :: global_menu_bar ) , 3 => Some ( capability :: desktop_icons ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut gtk_shell1_requests_get_gtk_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: gtk_surface1 :: gtk_surface1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut gtk_shell1_requests_system_bell_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: gtk_surface1 :: gtk_surface1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut gtk_shell1_requests : [ wl_message ; 4 ] = [ wl_message { name : b"get_gtk_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & gtk_shell1_requests_get_gtk_surface_types as * const _ } , } , wl_message { name : b"set_startup_id\0" as * const u8 as * const c_char , signature : b"?s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"system_bell\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & gtk_shell1_requests_system_bell_types as * const _ } , } , wl_message { name : b"notify_launch\0" as * const u8 as * const c_char , signature : b"3s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut gtk_shell1_events : [ wl_message ; 1 ] = [ wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut gtk_shell1_interface : wl_interface = wl_interface { name : b"gtk_shell1\0" as * const u8 as * const c_char , version : 5 , request_count : 4 , requests : unsafe { & gtk_shell1_requests as * const _ } , event_count : 1 , events : unsafe { & gtk_shell1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait gtk_shell1_listener { # [ doc = "" ] fn capabilities ( & mut self , object : * mut gtk_shell1 , capabilities : u32 ) { } } pub unsafe fn gtk_shell1_set_user_data ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , gtk_shell1 as _ , user_data ) ; } pub unsafe fn gtk_shell1_get_user_data ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , gtk_shell1 as _ ) ; } pub unsafe fn gtk_shell1_get_version ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , gtk_shell1 as _ ) ; } pub unsafe fn gtk_shell1_add_listener ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , gtk_shell1 as _ , listener as _ , data as _ ) ; } pub unsafe fn gtk_shell1_add_rust_listener ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , listener : & dyn gtk_shell1_listener ) -> bool { let to = ( listener as * const dyn gtk_shell1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return gtk_shell1_add_listener ( gtk_shell1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn gtk_shell1_destroy ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , gtk_shell1 as _ ) ; } pub unsafe fn gtk_shell1_get_gtk_surface ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: gtk_surface1 :: gtk_surface1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , gtk_shell1 as _ , 0u32 , & super :: gtk_surface1 :: gtk_surface1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } pub unsafe fn gtk_shell1_set_startup_id ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , startup_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_shell1 as _ , 1u32 , startup_id , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_shell1_system_bell ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , surface : * mut super :: gtk_surface1 :: gtk_surface1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_shell1 as _ , 2u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_shell1_notify_launch ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , startup_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_shell1 as _ , 3u32 , startup_id , std :: ptr :: null :: < c_void > ( ) ) ; } } pub mod gtk_surface1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum gtk_surface1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum state { tiled = 1 , tiled_top = 2 , tiled_right = 3 , tiled_bottom = 4 , tiled_left = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl state { pub fn from_raw ( n : u32 ) -> Option < state > { match n { 1 => Some ( state :: tiled ) , 2 => Some ( state :: tiled_top ) , 3 => Some ( state :: tiled_right ) , 4 => Some ( state :: tiled_bottom ) , 5 => Some ( state :: tiled_left ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum edge_constraint { resizable_top = 1 , resizable_right = 2 , resizable_bottom = 3 , resizable_left = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl edge_constraint { pub fn from_raw ( n : u32 ) -> Option < edge_constraint > { match n { 1 => Some ( edge_constraint :: resizable_top ) , 2 => Some ( edge_constraint :: resizable_right ) , 3 => Some ( edge_constraint :: resizable_bottom ) , 4 => Some ( edge_constraint :: resizable_left ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum gesture { double_click = 1 , right_click = 2 , middle_click = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl gesture { pub fn from_raw ( n : u32 ) -> Option < gesture > { match n { 1 => Some ( gesture :: double_click ) , 2 => Some ( gesture :: right_click ) , 3 => Some ( gesture :: middle_click ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { invalid_gesture = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_gesture ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut gtk_surface1_requests_titlebar_gesture_types : [ * const wl_interface ; 3 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut gtk_surface1_requests : [ wl_message ; 7 ] = [ wl_message { name : b"set_dbus_properties\0" as * const u8 as * const c_char , signature : b"?s?s?s?s?s?s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_modal\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unset_modal\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"present\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"request_focus\0" as * const u8 as * const c_char , signature : b"3?s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"4\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"titlebar_gesture\0" as * const u8 as * const c_char , signature : b"5uou\0" as * const u8 as * const c_char , types : unsafe { & gtk_surface1_requests_titlebar_gesture_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut gtk_surface1_events : [ wl_message ; 2 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"configure_edges\0" as * const u8 as * const c_char , signature : b"2a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut gtk_surface1_interface : wl_interface = wl_interface { name : b"gtk_surface1\0" as * const u8 as * const c_char , version : 5 , request_count : 7 , requests : unsafe { & gtk_surface1_requests as * const _ } , event_count : 2 , events : unsafe { & gtk_surface1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait gtk_surface1_listener { # [ doc = "" ] fn configure ( & mut self , object : * mut gtk_surface1 , states : * mut wl_array ) { } # [ doc = "Only available since version 2 of the interface." ] fn configure_edges ( & mut self , object : * mut gtk_surface1 , constraints : * mut wl_array ) { } } pub unsafe fn gtk_surface1_set_user_data ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , gtk_surface1 as _ , user_data ) ; } pub unsafe fn gtk_surface1_get_user_data ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , gtk_surface1 as _ ) ; } pub unsafe fn gtk_surface1_get_version ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , gtk_surface1 as _ ) ; } pub unsafe fn gtk_surface1_add_listener ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , gtk_surface1 as _ , listener as _ , data as _ ) ; } pub unsafe fn gtk_surface1_add_rust_listener ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , listener : & dyn gtk_surface1_listener ) -> bool { let to = ( listener as * const dyn gtk_surface1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return gtk_surface1_add_listener ( gtk_surface1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn gtk_surface1_destroy ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , gtk_surface1 as _ ) ; } pub unsafe fn gtk_surface1_set_dbus_properties ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , application_id : * const c_char , app_menu_path : * const c_char , menubar_path : * const c_char , window_object_path : * const c_char , application_object_path : * const c_char , unique_bus_name : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 0u32 , application_id , app_menu_path , menubar_path , window_object_path , application_object_path , unique_bus_name , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_surface1_set_modal ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_surface1_unset_modal ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_surface1_present ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , time : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 3u32 , time , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_surface1_request_focus ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , startup_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 4u32 , startup_id , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_surface1_release ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 5u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , gtk_surface1 as _ ) ; } pub unsafe fn gtk_surface1_titlebar_gesture ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , serial : u32 , seat : * mut super :: wl_seat :: wl_seat , gesture : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 6u32 , serial , seat , gesture , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod wayland { # [ doc = "core global object\n\nThe core global object. This is a special singleton object. It\nis used for internal Wayland protocol features." ] pub mod wl_display { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_display { } # [ doc = "global error values\n\nThese errors are global and can be emitted in response to any\nserver request." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "server couldn't find object" ] invalid_object = 0 , # [ doc = "method doesn't exist on the specified interface" ] invalid_method = 1 , # [ doc = "server is out of memory" ] no_memory = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_object ) , 1 => Some ( error :: invalid_method ) , 2 => Some ( error :: no_memory ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_display_requests_sync_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_callback :: wl_callback_interface as * const wl_interface } , ] ; static mut wl_display_requests_get_registry_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_registry :: wl_registry_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_display_requests : [ wl_message ; 2 ] = [ wl_message { name : b"sync\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_display_requests_sync_types as * const _ } , } , wl_message { name : b"get_registry\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_display_requests_get_registry_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_display_events : [ wl_message ; 2 ] = [ wl_message { name : b"error\0" as * const u8 as * const c_char , signature : b"ous\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"delete_id\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_display_interface : wl_interface = wl_interface { name : b"wl_display\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & wl_display_requests as * const _ } , event_count : 2 , events : unsafe { & wl_display_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_display_listener { # [ doc = "fatal error event\n\nThe error event is sent out when a fatal (non-recoverable)\nerror has occurred. The object_id argument is the object\nwhere the error occurred, most often in response to a request\nto that object. The code identifies the error and is defined\nby the object interface. As such, each interface defines its\nown set of error codes. The message is a brief description\nof the error, for (debugging) convenience." ] fn error ( & mut self , object : * mut wl_display , object_id : * mut wl_proxy , code : u32 , message : * mut c_char ) { } # [ doc = "acknowledge object ID deletion\n\nThis event is used internally by the object ID management\nlogic. When a client deletes an object, the server will send\nthis event to acknowledge that it has seen the delete request.\nWhen the client receives this event, it will know that it can\nsafely reuse the object ID." ] fn delete_id ( & mut self , object : * mut wl_display , id : u32 ) { } } pub unsafe fn wl_display_set_user_data ( wl_display : * mut super :: wl_display :: wl_display , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_display as _ , user_data ) ; } pub unsafe fn wl_display_get_user_data ( wl_display : * mut super :: wl_display :: wl_display ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_display as _ ) ; } pub unsafe fn wl_display_get_version ( wl_display : * mut super :: wl_display :: wl_display ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_display as _ ) ; } pub unsafe fn wl_display_add_listener ( wl_display : * mut super :: wl_display :: wl_display , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_display as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_display_add_rust_listener ( wl_display : * mut super :: wl_display :: wl_display , listener : & dyn wl_display_listener ) -> bool { let to = ( listener as * const dyn wl_display_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_display_add_listener ( wl_display as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "asynchronous roundtrip\n\nThe sync request asks the server to emit the 'done' event\non the returned wl_callback object. Since requests are\nhandled in-order and events are delivered in-order, this can\nbe used as a barrier to ensure all previous requests and the\nresulting events have been handled.\n\nThe object returned by this request will be destroyed by the\ncompositor after the callback is fired and as such the client must not\nattempt to use it after that point.\n\nThe callback_data passed in the callback is the event serial." ] pub unsafe fn wl_display_sync ( wl_display : * mut super :: wl_display :: wl_display ) -> * mut super :: wl_callback :: wl_callback { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_display as _ , 0u32 , & super :: wl_callback :: wl_callback_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "get global registry object\n\nThis request creates a registry object that allows the client\nto list and bind the global objects available from the\ncompositor.\n\nIt should be noted that the server side resources consumed in\nresponse to a get_registry request can only be released when the\nclient disconnects, not when the client side proxy is destroyed.\nTherefore, clients should invoke get_registry as infrequently as\npossible to avoid wasting memory." ] pub unsafe fn wl_display_get_registry ( wl_display : * mut super :: wl_display :: wl_display ) -> * mut super :: wl_registry :: wl_registry { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_display as _ , 1u32 , & super :: wl_registry :: wl_registry_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "global registry object\n\nThe singleton global registry object. The server has a number of\nglobal objects that are available to all clients. These objects\ntypically represent an actual object in the server (for example,\nan input device) or they are singleton objects that provide\nextension functionality.\n\nWhen a client creates a registry object, the registry object\nwill emit a global event for each global currently in the\nregistry. Globals come and go as a result of device or\nmonitor hotplugs, reconfiguration or other events, and the\nregistry will send out global and global_remove events to\nkeep the client up to date with the changes. To mark the end\nof the initial burst of events, the client can use the\nwl_display.sync request immediately after calling\nwl_display.get_registry.\n\nA client can bind to a global object by using the bind\nrequest. This creates a client-side handle that lets the object\nemit events to the client and lets the client invoke requests on\nthe object." ] pub mod wl_registry { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_registry { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_registry_requests : [ wl_message ; 1 ] = [ wl_message { name : b"bind\0" as * const u8 as * const c_char , signature : b"usun\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_registry_events : [ wl_message ; 2 ] = [ wl_message { name : b"global\0" as * const u8 as * const c_char , signature : b"usu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"global_remove\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_registry_interface : wl_interface = wl_interface { name : b"wl_registry\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wl_registry_requests as * const _ } , event_count : 2 , events : unsafe { & wl_registry_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_registry_listener { # [ doc = "announce global object\n\nNotify the client of global objects.\n\nThe event notifies the client that a global object with\nthe given name is now available, and it implements the\ngiven version of the given interface." ] fn global ( & mut self , object : * mut wl_registry , name : u32 , interface : * mut c_char , version : u32 ) { } # [ doc = "announce removal of global object\n\nNotify the client of removed global objects.\n\nThis event notifies the client that the global identified\nby name is no longer available. If the client bound to\nthe global using the bind request, the client should now\ndestroy that object.\n\nThe object remains valid and requests to the object will be\nignored until the client destroys it, to avoid races between\nthe global going away and a client sending a request to it." ] fn global_remove ( & mut self , object : * mut wl_registry , name : u32 ) { } } pub unsafe fn wl_registry_set_user_data ( wl_registry : * mut super :: wl_registry :: wl_registry , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_registry as _ , user_data ) ; } pub unsafe fn wl_registry_get_user_data ( wl_registry : * mut super :: wl_registry :: wl_registry ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_registry as _ ) ; } pub unsafe fn wl_registry_get_version ( wl_registry : * mut super :: wl_registry :: wl_registry ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_registry as _ ) ; } pub unsafe fn wl_registry_add_listener ( wl_registry : * mut super :: wl_registry :: wl_registry , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_registry as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_registry_add_rust_listener ( wl_registry : * mut super :: wl_registry :: wl_registry , listener : & dyn wl_registry_listener ) -> bool { let to = ( listener as * const dyn wl_registry_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_registry_add_listener ( wl_registry as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_registry_destroy ( wl_registry : * mut super :: wl_registry :: wl_registry ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_registry as _ ) ; } # [ doc = "bind an object to the display\n\nBinds a new, client-created object to the server using the\nspecified name as the identifier." ] pub unsafe fn wl_registry_bind ( wl_registry : * mut super :: wl_registry :: wl_registry , name : u32 , interface : * mut wl_interface , version : u32 ) -> * mut wl_proxy { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor_versioned , wl_registry as _ , 0u32 , interface as _ , version , name , ( * interface ) . name , version , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "callback object\n\nClients can handle the 'done' event to get notified when\nthe related request is done." ] pub mod wl_callback { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_callback { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_callback_events : [ wl_message ; 1 ] = [ wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_callback_interface : wl_interface = wl_interface { name : b"wl_callback\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 1 , events : unsafe { & wl_callback_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_callback_listener { # [ doc = "done event\n\nNotify the client when the related request is done." ] fn done ( & mut self , object : * mut wl_callback , callback_data : u32 ) { } } pub unsafe fn wl_callback_set_user_data ( wl_callback : * mut super :: wl_callback :: wl_callback , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_callback as _ , user_data ) ; } pub unsafe fn wl_callback_get_user_data ( wl_callback : * mut super :: wl_callback :: wl_callback ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_callback as _ ) ; } pub unsafe fn wl_callback_get_version ( wl_callback : * mut super :: wl_callback :: wl_callback ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_callback as _ ) ; } pub unsafe fn wl_callback_add_listener ( wl_callback : * mut super :: wl_callback :: wl_callback , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_callback as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_callback_add_rust_listener ( wl_callback : * mut super :: wl_callback :: wl_callback , listener : & dyn wl_callback_listener ) -> bool { let to = ( listener as * const dyn wl_callback_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_callback_add_listener ( wl_callback as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_callback_destroy ( wl_callback : * mut super :: wl_callback :: wl_callback ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_callback as _ ) ; } } # [ doc = "the compositor singleton\n\nA compositor. This object is a singleton global. The\ncompositor is in charge of combining the contents of multiple\nsurfaces into one displayable output." ] pub mod wl_compositor { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_compositor { } static mut wl_compositor_requests_create_surface_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut wl_compositor_requests_create_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_compositor_requests : [ wl_message ; 2 ] = [ wl_message { name : b"create_surface\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_compositor_requests_create_surface_types as * const _ } , } , wl_message { name : b"create_region\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_compositor_requests_create_region_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_compositor_interface : wl_interface = wl_interface { name : b"wl_compositor\0" as * const u8 as * const c_char , version : 4 , request_count : 2 , requests : unsafe { & wl_compositor_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_compositor_listener { } pub unsafe fn wl_compositor_set_user_data ( wl_compositor : * mut super :: wl_compositor :: wl_compositor , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_compositor as _ , user_data ) ; } pub unsafe fn wl_compositor_get_user_data ( wl_compositor : * mut super :: wl_compositor :: wl_compositor ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_compositor as _ ) ; } pub unsafe fn wl_compositor_get_version ( wl_compositor : * mut super :: wl_compositor :: wl_compositor ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_compositor as _ ) ; } pub unsafe fn wl_compositor_add_listener ( wl_compositor : * mut super :: wl_compositor :: wl_compositor , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_compositor as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_compositor_add_rust_listener ( wl_compositor : * mut super :: wl_compositor :: wl_compositor , listener : & dyn wl_compositor_listener ) -> bool { let to = ( listener as * const dyn wl_compositor_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_compositor_add_listener ( wl_compositor as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_compositor_destroy ( wl_compositor : * mut super :: wl_compositor :: wl_compositor ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_compositor as _ ) ; } # [ doc = "create new surface\n\nAsk the compositor to create a new surface." ] pub unsafe fn wl_compositor_create_surface ( wl_compositor : * mut super :: wl_compositor :: wl_compositor ) -> * mut super :: wl_surface :: wl_surface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_compositor as _ , 0u32 , & super :: wl_surface :: wl_surface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "create new region\n\nAsk the compositor to create a new region." ] pub unsafe fn wl_compositor_create_region ( wl_compositor : * mut super :: wl_compositor :: wl_compositor ) -> * mut super :: wl_region :: wl_region { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_compositor as _ , 1u32 , & super :: wl_region :: wl_region_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "a shared memory pool\n\nThe wl_shm_pool object encapsulates a piece of memory shared\nbetween the compositor and client. Through the wl_shm_pool\nobject, the client can allocate shared memory wl_buffer objects.\nAll objects created through the same pool share the same\nunderlying mapped memory. Reusing the mapped memory avoids the\nsetup/teardown overhead and is useful when interactively resizing\na surface or for many small buffers." ] pub mod wl_shm_pool { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_shm_pool { } static mut wl_shm_pool_requests_create_buffer_types : [ * const wl_interface ; 6 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_shm_pool_requests : [ wl_message ; 3 ] = [ wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"niiiiu\0" as * const u8 as * const c_char , types : unsafe { & wl_shm_pool_requests_create_buffer_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"resize\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_shm_pool_interface : wl_interface = wl_interface { name : b"wl_shm_pool\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & wl_shm_pool_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_shm_pool_listener { } pub unsafe fn wl_shm_pool_set_user_data ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_shm_pool as _ , user_data ) ; } pub unsafe fn wl_shm_pool_get_user_data ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_shm_pool as _ ) ; } pub unsafe fn wl_shm_pool_get_version ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_shm_pool as _ ) ; } pub unsafe fn wl_shm_pool_add_listener ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_shm_pool as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_shm_pool_add_rust_listener ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool , listener : & dyn wl_shm_pool_listener ) -> bool { let to = ( listener as * const dyn wl_shm_pool_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_shm_pool_add_listener ( wl_shm_pool as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "create a buffer from the pool\n\nCreate a wl_buffer object from the pool.\n\nThe buffer is created offset bytes into the pool and has\nwidth and height as specified. The stride argument specifies\nthe number of bytes from the beginning of one row to the beginning\nof the next. The format is the pixel format of the buffer and\nmust be one of those advertised through the wl_shm.format event.\n\nA buffer will keep a reference to the pool it was created from\nso it is valid to destroy the pool immediately after creating\na buffer from it." ] pub unsafe fn wl_shm_pool_create_buffer ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool , offset : i32 , width : i32 , height : i32 , stride : i32 , format : u32 ) -> * mut super :: wl_buffer :: wl_buffer { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_shm_pool as _ , 0u32 , & super :: wl_buffer :: wl_buffer_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , offset , width , height , stride , format ) ; return r as _ ; } # [ doc = "destroy the pool\n\nDestroy the shared memory pool.\n\nThe mmapped memory will be released when all\nbuffers that have been created from this pool\nare gone." ] pub unsafe fn wl_shm_pool_destroy ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shm_pool as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_shm_pool as _ ) ; } # [ doc = "change the size of the pool mapping\n\nThis request will cause the server to remap the backing memory\nfor the pool from the file descriptor passed when the pool was\ncreated, but using the new size. This request can only be\nused to make the pool bigger." ] pub unsafe fn wl_shm_pool_resize ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool , size : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shm_pool as _ , 2u32 , size , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "shared memory support\n\nA singleton global object that provides support for shared\nmemory.\n\nClients can create wl_shm_pool objects using the create_pool\nrequest.\n\nAt connection setup time, the wl_shm object emits one or more\nformat events to inform clients about the valid pixel formats\nthat can be used for buffers." ] pub mod wl_shm { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_shm { } # [ doc = "wl_shm error values\n\nThese errors can be emitted in response to wl_shm requests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "buffer format is not known" ] invalid_format = 0 , # [ doc = "invalid size or stride during pool or buffer creation" ] invalid_stride = 1 , # [ doc = "mmapping the file descriptor failed" ] invalid_fd = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_format ) , 1 => Some ( error :: invalid_stride ) , 2 => Some ( error :: invalid_fd ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "pixel formats\n\nThis describes the memory layout of an individual pixel.\n\nAll renderers should support argb8888 and xrgb8888 but any other\nformats are optional and may not be supported by the particular\nrenderer in use.\n\nThe drm format codes match the macros defined in drm_fourcc.h.\nThe formats actually supported by the compositor will be\nreported by the format event." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum format { # [ doc = "32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian" ] argb8888 = 0 , # [ doc = "32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian" ] xrgb8888 = 1 , # [ doc = "8-bit color index format, [7:0] C" ] c8 = 538982467 , # [ doc = "8-bit RGB format, [7:0] R:G:B 3:3:2" ] rgb332 = 943867730 , # [ doc = "8-bit BGR format, [7:0] B:G:R 2:3:3" ] bgr233 = 944916290 , # [ doc = "16-bit xRGB format, [15:0] x:R:G:B 4:4:4:4 little endian" ] xrgb4444 = 842093144 , # [ doc = "16-bit xBGR format, [15:0] x:B:G:R 4:4:4:4 little endian" ] xbgr4444 = 842089048 , # [ doc = "16-bit RGBx format, [15:0] R:G:B:x 4:4:4:4 little endian" ] rgbx4444 = 842094674 , # [ doc = "16-bit BGRx format, [15:0] B:G:R:x 4:4:4:4 little endian" ] bgrx4444 = 842094658 , # [ doc = "16-bit ARGB format, [15:0] A:R:G:B 4:4:4:4 little endian" ] argb4444 = 842093121 , # [ doc = "16-bit ABGR format, [15:0] A:B:G:R 4:4:4:4 little endian" ] abgr4444 = 842089025 , # [ doc = "16-bit RBGA format, [15:0] R:G:B:A 4:4:4:4 little endian" ] rgba4444 = 842088786 , # [ doc = "16-bit BGRA format, [15:0] B:G:R:A 4:4:4:4 little endian" ] bgra4444 = 842088770 , # [ doc = "16-bit xRGB format, [15:0] x:R:G:B 1:5:5:5 little endian" ] xrgb1555 = 892424792 , # [ doc = "16-bit xBGR 1555 format, [15:0] x:B:G:R 1:5:5:5 little endian" ] xbgr1555 = 892420696 , # [ doc = "16-bit RGBx 5551 format, [15:0] R:G:B:x 5:5:5:1 little endian" ] rgbx5551 = 892426322 , # [ doc = "16-bit BGRx 5551 format, [15:0] B:G:R:x 5:5:5:1 little endian" ] bgrx5551 = 892426306 , # [ doc = "16-bit ARGB 1555 format, [15:0] A:R:G:B 1:5:5:5 little endian" ] argb1555 = 892424769 , # [ doc = "16-bit ABGR 1555 format, [15:0] A:B:G:R 1:5:5:5 little endian" ] abgr1555 = 892420673 , # [ doc = "16-bit RGBA 5551 format, [15:0] R:G:B:A 5:5:5:1 little endian" ] rgba5551 = 892420434 , # [ doc = "16-bit BGRA 5551 format, [15:0] B:G:R:A 5:5:5:1 little endian" ] bgra5551 = 892420418 , # [ doc = "16-bit RGB 565 format, [15:0] R:G:B 5:6:5 little endian" ] rgb565 = 909199186 , # [ doc = "16-bit BGR 565 format, [15:0] B:G:R 5:6:5 little endian" ] bgr565 = 909199170 , # [ doc = "24-bit RGB format, [23:0] R:G:B little endian" ] rgb888 = 875710290 , # [ doc = "24-bit BGR format, [23:0] B:G:R little endian" ] bgr888 = 875710274 , # [ doc = "32-bit xBGR format, [31:0] x:B:G:R 8:8:8:8 little endian" ] xbgr8888 = 875709016 , # [ doc = "32-bit RGBx format, [31:0] R:G:B:x 8:8:8:8 little endian" ] rgbx8888 = 875714642 , # [ doc = "32-bit BGRx format, [31:0] B:G:R:x 8:8:8:8 little endian" ] bgrx8888 = 875714626 , # [ doc = "32-bit ABGR format, [31:0] A:B:G:R 8:8:8:8 little endian" ] abgr8888 = 875708993 , # [ doc = "32-bit RGBA format, [31:0] R:G:B:A 8:8:8:8 little endian" ] rgba8888 = 875708754 , # [ doc = "32-bit BGRA format, [31:0] B:G:R:A 8:8:8:8 little endian" ] bgra8888 = 875708738 , # [ doc = "32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian" ] xrgb2101010 = 808669784 , # [ doc = "32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian" ] xbgr2101010 = 808665688 , # [ doc = "32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian" ] rgbx1010102 = 808671314 , # [ doc = "32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian" ] bgrx1010102 = 808671298 , # [ doc = "32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian" ] argb2101010 = 808669761 , # [ doc = "32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian" ] abgr2101010 = 808665665 , # [ doc = "32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian" ] rgba1010102 = 808665426 , # [ doc = "32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian" ] bgra1010102 = 808665410 , # [ doc = "packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian" ] yuyv = 1448695129 , # [ doc = "packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian" ] yvyu = 1431918169 , # [ doc = "packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian" ] uyvy = 1498831189 , # [ doc = "packed YCbCr format, [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian" ] vyuy = 1498765654 , # [ doc = "packed AYCbCr format, [31:0] A:Y:Cb:Cr 8:8:8:8 little endian" ] ayuv = 1448433985 , # [ doc = "2 plane YCbCr Cr:Cb format, 2x2 subsampled Cr:Cb plane" ] nv12 = 842094158 , # [ doc = "2 plane YCbCr Cb:Cr format, 2x2 subsampled Cb:Cr plane" ] nv21 = 825382478 , # [ doc = "2 plane YCbCr Cr:Cb format, 2x1 subsampled Cr:Cb plane" ] nv16 = 909203022 , # [ doc = "2 plane YCbCr Cb:Cr format, 2x1 subsampled Cb:Cr plane" ] nv61 = 825644622 , # [ doc = "3 plane YCbCr format, 4x4 subsampled Cb (1) and Cr (2) planes" ] yuv410 = 961959257 , # [ doc = "3 plane YCbCr format, 4x4 subsampled Cr (1) and Cb (2) planes" ] yvu410 = 961893977 , # [ doc = "3 plane YCbCr format, 4x1 subsampled Cb (1) and Cr (2) planes" ] yuv411 = 825316697 , # [ doc = "3 plane YCbCr format, 4x1 subsampled Cr (1) and Cb (2) planes" ] yvu411 = 825316953 , # [ doc = "3 plane YCbCr format, 2x2 subsampled Cb (1) and Cr (2) planes" ] yuv420 = 842093913 , # [ doc = "3 plane YCbCr format, 2x2 subsampled Cr (1) and Cb (2) planes" ] yvu420 = 842094169 , # [ doc = "3 plane YCbCr format, 2x1 subsampled Cb (1) and Cr (2) planes" ] yuv422 = 909202777 , # [ doc = "3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes" ] yvu422 = 909203033 , # [ doc = "3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes" ] yuv444 = 875713881 , # [ doc = "3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes" ] yvu444 = 875714137 , # [ doc ( hidden ) ] __nonexhaustive , } impl format { pub fn from_raw ( n : u32 ) -> Option < format > { match n { 0 => Some ( format :: argb8888 ) , 1 => Some ( format :: xrgb8888 ) , 538982467 => Some ( format :: c8 ) , 943867730 => Some ( format :: rgb332 ) , 944916290 => Some ( format :: bgr233 ) , 842093144 => Some ( format :: xrgb4444 ) , 842089048 => Some ( format :: xbgr4444 ) , 842094674 => Some ( format :: rgbx4444 ) , 842094658 => Some ( format :: bgrx4444 ) , 842093121 => Some ( format :: argb4444 ) , 842089025 => Some ( format :: abgr4444 ) , 842088786 => Some ( format :: rgba4444 ) , 842088770 => Some ( format :: bgra4444 ) , 892424792 => Some ( format :: xrgb1555 ) , 892420696 => Some ( format :: xbgr1555 ) , 892426322 => Some ( format :: rgbx5551 ) , 892426306 => Some ( format :: bgrx5551 ) , 892424769 => Some ( format :: argb1555 ) , 892420673 => Some ( format :: abgr1555 ) , 892420434 => Some ( format :: rgba5551 ) , 892420418 => Some ( format :: bgra5551 ) , 909199186 => Some ( format :: rgb565 ) , 909199170 => Some ( format :: bgr565 ) , 875710290 => Some ( format :: rgb888 ) , 875710274 => Some ( format :: bgr888 ) , 875709016 => Some ( format :: xbgr8888 ) , 875714642 => Some ( format :: rgbx8888 ) , 875714626 => Some ( format :: bgrx8888 ) , 875708993 => Some ( format :: abgr8888 ) , 875708754 => Some ( format :: rgba8888 ) , 875708738 => Some ( format :: bgra8888 ) , 808669784 => Some ( format :: xrgb2101010 ) , 808665688 => Some ( format :: xbgr2101010 ) , 808671314 => Some ( format :: rgbx1010102 ) , 808671298 => Some ( format :: bgrx1010102 ) , 808669761 => Some ( format :: argb2101010 ) , 808665665 => Some ( format :: abgr2101010 ) , 808665426 => Some ( format :: rgba1010102 ) , 808665410 => Some ( format :: bgra1010102 ) , 1448695129 => Some ( format :: yuyv ) , 1431918169 => Some ( format :: yvyu ) , 1498831189 => Some ( format :: uyvy ) , 1498765654 => Some ( format :: vyuy ) , 1448433985 => Some ( format :: ayuv ) , 842094158 => Some ( format :: nv12 ) , 825382478 => Some ( format :: nv21 ) , 909203022 => Some ( format :: nv16 ) , 825644622 => Some ( format :: nv61 ) , 961959257 => Some ( format :: yuv410 ) , 961893977 => Some ( format :: yvu410 ) , 825316697 => Some ( format :: yuv411 ) , 825316953 => Some ( format :: yvu411 ) , 842093913 => Some ( format :: yuv420 ) , 842094169 => Some ( format :: yvu420 ) , 909202777 => Some ( format :: yuv422 ) , 909203033 => Some ( format :: yvu422 ) , 875713881 => Some ( format :: yuv444 ) , 875714137 => Some ( format :: yvu444 ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_shm_requests_create_pool_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_shm_pool :: wl_shm_pool_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_shm_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create_pool\0" as * const u8 as * const c_char , signature : b"nhi\0" as * const u8 as * const c_char , types : unsafe { & wl_shm_requests_create_pool_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_shm_events : [ wl_message ; 1 ] = [ wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_shm_interface : wl_interface = wl_interface { name : b"wl_shm\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wl_shm_requests as * const _ } , event_count : 1 , events : unsafe { & wl_shm_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_shm_listener { # [ doc = "pixel format description\n\nInforms the client about a valid pixel format that\ncan be used for buffers. Known formats include\nargb8888 and xrgb8888." ] fn format ( & mut self , object : * mut wl_shm , format : format ) { } } pub unsafe fn wl_shm_set_user_data ( wl_shm : * mut super :: wl_shm :: wl_shm , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_shm as _ , user_data ) ; } pub unsafe fn wl_shm_get_user_data ( wl_shm : * mut super :: wl_shm :: wl_shm ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_shm as _ ) ; } pub unsafe fn wl_shm_get_version ( wl_shm : * mut super :: wl_shm :: wl_shm ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_shm as _ ) ; } pub unsafe fn wl_shm_add_listener ( wl_shm : * mut super :: wl_shm :: wl_shm , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_shm as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_shm_add_rust_listener ( wl_shm : * mut super :: wl_shm :: wl_shm , listener : & dyn wl_shm_listener ) -> bool { let to = ( listener as * const dyn wl_shm_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_shm_add_listener ( wl_shm as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_shm_destroy ( wl_shm : * mut super :: wl_shm :: wl_shm ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_shm as _ ) ; } # [ doc = "create a shm pool\n\nCreate a new wl_shm_pool object.\n\nThe pool can be used to create shared memory based buffer\nobjects. The server will mmap size bytes of the passed file\ndescriptor, to use as backing memory for the pool." ] pub unsafe fn wl_shm_create_pool ( wl_shm : * mut super :: wl_shm :: wl_shm , fd : :: std :: os :: unix :: io :: RawFd , size : i32 ) -> * mut super :: wl_shm_pool :: wl_shm_pool { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_shm as _ , 0u32 , & super :: wl_shm_pool :: wl_shm_pool_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , fd , size ) ; return r as _ ; } } # [ doc = "content for a wl_surface\n\nA buffer provides the content for a wl_surface. Buffers are\ncreated through factory interfaces such as wl_drm, wl_shm or\nsimilar. It has a width and a height and can be attached to a\nwl_surface, but the mechanism by which a client provides and\nupdates the contents is defined by the buffer factory interface." ] pub mod wl_buffer { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_buffer { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_buffer_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_buffer_events : [ wl_message ; 1 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_buffer_interface : wl_interface = wl_interface { name : b"wl_buffer\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wl_buffer_requests as * const _ } , event_count : 1 , events : unsafe { & wl_buffer_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_buffer_listener { # [ doc = "compositor releases buffer\n\nSent when this wl_buffer is no longer used by the compositor.\nThe client is now free to reuse or destroy this buffer and its\nbacking storage.\n\nIf a client receives a release event before the frame callback\nrequested in the same wl_surface.commit that attaches this\nwl_buffer to a surface, then the client is immediately free to\nreuse the buffer and its backing storage, and does not need a\nsecond buffer for the next surface content update. Typically\nthis is possible, when the compositor maintains a copy of the\nwl_surface contents, e.g. as a GL texture. This is an important\noptimization for GL(ES) compositors with wl_shm clients." ] fn release ( & mut self , object : * mut wl_buffer , ) { } } pub unsafe fn wl_buffer_set_user_data ( wl_buffer : * mut super :: wl_buffer :: wl_buffer , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_buffer as _ , user_data ) ; } pub unsafe fn wl_buffer_get_user_data ( wl_buffer : * mut super :: wl_buffer :: wl_buffer ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_buffer as _ ) ; } pub unsafe fn wl_buffer_get_version ( wl_buffer : * mut super :: wl_buffer :: wl_buffer ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_buffer as _ ) ; } pub unsafe fn wl_buffer_add_listener ( wl_buffer : * mut super :: wl_buffer :: wl_buffer , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_buffer as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_buffer_add_rust_listener ( wl_buffer : * mut super :: wl_buffer :: wl_buffer , listener : & dyn wl_buffer_listener ) -> bool { let to = ( listener as * const dyn wl_buffer_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_buffer_add_listener ( wl_buffer as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy a buffer\n\nDestroy a buffer. If and how you need to release the backing\nstorage is defined by the buffer factory interface.\n\nFor possible side-effects to a surface, see wl_surface.attach." ] pub unsafe fn wl_buffer_destroy ( wl_buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_buffer as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_buffer as _ ) ; } } # [ doc = "offer to transfer data\n\nA wl_data_offer represents a piece of data offered for transfer\nby another client (the source client). It is used by the\ncopy-and-paste and drag-and-drop mechanisms. The offer\ndescribes the different mime types that the data can be\nconverted to and provides the mechanism for transferring the\ndata directly from the source client." ] pub mod wl_data_offer { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_data_offer { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "finish request was called untimely" ] invalid_finish = 0 , # [ doc = "action mask contains invalid values" ] invalid_action_mask = 1 , # [ doc = "action argument has an invalid value" ] invalid_action = 2 , # [ doc = "offer doesn't accept this request" ] invalid_offer = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_finish ) , 1 => Some ( error :: invalid_action_mask ) , 2 => Some ( error :: invalid_action ) , 3 => Some ( error :: invalid_offer ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_offer_requests : [ wl_message ; 5 ] = [ wl_message { name : b"accept\0" as * const u8 as * const c_char , signature : b"u?s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"receive\0" as * const u8 as * const c_char , signature : b"sh\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"finish\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_actions\0" as * const u8 as * const c_char , signature : b"3uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_offer_events : [ wl_message ; 3 ] = [ wl_message { name : b"offer\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"source_actions\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"action\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_data_offer_interface : wl_interface = wl_interface { name : b"wl_data_offer\0" as * const u8 as * const c_char , version : 3 , request_count : 5 , requests : unsafe { & wl_data_offer_requests as * const _ } , event_count : 3 , events : unsafe { & wl_data_offer_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_data_offer_listener { # [ doc = "advertise offered mime type\n\nSent immediately after creating the wl_data_offer object. One\nevent per offered mime type." ] fn offer ( & mut self , object : * mut wl_data_offer , mime_type : * mut c_char ) { } # [ doc = "notify the source-side available actions\n\nThis event indicates the actions offered by the data source. It\nwill be sent right after wl_data_device.enter, or anytime the source\nside changes its offered actions through wl_data_source.set_actions.\n\nOnly available since version 3 of the interface." ] fn source_actions ( & mut self , object : * mut wl_data_offer , source_actions : u32 ) { } # [ doc = "notify the selected action\n\nThis event indicates the action selected by the compositor after\nmatching the source/destination side actions. Only one action (or\nnone) will be offered here.\n\nThis event can be emitted multiple times during the drag-and-drop\noperation in response to destination side action changes through\nwl_data_offer.set_actions.\n\nThis event will no longer be emitted after wl_data_device.drop\nhappened on the drag-and-drop destination, the client must\nhonor the last action received, or the last preferred one set\nthrough wl_data_offer.set_actions when handling an \"ask\" action.\n\nCompositors may also change the selected action on the fly, mainly\nin response to keyboard modifier changes during the drag-and-drop\noperation.\n\nThe most recent action received is always the valid one. Prior to\nreceiving wl_data_device.drop, the chosen action may change (e.g.\ndue to keyboard modifiers being pressed). At the time of receiving\nwl_data_device.drop the drag-and-drop destination must honor the\nlast action received.\n\nAction changes may still happen after wl_data_device.drop,\nespecially on \"ask\" actions, where the drag-and-drop destination\nmay choose another action afterwards. Action changes happening\nat this stage are always the result of inter-client negotiation, the\ncompositor shall no longer be able to induce a different action.\n\nUpon \"ask\" actions, it is expected that the drag-and-drop destination\nmay potentially choose a different action and/or mime type,\nbased on wl_data_offer.source_actions and finally chosen by the\nuser (e.g. popping up a menu with the available options). The\nfinal wl_data_offer.set_actions and wl_data_offer.accept requests\nmust happen before the call to wl_data_offer.finish.\n\nOnly available since version 3 of the interface." ] fn action ( & mut self , object : * mut wl_data_offer , dnd_action : u32 ) { } } pub unsafe fn wl_data_offer_set_user_data ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_data_offer as _ , user_data ) ; } pub unsafe fn wl_data_offer_get_user_data ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_data_offer as _ ) ; } pub unsafe fn wl_data_offer_get_version ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_data_offer as _ ) ; } pub unsafe fn wl_data_offer_add_listener ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_data_offer as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_data_offer_add_rust_listener ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer , listener : & dyn wl_data_offer_listener ) -> bool { let to = ( listener as * const dyn wl_data_offer_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_data_offer_add_listener ( wl_data_offer as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "accept one of the offered mime types\n\nIndicate that the client can accept the given mime type, or\nNULL for not accepted.\n\nFor objects of version 2 or older, this request is used by the\nclient to give feedback whether the client can receive the given\nmime type, or NULL if none is accepted; the feedback does not\ndetermine whether the drag-and-drop operation succeeds or not.\n\nFor objects of version 3 or newer, this request determines the\nfinal result of the drag-and-drop operation. If the end result\nis that no mime types were accepted, the drag-and-drop operation\nwill be cancelled and the corresponding drag source will receive\nwl_data_source.cancelled. Clients may still use this event in\nconjunction with wl_data_source.action for feedback." ] pub unsafe fn wl_data_offer_accept ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer , serial : u32 , mime_type : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_offer as _ , 0u32 , serial , mime_type , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "request that the data is transferred\n\nTo transfer the offered data, the client issues this request\nand indicates the mime type it wants to receive. The transfer\nhappens through the passed file descriptor (typically created\nwith the pipe system call). The source client writes the data\nin the mime type representation requested and then closes the\nfile descriptor.\n\nThe receiving client reads from the read end of the pipe until\nEOF and then closes its end, at which point the transfer is\ncomplete.\n\nThis request may happen multiple times for different mime types,\nboth before and after wl_data_device.drop. Drag-and-drop destination\nclients may preemptively fetch data or examine it more closely to\ndetermine acceptance." ] pub unsafe fn wl_data_offer_receive ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer , mime_type : * const c_char , fd : :: std :: os :: unix :: io :: RawFd ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_offer as _ , 1u32 , mime_type , fd , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy data offer\n\nDestroy the data offer." ] pub unsafe fn wl_data_offer_destroy ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_offer as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_data_offer as _ ) ; } # [ doc = "the offer will no longer be used\n\nNotifies the compositor that the drag destination successfully\nfinished the drag-and-drop operation.\n\nUpon receiving this request, the compositor will emit\nwl_data_source.dnd_finished on the drag source client.\n\nIt is a client error to perform other requests than\nwl_data_offer.destroy after this one. It is also an error to perform\nthis request after a NULL mime type has been set in\nwl_data_offer.accept or no action was received through\nwl_data_offer.action." ] pub unsafe fn wl_data_offer_finish ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_offer as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the available/preferred drag-and-drop actions\n\nSets the actions that the destination side client supports for\nthis operation. This request may trigger the emission of\nwl_data_source.action and wl_data_offer.action events if the compositor\nneeds to change the selected action.\n\nThis request can be called multiple times throughout the\ndrag-and-drop operation, typically in response to wl_data_device.enter\nor wl_data_device.motion events.\n\nThis request determines the final result of the drag-and-drop\noperation. If the end result is that no action is accepted,\nthe drag source will receive wl_drag_source.cancelled.\n\nThe dnd_actions argument must contain only values expressed in the\nwl_data_device_manager.dnd_actions enum, and the preferred_action\nargument must only contain one of those values set, otherwise it\nwill result in a protocol error.\n\nWhile managing an \"ask\" action, the destination drag-and-drop client\nmay perform further wl_data_offer.receive requests, and is expected\nto perform one last wl_data_offer.set_actions request with a preferred\naction other than \"ask\" (and optionally wl_data_offer.accept) before\nrequesting wl_data_offer.finish, in order to convey the action selected\nby the user. If the preferred action is not in the\nwl_data_offer.source_actions mask, an error will be raised.\n\nIf the \"ask\" action is dismissed (e.g. user cancellation), the client\nis expected to perform wl_data_offer.destroy right away.\n\nThis request can only be made on drag-and-drop offers, a protocol error\nwill be raised otherwise." ] pub unsafe fn wl_data_offer_set_actions ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer , dnd_actions : u32 , preferred_action : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_offer as _ , 4u32 , dnd_actions , preferred_action , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "offer to transfer data\n\nThe wl_data_source object is the source side of a wl_data_offer.\nIt is created by the source client in a data transfer and\nprovides a way to describe the offered data and a way to respond\nto requests to transfer the data." ] pub mod wl_data_source { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_data_source { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "action mask contains invalid values" ] invalid_action_mask = 0 , # [ doc = "source doesn't accept this request" ] invalid_source = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_action_mask ) , 1 => Some ( error :: invalid_source ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_source_requests : [ wl_message ; 3 ] = [ wl_message { name : b"offer\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_actions\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_source_events : [ wl_message ; 6 ] = [ wl_message { name : b"target\0" as * const u8 as * const c_char , signature : b"?s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"send\0" as * const u8 as * const c_char , signature : b"sh\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cancelled\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"dnd_drop_performed\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"dnd_finished\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"action\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_data_source_interface : wl_interface = wl_interface { name : b"wl_data_source\0" as * const u8 as * const c_char , version : 3 , request_count : 3 , requests : unsafe { & wl_data_source_requests as * const _ } , event_count : 6 , events : unsafe { & wl_data_source_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_data_source_listener { # [ doc = "a target accepts an offered mime type\n\nSent when a target accepts pointer_focus or motion events. If\na target does not accept any of the offered types, type is NULL.\n\nUsed for feedback during drag-and-drop." ] fn target ( & mut self , object : * mut wl_data_source , mime_type : Option < * mut c_char > ) { } # [ doc = "send the data\n\nRequest for data from the client. Send the data as the\nspecified mime type over the passed file descriptor, then\nclose it." ] fn send ( & mut self , object : * mut wl_data_source , mime_type : * mut c_char , fd : :: std :: os :: unix :: io :: RawFd ) { } # [ doc = "selection was cancelled\n\nThis data source is no longer valid. There are several reasons why\nthis could happen:\n\n- The data source has been replaced by another data source.\n- The drag-and-drop operation was performed, but the drop destination\ndid not accept any of the mime types offered through\nwl_data_source.target.\n- The drag-and-drop operation was performed, but the drop destination\ndid not select any of the actions present in the mask offered through\nwl_data_source.action.\n- The drag-and-drop operation was performed but didn't happen over a\nsurface.\n- The compositor cancelled the drag-and-drop operation (e.g. compositor\ndependent timeouts to avoid stale drag-and-drop transfers).\n\nThe client should clean up and destroy this data source.\n\nFor objects of version 2 or older, wl_data_source.cancelled will\nonly be emitted if the data source was replaced by another data\nsource." ] fn cancelled ( & mut self , object : * mut wl_data_source , ) { } # [ doc = "the drag-and-drop operation physically finished\n\nThe user performed the drop action. This event does not indicate\nacceptance, wl_data_source.cancelled may still be emitted afterwards\nif the drop destination does not accept any mime type.\n\nHowever, this event might however not be received if the compositor\ncancelled the drag-and-drop operation before this event could happen.\n\nNote that the data_source may still be used in the future and should\nnot be destroyed here.\n\nOnly available since version 3 of the interface." ] fn dnd_drop_performed ( & mut self , object : * mut wl_data_source , ) { } # [ doc = "the drag-and-drop operation concluded\n\nThe drop destination finished interoperating with this data\nsource, so the client is now free to destroy this data source and\nfree all associated data.\n\nIf the action used to perform the operation was \"move\", the\nsource can now delete the transferred data.\n\nOnly available since version 3 of the interface." ] fn dnd_finished ( & mut self , object : * mut wl_data_source , ) { } # [ doc = "notify the selected action\n\nThis event indicates the action selected by the compositor after\nmatching the source/destination side actions. Only one action (or\nnone) will be offered here.\n\nThis event can be emitted multiple times during the drag-and-drop\noperation, mainly in response to destination side changes through\nwl_data_offer.set_actions, and as the data device enters/leaves\nsurfaces.\n\nIt is only possible to receive this event after\nwl_data_source.dnd_drop_performed if the drag-and-drop operation\nended in an \"ask\" action, in which case the final wl_data_source.action\nevent will happen immediately before wl_data_source.dnd_finished.\n\nCompositors may also change the selected action on the fly, mainly\nin response to keyboard modifier changes during the drag-and-drop\noperation.\n\nThe most recent action received is always the valid one. The chosen\naction may change alongside negotiation (e.g. an \"ask\" action can turn\ninto a \"move\" operation), so the effects of the final action must\nalways be applied in wl_data_offer.dnd_finished.\n\nClients can trigger cursor surface changes from this point, so\nthey reflect the current action.\n\nOnly available since version 3 of the interface." ] fn action ( & mut self , object : * mut wl_data_source , dnd_action : u32 ) { } } pub unsafe fn wl_data_source_set_user_data ( wl_data_source : * mut super :: wl_data_source :: wl_data_source , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_data_source as _ , user_data ) ; } pub unsafe fn wl_data_source_get_user_data ( wl_data_source : * mut super :: wl_data_source :: wl_data_source ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_data_source as _ ) ; } pub unsafe fn wl_data_source_get_version ( wl_data_source : * mut super :: wl_data_source :: wl_data_source ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_data_source as _ ) ; } pub unsafe fn wl_data_source_add_listener ( wl_data_source : * mut super :: wl_data_source :: wl_data_source , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_data_source as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_data_source_add_rust_listener ( wl_data_source : * mut super :: wl_data_source :: wl_data_source , listener : & dyn wl_data_source_listener ) -> bool { let to = ( listener as * const dyn wl_data_source_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_data_source_add_listener ( wl_data_source as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "add an offered mime type\n\nThis request adds a mime type to the set of mime types\nadvertised to targets. Can be called several times to offer\nmultiple types." ] pub unsafe fn wl_data_source_offer ( wl_data_source : * mut super :: wl_data_source :: wl_data_source , mime_type : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_source as _ , 0u32 , mime_type , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the data source\n\nDestroy the data source." ] pub unsafe fn wl_data_source_destroy ( wl_data_source : * mut super :: wl_data_source :: wl_data_source ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_source as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_data_source as _ ) ; } # [ doc = "set the available drag-and-drop actions\n\nSets the actions that the source side client supports for this\noperation. This request may trigger wl_data_source.action and\nwl_data_offer.action events if the compositor needs to change the\nselected action.\n\nThe dnd_actions argument must contain only values expressed in the\nwl_data_device_manager.dnd_actions enum, otherwise it will result\nin a protocol error.\n\nThis request must be made once only, and can only be made on sources\nused in drag-and-drop, so it must be performed before\nwl_data_device.start_drag. Attempting to use the source other than\nfor drag-and-drop will raise a protocol error." ] pub unsafe fn wl_data_source_set_actions ( wl_data_source : * mut super :: wl_data_source :: wl_data_source , dnd_actions : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_source as _ , 2u32 , dnd_actions , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "data transfer device\n\nThere is one wl_data_device per seat which can be obtained\nfrom the global wl_data_device_manager singleton.\n\nA wl_data_device provides access to inter-client data transfer\nmechanisms such as copy-and-paste and drag-and-drop." ] pub mod wl_data_device { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_data_device { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_data_device_requests_start_drag_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_data_source :: wl_data_source_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut wl_data_device_requests_set_selection_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_data_source :: wl_data_source_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_device_requests : [ wl_message ; 3 ] = [ wl_message { name : b"start_drag\0" as * const u8 as * const c_char , signature : b"?oo?ou\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_requests_start_drag_types as * const _ } , } , wl_message { name : b"set_selection\0" as * const u8 as * const c_char , signature : b"?ou\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_requests_set_selection_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wl_data_device_events_data_offer_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_data_offer :: wl_data_offer_interface as * const wl_interface } , ] ; static mut wl_data_device_events_enter_types : [ * const wl_interface ; 5 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , unsafe { & super :: wl_data_offer :: wl_data_offer_interface as * const wl_interface } , ] ; static mut wl_data_device_events_selection_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_data_offer :: wl_data_offer_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_device_events : [ wl_message ; 6 ] = [ wl_message { name : b"data_offer\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_events_data_offer_types as * const _ } , } , wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"uoff?o\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"motion\0" as * const u8 as * const c_char , signature : b"uff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"drop\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"selection\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_events_selection_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_data_device_interface : wl_interface = wl_interface { name : b"wl_data_device\0" as * const u8 as * const c_char , version : 3 , request_count : 3 , requests : unsafe { & wl_data_device_requests as * const _ } , event_count : 6 , events : unsafe { & wl_data_device_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_data_device_listener { # [ doc = "introduce a new wl_data_offer\n\nThe data_offer event introduces a new wl_data_offer object,\nwhich will subsequently be used in either the\ndata_device.enter event (for drag-and-drop) or the\ndata_device.selection event (for selections). Immediately\nfollowing the data_device_data_offer event, the new data_offer\nobject will send out data_offer.offer events to describe the\nmime types it offers." ] fn data_offer ( & mut self , object : * mut wl_data_device , id : * mut super :: wl_data_offer :: wl_data_offer ) { } # [ doc = "initiate drag-and-drop session\n\nThis event is sent when an active drag-and-drop pointer enters\na surface owned by the client. The position of the pointer at\nenter time is provided by the x and y arguments, in surface-local\ncoordinates." ] fn enter ( & mut self , object : * mut wl_data_device , serial : u32 , surface : * mut super :: wl_surface :: wl_surface , x : wl_fixed_t , y : wl_fixed_t , id : Option < * mut super :: wl_data_offer :: wl_data_offer > ) { } # [ doc = "end drag-and-drop session\n\nThis event is sent when the drag-and-drop pointer leaves the\nsurface and the session ends. The client must destroy the\nwl_data_offer introduced at enter time at this point." ] fn leave ( & mut self , object : * mut wl_data_device , ) { } # [ doc = "drag-and-drop session motion\n\nThis event is sent when the drag-and-drop pointer moves within\nthe currently focused surface. The new position of the pointer\nis provided by the x and y arguments, in surface-local\ncoordinates." ] fn motion ( & mut self , object : * mut wl_data_device , time : u32 , x : wl_fixed_t , y : wl_fixed_t ) { } # [ doc = "end drag-and-drop session successfully\n\nThe event is sent when a drag-and-drop operation is ended\nbecause the implicit grab is removed.\n\nThe drag-and-drop destination is expected to honor the last action\nreceived through wl_data_offer.action, if the resulting action is\n\"copy\" or \"move\", the destination can still perform\nwl_data_offer.receive requests, and is expected to end all\ntransfers with a wl_data_offer.finish request.\n\nIf the resulting action is \"ask\", the action will not be considered\nfinal. The drag-and-drop destination is expected to perform one last\nwl_data_offer.set_actions request, or wl_data_offer.destroy in order\nto cancel the operation." ] fn drop ( & mut self , object : * mut wl_data_device , ) { } # [ doc = "advertise new selection\n\nThe selection event is sent out to notify the client of a new\nwl_data_offer for the selection for this device. The\ndata_device.data_offer and the data_offer.offer events are\nsent out immediately before this event to introduce the data\noffer object. The selection event is sent to a client\nimmediately before receiving keyboard focus and when a new\nselection is set while the client has keyboard focus. The\ndata_offer is valid until a new data_offer or NULL is received\nor until the client loses keyboard focus. The client must\ndestroy the previous selection data_offer, if any, upon receiving\nthis event." ] fn selection ( & mut self , object : * mut wl_data_device , id : Option < * mut super :: wl_data_offer :: wl_data_offer > ) { } } pub unsafe fn wl_data_device_set_user_data ( wl_data_device : * mut super :: wl_data_device :: wl_data_device , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_data_device as _ , user_data ) ; } pub unsafe fn wl_data_device_get_user_data ( wl_data_device : * mut super :: wl_data_device :: wl_data_device ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_data_device as _ ) ; } pub unsafe fn wl_data_device_get_version ( wl_data_device : * mut super :: wl_data_device :: wl_data_device ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_data_device as _ ) ; } pub unsafe fn wl_data_device_add_listener ( wl_data_device : * mut super :: wl_data_device :: wl_data_device , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_data_device as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_data_device_add_rust_listener ( wl_data_device : * mut super :: wl_data_device :: wl_data_device , listener : & dyn wl_data_device_listener ) -> bool { let to = ( listener as * const dyn wl_data_device_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_data_device_add_listener ( wl_data_device as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_data_device_destroy ( wl_data_device : * mut super :: wl_data_device :: wl_data_device ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_data_device as _ ) ; } # [ doc = "start drag-and-drop operation\n\nThis request asks the compositor to start a drag-and-drop\noperation on behalf of the client.\n\nThe source argument is the data source that provides the data\nfor the eventual data transfer. If source is NULL, enter, leave\nand motion events are sent only to the client that initiated the\ndrag and the client is expected to handle the data passing\ninternally.\n\nThe origin surface is the surface where the drag originates and\nthe client must have an active implicit grab that matches the\nserial.\n\nThe icon surface is an optional (can be NULL) surface that\nprovides an icon to be moved around with the cursor. Initially,\nthe top-left corner of the icon surface is placed at the cursor\nhotspot, but subsequent wl_surface.attach request can move the\nrelative position. Attach requests must be confirmed with\nwl_surface.commit as usual. The icon surface is given the role of\na drag-and-drop icon. If the icon surface already has another role,\nit raises a protocol error.\n\nThe current and pending input regions of the icon wl_surface are\ncleared, and wl_surface.set_input_region is ignored until the\nwl_surface is no longer used as the icon surface. When the use\nas an icon ends, the current and pending input regions become\nundefined, and the wl_surface is unmapped." ] pub unsafe fn wl_data_device_start_drag ( wl_data_device : * mut super :: wl_data_device :: wl_data_device , source : * mut super :: wl_data_source :: wl_data_source , origin : * mut super :: wl_surface :: wl_surface , icon : * mut super :: wl_surface :: wl_surface , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_device as _ , 0u32 , source , origin , icon , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "copy data to the selection\n\nThis request asks the compositor to set the selection\nto the data from the source on behalf of the client.\n\nTo unset the selection, set the source to NULL." ] pub unsafe fn wl_data_device_set_selection ( wl_data_device : * mut super :: wl_data_device :: wl_data_device , source : * mut super :: wl_data_source :: wl_data_source , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_device as _ , 1u32 , source , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy data device\n\nThis request destroys the data device." ] pub unsafe fn wl_data_device_release ( wl_data_device : * mut super :: wl_data_device :: wl_data_device ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_device as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_data_device as _ ) ; } } # [ doc = "data transfer interface\n\nThe wl_data_device_manager is a singleton global object that\nprovides access to inter-client data transfer mechanisms such as\ncopy-and-paste and drag-and-drop. These mechanisms are tied to\na wl_seat and this interface lets a client get a wl_data_device\ncorresponding to a wl_seat.\n\nDepending on the version bound, the objects created from the bound\nwl_data_device_manager object will have different requirements for\nfunctioning properly. See wl_data_source.set_actions,\nwl_data_offer.accept and wl_data_offer.finish for details." ] pub mod wl_data_device_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_data_device_manager { } bitflags ! { # [ doc = "drag and drop actions\n\nThis is a bitmask of the available/preferred actions in a\ndrag-and-drop operation.\n\nIn the compositor, the selected action is a result of matching the\nactions offered by the source and destination sides. \"action\" events\nwith a \"none\" action will be sent to both source and destination if\nthere is no match. All further checks will effectively happen on\n(source actions \u{2229} destination actions).\n\nIn addition, compositors may also pick different actions in\nreaction to key modifiers being pressed. One common design that\nis used in major toolkits (and the behavior recommended for\ncompositors) is:\n\n- If no modifiers are pressed, the first match (in bit order)\nwill be used.\n- Pressing Shift selects \"move\", if enabled in the mask.\n- Pressing Control selects \"copy\", if enabled in the mask.\n\nBehavior beyond that is considered implementation-dependent.\nCompositors may for example bind other modifiers (like Alt/Meta)\nor drags initiated with other buttons than BTN_LEFT to specific\nactions (e.g. \"ask\")." ] pub struct dnd_action : u32 { # [ doc = "no action" ] const none = 0 ; # [ doc = "copy action" ] const copy = 1 ; # [ doc = "move action" ] const _move = 2 ; # [ doc = "ask action" ] const ask = 4 ; } } impl dnd_action { pub fn from_raw ( n : u32 ) -> Option < dnd_action > { Some ( dnd_action :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } static mut wl_data_device_manager_requests_create_data_source_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_data_source :: wl_data_source_interface as * const wl_interface } , ] ; static mut wl_data_device_manager_requests_get_data_device_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_data_device :: wl_data_device_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_device_manager_requests : [ wl_message ; 2 ] = [ wl_message { name : b"create_data_source\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_manager_requests_create_data_source_types as * const _ } , } , wl_message { name : b"get_data_device\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_manager_requests_get_data_device_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_data_device_manager_interface : wl_interface = wl_interface { name : b"wl_data_device_manager\0" as * const u8 as * const c_char , version : 3 , request_count : 2 , requests : unsafe { & wl_data_device_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_data_device_manager_listener { } pub unsafe fn wl_data_device_manager_set_user_data ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_data_device_manager as _ , user_data ) ; } pub unsafe fn wl_data_device_manager_get_user_data ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_data_device_manager as _ ) ; } pub unsafe fn wl_data_device_manager_get_version ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_data_device_manager as _ ) ; } pub unsafe fn wl_data_device_manager_add_listener ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_data_device_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_data_device_manager_add_rust_listener ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager , listener : & dyn wl_data_device_manager_listener ) -> bool { let to = ( listener as * const dyn wl_data_device_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_data_device_manager_add_listener ( wl_data_device_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_data_device_manager_destroy ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_data_device_manager as _ ) ; } # [ doc = "create a new data source\n\nCreate a new data source." ] pub unsafe fn wl_data_device_manager_create_data_source ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager ) -> * mut super :: wl_data_source :: wl_data_source { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_data_device_manager as _ , 0u32 , & super :: wl_data_source :: wl_data_source_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "create a new data device\n\nCreate a new data device for a given seat." ] pub unsafe fn wl_data_device_manager_get_data_device ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: wl_data_device :: wl_data_device { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_data_device_manager as _ , 1u32 , & super :: wl_data_device :: wl_data_device_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat ) ; return r as _ ; } } # [ doc = "create desktop-style surfaces\n\nThis interface is implemented by servers that provide\ndesktop-style user interfaces.\n\nIt allows clients to associate a wl_shell_surface with\na basic surface.\n\nNote! This protocol is deprecated and not intended for production use.\nFor desktop-style user interfaces, use xdg_shell." ] pub mod wl_shell { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_shell { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_shell_requests_get_shell_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_shell_surface :: wl_shell_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_shell_requests : [ wl_message ; 1 ] = [ wl_message { name : b"get_shell_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_requests_get_shell_surface_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_shell_interface : wl_interface = wl_interface { name : b"wl_shell\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wl_shell_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_shell_listener { } pub unsafe fn wl_shell_set_user_data ( wl_shell : * mut super :: wl_shell :: wl_shell , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_shell as _ , user_data ) ; } pub unsafe fn wl_shell_get_user_data ( wl_shell : * mut super :: wl_shell :: wl_shell ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_shell as _ ) ; } pub unsafe fn wl_shell_get_version ( wl_shell : * mut super :: wl_shell :: wl_shell ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_shell as _ ) ; } pub unsafe fn wl_shell_add_listener ( wl_shell : * mut super :: wl_shell :: wl_shell , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_shell as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_shell_add_rust_listener ( wl_shell : * mut super :: wl_shell :: wl_shell , listener : & dyn wl_shell_listener ) -> bool { let to = ( listener as * const dyn wl_shell_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_shell_add_listener ( wl_shell as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_shell_destroy ( wl_shell : * mut super :: wl_shell :: wl_shell ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_shell as _ ) ; } # [ doc = "create a shell surface from a surface\n\nCreate a shell surface for an existing surface. This gives\nthe wl_surface the role of a shell surface. If the wl_surface\nalready has another role, it raises a protocol error.\n\nOnly one shell surface can be associated with a given surface." ] pub unsafe fn wl_shell_get_shell_surface ( wl_shell : * mut super :: wl_shell :: wl_shell , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: wl_shell_surface :: wl_shell_surface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_shell as _ , 0u32 , & super :: wl_shell_surface :: wl_shell_surface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "desktop-style metadata interface\n\nAn interface that may be implemented by a wl_surface, for\nimplementations that provide a desktop-style user interface.\n\nIt provides requests to treat surfaces like toplevel, fullscreen\nor popup windows, move, resize or maximize them, associate\nmetadata like title and class, etc.\n\nOn the server side the object is automatically destroyed when\nthe related wl_surface is destroyed. On the client side,\nwl_shell_surface_destroy() must be called before destroying\nthe wl_surface object." ] pub mod wl_shell_surface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_shell_surface { } bitflags ! { # [ doc = "edge values for resizing\n\nThese values are used to indicate which edge of a surface\nis being dragged in a resize operation. The server may\nuse this information to adapt its behavior, e.g. choose\nan appropriate cursor image." ] pub struct resize : u32 { # [ doc = "no edge" ] const none = 0 ; # [ doc = "top edge" ] const top = 1 ; # [ doc = "bottom edge" ] const bottom = 2 ; # [ doc = "left edge" ] const left = 4 ; # [ doc = "top and left edges" ] const top_left = 5 ; # [ doc = "bottom and left edges" ] const bottom_left = 6 ; # [ doc = "right edge" ] const right = 8 ; # [ doc = "top and right edges" ] const top_right = 9 ; # [ doc = "bottom and right edges" ] const bottom_right = 10 ; } } impl resize { pub fn from_raw ( n : u32 ) -> Option < resize > { Some ( resize :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } bitflags ! { # [ doc = "details of transient behaviour\n\nThese flags specify details of the expected behaviour\nof transient surfaces. Used in the set_transient request." ] pub struct transient : u32 { # [ doc = "do not set keyboard focus" ] const inactive = 1 ; } } impl transient { pub fn from_raw ( n : u32 ) -> Option < transient > { Some ( transient :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = "different method to set the surface fullscreen\n\nHints to indicate to the compositor how to deal with a conflict\nbetween the dimensions of the surface and the dimensions of the\noutput. The compositor is free to ignore this parameter." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum fullscreen_method { # [ doc = "no preference, apply default policy" ] default = 0 , # [ doc = "scale, preserve the surface's aspect ratio and center on output" ] scale = 1 , # [ doc = "switch output mode to the smallest mode that can fit the surface, add black borders to compensate size mismatch" ] driver = 2 , # [ doc = "no upscaling, center on output and add black borders to compensate size mismatch" ] fill = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl fullscreen_method { pub fn from_raw ( n : u32 ) -> Option < fullscreen_method > { match n { 0 => Some ( fullscreen_method :: default ) , 1 => Some ( fullscreen_method :: scale ) , 2 => Some ( fullscreen_method :: driver ) , 3 => Some ( fullscreen_method :: fill ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_shell_surface_requests_move_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut wl_shell_surface_requests_resize_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut wl_shell_surface_requests_set_transient_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut wl_shell_surface_requests_set_fullscreen_types : [ * const wl_interface ; 3 ] = [ NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; static mut wl_shell_surface_requests_set_popup_types : [ * const wl_interface ; 6 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut wl_shell_surface_requests_set_maximized_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_shell_surface_requests : [ wl_message ; 10 ] = [ wl_message { name : b"pong\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"move\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_surface_requests_move_types as * const _ } , } , wl_message { name : b"resize\0" as * const u8 as * const c_char , signature : b"ouu\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_surface_requests_resize_types as * const _ } , } , wl_message { name : b"set_toplevel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_transient\0" as * const u8 as * const c_char , signature : b"oiiu\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_surface_requests_set_transient_types as * const _ } , } , wl_message { name : b"set_fullscreen\0" as * const u8 as * const c_char , signature : b"uu?o\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_surface_requests_set_fullscreen_types as * const _ } , } , wl_message { name : b"set_popup\0" as * const u8 as * const c_char , signature : b"ouoiiu\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_surface_requests_set_popup_types as * const _ } , } , wl_message { name : b"set_maximized\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_surface_requests_set_maximized_types as * const _ } , } , wl_message { name : b"set_title\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_class\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_shell_surface_events : [ wl_message ; 3 ] = [ wl_message { name : b"ping\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"uii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"popup_done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_shell_surface_interface : wl_interface = wl_interface { name : b"wl_shell_surface\0" as * const u8 as * const c_char , version : 1 , request_count : 10 , requests : unsafe { & wl_shell_surface_requests as * const _ } , event_count : 3 , events : unsafe { & wl_shell_surface_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_shell_surface_listener { # [ doc = "ping client\n\nPing a client to check if it is receiving events and sending\nrequests. A client is expected to reply with a pong request." ] fn ping ( & mut self , object : * mut wl_shell_surface , serial : u32 ) { } # [ doc = "suggest resize\n\nThe configure event asks the client to resize its surface.\n\nThe size is a hint, in the sense that the client is free to\nignore it if it doesn't resize, pick a smaller size (to\nsatisfy aspect ratio or resize in steps of NxM pixels).\n\nThe edges parameter provides a hint about how the surface\nwas resized. The client may use this information to decide\nhow to adjust its content to the new size (e.g. a scrolling\narea might adjust its content position to leave the viewable\ncontent unmoved).\n\nThe client is free to dismiss all but the last configure\nevent it received.\n\nThe width and height arguments specify the size of the window\nin surface-local coordinates." ] fn configure ( & mut self , object : * mut wl_shell_surface , edges : resize , width : i32 , height : i32 ) { } # [ doc = "popup interaction is done\n\nThe popup_done event is sent out when a popup grab is broken,\nthat is, when the user clicks a surface that doesn't belong\nto the client owning the popup surface." ] fn popup_done ( & mut self , object : * mut wl_shell_surface , ) { } } pub unsafe fn wl_shell_surface_set_user_data ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_shell_surface as _ , user_data ) ; } pub unsafe fn wl_shell_surface_get_user_data ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_shell_surface as _ ) ; } pub unsafe fn wl_shell_surface_get_version ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_shell_surface as _ ) ; } pub unsafe fn wl_shell_surface_add_listener ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_shell_surface as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_shell_surface_add_rust_listener ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , listener : & dyn wl_shell_surface_listener ) -> bool { let to = ( listener as * const dyn wl_shell_surface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_shell_surface_add_listener ( wl_shell_surface as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_shell_surface_destroy ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_shell_surface as _ ) ; } # [ doc = "respond to a ping event\n\nA client must respond to a ping event with a pong request or\nthe client may be deemed unresponsive." ] pub unsafe fn wl_shell_surface_pong ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 0u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive move\n\nStart a pointer-driven move of the surface.\n\nThis request must be used in response to a button press event.\nThe server may ignore move requests depending on the state of\nthe surface (e.g. fullscreen or maximized)." ] pub unsafe fn wl_shell_surface_move ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 1u32 , seat , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive resize\n\nStart a pointer-driven resizing of the surface.\n\nThis request must be used in response to a button press event.\nThe server may ignore resize requests depending on the state of\nthe surface (e.g. fullscreen or maximized)." ] pub unsafe fn wl_shell_surface_resize ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , edges : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 2u32 , seat , serial , edges , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the surface a toplevel surface\n\nMap the surface as a toplevel surface.\n\nA toplevel surface is not fullscreen, maximized or transient." ] pub unsafe fn wl_shell_surface_set_toplevel ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the surface a transient surface\n\nMap the surface relative to an existing surface.\n\nThe x and y arguments specify the location of the upper left\ncorner of the surface relative to the upper left corner of the\nparent surface, in surface-local coordinates.\n\nThe flags argument controls details of the transient behaviour." ] pub unsafe fn wl_shell_surface_set_transient ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , parent : * mut super :: wl_surface :: wl_surface , x : i32 , y : i32 , flags : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 4u32 , parent , x , y , flags , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the surface a fullscreen surface\n\nMap the surface as a fullscreen surface.\n\nIf an output parameter is given then the surface will be made\nfullscreen on that output. If the client does not specify the\noutput then the compositor will apply its policy - usually\nchoosing the output on which the surface has the biggest surface\narea.\n\nThe client may specify a method to resolve a size conflict\nbetween the output size and the surface size - this is provided\nthrough the method parameter.\n\nThe framerate parameter is used only when the method is set\nto \"driver\", to indicate the preferred framerate. A value of 0\nindicates that the client does not care about framerate. The\nframerate is specified in mHz, that is framerate of 60000 is 60Hz.\n\nA method of \"scale\" or \"driver\" implies a scaling operation of\nthe surface, either via a direct scaling operation or a change of\nthe output mode. This will override any kind of output scaling, so\nthat mapping a surface with a buffer size equal to the mode can\nfill the screen independent of buffer_scale.\n\nA method of \"fill\" means we don't scale up the buffer, however\nany output scale is applied. This means that you may run into\nan edge case where the application maps a buffer with the same\nsize of the output mode but buffer_scale 1 (thus making a\nsurface larger than the output). In this case it is allowed to\ndownscale the results to fit the screen.\n\nThe compositor must reply to this request with a configure event\nwith the dimensions for the output on which the surface will\nbe made fullscreen." ] pub unsafe fn wl_shell_surface_set_fullscreen ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , method : u32 , framerate : u32 , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 5u32 , method , framerate , output , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the surface a popup surface\n\nMap the surface as a popup.\n\nA popup surface is a transient surface with an added pointer\ngrab.\n\nAn existing implicit grab will be changed to owner-events mode,\nand the popup grab will continue after the implicit grab ends\n(i.e. releasing the mouse button does not cause the popup to\nbe unmapped).\n\nThe popup grab continues until the window is destroyed or a\nmouse button is pressed in any other client's window. A click\nin any of the client's surfaces is reported as normal, however,\nclicks in other clients' surfaces will be discarded and trigger\nthe callback.\n\nThe x and y arguments specify the location of the upper left\ncorner of the surface relative to the upper left corner of the\nparent surface, in surface-local coordinates." ] pub unsafe fn wl_shell_surface_set_popup ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , parent : * mut super :: wl_surface :: wl_surface , x : i32 , y : i32 , flags : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 6u32 , seat , serial , parent , x , y , flags , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the surface a maximized surface\n\nMap the surface as a maximized surface.\n\nIf an output parameter is given then the surface will be\nmaximized on that output. If the client does not specify the\noutput then the compositor will apply its policy - usually\nchoosing the output on which the surface has the biggest surface\narea.\n\nThe compositor will reply with a configure event telling\nthe expected new surface size. The operation is completed\non the next buffer attach to this surface.\n\nA maximized surface typically fills the entire output it is\nbound to, except for desktop elements such as panels. This is\nthe main difference between a maximized shell surface and a\nfullscreen shell surface.\n\nThe details depend on the compositor implementation." ] pub unsafe fn wl_shell_surface_set_maximized ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 7u32 , output , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface title\n\nSet a short title for the surface.\n\nThis string may be used to identify the surface in a task bar,\nwindow list, or other user interface elements provided by the\ncompositor.\n\nThe string must be encoded in UTF-8." ] pub unsafe fn wl_shell_surface_set_title ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , title : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 8u32 , title , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface class\n\nSet a class for the surface.\n\nThe surface class identifies the general class of applications\nto which the surface belongs. A common convention is to use the\nfile name (or the full path if it is a non-standard location) of\nthe application's .desktop file as the class." ] pub unsafe fn wl_shell_surface_set_class ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , class_ : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 9u32 , class_ , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "an onscreen surface\n\nA surface is a rectangular area that is displayed on the screen.\nIt has a location, size and pixel contents.\n\nThe size of a surface (and relative positions on it) is described\nin surface-local coordinates, which may differ from the buffer\ncoordinates of the pixel content, in case a buffer_transform\nor a buffer_scale is used.\n\nA surface without a \"role\" is fairly useless: a compositor does\nnot know where, when or how to present it. The role is the\npurpose of a wl_surface. Examples of roles are a cursor for a\npointer (as set by wl_pointer.set_cursor), a drag icon\n(wl_data_device.start_drag), a sub-surface\n(wl_subcompositor.get_subsurface), and a window as defined by a\nshell protocol (e.g. wl_shell.get_shell_surface).\n\nA surface can have only one role at a time. Initially a\nwl_surface does not have a role. Once a wl_surface is given a\nrole, it is set permanently for the whole lifetime of the\nwl_surface object. Giving the current role again is allowed,\nunless explicitly forbidden by the relevant interface\nspecification.\n\nSurface roles are given by requests in other interfaces such as\nwl_pointer.set_cursor. The request should explicitly mention\nthat this request gives a role to a wl_surface. Often, this\nrequest also creates a new protocol object that represents the\nrole and adds additional functionality to wl_surface. When a\nclient wants to destroy a wl_surface, they must destroy this 'role\nobject' before the wl_surface.\n\nDestroying the role object does not remove the role from the\nwl_surface, but it may stop the wl_surface from \"playing the role\".\nFor instance, if a wl_subsurface object is destroyed, the wl_surface\nit was created for will be unmapped and forget its position and\nz-order. It is allowed to create a wl_subsurface for the same\nwl_surface again, but it is not allowed to use the wl_surface as\na cursor (cursor is a different role than sub-surface, and role\nswitching is not allowed)." ] pub mod wl_surface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_surface { } # [ doc = "wl_surface error values\n\nThese errors can be emitted in response to wl_surface requests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "buffer scale value is invalid" ] invalid_scale = 0 , # [ doc = "buffer transform value is invalid" ] invalid_transform = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_scale ) , 1 => Some ( error :: invalid_transform ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_surface_requests_attach_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut wl_surface_requests_frame_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_callback :: wl_callback_interface as * const wl_interface } , ] ; static mut wl_surface_requests_set_opaque_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; static mut wl_surface_requests_set_input_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_surface_requests : [ wl_message ; 10 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"attach\0" as * const u8 as * const c_char , signature : b"?oii\0" as * const u8 as * const c_char , types : unsafe { & wl_surface_requests_attach_types as * const _ } , } , wl_message { name : b"damage\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_surface_requests_frame_types as * const _ } , } , wl_message { name : b"set_opaque_region\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & wl_surface_requests_set_opaque_region_types as * const _ } , } , wl_message { name : b"set_input_region\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & wl_surface_requests_set_input_region_types as * const _ } , } , wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_buffer_transform\0" as * const u8 as * const c_char , signature : b"2i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_buffer_scale\0" as * const u8 as * const c_char , signature : b"3i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"damage_buffer\0" as * const u8 as * const c_char , signature : b"4iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wl_surface_events_enter_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; static mut wl_surface_events_leave_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_surface_events : [ wl_message ; 2 ] = [ wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wl_surface_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wl_surface_events_leave_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_surface_interface : wl_interface = wl_interface { name : b"wl_surface\0" as * const u8 as * const c_char , version : 4 , request_count : 10 , requests : unsafe { & wl_surface_requests as * const _ } , event_count : 2 , events : unsafe { & wl_surface_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_surface_listener { # [ doc = "surface enters an output\n\nThis is emitted whenever a surface's creation, movement, or resizing\nresults in some part of it being within the scanout region of an\noutput.\n\nNote that a surface may be overlapping with zero or more outputs." ] fn enter ( & mut self , object : * mut wl_surface , output : * mut super :: wl_output :: wl_output ) { } # [ doc = "surface leaves an output\n\nThis is emitted whenever a surface's creation, movement, or resizing\nresults in it no longer having any part of it within the scanout region\nof an output." ] fn leave ( & mut self , object : * mut wl_surface , output : * mut super :: wl_output :: wl_output ) { } } pub unsafe fn wl_surface_set_user_data ( wl_surface : * mut super :: wl_surface :: wl_surface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_surface as _ , user_data ) ; } pub unsafe fn wl_surface_get_user_data ( wl_surface : * mut super :: wl_surface :: wl_surface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_surface as _ ) ; } pub unsafe fn wl_surface_get_version ( wl_surface : * mut super :: wl_surface :: wl_surface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_surface as _ ) ; } pub unsafe fn wl_surface_add_listener ( wl_surface : * mut super :: wl_surface :: wl_surface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_surface as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_surface_add_rust_listener ( wl_surface : * mut super :: wl_surface :: wl_surface , listener : & dyn wl_surface_listener ) -> bool { let to = ( listener as * const dyn wl_surface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_surface_add_listener ( wl_surface as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "delete surface\n\nDeletes the surface and invalidates its object ID." ] pub unsafe fn wl_surface_destroy ( wl_surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_surface as _ ) ; } # [ doc = "set the surface contents\n\nSet a buffer as the content of this surface.\n\nThe new size of the surface is calculated based on the buffer\nsize transformed by the inverse buffer_transform and the\ninverse buffer_scale. This means that the supplied buffer\nmust be an integer multiple of the buffer_scale.\n\nThe x and y arguments specify the location of the new pending\nbuffer's upper left corner, relative to the current buffer's upper\nleft corner, in surface-local coordinates. In other words, the\nx and y, combined with the new surface size define in which\ndirections the surface's size changes.\n\nSurface contents are double-buffered state, see wl_surface.commit.\n\nThe initial surface contents are void; there is no content.\nwl_surface.attach assigns the given wl_buffer as the pending\nwl_buffer. wl_surface.commit makes the pending wl_buffer the new\nsurface contents, and the size of the surface becomes the size\ncalculated from the wl_buffer, as described above. After commit,\nthere is no pending buffer until the next attach.\n\nCommitting a pending wl_buffer allows the compositor to read the\npixels in the wl_buffer. The compositor may access the pixels at\nany time after the wl_surface.commit request. When the compositor\nwill not access the pixels anymore, it will send the\nwl_buffer.release event. Only after receiving wl_buffer.release,\nthe client may reuse the wl_buffer. A wl_buffer that has been\nattached and then replaced by another attach instead of committed\nwill not receive a release event, and is not used by the\ncompositor.\n\nDestroying the wl_buffer after wl_buffer.release does not change\nthe surface contents. However, if the client destroys the\nwl_buffer before receiving the wl_buffer.release event, the surface\ncontents become undefined immediately.\n\nIf wl_surface.attach is sent with a NULL wl_buffer, the\nfollowing wl_surface.commit will remove the surface content." ] pub unsafe fn wl_surface_attach ( wl_surface : * mut super :: wl_surface :: wl_surface , buffer : * mut super :: wl_buffer :: wl_buffer , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 1u32 , buffer , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "mark part of the surface damaged\n\nThis request is used to describe the regions where the pending\nbuffer is different from the current surface contents, and where\nthe surface therefore needs to be repainted. The compositor\nignores the parts of the damage that fall outside of the surface.\n\nDamage is double-buffered state, see wl_surface.commit.\n\nThe damage rectangle is specified in surface-local coordinates,\nwhere x and y specify the upper left corner of the damage rectangle.\n\nThe initial value for pending damage is empty: no damage.\nwl_surface.damage adds pending damage: the new pending damage\nis the union of old pending damage and the given rectangle.\n\nwl_surface.commit assigns pending damage as the current damage,\nand clears pending damage. The server will clear the current\ndamage as it repaints the surface.\n\nAlternatively, damage can be posted with wl_surface.damage_buffer\nwhich uses buffer coordinates instead of surface coordinates,\nand is probably the preferred and intuitive way of doing this." ] pub unsafe fn wl_surface_damage ( wl_surface : * mut super :: wl_surface :: wl_surface , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 2u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "request a frame throttling hint\n\nRequest a notification when it is a good time to start drawing a new\nframe, by creating a frame callback. This is useful for throttling\nredrawing operations, and driving animations.\n\nWhen a client is animating on a wl_surface, it can use the 'frame'\nrequest to get notified when it is a good time to draw and commit the\nnext frame of animation. If the client commits an update earlier than\nthat, it is likely that some updates will not make it to the display,\nand the client is wasting resources by drawing too often.\n\nThe frame request will take effect on the next wl_surface.commit.\nThe notification will only be posted for one frame unless\nrequested again. For a wl_surface, the notifications are posted in\nthe order the frame requests were committed.\n\nThe server must send the notifications so that a client\nwill not send excessive updates, while still allowing\nthe highest possible update rate for clients that wait for the reply\nbefore drawing again. The server should give some time for the client\nto draw and commit after sending the frame callback events to let it\nhit the next output refresh.\n\nA server should avoid signaling the frame callbacks if the\nsurface is not visible in any way, e.g. the surface is off-screen,\nor completely obscured by other opaque surfaces.\n\nThe object returned by this request will be destroyed by the\ncompositor after the callback is fired and as such the client must not\nattempt to use it after that point.\n\nThe callback_data passed in the callback is the current time, in\nmilliseconds, with an undefined base." ] pub unsafe fn wl_surface_frame ( wl_surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: wl_callback :: wl_callback { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_surface as _ , 3u32 , & super :: wl_callback :: wl_callback_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "set opaque region\n\nThis request sets the region of the surface that contains\nopaque content.\n\nThe opaque region is an optimization hint for the compositor\nthat lets it optimize the redrawing of content behind opaque\nregions. Setting an opaque region is not required for correct\nbehaviour, but marking transparent content as opaque will result\nin repaint artifacts.\n\nThe opaque region is specified in surface-local coordinates.\n\nThe compositor ignores the parts of the opaque region that fall\noutside of the surface.\n\nOpaque region is double-buffered state, see wl_surface.commit.\n\nwl_surface.set_opaque_region changes the pending opaque region.\nwl_surface.commit copies the pending region to the current region.\nOtherwise, the pending and current regions are never changed.\n\nThe initial value for an opaque region is empty. Setting the pending\nopaque region has copy semantics, and the wl_region object can be\ndestroyed immediately. A NULL wl_region causes the pending opaque\nregion to be set to empty." ] pub unsafe fn wl_surface_set_opaque_region ( wl_surface : * mut super :: wl_surface :: wl_surface , region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 4u32 , region , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set input region\n\nThis request sets the region of the surface that can receive\npointer and touch events.\n\nInput events happening outside of this region will try the next\nsurface in the server surface stack. The compositor ignores the\nparts of the input region that fall outside of the surface.\n\nThe input region is specified in surface-local coordinates.\n\nInput region is double-buffered state, see wl_surface.commit.\n\nwl_surface.set_input_region changes the pending input region.\nwl_surface.commit copies the pending region to the current region.\nOtherwise the pending and current regions are never changed,\nexcept cursor and icon surfaces are special cases, see\nwl_pointer.set_cursor and wl_data_device.start_drag.\n\nThe initial value for an input region is infinite. That means the\nwhole surface will accept input. Setting the pending input region\nhas copy semantics, and the wl_region object can be destroyed\nimmediately. A NULL wl_region causes the input region to be set\nto infinite." ] pub unsafe fn wl_surface_set_input_region ( wl_surface : * mut super :: wl_surface :: wl_surface , region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 5u32 , region , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "commit pending surface state\n\nSurface state (input, opaque, and damage regions, attached buffers,\netc.) is double-buffered. Protocol requests modify the pending state,\nas opposed to the current state in use by the compositor. A commit\nrequest atomically applies all pending state, replacing the current\nstate. After commit, the new pending state is as documented for each\nrelated request.\n\nOn commit, a pending wl_buffer is applied first, and all other state\nsecond. This means that all coordinates in double-buffered state are\nrelative to the new wl_buffer coming into use, except for\nwl_surface.attach itself. If there is no pending wl_buffer, the\ncoordinates are relative to the current surface contents.\n\nAll requests that need a commit to become effective are documented\nto affect double-buffered state.\n\nOther interfaces may add further double-buffered surface state." ] pub unsafe fn wl_surface_commit ( wl_surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 6u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets the buffer transformation\n\nThis request sets an optional transformation on how the compositor\ninterprets the contents of the buffer attached to the surface. The\naccepted values for the transform parameter are the values for\nwl_output.transform.\n\nBuffer transform is double-buffered state, see wl_surface.commit.\n\nA newly created surface has its buffer transformation set to normal.\n\nwl_surface.set_buffer_transform changes the pending buffer\ntransformation. wl_surface.commit copies the pending buffer\ntransformation to the current one. Otherwise, the pending and current\nvalues are never changed.\n\nThe purpose of this request is to allow clients to render content\naccording to the output transform, thus permitting the compositor to\nuse certain optimizations even if the display is rotated. Using\nhardware overlays and scanning out a client buffer for fullscreen\nsurfaces are examples of such optimizations. Those optimizations are\nhighly dependent on the compositor implementation, so the use of this\nrequest should be considered on a case-by-case basis.\n\nNote that if the transform value includes 90 or 270 degree rotation,\nthe width of the buffer will become the surface height and the height\nof the buffer will become the surface width.\n\nIf transform is not one of the values from the\nwl_output.transform enum the invalid_transform protocol error\nis raised." ] pub unsafe fn wl_surface_set_buffer_transform ( wl_surface : * mut super :: wl_surface :: wl_surface , transform : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 7u32 , transform , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets the buffer scaling factor\n\nThis request sets an optional scaling factor on how the compositor\ninterprets the contents of the buffer attached to the window.\n\nBuffer scale is double-buffered state, see wl_surface.commit.\n\nA newly created surface has its buffer scale set to 1.\n\nwl_surface.set_buffer_scale changes the pending buffer scale.\nwl_surface.commit copies the pending buffer scale to the current one.\nOtherwise, the pending and current values are never changed.\n\nThe purpose of this request is to allow clients to supply higher\nresolution buffer data for use on high resolution outputs. It is\nintended that you pick the same buffer scale as the scale of the\noutput that the surface is displayed on. This means the compositor\ncan avoid scaling when rendering the surface on that output.\n\nNote that if the scale is larger than 1, then you have to attach\na buffer that is larger (by a factor of scale in each dimension)\nthan the desired surface size.\n\nIf scale is not positive the invalid_scale protocol error is\nraised." ] pub unsafe fn wl_surface_set_buffer_scale ( wl_surface : * mut super :: wl_surface :: wl_surface , scale : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 8u32 , scale , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "mark part of the surface damaged using buffer coordinates\n\nThis request is used to describe the regions where the pending\nbuffer is different from the current surface contents, and where\nthe surface therefore needs to be repainted. The compositor\nignores the parts of the damage that fall outside of the surface.\n\nDamage is double-buffered state, see wl_surface.commit.\n\nThe damage rectangle is specified in buffer coordinates,\nwhere x and y specify the upper left corner of the damage rectangle.\n\nThe initial value for pending damage is empty: no damage.\nwl_surface.damage_buffer adds pending damage: the new pending\ndamage is the union of old pending damage and the given rectangle.\n\nwl_surface.commit assigns pending damage as the current damage,\nand clears pending damage. The server will clear the current\ndamage as it repaints the surface.\n\nThis request differs from wl_surface.damage in only one way - it\ntakes damage in buffer coordinates instead of surface-local\ncoordinates. While this generally is more intuitive than surface\ncoordinates, it is especially desirable when using wp_viewport\nor when a drawing library (like EGL) is unaware of buffer scale\nand buffer transform.\n\nNote: Because buffer transformation changes and damage requests may\nbe interleaved in the protocol stream, it is impossible to determine\nthe actual mapping between surface and buffer damage until\nwl_surface.commit time. Therefore, compositors wishing to take both\nkinds of damage into account will have to accumulate damage from the\ntwo requests separately and only transform from one to the other\nafter receiving the wl_surface.commit." ] pub unsafe fn wl_surface_damage_buffer ( wl_surface : * mut super :: wl_surface :: wl_surface , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 9u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "group of input devices\n\nA seat is a group of keyboards, pointer and touch devices. This\nobject is published as a global during start up, or when such a\ndevice is hot plugged. A seat typically has a pointer and\nmaintains a keyboard focus and a pointer focus." ] pub mod wl_seat { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_seat { } bitflags ! { # [ doc = "seat capability bitmask\n\nThis is a bitmask of capabilities this seat has; if a member is\nset, then it is present on the seat." ] pub struct capability : u32 { # [ doc = "the seat has pointer devices" ] const pointer = 1 ; # [ doc = "the seat has one or more keyboards" ] const keyboard = 2 ; # [ doc = "the seat has touch devices" ] const touch = 4 ; } } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { Some ( capability :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } static mut wl_seat_requests_get_pointer_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , ] ; static mut wl_seat_requests_get_keyboard_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_keyboard :: wl_keyboard_interface as * const wl_interface } , ] ; static mut wl_seat_requests_get_touch_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_touch :: wl_touch_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_seat_requests : [ wl_message ; 4 ] = [ wl_message { name : b"get_pointer\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_seat_requests_get_pointer_types as * const _ } , } , wl_message { name : b"get_keyboard\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_seat_requests_get_keyboard_types as * const _ } , } , wl_message { name : b"get_touch\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_seat_requests_get_touch_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"5\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_seat_events : [ wl_message ; 2 ] = [ wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"name\0" as * const u8 as * const c_char , signature : b"2s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_seat_interface : wl_interface = wl_interface { name : b"wl_seat\0" as * const u8 as * const c_char , version : 6 , request_count : 4 , requests : unsafe { & wl_seat_requests as * const _ } , event_count : 2 , events : unsafe { & wl_seat_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_seat_listener { # [ doc = "seat capabilities changed\n\nThis is emitted whenever a seat gains or loses the pointer,\nkeyboard or touch capabilities. The argument is a capability\nenum containing the complete set of capabilities this seat has.\n\nWhen the pointer capability is added, a client may create a\nwl_pointer object using the wl_seat.get_pointer request. This object\nwill receive pointer events until the capability is removed in the\nfuture.\n\nWhen the pointer capability is removed, a client should destroy the\nwl_pointer objects associated with the seat where the capability was\nremoved, using the wl_pointer.release request. No further pointer\nevents will be received on these objects.\n\nIn some compositors, if a seat regains the pointer capability and a\nclient has a previously obtained wl_pointer object of version 4 or\nless, that object may start sending pointer events again. This\nbehavior is considered a misinterpretation of the intended behavior\nand must not be relied upon by the client. wl_pointer objects of\nversion 5 or later must not send events if created before the most\nrecent event notifying the client of an added pointer capability.\n\nThe above behavior also applies to wl_keyboard and wl_touch with the\nkeyboard and touch capabilities, respectively." ] fn capabilities ( & mut self , object : * mut wl_seat , capabilities : capability ) { } # [ doc = "unique identifier for this seat\n\nIn a multiseat configuration this can be used by the client to help\nidentify which physical devices the seat represents. Based on\nthe seat configuration used by the compositor.\n\nOnly available since version 2 of the interface." ] fn name ( & mut self , object : * mut wl_seat , name : * mut c_char ) { } } pub unsafe fn wl_seat_set_user_data ( wl_seat : * mut super :: wl_seat :: wl_seat , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_seat as _ , user_data ) ; } pub unsafe fn wl_seat_get_user_data ( wl_seat : * mut super :: wl_seat :: wl_seat ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_seat as _ ) ; } pub unsafe fn wl_seat_get_version ( wl_seat : * mut super :: wl_seat :: wl_seat ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_seat as _ ) ; } pub unsafe fn wl_seat_add_listener ( wl_seat : * mut super :: wl_seat :: wl_seat , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_seat as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_seat_add_rust_listener ( wl_seat : * mut super :: wl_seat :: wl_seat , listener : & dyn wl_seat_listener ) -> bool { let to = ( listener as * const dyn wl_seat_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_seat_add_listener ( wl_seat as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_seat_destroy ( wl_seat : * mut super :: wl_seat :: wl_seat ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_seat as _ ) ; } # [ doc = "return pointer object\n\nThe ID provided will be initialized to the wl_pointer interface\nfor this seat.\n\nThis request only takes effect if the seat has the pointer\ncapability, or has had the pointer capability in the past.\nIt is a protocol violation to issue this request on a seat that has\nnever had the pointer capability." ] pub unsafe fn wl_seat_get_pointer ( wl_seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: wl_pointer :: wl_pointer { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_seat as _ , 0u32 , & super :: wl_pointer :: wl_pointer_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "return keyboard object\n\nThe ID provided will be initialized to the wl_keyboard interface\nfor this seat.\n\nThis request only takes effect if the seat has the keyboard\ncapability, or has had the keyboard capability in the past.\nIt is a protocol violation to issue this request on a seat that has\nnever had the keyboard capability." ] pub unsafe fn wl_seat_get_keyboard ( wl_seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: wl_keyboard :: wl_keyboard { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_seat as _ , 1u32 , & super :: wl_keyboard :: wl_keyboard_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "return touch object\n\nThe ID provided will be initialized to the wl_touch interface\nfor this seat.\n\nThis request only takes effect if the seat has the touch\ncapability, or has had the touch capability in the past.\nIt is a protocol violation to issue this request on a seat that has\nnever had the touch capability." ] pub unsafe fn wl_seat_get_touch ( wl_seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: wl_touch :: wl_touch { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_seat as _ , 2u32 , & super :: wl_touch :: wl_touch_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "release the seat object\n\nUsing this request a client can tell the server that it is not going to\nuse the seat object anymore." ] pub unsafe fn wl_seat_release ( wl_seat : * mut super :: wl_seat :: wl_seat ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_seat as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_seat as _ ) ; } } # [ doc = "pointer input device\n\nThe wl_pointer interface represents one or more input devices,\nsuch as mice, which control the pointer location and pointer_focus\nof a seat.\n\nThe wl_pointer interface generates motion, enter and leave\nevents for the surfaces that the pointer is located over,\nand button and axis events for button presses, button releases\nand scrolling." ] pub mod wl_pointer { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_pointer { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "physical button state\n\nDescribes the physical state of a button that produced the button\nevent." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum button_state { # [ doc = "the button is not pressed" ] released = 0 , # [ doc = "the button is pressed" ] pressed = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl button_state { pub fn from_raw ( n : u32 ) -> Option < button_state > { match n { 0 => Some ( button_state :: released ) , 1 => Some ( button_state :: pressed ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "axis types\n\nDescribes the axis types of scroll events." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum axis { # [ doc = "vertical axis" ] vertical_scroll = 0 , # [ doc = "horizontal axis" ] horizontal_scroll = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl axis { pub fn from_raw ( n : u32 ) -> Option < axis > { match n { 0 => Some ( axis :: vertical_scroll ) , 1 => Some ( axis :: horizontal_scroll ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "axis source types\n\nDescribes the source types for axis events. This indicates to the\nclient how an axis event was physically generated; a client may\nadjust the user interface accordingly. For example, scroll events\nfrom a \"finger\" source may be in a smooth coordinate space with\nkinetic scrolling whereas a \"wheel\" source may be in discrete steps\nof a number of lines.\n\nThe \"continuous\" axis source is a device generating events in a\ncontinuous coordinate space, but using something other than a\nfinger. One example for this source is button-based scrolling where\nthe vertical motion of a device is converted to scroll events while\na button is held down.\n\nThe \"wheel tilt\" axis source indicates that the actual device is a\nwheel but the scroll event is not caused by a rotation but a\n(usually sideways) tilt of the wheel." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum axis_source { # [ doc = "a physical wheel rotation" ] wheel = 0 , # [ doc = "finger on a touch surface" ] finger = 1 , # [ doc = "continuous coordinate space" ] continuous = 2 , # [ doc = "a physical wheel tilt" ] wheel_tilt = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl axis_source { pub fn from_raw ( n : u32 ) -> Option < axis_source > { match n { 0 => Some ( axis_source :: wheel ) , 1 => Some ( axis_source :: finger ) , 2 => Some ( axis_source :: continuous ) , 3 => Some ( axis_source :: wheel_tilt ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_pointer_requests_set_cursor_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_pointer_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_cursor\0" as * const u8 as * const c_char , signature : b"u?oii\0" as * const u8 as * const c_char , types : unsafe { & wl_pointer_requests_set_cursor_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wl_pointer_events_enter_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut wl_pointer_events_leave_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_pointer_events : [ wl_message ; 9 ] = [ wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"uoff\0" as * const u8 as * const c_char , types : unsafe { & wl_pointer_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"uo\0" as * const u8 as * const c_char , types : unsafe { & wl_pointer_events_leave_types as * const _ } , } , wl_message { name : b"motion\0" as * const u8 as * const c_char , signature : b"uff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"button\0" as * const u8 as * const c_char , signature : b"uuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"axis\0" as * const u8 as * const c_char , signature : b"uuf\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"5\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"axis_source\0" as * const u8 as * const c_char , signature : b"5u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"axis_stop\0" as * const u8 as * const c_char , signature : b"5uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"axis_discrete\0" as * const u8 as * const c_char , signature : b"5ui\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_pointer_interface : wl_interface = wl_interface { name : b"wl_pointer\0" as * const u8 as * const c_char , version : 6 , request_count : 2 , requests : unsafe { & wl_pointer_requests as * const _ } , event_count : 9 , events : unsafe { & wl_pointer_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_pointer_listener { # [ doc = "enter event\n\nNotification that this seat's pointer is focused on a certain\nsurface.\n\nWhen a seat's focus enters a surface, the pointer image\nis undefined and a client should respond to this event by setting\nan appropriate pointer image with the set_cursor request." ] fn enter ( & mut self , object : * mut wl_pointer , serial : u32 , surface : * mut super :: wl_surface :: wl_surface , surface_x : wl_fixed_t , surface_y : wl_fixed_t ) { } # [ doc = "leave event\n\nNotification that this seat's pointer is no longer focused on\na certain surface.\n\nThe leave notification is sent before the enter notification\nfor the new focus." ] fn leave ( & mut self , object : * mut wl_pointer , serial : u32 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "pointer motion event\n\nNotification of pointer location change. The arguments\nsurface_x and surface_y are the location relative to the\nfocused surface." ] fn motion ( & mut self , object : * mut wl_pointer , time : u32 , surface_x : wl_fixed_t , surface_y : wl_fixed_t ) { } # [ doc = "pointer button event\n\nMouse button click and release notifications.\n\nThe location of the click is given by the last motion or\nenter event.\nThe time argument is a timestamp with millisecond\ngranularity, with an undefined base.\n\nThe button is a button code as defined in the Linux kernel's\nlinux/input-event-codes.h header file, e.g. BTN_LEFT.\n\nAny 16-bit button code value is reserved for future additions to the\nkernel's event code list. All other button codes above 0xFFFF are\ncurrently undefined but may be used in future versions of this\nprotocol." ] fn button ( & mut self , object : * mut wl_pointer , serial : u32 , time : u32 , button : u32 , state : button_state ) { } # [ doc = "axis event\n\nScroll and other axis notifications.\n\nFor scroll events (vertical and horizontal scroll axes), the\nvalue parameter is the length of a vector along the specified\naxis in a coordinate space identical to those of motion events,\nrepresenting a relative movement along the specified axis.\n\nFor devices that support movements non-parallel to axes multiple\naxis events will be emitted.\n\nWhen applicable, for example for touch pads, the server can\nchoose to emit scroll events where the motion vector is\nequivalent to a motion event vector.\n\nWhen applicable, a client can transform its content relative to the\nscroll distance." ] fn axis ( & mut self , object : * mut wl_pointer , time : u32 , axis : axis , value : wl_fixed_t ) { } # [ doc = "end of a pointer event sequence\n\nIndicates the end of a set of events that logically belong together.\nA client is expected to accumulate the data in all events within the\nframe before proceeding.\n\nAll wl_pointer events before a wl_pointer.frame event belong\nlogically together. For example, in a diagonal scroll motion the\ncompositor will send an optional wl_pointer.axis_source event, two\nwl_pointer.axis events (horizontal and vertical) and finally a\nwl_pointer.frame event. The client may use this information to\ncalculate a diagonal vector for scrolling.\n\nWhen multiple wl_pointer.axis events occur within the same frame,\nthe motion vector is the combined motion of all events.\nWhen a wl_pointer.axis and a wl_pointer.axis_stop event occur within\nthe same frame, this indicates that axis movement in one axis has\nstopped but continues in the other axis.\nWhen multiple wl_pointer.axis_stop events occur within the same\nframe, this indicates that these axes stopped in the same instance.\n\nA wl_pointer.frame event is sent for every logical event group,\neven if the group only contains a single wl_pointer event.\nSpecifically, a client may get a sequence: motion, frame, button,\nframe, axis, frame, axis_stop, frame.\n\nThe wl_pointer.enter and wl_pointer.leave events are logical events\ngenerated by the compositor and not the hardware. These events are\nalso grouped by a wl_pointer.frame. When a pointer moves from one\nsurface to another, a compositor should group the\nwl_pointer.leave event within the same wl_pointer.frame.\nHowever, a client must not rely on wl_pointer.leave and\nwl_pointer.enter being in the same wl_pointer.frame.\nCompositor-specific policies may require the wl_pointer.leave and\nwl_pointer.enter event being split across multiple wl_pointer.frame\ngroups.\n\nOnly available since version 5 of the interface." ] fn frame ( & mut self , object : * mut wl_pointer , ) { } # [ doc = "axis source event\n\nSource information for scroll and other axes.\n\nThis event does not occur on its own. It is sent before a\nwl_pointer.frame event and carries the source information for\nall events within that frame.\n\nThe source specifies how this event was generated. If the source is\nwl_pointer.axis_source.finger, a wl_pointer.axis_stop event will be\nsent when the user lifts the finger off the device.\n\nIf the source is wl_pointer.axis_source.wheel,\nwl_pointer.axis_source.wheel_tilt or\nwl_pointer.axis_source.continuous, a wl_pointer.axis_stop event may\nor may not be sent. Whether a compositor sends an axis_stop event\nfor these sources is hardware-specific and implementation-dependent;\nclients must not rely on receiving an axis_stop event for these\nscroll sources and should treat scroll sequences from these scroll\nsources as unterminated by default.\n\nThis event is optional. If the source is unknown for a particular\naxis event sequence, no event is sent.\nOnly one wl_pointer.axis_source event is permitted per frame.\n\nThe order of wl_pointer.axis_discrete and wl_pointer.axis_source is\nnot guaranteed.\n\nOnly available since version 5 of the interface." ] fn axis_source ( & mut self , object : * mut wl_pointer , axis_source : axis_source ) { } # [ doc = "axis stop event\n\nStop notification for scroll and other axes.\n\nFor some wl_pointer.axis_source types, a wl_pointer.axis_stop event\nis sent to notify a client that the axis sequence has terminated.\nThis enables the client to implement kinetic scrolling.\nSee the wl_pointer.axis_source documentation for information on when\nthis event may be generated.\n\nAny wl_pointer.axis events with the same axis_source after this\nevent should be considered as the start of a new axis motion.\n\nThe timestamp is to be interpreted identical to the timestamp in the\nwl_pointer.axis event. The timestamp value may be the same as a\npreceding wl_pointer.axis event.\n\nOnly available since version 5 of the interface." ] fn axis_stop ( & mut self , object : * mut wl_pointer , time : u32 , axis : axis ) { } # [ doc = "axis click event\n\nDiscrete step information for scroll and other axes.\n\nThis event carries the axis value of the wl_pointer.axis event in\ndiscrete steps (e.g. mouse wheel clicks).\n\nThis event does not occur on its own, it is coupled with a\nwl_pointer.axis event that represents this axis value on a\ncontinuous scale. The protocol guarantees that each axis_discrete\nevent is always followed by exactly one axis event with the same\naxis number within the same wl_pointer.frame. Note that the protocol\nallows for other events to occur between the axis_discrete and\nits coupled axis event, including other axis_discrete or axis\nevents.\n\nThis event is optional; continuous scrolling devices\nlike two-finger scrolling on touchpads do not have discrete\nsteps and do not generate this event.\n\nThe discrete value carries the directional information. e.g. a value\nof -2 is two steps towards the negative direction of this axis.\n\nThe axis number is identical to the axis number in the associated\naxis event.\n\nThe order of wl_pointer.axis_discrete and wl_pointer.axis_source is\nnot guaranteed.\n\nOnly available since version 5 of the interface." ] fn axis_discrete ( & mut self , object : * mut wl_pointer , axis : axis , discrete : i32 ) { } } pub unsafe fn wl_pointer_set_user_data ( wl_pointer : * mut super :: wl_pointer :: wl_pointer , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_pointer as _ , user_data ) ; } pub unsafe fn wl_pointer_get_user_data ( wl_pointer : * mut super :: wl_pointer :: wl_pointer ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_pointer as _ ) ; } pub unsafe fn wl_pointer_get_version ( wl_pointer : * mut super :: wl_pointer :: wl_pointer ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_pointer as _ ) ; } pub unsafe fn wl_pointer_add_listener ( wl_pointer : * mut super :: wl_pointer :: wl_pointer , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_pointer as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_pointer_add_rust_listener ( wl_pointer : * mut super :: wl_pointer :: wl_pointer , listener : & dyn wl_pointer_listener ) -> bool { let to = ( listener as * const dyn wl_pointer_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_pointer_add_listener ( wl_pointer as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_pointer_destroy ( wl_pointer : * mut super :: wl_pointer :: wl_pointer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_pointer as _ ) ; } # [ doc = "set the pointer surface\n\nSet the pointer surface, i.e., the surface that contains the\npointer image (cursor). This request gives the surface the role\nof a cursor. If the surface already has another role, it raises\na protocol error.\n\nThe cursor actually changes only if the pointer\nfocus for this device is one of the requesting client's surfaces\nor the surface parameter is the current pointer surface. If\nthere was a previous surface set with this request it is\nreplaced. If surface is NULL, the pointer image is hidden.\n\nThe parameters hotspot_x and hotspot_y define the position of\nthe pointer surface relative to the pointer location. Its\ntop-left corner is always at (x, y) - (hotspot_x, hotspot_y),\nwhere (x, y) are the coordinates of the pointer location, in\nsurface-local coordinates.\n\nOn surface.attach requests to the pointer surface, hotspot_x\nand hotspot_y are decremented by the x and y parameters\npassed to the request. Attach must be confirmed by\nwl_surface.commit as usual.\n\nThe hotspot can also be updated by passing the currently set\npointer surface to this request with new values for hotspot_x\nand hotspot_y.\n\nThe current and pending input regions of the wl_surface are\ncleared, and wl_surface.set_input_region is ignored until the\nwl_surface is no longer used as the cursor. When the use as a\ncursor ends, the current and pending input regions become\nundefined, and the wl_surface is unmapped." ] pub unsafe fn wl_pointer_set_cursor ( wl_pointer : * mut super :: wl_pointer :: wl_pointer , serial : u32 , surface : * mut super :: wl_surface :: wl_surface , hotspot_x : i32 , hotspot_y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_pointer as _ , 0u32 , serial , surface , hotspot_x , hotspot_y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the pointer object\n\nUsing this request a client can tell the server that it is not going to\nuse the pointer object anymore.\n\nThis request destroys the pointer proxy object, so clients must not call\nwl_pointer_destroy() after using this request." ] pub unsafe fn wl_pointer_release ( wl_pointer : * mut super :: wl_pointer :: wl_pointer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_pointer as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_pointer as _ ) ; } } # [ doc = "keyboard input device\n\nThe wl_keyboard interface represents one or more keyboards\nassociated with a seat." ] pub mod wl_keyboard { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_keyboard { } # [ doc = "keyboard mapping format\n\nThis specifies the format of the keymap provided to the\nclient with the wl_keyboard.keymap event." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum keymap_format { # [ doc = "no keymap; client must understand how to interpret the raw keycode" ] no_keymap = 0 , # [ doc = "libxkbcommon compatible; to determine the xkb keycode, clients must add 8 to the key event keycode" ] xkb_v1 = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl keymap_format { pub fn from_raw ( n : u32 ) -> Option < keymap_format > { match n { 0 => Some ( keymap_format :: no_keymap ) , 1 => Some ( keymap_format :: xkb_v1 ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "physical key state\n\nDescribes the physical state of a key that produced the key event." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum key_state { # [ doc = "key is not pressed" ] released = 0 , # [ doc = "key is pressed" ] pressed = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl key_state { pub fn from_raw ( n : u32 ) -> Option < key_state > { match n { 0 => Some ( key_state :: released ) , 1 => Some ( key_state :: pressed ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_keyboard_requests : [ wl_message ; 1 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wl_keyboard_events_enter_types : [ * const wl_interface ; 3 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut wl_keyboard_events_leave_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_keyboard_events : [ wl_message ; 6 ] = [ wl_message { name : b"keymap\0" as * const u8 as * const c_char , signature : b"uhu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"uoa\0" as * const u8 as * const c_char , types : unsafe { & wl_keyboard_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"uo\0" as * const u8 as * const c_char , types : unsafe { & wl_keyboard_events_leave_types as * const _ } , } , wl_message { name : b"key\0" as * const u8 as * const c_char , signature : b"uuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifiers\0" as * const u8 as * const c_char , signature : b"uuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"repeat_info\0" as * const u8 as * const c_char , signature : b"4ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_keyboard_interface : wl_interface = wl_interface { name : b"wl_keyboard\0" as * const u8 as * const c_char , version : 6 , request_count : 1 , requests : unsafe { & wl_keyboard_requests as * const _ } , event_count : 6 , events : unsafe { & wl_keyboard_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_keyboard_listener { # [ doc = "keyboard mapping\n\nThis event provides a file descriptor to the client which can be\nmemory-mapped to provide a keyboard mapping description." ] fn keymap ( & mut self , object : * mut wl_keyboard , format : keymap_format , fd : :: std :: os :: unix :: io :: RawFd , size : u32 ) { } # [ doc = "enter event\n\nNotification that this seat's keyboard focus is on a certain\nsurface." ] fn enter ( & mut self , object : * mut wl_keyboard , serial : u32 , surface : * mut super :: wl_surface :: wl_surface , keys : * mut wl_array ) { } # [ doc = "leave event\n\nNotification that this seat's keyboard focus is no longer on\na certain surface.\n\nThe leave notification is sent before the enter notification\nfor the new focus." ] fn leave ( & mut self , object : * mut wl_keyboard , serial : u32 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "key event\n\nA key was pressed or released.\nThe time argument is a timestamp with millisecond\ngranularity, with an undefined base." ] fn key ( & mut self , object : * mut wl_keyboard , serial : u32 , time : u32 , key : u32 , state : key_state ) { } # [ doc = "modifier and group state\n\nNotifies clients that the modifier and/or group state has\nchanged, and it should update its local state." ] fn modifiers ( & mut self , object : * mut wl_keyboard , serial : u32 , mods_depressed : u32 , mods_latched : u32 , mods_locked : u32 , group : u32 ) { } # [ doc = "repeat rate and delay\n\nInforms the client about the keyboard's repeat rate and delay.\n\nThis event is sent as soon as the wl_keyboard object has been created,\nand is guaranteed to be received by the client before any key press\nevent.\n\nNegative values for either rate or delay are illegal. A rate of zero\nwill disable any repeating (regardless of the value of delay).\n\nThis event can be sent later on as well with a new value if necessary,\nso clients should continue listening for the event past the creation\nof wl_keyboard.\n\nOnly available since version 4 of the interface." ] fn repeat_info ( & mut self , object : * mut wl_keyboard , rate : i32 , delay : i32 ) { } } pub unsafe fn wl_keyboard_set_user_data ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_keyboard as _ , user_data ) ; } pub unsafe fn wl_keyboard_get_user_data ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_keyboard as _ ) ; } pub unsafe fn wl_keyboard_get_version ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_keyboard as _ ) ; } pub unsafe fn wl_keyboard_add_listener ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_keyboard as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_keyboard_add_rust_listener ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard , listener : & dyn wl_keyboard_listener ) -> bool { let to = ( listener as * const dyn wl_keyboard_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_keyboard_add_listener ( wl_keyboard as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_keyboard_destroy ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_keyboard as _ ) ; } # [ doc = "release the keyboard object" ] pub unsafe fn wl_keyboard_release ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_keyboard as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_keyboard as _ ) ; } } # [ doc = "touchscreen input device\n\nThe wl_touch interface represents a touchscreen\nassociated with a seat.\n\nTouch interactions can consist of one or more contacts.\nFor each contact, a series of events is generated, starting\nwith a down event, followed by zero or more motion events,\nand ending with an up event. Events relating to the same\ncontact point can be identified by the ID of the sequence." ] pub mod wl_touch { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_touch { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_touch_requests : [ wl_message ; 1 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wl_touch_events_down_types : [ * const wl_interface ; 6 ] = [ NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_touch_events : [ wl_message ; 7 ] = [ wl_message { name : b"down\0" as * const u8 as * const c_char , signature : b"uuoiff\0" as * const u8 as * const c_char , types : unsafe { & wl_touch_events_down_types as * const _ } , } , wl_message { name : b"up\0" as * const u8 as * const c_char , signature : b"uui\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"motion\0" as * const u8 as * const c_char , signature : b"uiff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cancel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"shape\0" as * const u8 as * const c_char , signature : b"6iff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"orientation\0" as * const u8 as * const c_char , signature : b"6if\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_touch_interface : wl_interface = wl_interface { name : b"wl_touch\0" as * const u8 as * const c_char , version : 6 , request_count : 1 , requests : unsafe { & wl_touch_requests as * const _ } , event_count : 7 , events : unsafe { & wl_touch_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_touch_listener { # [ doc = "touch down event and beginning of a touch sequence\n\nA new touch point has appeared on the surface. This touch point is\nassigned a unique ID. Future events from this touch point reference\nthis ID. The ID ceases to be valid after a touch up event and may be\nreused in the future." ] fn down ( & mut self , object : * mut wl_touch , serial : u32 , time : u32 , surface : * mut super :: wl_surface :: wl_surface , id : i32 , x : wl_fixed_t , y : wl_fixed_t ) { } # [ doc = "end of a touch event sequence\n\nThe touch point has disappeared. No further events will be sent for\nthis touch point and the touch point's ID is released and may be\nreused in a future touch down event." ] fn up ( & mut self , object : * mut wl_touch , serial : u32 , time : u32 , id : i32 ) { } # [ doc = "update of touch point coordinates\n\nA touch point has changed coordinates." ] fn motion ( & mut self , object : * mut wl_touch , time : u32 , id : i32 , x : wl_fixed_t , y : wl_fixed_t ) { } # [ doc = "end of touch frame event\n\nIndicates the end of a set of events that logically belong together.\nA client is expected to accumulate the data in all events within the\nframe before proceeding.\n\nA wl_touch.frame terminates at least one event but otherwise no\nguarantee is provided about the set of events within a frame. A client\nmust assume that any state not updated in a frame is unchanged from the\npreviously known state." ] fn frame ( & mut self , object : * mut wl_touch , ) { } # [ doc = "touch session cancelled\n\nSent if the compositor decides the touch stream is a global\ngesture. No further events are sent to the clients from that\nparticular gesture. Touch cancellation applies to all touch points\ncurrently active on this client's surface. The client is\nresponsible for finalizing the touch points, future touch points on\nthis surface may reuse the touch point ID." ] fn cancel ( & mut self , object : * mut wl_touch , ) { } # [ doc = "update shape of touch point\n\nSent when a touchpoint has changed its shape.\n\nThis event does not occur on its own. It is sent before a\nwl_touch.frame event and carries the new shape information for\nany previously reported, or new touch points of that frame.\n\nOther events describing the touch point such as wl_touch.down,\nwl_touch.motion or wl_touch.orientation may be sent within the\nsame wl_touch.frame. A client should treat these events as a single\nlogical touch point update. The order of wl_touch.shape,\nwl_touch.orientation and wl_touch.motion is not guaranteed.\nA wl_touch.down event is guaranteed to occur before the first\nwl_touch.shape event for this touch ID but both events may occur within\nthe same wl_touch.frame.\n\nA touchpoint shape is approximated by an ellipse through the major and\nminor axis length. The major axis length describes the longer diameter\nof the ellipse, while the minor axis length describes the shorter\ndiameter. Major and minor are orthogonal and both are specified in\nsurface-local coordinates. The center of the ellipse is always at the\ntouchpoint location as reported by wl_touch.down or wl_touch.move.\n\nThis event is only sent by the compositor if the touch device supports\nshape reports. The client has to make reasonable assumptions about the\nshape if it did not receive this event.\n\nOnly available since version 6 of the interface." ] fn shape ( & mut self , object : * mut wl_touch , id : i32 , major : wl_fixed_t , minor : wl_fixed_t ) { } # [ doc = "update orientation of touch point\n\nSent when a touchpoint has changed its orientation.\n\nThis event does not occur on its own. It is sent before a\nwl_touch.frame event and carries the new shape information for\nany previously reported, or new touch points of that frame.\n\nOther events describing the touch point such as wl_touch.down,\nwl_touch.motion or wl_touch.shape may be sent within the\nsame wl_touch.frame. A client should treat these events as a single\nlogical touch point update. The order of wl_touch.shape,\nwl_touch.orientation and wl_touch.motion is not guaranteed.\nA wl_touch.down event is guaranteed to occur before the first\nwl_touch.orientation event for this touch ID but both events may occur\nwithin the same wl_touch.frame.\n\nThe orientation describes the clockwise angle of a touchpoint's major\naxis to the positive surface y-axis and is normalized to the -180 to\n+180 degree range. The granularity of orientation depends on the touch\ndevice, some devices only support binary rotation values between 0 and\n90 degrees.\n\nThis event is only sent by the compositor if the touch device supports\norientation reports.\n\nOnly available since version 6 of the interface." ] fn orientation ( & mut self , object : * mut wl_touch , id : i32 , orientation : wl_fixed_t ) { } } pub unsafe fn wl_touch_set_user_data ( wl_touch : * mut super :: wl_touch :: wl_touch , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_touch as _ , user_data ) ; } pub unsafe fn wl_touch_get_user_data ( wl_touch : * mut super :: wl_touch :: wl_touch ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_touch as _ ) ; } pub unsafe fn wl_touch_get_version ( wl_touch : * mut super :: wl_touch :: wl_touch ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_touch as _ ) ; } pub unsafe fn wl_touch_add_listener ( wl_touch : * mut super :: wl_touch :: wl_touch , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_touch as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_touch_add_rust_listener ( wl_touch : * mut super :: wl_touch :: wl_touch , listener : & dyn wl_touch_listener ) -> bool { let to = ( listener as * const dyn wl_touch_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_touch_add_listener ( wl_touch as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_touch_destroy ( wl_touch : * mut super :: wl_touch :: wl_touch ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_touch as _ ) ; } # [ doc = "release the touch object" ] pub unsafe fn wl_touch_release ( wl_touch : * mut super :: wl_touch :: wl_touch ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_touch as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_touch as _ ) ; } } # [ doc = "compositor output region\n\nAn output describes part of the compositor geometry. The\ncompositor works in the 'compositor coordinate system' and an\noutput corresponds to a rectangular area in that space that is\nactually visible. This typically corresponds to a monitor that\ndisplays part of the compositor space. This object is published\nas global during start up, or when a monitor is hotplugged." ] pub mod wl_output { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_output { } # [ doc = "subpixel geometry information\n\nThis enumeration describes how the physical\npixels on an output are laid out." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum subpixel { # [ doc = "unknown geometry" ] unknown = 0 , # [ doc = "no geometry" ] none = 1 , # [ doc = "horizontal RGB" ] horizontal_rgb = 2 , # [ doc = "horizontal BGR" ] horizontal_bgr = 3 , # [ doc = "vertical RGB" ] vertical_rgb = 4 , # [ doc = "vertical BGR" ] vertical_bgr = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl subpixel { pub fn from_raw ( n : u32 ) -> Option < subpixel > { match n { 0 => Some ( subpixel :: unknown ) , 1 => Some ( subpixel :: none ) , 2 => Some ( subpixel :: horizontal_rgb ) , 3 => Some ( subpixel :: horizontal_bgr ) , 4 => Some ( subpixel :: vertical_rgb ) , 5 => Some ( subpixel :: vertical_bgr ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "transform from framebuffer to output\n\nThis describes the transform that a compositor will apply to a\nsurface to compensate for the rotation or mirroring of an\noutput device.\n\nThe flipped values correspond to an initial flip around a\nvertical axis followed by rotation.\n\nThe purpose is mainly to allow clients to render accordingly and\ntell the compositor, so that for fullscreen surfaces, the\ncompositor will still be able to scan out directly from client\nsurfaces." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum transform { # [ doc = "no transform" ] normal = 0 , # [ doc = "90 degrees counter-clockwise" ] _90 = 1 , # [ doc = "180 degrees counter-clockwise" ] _180 = 2 , # [ doc = "270 degrees counter-clockwise" ] _270 = 3 , # [ doc = "180 degree flip around a vertical axis" ] flipped = 4 , # [ doc = "flip and rotate 90 degrees counter-clockwise" ] flipped_90 = 5 , # [ doc = "flip and rotate 180 degrees counter-clockwise" ] flipped_180 = 6 , # [ doc = "flip and rotate 270 degrees counter-clockwise" ] flipped_270 = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl transform { pub fn from_raw ( n : u32 ) -> Option < transform > { match n { 0 => Some ( transform :: normal ) , 1 => Some ( transform :: _90 ) , 2 => Some ( transform :: _180 ) , 3 => Some ( transform :: _270 ) , 4 => Some ( transform :: flipped ) , 5 => Some ( transform :: flipped_90 ) , 6 => Some ( transform :: flipped_180 ) , 7 => Some ( transform :: flipped_270 ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { # [ doc = "mode information\n\nThese flags describe properties of an output mode.\nThey are used in the flags bitfield of the mode event." ] pub struct mode : u32 { # [ doc = "indicates this is the current mode" ] const current = 1 ; # [ doc = "indicates this is the preferred mode" ] const preferred = 2 ; } } impl mode { pub fn from_raw ( n : u32 ) -> Option < mode > { Some ( mode :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_output_requests : [ wl_message ; 1 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_output_events : [ wl_message ; 4 ] = [ wl_message { name : b"geometry\0" as * const u8 as * const c_char , signature : b"iiiiissi\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"uiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"scale\0" as * const u8 as * const c_char , signature : b"2i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_output_interface : wl_interface = wl_interface { name : b"wl_output\0" as * const u8 as * const c_char , version : 3 , request_count : 1 , requests : unsafe { & wl_output_requests as * const _ } , event_count : 4 , events : unsafe { & wl_output_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_output_listener { # [ doc = "properties of the output\n\nThe geometry event describes geometric properties of the output.\nThe event is sent when binding to the output object and whenever\nany of the properties change.\n\nThe physical size can be set to zero if it doesn't make sense for this\noutput (e.g. for projectors or virtual outputs)." ] fn geometry ( & mut self , object : * mut wl_output , x : i32 , y : i32 , physical_width : i32 , physical_height : i32 , subpixel : subpixel , make : * mut c_char , model : * mut c_char , transform : transform ) { } # [ doc = "advertise available modes for the output\n\nThe mode event describes an available mode for the output.\n\nThe event is sent when binding to the output object and there\nwill always be one mode, the current mode. The event is sent\nagain if an output changes mode, for the mode that is now\ncurrent. In other words, the current mode is always the last\nmode that was received with the current flag set.\n\nThe size of a mode is given in physical hardware units of\nthe output device. This is not necessarily the same as\nthe output size in the global compositor space. For instance,\nthe output may be scaled, as described in wl_output.scale,\nor transformed, as described in wl_output.transform." ] fn mode ( & mut self , object : * mut wl_output , flags : mode , width : i32 , height : i32 , refresh : i32 ) { } # [ doc = "sent all information about output\n\nThis event is sent after all other properties have been\nsent after binding to the output object and after any\nother property changes done after that. This allows\nchanges to the output properties to be seen as\natomic, even if they happen via multiple events.\n\nOnly available since version 2 of the interface." ] fn done ( & mut self , object : * mut wl_output , ) { } # [ doc = "output scaling properties\n\nThis event contains scaling geometry information\nthat is not in the geometry event. It may be sent after\nbinding the output object or if the output scale changes\nlater. If it is not sent, the client should assume a\nscale of 1.\n\nA scale larger than 1 means that the compositor will\nautomatically scale surface buffers by this amount\nwhen rendering. This is used for very high resolution\ndisplays where applications rendering at the native\nresolution would be too small to be legible.\n\nIt is intended that scaling aware clients track the\ncurrent output of a surface, and if it is on a scaled\noutput it should use wl_surface.set_buffer_scale with\nthe scale of the output. That way the compositor can\navoid scaling the surface, and the client can supply\na higher detail image.\n\nOnly available since version 2 of the interface." ] fn scale ( & mut self , object : * mut wl_output , factor : i32 ) { } } pub unsafe fn wl_output_set_user_data ( wl_output : * mut super :: wl_output :: wl_output , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_output as _ , user_data ) ; } pub unsafe fn wl_output_get_user_data ( wl_output : * mut super :: wl_output :: wl_output ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_output as _ ) ; } pub unsafe fn wl_output_get_version ( wl_output : * mut super :: wl_output :: wl_output ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_output as _ ) ; } pub unsafe fn wl_output_add_listener ( wl_output : * mut super :: wl_output :: wl_output , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_output as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_output_add_rust_listener ( wl_output : * mut super :: wl_output :: wl_output , listener : & dyn wl_output_listener ) -> bool { let to = ( listener as * const dyn wl_output_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_output_add_listener ( wl_output as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_output_destroy ( wl_output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_output as _ ) ; } # [ doc = "release the output object\n\nUsing this request a client can tell the server that it is not going to\nuse the output object anymore." ] pub unsafe fn wl_output_release ( wl_output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_output as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_output as _ ) ; } } # [ doc = "region interface\n\nA region object describes an area.\n\nRegion objects are used to describe the opaque and input\nregions of a surface." ] pub mod wl_region { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_region { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_region_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"add\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"subtract\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_region_interface : wl_interface = wl_interface { name : b"wl_region\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & wl_region_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_region_listener { } pub unsafe fn wl_region_set_user_data ( wl_region : * mut super :: wl_region :: wl_region , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_region as _ , user_data ) ; } pub unsafe fn wl_region_get_user_data ( wl_region : * mut super :: wl_region :: wl_region ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_region as _ ) ; } pub unsafe fn wl_region_get_version ( wl_region : * mut super :: wl_region :: wl_region ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_region as _ ) ; } pub unsafe fn wl_region_add_listener ( wl_region : * mut super :: wl_region :: wl_region , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_region as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_region_add_rust_listener ( wl_region : * mut super :: wl_region :: wl_region , listener : & dyn wl_region_listener ) -> bool { let to = ( listener as * const dyn wl_region_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_region_add_listener ( wl_region as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy region\n\nDestroy the region. This will invalidate the object ID." ] pub unsafe fn wl_region_destroy ( wl_region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_region as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_region as _ ) ; } # [ doc = "add rectangle to region\n\nAdd the specified rectangle to the region." ] pub unsafe fn wl_region_add ( wl_region : * mut super :: wl_region :: wl_region , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_region as _ , 1u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "subtract rectangle from region\n\nSubtract the specified rectangle from the region." ] pub unsafe fn wl_region_subtract ( wl_region : * mut super :: wl_region :: wl_region , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_region as _ , 2u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "sub-surface compositing\n\nThe global interface exposing sub-surface compositing capabilities.\nA wl_surface, that has sub-surfaces associated, is called the\nparent surface. Sub-surfaces can be arbitrarily nested and create\na tree of sub-surfaces.\n\nThe root surface in a tree of sub-surfaces is the main\nsurface. The main surface cannot be a sub-surface, because\nsub-surfaces must always have a parent.\n\nA main surface with its sub-surfaces forms a (compound) window.\nFor window management purposes, this set of wl_surface objects is\nto be considered as a single window, and it should also behave as\nsuch.\n\nThe aim of sub-surfaces is to offload some of the compositing work\nwithin a window from clients to the compositor. A prime example is\na video player with decorations and video in separate wl_surface\nobjects. This should allow the compositor to pass YUV video buffer\nprocessing to dedicated overlay hardware when possible." ] pub mod wl_subcompositor { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_subcompositor { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "the to-be sub-surface is invalid" ] bad_surface = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: bad_surface ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_subcompositor_requests_get_subsurface_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_subsurface :: wl_subsurface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_subcompositor_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_subsurface\0" as * const u8 as * const c_char , signature : b"noo\0" as * const u8 as * const c_char , types : unsafe { & wl_subcompositor_requests_get_subsurface_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_subcompositor_interface : wl_interface = wl_interface { name : b"wl_subcompositor\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & wl_subcompositor_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_subcompositor_listener { } pub unsafe fn wl_subcompositor_set_user_data ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_subcompositor as _ , user_data ) ; } pub unsafe fn wl_subcompositor_get_user_data ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_subcompositor as _ ) ; } pub unsafe fn wl_subcompositor_get_version ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_subcompositor as _ ) ; } pub unsafe fn wl_subcompositor_add_listener ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_subcompositor as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_subcompositor_add_rust_listener ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor , listener : & dyn wl_subcompositor_listener ) -> bool { let to = ( listener as * const dyn wl_subcompositor_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_subcompositor_add_listener ( wl_subcompositor as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "unbind from the subcompositor interface\n\nInforms the server that the client will not be using this\nprotocol object anymore. This does not affect any other\nobjects, wl_subsurface objects included." ] pub unsafe fn wl_subcompositor_destroy ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subcompositor as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_subcompositor as _ ) ; } # [ doc = "give a surface the role sub-surface\n\nCreate a sub-surface interface for the given surface, and\nassociate it with the given parent surface. This turns a\nplain wl_surface into a sub-surface.\n\nThe to-be sub-surface must not already have another role, and it\nmust not have an existing wl_subsurface object. Otherwise a protocol\nerror is raised.\n\nAdding sub-surfaces to a parent is a double-buffered operation on the\nparent (see wl_surface.commit). The effect of adding a sub-surface\nbecomes visible on the next time the state of the parent surface is\napplied.\n\nThis request modifies the behaviour of wl_surface.commit request on\nthe sub-surface, see the documentation on wl_subsurface interface." ] pub unsafe fn wl_subcompositor_get_subsurface ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor , surface : * mut super :: wl_surface :: wl_surface , parent : * mut super :: wl_surface :: wl_surface ) -> * mut super :: wl_subsurface :: wl_subsurface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_subcompositor as _ , 1u32 , & super :: wl_subsurface :: wl_subsurface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface , parent ) ; return r as _ ; } } # [ doc = "sub-surface interface to a wl_surface\n\nAn additional interface to a wl_surface object, which has been\nmade a sub-surface. A sub-surface has one parent surface. A\nsub-surface's size and position are not limited to that of the parent.\nParticularly, a sub-surface is not automatically clipped to its\nparent's area.\n\nA sub-surface becomes mapped, when a non-NULL wl_buffer is applied\nand the parent surface is mapped. The order of which one happens\nfirst is irrelevant. A sub-surface is hidden if the parent becomes\nhidden, or if a NULL wl_buffer is applied. These rules apply\nrecursively through the tree of surfaces.\n\nThe behaviour of a wl_surface.commit request on a sub-surface\ndepends on the sub-surface's mode. The possible modes are\nsynchronized and desynchronized, see methods\nwl_subsurface.set_sync and wl_subsurface.set_desync. Synchronized\nmode caches the wl_surface state to be applied when the parent's\nstate gets applied, and desynchronized mode applies the pending\nwl_surface state directly. A sub-surface is initially in the\nsynchronized mode.\n\nSub-surfaces have also other kind of state, which is managed by\nwl_subsurface requests, as opposed to wl_surface requests. This\nstate includes the sub-surface position relative to the parent\nsurface (wl_subsurface.set_position), and the stacking order of\nthe parent and its sub-surfaces (wl_subsurface.place_above and\n.place_below). This state is applied when the parent surface's\nwl_surface state is applied, regardless of the sub-surface's mode.\nAs the exception, set_sync and set_desync are effective immediately.\n\nThe main surface can be thought to be always in desynchronized mode,\nsince it does not have a parent in the sub-surfaces sense.\n\nEven if a sub-surface is in desynchronized mode, it will behave as\nin synchronized mode, if its parent surface behaves as in\nsynchronized mode. This rule is applied recursively throughout the\ntree of surfaces. This means, that one can set a sub-surface into\nsynchronized mode, and then assume that all its child and grand-child\nsub-surfaces are synchronized, too, without explicitly setting them.\n\nIf the wl_surface associated with the wl_subsurface is destroyed, the\nwl_subsurface object becomes inert. Note, that destroying either object\ntakes effect immediately. If you need to synchronize the removal\nof a sub-surface to the parent surface update, unmap the sub-surface\nfirst by attaching a NULL wl_buffer, update parent, and then destroy\nthe sub-surface.\n\nIf the parent wl_surface object is destroyed, the sub-surface is\nunmapped." ] pub mod wl_subsurface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_subsurface { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "wl_surface is not a sibling or the parent" ] bad_surface = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: bad_surface ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_subsurface_requests_place_above_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut wl_subsurface_requests_place_below_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_subsurface_requests : [ wl_message ; 6 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"place_above\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wl_subsurface_requests_place_above_types as * const _ } , } , wl_message { name : b"place_below\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wl_subsurface_requests_place_below_types as * const _ } , } , wl_message { name : b"set_sync\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_desync\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_subsurface_interface : wl_interface = wl_interface { name : b"wl_subsurface\0" as * const u8 as * const c_char , version : 1 , request_count : 6 , requests : unsafe { & wl_subsurface_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_subsurface_listener { } pub unsafe fn wl_subsurface_set_user_data ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_subsurface as _ , user_data ) ; } pub unsafe fn wl_subsurface_get_user_data ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_subsurface as _ ) ; } pub unsafe fn wl_subsurface_get_version ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_subsurface as _ ) ; } pub unsafe fn wl_subsurface_add_listener ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_subsurface as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_subsurface_add_rust_listener ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface , listener : & dyn wl_subsurface_listener ) -> bool { let to = ( listener as * const dyn wl_subsurface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_subsurface_add_listener ( wl_subsurface as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "remove sub-surface interface\n\nThe sub-surface interface is removed from the wl_surface object\nthat was turned into a sub-surface with a\nwl_subcompositor.get_subsurface request. The wl_surface's association\nto the parent is deleted, and the wl_surface loses its role as\na sub-surface. The wl_surface is unmapped immediately." ] pub unsafe fn wl_subsurface_destroy ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subsurface as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_subsurface as _ ) ; } # [ doc = "reposition the sub-surface\n\nThis schedules a sub-surface position change.\nThe sub-surface will be moved so that its origin (top left\ncorner pixel) will be at the location x, y of the parent surface\ncoordinate system. The coordinates are not restricted to the parent\nsurface area. Negative values are allowed.\n\nThe scheduled coordinates will take effect whenever the state of the\nparent surface is applied. When this happens depends on whether the\nparent surface is in synchronized mode or not. See\nwl_subsurface.set_sync and wl_subsurface.set_desync for details.\n\nIf more than one set_position request is invoked by the client before\nthe commit of the parent surface, the position of a new request always\nreplaces the scheduled position from any previous request.\n\nThe initial position is 0, 0." ] pub unsafe fn wl_subsurface_set_position ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subsurface as _ , 1u32 , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "restack the sub-surface\n\nThis sub-surface is taken from the stack, and put back just\nabove the reference surface, changing the z-order of the sub-surfaces.\nThe reference surface must be one of the sibling surfaces, or the\nparent surface. Using any other surface, including this sub-surface,\nwill cause a protocol error.\n\nThe z-order is double-buffered. Requests are handled in order and\napplied immediately to a pending state. The final pending state is\ncopied to the active state the next time the state of the parent\nsurface is applied. When this happens depends on whether the parent\nsurface is in synchronized mode or not. See wl_subsurface.set_sync and\nwl_subsurface.set_desync for details.\n\nA new sub-surface is initially added as the top-most in the stack\nof its siblings and parent." ] pub unsafe fn wl_subsurface_place_above ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface , sibling : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subsurface as _ , 2u32 , sibling , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "restack the sub-surface\n\nThe sub-surface is placed just below the reference surface.\nSee wl_subsurface.place_above." ] pub unsafe fn wl_subsurface_place_below ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface , sibling : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subsurface as _ , 3u32 , sibling , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set sub-surface to synchronized mode\n\nChange the commit behaviour of the sub-surface to synchronized\nmode, also described as the parent dependent mode.\n\nIn synchronized mode, wl_surface.commit on a sub-surface will\naccumulate the committed state in a cache, but the state will\nnot be applied and hence will not change the compositor output.\nThe cached state is applied to the sub-surface immediately after\nthe parent surface's state is applied. This ensures atomic\nupdates of the parent and all its synchronized sub-surfaces.\nApplying the cached state will invalidate the cache, so further\nparent surface commits do not (re-)apply old state.\n\nSee wl_subsurface for the recursive effect of this mode." ] pub unsafe fn wl_subsurface_set_sync ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subsurface as _ , 4u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set sub-surface to desynchronized mode\n\nChange the commit behaviour of the sub-surface to desynchronized\nmode, also described as independent or freely running mode.\n\nIn desynchronized mode, wl_surface.commit on a sub-surface will\napply the pending state directly, without caching, as happens\nnormally with a wl_surface. Calling wl_surface.commit on the\nparent surface has no effect on the sub-surface's wl_surface\nstate. This mode allows a sub-surface to be updated on its own.\n\nIf cached state exists when wl_surface.commit is called in\ndesynchronized mode, the pending state is added to the cached\nstate, and applied as a whole. This invalidates the cache.\n\nNote: even if a sub-surface is set to desynchronized, a parent\nsub-surface may override it to behave as synchronized. For details,\nsee wl_subsurface.\n\nIf a surface's parent surface behaves as desynchronized, then\nthe cached state is applied on set_desync." ] pub unsafe fn wl_subsurface_set_desync ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subsurface as _ , 5u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod xdg_foreign_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "interface for exporting surfaces\n\nA global interface used for exporting surfaces that can later be imported\nusing xdg_importer." ] pub mod zxdg_exporter_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_exporter_v1 { } static mut zxdg_exporter_v1_requests_export_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_exported_v1 :: zxdg_exported_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_exporter_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"export\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zxdg_exporter_v1_requests_export_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_exporter_v1_interface : wl_interface = wl_interface { name : b"zxdg_exporter_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_exporter_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_exporter_v1_listener { } pub unsafe fn zxdg_exporter_v1_set_user_data ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_exporter_v1 as _ , user_data ) ; } pub unsafe fn zxdg_exporter_v1_get_user_data ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_exporter_v1 as _ ) ; } pub unsafe fn zxdg_exporter_v1_get_version ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_exporter_v1 as _ ) ; } pub unsafe fn zxdg_exporter_v1_add_listener ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_exporter_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_exporter_v1_add_rust_listener ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 , listener : & dyn zxdg_exporter_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_exporter_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_exporter_v1_add_listener ( zxdg_exporter_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_exporter object\n\nNotify the compositor that the xdg_exporter object will no longer be\nused." ] pub unsafe fn zxdg_exporter_v1_destroy ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_exporter_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_exporter_v1 as _ ) ; } # [ doc = "export a surface\n\nThe export request exports the passed surface so that it can later be\nimported via xdg_importer. When called, a new xdg_exported object will\nbe created and xdg_exported.handle will be sent immediately. See the\ncorresponding interface and event for details.\n\nA surface may be exported multiple times, and each exported handle may\nbe used to create an xdg_imported multiple times. Only xdg_surface\nsurfaces may be exported." ] pub unsafe fn zxdg_exporter_v1_export ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_exporter_v1 as _ , 1u32 , & super :: zxdg_exported_v1 :: zxdg_exported_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "interface for importing surfaces\n\nA global interface used for importing surfaces exported by xdg_exporter.\nWith this interface, a client can create a reference to a surface of\nanother client." ] pub mod zxdg_importer_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_importer_v1 { } static mut zxdg_importer_v1_requests_import_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_imported_v1 :: zxdg_imported_v1_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_importer_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"import\0" as * const u8 as * const c_char , signature : b"ns\0" as * const u8 as * const c_char , types : unsafe { & zxdg_importer_v1_requests_import_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_importer_v1_interface : wl_interface = wl_interface { name : b"zxdg_importer_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_importer_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_importer_v1_listener { } pub unsafe fn zxdg_importer_v1_set_user_data ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_importer_v1 as _ , user_data ) ; } pub unsafe fn zxdg_importer_v1_get_user_data ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_importer_v1 as _ ) ; } pub unsafe fn zxdg_importer_v1_get_version ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_importer_v1 as _ ) ; } pub unsafe fn zxdg_importer_v1_add_listener ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_importer_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_importer_v1_add_rust_listener ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 , listener : & dyn zxdg_importer_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_importer_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_importer_v1_add_listener ( zxdg_importer_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_importer object\n\nNotify the compositor that the xdg_importer object will no longer be\nused." ] pub unsafe fn zxdg_importer_v1_destroy ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_importer_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_importer_v1 as _ ) ; } # [ doc = "import a surface\n\nThe import request imports a surface from any client given a handle\nretrieved by exporting said surface using xdg_exporter.export. When\ncalled, a new xdg_imported object will be created. This new object\nrepresents the imported surface, and the importing client can\nmanipulate its relationship using it. See xdg_imported for details." ] pub unsafe fn zxdg_importer_v1_import ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 , handle : * const c_char ) -> * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_importer_v1 as _ , 1u32 , & super :: zxdg_imported_v1 :: zxdg_imported_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , handle ) ; return r as _ ; } } # [ doc = "an exported surface handle\n\nAn xdg_exported object represents an exported reference to a surface. The\nexported surface may be referenced as long as the xdg_exported object not\ndestroyed. Destroying the xdg_exported invalidates any relationship the\nimporter may have established using xdg_imported." ] pub mod zxdg_exported_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_exported_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_exported_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_exported_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"handle\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_exported_v1_interface : wl_interface = wl_interface { name : b"zxdg_exported_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zxdg_exported_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_exported_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_exported_v1_listener { # [ doc = "the exported surface handle\n\nThe handle event contains the unique handle of this exported surface\nreference. It may be shared with any client, which then can use it to\nimport the surface by calling xdg_importer.import. A handle may be\nused to import the surface multiple times." ] fn handle ( & mut self , object : * mut zxdg_exported_v1 , handle : * mut c_char ) { } } pub unsafe fn zxdg_exported_v1_set_user_data ( zxdg_exported_v1 : * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_exported_v1 as _ , user_data ) ; } pub unsafe fn zxdg_exported_v1_get_user_data ( zxdg_exported_v1 : * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_exported_v1 as _ ) ; } pub unsafe fn zxdg_exported_v1_get_version ( zxdg_exported_v1 : * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_exported_v1 as _ ) ; } pub unsafe fn zxdg_exported_v1_add_listener ( zxdg_exported_v1 : * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_exported_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_exported_v1_add_rust_listener ( zxdg_exported_v1 : * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 , listener : & dyn zxdg_exported_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_exported_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_exported_v1_add_listener ( zxdg_exported_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "unexport the exported surface\n\nRevoke the previously exported surface. This invalidates any\nrelationship the importer may have set up using the xdg_imported created\ngiven the handle sent via xdg_exported.handle." ] pub unsafe fn zxdg_exported_v1_destroy ( zxdg_exported_v1 : * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_exported_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_exported_v1 as _ ) ; } } # [ doc = "an imported surface handle\n\nAn xdg_imported object represents an imported reference to surface exported\nby some client. A client can use this interface to manipulate\nrelationships between its own surfaces and the imported surface." ] pub mod zxdg_imported_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_imported_v1 { } static mut zxdg_imported_v1_requests_set_parent_of_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_imported_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent_of\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zxdg_imported_v1_requests_set_parent_of_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_imported_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"destroyed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_imported_v1_interface : wl_interface = wl_interface { name : b"zxdg_imported_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_imported_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_imported_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_imported_v1_listener { # [ doc = "the imported surface handle has been destroyed\n\nThe imported surface handle has been destroyed and any relationship set\nup has been invalidated. This may happen for various reasons, for\nexample if the exported surface or the exported surface handle has been\ndestroyed, if the handle used for importing was invalid." ] fn destroyed ( & mut self , object : * mut zxdg_imported_v1 , ) { } } pub unsafe fn zxdg_imported_v1_set_user_data ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_imported_v1 as _ , user_data ) ; } pub unsafe fn zxdg_imported_v1_get_user_data ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_imported_v1 as _ ) ; } pub unsafe fn zxdg_imported_v1_get_version ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_imported_v1 as _ ) ; } pub unsafe fn zxdg_imported_v1_add_listener ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_imported_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_imported_v1_add_rust_listener ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 , listener : & dyn zxdg_imported_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_imported_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_imported_v1_add_listener ( zxdg_imported_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_imported object\n\nNotify the compositor that it will no longer use the xdg_imported\nobject. Any relationship that may have been set up will at this point\nbe invalidated." ] pub unsafe fn zxdg_imported_v1_destroy ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_imported_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_imported_v1 as _ ) ; } # [ doc = "set as the parent of some surface\n\nSet the imported surface as the parent of some surface of the client.\nThe passed surface must be a toplevel xdg_surface. Calling this function\nsets up a surface to surface relation with the same stacking and positioning\nsemantics as xdg_surface.set_parent." ] pub unsafe fn zxdg_imported_v1_set_parent_of ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_imported_v1 as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod fullscreen_shell_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "displays a single surface per output\n\nDisplays a single surface per output.\n\nThis interface provides a mechanism for a single client to display\nsimple full-screen surfaces. While there technically may be multiple\nclients bound to this interface, only one of those clients should be\nshown at a time.\n\nTo present a surface, the client uses either the present_surface or\npresent_surface_for_mode requests. Presenting a surface takes effect\non the next wl_surface.commit. See the individual requests for\ndetails about scaling and mode switches.\n\nThe client can have at most one surface per output at any time.\nRequesting a surface to be presented on an output that already has a\nsurface replaces the previously presented surface. Presenting a null\nsurface removes its content and effectively disables the output.\nExactly what happens when an output is \"disabled\" is\ncompositor-specific. The same surface may be presented on multiple\noutputs simultaneously.\n\nOnce a surface is presented on an output, it stays on that output\nuntil either the client removes it or the compositor destroys the\noutput. This way, the client can update the output's contents by\nsimply attaching a new buffer.\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_fullscreen_shell_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_fullscreen_shell_v1 { } # [ doc = "capabilities advertised by the compositor\n\nVarious capabilities that can be advertised by the compositor. They\nare advertised one-at-a-time when the wl_fullscreen_shell interface is\nbound. See the wl_fullscreen_shell.capability event for more details.\n\nARBITRARY_MODES:\nThis is a hint to the client that indicates that the compositor is\ncapable of setting practically any mode on its outputs. If this\ncapability is provided, wl_fullscreen_shell.present_surface_for_mode\nwill almost never fail and clients should feel free to set whatever\nmode they like. If the compositor does not advertise this, it may\nstill support some modes that are not advertised through wl_global.mode\nbut it is less likely.\n\nCURSOR_PLANE:\nThis is a hint to the client that indicates that the compositor can\nhandle a cursor surface from the client without actually compositing.\nThis may be because of a hardware cursor plane or some other mechanism.\nIf the compositor does not advertise this capability then setting\nwl_pointer.cursor may degrade performance or be ignored entirely. If\nCURSOR_PLANE is not advertised, it is recommended that the client draw\nits own cursor and set wl_pointer.cursor(NULL)." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum capability { # [ doc = "compositor is capable of almost any output mode" ] arbitrary_modes = 1 , # [ doc = "compositor has a separate cursor plane" ] cursor_plane = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { match n { 1 => Some ( capability :: arbitrary_modes ) , 2 => Some ( capability :: cursor_plane ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "different method to set the surface fullscreen\n\nHints to indicate to the compositor how to deal with a conflict\nbetween the dimensions of the surface and the dimensions of the\noutput. The compositor is free to ignore this parameter." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum present_method { # [ doc = "no preference, apply default policy" ] default = 0 , # [ doc = "center the surface on the output" ] center = 1 , # [ doc = "scale the surface, preserving aspect ratio, to the largest size that will fit on the output" ] zoom = 2 , # [ doc = "scale the surface, preserving aspect ratio, to fully fill the output cropping if needed" ] zoom_crop = 3 , # [ doc = "scale the surface to the size of the output ignoring aspect ratio" ] stretch = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl present_method { pub fn from_raw ( n : u32 ) -> Option < present_method > { match n { 0 => Some ( present_method :: default ) , 1 => Some ( present_method :: center ) , 2 => Some ( present_method :: zoom ) , 3 => Some ( present_method :: zoom_crop ) , 4 => Some ( present_method :: stretch ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "wl_fullscreen_shell error values\n\nThese errors can be emitted in response to wl_fullscreen_shell requests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "present_method is not known" ] invalid_method = 0 , # [ doc = "given wl_surface has another role" ] role = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_method ) , 1 => Some ( error :: role ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_fullscreen_shell_v1_requests_present_surface_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; static mut zwp_fullscreen_shell_v1_requests_present_surface_for_mode_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , NULLPTR as * const wl_interface , unsafe { & super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_fullscreen_shell_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"present_surface\0" as * const u8 as * const c_char , signature : b"?ou?o\0" as * const u8 as * const c_char , types : unsafe { & zwp_fullscreen_shell_v1_requests_present_surface_types as * const _ } , } , wl_message { name : b"present_surface_for_mode\0" as * const u8 as * const c_char , signature : b"ooin\0" as * const u8 as * const c_char , types : unsafe { & zwp_fullscreen_shell_v1_requests_present_surface_for_mode_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_fullscreen_shell_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"capability\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_fullscreen_shell_v1_interface : wl_interface = wl_interface { name : b"zwp_fullscreen_shell_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & zwp_fullscreen_shell_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zwp_fullscreen_shell_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_fullscreen_shell_v1_listener { # [ doc = "advertises a capability of the compositor\n\nAdvertises a single capability of the compositor.\n\nWhen the wl_fullscreen_shell interface is bound, this event is emitted\nonce for each capability advertised. Valid capabilities are given by\nthe wl_fullscreen_shell.capability enum. If clients want to take\nadvantage of any of these capabilities, they should use a\nwl_display.sync request immediately after binding to ensure that they\nreceive all the capability events." ] fn capability ( & mut self , object : * mut zwp_fullscreen_shell_v1 , capability : capability ) { } } pub unsafe fn zwp_fullscreen_shell_v1_set_user_data ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_fullscreen_shell_v1 as _ , user_data ) ; } pub unsafe fn zwp_fullscreen_shell_v1_get_user_data ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_fullscreen_shell_v1 as _ ) ; } pub unsafe fn zwp_fullscreen_shell_v1_get_version ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_fullscreen_shell_v1 as _ ) ; } pub unsafe fn zwp_fullscreen_shell_v1_add_listener ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_fullscreen_shell_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_fullscreen_shell_v1_add_rust_listener ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 , listener : & dyn zwp_fullscreen_shell_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_fullscreen_shell_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_fullscreen_shell_v1_add_listener ( zwp_fullscreen_shell_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_fullscreen_shell_v1_destroy ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_fullscreen_shell_v1 as _ ) ; } # [ doc = "release the wl_fullscreen_shell interface\n\nRelease the binding from the wl_fullscreen_shell interface.\n\nThis destroys the server-side object and frees this binding. If\nthe client binds to wl_fullscreen_shell multiple times, it may wish\nto free some of those bindings." ] pub unsafe fn zwp_fullscreen_shell_v1_release ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_fullscreen_shell_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_fullscreen_shell_v1 as _ ) ; } # [ doc = "present surface for display\n\nPresent a surface on the given output.\n\nIf the output is null, the compositor will present the surface on\nwhatever display (or displays) it thinks best. In particular, this\nmay replace any or all surfaces currently presented so it should\nnot be used in combination with placing surfaces on specific\noutputs.\n\nThe method parameter is a hint to the compositor for how the surface\nis to be presented. In particular, it tells the compositor how to\nhandle a size mismatch between the presented surface and the\noutput. The compositor is free to ignore this parameter.\n\nThe \"zoom\", \"zoom_crop\", and \"stretch\" methods imply a scaling\noperation on the surface. This will override any kind of output\nscaling, so the buffer_scale property of the surface is effectively\nignored.\n\nThis request gives the surface the role of a fullscreen shell surface.\nIf the surface already has another role, it raises a role protocol\nerror." ] pub unsafe fn zwp_fullscreen_shell_v1_present_surface ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 , surface : * mut super :: wl_surface :: wl_surface , method : u32 , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_fullscreen_shell_v1 as _ , 1u32 , surface , method , output , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "present surface for display at a particular mode\n\nPresents a surface on the given output for a particular mode.\n\nIf the current size of the output differs from that of the surface,\nthe compositor will attempt to change the size of the output to\nmatch the surface. The result of the mode-switch operation will be\nreturned via the provided wl_fullscreen_shell_mode_feedback object.\n\nIf the current output mode matches the one requested or if the\ncompositor successfully switches the mode to match the surface,\nthen the mode_successful event will be sent and the output will\ncontain the contents of the given surface. If the compositor\ncannot match the output size to the surface size, the mode_failed\nwill be sent and the output will contain the contents of the\npreviously presented surface (if any). If another surface is\npresented on the given output before either of these has a chance\nto happen, the present_cancelled event will be sent.\n\nDue to race conditions and other issues unknown to the client, no\nmode-switch operation is guaranteed to succeed. However, if the\nmode is one advertised by wl_output.mode or if the compositor\nadvertises the ARBITRARY_MODES capability, then the client should\nexpect that the mode-switch operation will usually succeed.\n\nIf the size of the presented surface changes, the resulting output\nis undefined. The compositor may attempt to change the output mode\nto compensate. However, there is no guarantee that a suitable mode\nwill be found and the client has no way to be notified of success\nor failure.\n\nThe framerate parameter specifies the desired framerate for the\noutput in mHz. The compositor is free to ignore this parameter. A\nvalue of 0 indicates that the client has no preference.\n\nIf the value of wl_output.scale differs from wl_surface.buffer_scale,\nthen the compositor may choose a mode that matches either the buffer\nsize or the surface size. In either case, the surface will fill the\noutput.\n\nThis request gives the surface the role of a fullscreen shell surface.\nIf the surface already has another role, it raises a role protocol\nerror." ] pub unsafe fn zwp_fullscreen_shell_v1_present_surface_for_mode ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 , surface : * mut super :: wl_surface :: wl_surface , output : * mut super :: wl_output :: wl_output , framerate : i32 ) -> * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_fullscreen_shell_v1 as _ , 2u32 , & super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1_interface as * const _ , surface , output , framerate , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } pub mod zwp_fullscreen_shell_mode_feedback_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_fullscreen_shell_mode_feedback_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_fullscreen_shell_mode_feedback_v1_events : [ wl_message ; 3 ] = [ wl_message { name : b"mode_successful\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"mode_failed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"present_cancelled\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_fullscreen_shell_mode_feedback_v1_interface : wl_interface = wl_interface { name : b"zwp_fullscreen_shell_mode_feedback_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 3 , events : unsafe { & zwp_fullscreen_shell_mode_feedback_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_fullscreen_shell_mode_feedback_v1_listener { # [ doc = "mode switch succeeded\n\nThis event indicates that the attempted mode switch operation was\nsuccessful. A surface of the size requested in the mode switch\nwill fill the output without scaling.\n\nUpon receiving this event, the client should destroy the\nwl_fullscreen_shell_mode_feedback object." ] fn mode_successful ( & mut self , object : * mut zwp_fullscreen_shell_mode_feedback_v1 , ) { } # [ doc = "mode switch failed\n\nThis event indicates that the attempted mode switch operation\nfailed. This may be because the requested output mode is not\npossible or it may mean that the compositor does not want to allow it.\n\nUpon receiving this event, the client should destroy the\nwl_fullscreen_shell_mode_feedback object." ] fn mode_failed ( & mut self , object : * mut zwp_fullscreen_shell_mode_feedback_v1 , ) { } # [ doc = "mode switch cancelled\n\nThis event indicates that the attempted mode switch operation was\ncancelled. Most likely this is because the client requested a\nsecond mode switch before the first one completed.\n\nUpon receiving this event, the client should destroy the\nwl_fullscreen_shell_mode_feedback object." ] fn present_cancelled ( & mut self , object : * mut zwp_fullscreen_shell_mode_feedback_v1 , ) { } } pub unsafe fn zwp_fullscreen_shell_mode_feedback_v1_set_user_data ( zwp_fullscreen_shell_mode_feedback_v1 : * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_fullscreen_shell_mode_feedback_v1 as _ , user_data ) ; } pub unsafe fn zwp_fullscreen_shell_mode_feedback_v1_get_user_data ( zwp_fullscreen_shell_mode_feedback_v1 : * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_fullscreen_shell_mode_feedback_v1 as _ ) ; } pub unsafe fn zwp_fullscreen_shell_mode_feedback_v1_get_version ( zwp_fullscreen_shell_mode_feedback_v1 : * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_fullscreen_shell_mode_feedback_v1 as _ ) ; } pub unsafe fn zwp_fullscreen_shell_mode_feedback_v1_add_listener ( zwp_fullscreen_shell_mode_feedback_v1 : * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_fullscreen_shell_mode_feedback_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_fullscreen_shell_mode_feedback_v1_add_rust_listener ( zwp_fullscreen_shell_mode_feedback_v1 : * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 , listener : & dyn zwp_fullscreen_shell_mode_feedback_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_fullscreen_shell_mode_feedback_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_fullscreen_shell_mode_feedback_v1_add_listener ( zwp_fullscreen_shell_mode_feedback_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_fullscreen_shell_mode_feedback_v1_destroy ( zwp_fullscreen_shell_mode_feedback_v1 : * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_fullscreen_shell_mode_feedback_v1 as _ ) ; } } } pub mod pointer_gestures_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "touchpad gestures\n\nA global interface to provide semantic touchpad gestures for a given\npointer.\n\nThree gestures are currently supported: swipe, pinch, and hold.\nPinch and swipe gestures follow a three-stage cycle: begin, update,\nend, hold gestures follow a two-stage cycle: begin and end. All\ngestures are identified by a unique id.\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_pointer_gestures_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_pointer_gestures_v1 { } static mut zwp_pointer_gestures_v1_requests_get_swipe_gesture_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , ] ; static mut zwp_pointer_gestures_v1_requests_get_pinch_gesture_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , ] ; static mut zwp_pointer_gestures_v1_requests_get_hold_gesture_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gestures_v1_requests : [ wl_message ; 4 ] = [ wl_message { name : b"get_swipe_gesture\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_gestures_v1_requests_get_swipe_gesture_types as * const _ } , } , wl_message { name : b"get_pinch_gesture\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_gestures_v1_requests_get_pinch_gesture_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_hold_gesture\0" as * const u8 as * const c_char , signature : b"3no\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_gestures_v1_requests_get_hold_gesture_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_pointer_gestures_v1_interface : wl_interface = wl_interface { name : b"zwp_pointer_gestures_v1\0" as * const u8 as * const c_char , version : 3 , request_count : 4 , requests : unsafe { & zwp_pointer_gestures_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_pointer_gestures_v1_listener { } pub unsafe fn zwp_pointer_gestures_v1_set_user_data ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_pointer_gestures_v1 as _ , user_data ) ; } pub unsafe fn zwp_pointer_gestures_v1_get_user_data ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_pointer_gestures_v1 as _ ) ; } pub unsafe fn zwp_pointer_gestures_v1_get_version ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_pointer_gestures_v1 as _ ) ; } pub unsafe fn zwp_pointer_gestures_v1_add_listener ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_pointer_gestures_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_pointer_gestures_v1_add_rust_listener ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 , listener : & dyn zwp_pointer_gestures_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_pointer_gestures_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_pointer_gestures_v1_add_listener ( zwp_pointer_gestures_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_pointer_gestures_v1_destroy ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_pointer_gestures_v1 as _ ) ; } # [ doc = "get swipe gesture\n\nCreate a swipe gesture object. See the\nwl_pointer_gesture_swipe interface for details." ] pub unsafe fn zwp_pointer_gestures_v1_get_swipe_gesture ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 , pointer : * mut super :: wl_pointer :: wl_pointer ) -> * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_pointer_gestures_v1 as _ , 0u32 , & super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , pointer ) ; return r as _ ; } # [ doc = "get pinch gesture\n\nCreate a pinch gesture object. See the\nwl_pointer_gesture_pinch interface for details." ] pub unsafe fn zwp_pointer_gestures_v1_get_pinch_gesture ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 , pointer : * mut super :: wl_pointer :: wl_pointer ) -> * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_pointer_gestures_v1 as _ , 1u32 , & super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , pointer ) ; return r as _ ; } # [ doc = "destroy the pointer gesture object\n\nDestroy the pointer gesture object. Swipe, pinch and hold objects\ncreated via this gesture object remain valid." ] pub unsafe fn zwp_pointer_gestures_v1_release ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_pointer_gestures_v1 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_pointer_gestures_v1 as _ ) ; } # [ doc = "get hold gesture\n\nCreate a hold gesture object. See the\nwl_pointer_gesture_hold interface for details." ] pub unsafe fn zwp_pointer_gestures_v1_get_hold_gesture ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 , pointer : * mut super :: wl_pointer :: wl_pointer ) -> * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_pointer_gestures_v1 as _ , 3u32 , & super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , pointer ) ; return r as _ ; } } # [ doc = "a swipe gesture object\n\nA swipe gesture object notifies a client about a multi-finger swipe\ngesture detected on an indirect input device such as a touchpad.\nThe gesture is usually initiated by multiple fingers moving in the\nsame direction but once initiated the direction may change.\nThe precise conditions of when such a gesture is detected are\nimplementation-dependent.\n\nA gesture consists of three stages: begin, update (optional) and end.\nThere cannot be multiple simultaneous hold, pinch or swipe gestures on a\nsame pointer/seat, how compositors prevent these situations is\nimplementation-dependent.\n\nA gesture may be cancelled by the compositor or the hardware.\nClients should not consider performing permanent or irreversible\nactions until the end of a gesture has been received." ] pub mod zwp_pointer_gesture_swipe_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_pointer_gesture_swipe_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gesture_swipe_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_pointer_gesture_swipe_v1_events_begin_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gesture_swipe_v1_events : [ wl_message ; 3 ] = [ wl_message { name : b"begin\0" as * const u8 as * const c_char , signature : b"uuou\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_gesture_swipe_v1_events_begin_types as * const _ } , } , wl_message { name : b"update\0" as * const u8 as * const c_char , signature : b"uff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"end\0" as * const u8 as * const c_char , signature : b"uui\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_pointer_gesture_swipe_v1_interface : wl_interface = wl_interface { name : b"zwp_pointer_gesture_swipe_v1\0" as * const u8 as * const c_char , version : 2 , request_count : 1 , requests : unsafe { & zwp_pointer_gesture_swipe_v1_requests as * const _ } , event_count : 3 , events : unsafe { & zwp_pointer_gesture_swipe_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_pointer_gesture_swipe_v1_listener { # [ doc = "multi-finger swipe begin\n\nThis event is sent when a multi-finger swipe gesture is detected\non the device." ] fn begin ( & mut self , object : * mut zwp_pointer_gesture_swipe_v1 , serial : u32 , time : u32 , surface : * mut super :: wl_surface :: wl_surface , fingers : u32 ) { } # [ doc = "multi-finger swipe motion\n\nThis event is sent when a multi-finger swipe gesture changes the\nposition of the logical center.\n\nThe dx and dy coordinates are relative coordinates of the logical\ncenter of the gesture compared to the previous event." ] fn update ( & mut self , object : * mut zwp_pointer_gesture_swipe_v1 , time : u32 , dx : wl_fixed_t , dy : wl_fixed_t ) { } # [ doc = "multi-finger swipe end\n\nThis event is sent when a multi-finger swipe gesture ceases to\nbe valid. This may happen when one or more fingers are lifted or\nthe gesture is cancelled.\n\nWhen a gesture is cancelled, the client should undo state changes\ncaused by this gesture. What causes a gesture to be cancelled is\nimplementation-dependent." ] fn end ( & mut self , object : * mut zwp_pointer_gesture_swipe_v1 , serial : u32 , time : u32 , cancelled : i32 ) { } } pub unsafe fn zwp_pointer_gesture_swipe_v1_set_user_data ( zwp_pointer_gesture_swipe_v1 : * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_pointer_gesture_swipe_v1 as _ , user_data ) ; } pub unsafe fn zwp_pointer_gesture_swipe_v1_get_user_data ( zwp_pointer_gesture_swipe_v1 : * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_pointer_gesture_swipe_v1 as _ ) ; } pub unsafe fn zwp_pointer_gesture_swipe_v1_get_version ( zwp_pointer_gesture_swipe_v1 : * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_pointer_gesture_swipe_v1 as _ ) ; } pub unsafe fn zwp_pointer_gesture_swipe_v1_add_listener ( zwp_pointer_gesture_swipe_v1 : * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_pointer_gesture_swipe_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_pointer_gesture_swipe_v1_add_rust_listener ( zwp_pointer_gesture_swipe_v1 : * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 , listener : & dyn zwp_pointer_gesture_swipe_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_pointer_gesture_swipe_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_pointer_gesture_swipe_v1_add_listener ( zwp_pointer_gesture_swipe_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the pointer swipe gesture object" ] pub unsafe fn zwp_pointer_gesture_swipe_v1_destroy ( zwp_pointer_gesture_swipe_v1 : * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_pointer_gesture_swipe_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_pointer_gesture_swipe_v1 as _ ) ; } } # [ doc = "a pinch gesture object\n\nA pinch gesture object notifies a client about a multi-finger pinch\ngesture detected on an indirect input device such as a touchpad.\nThe gesture is usually initiated by multiple fingers moving towards\neach other or away from each other, or by two or more fingers rotating\naround a logical center of gravity. The precise conditions of when\nsuch a gesture is detected are implementation-dependent.\n\nA gesture consists of three stages: begin, update (optional) and end.\nThere cannot be multiple simultaneous hold, pinch or swipe gestures on a\nsame pointer/seat, how compositors prevent these situations is\nimplementation-dependent.\n\nA gesture may be cancelled by the compositor or the hardware.\nClients should not consider performing permanent or irreversible\nactions until the end of a gesture has been received." ] pub mod zwp_pointer_gesture_pinch_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_pointer_gesture_pinch_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gesture_pinch_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_pointer_gesture_pinch_v1_events_begin_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gesture_pinch_v1_events : [ wl_message ; 3 ] = [ wl_message { name : b"begin\0" as * const u8 as * const c_char , signature : b"uuou\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_gesture_pinch_v1_events_begin_types as * const _ } , } , wl_message { name : b"update\0" as * const u8 as * const c_char , signature : b"uffff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"end\0" as * const u8 as * const c_char , signature : b"uui\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_pointer_gesture_pinch_v1_interface : wl_interface = wl_interface { name : b"zwp_pointer_gesture_pinch_v1\0" as * const u8 as * const c_char , version : 2 , request_count : 1 , requests : unsafe { & zwp_pointer_gesture_pinch_v1_requests as * const _ } , event_count : 3 , events : unsafe { & zwp_pointer_gesture_pinch_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_pointer_gesture_pinch_v1_listener { # [ doc = "multi-finger pinch begin\n\nThis event is sent when a multi-finger pinch gesture is detected\non the device." ] fn begin ( & mut self , object : * mut zwp_pointer_gesture_pinch_v1 , serial : u32 , time : u32 , surface : * mut super :: wl_surface :: wl_surface , fingers : u32 ) { } # [ doc = "multi-finger pinch motion\n\nThis event is sent when a multi-finger pinch gesture changes the\nposition of the logical center, the rotation or the relative scale.\n\nThe dx and dy coordinates are relative coordinates in the\nsurface coordinate space of the logical center of the gesture.\n\nThe scale factor is an absolute scale compared to the\npointer_gesture_pinch.begin event, e.g. a scale of 2 means the fingers\nare now twice as far apart as on pointer_gesture_pinch.begin.\n\nThe rotation is the relative angle in degrees clockwise compared to the previous\npointer_gesture_pinch.begin or pointer_gesture_pinch.update event." ] fn update ( & mut self , object : * mut zwp_pointer_gesture_pinch_v1 , time : u32 , dx : wl_fixed_t , dy : wl_fixed_t , scale : wl_fixed_t , rotation : wl_fixed_t ) { } # [ doc = "multi-finger pinch end\n\nThis event is sent when a multi-finger pinch gesture ceases to\nbe valid. This may happen when one or more fingers are lifted or\nthe gesture is cancelled.\n\nWhen a gesture is cancelled, the client should undo state changes\ncaused by this gesture. What causes a gesture to be cancelled is\nimplementation-dependent." ] fn end ( & mut self , object : * mut zwp_pointer_gesture_pinch_v1 , serial : u32 , time : u32 , cancelled : i32 ) { } } pub unsafe fn zwp_pointer_gesture_pinch_v1_set_user_data ( zwp_pointer_gesture_pinch_v1 : * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_pointer_gesture_pinch_v1 as _ , user_data ) ; } pub unsafe fn zwp_pointer_gesture_pinch_v1_get_user_data ( zwp_pointer_gesture_pinch_v1 : * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_pointer_gesture_pinch_v1 as _ ) ; } pub unsafe fn zwp_pointer_gesture_pinch_v1_get_version ( zwp_pointer_gesture_pinch_v1 : * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_pointer_gesture_pinch_v1 as _ ) ; } pub unsafe fn zwp_pointer_gesture_pinch_v1_add_listener ( zwp_pointer_gesture_pinch_v1 : * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_pointer_gesture_pinch_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_pointer_gesture_pinch_v1_add_rust_listener ( zwp_pointer_gesture_pinch_v1 : * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 , listener : & dyn zwp_pointer_gesture_pinch_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_pointer_gesture_pinch_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_pointer_gesture_pinch_v1_add_listener ( zwp_pointer_gesture_pinch_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the pinch gesture object" ] pub unsafe fn zwp_pointer_gesture_pinch_v1_destroy ( zwp_pointer_gesture_pinch_v1 : * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_pointer_gesture_pinch_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_pointer_gesture_pinch_v1 as _ ) ; } } # [ doc = "a hold gesture object\n\nA hold gesture object notifies a client about a single- or\nmulti-finger hold gesture detected on an indirect input device such as\na touchpad. The gesture is usually initiated by one or more fingers\nbeing held down without significant movement. The precise conditions\nof when such a gesture is detected are implementation-dependent.\n\nIn particular, this gesture may be used to cancel kinetic scrolling.\n\nA hold gesture consists of two stages: begin and end. Unlike pinch and\nswipe there is no update stage.\nThere cannot be multiple simultaneous hold, pinch or swipe gestures on a\nsame pointer/seat, how compositors prevent these situations is\nimplementation-dependent.\n\nA gesture may be cancelled by the compositor or the hardware.\nClients should not consider performing permanent or irreversible\nactions until the end of a gesture has been received." ] pub mod zwp_pointer_gesture_hold_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_pointer_gesture_hold_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gesture_hold_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_pointer_gesture_hold_v1_events_begin_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gesture_hold_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"begin\0" as * const u8 as * const c_char , signature : b"3uuou\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_gesture_hold_v1_events_begin_types as * const _ } , } , wl_message { name : b"end\0" as * const u8 as * const c_char , signature : b"3uui\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_pointer_gesture_hold_v1_interface : wl_interface = wl_interface { name : b"zwp_pointer_gesture_hold_v1\0" as * const u8 as * const c_char , version : 3 , request_count : 1 , requests : unsafe { & zwp_pointer_gesture_hold_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_pointer_gesture_hold_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_pointer_gesture_hold_v1_listener { # [ doc = "multi-finger hold begin\n\nThis event is sent when a hold gesture is detected on the device.\n\nOnly available since version 3 of the interface." ] fn begin ( & mut self , object : * mut zwp_pointer_gesture_hold_v1 , serial : u32 , time : u32 , surface : * mut super :: wl_surface :: wl_surface , fingers : u32 ) { } # [ doc = "multi-finger hold end\n\nThis event is sent when a hold gesture ceases to\nbe valid. This may happen when the holding fingers are lifted or\nthe gesture is cancelled, for example if the fingers move past an\nimplementation-defined threshold, the finger count changes or the hold\ngesture changes into a different type of gesture.\n\nWhen a gesture is cancelled, the client may need to undo state changes\ncaused by this gesture. What causes a gesture to be cancelled is\nimplementation-dependent.\n\nOnly available since version 3 of the interface." ] fn end ( & mut self , object : * mut zwp_pointer_gesture_hold_v1 , serial : u32 , time : u32 , cancelled : i32 ) { } } pub unsafe fn zwp_pointer_gesture_hold_v1_set_user_data ( zwp_pointer_gesture_hold_v1 : * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_pointer_gesture_hold_v1 as _ , user_data ) ; } pub unsafe fn zwp_pointer_gesture_hold_v1_get_user_data ( zwp_pointer_gesture_hold_v1 : * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_pointer_gesture_hold_v1 as _ ) ; } pub unsafe fn zwp_pointer_gesture_hold_v1_get_version ( zwp_pointer_gesture_hold_v1 : * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_pointer_gesture_hold_v1 as _ ) ; } pub unsafe fn zwp_pointer_gesture_hold_v1_add_listener ( zwp_pointer_gesture_hold_v1 : * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_pointer_gesture_hold_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_pointer_gesture_hold_v1_add_rust_listener ( zwp_pointer_gesture_hold_v1 : * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 , listener : & dyn zwp_pointer_gesture_hold_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_pointer_gesture_hold_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_pointer_gesture_hold_v1_add_listener ( zwp_pointer_gesture_hold_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the hold gesture object" ] pub unsafe fn zwp_pointer_gesture_hold_v1_destroy ( zwp_pointer_gesture_hold_v1 : * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_pointer_gesture_hold_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_pointer_gesture_hold_v1 as _ ) ; } } } pub mod surface_extension { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod qt_surface_extension { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum qt_surface_extension { } static mut qt_surface_extension_requests_get_extended_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: qt_extended_surface :: qt_extended_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut qt_surface_extension_requests : [ wl_message ; 1 ] = [ wl_message { name : b"get_extended_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & qt_surface_extension_requests_get_extended_surface_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut qt_surface_extension_interface : wl_interface = wl_interface { name : b"qt_surface_extension\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & qt_surface_extension_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait qt_surface_extension_listener { } pub unsafe fn qt_surface_extension_set_user_data ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , qt_surface_extension as _ , user_data ) ; } pub unsafe fn qt_surface_extension_get_user_data ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , qt_surface_extension as _ ) ; } pub unsafe fn qt_surface_extension_get_version ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , qt_surface_extension as _ ) ; } pub unsafe fn qt_surface_extension_add_listener ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , qt_surface_extension as _ , listener as _ , data as _ ) ; } pub unsafe fn qt_surface_extension_add_rust_listener ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension , listener : & dyn qt_surface_extension_listener ) -> bool { let to = ( listener as * const dyn qt_surface_extension_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return qt_surface_extension_add_listener ( qt_surface_extension as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn qt_surface_extension_destroy ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , qt_surface_extension as _ ) ; } pub unsafe fn qt_surface_extension_get_extended_surface ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: qt_extended_surface :: qt_extended_surface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , qt_surface_extension as _ , 0u32 , & super :: qt_extended_surface :: qt_extended_surface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } pub mod qt_extended_surface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum qt_extended_surface { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum orientation { PrimaryOrientation = 0 , PortraitOrientation = 1 , LandscapeOrientation = 2 , InvertedPortraitOrientation = 4 , InvertedLandscapeOrientation = 8 , # [ doc ( hidden ) ] __nonexhaustive , } impl orientation { pub fn from_raw ( n : u32 ) -> Option < orientation > { match n { 0 => Some ( orientation :: PrimaryOrientation ) , 1 => Some ( orientation :: PortraitOrientation ) , 2 => Some ( orientation :: LandscapeOrientation ) , 4 => Some ( orientation :: InvertedPortraitOrientation ) , 8 => Some ( orientation :: InvertedLandscapeOrientation ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum windowflag { OverridesSystemGestures = 1 , StaysOnTop = 2 , BypassWindowManager = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl windowflag { pub fn from_raw ( n : u32 ) -> Option < windowflag > { match n { 1 => Some ( windowflag :: OverridesSystemGestures ) , 2 => Some ( windowflag :: StaysOnTop ) , 4 => Some ( windowflag :: BypassWindowManager ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut qt_extended_surface_requests : [ wl_message ; 5 ] = [ wl_message { name : b"update_generic_property\0" as * const u8 as * const c_char , signature : b"sa\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_content_orientation_mask\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_window_flags\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"raise\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"lower\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut qt_extended_surface_events : [ wl_message ; 3 ] = [ wl_message { name : b"onscreen_visibility\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_generic_property\0" as * const u8 as * const c_char , signature : b"sa\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"close\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut qt_extended_surface_interface : wl_interface = wl_interface { name : b"qt_extended_surface\0" as * const u8 as * const c_char , version : 1 , request_count : 5 , requests : unsafe { & qt_extended_surface_requests as * const _ } , event_count : 3 , events : unsafe { & qt_extended_surface_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait qt_extended_surface_listener { # [ doc = "" ] fn onscreen_visibility ( & mut self , object : * mut qt_extended_surface , visible : i32 ) { } # [ doc = "" ] fn set_generic_property ( & mut self , object : * mut qt_extended_surface , name : * mut c_char , value : * mut wl_array ) { } # [ doc = "" ] fn close ( & mut self , object : * mut qt_extended_surface , ) { } } pub unsafe fn qt_extended_surface_set_user_data ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , qt_extended_surface as _ , user_data ) ; } pub unsafe fn qt_extended_surface_get_user_data ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , qt_extended_surface as _ ) ; } pub unsafe fn qt_extended_surface_get_version ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , qt_extended_surface as _ ) ; } pub unsafe fn qt_extended_surface_add_listener ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , qt_extended_surface as _ , listener as _ , data as _ ) ; } pub unsafe fn qt_extended_surface_add_rust_listener ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface , listener : & dyn qt_extended_surface_listener ) -> bool { let to = ( listener as * const dyn qt_extended_surface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return qt_extended_surface_add_listener ( qt_extended_surface as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn qt_extended_surface_destroy ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , qt_extended_surface as _ ) ; } pub unsafe fn qt_extended_surface_update_generic_property ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface , name : * const c_char , value : * mut wl_array ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , qt_extended_surface as _ , 0u32 , name , value , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn qt_extended_surface_set_content_orientation_mask ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface , orientation : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , qt_extended_surface as _ , 1u32 , orientation , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn qt_extended_surface_set_window_flags ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface , flags : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , qt_extended_surface as _ , 2u32 , flags , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn qt_extended_surface_raise ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , qt_extended_surface as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn qt_extended_surface_lower ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , qt_extended_surface as _ , 4u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod blur { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod org_kde_kwin_blur_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_blur_manager { } static mut org_kde_kwin_blur_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_blur :: org_kde_kwin_blur_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut org_kde_kwin_blur_manager_requests_unset_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_blur_manager_requests : [ wl_message ; 2 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_blur_manager_requests_create_types as * const _ } , } , wl_message { name : b"unset\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_blur_manager_requests_unset_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_blur_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_blur_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_blur_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_blur_manager_listener { } pub unsafe fn org_kde_kwin_blur_manager_set_user_data ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_blur_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_blur_manager_get_user_data ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_blur_manager as _ ) ; } pub unsafe fn org_kde_kwin_blur_manager_get_version ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_blur_manager as _ ) ; } pub unsafe fn org_kde_kwin_blur_manager_add_listener ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_blur_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_blur_manager_add_rust_listener ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager , listener : & dyn org_kde_kwin_blur_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_blur_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_blur_manager_add_listener ( org_kde_kwin_blur_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_blur_manager_destroy ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_blur_manager as _ ) ; } pub unsafe fn org_kde_kwin_blur_manager_create ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_blur_manager as _ , 0u32 , & super :: org_kde_kwin_blur :: org_kde_kwin_blur_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } pub unsafe fn org_kde_kwin_blur_manager_unset ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_blur_manager as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } } pub mod org_kde_kwin_blur { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_blur { } static mut org_kde_kwin_blur_requests_set_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_blur_requests : [ wl_message ; 3 ] = [ wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_region\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_blur_requests_set_region_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_blur_interface : wl_interface = wl_interface { name : b"org_kde_kwin_blur\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & org_kde_kwin_blur_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_blur_listener { } pub unsafe fn org_kde_kwin_blur_set_user_data ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_blur as _ , user_data ) ; } pub unsafe fn org_kde_kwin_blur_get_user_data ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_blur as _ ) ; } pub unsafe fn org_kde_kwin_blur_get_version ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_blur as _ ) ; } pub unsafe fn org_kde_kwin_blur_add_listener ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_blur as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_blur_add_rust_listener ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur , listener : & dyn org_kde_kwin_blur_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_blur_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_blur_add_listener ( org_kde_kwin_blur as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_blur_destroy ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_blur as _ ) ; } pub unsafe fn org_kde_kwin_blur_commit ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_blur as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_blur_set_region ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur , region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_blur as _ , 1u32 , region , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the blur object" ] pub unsafe fn org_kde_kwin_blur_release ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_blur as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_blur as _ ) ; } } } pub mod contrast { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod org_kde_kwin_contrast_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_contrast_manager { } static mut org_kde_kwin_contrast_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_contrast :: org_kde_kwin_contrast_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut org_kde_kwin_contrast_manager_requests_unset_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_contrast_manager_requests : [ wl_message ; 2 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_contrast_manager_requests_create_types as * const _ } , } , wl_message { name : b"unset\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_contrast_manager_requests_unset_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_contrast_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_contrast_manager\0" as * const u8 as * const c_char , version : 2 , request_count : 2 , requests : unsafe { & org_kde_kwin_contrast_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_contrast_manager_listener { } pub unsafe fn org_kde_kwin_contrast_manager_set_user_data ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_contrast_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_contrast_manager_get_user_data ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_contrast_manager as _ ) ; } pub unsafe fn org_kde_kwin_contrast_manager_get_version ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_contrast_manager as _ ) ; } pub unsafe fn org_kde_kwin_contrast_manager_add_listener ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_contrast_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_contrast_manager_add_rust_listener ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager , listener : & dyn org_kde_kwin_contrast_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_contrast_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_contrast_manager_add_listener ( org_kde_kwin_contrast_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_contrast_manager_destroy ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_contrast_manager as _ ) ; } pub unsafe fn org_kde_kwin_contrast_manager_create ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_contrast_manager as _ , 0u32 , & super :: org_kde_kwin_contrast :: org_kde_kwin_contrast_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } pub unsafe fn org_kde_kwin_contrast_manager_unset ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast_manager as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } } pub mod org_kde_kwin_contrast { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_contrast { } static mut org_kde_kwin_contrast_requests_set_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_contrast_requests : [ wl_message ; 8 ] = [ wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_region\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_contrast_requests_set_region_types as * const _ } , } , wl_message { name : b"set_contrast\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_intensity\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_saturation\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_frost\0" as * const u8 as * const c_char , signature : b"2iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unset_frost\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_contrast_interface : wl_interface = wl_interface { name : b"org_kde_kwin_contrast\0" as * const u8 as * const c_char , version : 2 , request_count : 8 , requests : unsafe { & org_kde_kwin_contrast_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_contrast_listener { } pub unsafe fn org_kde_kwin_contrast_set_user_data ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_contrast as _ , user_data ) ; } pub unsafe fn org_kde_kwin_contrast_get_user_data ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_contrast as _ ) ; } pub unsafe fn org_kde_kwin_contrast_get_version ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_contrast as _ ) ; } pub unsafe fn org_kde_kwin_contrast_add_listener ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_contrast as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_contrast_add_rust_listener ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , listener : & dyn org_kde_kwin_contrast_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_contrast_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_contrast_add_listener ( org_kde_kwin_contrast as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_contrast_destroy ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_contrast as _ ) ; } pub unsafe fn org_kde_kwin_contrast_commit ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_contrast_set_region ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 1u32 , region , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_contrast_set_contrast ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , contrast : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 2u32 , contrast , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_contrast_set_intensity ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , intensity : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 3u32 , intensity , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_contrast_set_saturation ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , saturation : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 4u32 , saturation , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the contrast object" ] pub unsafe fn org_kde_kwin_contrast_release ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 5u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_contrast as _ ) ; } # [ doc = "opt into frost effect w/ given colour\n\nenables 'frost' variant of contrast effect.\n\n'frost' is an enhanced version of the contrast effect that\nuses different colour arithmetic to get backgrounds simultaneously\nhigher in contrast and (apparent) transparency.\n\nr, g, b, a are channels from 0-255, indicating a colour to use in contrast calculation.\nshould be based off of the \"main\" background colour of the surface." ] pub unsafe fn org_kde_kwin_contrast_set_frost ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , red : i32 , green : i32 , blue : i32 , alpha : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 6u32 , red , green , blue , alpha , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "opts out of frost effect" ] pub unsafe fn org_kde_kwin_contrast_unset_frost ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 7u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod server_decoration_palette { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "server side decoration palette manager interface\n\nThis interface allows a client to alter the palette of a server side decoration." ] pub mod org_kde_kwin_server_decoration_palette_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_server_decoration_palette_manager { } static mut org_kde_kwin_server_decoration_palette_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_palette_manager_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_server_decoration_palette_manager_requests_create_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_palette_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_server_decoration_palette_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_kwin_server_decoration_palette_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_server_decoration_palette_manager_listener { } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_set_user_data ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_server_decoration_palette_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_get_user_data ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_server_decoration_palette_manager as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_get_version ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_server_decoration_palette_manager as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_add_listener ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_server_decoration_palette_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_add_rust_listener ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager , listener : & dyn org_kde_kwin_server_decoration_palette_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_server_decoration_palette_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_server_decoration_palette_manager_add_listener ( org_kde_kwin_server_decoration_palette_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_destroy ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_server_decoration_palette_manager as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_create ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_server_decoration_palette_manager as _ , 0u32 , & super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "server side decoration palette interface\n\nThis interface allows a client to alter the palette of a server side decoration." ] pub mod org_kde_kwin_server_decoration_palette { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_server_decoration_palette { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_palette_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_palette\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_palette_interface : wl_interface = wl_interface { name : b"org_kde_kwin_server_decoration_palette\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_server_decoration_palette_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_server_decoration_palette_listener { } pub unsafe fn org_kde_kwin_server_decoration_palette_set_user_data ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_server_decoration_palette as _ , user_data ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_get_user_data ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_server_decoration_palette as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_get_version ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_server_decoration_palette as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_add_listener ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_server_decoration_palette as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_add_rust_listener ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette , listener : & dyn org_kde_kwin_server_decoration_palette_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_server_decoration_palette_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_server_decoration_palette_add_listener ( org_kde_kwin_server_decoration_palette as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_server_decoration_palette_destroy ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_server_decoration_palette as _ ) ; } # [ doc = "Set a on the server side window decoration\n\nColor scheme that should be applied to the window decoration.\nAbsolute file path, or name of palette in the user's config directory.\nThe server may choose not to follow the requested style." ] pub unsafe fn org_kde_kwin_server_decoration_palette_set_palette ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette , palette : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_server_decoration_palette as _ , 0u32 , palette , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the palette object" ] pub unsafe fn org_kde_kwin_server_decoration_palette_release ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_server_decoration_palette as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_server_decoration_palette as _ ) ; } } } pub mod dpms { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Output dpms manager\n\nThe Dpms manager allows to get a org_kde_kwin_dpms for a given wl_output.\nThe org_kde_kwin_dpms provides the currently used VESA Display Power Management\nSignaling state (see https://en.wikipedia.org/wiki/VESA_Display_Power_Management_Signaling ).\nIn addition it allows to request a state change. A compositor is not obliged to honor it\nand will normally automatically switch back to on state." ] pub mod org_kde_kwin_dpms_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_dpms_manager { } static mut org_kde_kwin_dpms_manager_requests_get_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_dpms :: org_kde_kwin_dpms_interface as * const wl_interface } , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_dpms_manager_requests : [ wl_message ; 1 ] = [ wl_message { name : b"get\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_dpms_manager_requests_get_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_dpms_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_dpms_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_kwin_dpms_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_dpms_manager_listener { } pub unsafe fn org_kde_kwin_dpms_manager_set_user_data ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_dpms_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_dpms_manager_get_user_data ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_dpms_manager as _ ) ; } pub unsafe fn org_kde_kwin_dpms_manager_get_version ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_dpms_manager as _ ) ; } pub unsafe fn org_kde_kwin_dpms_manager_add_listener ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_dpms_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_dpms_manager_add_rust_listener ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager , listener : & dyn org_kde_kwin_dpms_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_dpms_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_dpms_manager_add_listener ( org_kde_kwin_dpms_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_dpms_manager_destroy ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_dpms_manager as _ ) ; } # [ doc = "Get org_kde_kwin_dpms for wl_output\n\nFactory request to get the org_kde_kwin_dpms for a given wl_output." ] pub unsafe fn org_kde_kwin_dpms_manager_get ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager , output : * mut super :: wl_output :: wl_output ) -> * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_dpms_manager as _ , 0u32 , & super :: org_kde_kwin_dpms :: org_kde_kwin_dpms_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , output ) ; return r as _ ; } } # [ doc = "Dpms for a wl_output\n\nThis interface provides information about the VESA DPMS state for a wl_output.\nIt gets created through the request get on the org_kde_kwin_dpms_manager interface.\n\nOn creating the resource the server will push whether DPSM is supported for the output,\nthe currently used DPMS state and notifies the client through the done event once all\nstates are pushed. Whenever a state changes the set of changes is committed with the\ndone event." ] pub mod org_kde_kwin_dpms { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_dpms { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum mode { On = 0 , Standby = 1 , Suspend = 2 , Off = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl mode { pub fn from_raw ( n : u32 ) -> Option < mode > { match n { 0 => Some ( mode :: On ) , 1 => Some ( mode :: Standby ) , 2 => Some ( mode :: Suspend ) , 3 => Some ( mode :: Off ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_dpms_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_dpms_events : [ wl_message ; 3 ] = [ wl_message { name : b"supported\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_dpms_interface : wl_interface = wl_interface { name : b"org_kde_kwin_dpms\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_dpms_requests as * const _ } , event_count : 3 , events : unsafe { & org_kde_kwin_dpms_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_dpms_listener { # [ doc = "Event indicating whether DPMS is supported on the wl_output\n\nThis event gets pushed on binding the resource and indicates whether the wl_output\nsupports DPMS. There are operation modes of a Wayland server where DPMS might not\nmake sense (e.g. nested compositors)." ] fn supported ( & mut self , object : * mut org_kde_kwin_dpms , supported : u32 ) { } # [ doc = "Event indicating used DPMS mode\n\nThis mode gets pushed on binding the resource and provides the currently used\nDPMS mode. It also gets pushed if DPMS is not supported for the wl_output, in that\ncase the value will be On.\n\nThe event is also pushed whenever the state changes." ] fn mode ( & mut self , object : * mut org_kde_kwin_dpms , mode : u32 ) { } # [ doc = "All changes are pushed\n\nThis event gets pushed on binding the resource once all other states are pushed.\n\nIn addition it gets pushed whenever a state changes to tell the client that all\nstate changes have been pushed." ] fn done ( & mut self , object : * mut org_kde_kwin_dpms , ) { } } pub unsafe fn org_kde_kwin_dpms_set_user_data ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_dpms as _ , user_data ) ; } pub unsafe fn org_kde_kwin_dpms_get_user_data ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_dpms as _ ) ; } pub unsafe fn org_kde_kwin_dpms_get_version ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_dpms as _ ) ; } pub unsafe fn org_kde_kwin_dpms_add_listener ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_dpms as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_dpms_add_rust_listener ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms , listener : & dyn org_kde_kwin_dpms_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_dpms_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_dpms_add_listener ( org_kde_kwin_dpms as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_dpms_destroy ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_dpms as _ ) ; } # [ doc = "Request DPMS state change for the wl_output\n\nRequests that the compositor puts the wl_output into the passed mode. The compositor\nis not obliged to change the state. In addition the compositor might leave the mode\nwhenever it seems suitable. E.g. the compositor might return to On state on user input.\n\nThe client should not assume that the mode changed after requesting a new mode.\nInstead the client should listen for the mode event." ] pub unsafe fn org_kde_kwin_dpms_set ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms , mode : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_dpms as _ , 0u32 , mode , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the dpms object" ] pub unsafe fn org_kde_kwin_dpms_release ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_dpms as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_dpms as _ ) ; } } } pub mod zwp_linux_explicit_synchronization_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "protocol for providing explicit synchronization\n\nThis global is a factory interface, allowing clients to request\nexplicit synchronization for buffers on a per-surface basis.\n\nSee zwp_linux_surface_synchronization_v1 for more information.\n\nThis interface is derived from Chromium's\nzcr_linux_explicit_synchronization_v1.\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_linux_explicit_synchronization_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_linux_explicit_synchronization_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "the surface already has a synchronization object associated" ] synchronization_exists = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: synchronization_exists ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_linux_explicit_synchronization_v1_requests_get_synchronization_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_explicit_synchronization_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_synchronization\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_linux_explicit_synchronization_v1_requests_get_synchronization_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_linux_explicit_synchronization_v1_interface : wl_interface = wl_interface { name : b"zwp_linux_explicit_synchronization_v1\0" as * const u8 as * const c_char , version : 2 , request_count : 2 , requests : unsafe { & zwp_linux_explicit_synchronization_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_linux_explicit_synchronization_v1_listener { } pub unsafe fn zwp_linux_explicit_synchronization_v1_set_user_data ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_linux_explicit_synchronization_v1 as _ , user_data ) ; } pub unsafe fn zwp_linux_explicit_synchronization_v1_get_user_data ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_linux_explicit_synchronization_v1 as _ ) ; } pub unsafe fn zwp_linux_explicit_synchronization_v1_get_version ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_linux_explicit_synchronization_v1 as _ ) ; } pub unsafe fn zwp_linux_explicit_synchronization_v1_add_listener ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_linux_explicit_synchronization_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_linux_explicit_synchronization_v1_add_rust_listener ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 , listener : & dyn zwp_linux_explicit_synchronization_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_linux_explicit_synchronization_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_linux_explicit_synchronization_v1_add_listener ( zwp_linux_explicit_synchronization_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy explicit synchronization factory object\n\nDestroy this explicit synchronization factory object. Other objects,\nincluding zwp_linux_surface_synchronization_v1 objects created by this\nfactory, shall not be affected by this request." ] pub unsafe fn zwp_linux_explicit_synchronization_v1_destroy ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_explicit_synchronization_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_linux_explicit_synchronization_v1 as _ ) ; } # [ doc = "extend surface interface for explicit synchronization\n\nInstantiate an interface extension for the given wl_surface to provide\nexplicit synchronization.\n\nIf the given wl_surface already has an explicit synchronization object\nassociated, the synchronization_exists protocol error is raised.\n\nGraphics APIs, like EGL or Vulkan, that manage the buffer queue and\ncommits of a wl_surface themselves, are likely to be using this\nextension internally. If a client is using such an API for a\nwl_surface, it should not directly use this extension on that surface,\nto avoid raising a synchronization_exists protocol error." ] pub unsafe fn zwp_linux_explicit_synchronization_v1_get_synchronization ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_linux_explicit_synchronization_v1 as _ , 1u32 , & super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "per-surface explicit synchronization support\n\nThis object implements per-surface explicit synchronization.\n\nSynchronization refers to co-ordination of pipelined operations performed\non buffers. Most GPU clients will schedule an asynchronous operation to\nrender to the buffer, then immediately send the buffer to the compositor\nto be attached to a surface.\n\nIn implicit synchronization, ensuring that the rendering operation is\ncomplete before the compositor displays the buffer is an implementation\ndetail handled by either the kernel or userspace graphics driver.\n\nBy contrast, in explicit synchronization, dma_fence objects mark when the\nasynchronous operations are complete. When submitting a buffer, the\nclient provides an acquire fence which will be waited on before the\ncompositor accesses the buffer. The Wayland server, through a\nzwp_linux_buffer_release_v1 object, will inform the client with an event\nwhich may be accompanied by a release fence, when the compositor will no\nlonger access the buffer contents due to the specific commit that\nrequested the release event.\n\nEach surface can be associated with only one object of this interface at\nany time.\n\nIn version 1 of this interface, explicit synchronization is only\nguaranteed to be supported for buffers created with any version of the\nwp_linux_dmabuf buffer factory. Version 2 additionally guarantees\nexplicit synchronization support for opaque EGL buffers, which is a type\nof platform specific buffers described in the EGL_WL_bind_wayland_display\nextension. Compositors are free to support explicit synchronization for\nadditional buffer types." ] pub mod zwp_linux_surface_synchronization_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_linux_surface_synchronization_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "the fence specified by the client could not be imported" ] invalid_fence = 0 , # [ doc = "multiple fences added for a single surface commit" ] duplicate_fence = 1 , # [ doc = "multiple releases added for a single surface commit" ] duplicate_release = 2 , # [ doc = "the associated wl_surface was destroyed" ] no_surface = 3 , # [ doc = "the buffer does not support explicit synchronization" ] unsupported_buffer = 4 , # [ doc = "no buffer was attached" ] no_buffer = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_fence ) , 1 => Some ( error :: duplicate_fence ) , 2 => Some ( error :: duplicate_release ) , 3 => Some ( error :: no_surface ) , 4 => Some ( error :: unsupported_buffer ) , 5 => Some ( error :: no_buffer ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_linux_surface_synchronization_v1_requests_get_release_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_surface_synchronization_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_acquire_fence\0" as * const u8 as * const c_char , signature : b"h\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_release\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_linux_surface_synchronization_v1_requests_get_release_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_linux_surface_synchronization_v1_interface : wl_interface = wl_interface { name : b"zwp_linux_surface_synchronization_v1\0" as * const u8 as * const c_char , version : 2 , request_count : 3 , requests : unsafe { & zwp_linux_surface_synchronization_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_linux_surface_synchronization_v1_listener { } pub unsafe fn zwp_linux_surface_synchronization_v1_set_user_data ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_linux_surface_synchronization_v1 as _ , user_data ) ; } pub unsafe fn zwp_linux_surface_synchronization_v1_get_user_data ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_linux_surface_synchronization_v1 as _ ) ; } pub unsafe fn zwp_linux_surface_synchronization_v1_get_version ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_linux_surface_synchronization_v1 as _ ) ; } pub unsafe fn zwp_linux_surface_synchronization_v1_add_listener ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_linux_surface_synchronization_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_linux_surface_synchronization_v1_add_rust_listener ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 , listener : & dyn zwp_linux_surface_synchronization_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_linux_surface_synchronization_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_linux_surface_synchronization_v1_add_listener ( zwp_linux_surface_synchronization_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy synchronization object\n\nDestroy this explicit synchronization object.\n\nAny fence set by this object with set_acquire_fence since the last\ncommit will be discarded by the server. Any fences set by this object\nbefore the last commit are not affected.\n\nzwp_linux_buffer_release_v1 objects created by this object are not\naffected by this request." ] pub unsafe fn zwp_linux_surface_synchronization_v1_destroy ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_surface_synchronization_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_linux_surface_synchronization_v1 as _ ) ; } # [ doc = "set the acquire fence\n\nSet the acquire fence that must be signaled before the compositor\nmay sample from the buffer attached with wl_surface.attach. The fence\nis a dma_fence kernel object.\n\nThe acquire fence is double-buffered state, and will be applied on the\nnext wl_surface.commit request for the associated surface. Thus, it\napplies only to the buffer that is attached to the surface at commit\ntime.\n\nIf the provided fd is not a valid dma_fence fd, then an INVALID_FENCE\nerror is raised.\n\nIf a fence has already been attached during the same commit cycle, a\nDUPLICATE_FENCE error is raised.\n\nIf the associated wl_surface was destroyed, a NO_SURFACE error is\nraised.\n\nIf at surface commit time the attached buffer does not support explicit\nsynchronization, an UNSUPPORTED_BUFFER error is raised.\n\nIf at surface commit time there is no buffer attached, a NO_BUFFER\nerror is raised." ] pub unsafe fn zwp_linux_surface_synchronization_v1_set_acquire_fence ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 , fd : :: std :: os :: unix :: io :: RawFd ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_surface_synchronization_v1 as _ , 1u32 , fd , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release fence for last-attached buffer\n\nCreate a listener for the release of the buffer attached by the\nclient with wl_surface.attach. See zwp_linux_buffer_release_v1\ndocumentation for more information.\n\nThe release object is double-buffered state, and will be associated\nwith the buffer that is attached to the surface at wl_surface.commit\ntime.\n\nIf a zwp_linux_buffer_release_v1 object has already been requested for\nthe surface in the same commit cycle, a DUPLICATE_RELEASE error is\nraised.\n\nIf the associated wl_surface was destroyed, a NO_SURFACE error\nis raised.\n\nIf at surface commit time there is no buffer attached, a NO_BUFFER\nerror is raised." ] pub unsafe fn zwp_linux_surface_synchronization_v1_get_release ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 ) -> * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_linux_surface_synchronization_v1 as _ , 2u32 , & super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "buffer release explicit synchronization\n\nThis object is instantiated in response to a\nzwp_linux_surface_synchronization_v1.get_release request.\n\nIt provides an alternative to wl_buffer.release events, providing a\nunique release from a single wl_surface.commit request. The release event\nalso supports explicit synchronization, providing a fence FD for the\nclient to synchronize against.\n\nExactly one event, either a fenced_release or an immediate_release, will\nbe emitted for the wl_surface.commit request. The compositor can choose\nrelease by release which event it uses.\n\nThis event does not replace wl_buffer.release events; servers are still\nrequired to send those events.\n\nOnce a buffer release object has delivered a 'fenced_release' or an\n'immediate_release' event it is automatically destroyed." ] pub mod zwp_linux_buffer_release_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_linux_buffer_release_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_buffer_release_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"fenced_release\0" as * const u8 as * const c_char , signature : b"h\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"immediate_release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_linux_buffer_release_v1_interface : wl_interface = wl_interface { name : b"zwp_linux_buffer_release_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 2 , events : unsafe { & zwp_linux_buffer_release_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_linux_buffer_release_v1_listener { # [ doc = "release buffer with fence\n\nSent when the compositor has finalised its usage of the associated\nbuffer for the relevant commit, providing a dma_fence which will be\nsignaled when all operations by the compositor on that buffer for that\ncommit have finished.\n\nOnce the fence has signaled, and assuming the associated buffer is not\npending release from other wl_surface.commit requests, no additional\nexplicit or implicit synchronization is required to safely reuse or\ndestroy the buffer.\n\nThis event destroys the zwp_linux_buffer_release_v1 object." ] fn fenced_release ( & mut self , object : * mut zwp_linux_buffer_release_v1 , fence : :: std :: os :: unix :: io :: RawFd ) { } # [ doc = "release buffer immediately\n\nSent when the compositor has finalised its usage of the associated\nbuffer for the relevant commit, and either performed no operations\nusing it, or has a guarantee that all its operations on that buffer for\nthat commit have finished.\n\nOnce this event is received, and assuming the associated buffer is not\npending release from other wl_surface.commit requests, no additional\nexplicit or implicit synchronization is required to safely reuse or\ndestroy the buffer.\n\nThis event destroys the zwp_linux_buffer_release_v1 object." ] fn immediate_release ( & mut self , object : * mut zwp_linux_buffer_release_v1 , ) { } } pub unsafe fn zwp_linux_buffer_release_v1_set_user_data ( zwp_linux_buffer_release_v1 : * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_linux_buffer_release_v1 as _ , user_data ) ; } pub unsafe fn zwp_linux_buffer_release_v1_get_user_data ( zwp_linux_buffer_release_v1 : * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_linux_buffer_release_v1 as _ ) ; } pub unsafe fn zwp_linux_buffer_release_v1_get_version ( zwp_linux_buffer_release_v1 : * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_linux_buffer_release_v1 as _ ) ; } pub unsafe fn zwp_linux_buffer_release_v1_add_listener ( zwp_linux_buffer_release_v1 : * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_linux_buffer_release_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_linux_buffer_release_v1_add_rust_listener ( zwp_linux_buffer_release_v1 : * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 , listener : & dyn zwp_linux_buffer_release_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_linux_buffer_release_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_linux_buffer_release_v1_add_listener ( zwp_linux_buffer_release_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_linux_buffer_release_v1_destroy ( zwp_linux_buffer_release_v1 : * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_linux_buffer_release_v1 as _ ) ; } } } pub mod idle_inhibit_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "control behavior when display idles\n\nThis interface permits inhibiting the idle behavior such as screen\nblanking, locking, and screensaving. The client binds the idle manager\nglobally, then creates idle-inhibitor objects for each surface.\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_idle_inhibit_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_idle_inhibit_manager_v1 { } static mut zwp_idle_inhibit_manager_v1_requests_create_inhibitor_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_idle_inhibit_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_inhibitor\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_idle_inhibit_manager_v1_requests_create_inhibitor_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_idle_inhibit_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_idle_inhibit_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_idle_inhibit_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_idle_inhibit_manager_v1_listener { } pub unsafe fn zwp_idle_inhibit_manager_v1_set_user_data ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_idle_inhibit_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_idle_inhibit_manager_v1_get_user_data ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_idle_inhibit_manager_v1 as _ ) ; } pub unsafe fn zwp_idle_inhibit_manager_v1_get_version ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_idle_inhibit_manager_v1 as _ ) ; } pub unsafe fn zwp_idle_inhibit_manager_v1_add_listener ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_idle_inhibit_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_idle_inhibit_manager_v1_add_rust_listener ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 , listener : & dyn zwp_idle_inhibit_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_idle_inhibit_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_idle_inhibit_manager_v1_add_listener ( zwp_idle_inhibit_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the idle inhibitor object\n\nDestroy the inhibit manager." ] pub unsafe fn zwp_idle_inhibit_manager_v1_destroy ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_idle_inhibit_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_idle_inhibit_manager_v1 as _ ) ; } # [ doc = "create a new inhibitor object\n\nCreate a new inhibitor object associated with the given surface." ] pub unsafe fn zwp_idle_inhibit_manager_v1_create_inhibitor ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_idle_inhibit_manager_v1 as _ , 1u32 , & super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "context object for inhibiting idle behavior\n\nAn idle inhibitor prevents the output that the associated surface is\nvisible on from being set to a state where it is not visually usable due\nto lack of user interaction (e.g. blanked, dimmed, locked, set to power\nsave, etc.) Any screensaver processes are also blocked from displaying.\n\nIf the surface is destroyed, unmapped, becomes occluded, loses\nvisibility, or otherwise becomes not visually relevant for the user, the\nidle inhibitor will not be honored by the compositor; if the surface\nsubsequently regains visibility the inhibitor takes effect once again.\nLikewise, the inhibitor isn't honored if the system was already idled at\nthe time the inhibitor was established, although if the system later\nde-idles and re-idles the inhibitor will take effect." ] pub mod zwp_idle_inhibitor_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_idle_inhibitor_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_idle_inhibitor_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_idle_inhibitor_v1_interface : wl_interface = wl_interface { name : b"zwp_idle_inhibitor_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_idle_inhibitor_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_idle_inhibitor_v1_listener { } pub unsafe fn zwp_idle_inhibitor_v1_set_user_data ( zwp_idle_inhibitor_v1 : * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_idle_inhibitor_v1 as _ , user_data ) ; } pub unsafe fn zwp_idle_inhibitor_v1_get_user_data ( zwp_idle_inhibitor_v1 : * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_idle_inhibitor_v1 as _ ) ; } pub unsafe fn zwp_idle_inhibitor_v1_get_version ( zwp_idle_inhibitor_v1 : * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_idle_inhibitor_v1 as _ ) ; } pub unsafe fn zwp_idle_inhibitor_v1_add_listener ( zwp_idle_inhibitor_v1 : * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_idle_inhibitor_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_idle_inhibitor_v1_add_rust_listener ( zwp_idle_inhibitor_v1 : * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 , listener : & dyn zwp_idle_inhibitor_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_idle_inhibitor_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_idle_inhibitor_v1_add_listener ( zwp_idle_inhibitor_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the idle inhibitor object\n\nRemove the inhibitor effect from the associated wl_surface." ] pub unsafe fn zwp_idle_inhibitor_v1_destroy ( zwp_idle_inhibitor_v1 : * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_idle_inhibitor_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_idle_inhibitor_v1 as _ ) ; } } } pub mod fake_input { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Fake input manager\n\nThis interface allows other processes to provide fake input events.\nPurpose is on the one hand side to provide testing facilities like XTest on X11.\nBut also to support use case like kdeconnect's mouse pad interface.\n\nA compositor should not trust the input received from this interface.\nClients should not expect that the compositor honors the requests from this\ninterface." ] pub mod org_kde_kwin_fake_input { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_fake_input { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_fake_input_requests : [ wl_message ; 11 ] = [ wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"ss\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"pointer_motion\0" as * const u8 as * const c_char , signature : b"ff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"button\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"axis\0" as * const u8 as * const c_char , signature : b"uf\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"touch_down\0" as * const u8 as * const c_char , signature : b"2uff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"touch_motion\0" as * const u8 as * const c_char , signature : b"2uff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"touch_up\0" as * const u8 as * const c_char , signature : b"2u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"touch_cancel\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"touch_frame\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"pointer_motion_absolute\0" as * const u8 as * const c_char , signature : b"3ff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"keyboard_key\0" as * const u8 as * const c_char , signature : b"4uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_fake_input_interface : wl_interface = wl_interface { name : b"org_kde_kwin_fake_input\0" as * const u8 as * const c_char , version : 4 , request_count : 11 , requests : unsafe { & org_kde_kwin_fake_input_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_fake_input_listener { } pub unsafe fn org_kde_kwin_fake_input_set_user_data ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_fake_input as _ , user_data ) ; } pub unsafe fn org_kde_kwin_fake_input_get_user_data ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_fake_input as _ ) ; } pub unsafe fn org_kde_kwin_fake_input_get_version ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_fake_input as _ ) ; } pub unsafe fn org_kde_kwin_fake_input_add_listener ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_fake_input as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_fake_input_add_rust_listener ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , listener : & dyn org_kde_kwin_fake_input_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_fake_input_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_fake_input_add_listener ( org_kde_kwin_fake_input as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_fake_input_destroy ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_fake_input as _ ) ; } # [ doc = "Information why the client wants to use the interface\n\nA client should use this request to tell the compositor why it wants to\nuse this interface. The compositor might use the information to decide\nwhether it wants to grant the request. The data might also be passed to\nthe user to decide whether the application should get granted access to\nthis very privileged interface." ] pub unsafe fn org_kde_kwin_fake_input_authenticate ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , application : * const c_char , reason : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 0u32 , application , reason , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_fake_input_pointer_motion ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , delta_x : wl_fixed_t , delta_y : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 1u32 , delta_x , delta_y , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_fake_input_button ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , button : u32 , state : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 2u32 , button , state , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_fake_input_axis ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , axis : u32 , value : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 3u32 , axis , value , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "touch down event\n\nA client should use this request to send touch down event at specific\ncoordinates." ] pub unsafe fn org_kde_kwin_fake_input_touch_down ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , id : u32 , x : wl_fixed_t , y : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 4u32 , id , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "touch motion event\n\nA client should use this request to send touch motion to specific position." ] pub unsafe fn org_kde_kwin_fake_input_touch_motion ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , id : u32 , x : wl_fixed_t , y : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 5u32 , id , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "touch up event\n\nA client should use this request to send touch up event." ] pub unsafe fn org_kde_kwin_fake_input_touch_up ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , id : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 6u32 , id , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "touch cancel event\n\nA client should use this request to cancel the current\ntouch event." ] pub unsafe fn org_kde_kwin_fake_input_touch_cancel ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 7u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "touch frame event\n\nA client should use this request to send touch frame event." ] pub unsafe fn org_kde_kwin_fake_input_touch_frame ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 8u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_fake_input_pointer_motion_absolute ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , x : wl_fixed_t , y : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 9u32 , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_fake_input_keyboard_key ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , button : u32 , state : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 10u32 , button , state , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod shadow { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod org_kde_kwin_shadow_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_shadow_manager { } static mut org_kde_kwin_shadow_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_shadow :: org_kde_kwin_shadow_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_manager_requests_unset_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_shadow_manager_requests : [ wl_message ; 3 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_manager_requests_create_types as * const _ } , } , wl_message { name : b"unset\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_manager_requests_unset_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_shadow_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_shadow_manager\0" as * const u8 as * const c_char , version : 2 , request_count : 3 , requests : unsafe { & org_kde_kwin_shadow_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_shadow_manager_listener { } pub unsafe fn org_kde_kwin_shadow_manager_set_user_data ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_shadow_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_shadow_manager_get_user_data ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_shadow_manager as _ ) ; } pub unsafe fn org_kde_kwin_shadow_manager_get_version ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_shadow_manager as _ ) ; } pub unsafe fn org_kde_kwin_shadow_manager_add_listener ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_shadow_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_shadow_manager_add_rust_listener ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager , listener : & dyn org_kde_kwin_shadow_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_shadow_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_shadow_manager_add_listener ( org_kde_kwin_shadow_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_shadow_manager_create ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_shadow_manager as _ , 0u32 , & super :: org_kde_kwin_shadow :: org_kde_kwin_shadow_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } pub unsafe fn org_kde_kwin_shadow_manager_unset ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow_manager as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Destroy the org_kde_kwin_shadow_manager\n\nDestroy the org_kde_kwin_shadow_manager object." ] pub unsafe fn org_kde_kwin_shadow_manager_destroy ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow_manager as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_shadow_manager as _ ) ; } } pub mod org_kde_kwin_shadow { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_shadow { } static mut org_kde_kwin_shadow_requests_attach_left_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_top_left_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_top_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_top_right_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_right_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_bottom_right_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_bottom_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_bottom_left_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_shadow_requests : [ wl_message ; 14 ] = [ wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"attach_left\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_left_types as * const _ } , } , wl_message { name : b"attach_top_left\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_top_left_types as * const _ } , } , wl_message { name : b"attach_top\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_top_types as * const _ } , } , wl_message { name : b"attach_top_right\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_top_right_types as * const _ } , } , wl_message { name : b"attach_right\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_right_types as * const _ } , } , wl_message { name : b"attach_bottom_right\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_bottom_right_types as * const _ } , } , wl_message { name : b"attach_bottom\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_bottom_types as * const _ } , } , wl_message { name : b"attach_bottom_left\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_bottom_left_types as * const _ } , } , wl_message { name : b"set_left_offset\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_top_offset\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_right_offset\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_bottom_offset\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_shadow_interface : wl_interface = wl_interface { name : b"org_kde_kwin_shadow\0" as * const u8 as * const c_char , version : 2 , request_count : 14 , requests : unsafe { & org_kde_kwin_shadow_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_shadow_listener { } pub unsafe fn org_kde_kwin_shadow_set_user_data ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_shadow as _ , user_data ) ; } pub unsafe fn org_kde_kwin_shadow_get_user_data ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_shadow as _ ) ; } pub unsafe fn org_kde_kwin_shadow_get_version ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_shadow as _ ) ; } pub unsafe fn org_kde_kwin_shadow_add_listener ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_shadow as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_shadow_add_rust_listener ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , listener : & dyn org_kde_kwin_shadow_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_shadow_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_shadow_add_listener ( org_kde_kwin_shadow as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_shadow_commit ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_left ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 1u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_top_left ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 2u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_top ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 3u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_top_right ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 4u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_right ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 5u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_bottom_right ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 6u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_bottom ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 7u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_bottom_left ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 8u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_set_left_offset ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , offset : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 9u32 , offset , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_set_top_offset ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , offset : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 10u32 , offset , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_set_right_offset ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , offset : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 11u32 , offset , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_set_bottom_offset ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , offset : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 12u32 , offset , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Destroy the org_kde_kwin_shadow\n\nDestroy the org_kde_kwin_shadow object. If the org_kde_kwin_shadow is\nstill set on a wl_surface the shadow will be immediately removed.\nPrefer to first call the request unset on the org_kde_kwin_shadow_manager and\ncommit the wl_surface to apply the change." ] pub unsafe fn org_kde_kwin_shadow_destroy ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 13u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_shadow as _ ) ; } } } pub mod keyboard_shortcuts_inhibit_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "context object for keyboard grab_manager\n\nA global interface used for inhibiting the compositor keyboard shortcuts." ] pub mod zwp_keyboard_shortcuts_inhibit_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_keyboard_shortcuts_inhibit_manager_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "the shortcuts are already inhibited for this surface" ] already_inhibited = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: already_inhibited ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_keyboard_shortcuts_inhibit_manager_v1_requests_inhibit_shortcuts_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_keyboard_shortcuts_inhibit_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"inhibit_shortcuts\0" as * const u8 as * const c_char , signature : b"noo\0" as * const u8 as * const c_char , types : unsafe { & zwp_keyboard_shortcuts_inhibit_manager_v1_requests_inhibit_shortcuts_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_keyboard_shortcuts_inhibit_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_keyboard_shortcuts_inhibit_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_keyboard_shortcuts_inhibit_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_keyboard_shortcuts_inhibit_manager_v1_listener { } pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_set_user_data ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_get_user_data ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_get_version ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_add_listener ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_add_rust_listener ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 , listener : & dyn zwp_keyboard_shortcuts_inhibit_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_keyboard_shortcuts_inhibit_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_keyboard_shortcuts_inhibit_manager_v1_add_listener ( zwp_keyboard_shortcuts_inhibit_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the keyboard shortcuts inhibitor object\n\nDestroy the keyboard shortcuts inhibitor manager." ] pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_destroy ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ ) ; } # [ doc = "create a new keyboard shortcuts inhibitor object\n\nCreate a new keyboard shortcuts inhibitor object associated with\nthe given surface for the given seat.\n\nIf shortcuts are already inhibited for the specified seat and surface,\na protocol error \"already_inhibited\" is raised by the compositor." ] pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_inhibit_shortcuts ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 , surface : * mut super :: wl_surface :: wl_surface , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ , 1u32 , & super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface , seat ) ; return r as _ ; } } # [ doc = "context object for keyboard shortcuts inhibitor\n\nA keyboard shortcuts inhibitor instructs the compositor to ignore\nits own keyboard shortcuts when the associated surface has keyboard\nfocus. As a result, when the surface has keyboard focus on the given\nseat, it will receive all key events originating from the specified\nseat, even those which would normally be caught by the compositor for\nits own shortcuts.\n\nThe Wayland compositor is however under no obligation to disable\nall of its shortcuts, and may keep some special key combo for its own\nuse, including but not limited to one allowing the user to forcibly\nrestore normal keyboard events routing in the case of an unwilling\nclient. The compositor may also use the same key combo to reactivate\nan existing shortcut inhibitor that was previously deactivated on\nuser request.\n\nWhen the compositor restores its own keyboard shortcuts, an\n\"inactive\" event is emitted to notify the client that the keyboard\nshortcuts inhibitor is not effectively active for the surface and\nseat any more, and the client should not expect to receive all\nkeyboard events.\n\nWhen the keyboard shortcuts inhibitor is inactive, the client has\nno way to forcibly reactivate the keyboard shortcuts inhibitor.\n\nThe user can chose to re-enable a previously deactivated keyboard\nshortcuts inhibitor using any mechanism the compositor may offer,\nin which case the compositor will send an \"active\" event to notify\nthe client.\n\nIf the surface is destroyed, unmapped, or loses the seat's keyboard\nfocus, the keyboard shortcuts inhibitor becomes irrelevant and the\ncompositor will restore its own keyboard shortcuts but no \"inactive\"\nevent is emitted in this case." ] pub mod zwp_keyboard_shortcuts_inhibitor_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_keyboard_shortcuts_inhibitor_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_keyboard_shortcuts_inhibitor_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_keyboard_shortcuts_inhibitor_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"active\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"inactive\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_keyboard_shortcuts_inhibitor_v1_interface : wl_interface = wl_interface { name : b"zwp_keyboard_shortcuts_inhibitor_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_keyboard_shortcuts_inhibitor_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_keyboard_shortcuts_inhibitor_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_keyboard_shortcuts_inhibitor_v1_listener { # [ doc = "shortcuts are inhibited\n\nThis event indicates that the shortcut inhibitor is active.\n\nThe compositor sends this event every time compositor shortcuts\nare inhibited on behalf of the surface. When active, the client\nmay receive input events normally reserved by the compositor\n(see zwp_keyboard_shortcuts_inhibitor_v1).\n\nThis occurs typically when the initial request \"inhibit_shortcuts\"\nfirst becomes active or when the user instructs the compositor to\nre-enable and existing shortcuts inhibitor using any mechanism\noffered by the compositor." ] fn active ( & mut self , object : * mut zwp_keyboard_shortcuts_inhibitor_v1 , ) { } # [ doc = "shortcuts are restored\n\nThis event indicates that the shortcuts inhibitor is inactive,\nnormal shortcuts processing is restored by the compositor." ] fn inactive ( & mut self , object : * mut zwp_keyboard_shortcuts_inhibitor_v1 , ) { } } pub unsafe fn zwp_keyboard_shortcuts_inhibitor_v1_set_user_data ( zwp_keyboard_shortcuts_inhibitor_v1 : * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_keyboard_shortcuts_inhibitor_v1 as _ , user_data ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibitor_v1_get_user_data ( zwp_keyboard_shortcuts_inhibitor_v1 : * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_keyboard_shortcuts_inhibitor_v1 as _ ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibitor_v1_get_version ( zwp_keyboard_shortcuts_inhibitor_v1 : * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_keyboard_shortcuts_inhibitor_v1 as _ ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibitor_v1_add_listener ( zwp_keyboard_shortcuts_inhibitor_v1 : * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_keyboard_shortcuts_inhibitor_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibitor_v1_add_rust_listener ( zwp_keyboard_shortcuts_inhibitor_v1 : * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 , listener : & dyn zwp_keyboard_shortcuts_inhibitor_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_keyboard_shortcuts_inhibitor_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_keyboard_shortcuts_inhibitor_v1_add_listener ( zwp_keyboard_shortcuts_inhibitor_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the keyboard shortcuts inhibitor object\n\nRemove the keyboard shortcuts inhibitor from the associated wl_surface." ] pub unsafe fn zwp_keyboard_shortcuts_inhibitor_v1_destroy ( zwp_keyboard_shortcuts_inhibitor_v1 : * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_keyboard_shortcuts_inhibitor_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_keyboard_shortcuts_inhibitor_v1 as _ ) ; } } } pub mod tablet_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "controller object for graphic tablet devices\n\nAn object that provides access to the graphics tablets available on this\nsystem. All tablets are associated with a seat, to get access to the\nactual tablets, use wp_tablet_manager.get_tablet_seat." ] pub mod zwp_tablet_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_manager_v1 { } static mut zwp_tablet_manager_v1_requests_get_tablet_seat_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"get_tablet_seat\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_manager_v1_requests_get_tablet_seat_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_tablet_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_manager_v1_listener { } pub unsafe fn zwp_tablet_manager_v1_set_user_data ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_tablet_manager_v1_get_user_data ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_manager_v1 as _ ) ; } pub unsafe fn zwp_tablet_manager_v1_get_version ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_manager_v1 as _ ) ; } pub unsafe fn zwp_tablet_manager_v1_add_listener ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_manager_v1_add_rust_listener ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 , listener : & dyn zwp_tablet_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_manager_v1_add_listener ( zwp_tablet_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "get the tablet seat\n\nGet the wp_tablet_seat object for the given seat. This object\nprovides access to all graphics tablets in this seat." ] pub unsafe fn zwp_tablet_manager_v1_get_tablet_seat ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_tablet_manager_v1 as _ , 0u32 , & super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat ) ; return r as _ ; } # [ doc = "release the memory for the tablet manager object\n\nDestroy the wp_tablet_manager object. Objects created from this\nobject are unaffected and should be destroyed separately." ] pub unsafe fn zwp_tablet_manager_v1_destroy ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_manager_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_manager_v1 as _ ) ; } } # [ doc = "controller object for graphic tablet devices of a seat\n\nAn object that provides access to the graphics tablets available on this\nseat. After binding to this interface, the compositor sends a set of\nwp_tablet_seat.tablet_added and wp_tablet_seat.tool_added events." ] pub mod zwp_tablet_seat_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_seat_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_seat_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_tablet_seat_v1_events_tablet_added_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_v1 :: zwp_tablet_v1_interface as * const wl_interface } , ] ; static mut zwp_tablet_seat_v1_events_tool_added_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_seat_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"tablet_added\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_seat_v1_events_tablet_added_types as * const _ } , } , wl_message { name : b"tool_added\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_seat_v1_events_tool_added_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_seat_v1_interface : wl_interface = wl_interface { name : b"zwp_tablet_seat_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_tablet_seat_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_tablet_seat_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_seat_v1_listener { # [ doc = "new device notification\n\nThis event is sent whenever a new tablet becomes available on this\nseat. This event only provides the object id of the tablet, any\nstatic information about the tablet (device name, vid/pid, etc.) is\nsent through the wp_tablet interface." ] fn tablet_added ( & mut self , object : * mut zwp_tablet_seat_v1 , id : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 ) { } # [ doc = "a new tool has been used with a tablet\n\nThis event is sent whenever a tool that has not previously been used\nwith a tablet comes into use. This event only provides the object id\nof the tool; any static information about the tool (capabilities,\ntype, etc.) is sent through the wp_tablet_tool interface." ] fn tool_added ( & mut self , object : * mut zwp_tablet_seat_v1 , id : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 ) { } } pub unsafe fn zwp_tablet_seat_v1_set_user_data ( zwp_tablet_seat_v1 : * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_seat_v1 as _ , user_data ) ; } pub unsafe fn zwp_tablet_seat_v1_get_user_data ( zwp_tablet_seat_v1 : * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_seat_v1 as _ ) ; } pub unsafe fn zwp_tablet_seat_v1_get_version ( zwp_tablet_seat_v1 : * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_seat_v1 as _ ) ; } pub unsafe fn zwp_tablet_seat_v1_add_listener ( zwp_tablet_seat_v1 : * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_seat_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_seat_v1_add_rust_listener ( zwp_tablet_seat_v1 : * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 , listener : & dyn zwp_tablet_seat_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_seat_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_seat_v1_add_listener ( zwp_tablet_seat_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "release the memory for the tablet seat object\n\nDestroy the wp_tablet_seat object. Objects created from this\nobject are unaffected and should be destroyed separately." ] pub unsafe fn zwp_tablet_seat_v1_destroy ( zwp_tablet_seat_v1 : * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_seat_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_seat_v1 as _ ) ; } } # [ doc = "a physical tablet tool\n\nAn object that represents a physical tool that has been, or is\ncurrently in use with a tablet in this seat. Each wp_tablet_tool\nobject stays valid until the client destroys it; the compositor\nreuses the wp_tablet_tool object to indicate that the object's\nrespective physical tool has come into proximity of a tablet again.\n\nA wp_tablet_tool object's relation to a physical tool depends on the\ntablet's ability to report serial numbers. If the tablet supports\nthis capability, then the object represents a specific physical tool\nand can be identified even when used on multiple tablets.\n\nA tablet tool has a number of static characteristics, e.g. tool type,\nhardware_serial and capabilities. These capabilities are sent in an\nevent sequence after the wp_tablet_seat.tool_added event before any\nactual events from this tool. This initial event sequence is\nterminated by a wp_tablet_tool.done event.\n\nTablet tool events are grouped by wp_tablet_tool.frame events.\nAny events received before a wp_tablet_tool.frame event should be\nconsidered part of the same hardware state change." ] pub mod zwp_tablet_tool_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_tool_v1 { } # [ doc = "a physical tool type\n\nDescribes the physical type of a tool. The physical type of a tool\ngenerally defines its base usage.\n\nThe mouse tool represents a mouse-shaped tool that is not a relative\ndevice but bound to the tablet's surface, providing absolute\ncoordinates.\n\nThe lens tool is a mouse-shaped tool with an attached lens to\nprovide precision focus." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum _type { # [ doc = "Pen" ] pen = 320 , # [ doc = "Eraser" ] eraser = 321 , # [ doc = "Brush" ] brush = 322 , # [ doc = "Pencil" ] pencil = 323 , # [ doc = "Airbrush" ] airbrush = 324 , # [ doc = "Finger" ] finger = 325 , # [ doc = "Mouse" ] mouse = 326 , # [ doc = "Lens" ] lens = 327 , # [ doc ( hidden ) ] __nonexhaustive , } impl _type { pub fn from_raw ( n : u32 ) -> Option < _type > { match n { 320 => Some ( _type :: pen ) , 321 => Some ( _type :: eraser ) , 322 => Some ( _type :: brush ) , 323 => Some ( _type :: pencil ) , 324 => Some ( _type :: airbrush ) , 325 => Some ( _type :: finger ) , 326 => Some ( _type :: mouse ) , 327 => Some ( _type :: lens ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "capability flags for a tool\n\nDescribes extra capabilities on a tablet.\n\nAny tool must provide x and y values, extra axes are\ndevice-specific." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum capability { # [ doc = "Tilt axes" ] tilt = 1 , # [ doc = "Pressure axis" ] pressure = 2 , # [ doc = "Distance axis" ] distance = 3 , # [ doc = "Z-rotation axis" ] rotation = 4 , # [ doc = "Slider axis" ] slider = 5 , # [ doc = "Wheel axis" ] wheel = 6 , # [ doc ( hidden ) ] __nonexhaustive , } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { match n { 1 => Some ( capability :: tilt ) , 2 => Some ( capability :: pressure ) , 3 => Some ( capability :: distance ) , 4 => Some ( capability :: rotation ) , 5 => Some ( capability :: slider ) , 6 => Some ( capability :: wheel ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "physical button state\n\nDescribes the physical state of a button that produced the button event." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum button_state { # [ doc = "button is not pressed" ] released = 0 , # [ doc = "button is pressed" ] pressed = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl button_state { pub fn from_raw ( n : u32 ) -> Option < button_state > { match n { 0 => Some ( button_state :: released ) , 1 => Some ( button_state :: pressed ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_tablet_tool_v1_requests_set_cursor_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_tool_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_cursor\0" as * const u8 as * const c_char , signature : b"u?oii\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_tool_v1_requests_set_cursor_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_tablet_tool_v1_events_proximity_in_types : [ * const wl_interface ; 3 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: zwp_tablet_v1 :: zwp_tablet_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_tool_v1_events : [ wl_message ; 19 ] = [ wl_message { name : b"type\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hardware_serial\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hardware_id_wacom\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capability\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"proximity_in\0" as * const u8 as * const c_char , signature : b"uoo\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_tool_v1_events_proximity_in_types as * const _ } , } , wl_message { name : b"proximity_out\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"down\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"up\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"motion\0" as * const u8 as * const c_char , signature : b"ff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"pressure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"distance\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"tilt\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"rotation\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"slider\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"wheel\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"button\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_tool_v1_interface : wl_interface = wl_interface { name : b"zwp_tablet_tool_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_tool_v1_requests as * const _ } , event_count : 19 , events : unsafe { & zwp_tablet_tool_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_tool_v1_listener { # [ doc = "tool type\n\nThe tool type is the high-level type of the tool and usually decides\nthe interaction expected from this tool.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn _type ( & mut self , object : * mut zwp_tablet_tool_v1 , tool_type : _type ) { } # [ doc = "unique hardware serial number of the tool\n\nIf the physical tool can be identified by a unique 64-bit serial\nnumber, this event notifies the client of this serial number.\n\nIf multiple tablets are available in the same seat and the tool is\nuniquely identifiable by the serial number, that tool may move\nbetween tablets.\n\nOtherwise, if the tool has no serial number and this event is\nmissing, the tool is tied to the tablet it first comes into\nproximity with. Even if the physical tool is used on multiple\ntablets, separate wp_tablet_tool objects will be created, one per\ntablet.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn hardware_serial ( & mut self , object : * mut zwp_tablet_tool_v1 , hardware_serial_hi : u32 , hardware_serial_lo : u32 ) { } # [ doc = "hardware id notification in Wacom's format\n\nThis event notifies the client of a hardware id available on this tool.\n\nThe hardware id is a device-specific 64-bit id that provides extra\ninformation about the tool in use, beyond the wl_tool.type\nenumeration. The format of the id is specific to tablets made by\nWacom Inc. For example, the hardware id of a Wacom Grip\nPen (a stylus) is 0x802.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn hardware_id_wacom ( & mut self , object : * mut zwp_tablet_tool_v1 , hardware_id_hi : u32 , hardware_id_lo : u32 ) { } # [ doc = "tool capability notification\n\nThis event notifies the client of any capabilities of this tool,\nbeyond the main set of x/y axes and tip up/down detection.\n\nOne event is sent for each extra capability available on this tool.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn capability ( & mut self , object : * mut zwp_tablet_tool_v1 , capability : capability ) { } # [ doc = "tool description events sequence complete\n\nThis event signals the end of the initial burst of descriptive\nevents. A client may consider the static description of the tool to\nbe complete and finalize initialization of the tool." ] fn done ( & mut self , object : * mut zwp_tablet_tool_v1 , ) { } # [ doc = "tool removed\n\nThis event is sent when the tool is removed from the system and will\nsend no further events. Should the physical tool come back into\nproximity later, a new wp_tablet_tool object will be created.\n\nIt is compositor-dependent when a tool is removed. A compositor may\nremove a tool on proximity out, tablet removal or any other reason.\nA compositor may also keep a tool alive until shutdown.\n\nIf the tool is currently in proximity, a proximity_out event will be\nsent before the removed event. See wp_tablet_tool.proximity_out for\nthe handling of any buttons logically down.\n\nWhen this event is received, the client must wp_tablet_tool.destroy\nthe object." ] fn removed ( & mut self , object : * mut zwp_tablet_tool_v1 , ) { } # [ doc = "proximity in event\n\nNotification that this tool is focused on a certain surface.\n\nThis event can be received when the tool has moved from one surface to\nanother, or when the tool has come back into proximity above the\nsurface.\n\nIf any button is logically down when the tool comes into proximity,\nthe respective button event is sent after the proximity_in event but\nwithin the same frame as the proximity_in event." ] fn proximity_in ( & mut self , object : * mut zwp_tablet_tool_v1 , serial : u32 , tablet : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "proximity out event\n\nNotification that this tool has either left proximity, or is no\nlonger focused on a certain surface.\n\nWhen the tablet tool leaves proximity of the tablet, button release\nevents are sent for each button that was held down at the time of\nleaving proximity. These events are sent before the proximity_out\nevent but within the same wp_tablet.frame.\n\nIf the tool stays within proximity of the tablet, but the focus\nchanges from one surface to another, a button release event may not\nbe sent until the button is actually released or the tool leaves the\nproximity of the tablet." ] fn proximity_out ( & mut self , object : * mut zwp_tablet_tool_v1 , ) { } # [ doc = "tablet tool is making contact\n\nSent whenever the tablet tool comes in contact with the surface of the\ntablet.\n\nIf the tool is already in contact with the tablet when entering the\ninput region, the client owning said region will receive a\nwp_tablet.proximity_in event, followed by a wp_tablet.down\nevent and a wp_tablet.frame event.\n\nNote that this event describes logical contact, not physical\ncontact. On some devices, a compositor may not consider a tool in\nlogical contact until a minimum physical pressure threshold is\nexceeded." ] fn down ( & mut self , object : * mut zwp_tablet_tool_v1 , serial : u32 ) { } # [ doc = "tablet tool is no longer making contact\n\nSent whenever the tablet tool stops making contact with the surface of\nthe tablet, or when the tablet tool moves out of the input region\nand the compositor grab (if any) is dismissed.\n\nIf the tablet tool moves out of the input region while in contact\nwith the surface of the tablet and the compositor does not have an\nongoing grab on the surface, the client owning said region will\nreceive a wp_tablet.up event, followed by a wp_tablet.proximity_out\nevent and a wp_tablet.frame event. If the compositor has an ongoing\ngrab on this device, this event sequence is sent whenever the grab\nis dismissed in the future.\n\nNote that this event describes logical contact, not physical\ncontact. On some devices, a compositor may not consider a tool out\nof logical contact until physical pressure falls below a specific\nthreshold." ] fn up ( & mut self , object : * mut zwp_tablet_tool_v1 , ) { } # [ doc = "motion event\n\nSent whenever a tablet tool moves." ] fn motion ( & mut self , object : * mut zwp_tablet_tool_v1 , x : wl_fixed_t , y : wl_fixed_t ) { } # [ doc = "pressure change event\n\nSent whenever the pressure axis on a tool changes. The value of this\nevent is normalized to a value between 0 and 65535.\n\nNote that pressure may be nonzero even when a tool is not in logical\ncontact. See the down and up events for more details." ] fn pressure ( & mut self , object : * mut zwp_tablet_tool_v1 , pressure : u32 ) { } # [ doc = "distance change event\n\nSent whenever the distance axis on a tool changes. The value of this\nevent is normalized to a value between 0 and 65535.\n\nNote that distance may be nonzero even when a tool is not in logical\ncontact. See the down and up events for more details." ] fn distance ( & mut self , object : * mut zwp_tablet_tool_v1 , distance : u32 ) { } # [ doc = "tilt change event\n\nSent whenever one or both of the tilt axes on a tool change. Each tilt\nvalue is in 0.01 of a degree, relative to the z-axis of the tablet.\nThe angle is positive when the top of a tool tilts along the\npositive x or y axis." ] fn tilt ( & mut self , object : * mut zwp_tablet_tool_v1 , tilt_x : i32 , tilt_y : i32 ) { } # [ doc = "z-rotation change event\n\nSent whenever the z-rotation axis on the tool changes. The\nrotation value is in 0.01 of a degree clockwise from the tool's\nlogical neutral position." ] fn rotation ( & mut self , object : * mut zwp_tablet_tool_v1 , degrees : i32 ) { } # [ doc = "Slider position change event\n\nSent whenever the slider position on the tool changes. The\nvalue is normalized between -65535 and 65535, with 0 as the logical\nneutral position of the slider.\n\nThe slider is available on e.g. the Wacom Airbrush tool." ] fn slider ( & mut self , object : * mut zwp_tablet_tool_v1 , position : i32 ) { } # [ doc = "Wheel delta event\n\nSent whenever the wheel on the tool emits an event. This event\ncontains two values for the same axis change. The degrees value is\nin 0.01 of a degree in the same orientation as the\nwl_pointer.vertical_scroll axis. The clicks value is in discrete\nlogical clicks of the mouse wheel. This value may be zero if the\nmovement of the wheel was less than one logical click.\n\nClients should choose either value and avoid mixing degrees and\nclicks. The compositor may accumulate values smaller than a logical\nclick and emulate click events when a certain threshold is met.\nThus, wl_tablet_tool.wheel events with non-zero clicks values may\nhave different degrees values." ] fn wheel ( & mut self , object : * mut zwp_tablet_tool_v1 , degrees : i32 , clicks : i32 ) { } # [ doc = "button event\n\nSent whenever a button on the tool is pressed or released.\n\nIf a button is held down when the tool moves in or out of proximity,\nbutton events are generated by the compositor. See\nwp_tablet_tool.proximity_in and wp_tablet_tool.proximity_out for\ndetails." ] fn button ( & mut self , object : * mut zwp_tablet_tool_v1 , serial : u32 , button : u32 , state : button_state ) { } # [ doc = "frame event\n\nMarks the end of a series of axis and/or button updates from the\ntablet. The Wayland protocol requires axis updates to be sent\nsequentially, however all events within a frame should be considered\none hardware event." ] fn frame ( & mut self , object : * mut zwp_tablet_tool_v1 , time : u32 ) { } } pub unsafe fn zwp_tablet_tool_v1_set_user_data ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_tool_v1 as _ , user_data ) ; } pub unsafe fn zwp_tablet_tool_v1_get_user_data ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_tool_v1 as _ ) ; } pub unsafe fn zwp_tablet_tool_v1_get_version ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_tool_v1 as _ ) ; } pub unsafe fn zwp_tablet_tool_v1_add_listener ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_tool_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_tool_v1_add_rust_listener ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 , listener : & dyn zwp_tablet_tool_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_tool_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_tool_v1_add_listener ( zwp_tablet_tool_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "set the tablet tool's surface\n\nSets the surface of the cursor used for this tool on the given\ntablet. This request only takes effect if the tool is in proximity\nof one of the requesting client's surfaces or the surface parameter\nis the current pointer surface. If there was a previous surface set\nwith this request it is replaced. If surface is NULL, the cursor\nimage is hidden.\n\nThe parameters hotspot_x and hotspot_y define the position of the\npointer surface relative to the pointer location. Its top-left corner\nis always at (x, y) - (hotspot_x, hotspot_y), where (x, y) are the\ncoordinates of the pointer location, in surface-local coordinates.\n\nOn surface.attach requests to the pointer surface, hotspot_x and\nhotspot_y are decremented by the x and y parameters passed to the\nrequest. Attach must be confirmed by wl_surface.commit as usual.\n\nThe hotspot can also be updated by passing the currently set pointer\nsurface to this request with new values for hotspot_x and hotspot_y.\n\nThe current and pending input regions of the wl_surface are cleared,\nand wl_surface.set_input_region is ignored until the wl_surface is no\nlonger used as the cursor. When the use as a cursor ends, the current\nand pending input regions become undefined, and the wl_surface is\nunmapped.\n\nThis request gives the surface the role of a cursor. The role\nassigned by this request is the same as assigned by\nwl_pointer.set_cursor meaning the same surface can be\nused both as a wl_pointer cursor and a wp_tablet cursor. If the\nsurface already has another role, it raises a protocol error.\nThe surface may be used on multiple tablets and across multiple\nseats." ] pub unsafe fn zwp_tablet_tool_v1_set_cursor ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 , serial : u32 , surface : * mut super :: wl_surface :: wl_surface , hotspot_x : i32 , hotspot_y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_tool_v1 as _ , 0u32 , serial , surface , hotspot_x , hotspot_y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the tool object\n\nThis destroys the client's resource for this tool object." ] pub unsafe fn zwp_tablet_tool_v1_destroy ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_tool_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_tool_v1 as _ ) ; } } # [ doc = "graphics tablet device\n\nThe wp_tablet interface represents one graphics tablet device. The\ntablet interface itself does not generate events; all events are\ngenerated by wp_tablet_tool objects when in proximity above a tablet.\n\nA tablet has a number of static characteristics, e.g. device name and\npid/vid. These capabilities are sent in an event sequence after the\nwp_tablet_seat.tablet_added event. This initial event sequence is\nterminated by a wp_tablet.done event." ] pub mod zwp_tablet_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_v1_events : [ wl_message ; 5 ] = [ wl_message { name : b"name\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"id\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"path\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_v1_interface : wl_interface = wl_interface { name : b"zwp_tablet_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_tablet_v1_requests as * const _ } , event_count : 5 , events : unsafe { & zwp_tablet_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_v1_listener { # [ doc = "tablet device name\n\nThis event is sent in the initial burst of events before the\nwp_tablet.done event." ] fn name ( & mut self , object : * mut zwp_tablet_v1 , name : * mut c_char ) { } # [ doc = "tablet device USB vendor/product id\n\nThis event is sent in the initial burst of events before the\nwp_tablet.done event." ] fn id ( & mut self , object : * mut zwp_tablet_v1 , vid : u32 , pid : u32 ) { } # [ doc = "path to the device\n\nA system-specific device path that indicates which device is behind\nthis wp_tablet. This information may be used to gather additional\ninformation about the device, e.g. through libwacom.\n\nA device may have more than one device path. If so, multiple\nwp_tablet.path events are sent. A device may be emulated and not\nhave a device path, and in that case this event will not be sent.\n\nThe format of the path is unspecified, it may be a device node, a\nsysfs path, or some other identifier. It is up to the client to\nidentify the string provided.\n\nThis event is sent in the initial burst of events before the\nwp_tablet.done event." ] fn path ( & mut self , object : * mut zwp_tablet_v1 , path : * mut c_char ) { } # [ doc = "tablet description events sequence complete\n\nThis event is sent immediately to signal the end of the initial\nburst of descriptive events. A client may consider the static\ndescription of the tablet to be complete and finalize initialization\nof the tablet." ] fn done ( & mut self , object : * mut zwp_tablet_v1 , ) { } # [ doc = "tablet removed event\n\nSent when the tablet has been removed from the system. When a tablet\nis removed, some tools may be removed.\n\nWhen this event is received, the client must wp_tablet.destroy\nthe object." ] fn removed ( & mut self , object : * mut zwp_tablet_v1 , ) { } } pub unsafe fn zwp_tablet_v1_set_user_data ( zwp_tablet_v1 : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_v1 as _ , user_data ) ; } pub unsafe fn zwp_tablet_v1_get_user_data ( zwp_tablet_v1 : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_v1 as _ ) ; } pub unsafe fn zwp_tablet_v1_get_version ( zwp_tablet_v1 : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_v1 as _ ) ; } pub unsafe fn zwp_tablet_v1_add_listener ( zwp_tablet_v1 : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_v1_add_rust_listener ( zwp_tablet_v1 : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 , listener : & dyn zwp_tablet_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_v1_add_listener ( zwp_tablet_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the tablet object\n\nThis destroys the client's resource for this tablet object." ] pub unsafe fn zwp_tablet_v1_destroy ( zwp_tablet_v1 : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_v1 as _ ) ; } } } pub mod relative_pointer_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "get relative pointer objects\n\nA global interface used for getting the relative pointer object for a\ngiven pointer." ] pub mod zwp_relative_pointer_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_relative_pointer_manager_v1 { } static mut zwp_relative_pointer_manager_v1_requests_get_relative_pointer_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_relative_pointer_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_relative_pointer\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_relative_pointer_manager_v1_requests_get_relative_pointer_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_relative_pointer_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_relative_pointer_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_relative_pointer_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_relative_pointer_manager_v1_listener { } pub unsafe fn zwp_relative_pointer_manager_v1_set_user_data ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_relative_pointer_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_relative_pointer_manager_v1_get_user_data ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_relative_pointer_manager_v1 as _ ) ; } pub unsafe fn zwp_relative_pointer_manager_v1_get_version ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_relative_pointer_manager_v1 as _ ) ; } pub unsafe fn zwp_relative_pointer_manager_v1_add_listener ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_relative_pointer_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_relative_pointer_manager_v1_add_rust_listener ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 , listener : & dyn zwp_relative_pointer_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_relative_pointer_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_relative_pointer_manager_v1_add_listener ( zwp_relative_pointer_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the relative pointer manager object\n\nUsed by the client to notify the server that it will no longer use this\nrelative pointer manager object." ] pub unsafe fn zwp_relative_pointer_manager_v1_destroy ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_relative_pointer_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_relative_pointer_manager_v1 as _ ) ; } # [ doc = "get a relative pointer object\n\nCreate a relative pointer interface given a wl_pointer object. See the\nwp_relative_pointer interface for more details." ] pub unsafe fn zwp_relative_pointer_manager_v1_get_relative_pointer ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 , pointer : * mut super :: wl_pointer :: wl_pointer ) -> * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_relative_pointer_manager_v1 as _ , 1u32 , & super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , pointer ) ; return r as _ ; } } # [ doc = "relative pointer object\n\nA wp_relative_pointer object is an extension to the wl_pointer interface\nused for emitting relative pointer events. It shares the same focus as\nwl_pointer objects of the same seat and will only emit events when it has\nfocus." ] pub mod zwp_relative_pointer_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_relative_pointer_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_relative_pointer_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_relative_pointer_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"relative_motion\0" as * const u8 as * const c_char , signature : b"uuffff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_relative_pointer_v1_interface : wl_interface = wl_interface { name : b"zwp_relative_pointer_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_relative_pointer_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zwp_relative_pointer_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_relative_pointer_v1_listener { # [ doc = "relative pointer motion\n\nRelative x/y pointer motion from the pointer of the seat associated with\nthis object.\n\nA relative motion is in the same dimension as regular wl_pointer motion\nevents, except they do not represent an absolute position. For example,\nmoving a pointer from (x, y) to (x', y') would have the equivalent\nrelative motion (x' - x, y' - y). If a pointer motion caused the\nabsolute pointer position to be clipped by for example the edge of the\nmonitor, the relative motion is unaffected by the clipping and will\nrepresent the unclipped motion.\n\nThis event also contains non-accelerated motion deltas. The\nnon-accelerated delta is, when applicable, the regular pointer motion\ndelta as it was before having applied motion acceleration and other\ntransformations such as normalization.\n\nNote that the non-accelerated delta does not represent 'raw' events as\nthey were read from some device. Pointer motion acceleration is device-\nand configuration-specific and non-accelerated deltas and accelerated\ndeltas may have the same value on some devices.\n\nRelative motions are not coupled to wl_pointer.motion events, and can be\nsent in combination with such events, but also independently. There may\nalso be scenarios where wl_pointer.motion is sent, but there is no\nrelative motion. The order of an absolute and relative motion event\noriginating from the same physical motion is not guaranteed.\n\nIf the client needs button events or focus state, it can receive them\nfrom a wl_pointer object of the same seat that the wp_relative_pointer\nobject is associated with." ] fn relative_motion ( & mut self , object : * mut zwp_relative_pointer_v1 , utime_hi : u32 , utime_lo : u32 , dx : wl_fixed_t , dy : wl_fixed_t , dx_unaccel : wl_fixed_t , dy_unaccel : wl_fixed_t ) { } } pub unsafe fn zwp_relative_pointer_v1_set_user_data ( zwp_relative_pointer_v1 : * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_relative_pointer_v1 as _ , user_data ) ; } pub unsafe fn zwp_relative_pointer_v1_get_user_data ( zwp_relative_pointer_v1 : * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_relative_pointer_v1 as _ ) ; } pub unsafe fn zwp_relative_pointer_v1_get_version ( zwp_relative_pointer_v1 : * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_relative_pointer_v1 as _ ) ; } pub unsafe fn zwp_relative_pointer_v1_add_listener ( zwp_relative_pointer_v1 : * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_relative_pointer_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_relative_pointer_v1_add_rust_listener ( zwp_relative_pointer_v1 : * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 , listener : & dyn zwp_relative_pointer_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_relative_pointer_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_relative_pointer_v1_add_listener ( zwp_relative_pointer_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "release the relative pointer object" ] pub unsafe fn zwp_relative_pointer_v1_destroy ( zwp_relative_pointer_v1 : * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_relative_pointer_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_relative_pointer_v1 as _ ) ; } } } pub mod tablet_unstable_v2 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "controller object for graphic tablet devices\n\nAn object that provides access to the graphics tablets available on this\nsystem. All tablets are associated with a seat, to get access to the\nactual tablets, use wp_tablet_manager.get_tablet_seat." ] pub mod zwp_tablet_manager_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_manager_v2 { } static mut zwp_tablet_manager_v2_requests_get_tablet_seat_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_manager_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"get_tablet_seat\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_manager_v2_requests_get_tablet_seat_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_manager_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_manager_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_manager_v2_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_manager_v2_listener { } pub unsafe fn zwp_tablet_manager_v2_set_user_data ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_manager_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_manager_v2_get_user_data ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_manager_v2 as _ ) ; } pub unsafe fn zwp_tablet_manager_v2_get_version ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_manager_v2 as _ ) ; } pub unsafe fn zwp_tablet_manager_v2_add_listener ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_manager_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_manager_v2_add_rust_listener ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 , listener : & dyn zwp_tablet_manager_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_manager_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_manager_v2_add_listener ( zwp_tablet_manager_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "get the tablet seat\n\nGet the wp_tablet_seat object for the given seat. This object\nprovides access to all graphics tablets in this seat." ] pub unsafe fn zwp_tablet_manager_v2_get_tablet_seat ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_tablet_manager_v2 as _ , 0u32 , & super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat ) ; return r as _ ; } # [ doc = "release the memory for the tablet manager object\n\nDestroy the wp_tablet_manager object. Objects created from this\nobject are unaffected and should be destroyed separately." ] pub unsafe fn zwp_tablet_manager_v2_destroy ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_manager_v2 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_manager_v2 as _ ) ; } } # [ doc = "controller object for graphic tablet devices of a seat\n\nAn object that provides access to the graphics tablets available on this\nseat. After binding to this interface, the compositor sends a set of\nwp_tablet_seat.tablet_added and wp_tablet_seat.tool_added events." ] pub mod zwp_tablet_seat_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_seat_v2 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_seat_v2_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_tablet_seat_v2_events_tablet_added_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_v2 :: zwp_tablet_v2_interface as * const wl_interface } , ] ; static mut zwp_tablet_seat_v2_events_tool_added_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2_interface as * const wl_interface } , ] ; static mut zwp_tablet_seat_v2_events_pad_added_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_seat_v2_events : [ wl_message ; 3 ] = [ wl_message { name : b"tablet_added\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_seat_v2_events_tablet_added_types as * const _ } , } , wl_message { name : b"tool_added\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_seat_v2_events_tool_added_types as * const _ } , } , wl_message { name : b"pad_added\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_seat_v2_events_pad_added_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_seat_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_seat_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_tablet_seat_v2_requests as * const _ } , event_count : 3 , events : unsafe { & zwp_tablet_seat_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_seat_v2_listener { # [ doc = "new device notification\n\nThis event is sent whenever a new tablet becomes available on this\nseat. This event only provides the object id of the tablet, any\nstatic information about the tablet (device name, vid/pid, etc.) is\nsent through the wp_tablet interface." ] fn tablet_added ( & mut self , object : * mut zwp_tablet_seat_v2 , id : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 ) { } # [ doc = "a new tool has been used with a tablet\n\nThis event is sent whenever a tool that has not previously been used\nwith a tablet comes into use. This event only provides the object id\nof the tool; any static information about the tool (capabilities,\ntype, etc.) is sent through the wp_tablet_tool interface." ] fn tool_added ( & mut self , object : * mut zwp_tablet_seat_v2 , id : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 ) { } # [ doc = "new pad notification\n\nThis event is sent whenever a new pad is known to the system. Typically,\npads are physically attached to tablets and a pad_added event is\nsent immediately after the wp_tablet_seat.tablet_added.\nHowever, some standalone pad devices logically attach to tablets at\nruntime, and the client must wait for wp_tablet_pad.enter to know\nthe tablet a pad is attached to.\n\nThis event only provides the object id of the pad. All further\nfeatures (buttons, strips, rings) are sent through the wp_tablet_pad\ninterface." ] fn pad_added ( & mut self , object : * mut zwp_tablet_seat_v2 , id : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 ) { } } pub unsafe fn zwp_tablet_seat_v2_set_user_data ( zwp_tablet_seat_v2 : * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_seat_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_seat_v2_get_user_data ( zwp_tablet_seat_v2 : * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_seat_v2 as _ ) ; } pub unsafe fn zwp_tablet_seat_v2_get_version ( zwp_tablet_seat_v2 : * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_seat_v2 as _ ) ; } pub unsafe fn zwp_tablet_seat_v2_add_listener ( zwp_tablet_seat_v2 : * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_seat_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_seat_v2_add_rust_listener ( zwp_tablet_seat_v2 : * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 , listener : & dyn zwp_tablet_seat_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_seat_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_seat_v2_add_listener ( zwp_tablet_seat_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "release the memory for the tablet seat object\n\nDestroy the wp_tablet_seat object. Objects created from this\nobject are unaffected and should be destroyed separately." ] pub unsafe fn zwp_tablet_seat_v2_destroy ( zwp_tablet_seat_v2 : * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_seat_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_seat_v2 as _ ) ; } } # [ doc = "a physical tablet tool\n\nAn object that represents a physical tool that has been, or is\ncurrently in use with a tablet in this seat. Each wp_tablet_tool\nobject stays valid until the client destroys it; the compositor\nreuses the wp_tablet_tool object to indicate that the object's\nrespective physical tool has come into proximity of a tablet again.\n\nA wp_tablet_tool object's relation to a physical tool depends on the\ntablet's ability to report serial numbers. If the tablet supports\nthis capability, then the object represents a specific physical tool\nand can be identified even when used on multiple tablets.\n\nA tablet tool has a number of static characteristics, e.g. tool type,\nhardware_serial and capabilities. These capabilities are sent in an\nevent sequence after the wp_tablet_seat.tool_added event before any\nactual events from this tool. This initial event sequence is\nterminated by a wp_tablet_tool.done event.\n\nTablet tool events are grouped by wp_tablet_tool.frame events.\nAny events received before a wp_tablet_tool.frame event should be\nconsidered part of the same hardware state change." ] pub mod zwp_tablet_tool_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_tool_v2 { } # [ doc = "a physical tool type\n\nDescribes the physical type of a tool. The physical type of a tool\ngenerally defines its base usage.\n\nThe mouse tool represents a mouse-shaped tool that is not a relative\ndevice but bound to the tablet's surface, providing absolute\ncoordinates.\n\nThe lens tool is a mouse-shaped tool with an attached lens to\nprovide precision focus." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum _type { # [ doc = "Pen" ] pen = 320 , # [ doc = "Eraser" ] eraser = 321 , # [ doc = "Brush" ] brush = 322 , # [ doc = "Pencil" ] pencil = 323 , # [ doc = "Airbrush" ] airbrush = 324 , # [ doc = "Finger" ] finger = 325 , # [ doc = "Mouse" ] mouse = 326 , # [ doc = "Lens" ] lens = 327 , # [ doc ( hidden ) ] __nonexhaustive , } impl _type { pub fn from_raw ( n : u32 ) -> Option < _type > { match n { 320 => Some ( _type :: pen ) , 321 => Some ( _type :: eraser ) , 322 => Some ( _type :: brush ) , 323 => Some ( _type :: pencil ) , 324 => Some ( _type :: airbrush ) , 325 => Some ( _type :: finger ) , 326 => Some ( _type :: mouse ) , 327 => Some ( _type :: lens ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "capability flags for a tool\n\nDescribes extra capabilities on a tablet.\n\nAny tool must provide x and y values, extra axes are\ndevice-specific." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum capability { # [ doc = "Tilt axes" ] tilt = 1 , # [ doc = "Pressure axis" ] pressure = 2 , # [ doc = "Distance axis" ] distance = 3 , # [ doc = "Z-rotation axis" ] rotation = 4 , # [ doc = "Slider axis" ] slider = 5 , # [ doc = "Wheel axis" ] wheel = 6 , # [ doc ( hidden ) ] __nonexhaustive , } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { match n { 1 => Some ( capability :: tilt ) , 2 => Some ( capability :: pressure ) , 3 => Some ( capability :: distance ) , 4 => Some ( capability :: rotation ) , 5 => Some ( capability :: slider ) , 6 => Some ( capability :: wheel ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "physical button state\n\nDescribes the physical state of a button that produced the button event." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum button_state { # [ doc = "button is not pressed" ] released = 0 , # [ doc = "button is pressed" ] pressed = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl button_state { pub fn from_raw ( n : u32 ) -> Option < button_state > { match n { 0 => Some ( button_state :: released ) , 1 => Some ( button_state :: pressed ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_tablet_tool_v2_requests_set_cursor_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_tool_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_cursor\0" as * const u8 as * const c_char , signature : b"u?oii\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_tool_v2_requests_set_cursor_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_tablet_tool_v2_events_proximity_in_types : [ * const wl_interface ; 3 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: zwp_tablet_v2 :: zwp_tablet_v2_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_tool_v2_events : [ wl_message ; 19 ] = [ wl_message { name : b"type\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hardware_serial\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hardware_id_wacom\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capability\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"proximity_in\0" as * const u8 as * const c_char , signature : b"uoo\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_tool_v2_events_proximity_in_types as * const _ } , } , wl_message { name : b"proximity_out\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"down\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"up\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"motion\0" as * const u8 as * const c_char , signature : b"ff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"pressure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"distance\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"tilt\0" as * const u8 as * const c_char , signature : b"ff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"rotation\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"slider\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"wheel\0" as * const u8 as * const c_char , signature : b"fi\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"button\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_tool_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_tool_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_tool_v2_requests as * const _ } , event_count : 19 , events : unsafe { & zwp_tablet_tool_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_tool_v2_listener { # [ doc = "tool type\n\nThe tool type is the high-level type of the tool and usually decides\nthe interaction expected from this tool.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn _type ( & mut self , object : * mut zwp_tablet_tool_v2 , tool_type : _type ) { } # [ doc = "unique hardware serial number of the tool\n\nIf the physical tool can be identified by a unique 64-bit serial\nnumber, this event notifies the client of this serial number.\n\nIf multiple tablets are available in the same seat and the tool is\nuniquely identifiable by the serial number, that tool may move\nbetween tablets.\n\nOtherwise, if the tool has no serial number and this event is\nmissing, the tool is tied to the tablet it first comes into\nproximity with. Even if the physical tool is used on multiple\ntablets, separate wp_tablet_tool objects will be created, one per\ntablet.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn hardware_serial ( & mut self , object : * mut zwp_tablet_tool_v2 , hardware_serial_hi : u32 , hardware_serial_lo : u32 ) { } # [ doc = "hardware id notification in Wacom's format\n\nThis event notifies the client of a hardware id available on this tool.\n\nThe hardware id is a device-specific 64-bit id that provides extra\ninformation about the tool in use, beyond the wl_tool.type\nenumeration. The format of the id is specific to tablets made by\nWacom Inc. For example, the hardware id of a Wacom Grip\nPen (a stylus) is 0x802.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn hardware_id_wacom ( & mut self , object : * mut zwp_tablet_tool_v2 , hardware_id_hi : u32 , hardware_id_lo : u32 ) { } # [ doc = "tool capability notification\n\nThis event notifies the client of any capabilities of this tool,\nbeyond the main set of x/y axes and tip up/down detection.\n\nOne event is sent for each extra capability available on this tool.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn capability ( & mut self , object : * mut zwp_tablet_tool_v2 , capability : capability ) { } # [ doc = "tool description events sequence complete\n\nThis event signals the end of the initial burst of descriptive\nevents. A client may consider the static description of the tool to\nbe complete and finalize initialization of the tool." ] fn done ( & mut self , object : * mut zwp_tablet_tool_v2 , ) { } # [ doc = "tool removed\n\nThis event is sent when the tool is removed from the system and will\nsend no further events. Should the physical tool come back into\nproximity later, a new wp_tablet_tool object will be created.\n\nIt is compositor-dependent when a tool is removed. A compositor may\nremove a tool on proximity out, tablet removal or any other reason.\nA compositor may also keep a tool alive until shutdown.\n\nIf the tool is currently in proximity, a proximity_out event will be\nsent before the removed event. See wp_tablet_tool.proximity_out for\nthe handling of any buttons logically down.\n\nWhen this event is received, the client must wp_tablet_tool.destroy\nthe object." ] fn removed ( & mut self , object : * mut zwp_tablet_tool_v2 , ) { } # [ doc = "proximity in event\n\nNotification that this tool is focused on a certain surface.\n\nThis event can be received when the tool has moved from one surface to\nanother, or when the tool has come back into proximity above the\nsurface.\n\nIf any button is logically down when the tool comes into proximity,\nthe respective button event is sent after the proximity_in event but\nwithin the same frame as the proximity_in event." ] fn proximity_in ( & mut self , object : * mut zwp_tablet_tool_v2 , serial : u32 , tablet : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "proximity out event\n\nNotification that this tool has either left proximity, or is no\nlonger focused on a certain surface.\n\nWhen the tablet tool leaves proximity of the tablet, button release\nevents are sent for each button that was held down at the time of\nleaving proximity. These events are sent before the proximity_out\nevent but within the same wp_tablet.frame.\n\nIf the tool stays within proximity of the tablet, but the focus\nchanges from one surface to another, a button release event may not\nbe sent until the button is actually released or the tool leaves the\nproximity of the tablet." ] fn proximity_out ( & mut self , object : * mut zwp_tablet_tool_v2 , ) { } # [ doc = "tablet tool is making contact\n\nSent whenever the tablet tool comes in contact with the surface of the\ntablet.\n\nIf the tool is already in contact with the tablet when entering the\ninput region, the client owning said region will receive a\nwp_tablet.proximity_in event, followed by a wp_tablet.down\nevent and a wp_tablet.frame event.\n\nNote that this event describes logical contact, not physical\ncontact. On some devices, a compositor may not consider a tool in\nlogical contact until a minimum physical pressure threshold is\nexceeded." ] fn down ( & mut self , object : * mut zwp_tablet_tool_v2 , serial : u32 ) { } # [ doc = "tablet tool is no longer making contact\n\nSent whenever the tablet tool stops making contact with the surface of\nthe tablet, or when the tablet tool moves out of the input region\nand the compositor grab (if any) is dismissed.\n\nIf the tablet tool moves out of the input region while in contact\nwith the surface of the tablet and the compositor does not have an\nongoing grab on the surface, the client owning said region will\nreceive a wp_tablet.up event, followed by a wp_tablet.proximity_out\nevent and a wp_tablet.frame event. If the compositor has an ongoing\ngrab on this device, this event sequence is sent whenever the grab\nis dismissed in the future.\n\nNote that this event describes logical contact, not physical\ncontact. On some devices, a compositor may not consider a tool out\nof logical contact until physical pressure falls below a specific\nthreshold." ] fn up ( & mut self , object : * mut zwp_tablet_tool_v2 , ) { } # [ doc = "motion event\n\nSent whenever a tablet tool moves." ] fn motion ( & mut self , object : * mut zwp_tablet_tool_v2 , x : wl_fixed_t , y : wl_fixed_t ) { } # [ doc = "pressure change event\n\nSent whenever the pressure axis on a tool changes. The value of this\nevent is normalized to a value between 0 and 65535.\n\nNote that pressure may be nonzero even when a tool is not in logical\ncontact. See the down and up events for more details." ] fn pressure ( & mut self , object : * mut zwp_tablet_tool_v2 , pressure : u32 ) { } # [ doc = "distance change event\n\nSent whenever the distance axis on a tool changes. The value of this\nevent is normalized to a value between 0 and 65535.\n\nNote that distance may be nonzero even when a tool is not in logical\ncontact. See the down and up events for more details." ] fn distance ( & mut self , object : * mut zwp_tablet_tool_v2 , distance : u32 ) { } # [ doc = "tilt change event\n\nSent whenever one or both of the tilt axes on a tool change. Each tilt\nvalue is in degrees, relative to the z-axis of the tablet.\nThe angle is positive when the top of a tool tilts along the\npositive x or y axis." ] fn tilt ( & mut self , object : * mut zwp_tablet_tool_v2 , tilt_x : wl_fixed_t , tilt_y : wl_fixed_t ) { } # [ doc = "z-rotation change event\n\nSent whenever the z-rotation axis on the tool changes. The\nrotation value is in degrees clockwise from the tool's\nlogical neutral position." ] fn rotation ( & mut self , object : * mut zwp_tablet_tool_v2 , degrees : wl_fixed_t ) { } # [ doc = "Slider position change event\n\nSent whenever the slider position on the tool changes. The\nvalue is normalized between -65535 and 65535, with 0 as the logical\nneutral position of the slider.\n\nThe slider is available on e.g. the Wacom Airbrush tool." ] fn slider ( & mut self , object : * mut zwp_tablet_tool_v2 , position : i32 ) { } # [ doc = "Wheel delta event\n\nSent whenever the wheel on the tool emits an event. This event\ncontains two values for the same axis change. The degrees value is\nin the same orientation as the wl_pointer.vertical_scroll axis. The\nclicks value is in discrete logical clicks of the mouse wheel. This\nvalue may be zero if the movement of the wheel was less\nthan one logical click.\n\nClients should choose either value and avoid mixing degrees and\nclicks. The compositor may accumulate values smaller than a logical\nclick and emulate click events when a certain threshold is met.\nThus, wl_tablet_tool.wheel events with non-zero clicks values may\nhave different degrees values." ] fn wheel ( & mut self , object : * mut zwp_tablet_tool_v2 , degrees : wl_fixed_t , clicks : i32 ) { } # [ doc = "button event\n\nSent whenever a button on the tool is pressed or released.\n\nIf a button is held down when the tool moves in or out of proximity,\nbutton events are generated by the compositor. See\nwp_tablet_tool.proximity_in and wp_tablet_tool.proximity_out for\ndetails." ] fn button ( & mut self , object : * mut zwp_tablet_tool_v2 , serial : u32 , button : u32 , state : button_state ) { } # [ doc = "frame event\n\nMarks the end of a series of axis and/or button updates from the\ntablet. The Wayland protocol requires axis updates to be sent\nsequentially, however all events within a frame should be considered\none hardware event." ] fn frame ( & mut self , object : * mut zwp_tablet_tool_v2 , time : u32 ) { } } pub unsafe fn zwp_tablet_tool_v2_set_user_data ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_tool_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_tool_v2_get_user_data ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_tool_v2 as _ ) ; } pub unsafe fn zwp_tablet_tool_v2_get_version ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_tool_v2 as _ ) ; } pub unsafe fn zwp_tablet_tool_v2_add_listener ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_tool_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_tool_v2_add_rust_listener ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 , listener : & dyn zwp_tablet_tool_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_tool_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_tool_v2_add_listener ( zwp_tablet_tool_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "set the tablet tool's surface\n\nSets the surface of the cursor used for this tool on the given\ntablet. This request only takes effect if the tool is in proximity\nof one of the requesting client's surfaces or the surface parameter\nis the current pointer surface. If there was a previous surface set\nwith this request it is replaced. If surface is NULL, the cursor\nimage is hidden.\n\nThe parameters hotspot_x and hotspot_y define the position of the\npointer surface relative to the pointer location. Its top-left corner\nis always at (x, y) - (hotspot_x, hotspot_y), where (x, y) are the\ncoordinates of the pointer location, in surface-local coordinates.\n\nOn surface.attach requests to the pointer surface, hotspot_x and\nhotspot_y are decremented by the x and y parameters passed to the\nrequest. Attach must be confirmed by wl_surface.commit as usual.\n\nThe hotspot can also be updated by passing the currently set pointer\nsurface to this request with new values for hotspot_x and hotspot_y.\n\nThe current and pending input regions of the wl_surface are cleared,\nand wl_surface.set_input_region is ignored until the wl_surface is no\nlonger used as the cursor. When the use as a cursor ends, the current\nand pending input regions become undefined, and the wl_surface is\nunmapped.\n\nThis request gives the surface the role of a wp_tablet_tool cursor. A\nsurface may only ever be used as the cursor surface for one\nwp_tablet_tool. If the surface already has another role or has\npreviously been used as cursor surface for a different tool, a\nprotocol error is raised." ] pub unsafe fn zwp_tablet_tool_v2_set_cursor ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 , serial : u32 , surface : * mut super :: wl_surface :: wl_surface , hotspot_x : i32 , hotspot_y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_tool_v2 as _ , 0u32 , serial , surface , hotspot_x , hotspot_y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the tool object\n\nThis destroys the client's resource for this tool object." ] pub unsafe fn zwp_tablet_tool_v2_destroy ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_tool_v2 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_tool_v2 as _ ) ; } } # [ doc = "graphics tablet device\n\nThe wp_tablet interface represents one graphics tablet device. The\ntablet interface itself does not generate events; all events are\ngenerated by wp_tablet_tool objects when in proximity above a tablet.\n\nA tablet has a number of static characteristics, e.g. device name and\npid/vid. These capabilities are sent in an event sequence after the\nwp_tablet_seat.tablet_added event. This initial event sequence is\nterminated by a wp_tablet.done event." ] pub mod zwp_tablet_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_v2 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_v2_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_v2_events : [ wl_message ; 5 ] = [ wl_message { name : b"name\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"id\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"path\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_tablet_v2_requests as * const _ } , event_count : 5 , events : unsafe { & zwp_tablet_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_v2_listener { # [ doc = "tablet device name\n\nThis event is sent in the initial burst of events before the\nwp_tablet.done event." ] fn name ( & mut self , object : * mut zwp_tablet_v2 , name : * mut c_char ) { } # [ doc = "tablet device USB vendor/product id\n\nThis event is sent in the initial burst of events before the\nwp_tablet.done event." ] fn id ( & mut self , object : * mut zwp_tablet_v2 , vid : u32 , pid : u32 ) { } # [ doc = "path to the device\n\nA system-specific device path that indicates which device is behind\nthis wp_tablet. This information may be used to gather additional\ninformation about the device, e.g. through libwacom.\n\nA device may have more than one device path. If so, multiple\nwp_tablet.path events are sent. A device may be emulated and not\nhave a device path, and in that case this event will not be sent.\n\nThe format of the path is unspecified, it may be a device node, a\nsysfs path, or some other identifier. It is up to the client to\nidentify the string provided.\n\nThis event is sent in the initial burst of events before the\nwp_tablet.done event." ] fn path ( & mut self , object : * mut zwp_tablet_v2 , path : * mut c_char ) { } # [ doc = "tablet description events sequence complete\n\nThis event is sent immediately to signal the end of the initial\nburst of descriptive events. A client may consider the static\ndescription of the tablet to be complete and finalize initialization\nof the tablet." ] fn done ( & mut self , object : * mut zwp_tablet_v2 , ) { } # [ doc = "tablet removed event\n\nSent when the tablet has been removed from the system. When a tablet\nis removed, some tools may be removed.\n\nWhen this event is received, the client must wp_tablet.destroy\nthe object." ] fn removed ( & mut self , object : * mut zwp_tablet_v2 , ) { } } pub unsafe fn zwp_tablet_v2_set_user_data ( zwp_tablet_v2 : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_v2_get_user_data ( zwp_tablet_v2 : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_v2 as _ ) ; } pub unsafe fn zwp_tablet_v2_get_version ( zwp_tablet_v2 : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_v2 as _ ) ; } pub unsafe fn zwp_tablet_v2_add_listener ( zwp_tablet_v2 : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_v2_add_rust_listener ( zwp_tablet_v2 : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 , listener : & dyn zwp_tablet_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_v2_add_listener ( zwp_tablet_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the tablet object\n\nThis destroys the client's resource for this tablet object." ] pub unsafe fn zwp_tablet_v2_destroy ( zwp_tablet_v2 : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_v2 as _ ) ; } } # [ doc = "pad ring\n\nA circular interaction area, such as the touch ring on the Wacom Intuos\nPro series tablets.\n\nEvents on a ring are logically grouped by the wl_tablet_pad_ring.frame\nevent." ] pub mod zwp_tablet_pad_ring_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_pad_ring_v2 { } # [ doc = "ring axis source\n\nDescribes the source types for ring events. This indicates to the\nclient how a ring event was physically generated; a client may\nadjust the user interface accordingly. For example, events\nfrom a \"finger\" source may trigger kinetic scrolling." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum source { # [ doc = "finger" ] finger = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl source { pub fn from_raw ( n : u32 ) -> Option < source > { match n { 1 => Some ( source :: finger ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_ring_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_feedback\0" as * const u8 as * const c_char , signature : b"su\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_ring_v2_events : [ wl_message ; 4 ] = [ wl_message { name : b"source\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"angle\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"stop\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_pad_ring_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_pad_ring_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_pad_ring_v2_requests as * const _ } , event_count : 4 , events : unsafe { & zwp_tablet_pad_ring_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_pad_ring_v2_listener { # [ doc = "ring event source\n\nSource information for ring events.\n\nThis event does not occur on its own. It is sent before a\nwp_tablet_pad_ring.frame event and carries the source information\nfor all events within that frame.\n\nThe source specifies how this event was generated. If the source is\nwp_tablet_pad_ring.source.finger, a wp_tablet_pad_ring.stop event\nwill be sent when the user lifts the finger off the device.\n\nThis event is optional. If the source is unknown for an interaction,\nno event is sent." ] fn source ( & mut self , object : * mut zwp_tablet_pad_ring_v2 , source : source ) { } # [ doc = "angle changed\n\nSent whenever the angle on a ring changes.\n\nThe angle is provided in degrees clockwise from the logical\nnorth of the ring in the pad's current rotation." ] fn angle ( & mut self , object : * mut zwp_tablet_pad_ring_v2 , degrees : wl_fixed_t ) { } # [ doc = "interaction stopped\n\nStop notification for ring events.\n\nFor some wp_tablet_pad_ring.source types, a wp_tablet_pad_ring.stop\nevent is sent to notify a client that the interaction with the ring\nhas terminated. This enables the client to implement kinetic scrolling.\nSee the wp_tablet_pad_ring.source documentation for information on\nwhen this event may be generated.\n\nAny wp_tablet_pad_ring.angle events with the same source after this\nevent should be considered as the start of a new interaction." ] fn stop ( & mut self , object : * mut zwp_tablet_pad_ring_v2 , ) { } # [ doc = "end of a ring event sequence\n\nIndicates the end of a set of ring events that logically belong\ntogether. A client is expected to accumulate the data in all events\nwithin the frame before proceeding.\n\nAll wp_tablet_pad_ring events before a wp_tablet_pad_ring.frame event belong\nlogically together. For example, on termination of a finger interaction\non a ring the compositor will send a wp_tablet_pad_ring.source event,\na wp_tablet_pad_ring.stop event and a wp_tablet_pad_ring.frame event.\n\nA wp_tablet_pad_ring.frame event is sent for every logical event\ngroup, even if the group only contains a single wp_tablet_pad_ring\nevent. Specifically, a client may get a sequence: angle, frame,\nangle, frame, etc." ] fn frame ( & mut self , object : * mut zwp_tablet_pad_ring_v2 , time : u32 ) { } } pub unsafe fn zwp_tablet_pad_ring_v2_set_user_data ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_pad_ring_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_pad_ring_v2_get_user_data ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_pad_ring_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_ring_v2_get_version ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_pad_ring_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_ring_v2_add_listener ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_pad_ring_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_pad_ring_v2_add_rust_listener ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 , listener : & dyn zwp_tablet_pad_ring_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_pad_ring_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_pad_ring_v2_add_listener ( zwp_tablet_pad_ring_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "set compositor feedback\n\nRequest that the compositor use the provided feedback string\nassociated with this ring. This request should be issued immediately\nafter a wp_tablet_pad_group.mode_switch event from the corresponding\ngroup is received, or whenever the ring is mapped to a different\naction. See wp_tablet_pad_group.mode_switch for more details.\n\nClients are encouraged to provide context-aware descriptions for\nthe actions associated with the ring; compositors may use this\ninformation to offer visual feedback about the button layout\n(eg. on-screen displays).\n\nThe provided string 'description' is a UTF-8 encoded string to be\nassociated with this ring, and is considered user-visible; general\ninternationalization rules apply.\n\nThe serial argument will be that of the last\nwp_tablet_pad_group.mode_switch event received for the group of this\nring. Requests providing other serials than the most recent one will be\nignored." ] pub unsafe fn zwp_tablet_pad_ring_v2_set_feedback ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 , description : * const c_char , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_ring_v2 as _ , 0u32 , description , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the ring object\n\nThis destroys the client's resource for this ring object." ] pub unsafe fn zwp_tablet_pad_ring_v2_destroy ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_ring_v2 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_pad_ring_v2 as _ ) ; } } # [ doc = "pad strip\n\nA linear interaction area, such as the strips found in Wacom Cintiq\nmodels.\n\nEvents on a strip are logically grouped by the wl_tablet_pad_strip.frame\nevent." ] pub mod zwp_tablet_pad_strip_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_pad_strip_v2 { } # [ doc = "strip axis source\n\nDescribes the source types for strip events. This indicates to the\nclient how a strip event was physically generated; a client may\nadjust the user interface accordingly. For example, events\nfrom a \"finger\" source may trigger kinetic scrolling." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum source { # [ doc = "finger" ] finger = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl source { pub fn from_raw ( n : u32 ) -> Option < source > { match n { 1 => Some ( source :: finger ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_strip_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_feedback\0" as * const u8 as * const c_char , signature : b"su\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_strip_v2_events : [ wl_message ; 4 ] = [ wl_message { name : b"source\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"position\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"stop\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_pad_strip_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_pad_strip_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_pad_strip_v2_requests as * const _ } , event_count : 4 , events : unsafe { & zwp_tablet_pad_strip_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_pad_strip_v2_listener { # [ doc = "strip event source\n\nSource information for strip events.\n\nThis event does not occur on its own. It is sent before a\nwp_tablet_pad_strip.frame event and carries the source information\nfor all events within that frame.\n\nThe source specifies how this event was generated. If the source is\nwp_tablet_pad_strip.source.finger, a wp_tablet_pad_strip.stop event\nwill be sent when the user lifts their finger off the device.\n\nThis event is optional. If the source is unknown for an interaction,\nno event is sent." ] fn source ( & mut self , object : * mut zwp_tablet_pad_strip_v2 , source : source ) { } # [ doc = "position changed\n\nSent whenever the position on a strip changes.\n\nThe position is normalized to a range of [0, 65535], the 0-value\nrepresents the top-most and/or left-most position of the strip in\nthe pad's current rotation." ] fn position ( & mut self , object : * mut zwp_tablet_pad_strip_v2 , position : u32 ) { } # [ doc = "interaction stopped\n\nStop notification for strip events.\n\nFor some wp_tablet_pad_strip.source types, a wp_tablet_pad_strip.stop\nevent is sent to notify a client that the interaction with the strip\nhas terminated. This enables the client to implement kinetic\nscrolling. See the wp_tablet_pad_strip.source documentation for\ninformation on when this event may be generated.\n\nAny wp_tablet_pad_strip.position events with the same source after this\nevent should be considered as the start of a new interaction." ] fn stop ( & mut self , object : * mut zwp_tablet_pad_strip_v2 , ) { } # [ doc = "end of a strip event sequence\n\nIndicates the end of a set of events that represent one logical\nhardware strip event. A client is expected to accumulate the data\nin all events within the frame before proceeding.\n\nAll wp_tablet_pad_strip events before a wp_tablet_pad_strip.frame event belong\nlogically together. For example, on termination of a finger interaction\non a strip the compositor will send a wp_tablet_pad_strip.source event,\na wp_tablet_pad_strip.stop event and a wp_tablet_pad_strip.frame\nevent.\n\nA wp_tablet_pad_strip.frame event is sent for every logical event\ngroup, even if the group only contains a single wp_tablet_pad_strip\nevent. Specifically, a client may get a sequence: position, frame,\nposition, frame, etc." ] fn frame ( & mut self , object : * mut zwp_tablet_pad_strip_v2 , time : u32 ) { } } pub unsafe fn zwp_tablet_pad_strip_v2_set_user_data ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_pad_strip_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_pad_strip_v2_get_user_data ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_pad_strip_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_strip_v2_get_version ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_pad_strip_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_strip_v2_add_listener ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_pad_strip_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_pad_strip_v2_add_rust_listener ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 , listener : & dyn zwp_tablet_pad_strip_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_pad_strip_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_pad_strip_v2_add_listener ( zwp_tablet_pad_strip_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "set compositor feedback\n\nRequests the compositor to use the provided feedback string\nassociated with this strip. This request should be issued immediately\nafter a wp_tablet_pad_group.mode_switch event from the corresponding\ngroup is received, or whenever the strip is mapped to a different\naction. See wp_tablet_pad_group.mode_switch for more details.\n\nClients are encouraged to provide context-aware descriptions for\nthe actions associated with the strip, and compositors may use this\ninformation to offer visual feedback about the button layout\n(eg. on-screen displays).\n\nThe provided string 'description' is a UTF-8 encoded string to be\nassociated with this ring, and is considered user-visible; general\ninternationalization rules apply.\n\nThe serial argument will be that of the last\nwp_tablet_pad_group.mode_switch event received for the group of this\nstrip. Requests providing other serials than the most recent one will be\nignored." ] pub unsafe fn zwp_tablet_pad_strip_v2_set_feedback ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 , description : * const c_char , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_strip_v2 as _ , 0u32 , description , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the strip object\n\nThis destroys the client's resource for this strip object." ] pub unsafe fn zwp_tablet_pad_strip_v2_destroy ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_strip_v2 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_pad_strip_v2 as _ ) ; } } # [ doc = "a set of buttons, rings and strips\n\nA pad group describes a distinct (sub)set of buttons, rings and strips\npresent in the tablet. The criteria of this grouping is usually positional,\neg. if a tablet has buttons on the left and right side, 2 groups will be\npresented. The physical arrangement of groups is undisclosed and may\nchange on the fly.\n\nPad groups will announce their features during pad initialization. Between\nthe corresponding wp_tablet_pad.group event and wp_tablet_pad_group.done, the\npad group will announce the buttons, rings and strips contained in it,\nplus the number of supported modes.\n\nModes are a mechanism to allow multiple groups of actions for every element\nin the pad group. The number of groups and available modes in each is\npersistent across device plugs. The current mode is user-switchable, it\nwill be announced through the wp_tablet_pad_group.mode_switch event both\nwhenever it is switched, and after wp_tablet_pad.enter.\n\nThe current mode logically applies to all elements in the pad group,\nalthough it is at clients' discretion whether to actually perform different\nactions, and/or issue the respective .set_feedback requests to notify the\ncompositor. See the wp_tablet_pad_group.mode_switch event for more details." ] pub mod zwp_tablet_pad_group_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_pad_group_v2 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_group_v2_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_tablet_pad_group_v2_events_ring_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2_interface as * const wl_interface } , ] ; static mut zwp_tablet_pad_group_v2_events_strip_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_group_v2_events : [ wl_message ; 6 ] = [ wl_message { name : b"buttons\0" as * const u8 as * const c_char , signature : b"a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"ring\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_pad_group_v2_events_ring_types as * const _ } , } , wl_message { name : b"strip\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_pad_group_v2_events_strip_types as * const _ } , } , wl_message { name : b"modes\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"mode_switch\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_pad_group_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_pad_group_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_tablet_pad_group_v2_requests as * const _ } , event_count : 6 , events : unsafe { & zwp_tablet_pad_group_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_pad_group_v2_listener { # [ doc = "buttons announced\n\nSent on wp_tablet_pad_group initialization to announce the available\nbuttons in the group. Button indices start at 0, a button may only be\nin one group at a time.\n\nThis event is first sent in the initial burst of events before the\nwp_tablet_pad_group.done event.\n\nSome buttons are reserved by the compositor. These buttons may not be\nassigned to any wp_tablet_pad_group. Compositors may broadcast this\nevent in the case of changes to the mapping of these reserved buttons.\nIf the compositor happens to reserve all buttons in a group, this event\nwill be sent with an empty array." ] fn buttons ( & mut self , object : * mut zwp_tablet_pad_group_v2 , buttons : * mut wl_array ) { } # [ doc = "ring announced\n\nSent on wp_tablet_pad_group initialization to announce available rings.\nOne event is sent for each ring available on this pad group.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_pad_group.done event." ] fn ring ( & mut self , object : * mut zwp_tablet_pad_group_v2 , ring : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 ) { } # [ doc = "strip announced\n\nSent on wp_tablet_pad initialization to announce available strips.\nOne event is sent for each strip available on this pad group.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_pad_group.done event." ] fn strip ( & mut self , object : * mut zwp_tablet_pad_group_v2 , strip : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 ) { } # [ doc = "mode-switch ability announced\n\nSent on wp_tablet_pad_group initialization to announce that the pad\ngroup may switch between modes. A client may use a mode to store a\nspecific configuration for buttons, rings and strips and use the\nwl_tablet_pad_group.mode_switch event to toggle between these\nconfigurations. Mode indices start at 0.\n\nSwitching modes is compositor-dependent. See the\nwp_tablet_pad_group.mode_switch event for more details.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_pad_group.done event. This event is only sent when more than\nmore than one mode is available." ] fn modes ( & mut self , object : * mut zwp_tablet_pad_group_v2 , modes : u32 ) { } # [ doc = "tablet group description events sequence complete\n\nThis event is sent immediately to signal the end of the initial\nburst of descriptive events. A client may consider the static\ndescription of the tablet to be complete and finalize initialization\nof the tablet group." ] fn done ( & mut self , object : * mut zwp_tablet_pad_group_v2 , ) { } # [ doc = "mode switch event\n\nNotification that the mode was switched.\n\nA mode applies to all buttons, rings and strips in a group\nsimultaneously, but a client is not required to assign different actions\nfor each mode. For example, a client may have mode-specific button\nmappings but map the ring to vertical scrolling in all modes. Mode\nindices start at 0.\n\nSwitching modes is compositor-dependent. The compositor may provide\nvisual cues to the client about the mode, e.g. by toggling LEDs on\nthe tablet device. Mode-switching may be software-controlled or\ncontrolled by one or more physical buttons. For example, on a Wacom\nIntuos Pro, the button inside the ring may be assigned to switch\nbetween modes.\n\nThe compositor will also send this event after wp_tablet_pad.enter on\neach group in order to notify of the current mode. Groups that only\nfeature one mode will use mode=0 when emitting this event.\n\nIf a button action in the new mode differs from the action in the\nprevious mode, the client should immediately issue a\nwp_tablet_pad.set_feedback request for each changed button.\n\nIf a ring or strip action in the new mode differs from the action\nin the previous mode, the client should immediately issue a\nwp_tablet_ring.set_feedback or wp_tablet_strip.set_feedback request\nfor each changed ring or strip." ] fn mode_switch ( & mut self , object : * mut zwp_tablet_pad_group_v2 , time : u32 , serial : u32 , mode : u32 ) { } } pub unsafe fn zwp_tablet_pad_group_v2_set_user_data ( zwp_tablet_pad_group_v2 : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_pad_group_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_pad_group_v2_get_user_data ( zwp_tablet_pad_group_v2 : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_pad_group_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_group_v2_get_version ( zwp_tablet_pad_group_v2 : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_pad_group_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_group_v2_add_listener ( zwp_tablet_pad_group_v2 : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_pad_group_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_pad_group_v2_add_rust_listener ( zwp_tablet_pad_group_v2 : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 , listener : & dyn zwp_tablet_pad_group_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_pad_group_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_pad_group_v2_add_listener ( zwp_tablet_pad_group_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the pad object\n\nDestroy the wp_tablet_pad_group object. Objects created from this object\nare unaffected and should be destroyed separately." ] pub unsafe fn zwp_tablet_pad_group_v2_destroy ( zwp_tablet_pad_group_v2 : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_group_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_pad_group_v2 as _ ) ; } } # [ doc = "a set of buttons, rings and strips\n\nA pad device is a set of buttons, rings and strips\nusually physically present on the tablet device itself. Some\nexceptions exist where the pad device is physically detached, e.g. the\nWacom ExpressKey Remote.\n\nPad devices have no axes that control the cursor and are generally\nauxiliary devices to the tool devices used on the tablet surface.\n\nA pad device has a number of static characteristics, e.g. the number\nof rings. These capabilities are sent in an event sequence after the\nwp_tablet_seat.pad_added event before any actual events from this pad.\nThis initial event sequence is terminated by a wp_tablet_pad.done\nevent.\n\nAll pad features (buttons, rings and strips) are logically divided into\ngroups and all pads have at least one group. The available groups are\nnotified through the wp_tablet_pad.group event; the compositor will\nemit one event per group before emitting wp_tablet_pad.done.\n\nGroups may have multiple modes. Modes allow clients to map multiple\nactions to a single pad feature. Only one mode can be active per group,\nalthough different groups may have different active modes." ] pub mod zwp_tablet_pad_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_pad_v2 { } # [ doc = "physical button state\n\nDescribes the physical state of a button that caused the button\nevent." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum button_state { # [ doc = "the button is not pressed" ] released = 0 , # [ doc = "the button is pressed" ] pressed = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl button_state { pub fn from_raw ( n : u32 ) -> Option < button_state > { match n { 0 => Some ( button_state :: released ) , 1 => Some ( button_state :: pressed ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_feedback\0" as * const u8 as * const c_char , signature : b"usu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_tablet_pad_v2_events_group_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2_interface as * const wl_interface } , ] ; static mut zwp_tablet_pad_v2_events_enter_types : [ * const wl_interface ; 3 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: zwp_tablet_v2 :: zwp_tablet_v2_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut zwp_tablet_pad_v2_events_leave_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_v2_events : [ wl_message ; 8 ] = [ wl_message { name : b"group\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_pad_v2_events_group_types as * const _ } , } , wl_message { name : b"path\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"buttons\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"button\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"uoo\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_pad_v2_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"uo\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_pad_v2_events_leave_types as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_pad_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_pad_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_pad_v2_requests as * const _ } , event_count : 8 , events : unsafe { & zwp_tablet_pad_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_pad_v2_listener { # [ doc = "group announced\n\nSent on wp_tablet_pad initialization to announce available groups.\nOne event is sent for each pad group available.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_pad.done event. At least one group will be announced." ] fn group ( & mut self , object : * mut zwp_tablet_pad_v2 , pad_group : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 ) { } # [ doc = "path to the device\n\nA system-specific device path that indicates which device is behind\nthis wp_tablet_pad. This information may be used to gather additional\ninformation about the device, e.g. through libwacom.\n\nThe format of the path is unspecified, it may be a device node, a\nsysfs path, or some other identifier. It is up to the client to\nidentify the string provided.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_pad.done event." ] fn path ( & mut self , object : * mut zwp_tablet_pad_v2 , path : * mut c_char ) { } # [ doc = "buttons announced\n\nSent on wp_tablet_pad initialization to announce the available\nbuttons.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_pad.done event. This event is only sent when at least one\nbutton is available." ] fn buttons ( & mut self , object : * mut zwp_tablet_pad_v2 , buttons : u32 ) { } # [ doc = "pad description event sequence complete\n\nThis event signals the end of the initial burst of descriptive\nevents. A client may consider the static description of the pad to\nbe complete and finalize initialization of the pad." ] fn done ( & mut self , object : * mut zwp_tablet_pad_v2 , ) { } # [ doc = "physical button state\n\nSent whenever the physical state of a button changes." ] fn button ( & mut self , object : * mut zwp_tablet_pad_v2 , time : u32 , button : u32 , state : button_state ) { } # [ doc = "enter event\n\nNotification that this pad is focused on the specified surface." ] fn enter ( & mut self , object : * mut zwp_tablet_pad_v2 , serial : u32 , tablet : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "enter event\n\nNotification that this pad is no longer focused on the specified\nsurface." ] fn leave ( & mut self , object : * mut zwp_tablet_pad_v2 , serial : u32 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "pad removed event\n\nSent when the pad has been removed from the system. When a tablet\nis removed its pad(s) will be removed too.\n\nWhen this event is received, the client must destroy all rings, strips\nand groups that were offered by this pad, and issue wp_tablet_pad.destroy\nthe pad itself." ] fn removed ( & mut self , object : * mut zwp_tablet_pad_v2 , ) { } } pub unsafe fn zwp_tablet_pad_v2_set_user_data ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_pad_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_pad_v2_get_user_data ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_pad_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_v2_get_version ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_pad_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_v2_add_listener ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_pad_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_pad_v2_add_rust_listener ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 , listener : & dyn zwp_tablet_pad_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_pad_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_pad_v2_add_listener ( zwp_tablet_pad_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "set compositor feedback\n\nRequests the compositor to use the provided feedback string\nassociated with this button. This request should be issued immediately\nafter a wp_tablet_pad_group.mode_switch event from the corresponding\ngroup is received, or whenever a button is mapped to a different\naction. See wp_tablet_pad_group.mode_switch for more details.\n\nClients are encouraged to provide context-aware descriptions for\nthe actions associated with each button, and compositors may use\nthis information to offer visual feedback on the button layout\n(e.g. on-screen displays).\n\nButton indices start at 0. Setting the feedback string on a button\nthat is reserved by the compositor (i.e. not belonging to any\nwp_tablet_pad_group) does not generate an error but the compositor\nis free to ignore the request.\n\nThe provided string 'description' is a UTF-8 encoded string to be\nassociated with this ring, and is considered user-visible; general\ninternationalization rules apply.\n\nThe serial argument will be that of the last\nwp_tablet_pad_group.mode_switch event received for the group of this\nbutton. Requests providing other serials than the most recent one will\nbe ignored." ] pub unsafe fn zwp_tablet_pad_v2_set_feedback ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 , button : u32 , description : * const c_char , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_v2 as _ , 0u32 , button , description , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the pad object\n\nDestroy the wp_tablet_pad object. Objects created from this object\nare unaffected and should be destroyed separately." ] pub unsafe fn zwp_tablet_pad_v2_destroy ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_v2 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_pad_v2 as _ ) ; } } } pub mod wl_eglstream_controller { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod wl_eglstream_controller { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_eglstream_controller { } # [ doc = "Stream present mode\n\n- dont_care: Using this enum will tell the server to make its own\ndecisions regarding present mode.\n\n- fifo: Tells the server to use a fifo present mode. The decision to\nuse fifo synchronous is left up to the server.\n\n- mailbox: Tells the server to use a mailbox present mode." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum present_mode { # [ doc = "Let the Server decide present mode" ] dont_care = 0 , # [ doc = "Use a fifo present mode" ] fifo = 1 , # [ doc = "Use a mailbox mode" ] mailbox = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl present_mode { pub fn from_raw ( n : u32 ) -> Option < present_mode > { match n { 0 => Some ( present_mode :: dont_care ) , 1 => Some ( present_mode :: fifo ) , 2 => Some ( present_mode :: mailbox ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "Stream consumer attachment attributes\n\n- present_mode: Must be one of wl_eglstream_controller_present_mode. Tells the\nserver the desired present mode that should be used.\n\n- fifo_length: Only valid when the present_mode attrib is provided and its\nvalue is specified as fifo. Tells the server the desired fifo\nlength to be used when the desired present_mode is fifo." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum attrib { # [ doc = "Tells the server the desired present mode" ] present_mode = 0 , # [ doc = "Tells the server the desired fifo length when the desired presenation_mode is fifo." ] fifo_length = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl attrib { pub fn from_raw ( n : u32 ) -> Option < attrib > { match n { 0 => Some ( attrib :: present_mode ) , 1 => Some ( attrib :: fifo_length ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_eglstream_controller_requests_attach_eglstream_consumer_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut wl_eglstream_controller_requests_attach_eglstream_consumer_attribs_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_eglstream_controller_requests : [ wl_message ; 2 ] = [ wl_message { name : b"attach_eglstream_consumer\0" as * const u8 as * const c_char , signature : b"oo\0" as * const u8 as * const c_char , types : unsafe { & wl_eglstream_controller_requests_attach_eglstream_consumer_types as * const _ } , } , wl_message { name : b"attach_eglstream_consumer_attribs\0" as * const u8 as * const c_char , signature : b"2ooa\0" as * const u8 as * const c_char , types : unsafe { & wl_eglstream_controller_requests_attach_eglstream_consumer_attribs_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_eglstream_controller_interface : wl_interface = wl_interface { name : b"wl_eglstream_controller\0" as * const u8 as * const c_char , version : 2 , request_count : 2 , requests : unsafe { & wl_eglstream_controller_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_eglstream_controller_listener { } pub unsafe fn wl_eglstream_controller_set_user_data ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_eglstream_controller as _ , user_data ) ; } pub unsafe fn wl_eglstream_controller_get_user_data ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_eglstream_controller as _ ) ; } pub unsafe fn wl_eglstream_controller_get_version ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_eglstream_controller as _ ) ; } pub unsafe fn wl_eglstream_controller_add_listener ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_eglstream_controller as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_eglstream_controller_add_rust_listener ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller , listener : & dyn wl_eglstream_controller_listener ) -> bool { let to = ( listener as * const dyn wl_eglstream_controller_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_eglstream_controller_add_listener ( wl_eglstream_controller as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_eglstream_controller_destroy ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_eglstream_controller as _ ) ; } # [ doc = "Create server stream and attach consumer\n\nCreates the corresponding server side EGLStream from the given wl_buffer\nand attaches a consumer to it." ] pub unsafe fn wl_eglstream_controller_attach_eglstream_consumer ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller , wl_surface : * mut super :: wl_surface :: wl_surface , wl_resource : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_eglstream_controller as _ , 0u32 , wl_surface , wl_resource , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Create server stream and attach consumer using attributes\n\nCreates the corresponding server side EGLStream from the given wl_buffer\nand attaches a consumer to it using the given attributes." ] pub unsafe fn wl_eglstream_controller_attach_eglstream_consumer_attribs ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller , wl_surface : * mut super :: wl_surface :: wl_surface , wl_resource : * mut super :: wl_buffer :: wl_buffer , attribs : * mut wl_array ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_eglstream_controller as _ , 1u32 , wl_surface , wl_resource , attribs , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod linux_dmabuf_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "factory for creating dmabuf-based wl_buffers\n\nFollowing the interfaces from:\nhttps://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt\nhttps://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import_modifiers.txt\nand the Linux DRM sub-system's AddFb2 ioctl.\n\nThis interface offers ways to create generic dmabuf-based\nwl_buffers. Immediately after a client binds to this interface,\nthe set of supported formats and format modifiers is sent with\n'format' and 'modifier' events.\n\nThe following are required from clients:\n\n- Clients must ensure that either all data in the dma-buf is\ncoherent for all subsequent read access or that coherency is\ncorrectly handled by the underlying kernel-side dma-buf\nimplementation.\n\n- Don't make any more attachments after sending the buffer to the\ncompositor. Making more attachments later increases the risk of\nthe compositor not being able to use (re-import) an existing\ndmabuf-based wl_buffer.\n\nThe underlying graphics stack must ensure the following:\n\n- The dmabuf file descriptors relayed to the server will stay valid\nfor the whole lifetime of the wl_buffer. This means the server may\nat any time use those fds to import the dmabuf into any kernel\nsub-system that might accept it.\n\nHowever, when the underlying graphics stack fails to deliver the\npromise, because of e.g. a device hot-unplug which raises internal\nerrors, after the wl_buffer has been successfully created the\ncompositor must not raise protocol errors to the client when dmabuf\nimport later fails.\n\nTo create a wl_buffer from one or more dmabufs, a client creates a\nzwp_linux_dmabuf_params_v1 object with a zwp_linux_dmabuf_v1.create_params\nrequest. All planes required by the intended format are added with\nthe 'add' request. Finally, a 'create' or 'create_immed' request is\nissued, which has the following outcome depending on the import success.\n\nThe 'create' request,\n- on success, triggers a 'created' event which provides the final\nwl_buffer to the client.\n- on failure, triggers a 'failed' event to convey that the server\ncannot use the dmabufs received from the client.\n\nFor the 'create_immed' request,\n- on success, the server immediately imports the added dmabufs to\ncreate a wl_buffer. No event is sent from the server in this case.\n- on failure, the server can choose to either:\n- terminate the client by raising a fatal error.\n- mark the wl_buffer as failed, and send a 'failed' event to the\nclient. If the client uses a failed wl_buffer as an argument to any\nrequest, the behaviour is compositor implementation-defined.\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_linux_dmabuf_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_linux_dmabuf_v1 { } static mut zwp_linux_dmabuf_v1_requests_create_params_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_dmabuf_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_params\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_linux_dmabuf_v1_requests_create_params_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_dmabuf_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifier\0" as * const u8 as * const c_char , signature : b"3uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_linux_dmabuf_v1_interface : wl_interface = wl_interface { name : b"zwp_linux_dmabuf_v1\0" as * const u8 as * const c_char , version : 3 , request_count : 2 , requests : unsafe { & zwp_linux_dmabuf_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_linux_dmabuf_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_linux_dmabuf_v1_listener { # [ doc = "supported buffer format\n\nThis event advertises one buffer format that the server supports.\nAll the supported formats are advertised once when the client\nbinds to this interface. A roundtrip after binding guarantees\nthat the client has received all supported formats.\n\nFor the definition of the format codes, see the\nzwp_linux_buffer_params_v1::create request.\n\nWarning: the 'format' event is likely to be deprecated and replaced\nwith the 'modifier' event introduced in zwp_linux_dmabuf_v1\nversion 3, described below. Please refrain from using the information\nreceived from this event." ] fn format ( & mut self , object : * mut zwp_linux_dmabuf_v1 , format : u32 ) { } # [ doc = "supported buffer format modifier\n\nThis event advertises the formats that the server supports, along with\nthe modifiers supported for each format. All the supported modifiers\nfor all the supported formats are advertised once when the client\nbinds to this interface. A roundtrip after binding guarantees that\nthe client has received all supported format-modifier pairs.\n\nFor legacy support, DRM_FORMAT_MOD_INVALID (that is, modifier_hi ==\n0x00ffffff and modifier_lo == 0xffffffff) is allowed in this event.\nIt indicates that the server can support the format with an implicit\nmodifier. When a plane has DRM_FORMAT_MOD_INVALID as its modifier, it\nis as if no explicit modifier is specified. The effective modifier\nwill be derived from the dmabuf.\n\nA compositor that sends valid modifiers and DRM_FORMAT_MOD_INVALID for\na given format supports both explicit modifiers and implicit modifiers.\n\nFor the definition of the format and modifier codes, see the\nzwp_linux_buffer_params_v1::create and zwp_linux_buffer_params_v1::add\nrequests.\n\nOnly available since version 3 of the interface." ] fn modifier ( & mut self , object : * mut zwp_linux_dmabuf_v1 , format : u32 , modifier_hi : u32 , modifier_lo : u32 ) { } } pub unsafe fn zwp_linux_dmabuf_v1_set_user_data ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_linux_dmabuf_v1 as _ , user_data ) ; } pub unsafe fn zwp_linux_dmabuf_v1_get_user_data ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_linux_dmabuf_v1 as _ ) ; } pub unsafe fn zwp_linux_dmabuf_v1_get_version ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_linux_dmabuf_v1 as _ ) ; } pub unsafe fn zwp_linux_dmabuf_v1_add_listener ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_linux_dmabuf_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_linux_dmabuf_v1_add_rust_listener ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 , listener : & dyn zwp_linux_dmabuf_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_linux_dmabuf_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_linux_dmabuf_v1_add_listener ( zwp_linux_dmabuf_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "unbind the factory\n\nObjects created through this interface, especially wl_buffers, will\nremain valid." ] pub unsafe fn zwp_linux_dmabuf_v1_destroy ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_dmabuf_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_linux_dmabuf_v1 as _ ) ; } # [ doc = "create a temporary object for buffer parameters\n\nThis temporary object is used to collect multiple dmabuf handles into\na single batch to create a wl_buffer. It can only be used once and\nshould be destroyed after a 'created' or 'failed' event has been\nreceived." ] pub unsafe fn zwp_linux_dmabuf_v1_create_params ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 ) -> * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_linux_dmabuf_v1 as _ , 1u32 , & super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "parameters for creating a dmabuf-based wl_buffer\n\nThis temporary object is a collection of dmabufs and other\nparameters that together form a single logical buffer. The temporary\nobject may eventually create one wl_buffer unless cancelled by\ndestroying it before requesting 'create'.\n\nSingle-planar formats only require one dmabuf, however\nmulti-planar formats may require more than one dmabuf. For all\nformats, an 'add' request must be called once per plane (even if the\nunderlying dmabuf fd is identical).\n\nYou must use consecutive plane indices ('plane_idx' argument for 'add')\nfrom zero to the number of planes used by the drm_fourcc format code.\nAll planes required by the format must be given exactly once, but can\nbe given in any order. Each plane index can be set only once." ] pub mod zwp_linux_buffer_params_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_linux_buffer_params_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "the dmabuf_batch object has already been used to create a wl_buffer" ] already_used = 0 , # [ doc = "plane index out of bounds" ] plane_idx = 1 , # [ doc = "the plane index was already set" ] plane_set = 2 , # [ doc = "missing or too many planes to create a buffer" ] incomplete = 3 , # [ doc = "format not supported" ] invalid_format = 4 , # [ doc = "invalid width or height" ] invalid_dimensions = 5 , # [ doc = "offset + stride * height goes out of dmabuf bounds" ] out_of_bounds = 6 , # [ doc = "invalid wl_buffer resulted from importing dmabufs via the create_immed request on given buffer_params" ] invalid_wl_buffer = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: already_used ) , 1 => Some ( error :: plane_idx ) , 2 => Some ( error :: plane_set ) , 3 => Some ( error :: incomplete ) , 4 => Some ( error :: invalid_format ) , 5 => Some ( error :: invalid_dimensions ) , 6 => Some ( error :: out_of_bounds ) , 7 => Some ( error :: invalid_wl_buffer ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { pub struct flags : u32 { # [ doc = "contents are y-inverted" ] const y_invert = 1 ; # [ doc = "content is interlaced" ] const interlaced = 2 ; # [ doc = "bottom field first" ] const bottom_first = 4 ; } } impl flags { pub fn from_raw ( n : u32 ) -> Option < flags > { Some ( flags :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } static mut zwp_linux_buffer_params_v1_requests_create_immed_types : [ * const wl_interface ; 5 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_buffer_params_v1_requests : [ wl_message ; 4 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"add\0" as * const u8 as * const c_char , signature : b"huuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"iiuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_immed\0" as * const u8 as * const c_char , signature : b"2niiuu\0" as * const u8 as * const c_char , types : unsafe { & zwp_linux_buffer_params_v1_requests_create_immed_types as * const _ } , } , ] ; static mut zwp_linux_buffer_params_v1_events_created_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_buffer_params_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"created\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_linux_buffer_params_v1_events_created_types as * const _ } , } , wl_message { name : b"failed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_linux_buffer_params_v1_interface : wl_interface = wl_interface { name : b"zwp_linux_buffer_params_v1\0" as * const u8 as * const c_char , version : 3 , request_count : 4 , requests : unsafe { & zwp_linux_buffer_params_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_linux_buffer_params_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_linux_buffer_params_v1_listener { # [ doc = "buffer creation succeeded\n\nThis event indicates that the attempted buffer creation was\nsuccessful. It provides the new wl_buffer referencing the dmabuf(s).\n\nUpon receiving this event, the client should destroy the\nzlinux_dmabuf_params object." ] fn created ( & mut self , object : * mut zwp_linux_buffer_params_v1 , buffer : * mut super :: wl_buffer :: wl_buffer ) { } # [ doc = "buffer creation failed\n\nThis event indicates that the attempted buffer creation has\nfailed. It usually means that one of the dmabuf constraints\nhas not been fulfilled.\n\nUpon receiving this event, the client should destroy the\nzlinux_buffer_params object." ] fn failed ( & mut self , object : * mut zwp_linux_buffer_params_v1 , ) { } } pub unsafe fn zwp_linux_buffer_params_v1_set_user_data ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_linux_buffer_params_v1 as _ , user_data ) ; } pub unsafe fn zwp_linux_buffer_params_v1_get_user_data ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_linux_buffer_params_v1 as _ ) ; } pub unsafe fn zwp_linux_buffer_params_v1_get_version ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_linux_buffer_params_v1 as _ ) ; } pub unsafe fn zwp_linux_buffer_params_v1_add_listener ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_linux_buffer_params_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_linux_buffer_params_v1_add_rust_listener ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 , listener : & dyn zwp_linux_buffer_params_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_linux_buffer_params_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_linux_buffer_params_v1_add_listener ( zwp_linux_buffer_params_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "delete this object, used or not\n\nCleans up the temporary data sent to the server for dmabuf-based\nwl_buffer creation." ] pub unsafe fn zwp_linux_buffer_params_v1_destroy ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_buffer_params_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_linux_buffer_params_v1 as _ ) ; } # [ doc = "add a dmabuf to the temporary set\n\nThis request adds one dmabuf to the set in this\nzwp_linux_buffer_params_v1.\n\nThe 64-bit unsigned value combined from modifier_hi and modifier_lo\nis the dmabuf layout modifier. DRM AddFB2 ioctl calls this the\nfb modifier, which is defined in drm_mode.h of Linux UAPI.\nThis is an opaque token. Drivers use this token to express tiling,\ncompression, etc. driver-specific modifications to the base format\ndefined by the DRM fourcc code.\n\nWarning: It should be an error if the format/modifier pair was not\nadvertised with the modifier event. This is not enforced yet because\nsome implementations always accept DRM_FORMAT_MOD_INVALID. Also\nversion 2 of this protocol does not have the modifier event.\n\nThis request raises the PLANE_IDX error if plane_idx is too large.\nThe error PLANE_SET is raised if attempting to set a plane that\nwas already set." ] pub unsafe fn zwp_linux_buffer_params_v1_add ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 , fd : :: std :: os :: unix :: io :: RawFd , plane_idx : u32 , offset : u32 , stride : u32 , modifier_hi : u32 , modifier_lo : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_buffer_params_v1 as _ , 1u32 , fd , plane_idx , offset , stride , modifier_hi , modifier_lo , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "create a wl_buffer from the given dmabufs\n\nThis asks for creation of a wl_buffer from the added dmabuf\nbuffers. The wl_buffer is not created immediately but returned via\nthe 'created' event if the dmabuf sharing succeeds. The sharing\nmay fail at runtime for reasons a client cannot predict, in\nwhich case the 'failed' event is triggered.\n\nThe 'format' argument is a DRM_FORMAT code, as defined by the\nlibdrm's drm_fourcc.h. The Linux kernel's DRM sub-system is the\nauthoritative source on how the format codes should work.\n\nThe 'flags' is a bitfield of the flags defined in enum \"flags\".\n'y_invert' means the that the image needs to be y-flipped.\n\nFlag 'interlaced' means that the frame in the buffer is not\nprogressive as usual, but interlaced. An interlaced buffer as\nsupported here must always contain both top and bottom fields.\nThe top field always begins on the first pixel row. The temporal\nordering between the two fields is top field first, unless\n'bottom_first' is specified. It is undefined whether 'bottom_first'\nis ignored if 'interlaced' is not set.\n\nThis protocol does not convey any information about field rate,\nduration, or timing, other than the relative ordering between the\ntwo fields in one buffer. A compositor may have to estimate the\nintended field rate from the incoming buffer rate. It is undefined\nwhether the time of receiving wl_surface.commit with a new buffer\nattached, applying the wl_surface state, wl_surface.frame callback\ntrigger, presentation, or any other point in the compositor cycle\nis used to measure the frame or field times. There is no support\nfor detecting missed or late frames/fields/buffers either, and\nthere is no support whatsoever for cooperating with interlaced\ncompositor output.\n\nThe composited image quality resulting from the use of interlaced\nbuffers is explicitly undefined. A compositor may use elaborate\nhardware features or software to deinterlace and create progressive\noutput frames from a sequence of interlaced input buffers, or it\nmay produce substandard image quality. However, compositors that\ncannot guarantee reasonable image quality in all cases are recommended\nto just reject all interlaced buffers.\n\nAny argument errors, including non-positive width or height,\nmismatch between the number of planes and the format, bad\nformat, bad offset or stride, may be indicated by fatal protocol\nerrors: INCOMPLETE, INVALID_FORMAT, INVALID_DIMENSIONS,\nOUT_OF_BOUNDS.\n\nDmabuf import errors in the server that are not obvious client\nbugs are returned via the 'failed' event as non-fatal. This\nallows attempting dmabuf sharing and falling back in the client\nif it fails.\n\nThis request can be sent only once in the object's lifetime, after\nwhich the only legal request is destroy. This object should be\ndestroyed after issuing a 'create' request. Attempting to use this\nobject after issuing 'create' raises ALREADY_USED protocol error.\n\nIt is not mandatory to issue 'create'. If a client wants to\ncancel the buffer creation, it can just destroy this object." ] pub unsafe fn zwp_linux_buffer_params_v1_create ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 , width : i32 , height : i32 , format : u32 , flags : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_buffer_params_v1 as _ , 2u32 , width , height , format , flags , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "immediately create a wl_buffer from the given dmabufs\n\nThis asks for immediate creation of a wl_buffer by importing the\nadded dmabufs.\n\nIn case of import success, no event is sent from the server, and the\nwl_buffer is ready to be used by the client.\n\nUpon import failure, either of the following may happen, as seen fit\nby the implementation:\n- the client is terminated with one of the following fatal protocol\nerrors:\n- INCOMPLETE, INVALID_FORMAT, INVALID_DIMENSIONS, OUT_OF_BOUNDS,\nin case of argument errors such as mismatch between the number\nof planes and the format, bad format, non-positive width or\nheight, or bad offset or stride.\n- INVALID_WL_BUFFER, in case the cause for failure is unknown or\nplaform specific.\n- the server creates an invalid wl_buffer, marks it as failed and\nsends a 'failed' event to the client. The result of using this\ninvalid wl_buffer as an argument in any request by the client is\ndefined by the compositor implementation.\n\nThis takes the same arguments as a 'create' request, and obeys the\nsame restrictions." ] pub unsafe fn zwp_linux_buffer_params_v1_create_immed ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 , width : i32 , height : i32 , format : u32 , flags : u32 ) -> * mut super :: wl_buffer :: wl_buffer { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_linux_buffer_params_v1 as _ , 3u32 , & super :: wl_buffer :: wl_buffer_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , width , height , format , flags ) ; return r as _ ; } } } pub mod xdg_shell_unstable_v6 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "create desktop-style surfaces\n\nxdg_shell allows clients to turn a wl_surface into a \"real window\"\nwhich can be dragged, resized, stacked, and moved around by the\nuser. Everything about this interface is suited towards traditional\ndesktop environments." ] pub mod zxdg_shell_v6 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_shell_v6 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc = "xdg_shell was destroyed before children" ] defunct_surfaces = 1 , # [ doc = "the client tried to map or destroy a non-topmost popup" ] not_the_topmost_popup = 2 , # [ doc = "the client specified an invalid popup parent surface" ] invalid_popup_parent = 3 , # [ doc = "the client provided an invalid surface state" ] invalid_surface_state = 4 , # [ doc = "the client provided an invalid positioner" ] invalid_positioner = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , 1 => Some ( error :: defunct_surfaces ) , 2 => Some ( error :: not_the_topmost_popup ) , 3 => Some ( error :: invalid_popup_parent ) , 4 => Some ( error :: invalid_surface_state ) , 5 => Some ( error :: invalid_positioner ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zxdg_shell_v6_requests_create_positioner_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zxdg_positioner_v6 :: zxdg_positioner_v6_interface as * const wl_interface } , ] ; static mut zxdg_shell_v6_requests_get_xdg_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_surface_v6 :: zxdg_surface_v6_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_shell_v6_requests : [ wl_message ; 4 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_positioner\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zxdg_shell_v6_requests_create_positioner_types as * const _ } , } , wl_message { name : b"get_xdg_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zxdg_shell_v6_requests_get_xdg_surface_types as * const _ } , } , wl_message { name : b"pong\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_shell_v6_events : [ wl_message ; 1 ] = [ wl_message { name : b"ping\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_shell_v6_interface : wl_interface = wl_interface { name : b"zxdg_shell_v6\0" as * const u8 as * const c_char , version : 1 , request_count : 4 , requests : unsafe { & zxdg_shell_v6_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_shell_v6_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_shell_v6_listener { # [ doc = "check if the client is alive\n\nThe ping event asks the client if it's still alive. Pass the\nserial specified in the event back to the compositor by sending\na \"pong\" request back with the specified serial. See xdg_shell.ping.\n\nCompositors can use this to determine if the client is still\nalive. It's unspecified what will happen if the client doesn't\nrespond to the ping request, or in what timeframe. Clients should\ntry to respond in a reasonable amount of time.\n\nA compositor is free to ping in any way it wants, but a client must\nalways respond to any xdg_shell object it created." ] fn ping ( & mut self , object : * mut zxdg_shell_v6 , serial : u32 ) { } } pub unsafe fn zxdg_shell_v6_set_user_data ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_shell_v6 as _ , user_data ) ; } pub unsafe fn zxdg_shell_v6_get_user_data ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_shell_v6 as _ ) ; } pub unsafe fn zxdg_shell_v6_get_version ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_shell_v6 as _ ) ; } pub unsafe fn zxdg_shell_v6_add_listener ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_shell_v6 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_shell_v6_add_rust_listener ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 , listener : & dyn zxdg_shell_v6_listener ) -> bool { let to = ( listener as * const dyn zxdg_shell_v6_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_shell_v6_add_listener ( zxdg_shell_v6 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy xdg_shell\n\nDestroy this xdg_shell object.\n\nDestroying a bound xdg_shell object while there are surfaces\nstill alive created by this xdg_shell object instance is illegal\nand will result in a protocol error." ] pub unsafe fn zxdg_shell_v6_destroy ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_shell_v6 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_shell_v6 as _ ) ; } # [ doc = "create a positioner object\n\nCreate a positioner object. A positioner object is used to position\nsurfaces relative to some parent surface. See the interface description\nand xdg_surface.get_popup for details." ] pub unsafe fn zxdg_shell_v6_create_positioner ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 ) -> * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_shell_v6 as _ , 1u32 , & super :: zxdg_positioner_v6 :: zxdg_positioner_v6_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "create a shell surface from a surface\n\nThis creates an xdg_surface for the given surface. While xdg_surface\nitself is not a role, the corresponding surface may only be assigned\na role extending xdg_surface, such as xdg_toplevel or xdg_popup.\n\nThis creates an xdg_surface for the given surface. An xdg_surface is\nused as basis to define a role to a given surface, such as xdg_toplevel\nor xdg_popup. It also manages functionality shared between xdg_surface\nbased surface roles.\n\nSee the documentation of xdg_surface for more details about what an\nxdg_surface is and how it is used." ] pub unsafe fn zxdg_shell_v6_get_xdg_surface ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_shell_v6 as _ , 2u32 , & super :: zxdg_surface_v6 :: zxdg_surface_v6_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } # [ doc = "respond to a ping event\n\nA client must respond to a ping event with a pong request or\nthe client may be deemed unresponsive. See xdg_shell.ping." ] pub unsafe fn zxdg_shell_v6_pong ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_shell_v6 as _ , 3u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "child surface positioner\n\nThe xdg_positioner provides a collection of rules for the placement of a\nchild surface relative to a parent surface. Rules can be defined to ensure\nthe child surface remains within the visible area's borders, and to\nspecify how the child surface changes its position, such as sliding along\nan axis, or flipping around a rectangle. These positioner-created rules are\nconstrained by the requirement that a child surface must intersect with or\nbe at least partially adjacent to its parent surface.\n\nSee the various requests for details about possible rules.\n\nAt the time of the request, the compositor makes a copy of the rules\nspecified by the xdg_positioner. Thus, after the request is complete the\nxdg_positioner object can be destroyed or reused; further changes to the\nobject will have no effect on previous usages.\n\nFor an xdg_positioner object to be considered complete, it must have a\nnon-zero size set by set_size, and a non-zero anchor rectangle set by\nset_anchor_rect. Passing an incomplete xdg_positioner object when\npositioning a surface raises an error." ] pub mod zxdg_positioner_v6 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_positioner_v6 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "invalid input provided" ] invalid_input = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_input ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { pub struct anchor : u32 { # [ doc = "the center of the anchor rectangle" ] const none = 0 ; # [ doc = "the top edge of the anchor rectangle" ] const top = 1 ; # [ doc = "the bottom edge of the anchor rectangle" ] const bottom = 2 ; # [ doc = "the left edge of the anchor rectangle" ] const left = 4 ; # [ doc = "the right edge of the anchor rectangle" ] const right = 8 ; } } impl anchor { pub fn from_raw ( n : u32 ) -> Option < anchor > { Some ( anchor :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } bitflags ! { pub struct gravity : u32 { # [ doc = "center over the anchor edge" ] const none = 0 ; # [ doc = "position above the anchor edge" ] const top = 1 ; # [ doc = "position below the anchor edge" ] const bottom = 2 ; # [ doc = "position to the left of the anchor edge" ] const left = 4 ; # [ doc = "position to the right of the anchor edge" ] const right = 8 ; } } impl gravity { pub fn from_raw ( n : u32 ) -> Option < gravity > { Some ( gravity :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } bitflags ! { # [ doc = "constraint adjustments\n\nThe constraint adjustment value define ways the compositor will adjust\nthe position of the surface, if the unadjusted position would result\nin the surface being partly constrained.\n\nWhether a surface is considered 'constrained' is left to the compositor\nto determine. For example, the surface may be partly outside the\ncompositor's defined 'work area', thus necessitating the child surface's\nposition be adjusted until it is entirely inside the work area.\n\nThe adjustments can be combined, according to a defined precedence: 1)\nFlip, 2) Slide, 3) Resize." ] pub struct constraint_adjustment : u32 { # [ doc = "don't move the child surface when constrained\n\nDon't alter the surface position even if it is constrained on some\naxis, for example partially outside the edge of a monitor." ] const none = 0 ; # [ doc = "move along the x axis until unconstrained\n\nSlide the surface along the x axis until it is no longer constrained.\n\nFirst try to slide towards the direction of the gravity on the x axis\nuntil either the edge in the opposite direction of the gravity is\nunconstrained or the edge in the direction of the gravity is\nconstrained.\n\nThen try to slide towards the opposite direction of the gravity on the\nx axis until either the edge in the direction of the gravity is\nunconstrained or the edge in the opposite direction of the gravity is\nconstrained." ] const slide_x = 1 ; # [ doc = "move along the y axis until unconstrained\n\nSlide the surface along the y axis until it is no longer constrained.\n\nFirst try to slide towards the direction of the gravity on the y axis\nuntil either the edge in the opposite direction of the gravity is\nunconstrained or the edge in the direction of the gravity is\nconstrained.\n\nThen try to slide towards the opposite direction of the gravity on the\ny axis until either the edge in the direction of the gravity is\nunconstrained or the edge in the opposite direction of the gravity is\nconstrained." ] const slide_y = 2 ; # [ doc = "invert the anchor and gravity on the x axis\n\nInvert the anchor and gravity on the x axis if the surface is\nconstrained on the x axis. For example, if the left edge of the\nsurface is constrained, the gravity is 'left' and the anchor is\n'left', change the gravity to 'right' and the anchor to 'right'.\n\nIf the adjusted position also ends up being constrained, the resulting\nposition of the flip_x adjustment will be the one before the\nadjustment." ] const flip_x = 4 ; # [ doc = "invert the anchor and gravity on the y axis\n\nInvert the anchor and gravity on the y axis if the surface is\nconstrained on the y axis. For example, if the bottom edge of the\nsurface is constrained, the gravity is 'bottom' and the anchor is\n'bottom', change the gravity to 'top' and the anchor to 'top'.\n\nIf the adjusted position also ends up being constrained, the resulting\nposition of the flip_y adjustment will be the one before the\nadjustment." ] const flip_y = 8 ; # [ doc = "horizontally resize the surface\n\nResize the surface horizontally so that it is completely\nunconstrained." ] const resize_x = 16 ; # [ doc = "vertically resize the surface\n\nResize the surface vertically so that it is completely unconstrained." ] const resize_y = 32 ; } } impl constraint_adjustment { pub fn from_raw ( n : u32 ) -> Option < constraint_adjustment > { Some ( constraint_adjustment :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_positioner_v6_requests : [ wl_message ; 7 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_anchor_rect\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_anchor\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_gravity\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_constraint_adjustment\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_offset\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_positioner_v6_interface : wl_interface = wl_interface { name : b"zxdg_positioner_v6\0" as * const u8 as * const c_char , version : 1 , request_count : 7 , requests : unsafe { & zxdg_positioner_v6_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_positioner_v6_listener { } pub unsafe fn zxdg_positioner_v6_set_user_data ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_positioner_v6 as _ , user_data ) ; } pub unsafe fn zxdg_positioner_v6_get_user_data ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_positioner_v6 as _ ) ; } pub unsafe fn zxdg_positioner_v6_get_version ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_positioner_v6 as _ ) ; } pub unsafe fn zxdg_positioner_v6_add_listener ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_positioner_v6 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_positioner_v6_add_rust_listener ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , listener : & dyn zxdg_positioner_v6_listener ) -> bool { let to = ( listener as * const dyn zxdg_positioner_v6_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_positioner_v6_add_listener ( zxdg_positioner_v6 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_positioner object\n\nNotify the compositor that the xdg_positioner will no longer be used." ] pub unsafe fn zxdg_positioner_v6_destroy ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_positioner_v6 as _ ) ; } # [ doc = "set the size of the to-be positioned rectangle\n\nSet the size of the surface that is to be positioned with the positioner\nobject. The size is in surface-local coordinates and corresponds to the\nwindow geometry. See xdg_surface.set_window_geometry.\n\nIf a zero or negative size is set the invalid_input error is raised." ] pub unsafe fn zxdg_positioner_v6_set_size ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 1u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the anchor rectangle within the parent surface\n\nSpecify the anchor rectangle within the parent surface that the child\nsurface will be placed relative to. The rectangle is relative to the\nwindow geometry as defined by xdg_surface.set_window_geometry of the\nparent surface. The rectangle must be at least 1x1 large.\n\nWhen the xdg_positioner object is used to position a child surface, the\nanchor rectangle may not extend outside the window geometry of the\npositioned child's parent surface.\n\nIf a zero or negative size is set the invalid_input error is raised." ] pub unsafe fn zxdg_positioner_v6_set_anchor_rect ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 2u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set anchor rectangle anchor edges\n\nDefines a set of edges for the anchor rectangle. These are used to\nderive an anchor point that the child surface will be positioned\nrelative to. If two orthogonal edges are specified (e.g. 'top' and\n'left'), then the anchor point will be the intersection of the edges\n(e.g. the top left position of the rectangle); otherwise, the derived\nanchor point will be centered on the specified edge, or in the center of\nthe anchor rectangle if no edge is specified.\n\nIf two parallel anchor edges are specified (e.g. 'left' and 'right'),\nthe invalid_input error is raised." ] pub unsafe fn zxdg_positioner_v6_set_anchor ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , anchor : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 3u32 , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set child surface gravity\n\nDefines in what direction a surface should be positioned, relative to\nthe anchor point of the parent surface. If two orthogonal gravities are\nspecified (e.g. 'bottom' and 'right'), then the child surface will be\nplaced in the specified direction; otherwise, the child surface will be\ncentered over the anchor point on any axis that had no gravity\nspecified.\n\nIf two parallel gravities are specified (e.g. 'left' and 'right'), the\ninvalid_input error is raised." ] pub unsafe fn zxdg_positioner_v6_set_gravity ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , gravity : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 4u32 , gravity , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the adjustment to be done when constrained\n\nSpecify how the window should be positioned if the originally intended\nposition caused the surface to be constrained, meaning at least\npartially outside positioning boundaries set by the compositor. The\nadjustment is set by constructing a bitmask describing the adjustment to\nbe made when the surface is constrained on that axis.\n\nIf no bit for one axis is set, the compositor will assume that the child\nsurface should not change its position on that axis when constrained.\n\nIf more than one bit for one axis is set, the order of how adjustments\nare applied is specified in the corresponding adjustment descriptions.\n\nThe default adjustment is none." ] pub unsafe fn zxdg_positioner_v6_set_constraint_adjustment ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , constraint_adjustment : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 5u32 , constraint_adjustment , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface position offset\n\nSpecify the surface position offset relative to the position of the\nanchor on the anchor rectangle and the anchor on the surface. For\nexample if the anchor of the anchor rectangle is at (x, y), the surface\nhas the gravity bottom|right, and the offset is (ox, oy), the calculated\nsurface position will be (x + ox, y + oy). The offset position of the\nsurface is the one used for constraint testing. See\nset_constraint_adjustment.\n\nAn example use case is placing a popup menu on top of a user interface\nelement, while aligning the user interface element of the parent surface\nwith some user interface element placed somewhere in the popup surface." ] pub unsafe fn zxdg_positioner_v6_set_offset ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 6u32 , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "desktop user interface surface base interface\n\nAn interface that may be implemented by a wl_surface, for\nimplementations that provide a desktop-style user interface.\n\nIt provides a base set of functionality required to construct user\ninterface elements requiring management by the compositor, such as\ntoplevel windows, menus, etc. The types of functionality are split into\nxdg_surface roles.\n\nCreating an xdg_surface does not set the role for a wl_surface. In order\nto map an xdg_surface, the client must create a role-specific object\nusing, e.g., get_toplevel, get_popup. The wl_surface for any given\nxdg_surface can have at most one role, and may not be assigned any role\nnot based on xdg_surface.\n\nA role must be assigned before any other requests are made to the\nxdg_surface object.\n\nThe client must call wl_surface.commit on the corresponding wl_surface\nfor the xdg_surface state to take effect.\n\nCreating an xdg_surface from a wl_surface which has a buffer attached or\ncommitted is a client error, and any attempts by a client to attach or\nmanipulate a buffer prior to the first xdg_surface.configure call must\nalso be treated as errors.\n\nFor a surface to be mapped by the compositor, the following conditions\nmust be met: (1) the client has assigned an xdg_surface based role to the\nsurface, (2) the client has set and committed the xdg_surface state and\nthe role dependent state to the surface and (3) the client has committed a\nbuffer to the surface." ] pub mod zxdg_surface_v6 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_surface_v6 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { not_constructed = 1 , already_constructed = 2 , unconfigured_buffer = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 1 => Some ( error :: not_constructed ) , 2 => Some ( error :: already_constructed ) , 3 => Some ( error :: unconfigured_buffer ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zxdg_surface_v6_requests_get_toplevel_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6_interface as * const wl_interface } , ] ; static mut zxdg_surface_v6_requests_get_popup_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: zxdg_popup_v6 :: zxdg_popup_v6_interface as * const wl_interface } , unsafe { & super :: zxdg_surface_v6 :: zxdg_surface_v6_interface as * const wl_interface } , unsafe { & super :: zxdg_positioner_v6 :: zxdg_positioner_v6_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_surface_v6_requests : [ wl_message ; 5 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_toplevel\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zxdg_surface_v6_requests_get_toplevel_types as * const _ } , } , wl_message { name : b"get_popup\0" as * const u8 as * const c_char , signature : b"noo\0" as * const u8 as * const c_char , types : unsafe { & zxdg_surface_v6_requests_get_popup_types as * const _ } , } , wl_message { name : b"set_window_geometry\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"ack_configure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_surface_v6_events : [ wl_message ; 1 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_surface_v6_interface : wl_interface = wl_interface { name : b"zxdg_surface_v6\0" as * const u8 as * const c_char , version : 1 , request_count : 5 , requests : unsafe { & zxdg_surface_v6_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_surface_v6_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_surface_v6_listener { # [ doc = "suggest a surface change\n\nThe configure event marks the end of a configure sequence. A configure\nsequence is a set of one or more events configuring the state of the\nxdg_surface, including the final xdg_surface.configure event.\n\nWhere applicable, xdg_surface surface roles will during a configure\nsequence extend this event as a latched state sent as events before the\nxdg_surface.configure event. Such events should be considered to make up\na set of atomically applied configuration states, where the\nxdg_surface.configure commits the accumulated state.\n\nClients should arrange their surface for the new states, and then send\nan ack_configure request with the serial sent in this configure event at\nsome point before committing the new surface.\n\nIf the client receives multiple configure events before it can respond\nto one, it is free to discard all but the last event it received." ] fn configure ( & mut self , object : * mut zxdg_surface_v6 , serial : u32 ) { } } pub unsafe fn zxdg_surface_v6_set_user_data ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_surface_v6 as _ , user_data ) ; } pub unsafe fn zxdg_surface_v6_get_user_data ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_surface_v6 as _ ) ; } pub unsafe fn zxdg_surface_v6_get_version ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_surface_v6 as _ ) ; } pub unsafe fn zxdg_surface_v6_add_listener ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_surface_v6 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_surface_v6_add_rust_listener ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , listener : & dyn zxdg_surface_v6_listener ) -> bool { let to = ( listener as * const dyn zxdg_surface_v6_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_surface_v6_add_listener ( zxdg_surface_v6 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_surface\n\nDestroy the xdg_surface object. An xdg_surface must only be destroyed\nafter its role object has been destroyed." ] pub unsafe fn zxdg_surface_v6_destroy ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_surface_v6 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_surface_v6 as _ ) ; } # [ doc = "assign the xdg_toplevel surface role\n\nThis creates an xdg_toplevel object for the given xdg_surface and gives\nthe associated wl_surface the xdg_toplevel role.\n\nSee the documentation of xdg_toplevel for more details about what an\nxdg_toplevel is and how it is used." ] pub unsafe fn zxdg_surface_v6_get_toplevel ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 ) -> * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_surface_v6 as _ , 1u32 , & super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "assign the xdg_popup surface role\n\nThis creates an xdg_popup object for the given xdg_surface and gives the\nassociated wl_surface the xdg_popup role.\n\nSee the documentation of xdg_popup for more details about what an\nxdg_popup is and how it is used." ] pub unsafe fn zxdg_surface_v6_get_popup ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , parent : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , positioner : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 ) -> * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_surface_v6 as _ , 2u32 , & super :: zxdg_popup_v6 :: zxdg_popup_v6_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , parent , positioner ) ; return r as _ ; } # [ doc = "set the new window geometry\n\nThe window geometry of a surface is its \"visible bounds\" from the\nuser's perspective. Client-side decorations often have invisible\nportions like drop-shadows which should be ignored for the\npurposes of aligning, placing and constraining windows.\n\nThe window geometry is double buffered, and will be applied at the\ntime wl_surface.commit of the corresponding wl_surface is called.\n\nOnce the window geometry of the surface is set, it is not possible to\nunset it, and it will remain the same until set_window_geometry is\ncalled again, even if a new subsurface or buffer is attached.\n\nIf never set, the value is the full bounds of the surface,\nincluding any subsurfaces. This updates dynamically on every\ncommit. This unset is meant for extremely simple clients.\n\nThe arguments are given in the surface-local coordinate space of\nthe wl_surface associated with this xdg_surface.\n\nThe width and height must be greater than zero. Setting an invalid size\nwill raise an error. When applied, the effective window geometry will be\nthe set window geometry clamped to the bounding rectangle of the\ncombined geometry of the surface of the xdg_surface and the associated\nsubsurfaces." ] pub unsafe fn zxdg_surface_v6_set_window_geometry ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_surface_v6 as _ , 3u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "ack a configure event\n\nWhen a configure event is received, if a client commits the\nsurface in response to the configure event, then the client\nmust make an ack_configure request sometime before the commit\nrequest, passing along the serial of the configure event.\n\nFor instance, for toplevel surfaces the compositor might use this\ninformation to move a surface to the top left only when the client has\ndrawn itself for the maximized or fullscreen state.\n\nIf the client receives multiple configure events before it\ncan respond to one, it only has to ack the last configure event.\n\nA client is not required to commit immediately after sending\nan ack_configure request - it may even ack_configure several times\nbefore its next surface commit.\n\nA client may send multiple ack_configure requests before committing, but\nonly the last request sent before a commit indicates which configure\nevent the client really is responding to." ] pub unsafe fn zxdg_surface_v6_ack_configure ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_surface_v6 as _ , 4u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "toplevel surface\n\nThis interface defines an xdg_surface role which allows a surface to,\namong other things, set window-like properties such as maximize,\nfullscreen, and minimize, set application-specific metadata like title and\nid, and well as trigger user interactive operations such as interactive\nresize and move." ] pub mod zxdg_toplevel_v6 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_toplevel_v6 { } # [ doc = "edge values for resizing\n\nThese values are used to indicate which edge of a surface\nis being dragged in a resize operation." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum resize_edge { none = 0 , top = 1 , bottom = 2 , left = 4 , top_left = 5 , bottom_left = 6 , right = 8 , top_right = 9 , bottom_right = 10 , # [ doc ( hidden ) ] __nonexhaustive , } impl resize_edge { pub fn from_raw ( n : u32 ) -> Option < resize_edge > { match n { 0 => Some ( resize_edge :: none ) , 1 => Some ( resize_edge :: top ) , 2 => Some ( resize_edge :: bottom ) , 4 => Some ( resize_edge :: left ) , 5 => Some ( resize_edge :: top_left ) , 6 => Some ( resize_edge :: bottom_left ) , 8 => Some ( resize_edge :: right ) , 9 => Some ( resize_edge :: top_right ) , 10 => Some ( resize_edge :: bottom_right ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "types of state on the surface\n\nThe different state values used on the surface. This is designed for\nstate values like maximized, fullscreen. It is paired with the\nconfigure event to ensure that both the client and the compositor\nsetting the state can be synchronized.\n\nStates set in this way are double-buffered. They will get applied on\nthe next commit." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum state { # [ doc = "the surface is maximized\n\nThe surface is maximized. The window geometry specified in the configure\nevent must be obeyed by the client." ] maximized = 1 , # [ doc = "the surface is fullscreen\n\nThe surface is fullscreen. The window geometry specified in the configure\nevent must be obeyed by the client." ] fullscreen = 2 , # [ doc = "the surface is being resized\n\nThe surface is being resized. The window geometry specified in the\nconfigure event is a maximum; the client cannot resize beyond it.\nClients that have aspect ratio or cell sizing configuration can use\na smaller size, however." ] resizing = 3 , # [ doc = "the surface is now activated\n\nClient window decorations should be painted as if the window is\nactive. Do not assume this means that the window actually has\nkeyboard or pointer focus." ] activated = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl state { pub fn from_raw ( n : u32 ) -> Option < state > { match n { 1 => Some ( state :: maximized ) , 2 => Some ( state :: fullscreen ) , 3 => Some ( state :: resizing ) , 4 => Some ( state :: activated ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zxdg_toplevel_v6_requests_set_parent_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6_interface as * const wl_interface } , ] ; static mut zxdg_toplevel_v6_requests_show_window_menu_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut zxdg_toplevel_v6_requests_move_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut zxdg_toplevel_v6_requests_resize_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut zxdg_toplevel_v6_requests_set_fullscreen_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_toplevel_v6_requests : [ wl_message ; 14 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & zxdg_toplevel_v6_requests_set_parent_types as * const _ } , } , wl_message { name : b"set_title\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_app_id\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"show_window_menu\0" as * const u8 as * const c_char , signature : b"ouii\0" as * const u8 as * const c_char , types : unsafe { & zxdg_toplevel_v6_requests_show_window_menu_types as * const _ } , } , wl_message { name : b"move\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & zxdg_toplevel_v6_requests_move_types as * const _ } , } , wl_message { name : b"resize\0" as * const u8 as * const c_char , signature : b"ouu\0" as * const u8 as * const c_char , types : unsafe { & zxdg_toplevel_v6_requests_resize_types as * const _ } , } , wl_message { name : b"set_max_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_min_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_maximized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unset_maximized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_fullscreen\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & zxdg_toplevel_v6_requests_set_fullscreen_types as * const _ } , } , wl_message { name : b"unset_fullscreen\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_minimized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_toplevel_v6_events : [ wl_message ; 2 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"iia\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"close\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_toplevel_v6_interface : wl_interface = wl_interface { name : b"zxdg_toplevel_v6\0" as * const u8 as * const c_char , version : 1 , request_count : 14 , requests : unsafe { & zxdg_toplevel_v6_requests as * const _ } , event_count : 2 , events : unsafe { & zxdg_toplevel_v6_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_toplevel_v6_listener { # [ doc = "suggest a surface change\n\nThis configure event asks the client to resize its toplevel surface or\nto change its state. The configured state should not be applied\nimmediately. See xdg_surface.configure for details.\n\nThe width and height arguments specify a hint to the window\nabout how its surface should be resized in window geometry\ncoordinates. See set_window_geometry.\n\nIf the width or height arguments are zero, it means the client\nshould decide its own window dimension. This may happen when the\ncompositor needs to configure the state of the surface but doesn't\nhave any information about any previous or expected dimension.\n\nThe states listed in the event specify how the width/height\narguments should be interpreted, and possibly how it should be\ndrawn.\n\nClients must send an ack_configure in response to this event. See\nxdg_surface.configure and xdg_surface.ack_configure for details." ] fn configure ( & mut self , object : * mut zxdg_toplevel_v6 , width : i32 , height : i32 , states : * mut wl_array ) { } # [ doc = "surface wants to be closed\n\nThe close event is sent by the compositor when the user\nwants the surface to be closed. This should be equivalent to\nthe user clicking the close button in client-side decorations,\nif your application has any.\n\nThis is only a request that the user intends to close the\nwindow. The client may choose to ignore this request, or show\na dialog to ask the user to save their data, etc." ] fn close ( & mut self , object : * mut zxdg_toplevel_v6 , ) { } } pub unsafe fn zxdg_toplevel_v6_set_user_data ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_toplevel_v6 as _ , user_data ) ; } pub unsafe fn zxdg_toplevel_v6_get_user_data ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_toplevel_v6 as _ ) ; } pub unsafe fn zxdg_toplevel_v6_get_version ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_toplevel_v6 as _ ) ; } pub unsafe fn zxdg_toplevel_v6_add_listener ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_toplevel_v6 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_toplevel_v6_add_rust_listener ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , listener : & dyn zxdg_toplevel_v6_listener ) -> bool { let to = ( listener as * const dyn zxdg_toplevel_v6_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_toplevel_v6_add_listener ( zxdg_toplevel_v6 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_toplevel\n\nUnmap and destroy the window. The window will be effectively\nhidden from the user's point of view, and all state like\nmaximization, fullscreen, and so on, will be lost." ] pub unsafe fn zxdg_toplevel_v6_destroy ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_toplevel_v6 as _ ) ; } # [ doc = "set the parent of this surface\n\nSet the \"parent\" of this surface. This window should be stacked\nabove a parent. The parent surface must be mapped as long as this\nsurface is mapped.\n\nParent windows should be set on dialogs, toolboxes, or other\n\"auxiliary\" surfaces, so that the parent is raised when the dialog\nis raised." ] pub unsafe fn zxdg_toplevel_v6_set_parent ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , parent : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 1u32 , parent , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface title\n\nSet a short title for the surface.\n\nThis string may be used to identify the surface in a task bar,\nwindow list, or other user interface elements provided by the\ncompositor.\n\nThe string must be encoded in UTF-8." ] pub unsafe fn zxdg_toplevel_v6_set_title ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , title : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 2u32 , title , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set application ID\n\nSet an application identifier for the surface.\n\nThe app ID identifies the general class of applications to which\nthe surface belongs. The compositor can use this to group multiple\nsurfaces together, or to determine how to launch a new application.\n\nFor D-Bus activatable applications, the app ID is used as the D-Bus\nservice name.\n\nThe compositor shell will try to group application surfaces together\nby their app ID. As a best practice, it is suggested to select app\nID's that match the basename of the application's .desktop file.\nFor example, \"org.freedesktop.FooViewer\" where the .desktop file is\n\"org.freedesktop.FooViewer.desktop\".\n\nSee the desktop-entry specification [0] for more details on\napplication identifiers and how they relate to well-known D-Bus\nnames and .desktop files.\n\n[0] http://standards.freedesktop.org/desktop-entry-spec/" ] pub unsafe fn zxdg_toplevel_v6_set_app_id ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , app_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 3u32 , app_id , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "show the window menu\n\nClients implementing client-side decorations might want to show\na context menu when right-clicking on the decorations, giving the\nuser a menu that they can use to maximize or minimize the window.\n\nThis request asks the compositor to pop up such a window menu at\nthe given position, relative to the local surface coordinates of\nthe parent surface. There are no guarantees as to what menu items\nthe window menu contains.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event." ] pub unsafe fn zxdg_toplevel_v6_show_window_menu ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 4u32 , seat , serial , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive move\n\nStart an interactive, user-driven move of the surface.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event. The passed\nserial is used to determine the type of interactive move (touch,\npointer, etc).\n\nThe server may ignore move requests depending on the state of\nthe surface (e.g. fullscreen or maximized), or if the passed serial\nis no longer valid.\n\nIf triggered, the surface will lose the focus of the device\n(wl_pointer, wl_touch, etc) used for the move. It is up to the\ncompositor to visually indicate that the move is taking place, such as\nupdating a pointer cursor, during the move. There is no guarantee\nthat the device focus will return when the move is completed." ] pub unsafe fn zxdg_toplevel_v6_move ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , seat : * mut super :: wl_seat :: wl_seat , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 5u32 , seat , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive resize\n\nStart a user-driven, interactive resize of the surface.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event. The passed\nserial is used to determine the type of interactive resize (touch,\npointer, etc).\n\nThe server may ignore resize requests depending on the state of\nthe surface (e.g. fullscreen or maximized).\n\nIf triggered, the client will receive configure events with the\n\"resize\" state enum value and the expected sizes. See the \"resize\"\nenum value for more details about what is required. The client\nmust also acknowledge configure events using \"ack_configure\". After\nthe resize is completed, the client will receive another \"configure\"\nevent without the resize state.\n\nIf triggered, the surface also will lose the focus of the device\n(wl_pointer, wl_touch, etc) used for the resize. It is up to the\ncompositor to visually indicate that the resize is taking place,\nsuch as updating a pointer cursor, during the resize. There is no\nguarantee that the device focus will return when the resize is\ncompleted.\n\nThe edges parameter specifies how the surface should be resized,\nand is one of the values of the resize_edge enum. The compositor\nmay use this information to update the surface position for\nexample when dragging the top left corner. The compositor may also\nuse this information to adapt its behavior, e.g. choose an\nappropriate cursor image." ] pub unsafe fn zxdg_toplevel_v6_resize ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , edges : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 6u32 , seat , serial , edges , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the maximum size\n\nSet a maximum size for the window.\n\nThe client can specify a maximum size so that the compositor does\nnot try to configure the window beyond this size.\n\nThe width and height arguments are in window geometry coordinates.\nSee xdg_surface.set_window_geometry.\n\nValues set in this way are double-buffered. They will get applied\non the next commit.\n\nThe compositor can use this information to allow or disallow\ndifferent states like maximize or fullscreen and draw accurate\nanimations.\n\nSimilarly, a tiling window manager may use this information to\nplace and resize client windows in a more effective way.\n\nThe client should not rely on the compositor to obey the maximum\nsize. The compositor may decide to ignore the values set by the\nclient and request a larger size.\n\nIf never set, or a value of zero in the request, means that the\nclient has no expected maximum size in the given dimension.\nAs a result, a client wishing to reset the maximum size\nto an unspecified state can use zero for width and height in the\nrequest.\n\nRequesting a maximum size to be smaller than the minimum size of\na surface is illegal and will result in a protocol error.\n\nThe width and height must be greater than or equal to zero. Using\nstrictly negative values for width and height will result in a\nprotocol error." ] pub unsafe fn zxdg_toplevel_v6_set_max_size ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 7u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the minimum size\n\nSet a minimum size for the window.\n\nThe client can specify a minimum size so that the compositor does\nnot try to configure the window below this size.\n\nThe width and height arguments are in window geometry coordinates.\nSee xdg_surface.set_window_geometry.\n\nValues set in this way are double-buffered. They will get applied\non the next commit.\n\nThe compositor can use this information to allow or disallow\ndifferent states like maximize or fullscreen and draw accurate\nanimations.\n\nSimilarly, a tiling window manager may use this information to\nplace and resize client windows in a more effective way.\n\nThe client should not rely on the compositor to obey the minimum\nsize. The compositor may decide to ignore the values set by the\nclient and request a smaller size.\n\nIf never set, or a value of zero in the request, means that the\nclient has no expected minimum size in the given dimension.\nAs a result, a client wishing to reset the minimum size\nto an unspecified state can use zero for width and height in the\nrequest.\n\nRequesting a minimum size to be larger than the maximum size of\na surface is illegal and will result in a protocol error.\n\nThe width and height must be greater than or equal to zero. Using\nstrictly negative values for width and height will result in a\nprotocol error." ] pub unsafe fn zxdg_toplevel_v6_set_min_size ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 8u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "maximize the window\n\nMaximize the surface.\n\nAfter requesting that the surface should be maximized, the compositor\nwill respond by emitting a configure event with the \"maximized\" state\nand the required window geometry. The client should then update its\ncontent, drawing it in a maximized state, i.e. without shadow or other\ndecoration outside of the window geometry. The client must also\nacknowledge the configure when committing the new content (see\nack_configure).\n\nIt is up to the compositor to decide how and where to maximize the\nsurface, for example which output and what region of the screen should\nbe used.\n\nIf the surface was already maximized, the compositor will still emit\na configure event with the \"maximized\" state." ] pub unsafe fn zxdg_toplevel_v6_set_maximized ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 9u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "unmaximize the window\n\nUnmaximize the surface.\n\nAfter requesting that the surface should be unmaximized, the compositor\nwill respond by emitting a configure event without the \"maximized\"\nstate. If available, the compositor will include the window geometry\ndimensions the window had prior to being maximized in the configure\nrequest. The client must then update its content, drawing it in a\nregular state, i.e. potentially with shadow, etc. The client must also\nacknowledge the configure when committing the new content (see\nack_configure).\n\nIt is up to the compositor to position the surface after it was\nunmaximized; usually the position the surface had before maximizing, if\napplicable.\n\nIf the surface was already not maximized, the compositor will still\nemit a configure event without the \"maximized\" state." ] pub unsafe fn zxdg_toplevel_v6_unset_maximized ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 10u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the window as fullscreen on a monitor\n\nMake the surface fullscreen.\n\nYou can specify an output that you would prefer to be fullscreen.\nIf this value is NULL, it's up to the compositor to choose which\ndisplay will be used to map this surface.\n\nIf the surface doesn't cover the whole output, the compositor will\nposition the surface in the center of the output and compensate with\nblack borders filling the rest of the output." ] pub unsafe fn zxdg_toplevel_v6_set_fullscreen ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 11u32 , output , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zxdg_toplevel_v6_unset_fullscreen ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 12u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the window as minimized\n\nRequest that the compositor minimize your surface. There is no\nway to know if the surface is currently minimized, nor is there\nany way to unset minimization on this surface.\n\nIf you are looking to throttle redrawing when minimized, please\ninstead use the wl_surface.frame event for this, as this will\nalso work with live previews on windows in Alt-Tab, Expose or\nsimilar compositor features." ] pub unsafe fn zxdg_toplevel_v6_set_minimized ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 13u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "short-lived, popup surfaces for menus\n\nA popup surface is a short-lived, temporary surface. It can be used to\nimplement for example menus, popovers, tooltips and other similar user\ninterface concepts.\n\nA popup can be made to take an explicit grab. See xdg_popup.grab for\ndetails.\n\nWhen the popup is dismissed, a popup_done event will be sent out, and at\nthe same time the surface will be unmapped. See the xdg_popup.popup_done\nevent for details.\n\nExplicitly destroying the xdg_popup object will also dismiss the popup and\nunmap the surface. Clients that want to dismiss the popup when another\nsurface of their own is clicked should dismiss the popup using the destroy\nrequest.\n\nThe parent surface must have either the xdg_toplevel or xdg_popup surface\nrole.\n\nA newly created xdg_popup will be stacked on top of all previously created\nxdg_popup surfaces associated with the same xdg_toplevel.\n\nThe parent of an xdg_popup must be mapped (see the xdg_surface\ndescription) before the xdg_popup itself.\n\nThe x and y arguments passed when creating the popup object specify\nwhere the top left of the popup should be placed, relative to the\nlocal surface coordinates of the parent surface. See\nxdg_surface.get_popup. An xdg_popup must intersect with or be at least\npartially adjacent to its parent surface.\n\nThe client must call wl_surface.commit on the corresponding wl_surface\nfor the xdg_popup state to take effect." ] pub mod zxdg_popup_v6 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_popup_v6 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "tried to grab after being mapped" ] invalid_grab = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_grab ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zxdg_popup_v6_requests_grab_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_popup_v6_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"grab\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & zxdg_popup_v6_requests_grab_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_popup_v6_events : [ wl_message ; 2 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"popup_done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_popup_v6_interface : wl_interface = wl_interface { name : b"zxdg_popup_v6\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_popup_v6_requests as * const _ } , event_count : 2 , events : unsafe { & zxdg_popup_v6_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_popup_v6_listener { # [ doc = "configure the popup surface\n\nThis event asks the popup surface to configure itself given the\nconfiguration. The configured state should not be applied immediately.\nSee xdg_surface.configure for details.\n\nThe x and y arguments represent the position the popup was placed at\ngiven the xdg_positioner rule, relative to the upper left corner of the\nwindow geometry of the parent surface." ] fn configure ( & mut self , object : * mut zxdg_popup_v6 , x : i32 , y : i32 , width : i32 , height : i32 ) { } # [ doc = "popup interaction is done\n\nThe popup_done event is sent out when a popup is dismissed by the\ncompositor. The client should destroy the xdg_popup object at this\npoint." ] fn popup_done ( & mut self , object : * mut zxdg_popup_v6 , ) { } } pub unsafe fn zxdg_popup_v6_set_user_data ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_popup_v6 as _ , user_data ) ; } pub unsafe fn zxdg_popup_v6_get_user_data ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_popup_v6 as _ ) ; } pub unsafe fn zxdg_popup_v6_get_version ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_popup_v6 as _ ) ; } pub unsafe fn zxdg_popup_v6_add_listener ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_popup_v6 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_popup_v6_add_rust_listener ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 , listener : & dyn zxdg_popup_v6_listener ) -> bool { let to = ( listener as * const dyn zxdg_popup_v6_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_popup_v6_add_listener ( zxdg_popup_v6 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "remove xdg_popup interface\n\nThis destroys the popup. Explicitly destroying the xdg_popup\nobject will also dismiss the popup, and unmap the surface.\n\nIf this xdg_popup is not the \"topmost\" popup, a protocol error\nwill be sent." ] pub unsafe fn zxdg_popup_v6_destroy ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_popup_v6 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_popup_v6 as _ ) ; } # [ doc = "make the popup take an explicit grab\n\nThis request makes the created popup take an explicit grab. An explicit\ngrab will be dismissed when the user dismisses the popup, or when the\nclient destroys the xdg_popup. This can be done by the user clicking\noutside the surface, using the keyboard, or even locking the screen\nthrough closing the lid or a timeout.\n\nIf the compositor denies the grab, the popup will be immediately\ndismissed.\n\nThis request must be used in response to some sort of user action like a\nbutton press, key press, or touch down event. The serial number of the\nevent should be passed as 'serial'.\n\nThe parent of a grabbing popup must either be an xdg_toplevel surface or\nanother xdg_popup with an explicit grab. If the parent is another\nxdg_popup it means that the popups are nested, with this popup now being\nthe topmost popup.\n\nNested popups must be destroyed in the reverse order they were created\nin, e.g. the only popup you are allowed to destroy at all times is the\ntopmost one.\n\nWhen compositors choose to dismiss a popup, they may dismiss every\nnested grabbing popup as well. When a compositor dismisses popups, it\nwill follow the same dismissing order as required from the client.\n\nThe parent of a grabbing popup must either be another xdg_popup with an\nactive explicit grab, or an xdg_popup or xdg_toplevel, if there are no\nexplicit grabs already taken.\n\nIf the topmost grabbing popup is destroyed, the grab will be returned to\nthe parent of the popup, if that parent previously had an explicit grab.\n\nIf the parent is a grabbing popup which has already been dismissed, this\npopup will be immediately dismissed. If the parent is a popup that did\nnot take an explicit grab, an error will be raised.\n\nDuring a popup grab, the client owning the grab will receive pointer\nand touch events for all their surfaces as normal (similar to an\n\"owner-events\" grab in X11 parlance), while the top most grabbing popup\nwill always have keyboard focus." ] pub unsafe fn zxdg_popup_v6_grab ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 , seat : * mut super :: wl_seat :: wl_seat , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_popup_v6 as _ , 1u32 , seat , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod presentation_time { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "timed presentation related wl_surface requests\n\nThe main feature of this interface is accurate presentation\ntiming feedback to ensure smooth video playback while maintaining\naudio/video synchronization. Some features use the concept of a\npresentation clock, which is defined in the\npresentation.clock_id event.\n\nA content update for a wl_surface is submitted by a\nwl_surface.commit request. Request 'feedback' associates with\nthe wl_surface.commit and provides feedback on the content\nupdate, particularly the final realized presentation time.\n\n\n\nWhen the final realized presentation time is available, e.g.\nafter a framebuffer flip completes, the requested\npresentation_feedback.presented events are sent. The final\npresentation time can differ from the compositor's predicted\ndisplay update time and the update's target time, especially\nwhen the compositor misses its target vertical blanking period." ] pub mod wp_presentation { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_presentation { } # [ doc = "fatal presentation errors\n\nThese fatal protocol errors may be emitted in response to\nillegal presentation requests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "invalid value in tv_nsec" ] invalid_timestamp = 0 , # [ doc = "invalid flag" ] invalid_flag = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_timestamp ) , 1 => Some ( error :: invalid_flag ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wp_presentation_requests_feedback_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wp_presentation_feedback :: wp_presentation_feedback_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_presentation_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"feedback\0" as * const u8 as * const c_char , signature : b"on\0" as * const u8 as * const c_char , types : unsafe { & wp_presentation_requests_feedback_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_presentation_events : [ wl_message ; 1 ] = [ wl_message { name : b"clock_id\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_presentation_interface : wl_interface = wl_interface { name : b"wp_presentation\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & wp_presentation_requests as * const _ } , event_count : 1 , events : unsafe { & wp_presentation_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wp_presentation_listener { # [ doc = "clock ID for timestamps\n\nThis event tells the client in which clock domain the\ncompositor interprets the timestamps used by the presentation\nextension. This clock is called the presentation clock.\n\nThe compositor sends this event when the client binds to the\npresentation interface. The presentation clock does not change\nduring the lifetime of the client connection.\n\nThe clock identifier is platform dependent. On Linux/glibc,\nthe identifier value is one of the clockid_t values accepted\nby clock_gettime(). clock_gettime() is defined by\nPOSIX.1-2001.\n\nTimestamps in this clock domain are expressed as tv_sec_hi,\ntv_sec_lo, tv_nsec triples, each component being an unsigned\n32-bit value. Whole seconds are in tv_sec which is a 64-bit\nvalue combined from tv_sec_hi and tv_sec_lo, and the\nadditional fractional part in tv_nsec as nanoseconds. Hence,\nfor valid timestamps tv_nsec must be in [0, 999999999].\n\nNote that clock_id applies only to the presentation clock,\nand implies nothing about e.g. the timestamps used in the\nWayland core protocol input events.\n\nCompositors should prefer a clock which does not jump and is\nnot slewed e.g. by NTP. The absolute value of the clock is\nirrelevant. Precision of one millisecond or better is\nrecommended. Clients must be able to query the current clock\nvalue directly, not by asking the compositor." ] fn clock_id ( & mut self , object : * mut wp_presentation , clk_id : u32 ) { } } pub unsafe fn wp_presentation_set_user_data ( wp_presentation : * mut super :: wp_presentation :: wp_presentation , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_presentation as _ , user_data ) ; } pub unsafe fn wp_presentation_get_user_data ( wp_presentation : * mut super :: wp_presentation :: wp_presentation ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_presentation as _ ) ; } pub unsafe fn wp_presentation_get_version ( wp_presentation : * mut super :: wp_presentation :: wp_presentation ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_presentation as _ ) ; } pub unsafe fn wp_presentation_add_listener ( wp_presentation : * mut super :: wp_presentation :: wp_presentation , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_presentation as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_presentation_add_rust_listener ( wp_presentation : * mut super :: wp_presentation :: wp_presentation , listener : & dyn wp_presentation_listener ) -> bool { let to = ( listener as * const dyn wp_presentation_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_presentation_add_listener ( wp_presentation as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "unbind from the presentation interface\n\nInforms the server that the client will no longer be using\nthis protocol object. Existing objects created by this object\nare not affected." ] pub unsafe fn wp_presentation_destroy ( wp_presentation : * mut super :: wp_presentation :: wp_presentation ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_presentation as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_presentation as _ ) ; } # [ doc = "request presentation feedback information\n\nRequest presentation feedback for the current content submission\non the given surface. This creates a new presentation_feedback\nobject, which will deliver the feedback information once. If\nmultiple presentation_feedback objects are created for the same\nsubmission, they will all deliver the same information.\n\nFor details on what information is returned, see the\npresentation_feedback interface." ] pub unsafe fn wp_presentation_feedback ( wp_presentation : * mut super :: wp_presentation :: wp_presentation , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: wp_presentation_feedback :: wp_presentation_feedback { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wp_presentation as _ , 1u32 , & super :: wp_presentation_feedback :: wp_presentation_feedback_interface as * const _ , surface , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "presentation time feedback event\n\nA presentation_feedback object returns an indication that a\nwl_surface content update has become visible to the user.\nOne object corresponds to one content update submission\n(wl_surface.commit). There are two possible outcomes: the\ncontent update is presented to the user, and a presentation\ntimestamp delivered; or, the user did not see the content\nupdate because it was superseded or its surface destroyed,\nand the content update is discarded.\n\nOnce a presentation_feedback object has delivered a 'presented'\nor 'discarded' event it is automatically destroyed." ] pub mod wp_presentation_feedback { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_presentation_feedback { } bitflags ! { # [ doc = "bitmask of flags in presented event\n\nThese flags provide information about how the presentation of\nthe related content update was done. The intent is to help\nclients assess the reliability of the feedback and the visual\nquality with respect to possible tearing and timings." ] pub struct kind : u32 { # [ doc = "presentation was vsync'd\n\nThe presentation was synchronized to the \"vertical retrace\" by\nthe display hardware such that tearing does not happen.\nRelying on user space scheduling is not acceptable for this\nflag. If presentation is done by a copy to the active\nfrontbuffer, then it must guarantee that tearing cannot\nhappen." ] const vsync = 1 ; # [ doc = "hardware provided the presentation timestamp\n\nThe display hardware provided measurements that the hardware\ndriver converted into a presentation timestamp. Sampling a\nclock in user space is not acceptable for this flag." ] const hw_clock = 2 ; # [ doc = "hardware signalled the start of the presentation\n\nThe display hardware signalled that it started using the new\nimage content. The opposite of this is e.g. a timer being used\nto guess when the display hardware has switched to the new\nimage content." ] const hw_completion = 4 ; # [ doc = "presentation was done zero-copy\n\nThe presentation of this update was done zero-copy. This means\nthe buffer from the client was given to display hardware as\nis, without copying it. Compositing with OpenGL counts as\ncopying, even if textured directly from the client buffer.\nPossible zero-copy cases include direct scanout of a\nfullscreen surface and a surface on a hardware overlay." ] const zero_copy = 8 ; } } impl kind { pub fn from_raw ( n : u32 ) -> Option < kind > { Some ( kind :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } static mut wp_presentation_feedback_events_sync_output_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_presentation_feedback_events : [ wl_message ; 3 ] = [ wl_message { name : b"sync_output\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wp_presentation_feedback_events_sync_output_types as * const _ } , } , wl_message { name : b"presented\0" as * const u8 as * const c_char , signature : b"uuuuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"discarded\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_presentation_feedback_interface : wl_interface = wl_interface { name : b"wp_presentation_feedback\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 3 , events : unsafe { & wp_presentation_feedback_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wp_presentation_feedback_listener { # [ doc = "presentation synchronized to this output\n\nAs presentation can be synchronized to only one output at a\ntime, this event tells which output it was. This event is only\nsent prior to the presented event.\n\nAs clients may bind to the same global wl_output multiple\ntimes, this event is sent for each bound instance that matches\nthe synchronized output. If a client has not bound to the\nright wl_output global at all, this event is not sent." ] fn sync_output ( & mut self , object : * mut wp_presentation_feedback , output : * mut super :: wl_output :: wl_output ) { } # [ doc = "the content update was displayed\n\nThe associated content update was displayed to the user at the\nindicated time (tv_sec_hi/lo, tv_nsec). For the interpretation of\nthe timestamp, see presentation.clock_id event.\n\nThe timestamp corresponds to the time when the content update\nturned into light the first time on the surface's main output.\nCompositors may approximate this from the framebuffer flip\ncompletion events from the system, and the latency of the\nphysical display path if known.\n\nThis event is preceded by all related sync_output events\ntelling which output's refresh cycle the feedback corresponds\nto, i.e. the main output for the surface. Compositors are\nrecommended to choose the output containing the largest part\nof the wl_surface, or keeping the output they previously\nchose. Having a stable presentation output association helps\nclients predict future output refreshes (vblank).\n\nThe 'refresh' argument gives the compositor's prediction of how\nmany nanoseconds after tv_sec, tv_nsec the very next output\nrefresh may occur. This is to further aid clients in\npredicting future refreshes, i.e., estimating the timestamps\ntargeting the next few vblanks. If such prediction cannot\nusefully be done, the argument is zero.\n\nIf the output does not have a constant refresh rate, explicit\nvideo mode switches excluded, then the refresh argument must\nbe zero.\n\nThe 64-bit value combined from seq_hi and seq_lo is the value\nof the output's vertical retrace counter when the content\nupdate was first scanned out to the display. This value must\nbe compatible with the definition of MSC in\nGLX_OML_sync_control specification. Note, that if the display\npath has a non-zero latency, the time instant specified by\nthis counter may differ from the timestamp's.\n\nIf the output does not have a concept of vertical retrace or a\nrefresh cycle, or the output device is self-refreshing without\na way to query the refresh count, then the arguments seq_hi\nand seq_lo must be zero." ] fn presented ( & mut self , object : * mut wp_presentation_feedback , tv_sec_hi : u32 , tv_sec_lo : u32 , tv_nsec : u32 , refresh : u32 , seq_hi : u32 , seq_lo : u32 , flags : kind ) { } # [ doc = "the content update was not displayed\n\nThe content update was never displayed to the user." ] fn discarded ( & mut self , object : * mut wp_presentation_feedback , ) { } } pub unsafe fn wp_presentation_feedback_set_user_data ( wp_presentation_feedback : * mut super :: wp_presentation_feedback :: wp_presentation_feedback , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_presentation_feedback as _ , user_data ) ; } pub unsafe fn wp_presentation_feedback_get_user_data ( wp_presentation_feedback : * mut super :: wp_presentation_feedback :: wp_presentation_feedback ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_presentation_feedback as _ ) ; } pub unsafe fn wp_presentation_feedback_get_version ( wp_presentation_feedback : * mut super :: wp_presentation_feedback :: wp_presentation_feedback ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_presentation_feedback as _ ) ; } pub unsafe fn wp_presentation_feedback_add_listener ( wp_presentation_feedback : * mut super :: wp_presentation_feedback :: wp_presentation_feedback , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_presentation_feedback as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_presentation_feedback_add_rust_listener ( wp_presentation_feedback : * mut super :: wp_presentation_feedback :: wp_presentation_feedback , listener : & dyn wp_presentation_feedback_listener ) -> bool { let to = ( listener as * const dyn wp_presentation_feedback_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_presentation_feedback_add_listener ( wp_presentation_feedback as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wp_presentation_feedback_destroy ( wp_presentation_feedback : * mut super :: wp_presentation_feedback :: wp_presentation_feedback ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_presentation_feedback as _ ) ; } } } pub mod fullscreen_shell { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Displays a single surface per output\n\nDisplays a single surface per output.\n\nThis interface provides a mechanism for a single client to display\nsimple full-screen surfaces. While there technically may be multiple\nclients bound to this interface, only one of those clients should be\nshown at a time.\n\nTo present a surface, the client uses either the present_surface or\npresent_surface_for_mode requests. Presenting a surface takes effect\non the next wl_surface.commit. See the individual requests for\ndetails about scaling and mode switches.\n\nThe client can have at most one surface per output at any time.\nRequesting a surface be presented on an output that already has a\nsurface replaces the previously presented surface. Presenting a null\nsurface removes its content and effectively disables the output.\nExactly what happens when an output is \"disabled\" is\ncompositor-specific. The same surface may be presented on multiple\noutputs simultaneously.\n\nOnce a surface is presented on an output, it stays on that output\nuntil either the client removes it or the compositor destroys the\noutput. This way, the client can update the output's contents by\nsimply attaching a new buffer." ] pub mod _wl_fullscreen_shell { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum _wl_fullscreen_shell { } # [ doc = "capabilities advertised by the compositor\n\nVarious capabilities that can be advertised by the compositor. They\nare advertised one-at-a-time when the wl_fullscreen_shell interface is\nbound. See the wl_fullscreen_shell.capability event for more details.\n\nARBITRARY_MODE:\nThis is a hint to the client that indicates that the compositor is\ncapable of setting practically any mode on its outputs. If this\ncapability is provided, wl_fullscreen_shell.present_surface_for_mode\nwill almost never fail and clients should feel free to set whatever\nmode they like. If the compositor does not advertise this, it may\nstill support some modes that are not advertised through wl_global.mode\nbut it is less likely.\n\nCURSOR_PLANE:\nThis is a hint to the client that indicates that the compositor can\nhandle a cursor surface from the client without actually compositing.\nThis may be because of a hardware cursor plane or some other mechanism.\nIf the compositor does not advertise this capability then setting\nwl_pointer.cursor may degrade performance or be ignored entirely. If\nCURSOR_PLANE is not advertised, it is recommended that the client draw\nits own cursor and set wl_pointer.cursor(NULL)." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum capability { # [ doc = "compositor is capable of almost any output mode" ] arbitrary_modes = 1 , # [ doc = "compositor has a separate cursor plane" ] cursor_plane = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { match n { 1 => Some ( capability :: arbitrary_modes ) , 2 => Some ( capability :: cursor_plane ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "different method to set the surface fullscreen\n\nHints to indicate to the compositor how to deal with a conflict\nbetween the dimensions of the surface and the dimensions of the\noutput. The compositor is free to ignore this parameter." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum present_method { # [ doc = "no preference, apply default policy" ] default = 0 , # [ doc = "center the surface on the output" ] center = 1 , # [ doc = "scale the surface, preserving aspect ratio, to the largest size that will fit on the output" ] zoom = 2 , # [ doc = "scale the surface, preserving aspect ratio, to fully fill the output cropping if needed" ] zoom_crop = 3 , # [ doc = "scale the surface to the size of the output ignoring aspect ratio" ] stretch = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl present_method { pub fn from_raw ( n : u32 ) -> Option < present_method > { match n { 0 => Some ( present_method :: default ) , 1 => Some ( present_method :: center ) , 2 => Some ( present_method :: zoom ) , 3 => Some ( present_method :: zoom_crop ) , 4 => Some ( present_method :: stretch ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "wl_fullscreen_shell error values\n\nThese errors can be emitted in response to wl_fullscreen_shell requests" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "present_method is not known" ] invalid_method = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_method ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut _wl_fullscreen_shell_requests_present_surface_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; static mut _wl_fullscreen_shell_requests_present_surface_for_mode_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , NULLPTR as * const wl_interface , unsafe { & super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut _wl_fullscreen_shell_requests : [ wl_message ; 3 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"present_surface\0" as * const u8 as * const c_char , signature : b"?ou?o\0" as * const u8 as * const c_char , types : unsafe { & _wl_fullscreen_shell_requests_present_surface_types as * const _ } , } , wl_message { name : b"present_surface_for_mode\0" as * const u8 as * const c_char , signature : b"ooin\0" as * const u8 as * const c_char , types : unsafe { & _wl_fullscreen_shell_requests_present_surface_for_mode_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut _wl_fullscreen_shell_events : [ wl_message ; 1 ] = [ wl_message { name : b"capability\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut _wl_fullscreen_shell_interface : wl_interface = wl_interface { name : b"_wl_fullscreen_shell\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & _wl_fullscreen_shell_requests as * const _ } , event_count : 1 , events : unsafe { & _wl_fullscreen_shell_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait _wl_fullscreen_shell_listener { # [ doc = "advertises a capability of the compositor\n\nAdvertises a single capability of the compositor.\n\nWhen the wl_fullscreen_shell interface is bound, this event is emitted\nonce for each capability advertised. Valid capabilities are given by\nthe wl_fullscreen_shell.capability enum. If clients want to take\nadvantage of any of these capabilities, they should use a\nwl_display.sync request immediately after binding to ensure that they\nreceive all the capability events." ] fn capability ( & mut self , object : * mut _wl_fullscreen_shell , capability : u32 ) { } } pub unsafe fn _wl_fullscreen_shell_set_user_data ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , _wl_fullscreen_shell as _ , user_data ) ; } pub unsafe fn _wl_fullscreen_shell_get_user_data ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , _wl_fullscreen_shell as _ ) ; } pub unsafe fn _wl_fullscreen_shell_get_version ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , _wl_fullscreen_shell as _ ) ; } pub unsafe fn _wl_fullscreen_shell_add_listener ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , _wl_fullscreen_shell as _ , listener as _ , data as _ ) ; } pub unsafe fn _wl_fullscreen_shell_add_rust_listener ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell , listener : & dyn _wl_fullscreen_shell_listener ) -> bool { let to = ( listener as * const dyn _wl_fullscreen_shell_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return _wl_fullscreen_shell_add_listener ( _wl_fullscreen_shell as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn _wl_fullscreen_shell_destroy ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , _wl_fullscreen_shell as _ ) ; } # [ doc = "release the wl_fullscreen_shell interface\n\nRelease the binding from the wl_fullscreen_shell interface\n\nThis destroys the server-side object and frees this binding. If\nthe client binds to wl_fullscreen_shell multiple times, it may wish\nto free some of those bindings." ] pub unsafe fn _wl_fullscreen_shell_release ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , _wl_fullscreen_shell as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , _wl_fullscreen_shell as _ ) ; } # [ doc = "present surface for display\n\nPresent a surface on the given output.\n\nIf the output is null, the compositor will present the surface on\nwhatever display (or displays) it thinks best. In particular, this\nmay replace any or all surfaces currently presented so it should\nnot be used in combination with placing surfaces on specific\noutputs.\n\nThe method parameter is a hint to the compositor for how the surface\nis to be presented. In particular, it tells the compostior how to\nhandle a size mismatch between the presented surface and the\noutput. The compositor is free to ignore this parameter.\n\nThe \"zoom\", \"zoom_crop\", and \"stretch\" methods imply a scaling\noperation on the surface. This will override any kind of output\nscaling, so the buffer_scale property of the surface is effectively\nignored." ] pub unsafe fn _wl_fullscreen_shell_present_surface ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell , surface : * mut super :: wl_surface :: wl_surface , method : u32 , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , _wl_fullscreen_shell as _ , 1u32 , surface , method , output , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "present surface for display at a particular mode\n\nPresents a surface on the given output for a particular mode.\n\nIf the current size of the output differs from that of the surface,\nthe compositor will attempt to change the size of the output to\nmatch the surface. The result of the mode-switch operation will be\nreturned via the provided wl_fullscreen_shell_mode_feedback object.\n\nIf the current output mode matches the one requested or if the\ncompositor successfully switches the mode to match the surface,\nthen the mode_successful event will be sent and the output will\ncontain the contents of the given surface. If the compositor\ncannot match the output size to the surface size, the mode_failed\nwill be sent and the output will contain the contents of the\npreviously presented surface (if any). If another surface is\npresented on the given output before either of these has a chance\nto happen, the present_cancelled event will be sent.\n\nDue to race conditions and other issues unknown to the client, no\nmode-switch operation is guaranteed to succeed. However, if the\nmode is one advertised by wl_output.mode or if the compositor\nadvertises the ARBITRARY_MODES capability, then the client should\nexpect that the mode-switch operation will usually succeed.\n\nIf the size of the presented surface changes, the resulting output\nis undefined. The compositor may attempt to change the output mode\nto compensate. However, there is no guarantee that a suitable mode\nwill be found and the client has no way to be notified of success\nor failure.\n\nThe framerate parameter specifies the desired framerate for the\noutput in mHz. The compositor is free to ignore this parameter. A\nvalue of 0 indicates that the client has no preference.\n\nIf the value of wl_output.scale differs from wl_surface.buffer_scale,\nthen the compositor may choose a mode that matches either the buffer\nsize or the surface size. In either case, the surface will fill the\noutput." ] pub unsafe fn _wl_fullscreen_shell_present_surface_for_mode ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell , surface : * mut super :: wl_surface :: wl_surface , output : * mut super :: wl_output :: wl_output , framerate : i32 ) -> * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , _wl_fullscreen_shell as _ , 2u32 , & super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback_interface as * const _ , surface , output , framerate , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } pub mod _wl_fullscreen_shell_mode_feedback { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum _wl_fullscreen_shell_mode_feedback { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut _wl_fullscreen_shell_mode_feedback_events : [ wl_message ; 3 ] = [ wl_message { name : b"mode_successful\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"mode_failed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"present_cancelled\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut _wl_fullscreen_shell_mode_feedback_interface : wl_interface = wl_interface { name : b"_wl_fullscreen_shell_mode_feedback\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 3 , events : unsafe { & _wl_fullscreen_shell_mode_feedback_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait _wl_fullscreen_shell_mode_feedback_listener { # [ doc = "mode switch succeeded\n\nThis event indicates that the attempted mode switch operation was\nsuccessful. A surface of the size requested in the mode switch\nwill fill the output without scaling.\n\nUpon receiving this event, the client should destroy the\nwl_fullscreen_shell_mode_feedback object." ] fn mode_successful ( & mut self , object : * mut _wl_fullscreen_shell_mode_feedback , ) { } # [ doc = "mode switch failed\n\nThis event indicates that the attempted mode switch operation\nfailed. This may be because the requested output mode is not\npossible or it may mean that the compositor does not want to allow it.\n\nUpon receiving this event, the client should destroy the\nwl_fullscreen_shell_mode_feedback object." ] fn mode_failed ( & mut self , object : * mut _wl_fullscreen_shell_mode_feedback , ) { } # [ doc = "mode switch cancelled\n\nThis event indicates that the attempted mode switch operation was\ncancelled. Most likely this is because the client requested a\nsecond mode switch before the first one completed.\n\nUpon receiving this event, the client should destroy the\nwl_fullscreen_shell_mode_feedback object." ] fn present_cancelled ( & mut self , object : * mut _wl_fullscreen_shell_mode_feedback , ) { } } pub unsafe fn _wl_fullscreen_shell_mode_feedback_set_user_data ( _wl_fullscreen_shell_mode_feedback : * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , _wl_fullscreen_shell_mode_feedback as _ , user_data ) ; } pub unsafe fn _wl_fullscreen_shell_mode_feedback_get_user_data ( _wl_fullscreen_shell_mode_feedback : * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , _wl_fullscreen_shell_mode_feedback as _ ) ; } pub unsafe fn _wl_fullscreen_shell_mode_feedback_get_version ( _wl_fullscreen_shell_mode_feedback : * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , _wl_fullscreen_shell_mode_feedback as _ ) ; } pub unsafe fn _wl_fullscreen_shell_mode_feedback_add_listener ( _wl_fullscreen_shell_mode_feedback : * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , _wl_fullscreen_shell_mode_feedback as _ , listener as _ , data as _ ) ; } pub unsafe fn _wl_fullscreen_shell_mode_feedback_add_rust_listener ( _wl_fullscreen_shell_mode_feedback : * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback , listener : & dyn _wl_fullscreen_shell_mode_feedback_listener ) -> bool { let to = ( listener as * const dyn _wl_fullscreen_shell_mode_feedback_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return _wl_fullscreen_shell_mode_feedback_add_listener ( _wl_fullscreen_shell_mode_feedback as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn _wl_fullscreen_shell_mode_feedback_destroy ( _wl_fullscreen_shell_mode_feedback : * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , _wl_fullscreen_shell_mode_feedback as _ ) ; } } } pub mod xdg_shell { use super :: wayland :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "create desktop-style surfaces\n\nThe xdg_wm_base interface is exposed as a global object enabling clients\nto turn their wl_surfaces into windows in a desktop environment. It\ndefines the basic functionality needed for clients and the compositor to\ncreate windows that can be dragged, resized, maximized, etc, as well as\ncreating transient windows such as popup menus." ] pub mod xdg_wm_base { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_wm_base { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc = "xdg_wm_base was destroyed before children" ] defunct_surfaces = 1 , # [ doc = "the client tried to map or destroy a non-topmost popup" ] not_the_topmost_popup = 2 , # [ doc = "the client specified an invalid popup parent surface" ] invalid_popup_parent = 3 , # [ doc = "the client provided an invalid surface state" ] invalid_surface_state = 4 , # [ doc = "the client provided an invalid positioner" ] invalid_positioner = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , 1 => Some ( error :: defunct_surfaces ) , 2 => Some ( error :: not_the_topmost_popup ) , 3 => Some ( error :: invalid_popup_parent ) , 4 => Some ( error :: invalid_surface_state ) , 5 => Some ( error :: invalid_positioner ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_wm_base_requests_create_positioner_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: xdg_positioner :: xdg_positioner_interface as * const wl_interface } , ] ; static mut xdg_wm_base_requests_get_xdg_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: xdg_surface :: xdg_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_wm_base_requests : [ wl_message ; 4 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_positioner\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & xdg_wm_base_requests_create_positioner_types as * const _ } , } , wl_message { name : b"get_xdg_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & xdg_wm_base_requests_get_xdg_surface_types as * const _ } , } , wl_message { name : b"pong\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_wm_base_events : [ wl_message ; 1 ] = [ wl_message { name : b"ping\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_wm_base_interface : wl_interface = wl_interface { name : b"xdg_wm_base\0" as * const u8 as * const c_char , version : 3 , request_count : 4 , requests : unsafe { & xdg_wm_base_requests as * const _ } , event_count : 1 , events : unsafe { & xdg_wm_base_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_wm_base_listener { # [ doc = "check if the client is alive\n\nThe ping event asks the client if it's still alive. Pass the\nserial specified in the event back to the compositor by sending\na \"pong\" request back with the specified serial. See xdg_wm_base.pong.\n\nCompositors can use this to determine if the client is still\nalive. It's unspecified what will happen if the client doesn't\nrespond to the ping request, or in what timeframe. Clients should\ntry to respond in a reasonable amount of time.\n\nA compositor is free to ping in any way it wants, but a client must\nalways respond to any xdg_wm_base object it created." ] fn ping ( & mut self , object : * mut xdg_wm_base , serial : u32 ) { } } pub unsafe fn xdg_wm_base_set_user_data ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_wm_base as _ , user_data ) ; } pub unsafe fn xdg_wm_base_get_user_data ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_wm_base as _ ) ; } pub unsafe fn xdg_wm_base_get_version ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_wm_base as _ ) ; } pub unsafe fn xdg_wm_base_add_listener ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_wm_base as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_wm_base_add_rust_listener ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base , listener : & dyn xdg_wm_base_listener ) -> bool { let to = ( listener as * const dyn xdg_wm_base_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_wm_base_add_listener ( xdg_wm_base as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy xdg_wm_base\n\nDestroy this xdg_wm_base object.\n\nDestroying a bound xdg_wm_base object while there are surfaces\nstill alive created by this xdg_wm_base object instance is illegal\nand will result in a protocol error." ] pub unsafe fn xdg_wm_base_destroy ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_wm_base as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_wm_base as _ ) ; } # [ doc = "create a positioner object\n\nCreate a positioner object. A positioner object is used to position\nsurfaces relative to some parent surface. See the interface description\nand xdg_surface.get_popup for details." ] pub unsafe fn xdg_wm_base_create_positioner ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base ) -> * mut super :: xdg_positioner :: xdg_positioner { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_wm_base as _ , 1u32 , & super :: xdg_positioner :: xdg_positioner_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "create a shell surface from a surface\n\nThis creates an xdg_surface for the given surface. While xdg_surface\nitself is not a role, the corresponding surface may only be assigned\na role extending xdg_surface, such as xdg_toplevel or xdg_popup. It is\nillegal to create an xdg_surface for a wl_surface which already has an\nassigned role and this will result in a protocol error.\n\nThis creates an xdg_surface for the given surface. An xdg_surface is\nused as basis to define a role to a given surface, such as xdg_toplevel\nor xdg_popup. It also manages functionality shared between xdg_surface\nbased surface roles.\n\nSee the documentation of xdg_surface for more details about what an\nxdg_surface is and how it is used." ] pub unsafe fn xdg_wm_base_get_xdg_surface ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: xdg_surface :: xdg_surface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_wm_base as _ , 2u32 , & super :: xdg_surface :: xdg_surface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } # [ doc = "respond to a ping event\n\nA client must respond to a ping event with a pong request or\nthe client may be deemed unresponsive. See xdg_wm_base.ping." ] pub unsafe fn xdg_wm_base_pong ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_wm_base as _ , 3u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "child surface positioner\n\nThe xdg_positioner provides a collection of rules for the placement of a\nchild surface relative to a parent surface. Rules can be defined to ensure\nthe child surface remains within the visible area's borders, and to\nspecify how the child surface changes its position, such as sliding along\nan axis, or flipping around a rectangle. These positioner-created rules are\nconstrained by the requirement that a child surface must intersect with or\nbe at least partially adjacent to its parent surface.\n\nSee the various requests for details about possible rules.\n\nAt the time of the request, the compositor makes a copy of the rules\nspecified by the xdg_positioner. Thus, after the request is complete the\nxdg_positioner object can be destroyed or reused; further changes to the\nobject will have no effect on previous usages.\n\nFor an xdg_positioner object to be considered complete, it must have a\nnon-zero size set by set_size, and a non-zero anchor rectangle set by\nset_anchor_rect. Passing an incomplete xdg_positioner object when\npositioning a surface raises an error." ] pub mod xdg_positioner { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_positioner { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "invalid input provided" ] invalid_input = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_input ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum anchor { none = 0 , top = 1 , bottom = 2 , left = 3 , right = 4 , top_left = 5 , bottom_left = 6 , top_right = 7 , bottom_right = 8 , # [ doc ( hidden ) ] __nonexhaustive , } impl anchor { pub fn from_raw ( n : u32 ) -> Option < anchor > { match n { 0 => Some ( anchor :: none ) , 1 => Some ( anchor :: top ) , 2 => Some ( anchor :: bottom ) , 3 => Some ( anchor :: left ) , 4 => Some ( anchor :: right ) , 5 => Some ( anchor :: top_left ) , 6 => Some ( anchor :: bottom_left ) , 7 => Some ( anchor :: top_right ) , 8 => Some ( anchor :: bottom_right ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum gravity { none = 0 , top = 1 , bottom = 2 , left = 3 , right = 4 , top_left = 5 , bottom_left = 6 , top_right = 7 , bottom_right = 8 , # [ doc ( hidden ) ] __nonexhaustive , } impl gravity { pub fn from_raw ( n : u32 ) -> Option < gravity > { match n { 0 => Some ( gravity :: none ) , 1 => Some ( gravity :: top ) , 2 => Some ( gravity :: bottom ) , 3 => Some ( gravity :: left ) , 4 => Some ( gravity :: right ) , 5 => Some ( gravity :: top_left ) , 6 => Some ( gravity :: bottom_left ) , 7 => Some ( gravity :: top_right ) , 8 => Some ( gravity :: bottom_right ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { # [ doc = "constraint adjustments\n\nThe constraint adjustment value define ways the compositor will adjust\nthe position of the surface, if the unadjusted position would result\nin the surface being partly constrained.\n\nWhether a surface is considered 'constrained' is left to the compositor\nto determine. For example, the surface may be partly outside the\ncompositor's defined 'work area', thus necessitating the child surface's\nposition be adjusted until it is entirely inside the work area.\n\nThe adjustments can be combined, according to a defined precedence: 1)\nFlip, 2) Slide, 3) Resize." ] pub struct constraint_adjustment : u32 { # [ doc = "don't move the child surface when constrained\n\nDon't alter the surface position even if it is constrained on some\naxis, for example partially outside the edge of an output." ] const none = 0 ; # [ doc = "move along the x axis until unconstrained\n\nSlide the surface along the x axis until it is no longer constrained.\n\nFirst try to slide towards the direction of the gravity on the x axis\nuntil either the edge in the opposite direction of the gravity is\nunconstrained or the edge in the direction of the gravity is\nconstrained.\n\nThen try to slide towards the opposite direction of the gravity on the\nx axis until either the edge in the direction of the gravity is\nunconstrained or the edge in the opposite direction of the gravity is\nconstrained." ] const slide_x = 1 ; # [ doc = "move along the y axis until unconstrained\n\nSlide the surface along the y axis until it is no longer constrained.\n\nFirst try to slide towards the direction of the gravity on the y axis\nuntil either the edge in the opposite direction of the gravity is\nunconstrained or the edge in the direction of the gravity is\nconstrained.\n\nThen try to slide towards the opposite direction of the gravity on the\ny axis until either the edge in the direction of the gravity is\nunconstrained or the edge in the opposite direction of the gravity is\nconstrained." ] const slide_y = 2 ; # [ doc = "invert the anchor and gravity on the x axis\n\nInvert the anchor and gravity on the x axis if the surface is\nconstrained on the x axis. For example, if the left edge of the\nsurface is constrained, the gravity is 'left' and the anchor is\n'left', change the gravity to 'right' and the anchor to 'right'.\n\nIf the adjusted position also ends up being constrained, the resulting\nposition of the flip_x adjustment will be the one before the\nadjustment." ] const flip_x = 4 ; # [ doc = "invert the anchor and gravity on the y axis\n\nInvert the anchor and gravity on the y axis if the surface is\nconstrained on the y axis. For example, if the bottom edge of the\nsurface is constrained, the gravity is 'bottom' and the anchor is\n'bottom', change the gravity to 'top' and the anchor to 'top'.\n\nThe adjusted position is calculated given the original anchor\nrectangle and offset, but with the new flipped anchor and gravity\nvalues.\n\nIf the adjusted position also ends up being constrained, the resulting\nposition of the flip_y adjustment will be the one before the\nadjustment." ] const flip_y = 8 ; # [ doc = "horizontally resize the surface\n\nResize the surface horizontally so that it is completely\nunconstrained." ] const resize_x = 16 ; # [ doc = "vertically resize the surface\n\nResize the surface vertically so that it is completely unconstrained." ] const resize_y = 32 ; } } impl constraint_adjustment { pub fn from_raw ( n : u32 ) -> Option < constraint_adjustment > { Some ( constraint_adjustment :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_positioner_requests : [ wl_message ; 10 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_anchor_rect\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_anchor\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_gravity\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_constraint_adjustment\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_offset\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_reactive\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent_size\0" as * const u8 as * const c_char , signature : b"3ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent_configure\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_positioner_interface : wl_interface = wl_interface { name : b"xdg_positioner\0" as * const u8 as * const c_char , version : 3 , request_count : 10 , requests : unsafe { & xdg_positioner_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_positioner_listener { } pub unsafe fn xdg_positioner_set_user_data ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_positioner as _ , user_data ) ; } pub unsafe fn xdg_positioner_get_user_data ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_positioner as _ ) ; } pub unsafe fn xdg_positioner_get_version ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_positioner as _ ) ; } pub unsafe fn xdg_positioner_add_listener ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_positioner as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_positioner_add_rust_listener ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , listener : & dyn xdg_positioner_listener ) -> bool { let to = ( listener as * const dyn xdg_positioner_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_positioner_add_listener ( xdg_positioner as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_positioner object\n\nNotify the compositor that the xdg_positioner will no longer be used." ] pub unsafe fn xdg_positioner_destroy ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_positioner as _ ) ; } # [ doc = "set the size of the to-be positioned rectangle\n\nSet the size of the surface that is to be positioned with the positioner\nobject. The size is in surface-local coordinates and corresponds to the\nwindow geometry. See xdg_surface.set_window_geometry.\n\nIf a zero or negative size is set the invalid_input error is raised." ] pub unsafe fn xdg_positioner_set_size ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 1u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the anchor rectangle within the parent surface\n\nSpecify the anchor rectangle within the parent surface that the child\nsurface will be placed relative to. The rectangle is relative to the\nwindow geometry as defined by xdg_surface.set_window_geometry of the\nparent surface.\n\nWhen the xdg_positioner object is used to position a child surface, the\nanchor rectangle may not extend outside the window geometry of the\npositioned child's parent surface.\n\nIf a negative size is set the invalid_input error is raised." ] pub unsafe fn xdg_positioner_set_anchor_rect ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 2u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set anchor rectangle anchor\n\nDefines the anchor point for the anchor rectangle. The specified anchor\nis used derive an anchor point that the child surface will be\npositioned relative to. If a corner anchor is set (e.g. 'top_left' or\n'bottom_right'), the anchor point will be at the specified corner;\notherwise, the derived anchor point will be centered on the specified\nedge, or in the center of the anchor rectangle if no edge is specified." ] pub unsafe fn xdg_positioner_set_anchor ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , anchor : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 3u32 , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set child surface gravity\n\nDefines in what direction a surface should be positioned, relative to\nthe anchor point of the parent surface. If a corner gravity is\nspecified (e.g. 'bottom_right' or 'top_left'), then the child surface\nwill be placed towards the specified gravity; otherwise, the child\nsurface will be centered over the anchor point on any axis that had no\ngravity specified." ] pub unsafe fn xdg_positioner_set_gravity ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , gravity : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 4u32 , gravity , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the adjustment to be done when constrained\n\nSpecify how the window should be positioned if the originally intended\nposition caused the surface to be constrained, meaning at least\npartially outside positioning boundaries set by the compositor. The\nadjustment is set by constructing a bitmask describing the adjustment to\nbe made when the surface is constrained on that axis.\n\nIf no bit for one axis is set, the compositor will assume that the child\nsurface should not change its position on that axis when constrained.\n\nIf more than one bit for one axis is set, the order of how adjustments\nare applied is specified in the corresponding adjustment descriptions.\n\nThe default adjustment is none." ] pub unsafe fn xdg_positioner_set_constraint_adjustment ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , constraint_adjustment : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 5u32 , constraint_adjustment , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface position offset\n\nSpecify the surface position offset relative to the position of the\nanchor on the anchor rectangle and the anchor on the surface. For\nexample if the anchor of the anchor rectangle is at (x, y), the surface\nhas the gravity bottom|right, and the offset is (ox, oy), the calculated\nsurface position will be (x + ox, y + oy). The offset position of the\nsurface is the one used for constraint testing. See\nset_constraint_adjustment.\n\nAn example use case is placing a popup menu on top of a user interface\nelement, while aligning the user interface element of the parent surface\nwith some user interface element placed somewhere in the popup surface." ] pub unsafe fn xdg_positioner_set_offset ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 6u32 , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "continuously reconstrain the surface\n\nWhen set reactive, the surface is reconstrained if the conditions used\nfor constraining changed, e.g. the parent window moved.\n\nIf the conditions changed and the popup was reconstrained, an\nxdg_popup.configure event is sent with updated geometry, followed by an\nxdg_surface.configure event." ] pub unsafe fn xdg_positioner_set_reactive ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 7u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Set the parent window geometry the compositor should use when\npositioning the popup. The compositor may use this information to\ndetermine the future state the popup should be constrained using. If\nthis doesn't match the dimension of the parent the popup is eventually\npositioned against, the behavior is undefined.\n\nThe arguments are given in the surface-local coordinate space." ] pub unsafe fn xdg_positioner_set_parent_size ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , parent_width : i32 , parent_height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 8u32 , parent_width , parent_height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set parent configure this is a response to\n\nSet the serial of an xdg_surface.configure event this positioner will be\nused in response to. The compositor may use this information together\nwith set_parent_size to determine what future state the popup should be\nconstrained using." ] pub unsafe fn xdg_positioner_set_parent_configure ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 9u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "desktop user interface surface base interface\n\nAn interface that may be implemented by a wl_surface, for\nimplementations that provide a desktop-style user interface.\n\nIt provides a base set of functionality required to construct user\ninterface elements requiring management by the compositor, such as\ntoplevel windows, menus, etc. The types of functionality are split into\nxdg_surface roles.\n\nCreating an xdg_surface does not set the role for a wl_surface. In order\nto map an xdg_surface, the client must create a role-specific object\nusing, e.g., get_toplevel, get_popup. The wl_surface for any given\nxdg_surface can have at most one role, and may not be assigned any role\nnot based on xdg_surface.\n\nA role must be assigned before any other requests are made to the\nxdg_surface object.\n\nThe client must call wl_surface.commit on the corresponding wl_surface\nfor the xdg_surface state to take effect.\n\nCreating an xdg_surface from a wl_surface which has a buffer attached or\ncommitted is a client error, and any attempts by a client to attach or\nmanipulate a buffer prior to the first xdg_surface.configure call must\nalso be treated as errors.\n\nAfter creating a role-specific object and setting it up, the client must\nperform an initial commit without any buffer attached. The compositor\nwill reply with an xdg_surface.configure event. The client must\nacknowledge it and is then allowed to attach a buffer to map the surface.\n\nMapping an xdg_surface-based role surface is defined as making it\npossible for the surface to be shown by the compositor. Note that\na mapped surface is not guaranteed to be visible once it is mapped.\n\nFor an xdg_surface to be mapped by the compositor, the following\nconditions must be met:\n(1) the client has assigned an xdg_surface-based role to the surface\n(2) the client has set and committed the xdg_surface state and the\nrole-dependent state to the surface\n(3) the client has committed a buffer to the surface\n\nA newly-unmapped surface is considered to have met condition (1) out\nof the 3 required conditions for mapping a surface if its role surface\nhas not been destroyed." ] pub mod xdg_surface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_surface { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { not_constructed = 1 , already_constructed = 2 , unconfigured_buffer = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 1 => Some ( error :: not_constructed ) , 2 => Some ( error :: already_constructed ) , 3 => Some ( error :: unconfigured_buffer ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_surface_requests_get_toplevel_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: xdg_toplevel :: xdg_toplevel_interface as * const wl_interface } , ] ; static mut xdg_surface_requests_get_popup_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: xdg_popup :: xdg_popup_interface as * const wl_interface } , unsafe { & super :: xdg_surface :: xdg_surface_interface as * const wl_interface } , unsafe { & super :: xdg_positioner :: xdg_positioner_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_surface_requests : [ wl_message ; 5 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_toplevel\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_get_toplevel_types as * const _ } , } , wl_message { name : b"get_popup\0" as * const u8 as * const c_char , signature : b"n?oo\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_get_popup_types as * const _ } , } , wl_message { name : b"set_window_geometry\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"ack_configure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_surface_events : [ wl_message ; 1 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_surface_interface : wl_interface = wl_interface { name : b"xdg_surface\0" as * const u8 as * const c_char , version : 3 , request_count : 5 , requests : unsafe { & xdg_surface_requests as * const _ } , event_count : 1 , events : unsafe { & xdg_surface_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_surface_listener { # [ doc = "suggest a surface change\n\nThe configure event marks the end of a configure sequence. A configure\nsequence is a set of one or more events configuring the state of the\nxdg_surface, including the final xdg_surface.configure event.\n\nWhere applicable, xdg_surface surface roles will during a configure\nsequence extend this event as a latched state sent as events before the\nxdg_surface.configure event. Such events should be considered to make up\na set of atomically applied configuration states, where the\nxdg_surface.configure commits the accumulated state.\n\nClients should arrange their surface for the new states, and then send\nan ack_configure request with the serial sent in this configure event at\nsome point before committing the new surface.\n\nIf the client receives multiple configure events before it can respond\nto one, it is free to discard all but the last event it received." ] fn configure ( & mut self , object : * mut xdg_surface , serial : u32 ) { } } pub unsafe fn xdg_surface_set_user_data ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_surface as _ , user_data ) ; } pub unsafe fn xdg_surface_get_user_data ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_surface as _ ) ; } pub unsafe fn xdg_surface_get_version ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_surface as _ ) ; } pub unsafe fn xdg_surface_add_listener ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_surface as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_surface_add_rust_listener ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , listener : & dyn xdg_surface_listener ) -> bool { let to = ( listener as * const dyn xdg_surface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_surface_add_listener ( xdg_surface as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_surface\n\nDestroy the xdg_surface object. An xdg_surface must only be destroyed\nafter its role object has been destroyed." ] pub unsafe fn xdg_surface_destroy ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_surface as _ ) ; } # [ doc = "assign the xdg_toplevel surface role\n\nThis creates an xdg_toplevel object for the given xdg_surface and gives\nthe associated wl_surface the xdg_toplevel role.\n\nSee the documentation of xdg_toplevel for more details about what an\nxdg_toplevel is and how it is used." ] pub unsafe fn xdg_surface_get_toplevel ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) -> * mut super :: xdg_toplevel :: xdg_toplevel { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_surface as _ , 1u32 , & super :: xdg_toplevel :: xdg_toplevel_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "assign the xdg_popup surface role\n\nThis creates an xdg_popup object for the given xdg_surface and gives\nthe associated wl_surface the xdg_popup role.\n\nIf null is passed as a parent, a parent surface must be specified using\nsome other protocol, before committing the initial state.\n\nSee the documentation of xdg_popup for more details about what an\nxdg_popup is and how it is used." ] pub unsafe fn xdg_surface_get_popup ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , parent : * mut super :: xdg_surface :: xdg_surface , positioner : * mut super :: xdg_positioner :: xdg_positioner ) -> * mut super :: xdg_popup :: xdg_popup { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_surface as _ , 2u32 , & super :: xdg_popup :: xdg_popup_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , parent , positioner ) ; return r as _ ; } # [ doc = "set the new window geometry\n\nThe window geometry of a surface is its \"visible bounds\" from the\nuser's perspective. Client-side decorations often have invisible\nportions like drop-shadows which should be ignored for the\npurposes of aligning, placing and constraining windows.\n\nThe window geometry is double buffered, and will be applied at the\ntime wl_surface.commit of the corresponding wl_surface is called.\n\nWhen maintaining a position, the compositor should treat the (x, y)\ncoordinate of the window geometry as the top left corner of the window.\nA client changing the (x, y) window geometry coordinate should in\ngeneral not alter the position of the window.\n\nOnce the window geometry of the surface is set, it is not possible to\nunset it, and it will remain the same until set_window_geometry is\ncalled again, even if a new subsurface or buffer is attached.\n\nIf never set, the value is the full bounds of the surface,\nincluding any subsurfaces. This updates dynamically on every\ncommit. This unset is meant for extremely simple clients.\n\nThe arguments are given in the surface-local coordinate space of\nthe wl_surface associated with this xdg_surface.\n\nThe width and height must be greater than zero. Setting an invalid size\nwill raise an error. When applied, the effective window geometry will be\nthe set window geometry clamped to the bounding rectangle of the\ncombined geometry of the surface of the xdg_surface and the associated\nsubsurfaces." ] pub unsafe fn xdg_surface_set_window_geometry ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 3u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "ack a configure event\n\nWhen a configure event is received, if a client commits the\nsurface in response to the configure event, then the client\nmust make an ack_configure request sometime before the commit\nrequest, passing along the serial of the configure event.\n\nFor instance, for toplevel surfaces the compositor might use this\ninformation to move a surface to the top left only when the client has\ndrawn itself for the maximized or fullscreen state.\n\nIf the client receives multiple configure events before it\ncan respond to one, it only has to ack the last configure event.\n\nA client is not required to commit immediately after sending\nan ack_configure request - it may even ack_configure several times\nbefore its next surface commit.\n\nA client may send multiple ack_configure requests before committing, but\nonly the last request sent before a commit indicates which configure\nevent the client really is responding to." ] pub unsafe fn xdg_surface_ack_configure ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 4u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "toplevel surface\n\nThis interface defines an xdg_surface role which allows a surface to,\namong other things, set window-like properties such as maximize,\nfullscreen, and minimize, set application-specific metadata like title and\nid, and well as trigger user interactive operations such as interactive\nresize and move.\n\nUnmapping an xdg_toplevel means that the surface cannot be shown\nby the compositor until it is explicitly mapped again.\nAll active operations (e.g., move, resize) are canceled and all\nattributes (e.g. title, state, stacking, ...) are discarded for\nan xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to\nthe state it had right after xdg_surface.get_toplevel. The client\ncan re-map the toplevel by perfoming a commit without any buffer\nattached, waiting for a configure event and handling it as usual (see\nxdg_surface description).\n\nAttaching a null buffer to a toplevel unmaps the surface." ] pub mod xdg_toplevel { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_toplevel { } # [ doc = "edge values for resizing\n\nThese values are used to indicate which edge of a surface\nis being dragged in a resize operation." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum resize_edge { none = 0 , top = 1 , bottom = 2 , left = 4 , top_left = 5 , bottom_left = 6 , right = 8 , top_right = 9 , bottom_right = 10 , # [ doc ( hidden ) ] __nonexhaustive , } impl resize_edge { pub fn from_raw ( n : u32 ) -> Option < resize_edge > { match n { 0 => Some ( resize_edge :: none ) , 1 => Some ( resize_edge :: top ) , 2 => Some ( resize_edge :: bottom ) , 4 => Some ( resize_edge :: left ) , 5 => Some ( resize_edge :: top_left ) , 6 => Some ( resize_edge :: bottom_left ) , 8 => Some ( resize_edge :: right ) , 9 => Some ( resize_edge :: top_right ) , 10 => Some ( resize_edge :: bottom_right ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "types of state on the surface\n\nThe different state values used on the surface. This is designed for\nstate values like maximized, fullscreen. It is paired with the\nconfigure event to ensure that both the client and the compositor\nsetting the state can be synchronized.\n\nStates set in this way are double-buffered. They will get applied on\nthe next commit." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum state { # [ doc = "the surface is maximized\n\nThe surface is maximized. The window geometry specified in the configure\nevent must be obeyed by the client.\n\nThe client should draw without shadow or other\ndecoration outside of the window geometry." ] maximized = 1 , # [ doc = "the surface is fullscreen\n\nThe surface is fullscreen. The window geometry specified in the\nconfigure event is a maximum; the client cannot resize beyond it. For\na surface to cover the whole fullscreened area, the geometry\ndimensions must be obeyed by the client. For more details, see\nxdg_toplevel.set_fullscreen." ] fullscreen = 2 , # [ doc = "the surface is being resized\n\nThe surface is being resized. The window geometry specified in the\nconfigure event is a maximum; the client cannot resize beyond it.\nClients that have aspect ratio or cell sizing configuration can use\na smaller size, however." ] resizing = 3 , # [ doc = "the surface is now activated\n\nClient window decorations should be painted as if the window is\nactive. Do not assume this means that the window actually has\nkeyboard or pointer focus." ] activated = 4 , # [ doc = "the surface is tiled\n\nThe window is currently in a tiled layout and the left edge is\nconsidered to be adjacent to another part of the tiling grid." ] tiled_left = 5 , # [ doc = "the surface is tiled\n\nThe window is currently in a tiled layout and the right edge is\nconsidered to be adjacent to another part of the tiling grid." ] tiled_right = 6 , # [ doc = "the surface is tiled\n\nThe window is currently in a tiled layout and the top edge is\nconsidered to be adjacent to another part of the tiling grid." ] tiled_top = 7 , # [ doc = "the surface is tiled\n\nThe window is currently in a tiled layout and the bottom edge is\nconsidered to be adjacent to another part of the tiling grid." ] tiled_bottom = 8 , # [ doc ( hidden ) ] __nonexhaustive , } impl state { pub fn from_raw ( n : u32 ) -> Option < state > { match n { 1 => Some ( state :: maximized ) , 2 => Some ( state :: fullscreen ) , 3 => Some ( state :: resizing ) , 4 => Some ( state :: activated ) , 5 => Some ( state :: tiled_left ) , 6 => Some ( state :: tiled_right ) , 7 => Some ( state :: tiled_top ) , 8 => Some ( state :: tiled_bottom ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_toplevel_requests_set_parent_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: xdg_toplevel :: xdg_toplevel_interface as * const wl_interface } , ] ; static mut xdg_toplevel_requests_show_window_menu_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut xdg_toplevel_requests_move_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut xdg_toplevel_requests_resize_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut xdg_toplevel_requests_set_fullscreen_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_toplevel_requests : [ wl_message ; 14 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & xdg_toplevel_requests_set_parent_types as * const _ } , } , wl_message { name : b"set_title\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_app_id\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"show_window_menu\0" as * const u8 as * const c_char , signature : b"ouii\0" as * const u8 as * const c_char , types : unsafe { & xdg_toplevel_requests_show_window_menu_types as * const _ } , } , wl_message { name : b"move\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & xdg_toplevel_requests_move_types as * const _ } , } , wl_message { name : b"resize\0" as * const u8 as * const c_char , signature : b"ouu\0" as * const u8 as * const c_char , types : unsafe { & xdg_toplevel_requests_resize_types as * const _ } , } , wl_message { name : b"set_max_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_min_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_maximized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unset_maximized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_fullscreen\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & xdg_toplevel_requests_set_fullscreen_types as * const _ } , } , wl_message { name : b"unset_fullscreen\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_minimized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_toplevel_events : [ wl_message ; 2 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"iia\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"close\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_toplevel_interface : wl_interface = wl_interface { name : b"xdg_toplevel\0" as * const u8 as * const c_char , version : 3 , request_count : 14 , requests : unsafe { & xdg_toplevel_requests as * const _ } , event_count : 2 , events : unsafe { & xdg_toplevel_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_toplevel_listener { # [ doc = "suggest a surface change\n\nThis configure event asks the client to resize its toplevel surface or\nto change its state. The configured state should not be applied\nimmediately. See xdg_surface.configure for details.\n\nThe width and height arguments specify a hint to the window\nabout how its surface should be resized in window geometry\ncoordinates. See set_window_geometry.\n\nIf the width or height arguments are zero, it means the client\nshould decide its own window dimension. This may happen when the\ncompositor needs to configure the state of the surface but doesn't\nhave any information about any previous or expected dimension.\n\nThe states listed in the event specify how the width/height\narguments should be interpreted, and possibly how it should be\ndrawn.\n\nClients must send an ack_configure in response to this event. See\nxdg_surface.configure and xdg_surface.ack_configure for details." ] fn configure ( & mut self , object : * mut xdg_toplevel , width : i32 , height : i32 , states : * mut wl_array ) { } # [ doc = "surface wants to be closed\n\nThe close event is sent by the compositor when the user\nwants the surface to be closed. This should be equivalent to\nthe user clicking the close button in client-side decorations,\nif your application has any.\n\nThis is only a request that the user intends to close the\nwindow. The client may choose to ignore this request, or show\na dialog to ask the user to save their data, etc." ] fn close ( & mut self , object : * mut xdg_toplevel , ) { } } pub unsafe fn xdg_toplevel_set_user_data ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_toplevel as _ , user_data ) ; } pub unsafe fn xdg_toplevel_get_user_data ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_toplevel as _ ) ; } pub unsafe fn xdg_toplevel_get_version ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_toplevel as _ ) ; } pub unsafe fn xdg_toplevel_add_listener ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_toplevel as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_toplevel_add_rust_listener ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , listener : & dyn xdg_toplevel_listener ) -> bool { let to = ( listener as * const dyn xdg_toplevel_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_toplevel_add_listener ( xdg_toplevel as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_toplevel\n\nThis request destroys the role surface and unmaps the surface;\nsee \"Unmapping\" behavior in interface section for details." ] pub unsafe fn xdg_toplevel_destroy ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_toplevel as _ ) ; } # [ doc = "set the parent of this surface\n\nSet the \"parent\" of this surface. This surface should be stacked\nabove the parent surface and all other ancestor surfaces.\n\nParent windows should be set on dialogs, toolboxes, or other\n\"auxiliary\" surfaces, so that the parent is raised when the dialog\nis raised.\n\nSetting a null parent for a child window removes any parent-child\nrelationship for the child. Setting a null parent for a window which\ncurrently has no parent is a no-op.\n\nIf the parent is unmapped then its children are managed as\nthough the parent of the now-unmapped parent has become the\nparent of this surface. If no parent exists for the now-unmapped\nparent then the children are managed as though they have no\nparent surface." ] pub unsafe fn xdg_toplevel_set_parent ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , parent : * mut super :: xdg_toplevel :: xdg_toplevel ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 1u32 , parent , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface title\n\nSet a short title for the surface.\n\nThis string may be used to identify the surface in a task bar,\nwindow list, or other user interface elements provided by the\ncompositor.\n\nThe string must be encoded in UTF-8." ] pub unsafe fn xdg_toplevel_set_title ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , title : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 2u32 , title , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set application ID\n\nSet an application identifier for the surface.\n\nThe app ID identifies the general class of applications to which\nthe surface belongs. The compositor can use this to group multiple\nsurfaces together, or to determine how to launch a new application.\n\nFor D-Bus activatable applications, the app ID is used as the D-Bus\nservice name.\n\nThe compositor shell will try to group application surfaces together\nby their app ID. As a best practice, it is suggested to select app\nID's that match the basename of the application's .desktop file.\nFor example, \"org.freedesktop.FooViewer\" where the .desktop file is\n\"org.freedesktop.FooViewer.desktop\".\n\nLike other properties, a set_app_id request can be sent after the\nxdg_toplevel has been mapped to update the property.\n\nSee the desktop-entry specification [0] for more details on\napplication identifiers and how they relate to well-known D-Bus\nnames and .desktop files.\n\n[0] http://standards.freedesktop.org/desktop-entry-spec/" ] pub unsafe fn xdg_toplevel_set_app_id ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , app_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 3u32 , app_id , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "show the window menu\n\nClients implementing client-side decorations might want to show\na context menu when right-clicking on the decorations, giving the\nuser a menu that they can use to maximize or minimize the window.\n\nThis request asks the compositor to pop up such a window menu at\nthe given position, relative to the local surface coordinates of\nthe parent surface. There are no guarantees as to what menu items\nthe window menu contains.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event." ] pub unsafe fn xdg_toplevel_show_window_menu ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 4u32 , seat , serial , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive move\n\nStart an interactive, user-driven move of the surface.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event. The passed\nserial is used to determine the type of interactive move (touch,\npointer, etc).\n\nThe server may ignore move requests depending on the state of\nthe surface (e.g. fullscreen or maximized), or if the passed serial\nis no longer valid.\n\nIf triggered, the surface will lose the focus of the device\n(wl_pointer, wl_touch, etc) used for the move. It is up to the\ncompositor to visually indicate that the move is taking place, such as\nupdating a pointer cursor, during the move. There is no guarantee\nthat the device focus will return when the move is completed." ] pub unsafe fn xdg_toplevel_move ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , seat : * mut super :: wl_seat :: wl_seat , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 5u32 , seat , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive resize\n\nStart a user-driven, interactive resize of the surface.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event. The passed\nserial is used to determine the type of interactive resize (touch,\npointer, etc).\n\nThe server may ignore resize requests depending on the state of\nthe surface (e.g. fullscreen or maximized).\n\nIf triggered, the client will receive configure events with the\n\"resize\" state enum value and the expected sizes. See the \"resize\"\nenum value for more details about what is required. The client\nmust also acknowledge configure events using \"ack_configure\". After\nthe resize is completed, the client will receive another \"configure\"\nevent without the resize state.\n\nIf triggered, the surface also will lose the focus of the device\n(wl_pointer, wl_touch, etc) used for the resize. It is up to the\ncompositor to visually indicate that the resize is taking place,\nsuch as updating a pointer cursor, during the resize. There is no\nguarantee that the device focus will return when the resize is\ncompleted.\n\nThe edges parameter specifies how the surface should be resized,\nand is one of the values of the resize_edge enum. The compositor\nmay use this information to update the surface position for\nexample when dragging the top left corner. The compositor may also\nuse this information to adapt its behavior, e.g. choose an\nappropriate cursor image." ] pub unsafe fn xdg_toplevel_resize ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , edges : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 6u32 , seat , serial , edges , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the maximum size\n\nSet a maximum size for the window.\n\nThe client can specify a maximum size so that the compositor does\nnot try to configure the window beyond this size.\n\nThe width and height arguments are in window geometry coordinates.\nSee xdg_surface.set_window_geometry.\n\nValues set in this way are double-buffered. They will get applied\non the next commit.\n\nThe compositor can use this information to allow or disallow\ndifferent states like maximize or fullscreen and draw accurate\nanimations.\n\nSimilarly, a tiling window manager may use this information to\nplace and resize client windows in a more effective way.\n\nThe client should not rely on the compositor to obey the maximum\nsize. The compositor may decide to ignore the values set by the\nclient and request a larger size.\n\nIf never set, or a value of zero in the request, means that the\nclient has no expected maximum size in the given dimension.\nAs a result, a client wishing to reset the maximum size\nto an unspecified state can use zero for width and height in the\nrequest.\n\nRequesting a maximum size to be smaller than the minimum size of\na surface is illegal and will result in a protocol error.\n\nThe width and height must be greater than or equal to zero. Using\nstrictly negative values for width and height will result in a\nprotocol error." ] pub unsafe fn xdg_toplevel_set_max_size ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 7u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the minimum size\n\nSet a minimum size for the window.\n\nThe client can specify a minimum size so that the compositor does\nnot try to configure the window below this size.\n\nThe width and height arguments are in window geometry coordinates.\nSee xdg_surface.set_window_geometry.\n\nValues set in this way are double-buffered. They will get applied\non the next commit.\n\nThe compositor can use this information to allow or disallow\ndifferent states like maximize or fullscreen and draw accurate\nanimations.\n\nSimilarly, a tiling window manager may use this information to\nplace and resize client windows in a more effective way.\n\nThe client should not rely on the compositor to obey the minimum\nsize. The compositor may decide to ignore the values set by the\nclient and request a smaller size.\n\nIf never set, or a value of zero in the request, means that the\nclient has no expected minimum size in the given dimension.\nAs a result, a client wishing to reset the minimum size\nto an unspecified state can use zero for width and height in the\nrequest.\n\nRequesting a minimum size to be larger than the maximum size of\na surface is illegal and will result in a protocol error.\n\nThe width and height must be greater than or equal to zero. Using\nstrictly negative values for width and height will result in a\nprotocol error." ] pub unsafe fn xdg_toplevel_set_min_size ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 8u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "maximize the window\n\nMaximize the surface.\n\nAfter requesting that the surface should be maximized, the compositor\nwill respond by emitting a configure event. Whether this configure\nactually sets the window maximized is subject to compositor policies.\nThe client must then update its content, drawing in the configured\nstate. The client must also acknowledge the configure when committing\nthe new content (see ack_configure).\n\nIt is up to the compositor to decide how and where to maximize the\nsurface, for example which output and what region of the screen should\nbe used.\n\nIf the surface was already maximized, the compositor will still emit\na configure event with the \"maximized\" state.\n\nIf the surface is in a fullscreen state, this request has no direct\neffect. It may alter the state the surface is returned to when\nunmaximized unless overridden by the compositor." ] pub unsafe fn xdg_toplevel_set_maximized ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 9u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "unmaximize the window\n\nUnmaximize the surface.\n\nAfter requesting that the surface should be unmaximized, the compositor\nwill respond by emitting a configure event. Whether this actually\nun-maximizes the window is subject to compositor policies.\nIf available and applicable, the compositor will include the window\ngeometry dimensions the window had prior to being maximized in the\nconfigure event. The client must then update its content, drawing it in\nthe configured state. The client must also acknowledge the configure\nwhen committing the new content (see ack_configure).\n\nIt is up to the compositor to position the surface after it was\nunmaximized; usually the position the surface had before maximizing, if\napplicable.\n\nIf the surface was already not maximized, the compositor will still\nemit a configure event without the \"maximized\" state.\n\nIf the surface is in a fullscreen state, this request has no direct\neffect. It may alter the state the surface is returned to when\nunmaximized unless overridden by the compositor." ] pub unsafe fn xdg_toplevel_unset_maximized ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 10u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the window as fullscreen on an output\n\nMake the surface fullscreen.\n\nAfter requesting that the surface should be fullscreened, the\ncompositor will respond by emitting a configure event. Whether the\nclient is actually put into a fullscreen state is subject to compositor\npolicies. The client must also acknowledge the configure when\ncommitting the new content (see ack_configure).\n\nThe output passed by the request indicates the client's preference as\nto which display it should be set fullscreen on. If this value is NULL,\nit's up to the compositor to choose which display will be used to map\nthis surface.\n\nIf the surface doesn't cover the whole output, the compositor will\nposition the surface in the center of the output and compensate with\nwith border fill covering the rest of the output. The content of the\nborder fill is undefined, but should be assumed to be in some way that\nattempts to blend into the surrounding area (e.g. solid black).\n\nIf the fullscreened surface is not opaque, the compositor must make\nsure that other screen content not part of the same surface tree (made\nup of subsurfaces, popups or similarly coupled surfaces) are not\nvisible below the fullscreened surface." ] pub unsafe fn xdg_toplevel_set_fullscreen ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 11u32 , output , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "unset the window as fullscreen\n\nMake the surface no longer fullscreen.\n\nAfter requesting that the surface should be unfullscreened, the\ncompositor will respond by emitting a configure event.\nWhether this actually removes the fullscreen state of the client is\nsubject to compositor policies.\n\nMaking a surface unfullscreen sets states for the surface based on the following:\n* the state(s) it may have had before becoming fullscreen\n* any state(s) decided by the compositor\n* any state(s) requested by the client while the surface was fullscreen\n\nThe compositor may include the previous window geometry dimensions in\nthe configure event, if applicable.\n\nThe client must also acknowledge the configure when committing the new\ncontent (see ack_configure)." ] pub unsafe fn xdg_toplevel_unset_fullscreen ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 12u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the window as minimized\n\nRequest that the compositor minimize your surface. There is no\nway to know if the surface is currently minimized, nor is there\nany way to unset minimization on this surface.\n\nIf you are looking to throttle redrawing when minimized, please\ninstead use the wl_surface.frame event for this, as this will\nalso work with live previews on windows in Alt-Tab, Expose or\nsimilar compositor features." ] pub unsafe fn xdg_toplevel_set_minimized ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 13u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "short-lived, popup surfaces for menus\n\nA popup surface is a short-lived, temporary surface. It can be used to\nimplement for example menus, popovers, tooltips and other similar user\ninterface concepts.\n\nA popup can be made to take an explicit grab. See xdg_popup.grab for\ndetails.\n\nWhen the popup is dismissed, a popup_done event will be sent out, and at\nthe same time the surface will be unmapped. See the xdg_popup.popup_done\nevent for details.\n\nExplicitly destroying the xdg_popup object will also dismiss the popup and\nunmap the surface. Clients that want to dismiss the popup when another\nsurface of their own is clicked should dismiss the popup using the destroy\nrequest.\n\nA newly created xdg_popup will be stacked on top of all previously created\nxdg_popup surfaces associated with the same xdg_toplevel.\n\nThe parent of an xdg_popup must be mapped (see the xdg_surface\ndescription) before the xdg_popup itself.\n\nThe client must call wl_surface.commit on the corresponding wl_surface\nfor the xdg_popup state to take effect." ] pub mod xdg_popup { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_popup { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "tried to grab after being mapped" ] invalid_grab = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_grab ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_popup_requests_grab_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut xdg_popup_requests_reposition_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: xdg_positioner :: xdg_positioner_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_popup_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"grab\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & xdg_popup_requests_grab_types as * const _ } , } , wl_message { name : b"reposition\0" as * const u8 as * const c_char , signature : b"3ou\0" as * const u8 as * const c_char , types : unsafe { & xdg_popup_requests_reposition_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_popup_events : [ wl_message ; 3 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"popup_done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"repositioned\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_popup_interface : wl_interface = wl_interface { name : b"xdg_popup\0" as * const u8 as * const c_char , version : 3 , request_count : 3 , requests : unsafe { & xdg_popup_requests as * const _ } , event_count : 3 , events : unsafe { & xdg_popup_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_popup_listener { # [ doc = "configure the popup surface\n\nThis event asks the popup surface to configure itself given the\nconfiguration. The configured state should not be applied immediately.\nSee xdg_surface.configure for details.\n\nThe x and y arguments represent the position the popup was placed at\ngiven the xdg_positioner rule, relative to the upper left corner of the\nwindow geometry of the parent surface.\n\nFor version 2 or older, the configure event for an xdg_popup is only\never sent once for the initial configuration. Starting with version 3,\nit may be sent again if the popup is setup with an xdg_positioner with\nset_reactive requested, or in response to xdg_popup.reposition requests." ] fn configure ( & mut self , object : * mut xdg_popup , x : i32 , y : i32 , width : i32 , height : i32 ) { } # [ doc = "popup interaction is done\n\nThe popup_done event is sent out when a popup is dismissed by the\ncompositor. The client should destroy the xdg_popup object at this\npoint." ] fn popup_done ( & mut self , object : * mut xdg_popup , ) { } # [ doc = "signal the completion of a repositioned request\n\nThe repositioned event is sent as part of a popup configuration\nsequence, together with xdg_popup.configure and lastly\nxdg_surface.configure to notify the completion of a reposition request.\n\nThe repositioned event is to notify about the completion of a\nxdg_popup.reposition request. The token argument is the token passed\nin the xdg_popup.reposition request.\n\nImmediately after this event is emitted, xdg_popup.configure and\nxdg_surface.configure will be sent with the updated size and position,\nas well as a new configure serial.\n\nThe client should optionally update the content of the popup, but must\nacknowledge the new popup configuration for the new position to take\neffect. See xdg_surface.ack_configure for details.\n\nOnly available since version 3 of the interface." ] fn repositioned ( & mut self , object : * mut xdg_popup , token : u32 ) { } } pub unsafe fn xdg_popup_set_user_data ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_popup as _ , user_data ) ; } pub unsafe fn xdg_popup_get_user_data ( xdg_popup : * mut super :: xdg_popup :: xdg_popup ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_popup as _ ) ; } pub unsafe fn xdg_popup_get_version ( xdg_popup : * mut super :: xdg_popup :: xdg_popup ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_popup as _ ) ; } pub unsafe fn xdg_popup_add_listener ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_popup as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_popup_add_rust_listener ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , listener : & dyn xdg_popup_listener ) -> bool { let to = ( listener as * const dyn xdg_popup_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_popup_add_listener ( xdg_popup as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "remove xdg_popup interface\n\nThis destroys the popup. Explicitly destroying the xdg_popup\nobject will also dismiss the popup, and unmap the surface.\n\nIf this xdg_popup is not the \"topmost\" popup, a protocol error\nwill be sent." ] pub unsafe fn xdg_popup_destroy ( xdg_popup : * mut super :: xdg_popup :: xdg_popup ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_popup as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_popup as _ ) ; } # [ doc = "make the popup take an explicit grab\n\nThis request makes the created popup take an explicit grab. An explicit\ngrab will be dismissed when the user dismisses the popup, or when the\nclient destroys the xdg_popup. This can be done by the user clicking\noutside the surface, using the keyboard, or even locking the screen\nthrough closing the lid or a timeout.\n\nIf the compositor denies the grab, the popup will be immediately\ndismissed.\n\nThis request must be used in response to some sort of user action like a\nbutton press, key press, or touch down event. The serial number of the\nevent should be passed as 'serial'.\n\nThe parent of a grabbing popup must either be an xdg_toplevel surface or\nanother xdg_popup with an explicit grab. If the parent is another\nxdg_popup it means that the popups are nested, with this popup now being\nthe topmost popup.\n\nNested popups must be destroyed in the reverse order they were created\nin, e.g. the only popup you are allowed to destroy at all times is the\ntopmost one.\n\nWhen compositors choose to dismiss a popup, they may dismiss every\nnested grabbing popup as well. When a compositor dismisses popups, it\nwill follow the same dismissing order as required from the client.\n\nThe parent of a grabbing popup must either be another xdg_popup with an\nactive explicit grab, or an xdg_popup or xdg_toplevel, if there are no\nexplicit grabs already taken.\n\nIf the topmost grabbing popup is destroyed, the grab will be returned to\nthe parent of the popup, if that parent previously had an explicit grab.\n\nIf the parent is a grabbing popup which has already been dismissed, this\npopup will be immediately dismissed. If the parent is a popup that did\nnot take an explicit grab, an error will be raised.\n\nDuring a popup grab, the client owning the grab will receive pointer\nand touch events for all their surfaces as normal (similar to an\n\"owner-events\" grab in X11 parlance), while the top most grabbing popup\nwill always have keyboard focus." ] pub unsafe fn xdg_popup_grab ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , seat : * mut super :: wl_seat :: wl_seat , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_popup as _ , 1u32 , seat , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "recalculate the popup's location\n\nReposition an already-mapped popup. The popup will be placed given the\ndetails in the passed xdg_positioner object, and a\nxdg_popup.repositioned followed by xdg_popup.configure and\nxdg_surface.configure will be emitted in response. Any parameters set\nby the previous positioner will be discarded.\n\nThe passed token will be sent in the corresponding\nxdg_popup.repositioned event. The new popup position will not take\neffect until the corresponding configure event is acknowledged by the\nclient. See xdg_popup.repositioned for details. The token itself is\nopaque, and has no other special meaning.\n\nIf multiple reposition requests are sent, the compositor may skip all\nbut the last one.\n\nIf the popup is repositioned in response to a configure event for its\nparent, the client should send an xdg_positioner.set_parent_configure\nand possibly an xdg_positioner.set_parent_size request to allow the\ncompositor to properly constrain the popup.\n\nIf the popup is repositioned together with a parent that is being\nresized, but not in response to a configure event, the client should\nsend an xdg_positioner.set_parent_size request." ] pub unsafe fn xdg_popup_reposition ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , positioner : * mut super :: xdg_positioner :: xdg_positioner , token : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_popup as _ , 2u32 , positioner , token , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod xdg_activation_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "interface for activating surfaces\n\nA global interface used for informing the compositor about applications\nbeing activated or started, or for applications to request to be\nactivated." ] pub mod xdg_activation_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_activation_v1 { } static mut xdg_activation_v1_requests_get_activation_token_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: xdg_activation_token_v1 :: xdg_activation_token_v1_interface as * const wl_interface } , ] ; static mut xdg_activation_v1_requests_activate_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_activation_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_activation_token\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & xdg_activation_v1_requests_get_activation_token_types as * const _ } , } , wl_message { name : b"activate\0" as * const u8 as * const c_char , signature : b"so\0" as * const u8 as * const c_char , types : unsafe { & xdg_activation_v1_requests_activate_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_activation_v1_interface : wl_interface = wl_interface { name : b"xdg_activation_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & xdg_activation_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_activation_v1_listener { } pub unsafe fn xdg_activation_v1_set_user_data ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_activation_v1 as _ , user_data ) ; } pub unsafe fn xdg_activation_v1_get_user_data ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_activation_v1 as _ ) ; } pub unsafe fn xdg_activation_v1_get_version ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_activation_v1 as _ ) ; } pub unsafe fn xdg_activation_v1_add_listener ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_activation_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_activation_v1_add_rust_listener ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 , listener : & dyn xdg_activation_v1_listener ) -> bool { let to = ( listener as * const dyn xdg_activation_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_activation_v1_add_listener ( xdg_activation_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_activation object\n\nNotify the compositor that the xdg_activation object will no longer be\nused.\n\nThe child objects created via this interface are unaffected and should\nbe destroyed separately." ] pub unsafe fn xdg_activation_v1_destroy ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_activation_v1 as _ ) ; } # [ doc = "requests a token\n\nCreates an xdg_activation_token_v1 object that will provide\nthe initiating client with a unique token for this activation. This\ntoken should be offered to the clients to be activated." ] pub unsafe fn xdg_activation_v1_get_activation_token ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 ) -> * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_activation_v1 as _ , 1u32 , & super :: xdg_activation_token_v1 :: xdg_activation_token_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "notify new interaction being available\n\nRequests surface activation. It's up to the compositor to display\nthis information as desired, for example by placing the surface above\nthe rest.\n\nThe compositor may know who requested this by checking the activation\ntoken and might decide not to follow through with the activation if it's\nconsidered unwanted.\n\nCompositors can ignore unknown activation tokens when an invalid\ntoken is passed." ] pub unsafe fn xdg_activation_v1_activate ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 , token : * const c_char , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_v1 as _ , 2u32 , token , surface , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "an exported activation handle\n\nAn object for setting up a token and receiving a token handle that can\nbe passed as an activation token to another client.\n\nThe object is created using the xdg_activation_v1.get_activation_token\nrequest. This object should then be populated with the app_id, surface\nand serial information and committed. The compositor shall then issue a\ndone event with the token. In case the request's parameters are invalid,\nthe compositor will provide an invalid token." ] pub mod xdg_activation_token_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_activation_token_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "The token has already been used previously" ] already_used = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: already_used ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_activation_token_v1_requests_set_serial_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; static mut xdg_activation_token_v1_requests_set_surface_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_activation_token_v1_requests : [ wl_message ; 5 ] = [ wl_message { name : b"set_serial\0" as * const u8 as * const c_char , signature : b"uo\0" as * const u8 as * const c_char , types : unsafe { & xdg_activation_token_v1_requests_set_serial_types as * const _ } , } , wl_message { name : b"set_app_id\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_surface\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & xdg_activation_token_v1_requests_set_surface_types as * const _ } , } , wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_activation_token_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_activation_token_v1_interface : wl_interface = wl_interface { name : b"xdg_activation_token_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 5 , requests : unsafe { & xdg_activation_token_v1_requests as * const _ } , event_count : 1 , events : unsafe { & xdg_activation_token_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_activation_token_v1_listener { # [ doc = "the exported activation token\n\nThe 'done' event contains the unique token of this activation request\nand notifies that the provider is done." ] fn done ( & mut self , object : * mut xdg_activation_token_v1 , token : * mut c_char ) { } } pub unsafe fn xdg_activation_token_v1_set_user_data ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_activation_token_v1 as _ , user_data ) ; } pub unsafe fn xdg_activation_token_v1_get_user_data ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_activation_token_v1 as _ ) ; } pub unsafe fn xdg_activation_token_v1_get_version ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_activation_token_v1 as _ ) ; } pub unsafe fn xdg_activation_token_v1_add_listener ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_activation_token_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_activation_token_v1_add_rust_listener ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 , listener : & dyn xdg_activation_token_v1_listener ) -> bool { let to = ( listener as * const dyn xdg_activation_token_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_activation_token_v1_add_listener ( xdg_activation_token_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "specifies the seat and serial of the activating event\n\nProvides information about the seat and serial event that requested the\ntoken.\n\nThe serial can come from an input or focus event. For instance, if a\nclick triggers the launch of a third-party client, the launcher client\nshould send a set_serial request with the serial and seat from the\nwl_pointer.button event.\n\nSome compositors might refuse to activate toplevels when the token\ndoesn't have a valid and recent enough event serial.\n\nMust be sent before commit. This information is optional." ] pub unsafe fn xdg_activation_token_v1_set_serial ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 , serial : u32 , seat : * mut super :: wl_seat :: wl_seat ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_token_v1 as _ , 0u32 , serial , seat , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "specifies the application being activated\n\nThe requesting client can specify an app_id to associate the token\nbeing created with it.\n\nMust be sent before commit. This information is optional." ] pub unsafe fn xdg_activation_token_v1_set_app_id ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 , app_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_token_v1 as _ , 1u32 , app_id , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "specifies the surface requesting activation\n\nThis request sets the surface requesting the activation. Note, this is\ndifferent from the surface that will be activated.\n\nSome compositors might refuse to activate toplevels when the token\ndoesn't have a requesting surface.\n\nMust be sent before commit. This information is optional." ] pub unsafe fn xdg_activation_token_v1_set_surface ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_token_v1 as _ , 2u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "issues the token request\n\nRequests an activation token based on the different parameters that\nhave been offered through set_serial, set_surface and set_app_id." ] pub unsafe fn xdg_activation_token_v1_commit ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_token_v1 as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the xdg_activation_token_v1 object\n\nNotify the compositor that the xdg_activation_token_v1 object will no\nlonger be used." ] pub unsafe fn xdg_activation_token_v1_destroy ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_token_v1 as _ , 4u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_activation_token_v1 as _ ) ; } } } pub mod text { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "text input\n\nAn object used for text input. Adds support for text input and input\nmethods to applications. A text-input object is created from a\nwl_text_input_manager and corresponds typically to a text entry in an\napplication.\nRequests are used to activate/deactivate the text-input object and set\nstate information like surrounding and selected text or the content type.\nThe information about entered text is sent to the text-input object via\nthe pre-edit and commit events. Using this interface removes the need\nfor applications to directly process hardware key events and compose text\nout of them.\n\nText is generally UTF-8 encoded, indices and lengths are in bytes.\n\nSerials are used to synchronize the state between the text input and\nan input method. New serials are sent by the text input in the\ncommit_state request and are used by the input method to indicate\nthe known text input state in events like preedit_string, commit_string,\nand keysym. The text input can then ignore events from the input method\nwhich are based on an outdated state (for example after a reset)." ] pub mod wl_text_input { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_text_input { } # [ doc = "content hint\n\nContent hint is a bitmask to allow to modify the behavior of the text\ninput." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum content_hint { # [ doc = "no special behaviour" ] none = 0 , # [ doc = "auto completion, correction and capitalization" ] default = 7 , # [ doc = "hidden and sensitive text" ] password = 192 , # [ doc = "suggest word completions" ] auto_completion = 1 , # [ doc = "suggest word corrections" ] auto_correction = 2 , # [ doc = "switch to uppercase letters at the start of a sentence" ] auto_capitalization = 4 , # [ doc = "prefer lowercase letters" ] lowercase = 8 , # [ doc = "prefer uppercase letters" ] uppercase = 16 , # [ doc = "prefer casing for titles and headings (can be language dependent)" ] titlecase = 32 , # [ doc = "characters should be hidden" ] hidden_text = 64 , # [ doc = "typed text should not be stored" ] sensitive_data = 128 , # [ doc = "just latin characters should be entered" ] latin = 256 , # [ doc = "the text input is multiline" ] multiline = 512 , # [ doc ( hidden ) ] __nonexhaustive , } impl content_hint { pub fn from_raw ( n : u32 ) -> Option < content_hint > { match n { 0 => Some ( content_hint :: none ) , 7 => Some ( content_hint :: default ) , 192 => Some ( content_hint :: password ) , 1 => Some ( content_hint :: auto_completion ) , 2 => Some ( content_hint :: auto_correction ) , 4 => Some ( content_hint :: auto_capitalization ) , 8 => Some ( content_hint :: lowercase ) , 16 => Some ( content_hint :: uppercase ) , 32 => Some ( content_hint :: titlecase ) , 64 => Some ( content_hint :: hidden_text ) , 128 => Some ( content_hint :: sensitive_data ) , 256 => Some ( content_hint :: latin ) , 512 => Some ( content_hint :: multiline ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "content purpose\n\nThe content purpose allows to specify the primary purpose of a text\ninput.\n\nThis allows an input method to show special purpose input panels with\nextra characters or to disallow some characters." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum content_purpose { # [ doc = "default input, allowing all characters" ] normal = 0 , # [ doc = "allow only alphabetic characters" ] alpha = 1 , # [ doc = "allow only digits" ] digits = 2 , # [ doc = "input a number (including decimal separator and sign)" ] number = 3 , # [ doc = "input a phone number" ] phone = 4 , # [ doc = "input an URL" ] url = 5 , # [ doc = "input an email address" ] email = 6 , # [ doc = "input a name of a person" ] name = 7 , # [ doc = "input a password (combine with password or sensitive_data hint)" ] password = 8 , # [ doc = "input a date" ] date = 9 , # [ doc = "input a time" ] time = 10 , # [ doc = "input a date and time" ] datetime = 11 , # [ doc = "input for a terminal" ] terminal = 12 , # [ doc ( hidden ) ] __nonexhaustive , } impl content_purpose { pub fn from_raw ( n : u32 ) -> Option < content_purpose > { match n { 0 => Some ( content_purpose :: normal ) , 1 => Some ( content_purpose :: alpha ) , 2 => Some ( content_purpose :: digits ) , 3 => Some ( content_purpose :: number ) , 4 => Some ( content_purpose :: phone ) , 5 => Some ( content_purpose :: url ) , 6 => Some ( content_purpose :: email ) , 7 => Some ( content_purpose :: name ) , 8 => Some ( content_purpose :: password ) , 9 => Some ( content_purpose :: date ) , 10 => Some ( content_purpose :: time ) , 11 => Some ( content_purpose :: datetime ) , 12 => Some ( content_purpose :: terminal ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum preedit_style { # [ doc = "default style for composing text" ] default = 0 , # [ doc = "style should be the same as in non-composing text" ] none = 1 , active = 2 , inactive = 3 , highlight = 4 , underline = 5 , selection = 6 , incorrect = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl preedit_style { pub fn from_raw ( n : u32 ) -> Option < preedit_style > { match n { 0 => Some ( preedit_style :: default ) , 1 => Some ( preedit_style :: none ) , 2 => Some ( preedit_style :: active ) , 3 => Some ( preedit_style :: inactive ) , 4 => Some ( preedit_style :: highlight ) , 5 => Some ( preedit_style :: underline ) , 6 => Some ( preedit_style :: selection ) , 7 => Some ( preedit_style :: incorrect ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum text_direction { # [ doc = "automatic text direction based on text and language" ] auto = 0 , # [ doc = "left-to-right" ] ltr = 1 , # [ doc = "right-to-left" ] rtl = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl text_direction { pub fn from_raw ( n : u32 ) -> Option < text_direction > { match n { 0 => Some ( text_direction :: auto ) , 1 => Some ( text_direction :: ltr ) , 2 => Some ( text_direction :: rtl ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_text_input_requests_activate_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut wl_text_input_requests_deactivate_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_text_input_requests : [ wl_message ; 11 ] = [ wl_message { name : b"activate\0" as * const u8 as * const c_char , signature : b"oo\0" as * const u8 as * const c_char , types : unsafe { & wl_text_input_requests_activate_types as * const _ } , } , wl_message { name : b"deactivate\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wl_text_input_requests_deactivate_types as * const _ } , } , wl_message { name : b"show_input_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hide_input_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"reset\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_surrounding_text\0" as * const u8 as * const c_char , signature : b"suu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_content_type\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_cursor_rectangle\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_preferred_language\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_state\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"invoke_action\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wl_text_input_events_enter_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_text_input_events : [ wl_message ; 13 ] = [ wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wl_text_input_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifiers_map\0" as * const u8 as * const c_char , signature : b"a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"input_panel_state\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_string\0" as * const u8 as * const c_char , signature : b"uss\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_styling\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_cursor\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_string\0" as * const u8 as * const c_char , signature : b"us\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cursor_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"delete_surrounding_text\0" as * const u8 as * const c_char , signature : b"iu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"keysym\0" as * const u8 as * const c_char , signature : b"uuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"language\0" as * const u8 as * const c_char , signature : b"us\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"text_direction\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_text_input_interface : wl_interface = wl_interface { name : b"wl_text_input\0" as * const u8 as * const c_char , version : 1 , request_count : 11 , requests : unsafe { & wl_text_input_requests as * const _ } , event_count : 13 , events : unsafe { & wl_text_input_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_text_input_listener { # [ doc = "enter event\n\nNotify the text-input object when it received focus. Typically in\nresponse to an activate request." ] fn enter ( & mut self , object : * mut wl_text_input , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "leave event\n\nNotify the text-input object when it lost focus. Either in response\nto a deactivate request or when the assigned surface lost focus or was\ndestroyed." ] fn leave ( & mut self , object : * mut wl_text_input , ) { } # [ doc = "modifiers map\n\nTransfer an array of 0-terminated modifiers names. The position in\nthe array is the index of the modifier as used in the modifiers\nbitmask in the keysym event." ] fn modifiers_map ( & mut self , object : * mut wl_text_input , map : * mut wl_array ) { } # [ doc = "state of the input panel\n\nNotify when the visibility state of the input panel changed." ] fn input_panel_state ( & mut self , object : * mut wl_text_input , state : u32 ) { } # [ doc = "pre-edit\n\nNotify when a new composing text (pre-edit) should be set around the\ncurrent cursor position. Any previously set composing text should\nbe removed.\n\nThe commit text can be used to replace the preedit text on reset\n(for example on unfocus).\n\nThe text input should also handle all preedit_style and preedit_cursor\nevents occurring directly before preedit_string." ] fn preedit_string ( & mut self , object : * mut wl_text_input , serial : u32 , text : * mut c_char , commit : * mut c_char ) { } # [ doc = "pre-edit styling\n\nSets styling information on composing text. The style is applied for\nlength bytes from index relative to the beginning of the composing\ntext (as byte offset). Multiple styles can\nbe applied to a composing text by sending multiple preedit_styling\nevents.\n\nThis event is handled as part of a following preedit_string event." ] fn preedit_styling ( & mut self , object : * mut wl_text_input , index : u32 , length : u32 , style : u32 ) { } # [ doc = "pre-edit cursor\n\nSets the cursor position inside the composing text (as byte\noffset) relative to the start of the composing text. When index is a\nnegative number no cursor is shown.\n\nThis event is handled as part of a following preedit_string event." ] fn preedit_cursor ( & mut self , object : * mut wl_text_input , index : i32 ) { } # [ doc = "commit\n\nNotify when text should be inserted into the editor widget. The text to\ncommit could be either just a single character after a key press or the\nresult of some composing (pre-edit). It could be also an empty text\nwhen some text should be removed (see delete_surrounding_text) or when\nthe input cursor should be moved (see cursor_position).\n\nAny previously set composing text should be removed." ] fn commit_string ( & mut self , object : * mut wl_text_input , serial : u32 , text : * mut c_char ) { } # [ doc = "set cursor to new position\n\nNotify when the cursor or anchor position should be modified.\n\nThis event should be handled as part of a following commit_string\nevent." ] fn cursor_position ( & mut self , object : * mut wl_text_input , index : i32 , anchor : i32 ) { } # [ doc = "delete surrounding text\n\nNotify when the text around the current cursor position should be\ndeleted.\n\nIndex is relative to the current cursor (in bytes).\nLength is the length of deleted text (in bytes).\n\nThis event should be handled as part of a following commit_string\nevent." ] fn delete_surrounding_text ( & mut self , object : * mut wl_text_input , index : i32 , length : u32 ) { } # [ doc = "keysym\n\nNotify when a key event was sent. Key events should not be used\nfor normal text input operations, which should be done with\ncommit_string, delete_surrounding_text, etc. The key event follows\nthe wl_keyboard key event convention. Sym is a XKB keysym, state a\nwl_keyboard key_state. Modifiers are a mask for effective modifiers\n(where the modifier indices are set by the modifiers_map event)" ] fn keysym ( & mut self , object : * mut wl_text_input , serial : u32 , time : u32 , sym : u32 , state : u32 , modifiers : u32 ) { } # [ doc = "language\n\nSets the language of the input text. The \"language\" argument is a RFC-3066\nformat language tag." ] fn language ( & mut self , object : * mut wl_text_input , serial : u32 , language : * mut c_char ) { } # [ doc = "text direction\n\nSets the text direction of input text.\n\nIt is mainly needed for showing input cursor on correct side of the\neditor when there is no input yet done and making sure neutral\ndirection text is laid out properly." ] fn text_direction ( & mut self , object : * mut wl_text_input , serial : u32 , direction : u32 ) { } } pub unsafe fn wl_text_input_set_user_data ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_text_input as _ , user_data ) ; } pub unsafe fn wl_text_input_get_user_data ( wl_text_input : * mut super :: wl_text_input :: wl_text_input ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_text_input as _ ) ; } pub unsafe fn wl_text_input_get_version ( wl_text_input : * mut super :: wl_text_input :: wl_text_input ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_text_input as _ ) ; } pub unsafe fn wl_text_input_add_listener ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_text_input as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_text_input_add_rust_listener ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , listener : & dyn wl_text_input_listener ) -> bool { let to = ( listener as * const dyn wl_text_input_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_text_input_add_listener ( wl_text_input as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_text_input_destroy ( wl_text_input : * mut super :: wl_text_input :: wl_text_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_text_input as _ ) ; } # [ doc = "request activation\n\nRequests the text-input object to be activated (typically when the\ntext entry gets focus).\nThe seat argument is a wl_seat which maintains the focus for this\nactivation. The surface argument is a wl_surface assigned to the\ntext-input object and tracked for focus lost. The enter event\nis emitted on successful activation." ] pub unsafe fn wl_text_input_activate ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , seat : * mut super :: wl_seat :: wl_seat , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 0u32 , seat , surface , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "request deactivation\n\nRequests the text-input object to be deactivated (typically when the\ntext entry lost focus). The seat argument is a wl_seat which was used\nfor activation." ] pub unsafe fn wl_text_input_deactivate ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , seat : * mut super :: wl_seat :: wl_seat ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 1u32 , seat , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "show input panels\n\nRequests input panels (virtual keyboard) to show." ] pub unsafe fn wl_text_input_show_input_panel ( wl_text_input : * mut super :: wl_text_input :: wl_text_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "hide input panels\n\nRequests input panels (virtual keyboard) to hide." ] pub unsafe fn wl_text_input_hide_input_panel ( wl_text_input : * mut super :: wl_text_input :: wl_text_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "reset\n\nShould be called by an editor widget when the input state should be\nreset, for example after the text was changed outside of the normal\ninput method flow." ] pub unsafe fn wl_text_input_reset ( wl_text_input : * mut super :: wl_text_input :: wl_text_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 4u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets the surrounding text\n\nSets the plain surrounding text around the input position. Text is\nUTF-8 encoded. Cursor is the byte offset within the\nsurrounding text. Anchor is the byte offset of the\nselection anchor within the surrounding text. If there is no selected\ntext anchor is the same as cursor." ] pub unsafe fn wl_text_input_set_surrounding_text ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , text : * const c_char , cursor : u32 , anchor : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 5u32 , text , cursor , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set content purpose and hint\n\nSets the content purpose and content hint. While the purpose is the\nbasic purpose of an input field, the hint flags allow to modify some\nof the behavior.\n\nWhen no content type is explicitly set, a normal content purpose with\ndefault hints (auto completion, auto correction, auto capitalization)\nshould be assumed." ] pub unsafe fn wl_text_input_set_content_type ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , hint : u32 , purpose : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 6u32 , hint , purpose , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn wl_text_input_set_cursor_rectangle ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 7u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets preferred language\n\nSets a specific language. This allows for example a virtual keyboard to\nshow a language specific layout. The \"language\" argument is a RFC-3066\nformat language tag.\n\nIt could be used for example in a word processor to indicate language of\ncurrently edited document or in an instant message application which tracks\nlanguages of contacts." ] pub unsafe fn wl_text_input_set_preferred_language ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , language : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 8u32 , language , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn wl_text_input_commit_state ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 9u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn wl_text_input_invoke_action ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , button : u32 , index : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 10u32 , button , index , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "text input manager\n\nA factory for text-input objects. This object is a global singleton." ] pub mod wl_text_input_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_text_input_manager { } static mut wl_text_input_manager_requests_create_text_input_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_text_input :: wl_text_input_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_text_input_manager_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create_text_input\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_text_input_manager_requests_create_text_input_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_text_input_manager_interface : wl_interface = wl_interface { name : b"wl_text_input_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wl_text_input_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_text_input_manager_listener { } pub unsafe fn wl_text_input_manager_set_user_data ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_text_input_manager as _ , user_data ) ; } pub unsafe fn wl_text_input_manager_get_user_data ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_text_input_manager as _ ) ; } pub unsafe fn wl_text_input_manager_get_version ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_text_input_manager as _ ) ; } pub unsafe fn wl_text_input_manager_add_listener ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_text_input_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_text_input_manager_add_rust_listener ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager , listener : & dyn wl_text_input_manager_listener ) -> bool { let to = ( listener as * const dyn wl_text_input_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_text_input_manager_add_listener ( wl_text_input_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_text_input_manager_destroy ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_text_input_manager as _ ) ; } # [ doc = "create text input\n\nCreates a new text-input object." ] pub unsafe fn wl_text_input_manager_create_text_input ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager ) -> * mut super :: wl_text_input :: wl_text_input { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_text_input_manager as _ , 0u32 , & super :: wl_text_input :: wl_text_input_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } } pub mod appmenu { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "appmenu dbus address interface\n\nThis interface allows a client to link a window (or wl_surface) to an com.canonical.dbusmenu\ninterface registered on DBus." ] pub mod org_kde_kwin_appmenu_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_appmenu_manager { } static mut org_kde_kwin_appmenu_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_appmenu_manager_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_appmenu_manager_requests_create_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_appmenu_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_appmenu_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_kwin_appmenu_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_appmenu_manager_listener { } pub unsafe fn org_kde_kwin_appmenu_manager_set_user_data ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_appmenu_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_appmenu_manager_get_user_data ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_appmenu_manager as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_manager_get_version ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_appmenu_manager as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_manager_add_listener ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_appmenu_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_manager_add_rust_listener ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager , listener : & dyn org_kde_kwin_appmenu_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_appmenu_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_appmenu_manager_add_listener ( org_kde_kwin_appmenu_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_appmenu_manager_destroy ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_appmenu_manager as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_manager_create ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_appmenu_manager as _ , 0u32 , & super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "appmenu dbus address interface\n\nThe DBus service name and object path where the appmenu interface is present\nThe object should be registered on the session bus before sending this request.\nIf not applicable, clients should remove this object." ] pub mod org_kde_kwin_appmenu { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_appmenu { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_appmenu_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_address\0" as * const u8 as * const c_char , signature : b"ss\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_appmenu_interface : wl_interface = wl_interface { name : b"org_kde_kwin_appmenu\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_appmenu_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_appmenu_listener { } pub unsafe fn org_kde_kwin_appmenu_set_user_data ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_appmenu as _ , user_data ) ; } pub unsafe fn org_kde_kwin_appmenu_get_user_data ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_appmenu as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_get_version ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_appmenu as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_add_listener ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_appmenu as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_add_rust_listener ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu , listener : & dyn org_kde_kwin_appmenu_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_appmenu_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_appmenu_add_listener ( org_kde_kwin_appmenu as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_appmenu_destroy ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_appmenu as _ ) ; } # [ doc = "initialise or update the location of the AppMenu interface\n\nSet or update the service name and object path.\nStrings should be formatted in Latin-1 matching the relevant DBus specifications." ] pub unsafe fn org_kde_kwin_appmenu_set_address ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu , service_name : * const c_char , object_path : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_appmenu as _ , 0u32 , service_name , object_path , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the appmenu object" ] pub unsafe fn org_kde_kwin_appmenu_release ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_appmenu as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_appmenu as _ ) ; } } } pub mod plasma_shell { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "create shell windows and helpers\n\nThis interface is used by KF5 powered Wayland shells to communicate with\nthe compositor and can only be bound one time." ] pub mod org_kde_plasma_shell { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_plasma_shell { } static mut org_kde_plasma_shell_requests_get_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_plasma_surface :: org_kde_plasma_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_shell_requests : [ wl_message ; 1 ] = [ wl_message { name : b"get_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_plasma_shell_requests_get_surface_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_plasma_shell_interface : wl_interface = wl_interface { name : b"org_kde_plasma_shell\0" as * const u8 as * const c_char , version : 6 , request_count : 1 , requests : unsafe { & org_kde_plasma_shell_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_plasma_shell_listener { } pub unsafe fn org_kde_plasma_shell_set_user_data ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_plasma_shell as _ , user_data ) ; } pub unsafe fn org_kde_plasma_shell_get_user_data ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_plasma_shell as _ ) ; } pub unsafe fn org_kde_plasma_shell_get_version ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_plasma_shell as _ ) ; } pub unsafe fn org_kde_plasma_shell_add_listener ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_plasma_shell as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_plasma_shell_add_rust_listener ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell , listener : & dyn org_kde_plasma_shell_listener ) -> bool { let to = ( listener as * const dyn org_kde_plasma_shell_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_plasma_shell_add_listener ( org_kde_plasma_shell as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_plasma_shell_destroy ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_plasma_shell as _ ) ; } # [ doc = "create a shell surface from a surface\n\nCreate a shell surface for an existing surface.\n\nOnly one shell surface can be associated with a given\nsurface." ] pub unsafe fn org_kde_plasma_shell_get_surface ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_plasma_shell as _ , 0u32 , & super :: org_kde_plasma_surface :: org_kde_plasma_surface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "metadata interface\n\nAn interface that may be implemented by a wl_surface, for\nimplementations that provide the shell user interface.\n\nIt provides requests to set surface roles, assign an output\nor set the position in output coordinates.\n\nOn the server side the object is automatically destroyed when\nthe related wl_surface is destroyed. On client side,\norg_kde_plasma_surface.destroy() must be called before\ndestroying the wl_surface object." ] pub mod org_kde_plasma_surface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_plasma_surface { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum role { normal = 0 , desktop = 1 , panel = 2 , onscreendisplay = 3 , notification = 4 , tooltip = 5 , criticalnotification = 6 , # [ doc ( hidden ) ] __nonexhaustive , } impl role { pub fn from_raw ( n : u32 ) -> Option < role > { match n { 0 => Some ( role :: normal ) , 1 => Some ( role :: desktop ) , 2 => Some ( role :: panel ) , 3 => Some ( role :: onscreendisplay ) , 4 => Some ( role :: notification ) , 5 => Some ( role :: tooltip ) , 6 => Some ( role :: criticalnotification ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "Behavior for panel surface" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum panel_behavior { # [ doc = "normal panel visibility\n\nThe panel is on top of other surfaces, windows cannot cover (full screen\nwindows excluded)." ] always_visible = 1 , # [ doc = "hide automatically\n\nThe panel is hidden automatically and restored when the mouse is over." ] auto_hide = 2 , # [ doc = "windows can cover\n\nWindows can cover the panel." ] windows_can_cover = 3 , # [ doc = "windows go below\n\nMaximized windows take the whole screen space but the panel is above\nthe windows." ] windows_go_below = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl panel_behavior { pub fn from_raw ( n : u32 ) -> Option < panel_behavior > { match n { 1 => Some ( panel_behavior :: always_visible ) , 2 => Some ( panel_behavior :: auto_hide ) , 3 => Some ( panel_behavior :: windows_can_cover ) , 4 => Some ( panel_behavior :: windows_go_below ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "Request panel_auto_hide performed on a surface which does not correspond to an auto-hide panel." ] panel_not_auto_hide = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: panel_not_auto_hide ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut org_kde_plasma_surface_requests_set_output_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_surface_requests : [ wl_message ; 10 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_output\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_plasma_surface_requests_set_output_types as * const _ } , } , wl_message { name : b"set_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_role\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_panel_behavior\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_skip_taskbar\0" as * const u8 as * const c_char , signature : b"2u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"panel_auto_hide_hide\0" as * const u8 as * const c_char , signature : b"4\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"panel_auto_hide_show\0" as * const u8 as * const c_char , signature : b"4\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_panel_takes_focus\0" as * const u8 as * const c_char , signature : b"4u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_skip_switcher\0" as * const u8 as * const c_char , signature : b"5u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_surface_events : [ wl_message ; 2 ] = [ wl_message { name : b"auto_hidden_panel_hidden\0" as * const u8 as * const c_char , signature : b"4\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"auto_hidden_panel_shown\0" as * const u8 as * const c_char , signature : b"4\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_plasma_surface_interface : wl_interface = wl_interface { name : b"org_kde_plasma_surface\0" as * const u8 as * const c_char , version : 6 , request_count : 10 , requests : unsafe { & org_kde_plasma_surface_requests as * const _ } , event_count : 2 , events : unsafe { & org_kde_plasma_surface_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_plasma_surface_listener { # [ doc = "Auto-hiding panel is hidden\n\nAn auto-hiding panel got hidden by the compositor.\n\nOnly available since version 4 of the interface." ] fn auto_hidden_panel_hidden ( & mut self , object : * mut org_kde_plasma_surface , ) { } # [ doc = "Auto-hiding panel is shown\n\nAn auto-hiding panel got shown by the compositor.\n\nOnly available since version 4 of the interface." ] fn auto_hidden_panel_shown ( & mut self , object : * mut org_kde_plasma_surface , ) { } } pub unsafe fn org_kde_plasma_surface_set_user_data ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_plasma_surface as _ , user_data ) ; } pub unsafe fn org_kde_plasma_surface_get_user_data ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_plasma_surface as _ ) ; } pub unsafe fn org_kde_plasma_surface_get_version ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_plasma_surface as _ ) ; } pub unsafe fn org_kde_plasma_surface_add_listener ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_plasma_surface as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_plasma_surface_add_rust_listener ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , listener : & dyn org_kde_plasma_surface_listener ) -> bool { let to = ( listener as * const dyn org_kde_plasma_surface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_plasma_surface_add_listener ( org_kde_plasma_surface as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "remove org_kde_plasma_surface interface\n\nThe org_kde_plasma_surface interface is removed from the\nwl_surface object that was turned into a shell surface with the\norg_kde_plasma_shell.get_surface request.\nThe shell surface role is lost and wl_surface is unmapped." ] pub unsafe fn org_kde_plasma_surface_destroy ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_plasma_surface as _ ) ; } # [ doc = "assign an output to this shell surface\n\nAssign an output to this shell surface.\nThe compositor will use this information to set the position\nwhen org_kde_plasma_surface.set_position request is\ncalled." ] pub unsafe fn org_kde_plasma_surface_set_output ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 1u32 , output , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "change the shell surface position\n\nMove the surface to new coordinates.\n\nCoordinates are global, for example 50,50 for a 1920,0+1920x1080 output\nis 1970,50 in global coordinates space.\n\nUse org_kde_plasma_surface.set_output to assign an output\nto this surface." ] pub unsafe fn org_kde_plasma_surface_set_position ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 2u32 , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "assign a role to this surface\n\nAssign a role to a shell surface.\n\nThe compositor handles surfaces depending on their role.\nSee the explanation below.\n\nThis request fails if the surface already has a role, this means\nthe surface role may be assigned only once.\n\n== Surfaces with splash role ==\n\nSplash surfaces are placed above every other surface during the\nshell startup phase.\n\nThe surfaces are placed according to the output coordinates.\nNo size is imposed to those surfaces, the shell has to resize\nthem according to output size.\n\nThese surfaces are meant to hide the desktop during the startup\nphase so that the user will always see a ready to work desktop.\n\nA shell might not create splash surfaces if the compositor reveals\nthe desktop in an alternative fashion, for example with a fade\nin effect.\n\nThat depends on how much time the desktop usually need to prepare\nthe workspace or specific design decisions.\nThis specification doesn't impose any particular design.\n\nWhen the startup phase is finished, the shell will send the\norg_kde_plasma.desktop_ready request to the compositor.\n\n== Surfaces with desktop role ==\n\nDesktop surfaces are placed below all other surfaces and are used\nto show the actual desktop view with icons, search results or\ncontrols the user will interact with. What to show depends on the\nshell implementation.\n\nThe surfaces are placed according to the output coordinates.\nNo size is imposed to those surfaces, the shell has to resize\nthem according to output size.\n\nOnly one surface per output can have the desktop role.\n\n== Surfaces with dashboard role ==\n\nDashboard surfaces are placed above desktop surfaces and are used to\nshow additional widgets and controls.\n\nThe surfaces are placed according to the output coordinates.\nNo size is imposed to those surfaces, the shell has to resize\nthem according to output size.\n\nOnly one surface per output can have the dashboard role.\n\n== Surfaces with config role ==\n\nA configuration surface is shown when the user wants to configure\npanel or desktop views.\n\nOnly one surface per output can have the config role.\n\nTODO: This should grab the input like popup menus, right?\n\n== Surfaces with overlay role ==\n\nOverlays are special surfaces that shows for a limited amount\nof time. Such surfaces are useful to display things like volume,\nbrightness and status changes.\n\nCompositors may decide to show those surfaces in a layer above\nall surfaces, even full screen ones if so is desired.\n\n== Surfaces with notification role ==\n\nNotification surfaces display informative content for a limited\namount of time. The compositor may decide to show them in a corner\ndepending on the configuration.\n\nThese surfaces are shown in a layer above all other surfaces except\nfor full screen ones.\n\n== Surfaces with lock role ==\n\nThe lock surface is shown by the compositor when the session is\nlocked, users interact with it to unlock the session.\n\nCompositors should move lock surfaces to 0,0 in output\ncoordinates space and hide all other surfaces for security sake.\nFor the same reason it is recommended that clients make the\nlock surface as big as the screen.\n\nOnly one surface per output can have the lock role." ] pub unsafe fn org_kde_plasma_surface_set_role ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , role : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 3u32 , role , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set or unset the panel\n\nSet flags bitmask as described by the flag enum.\nPass 0 to unset any flag, the surface will adjust its behavior to\nthe default." ] pub unsafe fn org_kde_plasma_surface_set_panel_behavior ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , flag : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 4u32 , flag , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the window skip the taskbar\n\nSetting this bit to the window, will make it say it prefers to not be listed in the taskbar. Taskbar implementations may or may not follow this hint." ] pub unsafe fn org_kde_plasma_surface_set_skip_taskbar ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , skip : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 5u32 , skip , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Hide the auto-hiding panel\n\nA panel surface with panel_behavior auto_hide can perform this request to hide the panel\non a screen edge without unmapping it. The compositor informs the client about the panel\nbeing hidden with the event auto_hidden_panel_hidden.\n\nThe compositor will restore the visibility state of the\nsurface when the pointer touches the screen edge the panel borders. Once the compositor restores\nthe visibility the event auto_hidden_panel_shown will be sent. This event will also be sent\nif the compositor is unable to hide the panel.\n\nThe client can also request to show the panel again with the request panel_auto_hide_show." ] pub unsafe fn org_kde_plasma_surface_panel_auto_hide_hide ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 6u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Show the auto-hiding panel\n\nA panel surface with panel_behavior auto_hide can perform this request to show the panel\nagain which got hidden with panel_auto_hide_hide." ] pub unsafe fn org_kde_plasma_surface_panel_auto_hide_show ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 7u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Whether a panel takes focus\n\nBy default various org_kde_plasma_surface roles do not take focus and cannot be\nactivated. With this request the compositor can be instructed to pass focus also to this\norg_kde_plasma_surface." ] pub unsafe fn org_kde_plasma_surface_set_panel_takes_focus ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , takes_focus : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 8u32 , takes_focus , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the window not appear in a switcher\n\nSetting this bit will indicate that the window prefers not to be listed in a switcher." ] pub unsafe fn org_kde_plasma_surface_set_skip_switcher ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , skip : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 9u32 , skip , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod slide { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod org_kde_kwin_slide_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_slide_manager { } static mut org_kde_kwin_slide_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_slide :: org_kde_kwin_slide_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut org_kde_kwin_slide_manager_requests_unset_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_slide_manager_requests : [ wl_message ; 2 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_slide_manager_requests_create_types as * const _ } , } , wl_message { name : b"unset\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_slide_manager_requests_unset_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_slide_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_slide_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_slide_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_slide_manager_listener { } pub unsafe fn org_kde_kwin_slide_manager_set_user_data ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_slide_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_slide_manager_get_user_data ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_slide_manager as _ ) ; } pub unsafe fn org_kde_kwin_slide_manager_get_version ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_slide_manager as _ ) ; } pub unsafe fn org_kde_kwin_slide_manager_add_listener ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_slide_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_slide_manager_add_rust_listener ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager , listener : & dyn org_kde_kwin_slide_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_slide_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_slide_manager_add_listener ( org_kde_kwin_slide_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_slide_manager_destroy ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_slide_manager as _ ) ; } pub unsafe fn org_kde_kwin_slide_manager_create ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_slide_manager as _ , 0u32 , & super :: org_kde_kwin_slide :: org_kde_kwin_slide_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } pub unsafe fn org_kde_kwin_slide_manager_unset ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_slide_manager as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "slide a surface from a location to another\n\nAsk the compositor to move the surface from a location to another\nwith a slide animation.\n\nThe from argument provides a clue about where the slide animation\nbegins, offset is the distance from screen edge to begin the animation." ] pub mod org_kde_kwin_slide { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_slide { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum location { left = 0 , top = 1 , right = 2 , bottom = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl location { pub fn from_raw ( n : u32 ) -> Option < location > { match n { 0 => Some ( location :: left ) , 1 => Some ( location :: top ) , 2 => Some ( location :: right ) , 3 => Some ( location :: bottom ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_slide_requests : [ wl_message ; 4 ] = [ wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_location\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_offset\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_slide_interface : wl_interface = wl_interface { name : b"org_kde_kwin_slide\0" as * const u8 as * const c_char , version : 1 , request_count : 4 , requests : unsafe { & org_kde_kwin_slide_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_slide_listener { } pub unsafe fn org_kde_kwin_slide_set_user_data ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_slide as _ , user_data ) ; } pub unsafe fn org_kde_kwin_slide_get_user_data ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_slide as _ ) ; } pub unsafe fn org_kde_kwin_slide_get_version ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_slide as _ ) ; } pub unsafe fn org_kde_kwin_slide_add_listener ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_slide as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_slide_add_rust_listener ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide , listener : & dyn org_kde_kwin_slide_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_slide_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_slide_add_listener ( org_kde_kwin_slide as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_slide_destroy ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_slide as _ ) ; } pub unsafe fn org_kde_kwin_slide_commit ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_slide as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_slide_set_location ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide , location : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_slide as _ , 1u32 , location , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_slide_set_offset ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide , offset : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_slide as _ , 2u32 , offset , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the slide object" ] pub unsafe fn org_kde_kwin_slide_release ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_slide as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_slide as _ ) ; } } } pub mod wp_primary_selection_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "X primary selection emulation\n\nThe primary selection device manager is a singleton global object that\nprovides access to the primary selection. It allows to create\nwp_primary_selection_source objects, as well as retrieving the per-seat\nwp_primary_selection_device objects." ] pub mod zwp_primary_selection_device_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_primary_selection_device_manager_v1 { } static mut zwp_primary_selection_device_manager_v1_requests_create_source_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1_interface as * const wl_interface } , ] ; static mut zwp_primary_selection_device_manager_v1_requests_get_device_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_device_manager_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"create_source\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_primary_selection_device_manager_v1_requests_create_source_types as * const _ } , } , wl_message { name : b"get_device\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_primary_selection_device_manager_v1_requests_get_device_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_primary_selection_device_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_primary_selection_device_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & zwp_primary_selection_device_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_primary_selection_device_manager_v1_listener { } pub unsafe fn zwp_primary_selection_device_manager_v1_set_user_data ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_primary_selection_device_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_primary_selection_device_manager_v1_get_user_data ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_primary_selection_device_manager_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_device_manager_v1_get_version ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_primary_selection_device_manager_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_device_manager_v1_add_listener ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_primary_selection_device_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_primary_selection_device_manager_v1_add_rust_listener ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 , listener : & dyn zwp_primary_selection_device_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_primary_selection_device_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_primary_selection_device_manager_v1_add_listener ( zwp_primary_selection_device_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "create a new primary selection source\n\nCreate a new primary selection source." ] pub unsafe fn zwp_primary_selection_device_manager_v1_create_source ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 ) -> * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_primary_selection_device_manager_v1 as _ , 0u32 , & super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "create a new primary selection device\n\nCreate a new data device for a given seat." ] pub unsafe fn zwp_primary_selection_device_manager_v1_get_device ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_primary_selection_device_manager_v1 as _ , 1u32 , & super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat ) ; return r as _ ; } # [ doc = "destroy the primary selection device manager\n\nDestroy the primary selection device manager." ] pub unsafe fn zwp_primary_selection_device_manager_v1_destroy ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_device_manager_v1 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_primary_selection_device_manager_v1 as _ ) ; } } pub mod zwp_primary_selection_device_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_primary_selection_device_v1 { } static mut zwp_primary_selection_device_v1_requests_set_selection_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_device_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_selection\0" as * const u8 as * const c_char , signature : b"?ou\0" as * const u8 as * const c_char , types : unsafe { & zwp_primary_selection_device_v1_requests_set_selection_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_primary_selection_device_v1_events_data_offer_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1_interface as * const wl_interface } , ] ; static mut zwp_primary_selection_device_v1_events_selection_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_device_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"data_offer\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_primary_selection_device_v1_events_data_offer_types as * const _ } , } , wl_message { name : b"selection\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & zwp_primary_selection_device_v1_events_selection_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_primary_selection_device_v1_interface : wl_interface = wl_interface { name : b"zwp_primary_selection_device_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_primary_selection_device_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_primary_selection_device_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_primary_selection_device_v1_listener { # [ doc = "introduce a new wp_primary_selection_offer\n\nIntroduces a new wp_primary_selection_offer object that may be used\nto receive the current primary selection. Immediately following this\nevent, the new wp_primary_selection_offer object will send\nwp_primary_selection_offer.offer events to describe the offered mime\ntypes." ] fn data_offer ( & mut self , object : * mut zwp_primary_selection_device_v1 , offer : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 ) { } # [ doc = "advertise a new primary selection\n\nThe wp_primary_selection_device.selection event is sent to notify the\nclient of a new primary selection. This event is sent after the\nwp_primary_selection.data_offer event introducing this object, and after\nthe offer has announced its mimetypes through\nwp_primary_selection_offer.offer.\n\nThe data_offer is valid until a new offer or NULL is received\nor until the client loses keyboard focus. The client must destroy the\nprevious selection data_offer, if any, upon receiving this event." ] fn selection ( & mut self , object : * mut zwp_primary_selection_device_v1 , id : Option < * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 > ) { } } pub unsafe fn zwp_primary_selection_device_v1_set_user_data ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_primary_selection_device_v1 as _ , user_data ) ; } pub unsafe fn zwp_primary_selection_device_v1_get_user_data ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_primary_selection_device_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_device_v1_get_version ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_primary_selection_device_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_device_v1_add_listener ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_primary_selection_device_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_primary_selection_device_v1_add_rust_listener ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 , listener : & dyn zwp_primary_selection_device_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_primary_selection_device_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_primary_selection_device_v1_add_listener ( zwp_primary_selection_device_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "set the primary selection\n\nReplaces the current selection. The previous owner of the primary\nselection will receive a wp_primary_selection_source.cancelled event.\n\nTo unset the selection, set the source to NULL." ] pub unsafe fn zwp_primary_selection_device_v1_set_selection ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 , source : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_device_v1 as _ , 0u32 , source , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the primary selection device\n\nDestroy the primary selection device." ] pub unsafe fn zwp_primary_selection_device_v1_destroy ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_device_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_primary_selection_device_v1 as _ ) ; } } # [ doc = "offer to transfer primary selection contents\n\nA wp_primary_selection_offer represents an offer to transfer the contents\nof the primary selection clipboard to the client. Similar to\nwl_data_offer, the offer also describes the mime types that the data can\nbe converted to and provides the mechanisms for transferring the data\ndirectly to the client." ] pub mod zwp_primary_selection_offer_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_primary_selection_offer_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_offer_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"receive\0" as * const u8 as * const c_char , signature : b"sh\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_offer_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"offer\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_primary_selection_offer_v1_interface : wl_interface = wl_interface { name : b"zwp_primary_selection_offer_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_primary_selection_offer_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zwp_primary_selection_offer_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_primary_selection_offer_v1_listener { # [ doc = "advertise offered mime type\n\nSent immediately after creating announcing the\nwp_primary_selection_offer through\nwp_primary_selection_device.data_offer. One event is sent per offered\nmime type." ] fn offer ( & mut self , object : * mut zwp_primary_selection_offer_v1 , mime_type : * mut c_char ) { } } pub unsafe fn zwp_primary_selection_offer_v1_set_user_data ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_primary_selection_offer_v1 as _ , user_data ) ; } pub unsafe fn zwp_primary_selection_offer_v1_get_user_data ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_primary_selection_offer_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_offer_v1_get_version ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_primary_selection_offer_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_offer_v1_add_listener ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_primary_selection_offer_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_primary_selection_offer_v1_add_rust_listener ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 , listener : & dyn zwp_primary_selection_offer_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_primary_selection_offer_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_primary_selection_offer_v1_add_listener ( zwp_primary_selection_offer_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "request that the data is transferred\n\nTo transfer the contents of the primary selection clipboard, the client\nissues this request and indicates the mime type that it wants to\nreceive. The transfer happens through the passed file descriptor\n(typically created with the pipe system call). The source client writes\nthe data in the mime type representation requested and then closes the\nfile descriptor.\n\nThe receiving client reads from the read end of the pipe until EOF and\ncloses its end, at which point the transfer is complete." ] pub unsafe fn zwp_primary_selection_offer_v1_receive ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 , mime_type : * const c_char , fd : :: std :: os :: unix :: io :: RawFd ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_offer_v1 as _ , 0u32 , mime_type , fd , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the primary selection offer\n\nDestroy the primary selection offer." ] pub unsafe fn zwp_primary_selection_offer_v1_destroy ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_offer_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_primary_selection_offer_v1 as _ ) ; } } # [ doc = "offer to replace the contents of the primary selection\n\nThe source side of a wp_primary_selection_offer, it provides a way to\ndescribe the offered data and respond to requests to transfer the\nrequested contents of the primary selection clipboard." ] pub mod zwp_primary_selection_source_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_primary_selection_source_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_source_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"offer\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_source_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"send\0" as * const u8 as * const c_char , signature : b"sh\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cancelled\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_primary_selection_source_v1_interface : wl_interface = wl_interface { name : b"zwp_primary_selection_source_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_primary_selection_source_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_primary_selection_source_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_primary_selection_source_v1_listener { # [ doc = "send the primary selection contents\n\nRequest for the current primary selection contents from the client.\nSend the specified mime type over the passed file descriptor, then\nclose it." ] fn send ( & mut self , object : * mut zwp_primary_selection_source_v1 , mime_type : * mut c_char , fd : :: std :: os :: unix :: io :: RawFd ) { } # [ doc = "request for primary selection contents was canceled\n\nThis primary selection source is no longer valid. The client should\nclean up and destroy this primary selection source." ] fn cancelled ( & mut self , object : * mut zwp_primary_selection_source_v1 , ) { } } pub unsafe fn zwp_primary_selection_source_v1_set_user_data ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_primary_selection_source_v1 as _ , user_data ) ; } pub unsafe fn zwp_primary_selection_source_v1_get_user_data ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_primary_selection_source_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_source_v1_get_version ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_primary_selection_source_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_source_v1_add_listener ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_primary_selection_source_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_primary_selection_source_v1_add_rust_listener ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 , listener : & dyn zwp_primary_selection_source_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_primary_selection_source_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_primary_selection_source_v1_add_listener ( zwp_primary_selection_source_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "add an offered mime type\n\nThis request adds a mime type to the set of mime types advertised to\ntargets. Can be called several times to offer multiple types." ] pub unsafe fn zwp_primary_selection_source_v1_offer ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 , mime_type : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_source_v1 as _ , 0u32 , mime_type , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the primary selection source\n\nDestroy the primary selection source." ] pub unsafe fn zwp_primary_selection_source_v1_destroy ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_source_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_primary_selection_source_v1 as _ ) ; } } } pub mod idle { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "User idle time manager\n\nThis interface allows to monitor user idle time on a given seat. The interface\nallows to register timers which trigger after no user activity was registered\non the seat for a given interval. It notifies when user activity resumes.\n\nThis is useful for applications wanting to perform actions when the user is not\ninteracting with the system, e.g. chat applications setting the user as away, power\nmanagement features to dim screen, etc.." ] pub mod org_kde_kwin_idle { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_idle { } static mut org_kde_kwin_idle_requests_get_idle_timeout_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_idle_requests : [ wl_message ; 1 ] = [ wl_message { name : b"get_idle_timeout\0" as * const u8 as * const c_char , signature : b"nou\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_idle_requests_get_idle_timeout_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_idle_interface : wl_interface = wl_interface { name : b"org_kde_kwin_idle\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_kwin_idle_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_idle_listener { } pub unsafe fn org_kde_kwin_idle_set_user_data ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_idle as _ , user_data ) ; } pub unsafe fn org_kde_kwin_idle_get_user_data ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_idle as _ ) ; } pub unsafe fn org_kde_kwin_idle_get_version ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_idle as _ ) ; } pub unsafe fn org_kde_kwin_idle_add_listener ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_idle as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_idle_add_rust_listener ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle , listener : & dyn org_kde_kwin_idle_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_idle_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_idle_add_listener ( org_kde_kwin_idle as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_idle_destroy ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_idle as _ ) ; } pub unsafe fn org_kde_kwin_idle_get_idle_timeout ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle , seat : * mut super :: wl_seat :: wl_seat , timeout : u32 ) -> * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_idle as _ , 0u32 , & super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat , timeout ) ; return r as _ ; } } pub mod org_kde_kwin_idle_timeout { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_idle_timeout { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_idle_timeout_requests : [ wl_message ; 2 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"simulate_user_activity\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_idle_timeout_events : [ wl_message ; 2 ] = [ wl_message { name : b"idle\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"resumed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_idle_timeout_interface : wl_interface = wl_interface { name : b"org_kde_kwin_idle_timeout\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_idle_timeout_requests as * const _ } , event_count : 2 , events : unsafe { & org_kde_kwin_idle_timeout_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_idle_timeout_listener { # [ doc = "Triggered when there has not been any user activity in the requested idle time interval" ] fn idle ( & mut self , object : * mut org_kde_kwin_idle_timeout , ) { } # [ doc = "Triggered on the first user activity after an idle event" ] fn resumed ( & mut self , object : * mut org_kde_kwin_idle_timeout , ) { } } pub unsafe fn org_kde_kwin_idle_timeout_set_user_data ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_idle_timeout as _ , user_data ) ; } pub unsafe fn org_kde_kwin_idle_timeout_get_user_data ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_idle_timeout as _ ) ; } pub unsafe fn org_kde_kwin_idle_timeout_get_version ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_idle_timeout as _ ) ; } pub unsafe fn org_kde_kwin_idle_timeout_add_listener ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_idle_timeout as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_idle_timeout_add_rust_listener ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout , listener : & dyn org_kde_kwin_idle_timeout_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_idle_timeout_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_idle_timeout_add_listener ( org_kde_kwin_idle_timeout as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_idle_timeout_destroy ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_idle_timeout as _ ) ; } # [ doc = "release the timeout object" ] pub unsafe fn org_kde_kwin_idle_timeout_release ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_idle_timeout as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_idle_timeout as _ ) ; } # [ doc = "Simulates user activity for this timeout, behaves just like real user activity on the seat" ] pub unsafe fn org_kde_kwin_idle_timeout_simulate_user_activity ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_idle_timeout as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod remote_access { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Protocol for managing rendered GBM buffers passing" ] pub mod org_kde_kwin_remote_access_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_remote_access_manager { } static mut org_kde_kwin_remote_access_manager_requests_get_buffer_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_remote_access_manager_requests : [ wl_message ; 2 ] = [ wl_message { name : b"get_buffer\0" as * const u8 as * const c_char , signature : b"ni\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_remote_access_manager_requests_get_buffer_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut org_kde_kwin_remote_access_manager_events_buffer_ready_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_remote_access_manager_events : [ wl_message ; 1 ] = [ wl_message { name : b"buffer_ready\0" as * const u8 as * const c_char , signature : b"io\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_remote_access_manager_events_buffer_ready_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_remote_access_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_remote_access_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_remote_access_manager_requests as * const _ } , event_count : 1 , events : unsafe { & org_kde_kwin_remote_access_manager_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_remote_access_manager_listener { # [ doc = "Signals about buffer ready to be consumed by clients" ] fn buffer_ready ( & mut self , object : * mut org_kde_kwin_remote_access_manager , id : i32 , output : * mut super :: wl_output :: wl_output ) { } } pub unsafe fn org_kde_kwin_remote_access_manager_set_user_data ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_remote_access_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_remote_access_manager_get_user_data ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_remote_access_manager as _ ) ; } pub unsafe fn org_kde_kwin_remote_access_manager_get_version ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_remote_access_manager as _ ) ; } pub unsafe fn org_kde_kwin_remote_access_manager_add_listener ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_remote_access_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_remote_access_manager_add_rust_listener ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager , listener : & dyn org_kde_kwin_remote_access_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_remote_access_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_remote_access_manager_add_listener ( org_kde_kwin_remote_access_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_remote_access_manager_destroy ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_remote_access_manager as _ ) ; } # [ doc = "Answer on buffer_ready event, retrieves new buffer from server" ] pub unsafe fn org_kde_kwin_remote_access_manager_get_buffer ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager , internal_buffer_id : i32 ) -> * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_remote_access_manager as _ , 0u32 , & super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , internal_buffer_id ) ; return r as _ ; } # [ doc = "release org_kde_kwin_remote_access_manager interface" ] pub unsafe fn org_kde_kwin_remote_access_manager_release ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_remote_access_manager as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_remote_access_manager as _ ) ; } } # [ doc = "This interface allows finer control of remote buffer lifecycle" ] pub mod org_kde_kwin_remote_buffer { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_remote_buffer { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_remote_buffer_requests : [ wl_message ; 1 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_remote_buffer_events : [ wl_message ; 1 ] = [ wl_message { name : b"gbm_handle\0" as * const u8 as * const c_char , signature : b"huuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_remote_buffer_interface : wl_interface = wl_interface { name : b"org_kde_kwin_remote_buffer\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_kwin_remote_buffer_requests as * const _ } , event_count : 1 , events : unsafe { & org_kde_kwin_remote_buffer_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_remote_buffer_listener { # [ doc = "This is sent after binding to remote access manager" ] fn gbm_handle ( & mut self , object : * mut org_kde_kwin_remote_buffer , fd : :: std :: os :: unix :: io :: RawFd , width : u32 , height : u32 , stride : u32 , format : u32 ) { } } pub unsafe fn org_kde_kwin_remote_buffer_set_user_data ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_remote_buffer as _ , user_data ) ; } pub unsafe fn org_kde_kwin_remote_buffer_get_user_data ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_remote_buffer as _ ) ; } pub unsafe fn org_kde_kwin_remote_buffer_get_version ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_remote_buffer as _ ) ; } pub unsafe fn org_kde_kwin_remote_buffer_add_listener ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_remote_buffer as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_remote_buffer_add_rust_listener ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer , listener : & dyn org_kde_kwin_remote_buffer_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_remote_buffer_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_remote_buffer_add_listener ( org_kde_kwin_remote_buffer as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_remote_buffer_destroy ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_remote_buffer as _ ) ; } # [ doc = "This request comes once client no longer needs this buffer." ] pub unsafe fn org_kde_kwin_remote_buffer_release ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_remote_buffer as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_remote_buffer as _ ) ; } } } pub mod org_kde_plasma_virtual_desktop { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod org_kde_plasma_virtual_desktop_management { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_plasma_virtual_desktop_management { } static mut org_kde_plasma_virtual_desktop_management_requests_get_virtual_desktop_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_virtual_desktop_management_requests : [ wl_message ; 3 ] = [ wl_message { name : b"get_virtual_desktop\0" as * const u8 as * const c_char , signature : b"ns\0" as * const u8 as * const c_char , types : unsafe { & org_kde_plasma_virtual_desktop_management_requests_get_virtual_desktop_types as * const _ } , } , wl_message { name : b"request_create_virtual_desktop\0" as * const u8 as * const c_char , signature : b"su\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"request_remove_virtual_desktop\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_virtual_desktop_management_events : [ wl_message ; 4 ] = [ wl_message { name : b"desktop_created\0" as * const u8 as * const c_char , signature : b"su\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"desktop_removed\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"rows\0" as * const u8 as * const c_char , signature : b"2u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_plasma_virtual_desktop_management_interface : wl_interface = wl_interface { name : b"org_kde_plasma_virtual_desktop_management\0" as * const u8 as * const c_char , version : 2 , request_count : 3 , requests : unsafe { & org_kde_plasma_virtual_desktop_management_requests as * const _ } , event_count : 4 , events : unsafe { & org_kde_plasma_virtual_desktop_management_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_plasma_virtual_desktop_management_listener { # [ doc = "Emitted when a new desktop has been created" ] fn desktop_created ( & mut self , object : * mut org_kde_plasma_virtual_desktop_management , desktop_id : * mut c_char , position : u32 ) { } # [ doc = "Emitted when a desktop has been removed" ] fn desktop_removed ( & mut self , object : * mut org_kde_plasma_virtual_desktop_management , desktop_id : * mut c_char ) { } # [ doc = "sent all information about desktops\n\nThis event is sent after all other properties has been\nsent after binding to the desktop manager object and after any\nother property changes done after that. This allows\nchanges to the org_kde_plasma_virtual_desktop_management properties to be seen as\natomic, even if they happen via multiple events." ] fn done ( & mut self , object : * mut org_kde_plasma_virtual_desktop_management , ) { } # [ doc = "Only available since version 2 of the interface." ] fn rows ( & mut self , object : * mut org_kde_plasma_virtual_desktop_management , rows : u32 ) { } } pub unsafe fn org_kde_plasma_virtual_desktop_management_set_user_data ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_plasma_virtual_desktop_management as _ , user_data ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_management_get_user_data ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_plasma_virtual_desktop_management as _ ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_management_get_version ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_plasma_virtual_desktop_management as _ ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_management_add_listener ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_plasma_virtual_desktop_management as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_management_add_rust_listener ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management , listener : & dyn org_kde_plasma_virtual_desktop_management_listener ) -> bool { let to = ( listener as * const dyn org_kde_plasma_virtual_desktop_management_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_plasma_virtual_desktop_management_add_listener ( org_kde_plasma_virtual_desktop_management as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_plasma_virtual_desktop_management_destroy ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_plasma_virtual_desktop_management as _ ) ; } # [ doc = "get the org_kde_plasma_virtual_desktop interface for a desktop\n\nGiven the id of a particular virtual desktop, get the corresponding org_kde_plasma_virtual_desktop which represents only the desktop with that id;" ] pub unsafe fn org_kde_plasma_virtual_desktop_management_get_virtual_desktop ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management , desktop_id : * const c_char ) -> * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_plasma_virtual_desktop_management as _ , 0u32 , & super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , desktop_id ) ; return r as _ ; } # [ doc = "ask for the creation of a new desktop at a specified position\n\nAsk the server to create a new virtual desktop, and position it at a specified position. If the position is zero or less, it will be positioned at the beginning, if the cosition is the count or more, it will be positioned at the end." ] pub unsafe fn org_kde_plasma_virtual_desktop_management_request_create_virtual_desktop ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management , name : * const c_char , position : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_virtual_desktop_management as _ , 1u32 , name , position , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "ask for a desktop removal identified by id\n\nAsk the server to get rid of a virtual desktop, the server may or may not acconsent to the request." ] pub unsafe fn org_kde_plasma_virtual_desktop_management_request_remove_virtual_desktop ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management , desktop_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_virtual_desktop_management as _ , 2u32 , desktop_id , std :: ptr :: null :: < c_void > ( ) ) ; } } pub mod org_kde_plasma_virtual_desktop { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_plasma_virtual_desktop { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_virtual_desktop_requests : [ wl_message ; 1 ] = [ wl_message { name : b"request_activate\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_virtual_desktop_events : [ wl_message ; 6 ] = [ wl_message { name : b"desktop_id\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"name\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"activated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"deactivated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_plasma_virtual_desktop_interface : wl_interface = wl_interface { name : b"org_kde_plasma_virtual_desktop\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_plasma_virtual_desktop_requests as * const _ } , event_count : 6 , events : unsafe { & org_kde_plasma_virtual_desktop_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_plasma_virtual_desktop_listener { # [ doc = "The desktop got an id\n\nThe format of the id is decided by the compositor implementation. A desktop id univocally identifies a virtual desktop and must be guaranteed to never exist two desktops with the same id. The format of the string id is up to the server implementation." ] fn desktop_id ( & mut self , object : * mut org_kde_plasma_virtual_desktop , desktop_id : * mut c_char ) { } # [ doc = "" ] fn name ( & mut self , object : * mut org_kde_plasma_virtual_desktop , name : * mut c_char ) { } # [ doc = "The desktop has been activated\n\nThe desktop will be the new \"current\" desktop of the system. The server may support either one virtual desktop active at a time, or other combinations such as one virtual desktop active per screen.\nWindows associated to this virtual desktop will be shown." ] fn activated ( & mut self , object : * mut org_kde_plasma_virtual_desktop , ) { } # [ doc = "This desktop is no longer active\n\nWindows that were associated only to this desktop will be hidden." ] fn deactivated ( & mut self , object : * mut org_kde_plasma_virtual_desktop , ) { } # [ doc = "sent all information about desktops\n\nThis event is sent after all other properties has been\nsent after binding to the desktop object and after any\nother property changes done after that. This allows\nchanges to the org_kde_plasma_virtual_desktop properties to be seen as\natomic, even if they happen via multiple events." ] fn done ( & mut self , object : * mut org_kde_plasma_virtual_desktop , ) { } # [ doc = "This desktop has been removed\n\nThis virtual desktop has just been removed by the server:\nAll windows will lose the association to this desktop." ] fn removed ( & mut self , object : * mut org_kde_plasma_virtual_desktop , ) { } } pub unsafe fn org_kde_plasma_virtual_desktop_set_user_data ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_plasma_virtual_desktop as _ , user_data ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_get_user_data ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_plasma_virtual_desktop as _ ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_get_version ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_plasma_virtual_desktop as _ ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_add_listener ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_plasma_virtual_desktop as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_add_rust_listener ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop , listener : & dyn org_kde_plasma_virtual_desktop_listener ) -> bool { let to = ( listener as * const dyn org_kde_plasma_virtual_desktop_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_plasma_virtual_desktop_add_listener ( org_kde_plasma_virtual_desktop as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_plasma_virtual_desktop_destroy ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_plasma_virtual_desktop as _ ) ; } # [ doc = "Requests this desktop to be activated\n\nRequest the server to set the status of this desktop to active: The server is free to consent or deny the request. This will be the new \"current\" virtual desktop of the system." ] pub unsafe fn org_kde_plasma_virtual_desktop_request_activate ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_virtual_desktop as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod xdg_output_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "manage xdg_output objects\n\nA global factory interface for xdg_output objects." ] pub mod zxdg_output_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_output_manager_v1 { } static mut zxdg_output_manager_v1_requests_get_xdg_output_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_output_v1 :: zxdg_output_v1_interface as * const wl_interface } , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_output_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_xdg_output\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zxdg_output_manager_v1_requests_get_xdg_output_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_output_manager_v1_interface : wl_interface = wl_interface { name : b"zxdg_output_manager_v1\0" as * const u8 as * const c_char , version : 3 , request_count : 2 , requests : unsafe { & zxdg_output_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_output_manager_v1_listener { } pub unsafe fn zxdg_output_manager_v1_set_user_data ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_output_manager_v1 as _ , user_data ) ; } pub unsafe fn zxdg_output_manager_v1_get_user_data ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_output_manager_v1 as _ ) ; } pub unsafe fn zxdg_output_manager_v1_get_version ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_output_manager_v1 as _ ) ; } pub unsafe fn zxdg_output_manager_v1_add_listener ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_output_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_output_manager_v1_add_rust_listener ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 , listener : & dyn zxdg_output_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_output_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_output_manager_v1_add_listener ( zxdg_output_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_output_manager object\n\nUsing this request a client can tell the server that it is not\ngoing to use the xdg_output_manager object anymore.\n\nAny objects already created through this instance are not affected." ] pub unsafe fn zxdg_output_manager_v1_destroy ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_output_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_output_manager_v1 as _ ) ; } # [ doc = "create an xdg output from a wl_output\n\nThis creates a new xdg_output object for the given wl_output." ] pub unsafe fn zxdg_output_manager_v1_get_xdg_output ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 , output : * mut super :: wl_output :: wl_output ) -> * mut super :: zxdg_output_v1 :: zxdg_output_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_output_manager_v1 as _ , 1u32 , & super :: zxdg_output_v1 :: zxdg_output_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , output ) ; return r as _ ; } } # [ doc = "compositor logical output region\n\nAn xdg_output describes part of the compositor geometry.\n\nThis typically corresponds to a monitor that displays part of the\ncompositor space.\n\nFor objects version 3 onwards, after all xdg_output properties have been\nsent (when the object is created and when properties are updated), a\nwl_output.done event is sent. This allows changes to the output\nproperties to be seen as atomic, even if they happen via multiple events." ] pub mod zxdg_output_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_output_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_output_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_output_v1_events : [ wl_message ; 5 ] = [ wl_message { name : b"logical_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"logical_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"name\0" as * const u8 as * const c_char , signature : b"2s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"description\0" as * const u8 as * const c_char , signature : b"2s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_output_v1_interface : wl_interface = wl_interface { name : b"zxdg_output_v1\0" as * const u8 as * const c_char , version : 3 , request_count : 1 , requests : unsafe { & zxdg_output_v1_requests as * const _ } , event_count : 5 , events : unsafe { & zxdg_output_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_output_v1_listener { # [ doc = "position of the output within the global compositor space\n\nThe position event describes the location of the wl_output within\nthe global compositor space.\n\nThe logical_position event is sent after creating an xdg_output\n(see xdg_output_manager.get_xdg_output) and whenever the location\nof the output changes within the global compositor space." ] fn logical_position ( & mut self , object : * mut zxdg_output_v1 , x : i32 , y : i32 ) { } # [ doc = "size of the output in the global compositor space\n\nThe logical_size event describes the size of the output in the\nglobal compositor space.\n\nFor example, a surface without any buffer scale, transformation\nnor rotation set, with the size matching the logical_size will\nhave the same size as the corresponding output when displayed.\n\nMost regular Wayland clients should not pay attention to the\nlogical size and would rather rely on xdg_shell interfaces.\n\nSome clients such as Xwayland, however, need this to configure\ntheir surfaces in the global compositor space as the compositor\nmay apply a different scale from what is advertised by the output\nscaling property (to achieve fractional scaling, for example).\n\nFor example, for a wl_output mode 3840\u{d7}2160 and a scale factor 2:\n\n- A compositor not scaling the surface buffers will advertise a\nlogical size of 3840\u{d7}2160,\n\n- A compositor automatically scaling the surface buffers will\nadvertise a logical size of 1920\u{d7}1080,\n\n- A compositor using a fractional scale of 1.5 will advertise a\nlogical size of 2560\u{d7}1440.\n\nFor example, for a wl_output mode 1920\u{d7}1080 and a 90 degree rotation,\nthe compositor will advertise a logical size of 1080x1920.\n\nThe logical_size event is sent after creating an xdg_output\n(see xdg_output_manager.get_xdg_output) and whenever the logical\nsize of the output changes, either as a result of a change in the\napplied scale or because of a change in the corresponding output\nmode(see wl_output.mode) or transform (see wl_output.transform)." ] fn logical_size ( & mut self , object : * mut zxdg_output_v1 , width : i32 , height : i32 ) { } # [ doc = "all information about the output have been sent\n\nThis event is sent after all other properties of an xdg_output\nhave been sent.\n\nThis allows changes to the xdg_output properties to be seen as\natomic, even if they happen via multiple events.\n\nFor objects version 3 onwards, this event is deprecated. Compositors\nare not required to send it anymore and must send wl_output.done\ninstead." ] fn done ( & mut self , object : * mut zxdg_output_v1 , ) { } # [ doc = "name of this output\n\nMany compositors will assign names to their outputs, show them to the\nuser, allow them to be configured by name, etc. The client may wish to\nknow this name as well to offer the user similar behaviors.\n\nThe naming convention is compositor defined, but limited to\nalphanumeric characters and dashes (-). Each name is unique among all\nwl_output globals, but if a wl_output global is destroyed the same name\nmay be reused later. The names will also remain consistent across\nsessions with the same hardware and software configuration.\n\nExamples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc. However, do\nnot assume that the name is a reflection of an underlying DRM\nconnector, X11 connection, etc.\n\nThe name event is sent after creating an xdg_output (see\nxdg_output_manager.get_xdg_output). This event is only sent once per\nxdg_output, and the name does not change over the lifetime of the\nwl_output global.\n\nOnly available since version 2 of the interface." ] fn name ( & mut self , object : * mut zxdg_output_v1 , name : * mut c_char ) { } # [ doc = "human-readable description of this output\n\nMany compositors can produce human-readable descriptions of their\noutputs. The client may wish to know this description as well, to\ncommunicate the user for various purposes.\n\nThe description is a UTF-8 string with no convention defined for its\ncontents. Examples might include 'Foocorp 11\" Display' or 'Virtual X11\noutput via :1'.\n\nThe description event is sent after creating an xdg_output (see\nxdg_output_manager.get_xdg_output) and whenever the description\nchanges. The description is optional, and may not be sent at all.\n\nFor objects of version 2 and lower, this event is only sent once per\nxdg_output, and the description does not change over the lifetime of\nthe wl_output global.\n\nOnly available since version 2 of the interface." ] fn description ( & mut self , object : * mut zxdg_output_v1 , description : * mut c_char ) { } } pub unsafe fn zxdg_output_v1_set_user_data ( zxdg_output_v1 : * mut super :: zxdg_output_v1 :: zxdg_output_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_output_v1 as _ , user_data ) ; } pub unsafe fn zxdg_output_v1_get_user_data ( zxdg_output_v1 : * mut super :: zxdg_output_v1 :: zxdg_output_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_output_v1 as _ ) ; } pub unsafe fn zxdg_output_v1_get_version ( zxdg_output_v1 : * mut super :: zxdg_output_v1 :: zxdg_output_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_output_v1 as _ ) ; } pub unsafe fn zxdg_output_v1_add_listener ( zxdg_output_v1 : * mut super :: zxdg_output_v1 :: zxdg_output_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_output_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_output_v1_add_rust_listener ( zxdg_output_v1 : * mut super :: zxdg_output_v1 :: zxdg_output_v1 , listener : & dyn zxdg_output_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_output_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_output_v1_add_listener ( zxdg_output_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_output object\n\nUsing this request a client can tell the server that it is not\ngoing to use the xdg_output object anymore." ] pub unsafe fn zxdg_output_v1_destroy ( zxdg_output_v1 : * mut super :: zxdg_output_v1 :: zxdg_output_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_output_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_output_v1 as _ ) ; } } } pub mod keystate { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Key States\n\nKeeps track of the states of the different keys that have a state attached to it." ] pub mod org_kde_kwin_keystate { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_keystate { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum key { capslock = 0 , numlock = 1 , scrolllock = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl key { pub fn from_raw ( n : u32 ) -> Option < key > { match n { 0 => Some ( key :: capslock ) , 1 => Some ( key :: numlock ) , 2 => Some ( key :: scrolllock ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum state { unlocked = 0 , latched = 1 , locked = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl state { pub fn from_raw ( n : u32 ) -> Option < state > { match n { 0 => Some ( state :: unlocked ) , 1 => Some ( state :: latched ) , 2 => Some ( state :: locked ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_keystate_requests : [ wl_message ; 1 ] = [ wl_message { name : b"fetchStates\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_keystate_events : [ wl_message ; 1 ] = [ wl_message { name : b"stateChanged\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_keystate_interface : wl_interface = wl_interface { name : b"org_kde_kwin_keystate\0" as * const u8 as * const c_char , version : 3 , request_count : 1 , requests : unsafe { & org_kde_kwin_keystate_requests as * const _ } , event_count : 1 , events : unsafe { & org_kde_kwin_keystate_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_keystate_listener { # [ doc = "Updates the state for a said key" ] fn stateChanged ( & mut self , object : * mut org_kde_kwin_keystate , key : u32 , state : u32 ) { } } pub unsafe fn org_kde_kwin_keystate_set_user_data ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_keystate as _ , user_data ) ; } pub unsafe fn org_kde_kwin_keystate_get_user_data ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_keystate as _ ) ; } pub unsafe fn org_kde_kwin_keystate_get_version ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_keystate as _ ) ; } pub unsafe fn org_kde_kwin_keystate_add_listener ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_keystate as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_keystate_add_rust_listener ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate , listener : & dyn org_kde_kwin_keystate_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_keystate_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_keystate_add_listener ( org_kde_kwin_keystate as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_keystate_destroy ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_keystate as _ ) ; } pub unsafe fn org_kde_kwin_keystate_fetchStates ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_keystate as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod input_timestamps_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "context object for high-resolution input timestamps\n\nA global interface used for requesting high-resolution timestamps\nfor input events." ] pub mod zwp_input_timestamps_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_input_timestamps_manager_v1 { } static mut zwp_input_timestamps_manager_v1_requests_get_keyboard_timestamps_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1_interface as * const wl_interface } , unsafe { & super :: wl_keyboard :: wl_keyboard_interface as * const wl_interface } , ] ; static mut zwp_input_timestamps_manager_v1_requests_get_pointer_timestamps_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , ] ; static mut zwp_input_timestamps_manager_v1_requests_get_touch_timestamps_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1_interface as * const wl_interface } , unsafe { & super :: wl_touch :: wl_touch_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_timestamps_manager_v1_requests : [ wl_message ; 4 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_keyboard_timestamps\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_timestamps_manager_v1_requests_get_keyboard_timestamps_types as * const _ } , } , wl_message { name : b"get_pointer_timestamps\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_timestamps_manager_v1_requests_get_pointer_timestamps_types as * const _ } , } , wl_message { name : b"get_touch_timestamps\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_timestamps_manager_v1_requests_get_touch_timestamps_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_input_timestamps_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_input_timestamps_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 4 , requests : unsafe { & zwp_input_timestamps_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_input_timestamps_manager_v1_listener { } pub unsafe fn zwp_input_timestamps_manager_v1_set_user_data ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_input_timestamps_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_input_timestamps_manager_v1_get_user_data ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_input_timestamps_manager_v1 as _ ) ; } pub unsafe fn zwp_input_timestamps_manager_v1_get_version ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_input_timestamps_manager_v1 as _ ) ; } pub unsafe fn zwp_input_timestamps_manager_v1_add_listener ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_input_timestamps_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_input_timestamps_manager_v1_add_rust_listener ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 , listener : & dyn zwp_input_timestamps_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_input_timestamps_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_input_timestamps_manager_v1_add_listener ( zwp_input_timestamps_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the input timestamps manager object\n\nInforms the server that the client will no longer be using this\nprotocol object. Existing objects created by this object are not\naffected." ] pub unsafe fn zwp_input_timestamps_manager_v1_destroy ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_timestamps_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_input_timestamps_manager_v1 as _ ) ; } # [ doc = "subscribe to high-resolution keyboard timestamp events\n\nCreates a new input timestamps object that represents a subscription\nto high-resolution timestamp events for all wl_keyboard events that\ncarry a timestamp.\n\nIf the associated wl_keyboard object is invalidated, either through\nclient action (e.g. release) or server-side changes, the input\ntimestamps object becomes inert and the client should destroy it\nby calling zwp_input_timestamps_v1.destroy." ] pub unsafe fn zwp_input_timestamps_manager_v1_get_keyboard_timestamps ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 , keyboard : * mut super :: wl_keyboard :: wl_keyboard ) -> * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_input_timestamps_manager_v1 as _ , 1u32 , & super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , keyboard ) ; return r as _ ; } # [ doc = "subscribe to high-resolution pointer timestamp events\n\nCreates a new input timestamps object that represents a subscription\nto high-resolution timestamp events for all wl_pointer events that\ncarry a timestamp.\n\nIf the associated wl_pointer object is invalidated, either through\nclient action (e.g. release) or server-side changes, the input\ntimestamps object becomes inert and the client should destroy it\nby calling zwp_input_timestamps_v1.destroy." ] pub unsafe fn zwp_input_timestamps_manager_v1_get_pointer_timestamps ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 , pointer : * mut super :: wl_pointer :: wl_pointer ) -> * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_input_timestamps_manager_v1 as _ , 2u32 , & super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , pointer ) ; return r as _ ; } # [ doc = "subscribe to high-resolution touch timestamp events\n\nCreates a new input timestamps object that represents a subscription\nto high-resolution timestamp events for all wl_touch events that\ncarry a timestamp.\n\nIf the associated wl_touch object becomes invalid, either through\nclient action (e.g. release) or server-side changes, the input\ntimestamps object becomes inert and the client should destroy it\nby calling zwp_input_timestamps_v1.destroy." ] pub unsafe fn zwp_input_timestamps_manager_v1_get_touch_timestamps ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 , touch : * mut super :: wl_touch :: wl_touch ) -> * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_input_timestamps_manager_v1 as _ , 3u32 , & super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , touch ) ; return r as _ ; } } # [ doc = "context object for input timestamps\n\nProvides high-resolution timestamp events for a set of subscribed input\nevents. The set of subscribed input events is determined by the\nzwp_input_timestamps_manager_v1 request used to create this object." ] pub mod zwp_input_timestamps_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_input_timestamps_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_timestamps_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_timestamps_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"timestamp\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_input_timestamps_v1_interface : wl_interface = wl_interface { name : b"zwp_input_timestamps_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_input_timestamps_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zwp_input_timestamps_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_input_timestamps_v1_listener { # [ doc = "high-resolution timestamp event\n\nThe timestamp event is associated with the first subsequent input event\ncarrying a timestamp which belongs to the set of input events this\nobject is subscribed to.\n\nThe timestamp provided by this event is a high-resolution version of\nthe timestamp argument of the associated input event. The provided\ntimestamp is in the same clock domain and is at least as accurate as\nthe associated input event timestamp.\n\nThe timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples,\neach component being an unsigned 32-bit value. Whole seconds are in\ntv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo,\nand the additional fractional part in tv_nsec as nanoseconds. Hence,\nfor valid timestamps tv_nsec must be in [0, 999999999]." ] fn timestamp ( & mut self , object : * mut zwp_input_timestamps_v1 , tv_sec_hi : u32 , tv_sec_lo : u32 , tv_nsec : u32 ) { } } pub unsafe fn zwp_input_timestamps_v1_set_user_data ( zwp_input_timestamps_v1 : * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_input_timestamps_v1 as _ , user_data ) ; } pub unsafe fn zwp_input_timestamps_v1_get_user_data ( zwp_input_timestamps_v1 : * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_input_timestamps_v1 as _ ) ; } pub unsafe fn zwp_input_timestamps_v1_get_version ( zwp_input_timestamps_v1 : * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_input_timestamps_v1 as _ ) ; } pub unsafe fn zwp_input_timestamps_v1_add_listener ( zwp_input_timestamps_v1 : * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_input_timestamps_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_input_timestamps_v1_add_rust_listener ( zwp_input_timestamps_v1 : * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 , listener : & dyn zwp_input_timestamps_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_input_timestamps_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_input_timestamps_v1_add_listener ( zwp_input_timestamps_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the input timestamps object\n\nInforms the server that the client will no longer be using this\nprotocol object. After the server processes the request, no more\ntimestamp events will be emitted." ] pub unsafe fn zwp_input_timestamps_v1_destroy ( zwp_input_timestamps_v1 : * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_timestamps_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_input_timestamps_v1 as _ ) ; } } } pub mod text_input_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "text input\n\nAn object used for text input. Adds support for text input and input\nmethods to applications. A text_input object is created from a\nwl_text_input_manager and corresponds typically to a text entry in an\napplication.\n\nRequests are used to activate/deactivate the text_input object and set\nstate information like surrounding and selected text or the content type.\nThe information about entered text is sent to the text_input object via\nthe pre-edit and commit events. Using this interface removes the need\nfor applications to directly process hardware key events and compose text\nout of them.\n\nText is generally UTF-8 encoded, indices and lengths are in bytes.\n\nSerials are used to synchronize the state between the text input and\nan input method. New serials are sent by the text input in the\ncommit_state request and are used by the input method to indicate\nthe known text input state in events like preedit_string, commit_string,\nand keysym. The text input can then ignore events from the input method\nwhich are based on an outdated state (for example after a reset).\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_text_input_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_text_input_v1 { } bitflags ! { # [ doc = "content hint\n\nContent hint is a bitmask to allow to modify the behavior of the text\ninput." ] pub struct content_hint : u32 { # [ doc = "no special behaviour" ] const none = 0 ; # [ doc = "auto completion, correction and capitalization" ] const default = 7 ; # [ doc = "hidden and sensitive text" ] const password = 192 ; # [ doc = "suggest word completions" ] const auto_completion = 1 ; # [ doc = "suggest word corrections" ] const auto_correction = 2 ; # [ doc = "switch to uppercase letters at the start of a sentence" ] const auto_capitalization = 4 ; # [ doc = "prefer lowercase letters" ] const lowercase = 8 ; # [ doc = "prefer uppercase letters" ] const uppercase = 16 ; # [ doc = "prefer casing for titles and headings (can be language dependent)" ] const titlecase = 32 ; # [ doc = "characters should be hidden" ] const hidden_text = 64 ; # [ doc = "typed text should not be stored" ] const sensitive_data = 128 ; # [ doc = "just latin characters should be entered" ] const latin = 256 ; # [ doc = "the text input is multiline" ] const multiline = 512 ; } } impl content_hint { pub fn from_raw ( n : u32 ) -> Option < content_hint > { Some ( content_hint :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = "content purpose\n\nThe content purpose allows to specify the primary purpose of a text\ninput.\n\nThis allows an input method to show special purpose input panels with\nextra characters or to disallow some characters." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum content_purpose { # [ doc = "default input, allowing all characters" ] normal = 0 , # [ doc = "allow only alphabetic characters" ] alpha = 1 , # [ doc = "allow only digits" ] digits = 2 , # [ doc = "input a number (including decimal separator and sign)" ] number = 3 , # [ doc = "input a phone number" ] phone = 4 , # [ doc = "input an URL" ] url = 5 , # [ doc = "input an email address" ] email = 6 , # [ doc = "input a name of a person" ] name = 7 , # [ doc = "input a password (combine with password or sensitive_data hint)" ] password = 8 , # [ doc = "input a date" ] date = 9 , # [ doc = "input a time" ] time = 10 , # [ doc = "input a date and time" ] datetime = 11 , # [ doc = "input for a terminal" ] terminal = 12 , # [ doc ( hidden ) ] __nonexhaustive , } impl content_purpose { pub fn from_raw ( n : u32 ) -> Option < content_purpose > { match n { 0 => Some ( content_purpose :: normal ) , 1 => Some ( content_purpose :: alpha ) , 2 => Some ( content_purpose :: digits ) , 3 => Some ( content_purpose :: number ) , 4 => Some ( content_purpose :: phone ) , 5 => Some ( content_purpose :: url ) , 6 => Some ( content_purpose :: email ) , 7 => Some ( content_purpose :: name ) , 8 => Some ( content_purpose :: password ) , 9 => Some ( content_purpose :: date ) , 10 => Some ( content_purpose :: time ) , 11 => Some ( content_purpose :: datetime ) , 12 => Some ( content_purpose :: terminal ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum preedit_style { # [ doc = "default style for composing text" ] default = 0 , # [ doc = "style should be the same as in non-composing text" ] none = 1 , active = 2 , inactive = 3 , highlight = 4 , underline = 5 , selection = 6 , incorrect = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl preedit_style { pub fn from_raw ( n : u32 ) -> Option < preedit_style > { match n { 0 => Some ( preedit_style :: default ) , 1 => Some ( preedit_style :: none ) , 2 => Some ( preedit_style :: active ) , 3 => Some ( preedit_style :: inactive ) , 4 => Some ( preedit_style :: highlight ) , 5 => Some ( preedit_style :: underline ) , 6 => Some ( preedit_style :: selection ) , 7 => Some ( preedit_style :: incorrect ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum text_direction { # [ doc = "automatic text direction based on text and language" ] auto = 0 , # [ doc = "left-to-right" ] ltr = 1 , # [ doc = "right-to-left" ] rtl = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl text_direction { pub fn from_raw ( n : u32 ) -> Option < text_direction > { match n { 0 => Some ( text_direction :: auto ) , 1 => Some ( text_direction :: ltr ) , 2 => Some ( text_direction :: rtl ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_text_input_v1_requests_activate_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut zwp_text_input_v1_requests_deactivate_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_v1_requests : [ wl_message ; 11 ] = [ wl_message { name : b"activate\0" as * const u8 as * const c_char , signature : b"oo\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v1_requests_activate_types as * const _ } , } , wl_message { name : b"deactivate\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v1_requests_deactivate_types as * const _ } , } , wl_message { name : b"show_input_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hide_input_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"reset\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_surrounding_text\0" as * const u8 as * const c_char , signature : b"suu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_content_type\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_cursor_rectangle\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_preferred_language\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_state\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"invoke_action\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_text_input_v1_events_enter_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_v1_events : [ wl_message ; 13 ] = [ wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v1_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifiers_map\0" as * const u8 as * const c_char , signature : b"a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"input_panel_state\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_string\0" as * const u8 as * const c_char , signature : b"uss\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_styling\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_cursor\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_string\0" as * const u8 as * const c_char , signature : b"us\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cursor_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"delete_surrounding_text\0" as * const u8 as * const c_char , signature : b"iu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"keysym\0" as * const u8 as * const c_char , signature : b"uuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"language\0" as * const u8 as * const c_char , signature : b"us\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"text_direction\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_text_input_v1_interface : wl_interface = wl_interface { name : b"zwp_text_input_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 11 , requests : unsafe { & zwp_text_input_v1_requests as * const _ } , event_count : 13 , events : unsafe { & zwp_text_input_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_text_input_v1_listener { # [ doc = "enter event\n\nNotify the text_input object when it received focus. Typically in\nresponse to an activate request." ] fn enter ( & mut self , object : * mut zwp_text_input_v1 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "leave event\n\nNotify the text_input object when it lost focus. Either in response\nto a deactivate request or when the assigned surface lost focus or was\ndestroyed." ] fn leave ( & mut self , object : * mut zwp_text_input_v1 , ) { } # [ doc = "modifiers map\n\nTransfer an array of 0-terminated modifier names. The position in\nthe array is the index of the modifier as used in the modifiers\nbitmask in the keysym event." ] fn modifiers_map ( & mut self , object : * mut zwp_text_input_v1 , map : * mut wl_array ) { } # [ doc = "state of the input panel\n\nNotify when the visibility state of the input panel changed." ] fn input_panel_state ( & mut self , object : * mut zwp_text_input_v1 , state : u32 ) { } # [ doc = "pre-edit\n\nNotify when a new composing text (pre-edit) should be set around the\ncurrent cursor position. Any previously set composing text should\nbe removed.\n\nThe commit text can be used to replace the preedit text on reset\n(for example on unfocus).\n\nThe text input should also handle all preedit_style and preedit_cursor\nevents occurring directly before preedit_string." ] fn preedit_string ( & mut self , object : * mut zwp_text_input_v1 , serial : u32 , text : * mut c_char , commit : * mut c_char ) { } # [ doc = "pre-edit styling\n\nSets styling information on composing text. The style is applied for\nlength bytes from index relative to the beginning of the composing\ntext (as byte offset). Multiple styles can\nbe applied to a composing text by sending multiple preedit_styling\nevents.\n\nThis event is handled as part of a following preedit_string event." ] fn preedit_styling ( & mut self , object : * mut zwp_text_input_v1 , index : u32 , length : u32 , style : preedit_style ) { } # [ doc = "pre-edit cursor\n\nSets the cursor position inside the composing text (as byte\noffset) relative to the start of the composing text. When index is a\nnegative number no cursor is shown.\n\nThis event is handled as part of a following preedit_string event." ] fn preedit_cursor ( & mut self , object : * mut zwp_text_input_v1 , index : i32 ) { } # [ doc = "commit\n\nNotify when text should be inserted into the editor widget. The text to\ncommit could be either just a single character after a key press or the\nresult of some composing (pre-edit). It could also be an empty text\nwhen some text should be removed (see delete_surrounding_text) or when\nthe input cursor should be moved (see cursor_position).\n\nAny previously set composing text should be removed." ] fn commit_string ( & mut self , object : * mut zwp_text_input_v1 , serial : u32 , text : * mut c_char ) { } # [ doc = "set cursor to new position\n\nNotify when the cursor or anchor position should be modified.\n\nThis event should be handled as part of a following commit_string\nevent." ] fn cursor_position ( & mut self , object : * mut zwp_text_input_v1 , index : i32 , anchor : i32 ) { } # [ doc = "delete surrounding text\n\nNotify when the text around the current cursor position should be\ndeleted.\n\nIndex is relative to the current cursor (in bytes).\nLength is the length of deleted text (in bytes).\n\nThis event should be handled as part of a following commit_string\nevent." ] fn delete_surrounding_text ( & mut self , object : * mut zwp_text_input_v1 , index : i32 , length : u32 ) { } # [ doc = "keysym\n\nNotify when a key event was sent. Key events should not be used\nfor normal text input operations, which should be done with\ncommit_string, delete_surrounding_text, etc. The key event follows\nthe wl_keyboard key event convention. Sym is an XKB keysym, state a\nwl_keyboard key_state. Modifiers are a mask for effective modifiers\n(where the modifier indices are set by the modifiers_map event)" ] fn keysym ( & mut self , object : * mut zwp_text_input_v1 , serial : u32 , time : u32 , sym : u32 , state : u32 , modifiers : u32 ) { } # [ doc = "language\n\nSets the language of the input text. The \"language\" argument is an\nRFC-3066 format language tag." ] fn language ( & mut self , object : * mut zwp_text_input_v1 , serial : u32 , language : * mut c_char ) { } # [ doc = "text direction\n\nSets the text direction of input text.\n\nIt is mainly needed for showing an input cursor on the correct side of\nthe editor when there is no input done yet and making sure neutral\ndirection text is laid out properly." ] fn text_direction ( & mut self , object : * mut zwp_text_input_v1 , serial : u32 , direction : text_direction ) { } } pub unsafe fn zwp_text_input_v1_set_user_data ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_text_input_v1 as _ , user_data ) ; } pub unsafe fn zwp_text_input_v1_get_user_data ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_text_input_v1 as _ ) ; } pub unsafe fn zwp_text_input_v1_get_version ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_text_input_v1 as _ ) ; } pub unsafe fn zwp_text_input_v1_add_listener ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_text_input_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_text_input_v1_add_rust_listener ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , listener : & dyn zwp_text_input_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_text_input_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_text_input_v1_add_listener ( zwp_text_input_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_text_input_v1_destroy ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_text_input_v1 as _ ) ; } # [ doc = "request activation\n\nRequests the text_input object to be activated (typically when the\ntext entry gets focus).\n\nThe seat argument is a wl_seat which maintains the focus for this\nactivation. The surface argument is a wl_surface assigned to the\ntext_input object and tracked for focus lost. The enter event\nis emitted on successful activation." ] pub unsafe fn zwp_text_input_v1_activate ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , seat : * mut super :: wl_seat :: wl_seat , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 0u32 , seat , surface , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "request deactivation\n\nRequests the text_input object to be deactivated (typically when the\ntext entry lost focus). The seat argument is a wl_seat which was used\nfor activation." ] pub unsafe fn zwp_text_input_v1_deactivate ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , seat : * mut super :: wl_seat :: wl_seat ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 1u32 , seat , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "show input panels\n\nRequests input panels (virtual keyboard) to show." ] pub unsafe fn zwp_text_input_v1_show_input_panel ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "hide input panels\n\nRequests input panels (virtual keyboard) to hide." ] pub unsafe fn zwp_text_input_v1_hide_input_panel ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "reset\n\nShould be called by an editor widget when the input state should be\nreset, for example after the text was changed outside of the normal\ninput method flow." ] pub unsafe fn zwp_text_input_v1_reset ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 4u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets the surrounding text\n\nSets the plain surrounding text around the input position. Text is\nUTF-8 encoded. Cursor is the byte offset within the\nsurrounding text. Anchor is the byte offset of the\nselection anchor within the surrounding text. If there is no selected\ntext anchor, then it is the same as cursor." ] pub unsafe fn zwp_text_input_v1_set_surrounding_text ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , text : * const c_char , cursor : u32 , anchor : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 5u32 , text , cursor , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set content purpose and hint\n\nSets the content purpose and content hint. While the purpose is the\nbasic purpose of an input field, the hint flags allow to modify some\nof the behavior.\n\nWhen no content type is explicitly set, a normal content purpose with\ndefault hints (auto completion, auto correction, auto capitalization)\nshould be assumed." ] pub unsafe fn zwp_text_input_v1_set_content_type ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , hint : u32 , purpose : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 6u32 , hint , purpose , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zwp_text_input_v1_set_cursor_rectangle ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 7u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets preferred language\n\nSets a specific language. This allows for example a virtual keyboard to\nshow a language specific layout. The \"language\" argument is an RFC-3066\nformat language tag.\n\nIt could be used for example in a word processor to indicate the\nlanguage of the currently edited document or in an instant message\napplication which tracks languages of contacts." ] pub unsafe fn zwp_text_input_v1_set_preferred_language ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , language : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 8u32 , language , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zwp_text_input_v1_commit_state ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 9u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zwp_text_input_v1_invoke_action ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , button : u32 , index : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 10u32 , button , index , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "text input manager\n\nA factory for text_input objects. This object is a global singleton." ] pub mod zwp_text_input_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_text_input_manager_v1 { } static mut zwp_text_input_manager_v1_requests_create_text_input_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_text_input_v1 :: zwp_text_input_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_manager_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create_text_input\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_manager_v1_requests_create_text_input_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_text_input_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_text_input_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_text_input_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_text_input_manager_v1_listener { } pub unsafe fn zwp_text_input_manager_v1_set_user_data ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_text_input_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_text_input_manager_v1_get_user_data ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_text_input_manager_v1 as _ ) ; } pub unsafe fn zwp_text_input_manager_v1_get_version ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_text_input_manager_v1 as _ ) ; } pub unsafe fn zwp_text_input_manager_v1_add_listener ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_text_input_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_text_input_manager_v1_add_rust_listener ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 , listener : & dyn zwp_text_input_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_text_input_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_text_input_manager_v1_add_listener ( zwp_text_input_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_text_input_manager_v1_destroy ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_text_input_manager_v1 as _ ) ; } # [ doc = "create text input\n\nCreates a new text_input object." ] pub unsafe fn zwp_text_input_manager_v1_create_text_input ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 ) -> * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_text_input_manager_v1 as _ , 0u32 , & super :: zwp_text_input_v1 :: zwp_text_input_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } } pub mod server_decoration { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Server side window decoration manager\n\nThis interface allows to coordinate whether the server should create\na server-side window decoration around a wl_surface representing a\nshell surface (wl_shell_surface or similar). By announcing support\nfor this interface the server indicates that it supports server\nside decorations.\n\nUse in conjunction with zxdg_decoration_manager_v1 is undefined." ] pub mod org_kde_kwin_server_decoration_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_server_decoration_manager { } # [ doc = "Possible values to use in request_mode and the event mode." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum mode { # [ doc = "Undecorated: The surface is not decorated at all, neither server nor client-side. An example is a popup surface which should not be decorated." ] None = 0 , # [ doc = "Client-side decoration: The decoration is part of the surface and the client." ] Client = 1 , # [ doc = "Server-side decoration: The server embeds the surface into a decoration frame." ] Server = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl mode { pub fn from_raw ( n : u32 ) -> Option < mode > { match n { 0 => Some ( mode :: None ) , 1 => Some ( mode :: Client ) , 2 => Some ( mode :: Server ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut org_kde_kwin_server_decoration_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_manager_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_server_decoration_manager_requests_create_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_manager_events : [ wl_message ; 1 ] = [ wl_message { name : b"default_mode\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_server_decoration_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_kwin_server_decoration_manager_requests as * const _ } , event_count : 1 , events : unsafe { & org_kde_kwin_server_decoration_manager_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_server_decoration_manager_listener { # [ doc = "The default mode used on the server\n\nThis event is emitted directly after binding the interface. It contains\nthe default mode for the decoration. When a new server decoration object\nis created this new object will be in the default mode until the first\nrequest_mode is requested.\n\nThe server may change the default mode at any time." ] fn default_mode ( & mut self , object : * mut org_kde_kwin_server_decoration_manager , mode : u32 ) { } } pub unsafe fn org_kde_kwin_server_decoration_manager_set_user_data ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_server_decoration_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_server_decoration_manager_get_user_data ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_server_decoration_manager as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_manager_get_version ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_server_decoration_manager as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_manager_add_listener ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_server_decoration_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_manager_add_rust_listener ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager , listener : & dyn org_kde_kwin_server_decoration_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_server_decoration_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_server_decoration_manager_add_listener ( org_kde_kwin_server_decoration_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_server_decoration_manager_destroy ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_server_decoration_manager as _ ) ; } # [ doc = "Create a server-side decoration object for a given surface\n\nWhen a client creates a server-side decoration object it indicates\nthat it supports the protocol. The client is supposed to tell the\nserver whether it wants server-side decorations or will provide\nclient-side decorations.\n\nIf the client does not create a server-side decoration object for\na surface the server interprets this as lack of support for this\nprotocol and considers it as client-side decorated. Nevertheless a\nclient-side decorated surface should use this protocol to indicate\nto the server that it does not want a server-side deco." ] pub unsafe fn org_kde_kwin_server_decoration_manager_create ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_server_decoration_manager as _ , 0u32 , & super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } pub mod org_kde_kwin_server_decoration { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_server_decoration { } # [ doc = "Possible values to use in request_mode and the event mode." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum mode { # [ doc = "Undecorated: The surface is not decorated at all, neither server nor client-side. An example is a popup surface which should not be decorated." ] None = 0 , # [ doc = "Client-side decoration: The decoration is part of the surface and the client." ] Client = 1 , # [ doc = "Server-side decoration: The server embeds the surface into a decoration frame." ] Server = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl mode { pub fn from_raw ( n : u32 ) -> Option < mode > { match n { 0 => Some ( mode :: None ) , 1 => Some ( mode :: Client ) , 2 => Some ( mode :: Server ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_requests : [ wl_message ; 2 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"request_mode\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_events : [ wl_message ; 1 ] = [ wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_interface : wl_interface = wl_interface { name : b"org_kde_kwin_server_decoration\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_server_decoration_requests as * const _ } , event_count : 1 , events : unsafe { & org_kde_kwin_server_decoration_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_server_decoration_listener { # [ doc = "The new decoration mode applied by the server\n\nThis event is emitted directly after the decoration is created and\nrepresents the base decoration policy by the server. E.g. a server\nwhich wants all surfaces to be client-side decorated will send Client,\na server which wants server-side decoration will send Server.\n\nThe client can request a different mode through the decoration request.\nThe server will acknowledge this by another event with the same mode. So\neven if a server prefers server-side decoration it's possible to force a\nclient-side decoration.\n\nThe server may emit this event at any time. In this case the client can\nagain request a different mode. It's the responsibility of the server to\nprevent a feedback loop." ] fn mode ( & mut self , object : * mut org_kde_kwin_server_decoration , mode : u32 ) { } } pub unsafe fn org_kde_kwin_server_decoration_set_user_data ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_server_decoration as _ , user_data ) ; } pub unsafe fn org_kde_kwin_server_decoration_get_user_data ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_server_decoration as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_get_version ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_server_decoration as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_add_listener ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_server_decoration as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_add_rust_listener ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration , listener : & dyn org_kde_kwin_server_decoration_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_server_decoration_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_server_decoration_add_listener ( org_kde_kwin_server_decoration as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_server_decoration_destroy ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_server_decoration as _ ) ; } # [ doc = "release the server decoration object" ] pub unsafe fn org_kde_kwin_server_decoration_release ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_server_decoration as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_server_decoration as _ ) ; } # [ doc = "The decoration mode the surface wants to use." ] pub unsafe fn org_kde_kwin_server_decoration_request_mode ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration , mode : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_server_decoration as _ , 1u32 , mode , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod text_input_unstable_v2 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "text input\n\nThe zwp_text_input_v2 interface represents text input and input methods\nassociated with a seat. It provides enter/leave events to follow the\ntext input focus for a seat.\n\nRequests are used to enable/disable the text-input object and set\nstate information like surrounding and selected text or the content type.\nThe information about the entered text is sent to the text-input object\nvia the pre-edit and commit events. Using this interface removes the need\nfor applications to directly process hardware key events and compose text\nout of them.\n\nText is valid UTF-8 encoded, indices and lengths are in bytes. Indices\nhave to always point to the first byte of an UTF-8 encoded code point.\nLengths are not allowed to contain just a part of an UTF-8 encoded code\npoint.\n\nState is sent by the state requests (set_surrounding_text,\nset_content_type, set_cursor_rectangle and set_preferred_language) and\nan update_state request. After an enter or an input_method_change event\nall state information is invalidated and needs to be resent from the\nclient. A reset or entering a new widget on client side also\ninvalidates all current state information." ] pub mod zwp_text_input_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_text_input_v2 { } bitflags ! { # [ doc = "content hint\n\nContent hint is a bitmask to allow to modify the behavior of the text\ninput." ] pub struct content_hint : u32 { # [ doc = "no special behaviour" ] const none = 0 ; # [ doc = "suggest word completions" ] const auto_completion = 1 ; # [ doc = "suggest word corrections" ] const auto_correction = 2 ; # [ doc = "switch to uppercase letters at the start of a sentence" ] const auto_capitalization = 4 ; # [ doc = "prefer lowercase letters" ] const lowercase = 8 ; # [ doc = "prefer uppercase letters" ] const uppercase = 16 ; # [ doc = "prefer casing for titles and headings (can be language dependent)" ] const titlecase = 32 ; # [ doc = "characters should be hidden" ] const hidden_text = 64 ; # [ doc = "typed text should not be stored" ] const sensitive_data = 128 ; # [ doc = "just latin characters should be entered" ] const latin = 256 ; # [ doc = "the text input is multiline" ] const multiline = 512 ; } } impl content_hint { pub fn from_raw ( n : u32 ) -> Option < content_hint > { Some ( content_hint :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = "content purpose\n\nThe content purpose allows to specify the primary purpose of a text\ninput.\n\nThis allows an input method to show special purpose input panels with\nextra characters or to disallow some characters." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum content_purpose { # [ doc = "default input, allowing all characters" ] normal = 0 , # [ doc = "allow only alphabetic characters" ] alpha = 1 , # [ doc = "allow only digits" ] digits = 2 , # [ doc = "input a number (including decimal separator and sign)" ] number = 3 , # [ doc = "input a phone number" ] phone = 4 , # [ doc = "input an URL" ] url = 5 , # [ doc = "input an email address" ] email = 6 , # [ doc = "input a name of a person" ] name = 7 , # [ doc = "input a password (combine with password or sensitive_data hint)" ] password = 8 , # [ doc = "input a date" ] date = 9 , # [ doc = "input a time" ] time = 10 , # [ doc = "input a date and time" ] datetime = 11 , # [ doc = "input for a terminal" ] terminal = 12 , # [ doc ( hidden ) ] __nonexhaustive , } impl content_purpose { pub fn from_raw ( n : u32 ) -> Option < content_purpose > { match n { 0 => Some ( content_purpose :: normal ) , 1 => Some ( content_purpose :: alpha ) , 2 => Some ( content_purpose :: digits ) , 3 => Some ( content_purpose :: number ) , 4 => Some ( content_purpose :: phone ) , 5 => Some ( content_purpose :: url ) , 6 => Some ( content_purpose :: email ) , 7 => Some ( content_purpose :: name ) , 8 => Some ( content_purpose :: password ) , 9 => Some ( content_purpose :: date ) , 10 => Some ( content_purpose :: time ) , 11 => Some ( content_purpose :: datetime ) , 12 => Some ( content_purpose :: terminal ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "update_state flags\n\nDefines the reason for sending an updated state." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum update_state { # [ doc = "updated state because it changed" ] change = 0 , # [ doc = "full state after enter or input_method_changed event" ] full = 1 , # [ doc = "full state after reset" ] reset = 2 , # [ doc = "full state after switching focus to a different widget on client side" ] enter = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl update_state { pub fn from_raw ( n : u32 ) -> Option < update_state > { match n { 0 => Some ( update_state :: change ) , 1 => Some ( update_state :: full ) , 2 => Some ( update_state :: reset ) , 3 => Some ( update_state :: enter ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum input_panel_visibility { # [ doc = "the input panel (virtual keyboard) is hidden" ] hidden = 0 , # [ doc = "the input panel (virtual keyboard) is visible" ] visible = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl input_panel_visibility { pub fn from_raw ( n : u32 ) -> Option < input_panel_visibility > { match n { 0 => Some ( input_panel_visibility :: hidden ) , 1 => Some ( input_panel_visibility :: visible ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum preedit_style { # [ doc = "default style for composing text" ] default = 0 , # [ doc = "composing text should be shown the same as non-composing text" ] none = 1 , # [ doc = "composing text might be bold" ] active = 2 , # [ doc = "composing text might be cursive" ] inactive = 3 , # [ doc = "composing text might have a different background color" ] highlight = 4 , # [ doc = "composing text might be underlined" ] underline = 5 , # [ doc = "composing text should be shown the same as selected text" ] selection = 6 , # [ doc = "composing text might be underlined with a red wavy line" ] incorrect = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl preedit_style { pub fn from_raw ( n : u32 ) -> Option < preedit_style > { match n { 0 => Some ( preedit_style :: default ) , 1 => Some ( preedit_style :: none ) , 2 => Some ( preedit_style :: active ) , 3 => Some ( preedit_style :: inactive ) , 4 => Some ( preedit_style :: highlight ) , 5 => Some ( preedit_style :: underline ) , 6 => Some ( preedit_style :: selection ) , 7 => Some ( preedit_style :: incorrect ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum text_direction { # [ doc = "automatic text direction based on text and language" ] auto = 0 , # [ doc = "left-to-right" ] ltr = 1 , # [ doc = "right-to-left" ] rtl = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl text_direction { pub fn from_raw ( n : u32 ) -> Option < text_direction > { match n { 0 => Some ( text_direction :: auto ) , 1 => Some ( text_direction :: ltr ) , 2 => Some ( text_direction :: rtl ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_text_input_v2_requests_enable_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut zwp_text_input_v2_requests_disable_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_v2_requests : [ wl_message ; 10 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"enable\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v2_requests_enable_types as * const _ } , } , wl_message { name : b"disable\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v2_requests_disable_types as * const _ } , } , wl_message { name : b"show_input_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hide_input_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_surrounding_text\0" as * const u8 as * const c_char , signature : b"sii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_content_type\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_cursor_rectangle\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_preferred_language\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"update_state\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_text_input_v2_events_enter_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut zwp_text_input_v2_events_leave_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_v2_events : [ wl_message ; 15 ] = [ wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"uo\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v2_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"uo\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v2_events_leave_types as * const _ } , } , wl_message { name : b"input_panel_state\0" as * const u8 as * const c_char , signature : b"uiiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_string\0" as * const u8 as * const c_char , signature : b"ss\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_styling\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_cursor\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_string\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cursor_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"delete_surrounding_text\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifiers_map\0" as * const u8 as * const c_char , signature : b"a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"keysym\0" as * const u8 as * const c_char , signature : b"uuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"language\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"text_direction\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"configure_surrounding_text\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"input_method_changed\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_text_input_v2_interface : wl_interface = wl_interface { name : b"zwp_text_input_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 10 , requests : unsafe { & zwp_text_input_v2_requests as * const _ } , event_count : 15 , events : unsafe { & zwp_text_input_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_text_input_v2_listener { # [ doc = "enter event\n\nNotification that this seat's text-input focus is on a certain surface.\n\nWhen the seat has the keyboard capability the text-input focus follows\nthe keyboard focus." ] fn enter ( & mut self , object : * mut zwp_text_input_v2 , serial : u32 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "leave event\n\nNotification that this seat's text-input focus is no longer on\na certain surface.\n\nThe leave notification is sent before the enter notification\nfor the new focus.\n\nWhen the seat has the keyboard capability the text-input focus follows\nthe keyboard focus." ] fn leave ( & mut self , object : * mut zwp_text_input_v2 , serial : u32 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "state of the input panel\n\nNotification that the visibility of the input panel (virtual keyboard)\nchanged.\n\nThe rectangle x, y, width, height defines the area overlapped by the\ninput panel (virtual keyboard) on the surface having the text\nfocus in surface local coordinates.\n\nThat can be used to make sure widgets are visible and not covered by\na virtual keyboard." ] fn input_panel_state ( & mut self , object : * mut zwp_text_input_v2 , state : input_panel_visibility , x : i32 , y : i32 , width : i32 , height : i32 ) { } # [ doc = "pre-edit\n\nNotify when a new composing text (pre-edit) should be set around the\ncurrent cursor position. Any previously set composing text should\nbe removed.\n\nThe commit text can be used to replace the composing text in some cases\n(for example when losing focus).\n\nThe text input should also handle all preedit_style and preedit_cursor\nevents occurring directly before preedit_string." ] fn preedit_string ( & mut self , object : * mut zwp_text_input_v2 , text : * mut c_char , commit : * mut c_char ) { } # [ doc = "pre-edit styling\n\nSets styling information on composing text. The style is applied for\nlength bytes from index relative to the beginning of the composing\ntext (as byte offset). Multiple styles can be applied to a composing\ntext by sending multiple preedit_styling events.\n\nThis event is handled as part of a following preedit_string event." ] fn preedit_styling ( & mut self , object : * mut zwp_text_input_v2 , index : u32 , length : u32 , style : preedit_style ) { } # [ doc = "pre-edit cursor\n\nSets the cursor position inside the composing text (as byte\noffset) relative to the start of the composing text. When index is a\nnegative number no cursor is shown.\n\nWhen no preedit_cursor event is sent the cursor will be at the end of\nthe composing text by default.\n\nThis event is handled as part of a following preedit_string event." ] fn preedit_cursor ( & mut self , object : * mut zwp_text_input_v2 , index : i32 ) { } # [ doc = "commit\n\nNotify when text should be inserted into the editor widget. The text to\ncommit could be either just a single character after a key press or the\nresult of some composing (pre-edit). It could be also an empty text\nwhen some text should be removed (see delete_surrounding_text) or when\nthe input cursor should be moved (see cursor_position).\n\nAny previously set composing text should be removed." ] fn commit_string ( & mut self , object : * mut zwp_text_input_v2 , text : * mut c_char ) { } # [ doc = "set cursor to new position\n\nNotify when the cursor or anchor position should be modified.\n\nThis event should be handled as part of a following commit_string\nevent.\n\nThe text between anchor and index should be selected." ] fn cursor_position ( & mut self , object : * mut zwp_text_input_v2 , index : i32 , anchor : i32 ) { } # [ doc = "delete surrounding text\n\nNotify when the text around the current cursor position should be\ndeleted. BeforeLength and afterLength is the length (in bytes) of text\nbefore and after the current cursor position (excluding the selection)\nto delete.\n\nThis event should be handled as part of a following commit_string\nor preedit_string event." ] fn delete_surrounding_text ( & mut self , object : * mut zwp_text_input_v2 , before_length : u32 , after_length : u32 ) { } # [ doc = "modifiers map\n\nTransfer an array of 0-terminated modifiers names. The position in\nthe array is the index of the modifier as used in the modifiers\nbitmask in the keysym event." ] fn modifiers_map ( & mut self , object : * mut zwp_text_input_v2 , map : * mut wl_array ) { } # [ doc = "keysym\n\nNotify when a key event was sent. Key events should not be used\nfor normal text input operations, which should be done with\ncommit_string, delete_surrounding_text, etc. The key event follows\nthe wl_keyboard key event convention. Sym is a XKB keysym, state a\nwl_keyboard key_state. Modifiers are a mask for effective modifiers\n(where the modifier indices are set by the modifiers_map event)" ] fn keysym ( & mut self , object : * mut zwp_text_input_v2 , time : u32 , sym : u32 , state : u32 , modifiers : u32 ) { } # [ doc = "language\n\nSets the language of the input text. The \"language\" argument is a RFC-3066\nformat language tag." ] fn language ( & mut self , object : * mut zwp_text_input_v2 , language : * mut c_char ) { } # [ doc = "text direction\n\nSets the text direction of input text.\n\nIt is mainly needed for showing input cursor on correct side of the\neditor when there is no input yet done and making sure neutral\ndirection text is laid out properly." ] fn text_direction ( & mut self , object : * mut zwp_text_input_v2 , direction : text_direction ) { } # [ doc = "configure amount of surrounding text to be sent\n\nConfigure what amount of surrounding text is expected by the\ninput method. The surrounding text will be sent in the\nset_surrounding_text request on the following state information updates." ] fn configure_surrounding_text ( & mut self , object : * mut zwp_text_input_v2 , before_cursor : i32 , after_cursor : i32 ) { } # [ doc = "Notifies about a changed input method\n\nThe input method changed on compositor side, which invalidates all\ncurrent state information. New state information should be sent from\nthe client via state requests (set_surrounding_text,\nset_content_hint, ...) and update_state." ] fn input_method_changed ( & mut self , object : * mut zwp_text_input_v2 , serial : u32 , flags : u32 ) { } } pub unsafe fn zwp_text_input_v2_set_user_data ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_text_input_v2 as _ , user_data ) ; } pub unsafe fn zwp_text_input_v2_get_user_data ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_text_input_v2 as _ ) ; } pub unsafe fn zwp_text_input_v2_get_version ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_text_input_v2 as _ ) ; } pub unsafe fn zwp_text_input_v2_add_listener ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_text_input_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_text_input_v2_add_rust_listener ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , listener : & dyn zwp_text_input_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_text_input_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_text_input_v2_add_listener ( zwp_text_input_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "Destroy the wp_text_input\n\nDestroy the wp_text_input object. Also disables all surfaces enabled\nthrough this wp_text_input object" ] pub unsafe fn zwp_text_input_v2_destroy ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_text_input_v2 as _ ) ; } # [ doc = "enable text input for surface\n\nEnable text input in a surface (usually when a text entry inside of it\nhas focus).\n\nThis can be called before or after a surface gets text (or keyboard)\nfocus via the enter event. Text input to a surface is only active\nwhen it has the current text (or keyboard) focus and is enabled." ] pub unsafe fn zwp_text_input_v2_enable ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "disable text input for surface\n\nDisable text input in a surface (typically when there is no focus on any\ntext entry inside the surface)." ] pub unsafe fn zwp_text_input_v2_disable ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 2u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "show input panels\n\nRequests input panels (virtual keyboard) to show.\n\nThis should be used for example to show a virtual keyboard again\n(with a tap) after it was closed by pressing on a close button on the\nkeyboard." ] pub unsafe fn zwp_text_input_v2_show_input_panel ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "hide input panels\n\nRequests input panels (virtual keyboard) to hide." ] pub unsafe fn zwp_text_input_v2_hide_input_panel ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 4u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets the surrounding text\n\nSets the plain surrounding text around the input position. Text is\nUTF-8 encoded. Cursor is the byte offset within the surrounding text.\nAnchor is the byte offset of the selection anchor within the\nsurrounding text. If there is no selected text, anchor is the same as\ncursor.\n\nMake sure to always send some text before and after the cursor\nexcept when the cursor is at the beginning or end of text.\n\nWhen there was a configure_surrounding_text event take the\nbefore_cursor and after_cursor arguments into account for picking how\nmuch surrounding text to send.\n\nThere is a maximum length of wayland messages so text can not be\nlonger than 4000 bytes." ] pub unsafe fn zwp_text_input_v2_set_surrounding_text ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , text : * const c_char , cursor : i32 , anchor : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 5u32 , text , cursor , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set content purpose and hint\n\nSets the content purpose and content hint. While the purpose is the\nbasic purpose of an input field, the hint flags allow to modify some\nof the behavior.\n\nWhen no content type is explicitly set, a normal content purpose with\nnone hint should be assumed." ] pub unsafe fn zwp_text_input_v2_set_content_type ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , hint : u32 , purpose : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 6u32 , hint , purpose , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set cursor position\n\nSets the cursor outline as a x, y, width, height rectangle in surface\nlocal coordinates.\n\nAllows the compositor to put a window with word suggestions near the\ncursor." ] pub unsafe fn zwp_text_input_v2_set_cursor_rectangle ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 7u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets preferred language\n\nSets a specific language. This allows for example a virtual keyboard to\nshow a language specific layout. The \"language\" argument is a RFC-3066\nformat language tag.\n\nIt could be used for example in a word processor to indicate language of\ncurrently edited document or in an instant message application which\ntracks languages of contacts." ] pub unsafe fn zwp_text_input_v2_set_preferred_language ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , language : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 8u32 , language , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "update state\n\nAllows to atomically send state updates from client.\n\nThis request should follow after a batch of state updating requests\nlike set_surrounding_text, set_content_type, set_cursor_rectangle and\nset_preferred_language.\n\nThe flags field indicates why an updated state is sent to the input\nmethod.\n\nReset should be used by an editor widget after the text was changed\noutside of the normal input method flow.\n\nFor \"change\" it is enough to send the changed state, else the full\nstate should be send.\n\nSerial should be set to the serial from the last enter or\ninput_method_changed event.\n\nTo make sure to not receive outdated input method events after a\nreset or switching to a new widget wl_display_sync() should be used\nafter update_state in these cases." ] pub unsafe fn zwp_text_input_v2_update_state ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , serial : u32 , reason : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 9u32 , serial , reason , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "text input manager\n\nA factory for text-input objects. This object is a global singleton." ] pub mod zwp_text_input_manager_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_text_input_manager_v2 { } static mut zwp_text_input_manager_v2_requests_get_text_input_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_text_input_v2 :: zwp_text_input_v2_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_manager_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_text_input\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_manager_v2_requests_get_text_input_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_text_input_manager_v2_interface : wl_interface = wl_interface { name : b"zwp_text_input_manager_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_text_input_manager_v2_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_text_input_manager_v2_listener { } pub unsafe fn zwp_text_input_manager_v2_set_user_data ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_text_input_manager_v2 as _ , user_data ) ; } pub unsafe fn zwp_text_input_manager_v2_get_user_data ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_text_input_manager_v2 as _ ) ; } pub unsafe fn zwp_text_input_manager_v2_get_version ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_text_input_manager_v2 as _ ) ; } pub unsafe fn zwp_text_input_manager_v2_add_listener ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_text_input_manager_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_text_input_manager_v2_add_rust_listener ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 , listener : & dyn zwp_text_input_manager_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_text_input_manager_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_text_input_manager_v2_add_listener ( zwp_text_input_manager_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "Destroy the wp_text_input_manager\n\nDestroy the wp_text_input_manager object." ] pub unsafe fn zwp_text_input_manager_v2_destroy ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_manager_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_text_input_manager_v2 as _ ) ; } # [ doc = "create a new text input object\n\nCreates a new text-input object for a given seat." ] pub unsafe fn zwp_text_input_manager_v2_get_text_input ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_text_input_manager_v2 as _ , 1u32 , & super :: zwp_text_input_v2 :: zwp_text_input_v2_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat ) ; return r as _ ; } } } pub mod org_kde_kwin_outputdevice { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "output configuration representation\n\nAn outputdevice describes a display device available to the compositor.\noutputdevice is similar to wl_output, but focuses on output\nconfiguration management.\n\nA client can query all global outputdevice objects to enlist all\navailable display devices, even those that may currently not be\nrepresented by the compositor as a wl_output.\n\nThe client sends configuration changes to the server through the\noutputconfiguration interface, and the server applies the configuration\nchanges to the hardware and signals changes to the outputdevices\naccordingly.\n\nThis object is published as global during start up for every available\ndisplay devices, or when one later becomes available, for example by\nbeing hotplugged via a physical connector." ] pub mod org_kde_kwin_outputdevice { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_outputdevice { } # [ doc = "subpixel geometry information\n\nThis enumeration describes how the physical pixels on an output are\nlaid out." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum subpixel { unknown = 0 , none = 1 , horizontal_rgb = 2 , horizontal_bgr = 3 , vertical_rgb = 4 , vertical_bgr = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl subpixel { pub fn from_raw ( n : u32 ) -> Option < subpixel > { match n { 0 => Some ( subpixel :: unknown ) , 1 => Some ( subpixel :: none ) , 2 => Some ( subpixel :: horizontal_rgb ) , 3 => Some ( subpixel :: horizontal_bgr ) , 4 => Some ( subpixel :: vertical_rgb ) , 5 => Some ( subpixel :: vertical_bgr ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "transform from framebuffer to output\n\nThis describes the transform, that a compositor will apply to a\nsurface to compensate for the rotation or mirroring of an\noutput device.\n\nThe flipped values correspond to an initial flip around a\nvertical axis followed by rotation.\n\nThe purpose is mainly to allow clients to render accordingly and\ntell the compositor, so that for fullscreen surfaces, the\ncompositor is still able to scan out directly client surfaces." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum transform { normal = 0 , _90 = 1 , _180 = 2 , _270 = 3 , flipped = 4 , flipped_90 = 5 , flipped_180 = 6 , flipped_270 = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl transform { pub fn from_raw ( n : u32 ) -> Option < transform > { match n { 0 => Some ( transform :: normal ) , 1 => Some ( transform :: _90 ) , 2 => Some ( transform :: _180 ) , 3 => Some ( transform :: _270 ) , 4 => Some ( transform :: flipped ) , 5 => Some ( transform :: flipped_90 ) , 6 => Some ( transform :: flipped_180 ) , 7 => Some ( transform :: flipped_270 ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "mode information\n\nThese flags describe properties of an output mode. They are\nused in the flags bitfield of the mode event." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum mode { # [ doc = "indicates this is the current mode" ] current = 1 , # [ doc = "indicates this is the preferred mode" ] preferred = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl mode { pub fn from_raw ( n : u32 ) -> Option < mode > { match n { 1 => Some ( mode :: current ) , 2 => Some ( mode :: preferred ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "describes enabled state\n\nDescribes whether a device is enabled, i.e. device is used to\ndisplay content by the compositor. This wraps a boolean around\nan int to avoid a boolean trap." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum enablement { disabled = 0 , enabled = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl enablement { pub fn from_raw ( n : u32 ) -> Option < enablement > { match n { 0 => Some ( enablement :: disabled ) , 1 => Some ( enablement :: enabled ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { # [ doc = "describes capabilities of the outputdevice\n\nDescribes what capabilities this device has." ] pub struct capability : u32 { # [ doc = "if this outputdevice can use overscan" ] const overscan = 1 ; # [ doc = "if this outputdevice supports variable refresh rate" ] const vrr = 2 ; } } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { Some ( capability :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = "describes vrr policy\n\nDescribes when the compositor may employ variable refresh rate" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum vrr_policy { never = 0 , always = 1 , automatic = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl vrr_policy { pub fn from_raw ( n : u32 ) -> Option < vrr_policy > { match n { 0 => Some ( vrr_policy :: never ) , 1 => Some ( vrr_policy :: always ) , 2 => Some ( vrr_policy :: automatic ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_outputdevice_events : [ wl_message ; 14 ] = [ wl_message { name : b"geometry\0" as * const u8 as * const c_char , signature : b"iiiiissi\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"uiiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"scale\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"edid\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"enabled\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"uuid\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"scalef\0" as * const u8 as * const c_char , signature : b"2f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"colorcurves\0" as * const u8 as * const c_char , signature : b"2aaa\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"serial_number\0" as * const u8 as * const c_char , signature : b"2s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"eisa_id\0" as * const u8 as * const c_char , signature : b"2s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"overscan\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"vrr_policy\0" as * const u8 as * const c_char , signature : b"4u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_outputdevice_interface : wl_interface = wl_interface { name : b"org_kde_kwin_outputdevice\0" as * const u8 as * const c_char , version : 4 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 14 , events : unsafe { & org_kde_kwin_outputdevice_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_outputdevice_listener { # [ doc = "geometric properties of the output\n\nThe geometry event describes geometric properties of the output.\nThe event is sent when binding to the output object and whenever\nany of the properties change." ] fn geometry ( & mut self , object : * mut org_kde_kwin_outputdevice , x : i32 , y : i32 , physical_width : i32 , physical_height : i32 , subpixel : i32 , make : * mut c_char , model : * mut c_char , transform : i32 ) { } # [ doc = "advertise available output modes and current one\n\nThe mode event describes an available mode for the output.\n\nWhen the client binds to the outputdevice object, the server sends this\nevent once for every available mode the outputdevice can be operated by.\n\nThere will always be at least one event sent out on initial binding,\nwhich represents the current mode.\n\nLater on if an output changes its mode the event is sent again, whereby\nthis event represents the mode that has now become current. In other\nwords, the current mode is always represented by the latest event sent\nwith the current flag set.\n\nThe size of a mode is given in physical hardware units of the output device.\nThis is not necessarily the same as the output size in the global compositor\nspace. For instance, the output may be scaled, as described in\norg_kde_kwin_outputdevice.scale, or transformed, as described in\norg_kde_kwin_outputdevice.transform.\n\nThe id can be used to refer to a mode when calling set_mode on an\norg_kde_kwin_outputconfiguration object." ] fn mode ( & mut self , object : * mut org_kde_kwin_outputdevice , flags : u32 , width : i32 , height : i32 , refresh : i32 , mode_id : i32 ) { } # [ doc = "sent all information about output\n\nThis event is sent after all other properties have been\nsent on binding to the output object as well as after any\nother output property change have been applied later on.\nThis allows to see changes to the output properties as atomic,\neven if multiple events successively announce them." ] fn done ( & mut self , object : * mut org_kde_kwin_outputdevice , ) { } # [ doc = "output scaling properties\n\nThis event contains scaling geometry information\nthat is not in the geometry event. It may be sent after\nbinding the output object or if the output scale changes\nlater. If it is not sent, the client should assume a\nscale of 1.\n\nA scale larger than 1 means that the compositor will\nautomatically scale surface buffers by this amount\nwhen rendering. This is used for high resolution\ndisplays where applications rendering at the native\nresolution would be too small to be legible.\n\nIt is intended that scaling aware clients track the\ncurrent output of a surface, and if it is on a scaled\noutput it should use wl_surface.set_buffer_scale with\nthe scale of the output. That way the compositor can\navoid scaling the surface, and the client can supply\na higher detail image." ] fn scale ( & mut self , object : * mut org_kde_kwin_outputdevice , factor : i32 ) { } # [ doc = "advertise EDID data for the output\n\nThe edid event encapsulates the EDID data for the outputdevice.\n\nThe event is sent when binding to the output object. The EDID\ndata may be empty, in which case this event is sent anyway.\nIf the EDID information is empty, you can fall back to the name\net al. properties of the outputdevice." ] fn edid ( & mut self , object : * mut org_kde_kwin_outputdevice , raw : * mut c_char ) { } # [ doc = "output is enabled or disabled\n\nThe enabled event notifies whether this output is currently\nenabled and used for displaying content by the server.\nThe event is sent when binding to the output object and\nwhenever later on an output changes its state by becoming\nenabled or disabled." ] fn enabled ( & mut self , object : * mut org_kde_kwin_outputdevice , enabled : i32 ) { } # [ doc = "A unique id for this outputdevice\n\nThe uuid can be used to identify the output. It's controlled by\nthe server entirely. The server should make sure the uuid is\npersistent across restarts. An empty uuid is considered invalid." ] fn uuid ( & mut self , object : * mut org_kde_kwin_outputdevice , uuid : * mut c_char ) { } # [ doc = "output scaling properties\n\nThis event contains scaling geometry information\nthat is not in the geometry event. It may be sent after\nbinding the output object or if the output scale changes\nlater. If it is not sent, the client should assume a\nscale of 1.\n\nA scale larger than 1 means that the compositor will\nautomatically scale surface buffers by this amount\nwhen rendering. This is used for high resolution\ndisplays where applications rendering at the native\nresolution would be too small to be legible.\n\nIt is intended that scaling aware clients track the\ncurrent output of a surface, and if it is on a scaled\noutput it should use wl_surface.set_buffer_scale with\nthe scale of the output. That way the compositor can\navoid scaling the surface, and the client can supply\na higher detail image.\n\nwl_output will keep the output scale as an integer. In every situation except\nconfiguring the window manager you want to use that.\n\nOnly available since version 2 of the interface." ] fn scalef ( & mut self , object : * mut org_kde_kwin_outputdevice , factor : wl_fixed_t ) { } # [ doc = "output color curves\n\nDescribes the color intensity profile of the output.\nCommonly used for gamma/color correction.\n\nThe array contains all color ramp values of the output.\nFor example on 8bit screens there are 256 of them.\n\nThe array elements are unsigned 16bit integers.\n\nOnly available since version 2 of the interface." ] fn colorcurves ( & mut self , object : * mut org_kde_kwin_outputdevice , red : * mut wl_array , green : * mut wl_array , blue : * mut wl_array ) { } # [ doc = "Serial Number\n\nSerial ID of the monitor, sent on startup before the first done event.\n\nOnly available since version 2 of the interface." ] fn serial_number ( & mut self , object : * mut org_kde_kwin_outputdevice , serialNumber : * mut c_char ) { } # [ doc = "EISA ID\n\nEISA ID of the monitor, sent on startup before the first done event.\n\nOnly available since version 2 of the interface." ] fn eisa_id ( & mut self , object : * mut org_kde_kwin_outputdevice , eisaId : * mut c_char ) { } # [ doc = "capability flags\n\nWhat capabilities this device has, sent on startup before the first\ndone event.\n\nOnly available since version 3 of the interface." ] fn capabilities ( & mut self , object : * mut org_kde_kwin_outputdevice , flags : capability ) { } # [ doc = "overscan\n\nOverscan value of the monitor in percent, sent on startup before the\nfirst done event.\n\nOnly available since version 3 of the interface." ] fn overscan ( & mut self , object : * mut org_kde_kwin_outputdevice , overscan : u32 ) { } # [ doc = "Variable Refresh Rate Policy\n\nWhat policy the compositor will employ regarding its use of variable\nrefresh rate.\n\nOnly available since version 4 of the interface." ] fn vrr_policy ( & mut self , object : * mut org_kde_kwin_outputdevice , vrr_policy : vrr_policy ) { } } pub unsafe fn org_kde_kwin_outputdevice_set_user_data ( org_kde_kwin_outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_outputdevice as _ , user_data ) ; } pub unsafe fn org_kde_kwin_outputdevice_get_user_data ( org_kde_kwin_outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_outputdevice as _ ) ; } pub unsafe fn org_kde_kwin_outputdevice_get_version ( org_kde_kwin_outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_outputdevice as _ ) ; } pub unsafe fn org_kde_kwin_outputdevice_add_listener ( org_kde_kwin_outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_outputdevice as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_outputdevice_add_rust_listener ( org_kde_kwin_outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , listener : & dyn org_kde_kwin_outputdevice_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_outputdevice_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_outputdevice_add_listener ( org_kde_kwin_outputdevice as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_outputdevice_destroy ( org_kde_kwin_outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_outputdevice as _ ) ; } } } pub mod xwayland_keyboard_grab_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "context object for keyboard grab manager\n\nA global interface used for grabbing the keyboard." ] pub mod zwp_xwayland_keyboard_grab_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_xwayland_keyboard_grab_manager_v1 { } static mut zwp_xwayland_keyboard_grab_manager_v1_requests_grab_keyboard_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_xwayland_keyboard_grab_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"grab_keyboard\0" as * const u8 as * const c_char , signature : b"noo\0" as * const u8 as * const c_char , types : unsafe { & zwp_xwayland_keyboard_grab_manager_v1_requests_grab_keyboard_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_xwayland_keyboard_grab_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_xwayland_keyboard_grab_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_xwayland_keyboard_grab_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_xwayland_keyboard_grab_manager_v1_listener { } pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_set_user_data ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_xwayland_keyboard_grab_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_get_user_data ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_xwayland_keyboard_grab_manager_v1 as _ ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_get_version ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_xwayland_keyboard_grab_manager_v1 as _ ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_add_listener ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_xwayland_keyboard_grab_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_add_rust_listener ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 , listener : & dyn zwp_xwayland_keyboard_grab_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_xwayland_keyboard_grab_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_xwayland_keyboard_grab_manager_v1_add_listener ( zwp_xwayland_keyboard_grab_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the keyboard grab manager\n\nDestroy the keyboard grab manager." ] pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_destroy ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_xwayland_keyboard_grab_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_xwayland_keyboard_grab_manager_v1 as _ ) ; } # [ doc = "grab the keyboard to a surface\n\nThe grab_keyboard request asks for a grab of the keyboard, forcing\nthe keyboard focus for the given seat upon the given surface.\n\nThe protocol provides no guarantee that the grab is ever satisfied,\nand does not require the compositor to send an error if the grab\ncannot ever be satisfied. It is thus possible to request a keyboard\ngrab that will never be effective.\n\nThe protocol:\n\n* does not guarantee that the grab itself is applied for a surface,\nthe grab request may be silently ignored by the compositor,\n* does not guarantee that any events are sent to this client even\nif the grab is applied to a surface,\n* does not guarantee that events sent to this client are exhaustive,\na compositor may filter some events for its own consumption,\n* does not guarantee that events sent to this client are continuous,\na compositor may change and reroute keyboard events while the grab\nis nominally active." ] pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_grab_keyboard ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 , surface : * mut super :: wl_surface :: wl_surface , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_xwayland_keyboard_grab_manager_v1 as _ , 1u32 , & super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface , seat ) ; return r as _ ; } } # [ doc = "interface for grabbing the keyboard\n\nA global interface used for grabbing the keyboard." ] pub mod zwp_xwayland_keyboard_grab_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_xwayland_keyboard_grab_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_xwayland_keyboard_grab_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_xwayland_keyboard_grab_v1_interface : wl_interface = wl_interface { name : b"zwp_xwayland_keyboard_grab_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_xwayland_keyboard_grab_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_xwayland_keyboard_grab_v1_listener { } pub unsafe fn zwp_xwayland_keyboard_grab_v1_set_user_data ( zwp_xwayland_keyboard_grab_v1 : * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_xwayland_keyboard_grab_v1 as _ , user_data ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_v1_get_user_data ( zwp_xwayland_keyboard_grab_v1 : * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_xwayland_keyboard_grab_v1 as _ ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_v1_get_version ( zwp_xwayland_keyboard_grab_v1 : * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_xwayland_keyboard_grab_v1 as _ ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_v1_add_listener ( zwp_xwayland_keyboard_grab_v1 : * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_xwayland_keyboard_grab_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_v1_add_rust_listener ( zwp_xwayland_keyboard_grab_v1 : * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 , listener : & dyn zwp_xwayland_keyboard_grab_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_xwayland_keyboard_grab_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_xwayland_keyboard_grab_v1_add_listener ( zwp_xwayland_keyboard_grab_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the grabbed keyboard object\n\nDestroy the grabbed keyboard object. If applicable, the compositor\nwill ungrab the keyboard." ] pub unsafe fn zwp_xwayland_keyboard_grab_v1_destroy ( zwp_xwayland_keyboard_grab_v1 : * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_xwayland_keyboard_grab_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_xwayland_keyboard_grab_v1 as _ ) ; } } } pub mod xdg_foreign_unstable_v2 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "interface for exporting surfaces\n\nA global interface used for exporting surfaces that can later be imported\nusing xdg_importer." ] pub mod zxdg_exporter_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_exporter_v2 { } # [ doc = "error values\n\nThese errors can be emitted in response to invalid xdg_exporter\nrequests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "surface is not an xdg_toplevel" ] invalid_surface = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_surface ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zxdg_exporter_v2_requests_export_toplevel_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_exported_v2 :: zxdg_exported_v2_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_exporter_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"export_toplevel\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zxdg_exporter_v2_requests_export_toplevel_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_exporter_v2_interface : wl_interface = wl_interface { name : b"zxdg_exporter_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_exporter_v2_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_exporter_v2_listener { } pub unsafe fn zxdg_exporter_v2_set_user_data ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_exporter_v2 as _ , user_data ) ; } pub unsafe fn zxdg_exporter_v2_get_user_data ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_exporter_v2 as _ ) ; } pub unsafe fn zxdg_exporter_v2_get_version ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_exporter_v2 as _ ) ; } pub unsafe fn zxdg_exporter_v2_add_listener ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_exporter_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_exporter_v2_add_rust_listener ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 , listener : & dyn zxdg_exporter_v2_listener ) -> bool { let to = ( listener as * const dyn zxdg_exporter_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_exporter_v2_add_listener ( zxdg_exporter_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_exporter object\n\nNotify the compositor that the xdg_exporter object will no longer be\nused." ] pub unsafe fn zxdg_exporter_v2_destroy ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_exporter_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_exporter_v2 as _ ) ; } # [ doc = "export a toplevel surface\n\nThe export_toplevel request exports the passed surface so that it can later be\nimported via xdg_importer. When called, a new xdg_exported object will\nbe created and xdg_exported.handle will be sent immediately. See the\ncorresponding interface and event for details.\n\nA surface may be exported multiple times, and each exported handle may\nbe used to create an xdg_imported multiple times. Only xdg_toplevel\nequivalent surfaces may be exported, otherwise an invalid_surface\nprotocol error is sent." ] pub unsafe fn zxdg_exporter_v2_export_toplevel ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_exporter_v2 as _ , 1u32 , & super :: zxdg_exported_v2 :: zxdg_exported_v2_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "interface for importing surfaces\n\nA global interface used for importing surfaces exported by xdg_exporter.\nWith this interface, a client can create a reference to a surface of\nanother client." ] pub mod zxdg_importer_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_importer_v2 { } static mut zxdg_importer_v2_requests_import_toplevel_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_imported_v2 :: zxdg_imported_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_importer_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"import_toplevel\0" as * const u8 as * const c_char , signature : b"ns\0" as * const u8 as * const c_char , types : unsafe { & zxdg_importer_v2_requests_import_toplevel_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_importer_v2_interface : wl_interface = wl_interface { name : b"zxdg_importer_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_importer_v2_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_importer_v2_listener { } pub unsafe fn zxdg_importer_v2_set_user_data ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_importer_v2 as _ , user_data ) ; } pub unsafe fn zxdg_importer_v2_get_user_data ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_importer_v2 as _ ) ; } pub unsafe fn zxdg_importer_v2_get_version ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_importer_v2 as _ ) ; } pub unsafe fn zxdg_importer_v2_add_listener ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_importer_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_importer_v2_add_rust_listener ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 , listener : & dyn zxdg_importer_v2_listener ) -> bool { let to = ( listener as * const dyn zxdg_importer_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_importer_v2_add_listener ( zxdg_importer_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_importer object\n\nNotify the compositor that the xdg_importer object will no longer be\nused." ] pub unsafe fn zxdg_importer_v2_destroy ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_importer_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_importer_v2 as _ ) ; } # [ doc = "import a toplevel surface\n\nThe import_toplevel request imports a surface from any client given a handle\nretrieved by exporting said surface using xdg_exporter.export_toplevel.\nWhen called, a new xdg_imported object will be created. This new object\nrepresents the imported surface, and the importing client can\nmanipulate its relationship using it. See xdg_imported for details." ] pub unsafe fn zxdg_importer_v2_import_toplevel ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 , handle : * const c_char ) -> * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_importer_v2 as _ , 1u32 , & super :: zxdg_imported_v2 :: zxdg_imported_v2_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , handle ) ; return r as _ ; } } # [ doc = "an exported surface handle\n\nAn xdg_exported object represents an exported reference to a surface. The\nexported surface may be referenced as long as the xdg_exported object not\ndestroyed. Destroying the xdg_exported invalidates any relationship the\nimporter may have established using xdg_imported." ] pub mod zxdg_exported_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_exported_v2 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_exported_v2_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_exported_v2_events : [ wl_message ; 1 ] = [ wl_message { name : b"handle\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_exported_v2_interface : wl_interface = wl_interface { name : b"zxdg_exported_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zxdg_exported_v2_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_exported_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_exported_v2_listener { # [ doc = "the exported surface handle\n\nThe handle event contains the unique handle of this exported surface\nreference. It may be shared with any client, which then can use it to\nimport the surface by calling xdg_importer.import_toplevel. A handle\nmay be used to import the surface multiple times." ] fn handle ( & mut self , object : * mut zxdg_exported_v2 , handle : * mut c_char ) { } } pub unsafe fn zxdg_exported_v2_set_user_data ( zxdg_exported_v2 : * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_exported_v2 as _ , user_data ) ; } pub unsafe fn zxdg_exported_v2_get_user_data ( zxdg_exported_v2 : * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_exported_v2 as _ ) ; } pub unsafe fn zxdg_exported_v2_get_version ( zxdg_exported_v2 : * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_exported_v2 as _ ) ; } pub unsafe fn zxdg_exported_v2_add_listener ( zxdg_exported_v2 : * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_exported_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_exported_v2_add_rust_listener ( zxdg_exported_v2 : * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 , listener : & dyn zxdg_exported_v2_listener ) -> bool { let to = ( listener as * const dyn zxdg_exported_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_exported_v2_add_listener ( zxdg_exported_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "unexport the exported surface\n\nRevoke the previously exported surface. This invalidates any\nrelationship the importer may have set up using the xdg_imported created\ngiven the handle sent via xdg_exported.handle." ] pub unsafe fn zxdg_exported_v2_destroy ( zxdg_exported_v2 : * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_exported_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_exported_v2 as _ ) ; } } # [ doc = "an imported surface handle\n\nAn xdg_imported object represents an imported reference to surface exported\nby some client. A client can use this interface to manipulate\nrelationships between its own surfaces and the imported surface." ] pub mod zxdg_imported_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_imported_v2 { } # [ doc = "error values\n\nThese errors can be emitted in response to invalid xdg_imported\nrequests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "surface is not an xdg_toplevel" ] invalid_surface = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_surface ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zxdg_imported_v2_requests_set_parent_of_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_imported_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent_of\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zxdg_imported_v2_requests_set_parent_of_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_imported_v2_events : [ wl_message ; 1 ] = [ wl_message { name : b"destroyed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_imported_v2_interface : wl_interface = wl_interface { name : b"zxdg_imported_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_imported_v2_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_imported_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_imported_v2_listener { # [ doc = "the imported surface handle has been destroyed\n\nThe imported surface handle has been destroyed and any relationship set\nup has been invalidated. This may happen for various reasons, for\nexample if the exported surface or the exported surface handle has been\ndestroyed, if the handle used for importing was invalid." ] fn destroyed ( & mut self , object : * mut zxdg_imported_v2 , ) { } } pub unsafe fn zxdg_imported_v2_set_user_data ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_imported_v2 as _ , user_data ) ; } pub unsafe fn zxdg_imported_v2_get_user_data ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_imported_v2 as _ ) ; } pub unsafe fn zxdg_imported_v2_get_version ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_imported_v2 as _ ) ; } pub unsafe fn zxdg_imported_v2_add_listener ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_imported_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_imported_v2_add_rust_listener ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 , listener : & dyn zxdg_imported_v2_listener ) -> bool { let to = ( listener as * const dyn zxdg_imported_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_imported_v2_add_listener ( zxdg_imported_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_imported object\n\nNotify the compositor that it will no longer use the xdg_imported\nobject. Any relationship that may have been set up will at this point\nbe invalidated." ] pub unsafe fn zxdg_imported_v2_destroy ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_imported_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_imported_v2 as _ ) ; } # [ doc = "set as the parent of some surface\n\nSet the imported surface as the parent of some surface of the client.\nThe passed surface must be an xdg_toplevel equivalent, otherwise an\ninvalid_surface protocol error is sent. Calling this function sets up\na surface to surface relation with the same stacking and positioning\nsemantics as xdg_toplevel.set_parent." ] pub unsafe fn zxdg_imported_v2_set_parent_of ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_imported_v2 as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod xdg_decoration_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "window decoration manager\n\nThis interface allows a compositor to announce support for server-side\ndecorations.\n\nA window decoration is a set of window controls as deemed appropriate by\nthe party managing them, such as user interface components used to move,\nresize and change a window's state.\n\nA client can use this protocol to request being decorated by a supporting\ncompositor.\n\nIf compositor and client do not negotiate the use of a server-side\ndecoration using this protocol, clients continue to self-decorate as they\nsee fit.\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zxdg_decoration_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_decoration_manager_v1 { } static mut zxdg_decoration_manager_v1_requests_get_toplevel_decoration_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1_interface as * const wl_interface } , unsafe { & super :: xdg_toplevel :: xdg_toplevel_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_decoration_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_toplevel_decoration\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zxdg_decoration_manager_v1_requests_get_toplevel_decoration_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_decoration_manager_v1_interface : wl_interface = wl_interface { name : b"zxdg_decoration_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_decoration_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_decoration_manager_v1_listener { } pub unsafe fn zxdg_decoration_manager_v1_set_user_data ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_decoration_manager_v1 as _ , user_data ) ; } pub unsafe fn zxdg_decoration_manager_v1_get_user_data ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_decoration_manager_v1 as _ ) ; } pub unsafe fn zxdg_decoration_manager_v1_get_version ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_decoration_manager_v1 as _ ) ; } pub unsafe fn zxdg_decoration_manager_v1_add_listener ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_decoration_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_decoration_manager_v1_add_rust_listener ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 , listener : & dyn zxdg_decoration_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_decoration_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_decoration_manager_v1_add_listener ( zxdg_decoration_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the decoration manager object\n\nDestroy the decoration manager. This doesn't destroy objects created\nwith the manager." ] pub unsafe fn zxdg_decoration_manager_v1_destroy ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_decoration_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_decoration_manager_v1 as _ ) ; } # [ doc = "create a new toplevel decoration object\n\nCreate a new decoration object associated with the given toplevel.\n\nCreating an xdg_toplevel_decoration from an xdg_toplevel which has a\nbuffer attached or committed is a client error, and any attempts by a\nclient to attach or manipulate a buffer prior to the first\nxdg_toplevel_decoration.configure event must also be treated as\nerrors." ] pub unsafe fn zxdg_decoration_manager_v1_get_toplevel_decoration ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 , toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) -> * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_decoration_manager_v1 as _ , 1u32 , & super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , toplevel ) ; return r as _ ; } } # [ doc = "decoration object for a toplevel surface\n\nThe decoration object allows the compositor to toggle server-side window\ndecorations for a toplevel surface. The client can request to switch to\nanother mode.\n\nThe xdg_toplevel_decoration object must be destroyed before its\nxdg_toplevel." ] pub mod zxdg_toplevel_decoration_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_toplevel_decoration_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "xdg_toplevel has a buffer attached before configure" ] unconfigured_buffer = 0 , # [ doc = "xdg_toplevel already has a decoration object" ] already_constructed = 1 , # [ doc = "xdg_toplevel destroyed before the decoration object" ] orphaned = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: unconfigured_buffer ) , 1 => Some ( error :: already_constructed ) , 2 => Some ( error :: orphaned ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "window decoration modes\n\nThese values describe window decoration modes." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum mode { # [ doc = "no server-side window decoration" ] client_side = 1 , # [ doc = "server-side window decoration" ] server_side = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl mode { pub fn from_raw ( n : u32 ) -> Option < mode > { match n { 1 => Some ( mode :: client_side ) , 2 => Some ( mode :: server_side ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_toplevel_decoration_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_mode\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unset_mode\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_toplevel_decoration_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_toplevel_decoration_v1_interface : wl_interface = wl_interface { name : b"zxdg_toplevel_decoration_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & zxdg_toplevel_decoration_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_toplevel_decoration_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_toplevel_decoration_v1_listener { # [ doc = "suggest a surface change\n\nThe configure event asks the client to change its decoration mode. The\nconfigured state should not be applied immediately. Clients must send an\nack_configure in response to this event. See xdg_surface.configure and\nxdg_surface.ack_configure for details.\n\nA configure event can be sent at any time. The specified mode must be\nobeyed by the client." ] fn configure ( & mut self , object : * mut zxdg_toplevel_decoration_v1 , mode : mode ) { } } pub unsafe fn zxdg_toplevel_decoration_v1_set_user_data ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_toplevel_decoration_v1 as _ , user_data ) ; } pub unsafe fn zxdg_toplevel_decoration_v1_get_user_data ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_toplevel_decoration_v1 as _ ) ; } pub unsafe fn zxdg_toplevel_decoration_v1_get_version ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_toplevel_decoration_v1 as _ ) ; } pub unsafe fn zxdg_toplevel_decoration_v1_add_listener ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_toplevel_decoration_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_toplevel_decoration_v1_add_rust_listener ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 , listener : & dyn zxdg_toplevel_decoration_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_toplevel_decoration_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_toplevel_decoration_v1_add_listener ( zxdg_toplevel_decoration_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the decoration object\n\nSwitch back to a mode without any server-side decorations at the next\ncommit." ] pub unsafe fn zxdg_toplevel_decoration_v1_destroy ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_decoration_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_toplevel_decoration_v1 as _ ) ; } # [ doc = "set the decoration mode\n\nSet the toplevel surface decoration mode. This informs the compositor\nthat the client prefers the provided decoration mode.\n\nAfter requesting a decoration mode, the compositor will respond by\nemitting an xdg_surface.configure event. The client should then update\nits content, drawing it without decorations if the received mode is\nserver-side decorations. The client must also acknowledge the configure\nwhen committing the new content (see xdg_surface.ack_configure).\n\nThe compositor can decide not to use the client's mode and enforce a\ndifferent mode instead.\n\nClients whose decoration mode depend on the xdg_toplevel state may send\na set_mode request in response to an xdg_surface.configure event and wait\nfor the next xdg_surface.configure event to prevent unwanted state.\nSuch clients are responsible for preventing configure loops and must\nmake sure not to send multiple successive set_mode requests with the\nsame decoration mode." ] pub unsafe fn zxdg_toplevel_decoration_v1_set_mode ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 , mode : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_decoration_v1 as _ , 1u32 , mode , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "unset the decoration mode\n\nUnset the toplevel surface decoration mode. This informs the compositor\nthat the client doesn't prefer a particular decoration mode.\n\nThis request has the same semantics as set_mode." ] pub unsafe fn zxdg_toplevel_decoration_v1_unset_mode ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_decoration_v1 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod drm_lease_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "lease device\n\nThis protocol is used by Wayland compositors which act as Direct\nRenderering Manager (DRM) masters to lease DRM resources to Wayland\nclients.\n\nThe compositor will advertise one wp_drm_lease_device_v1 global for each\nDRM node. Some time after a client binds to the wp_drm_lease_device_v1\nglobal, the compositor will send a drm_fd event followed by zero, one or\nmore connector events. After all currently available connectors have been\nsent, the compositor will send a wp_drm_lease_device_v1.done event.\n\nWhen the list of connectors available for lease changes the compositor\nwill send wp_drm_lease_device_v1.connector events for added connectors and\nwp_drm_lease_connector_v1.withdrawn events for removed connectors,\nfollowed by a wp_drm_lease_device_v1.done event.\n\nThe compositor will indicate when a device is gone by removing the global\nvia a wl_registry.global_remove event. Upon receiving this event, the\nclient should destroy any matching wp_drm_lease_device_v1 object.\n\nTo destroy a wp_drm_lease_device_v1 object, the client must first issue\na release request. Upon receiving this request, the compositor will\nimmediately send a released event and destroy the object. The client must\ncontinue to process and discard drm_fd and connector events until it\nreceives the released event. Upon receiving the released event, the\nclient can safely cleanup any client-side resources.\n\nWarning! The protocol described in this file is currently in the testing\nphase. Backward compatible changes may be added together with the\ncorresponding interface version bump. Backward incompatible changes can\nonly be done by creating a new major version of the extension." ] pub mod wp_drm_lease_device_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_drm_lease_device_v1 { } static mut wp_drm_lease_device_v1_requests_create_lease_request_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_device_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"create_lease_request\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wp_drm_lease_device_v1_requests_create_lease_request_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wp_drm_lease_device_v1_events_connector_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_device_v1_events : [ wl_message ; 4 ] = [ wl_message { name : b"drm_fd\0" as * const u8 as * const c_char , signature : b"h\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"connector\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wp_drm_lease_device_v1_events_connector_types as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"released\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_drm_lease_device_v1_interface : wl_interface = wl_interface { name : b"wp_drm_lease_device_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & wp_drm_lease_device_v1_requests as * const _ } , event_count : 4 , events : unsafe { & wp_drm_lease_device_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wp_drm_lease_device_v1_listener { # [ doc = "open a non-master fd for this DRM node\n\nThe compositor will send this event when the wp_drm_lease_device_v1\nglobal is bound, although there are no guarantees as to how long this\ntakes - the compositor might need to wait until regaining DRM master.\nThe included fd is a non-master DRM file descriptor opened for this\ndevice and the compositor must not authenticate it.\nThe purpose of this event is to give the client the ability to\nquery DRM and discover information which may help them pick the\nappropriate DRM device or select the appropriate connectors therein." ] fn drm_fd ( & mut self , object : * mut wp_drm_lease_device_v1 , fd : :: std :: os :: unix :: io :: RawFd ) { } # [ doc = "advertise connectors available for leases\n\nThe compositor will use this event to advertise connectors available for\nlease by clients. This object may be passed into a lease request to\nindicate the client would like to lease that connector, see\nwp_drm_lease_request_v1.request_connector for details. While the\ncompositor will make a best effort to not send disconnected connectors,\nno guarantees can be made.\n\nThe compositor must send the drm_fd event before sending connectors.\nAfter the drm_fd event it will send all available connectors but may\nsend additional connectors at any time." ] fn connector ( & mut self , object : * mut wp_drm_lease_device_v1 , id : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 ) { } # [ doc = "signals grouping of connectors\n\nThe compositor will send this event to indicate that it has sent all\ncurrently available connectors after the client binds to the global or\nwhen it updates the connector list, for example on hotplug, drm master\nchange or when a leased connector becomes available again. It will\nsimilarly send this event to group wp_drm_lease_connector_v1.withdrawn\nevents of connectors of this device." ] fn done ( & mut self , object : * mut wp_drm_lease_device_v1 , ) { } # [ doc = "the compositor has finished using the device\n\nThis event is sent in response to the release request and indicates\nthat the compositor is done sending connector events.\nThe compositor will destroy this object immediately after sending the\nevent and it will become invalid. The client should release any\nresources associated with this device after receiving this event." ] fn released ( & mut self , object : * mut wp_drm_lease_device_v1 , ) { } } pub unsafe fn wp_drm_lease_device_v1_set_user_data ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_drm_lease_device_v1 as _ , user_data ) ; } pub unsafe fn wp_drm_lease_device_v1_get_user_data ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_drm_lease_device_v1 as _ ) ; } pub unsafe fn wp_drm_lease_device_v1_get_version ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_drm_lease_device_v1 as _ ) ; } pub unsafe fn wp_drm_lease_device_v1_add_listener ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_drm_lease_device_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_drm_lease_device_v1_add_rust_listener ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 , listener : & dyn wp_drm_lease_device_v1_listener ) -> bool { let to = ( listener as * const dyn wp_drm_lease_device_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_drm_lease_device_v1_add_listener ( wp_drm_lease_device_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wp_drm_lease_device_v1_destroy ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_drm_lease_device_v1 as _ ) ; } # [ doc = "create a lease request object\n\nCreates a lease request object.\n\nSee the documentation for wp_drm_lease_request_v1 for details." ] pub unsafe fn wp_drm_lease_device_v1_create_lease_request ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 ) -> * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wp_drm_lease_device_v1 as _ , 0u32 , & super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "release this object\n\nIndicates the client no longer wishes to use this object. In response\nthe compositor will immediately send the released event and destroy\nthis object. It can however not guarantee that the client won't receive\nconnector events before the released event. The client must not send any\nrequests after this one, doing so will raise a wl_display error.\nExisting connectors, lease request and leases will not be affected." ] pub unsafe fn wp_drm_lease_device_v1_release ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_drm_lease_device_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "a leasable DRM connector\n\nRepresents a DRM connector which is available for lease. These objects are\ncreated via wp_drm_lease_device_v1.connector events, and should be passed\nto lease requests via wp_drm_lease_request_v1.request_connector.\nImmediately after the wp_drm_lease_connector_v1 object is created the\ncompositor will send a name, a description, a connector_id and a done\nevent. When the description is updated the compositor will send a\ndescription event followed by a done event." ] pub mod wp_drm_lease_connector_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_drm_lease_connector_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_connector_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_connector_v1_events : [ wl_message ; 5 ] = [ wl_message { name : b"name\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"description\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"connector_id\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"withdrawn\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_drm_lease_connector_v1_interface : wl_interface = wl_interface { name : b"wp_drm_lease_connector_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wp_drm_lease_connector_v1_requests as * const _ } , event_count : 5 , events : unsafe { & wp_drm_lease_connector_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wp_drm_lease_connector_v1_listener { # [ doc = "name\n\nThe compositor sends this event once the connector is created to\nindicate the name of this connector. This will not change for the\nduration of the Wayland session, but is not guaranteed to be consistent\nbetween sessions." ] fn name ( & mut self , object : * mut wp_drm_lease_connector_v1 , name : * mut c_char ) { } # [ doc = "description\n\nThe compositor sends this event once the connector is created to provide\na human-readable description for this connector, which may be presented\nto the user. The compositor may send this event multiple times over the\nlifetime of this object to reflect changes in the description." ] fn description ( & mut self , object : * mut wp_drm_lease_connector_v1 , description : * mut c_char ) { } # [ doc = "connector_id\n\nThe compositor sends this event once the connector is created to\nindicate the DRM object ID which represents the underlying connector\nthat is being offered. Note that the final lease may include additional\nobject IDs, such as CRTCs and planes." ] fn connector_id ( & mut self , object : * mut wp_drm_lease_connector_v1 , connector_id : u32 ) { } # [ doc = "all properties have been sent\n\nThis event is sent after all properties of a connector have been sent.\nThis allows changes to the properties to be seen as atomic even if they\nhappen via multiple events." ] fn done ( & mut self , object : * mut wp_drm_lease_connector_v1 , ) { } # [ doc = "lease offer withdrawn\n\nSent to indicate that the compositor will no longer honor requests for\nDRM leases which include this connector. The client may still issue a\nlease request including this connector, but the compositor will send\nwp_drm_lease_v1.finished without issuing a lease fd. Compositors are\nencouraged to send this event when they lose access to connector, for\nexample when the connector is hot-unplugged, when the connector gets\nleased to a client or when the compositor loses DRM master." ] fn withdrawn ( & mut self , object : * mut wp_drm_lease_connector_v1 , ) { } } pub unsafe fn wp_drm_lease_connector_v1_set_user_data ( wp_drm_lease_connector_v1 : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_drm_lease_connector_v1 as _ , user_data ) ; } pub unsafe fn wp_drm_lease_connector_v1_get_user_data ( wp_drm_lease_connector_v1 : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_drm_lease_connector_v1 as _ ) ; } pub unsafe fn wp_drm_lease_connector_v1_get_version ( wp_drm_lease_connector_v1 : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_drm_lease_connector_v1 as _ ) ; } pub unsafe fn wp_drm_lease_connector_v1_add_listener ( wp_drm_lease_connector_v1 : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_drm_lease_connector_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_drm_lease_connector_v1_add_rust_listener ( wp_drm_lease_connector_v1 : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 , listener : & dyn wp_drm_lease_connector_v1_listener ) -> bool { let to = ( listener as * const dyn wp_drm_lease_connector_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_drm_lease_connector_v1_add_listener ( wp_drm_lease_connector_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy connector\n\nThe client may send this request to indicate that it will not use this\nconnector. Clients are encouraged to send this after receiving the\n\"withdrawn\" event so that the server can release the resources\nassociated with this connector offer. Neither existing lease requests\nnor leases will be affected." ] pub unsafe fn wp_drm_lease_connector_v1_destroy ( wp_drm_lease_connector_v1 : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_drm_lease_connector_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_drm_lease_connector_v1 as _ ) ; } } # [ doc = "DRM lease request\n\nA client that wishes to lease DRM resources will attach the list of\nconnectors advertised with wp_drm_lease_device_v1.connector that they\nwish to lease, then use wp_drm_lease_request_v1.submit to submit the\nrequest." ] pub mod wp_drm_lease_request_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_drm_lease_request_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "requested a connector from a different lease device" ] wrong_device = 0 , # [ doc = "requested a connector twice" ] duplicate_connector = 1 , # [ doc = "requested a lease without requesting a connector" ] empty_lease = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: wrong_device ) , 1 => Some ( error :: duplicate_connector ) , 2 => Some ( error :: empty_lease ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wp_drm_lease_request_v1_requests_request_connector_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1_interface as * const wl_interface } , ] ; static mut wp_drm_lease_request_v1_requests_submit_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wp_drm_lease_v1 :: wp_drm_lease_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_request_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"request_connector\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wp_drm_lease_request_v1_requests_request_connector_types as * const _ } , } , wl_message { name : b"submit\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wp_drm_lease_request_v1_requests_submit_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_drm_lease_request_v1_interface : wl_interface = wl_interface { name : b"wp_drm_lease_request_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & wp_drm_lease_request_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wp_drm_lease_request_v1_listener { } pub unsafe fn wp_drm_lease_request_v1_set_user_data ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_drm_lease_request_v1 as _ , user_data ) ; } pub unsafe fn wp_drm_lease_request_v1_get_user_data ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_drm_lease_request_v1 as _ ) ; } pub unsafe fn wp_drm_lease_request_v1_get_version ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_drm_lease_request_v1 as _ ) ; } pub unsafe fn wp_drm_lease_request_v1_add_listener ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_drm_lease_request_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_drm_lease_request_v1_add_rust_listener ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 , listener : & dyn wp_drm_lease_request_v1_listener ) -> bool { let to = ( listener as * const dyn wp_drm_lease_request_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_drm_lease_request_v1_add_listener ( wp_drm_lease_request_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wp_drm_lease_request_v1_destroy ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_drm_lease_request_v1 as _ ) ; } # [ doc = "request a connector for this lease\n\nIndicates that the client would like to lease the given connector.\nThis is only used as a suggestion, the compositor may choose to\ninclude any resources in the lease it issues, or change the set of\nleased resources at any time. Compositors are however encouraged to\ninclude the requested connector and other resources necessary\nto drive the connected output in the lease.\n\nRequesting a connector that was created from a different lease device\nthan this lease request raises the wrong_device error. Requesting a\nconnector twice will raise the duplicate_connector error." ] pub unsafe fn wp_drm_lease_request_v1_request_connector ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 , connector : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_drm_lease_request_v1 as _ , 0u32 , connector , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "submit the lease request\n\nSubmits the lease request and creates a new wp_drm_lease_v1 object.\nAfter calling submit the compositor will immediately destroy this\nobject, issuing any more requests will cause a wl_diplay error.\nThe compositor doesn't make any guarantees about the events of the\nlease object, clients cannot expect an immediate response.\nNot requesting any connectors before submitting the lease request\nwill raise the empty_lease error." ] pub unsafe fn wp_drm_lease_request_v1_submit ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 ) -> * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wp_drm_lease_request_v1 as _ , 1u32 , & super :: wp_drm_lease_v1 :: wp_drm_lease_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_drm_lease_request_v1 as _ ) ; return r as _ ; } } # [ doc = "a DRM lease\n\nA DRM lease object is used to transfer the DRM file descriptor to the\nclient and manage the lifetime of the lease.\n\nSome time after the wp_drm_lease_v1 object is created, the compositor\nwill reply with the lease request's result. If the lease request is\ngranted, the compositor will send a lease_fd event. If the lease request\nis denied, the compositor will send a finished event without a lease_fd\nevent." ] pub mod wp_drm_lease_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_drm_lease_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"lease_fd\0" as * const u8 as * const c_char , signature : b"h\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"finished\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_drm_lease_v1_interface : wl_interface = wl_interface { name : b"wp_drm_lease_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wp_drm_lease_v1_requests as * const _ } , event_count : 2 , events : unsafe { & wp_drm_lease_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wp_drm_lease_v1_listener { # [ doc = "shares the DRM file descriptor\n\nThis event returns a file descriptor suitable for use with DRM-related\nioctls. The client should use drmModeGetLease to enumerate the DRM\nobjects which have been leased to them. The compositor guarantees it\nwill not use the leased DRM objects itself until it sends the finished\nevent. If the compositor cannot or will not grant a lease for the\nrequested connectors, it will not send this event, instead sending the\nfinished event.\n\nThe compositor will send this event at most once during this objects\nlifetime." ] fn lease_fd ( & mut self , object : * mut wp_drm_lease_v1 , leased_fd : :: std :: os :: unix :: io :: RawFd ) { } # [ doc = "sent when the lease has been revoked\n\nThe compositor uses this event to either reject a lease request, or if\nit previously sent a lease_fd, to notify the client that the lease has\nbeen revoked. If the client requires a new lease, they should destroy\nthis object and submit a new lease request. The compositor will send\nno further events for this object after sending the finish event.\nCompositors should revoke the lease when any of the leased resources\nbecome unavailable, namely when a hot-unplug occurs or when the\ncompositor loses DRM master." ] fn finished ( & mut self , object : * mut wp_drm_lease_v1 , ) { } } pub unsafe fn wp_drm_lease_v1_set_user_data ( wp_drm_lease_v1 : * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_drm_lease_v1 as _ , user_data ) ; } pub unsafe fn wp_drm_lease_v1_get_user_data ( wp_drm_lease_v1 : * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_drm_lease_v1 as _ ) ; } pub unsafe fn wp_drm_lease_v1_get_version ( wp_drm_lease_v1 : * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_drm_lease_v1 as _ ) ; } pub unsafe fn wp_drm_lease_v1_add_listener ( wp_drm_lease_v1 : * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_drm_lease_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_drm_lease_v1_add_rust_listener ( wp_drm_lease_v1 : * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 , listener : & dyn wp_drm_lease_v1_listener ) -> bool { let to = ( listener as * const dyn wp_drm_lease_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_drm_lease_v1_add_listener ( wp_drm_lease_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroys the lease object\n\nThe client should send this to indicate that it no longer wishes to use\nthis lease. The compositor should use drmModeRevokeLease on the\nappropriate file descriptor, if necessary." ] pub unsafe fn wp_drm_lease_v1_destroy ( wp_drm_lease_v1 : * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_drm_lease_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_drm_lease_v1 as _ ) ; } } } pub mod xdg_shell_unstable_v5 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "create desktop-style surfaces\n\nxdg_shell allows clients to turn a wl_surface into a \"real window\"\nwhich can be dragged, resized, stacked, and moved around by the\nuser. Everything about this interface is suited towards traditional\ndesktop environments." ] pub mod xdg_shell { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_shell { } # [ doc = "latest protocol version\n\nThe 'current' member of this enum gives the version of the\nprotocol. Implementations can compare this to the version\nthey implement using static_assert to ensure the protocol and\nimplementation versions match." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum version { # [ doc = "Always the latest version" ] current = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl version { pub fn from_raw ( n : u32 ) -> Option < version > { match n { 5 => Some ( version :: current ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc = "xdg_shell was destroyed before children" ] defunct_surfaces = 1 , # [ doc = "the client tried to map or destroy a non-topmost popup" ] not_the_topmost_popup = 2 , # [ doc = "the client specified an invalid popup parent surface" ] invalid_popup_parent = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , 1 => Some ( error :: defunct_surfaces ) , 2 => Some ( error :: not_the_topmost_popup ) , 3 => Some ( error :: invalid_popup_parent ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_shell_requests_get_xdg_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: xdg_surface :: xdg_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut xdg_shell_requests_get_xdg_popup_types : [ * const wl_interface ; 7 ] = [ unsafe { & super :: xdg_popup :: xdg_popup_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_shell_requests : [ wl_message ; 5 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"use_unstable_version\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_xdg_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & xdg_shell_requests_get_xdg_surface_types as * const _ } , } , wl_message { name : b"get_xdg_popup\0" as * const u8 as * const c_char , signature : b"nooouii\0" as * const u8 as * const c_char , types : unsafe { & xdg_shell_requests_get_xdg_popup_types as * const _ } , } , wl_message { name : b"pong\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_shell_events : [ wl_message ; 1 ] = [ wl_message { name : b"ping\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_shell_interface : wl_interface = wl_interface { name : b"xdg_shell\0" as * const u8 as * const c_char , version : 1 , request_count : 5 , requests : unsafe { & xdg_shell_requests as * const _ } , event_count : 1 , events : unsafe { & xdg_shell_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_shell_listener { # [ doc = "check if the client is alive\n\nThe ping event asks the client if it's still alive. Pass the\nserial specified in the event back to the compositor by sending\na \"pong\" request back with the specified serial.\n\nCompositors can use this to determine if the client is still\nalive. It's unspecified what will happen if the client doesn't\nrespond to the ping request, or in what timeframe. Clients should\ntry to respond in a reasonable amount of time.\n\nA compositor is free to ping in any way it wants, but a client must\nalways respond to any xdg_shell object it created." ] fn ping ( & mut self , object : * mut xdg_shell , serial : u32 ) { } } pub unsafe fn xdg_shell_set_user_data ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_shell as _ , user_data ) ; } pub unsafe fn xdg_shell_get_user_data ( xdg_shell : * mut super :: xdg_shell :: xdg_shell ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_shell as _ ) ; } pub unsafe fn xdg_shell_get_version ( xdg_shell : * mut super :: xdg_shell :: xdg_shell ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_shell as _ ) ; } pub unsafe fn xdg_shell_add_listener ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_shell as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_shell_add_rust_listener ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , listener : & dyn xdg_shell_listener ) -> bool { let to = ( listener as * const dyn xdg_shell_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_shell_add_listener ( xdg_shell as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy xdg_shell\n\nDestroy this xdg_shell object.\n\nDestroying a bound xdg_shell object while there are surfaces\nstill alive created by this xdg_shell object instance is illegal\nand will result in a protocol error." ] pub unsafe fn xdg_shell_destroy ( xdg_shell : * mut super :: xdg_shell :: xdg_shell ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_shell as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_shell as _ ) ; } # [ doc = "enable use of this unstable version\n\nNegotiate the unstable version of the interface. This\nmechanism is in place to ensure client and server agree on the\nunstable versions of the protocol that they speak or exit\ncleanly if they don't agree. This request will go away once\nthe xdg-shell protocol is stable." ] pub unsafe fn xdg_shell_use_unstable_version ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , version : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_shell as _ , 1u32 , version , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "create a shell surface from a surface\n\nThis creates an xdg_surface for the given surface and gives it the\nxdg_surface role. A wl_surface can only be given an xdg_surface role\nonce. If get_xdg_surface is called with a wl_surface that already has\nan active xdg_surface associated with it, or if it had any other role,\nan error is raised.\n\nSee the documentation of xdg_surface for more details about what an\nxdg_surface is and how it is used." ] pub unsafe fn xdg_shell_get_xdg_surface ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: xdg_surface :: xdg_surface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_shell as _ , 2u32 , & super :: xdg_surface :: xdg_surface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } # [ doc = "create a popup for a surface\n\nThis creates an xdg_popup for the given surface and gives it the\nxdg_popup role. A wl_surface can only be given an xdg_popup role\nonce. If get_xdg_popup is called with a wl_surface that already has\nan active xdg_popup associated with it, or if it had any other role,\nan error is raised.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event.\n\nSee the documentation of xdg_popup for more details about what an\nxdg_popup is and how it is used." ] pub unsafe fn xdg_shell_get_xdg_popup ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , surface : * mut super :: wl_surface :: wl_surface , parent : * mut super :: wl_surface :: wl_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , x : i32 , y : i32 ) -> * mut super :: xdg_popup :: xdg_popup { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_shell as _ , 3u32 , & super :: xdg_popup :: xdg_popup_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface , parent , seat , serial , x , y ) ; return r as _ ; } # [ doc = "respond to a ping event\n\nA client must respond to a ping event with a pong request or\nthe client may be deemed unresponsive." ] pub unsafe fn xdg_shell_pong ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_shell as _ , 4u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "A desktop window\n\nAn interface that may be implemented by a wl_surface, for\nimplementations that provide a desktop-style user interface.\n\nIt provides requests to treat surfaces like windows, allowing to set\nproperties like maximized, fullscreen, minimized, and to move and resize\nthem, and associate metadata like title and app id.\n\nThe client must call wl_surface.commit on the corresponding wl_surface\nfor the xdg_surface state to take effect. Prior to committing the new\nstate, it can set up initial configuration, such as maximizing or setting\na window geometry.\n\nEven without attaching a buffer the compositor must respond to initial\ncommitted configuration, for instance sending a configure event with\nexpected window geometry if the client maximized its surface during\ninitialization.\n\nFor a surface to be mapped by the compositor the client must have\ncommitted both an xdg_surface state and a buffer." ] pub mod xdg_surface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_surface { } # [ doc = "edge values for resizing\n\nThese values are used to indicate which edge of a surface\nis being dragged in a resize operation." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum resize_edge { none = 0 , top = 1 , bottom = 2 , left = 4 , top_left = 5 , bottom_left = 6 , right = 8 , top_right = 9 , bottom_right = 10 , # [ doc ( hidden ) ] __nonexhaustive , } impl resize_edge { pub fn from_raw ( n : u32 ) -> Option < resize_edge > { match n { 0 => Some ( resize_edge :: none ) , 1 => Some ( resize_edge :: top ) , 2 => Some ( resize_edge :: bottom ) , 4 => Some ( resize_edge :: left ) , 5 => Some ( resize_edge :: top_left ) , 6 => Some ( resize_edge :: bottom_left ) , 8 => Some ( resize_edge :: right ) , 9 => Some ( resize_edge :: top_right ) , 10 => Some ( resize_edge :: bottom_right ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "types of state on the surface\n\nThe different state values used on the surface. This is designed for\nstate values like maximized, fullscreen. It is paired with the\nconfigure event to ensure that both the client and the compositor\nsetting the state can be synchronized.\n\nStates set in this way are double-buffered. They will get applied on\nthe next commit.\n\nDesktop environments may extend this enum by taking up a range of\nvalues and documenting the range they chose in this description.\nThey are not required to document the values for the range that they\nchose. Ideally, any good extensions from a desktop environment should\nmake its way into standardization into this enum.\n\nThe current reserved ranges are:\n\n0x0000 - 0x0FFF: xdg-shell core values, documented below.\n0x1000 - 0x1FFF: GNOME\n0x2000 - 0x2FFF: EFL" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum state { # [ doc = "the surface is maximized\n\nThe surface is maximized. The window geometry specified in the configure\nevent must be obeyed by the client." ] maximized = 1 , # [ doc = "the surface is fullscreen\n\nThe surface is fullscreen. The window geometry specified in the configure\nevent must be obeyed by the client." ] fullscreen = 2 , # [ doc = "the surface is being resized\n\nThe surface is being resized. The window geometry specified in the\nconfigure event is a maximum; the client cannot resize beyond it.\nClients that have aspect ratio or cell sizing configuration can use\na smaller size, however." ] resizing = 3 , # [ doc = "the surface is now activated\n\nClient window decorations should be painted as if the window is\nactive. Do not assume this means that the window actually has\nkeyboard or pointer focus." ] activated = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl state { pub fn from_raw ( n : u32 ) -> Option < state > { match n { 1 => Some ( state :: maximized ) , 2 => Some ( state :: fullscreen ) , 3 => Some ( state :: resizing ) , 4 => Some ( state :: activated ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_surface_requests_set_parent_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: xdg_surface :: xdg_surface_interface as * const wl_interface } , ] ; static mut xdg_surface_requests_show_window_menu_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut xdg_surface_requests_move_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut xdg_surface_requests_resize_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut xdg_surface_requests_set_fullscreen_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_surface_requests : [ wl_message ; 14 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_set_parent_types as * const _ } , } , wl_message { name : b"set_title\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_app_id\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"show_window_menu\0" as * const u8 as * const c_char , signature : b"ouii\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_show_window_menu_types as * const _ } , } , wl_message { name : b"move\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_move_types as * const _ } , } , wl_message { name : b"resize\0" as * const u8 as * const c_char , signature : b"ouu\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_resize_types as * const _ } , } , wl_message { name : b"ack_configure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_window_geometry\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_maximized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unset_maximized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_fullscreen\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_set_fullscreen_types as * const _ } , } , wl_message { name : b"unset_fullscreen\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_minimized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_surface_events : [ wl_message ; 2 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"iiau\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"close\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_surface_interface : wl_interface = wl_interface { name : b"xdg_surface\0" as * const u8 as * const c_char , version : 1 , request_count : 14 , requests : unsafe { & xdg_surface_requests as * const _ } , event_count : 2 , events : unsafe { & xdg_surface_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_surface_listener { # [ doc = "suggest a surface change\n\nThe configure event asks the client to resize its surface or to\nchange its state.\n\nThe width and height arguments specify a hint to the window\nabout how its surface should be resized in window geometry\ncoordinates. See set_window_geometry.\n\nIf the width or height arguments are zero, it means the client\nshould decide its own window dimension. This may happen when the\ncompositor need to configure the state of the surface but doesn't\nhave any information about any previous or expected dimension.\n\nThe states listed in the event specify how the width/height\narguments should be interpreted, and possibly how it should be\ndrawn.\n\nClients should arrange their surface for the new size and\nstates, and then send a ack_configure request with the serial\nsent in this configure event at some point before committing\nthe new surface.\n\nIf the client receives multiple configure events before it\ncan respond to one, it is free to discard all but the last\nevent it received." ] fn configure ( & mut self , object : * mut xdg_surface , width : i32 , height : i32 , states : * mut wl_array , serial : u32 ) { } # [ doc = "surface wants to be closed\n\nThe close event is sent by the compositor when the user\nwants the surface to be closed. This should be equivalent to\nthe user clicking the close button in client-side decorations,\nif your application has any...\n\nThis is only a request that the user intends to close your\nwindow. The client may choose to ignore this request, or show\na dialog to ask the user to save their data..." ] fn close ( & mut self , object : * mut xdg_surface , ) { } } pub unsafe fn xdg_surface_set_user_data ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_surface as _ , user_data ) ; } pub unsafe fn xdg_surface_get_user_data ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_surface as _ ) ; } pub unsafe fn xdg_surface_get_version ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_surface as _ ) ; } pub unsafe fn xdg_surface_add_listener ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_surface as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_surface_add_rust_listener ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , listener : & dyn xdg_surface_listener ) -> bool { let to = ( listener as * const dyn xdg_surface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_surface_add_listener ( xdg_surface as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "Destroy the xdg_surface\n\nUnmap and destroy the window. The window will be effectively\nhidden from the user's point of view, and all state like\nmaximization, fullscreen, and so on, will be lost." ] pub unsafe fn xdg_surface_destroy ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_surface as _ ) ; } # [ doc = "set the parent of this surface\n\nSet the \"parent\" of this surface. This window should be stacked\nabove a parent. The parent surface must be mapped as long as this\nsurface is mapped.\n\nParent windows should be set on dialogs, toolboxes, or other\n\"auxiliary\" surfaces, so that the parent is raised when the dialog\nis raised." ] pub unsafe fn xdg_surface_set_parent ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , parent : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 1u32 , parent , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface title\n\nSet a short title for the surface.\n\nThis string may be used to identify the surface in a task bar,\nwindow list, or other user interface elements provided by the\ncompositor.\n\nThe string must be encoded in UTF-8." ] pub unsafe fn xdg_surface_set_title ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , title : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 2u32 , title , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set application ID\n\nSet an application identifier for the surface.\n\nThe app ID identifies the general class of applications to which\nthe surface belongs. The compositor can use this to group multiple\nsurfaces together, or to determine how to launch a new application.\n\nFor D-Bus activatable applications, the app ID is used as the D-Bus\nservice name.\n\nThe compositor shell will try to group application surfaces together\nby their app ID. As a best practice, it is suggested to select app\nID's that match the basename of the application's .desktop file.\nFor example, \"org.freedesktop.FooViewer\" where the .desktop file is\n\"org.freedesktop.FooViewer.desktop\".\n\nSee the desktop-entry specification [0] for more details on\napplication identifiers and how they relate to well-known D-Bus\nnames and .desktop files.\n\n[0] http://standards.freedesktop.org/desktop-entry-spec/" ] pub unsafe fn xdg_surface_set_app_id ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , app_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 3u32 , app_id , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "show the window menu\n\nClients implementing client-side decorations might want to show\na context menu when right-clicking on the decorations, giving the\nuser a menu that they can use to maximize or minimize the window.\n\nThis request asks the compositor to pop up such a window menu at\nthe given position, relative to the local surface coordinates of\nthe parent surface. There are no guarantees as to what menu items\nthe window menu contains.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event." ] pub unsafe fn xdg_surface_show_window_menu ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 4u32 , seat , serial , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive move\n\nStart an interactive, user-driven move of the surface.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event. The passed\nserial is used to determine the type of interactive move (touch,\npointer, etc).\n\nThe server may ignore move requests depending on the state of\nthe surface (e.g. fullscreen or maximized), or if the passed serial\nis no longer valid.\n\nIf triggered, the surface will lose the focus of the device\n(wl_pointer, wl_touch, etc) used for the move. It is up to the\ncompositor to visually indicate that the move is taking place, such as\nupdating a pointer cursor, during the move. There is no guarantee\nthat the device focus will return when the move is completed." ] pub unsafe fn xdg_surface_move ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 5u32 , seat , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive resize\n\nStart a user-driven, interactive resize of the surface.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event. The passed\nserial is used to determine the type of interactive resize (touch,\npointer, etc).\n\nThe server may ignore resize requests depending on the state of\nthe surface (e.g. fullscreen or maximized).\n\nIf triggered, the client will receive configure events with the\n\"resize\" state enum value and the expected sizes. See the \"resize\"\nenum value for more details about what is required. The client\nmust also acknowledge configure events using \"ack_configure\". After\nthe resize is completed, the client will receive another \"configure\"\nevent without the resize state.\n\nIf triggered, the surface also will lose the focus of the device\n(wl_pointer, wl_touch, etc) used for the resize. It is up to the\ncompositor to visually indicate that the resize is taking place,\nsuch as updating a pointer cursor, during the resize. There is no\nguarantee that the device focus will return when the resize is\ncompleted.\n\nThe edges parameter specifies how the surface should be resized,\nand is one of the values of the resize_edge enum. The compositor\nmay use this information to update the surface position for\nexample when dragging the top left corner. The compositor may also\nuse this information to adapt its behavior, e.g. choose an\nappropriate cursor image." ] pub unsafe fn xdg_surface_resize ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , edges : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 6u32 , seat , serial , edges , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "ack a configure event\n\nWhen a configure event is received, if a client commits the\nsurface in response to the configure event, then the client\nmust make an ack_configure request sometime before the commit\nrequest, passing along the serial of the configure event.\n\nFor instance, the compositor might use this information to move\na surface to the top left only when the client has drawn itself\nfor the maximized or fullscreen state.\n\nIf the client receives multiple configure events before it\ncan respond to one, it only has to ack the last configure event.\n\nA client is not required to commit immediately after sending\nan ack_configure request - it may even ack_configure several times\nbefore its next surface commit.\n\nThe compositor expects that the most recently received\nack_configure request at the time of a commit indicates which\nconfigure event the client is responding to." ] pub unsafe fn xdg_surface_ack_configure ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 7u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the new window geometry\n\nThe window geometry of a window is its \"visible bounds\" from the\nuser's perspective. Client-side decorations often have invisible\nportions like drop-shadows which should be ignored for the\npurposes of aligning, placing and constraining windows.\n\nThe window geometry is double buffered, and will be applied at the\ntime wl_surface.commit of the corresponding wl_surface is called.\n\nOnce the window geometry of the surface is set once, it is not\npossible to unset it, and it will remain the same until\nset_window_geometry is called again, even if a new subsurface or\nbuffer is attached.\n\nIf never set, the value is the full bounds of the surface,\nincluding any subsurfaces. This updates dynamically on every\ncommit. This unset mode is meant for extremely simple clients.\n\nIf responding to a configure event, the window geometry in here\nmust respect the sizing negotiations specified by the states in\nthe configure event.\n\nThe arguments are given in the surface local coordinate space of\nthe wl_surface associated with this xdg_surface.\n\nThe width and height must be greater than zero." ] pub unsafe fn xdg_surface_set_window_geometry ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 8u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "maximize the window\n\nMaximize the surface.\n\nAfter requesting that the surface should be maximized, the compositor\nwill respond by emitting a configure event with the \"maximized\" state\nand the required window geometry. The client should then update its\ncontent, drawing it in a maximized state, i.e. without shadow or other\ndecoration outside of the window geometry. The client must also\nacknowledge the configure when committing the new content (see\nack_configure).\n\nIt is up to the compositor to decide how and where to maximize the\nsurface, for example which output and what region of the screen should\nbe used.\n\nIf the surface was already maximized, the compositor will still emit\na configure event with the \"maximized\" state." ] pub unsafe fn xdg_surface_set_maximized ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 9u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "unmaximize the window\n\nUnmaximize the surface.\n\nAfter requesting that the surface should be unmaximized, the compositor\nwill respond by emitting a configure event without the \"maximized\"\nstate. If available, the compositor will include the window geometry\ndimensions the window had prior to being maximized in the configure\nrequest. The client must then update its content, drawing it in a\nregular state, i.e. potentially with shadow, etc. The client must also\nacknowledge the configure when committing the new content (see\nack_configure).\n\nIt is up to the compositor to position the surface after it was\nunmaximized; usually the position the surface had before maximizing, if\napplicable.\n\nIf the surface was already not maximized, the compositor will still\nemit a configure event without the \"maximized\" state." ] pub unsafe fn xdg_surface_unset_maximized ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 10u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the window as fullscreen on a monitor\n\nMake the surface fullscreen.\n\nYou can specify an output that you would prefer to be fullscreen.\nIf this value is NULL, it's up to the compositor to choose which\ndisplay will be used to map this surface.\n\nIf the surface doesn't cover the whole output, the compositor will\nposition the surface in the center of the output and compensate with\nblack borders filling the rest of the output." ] pub unsafe fn xdg_surface_set_fullscreen ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 11u32 , output , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn xdg_surface_unset_fullscreen ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 12u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the window as minimized\n\nRequest that the compositor minimize your surface. There is no\nway to know if the surface is currently minimized, nor is there\nany way to unset minimization on this surface.\n\nIf you are looking to throttle redrawing when minimized, please\ninstead use the wl_surface.frame event for this, as this will\nalso work with live previews on windows in Alt-Tab, Expose or\nsimilar compositor features." ] pub unsafe fn xdg_surface_set_minimized ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 13u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "short-lived, popup surfaces for menus\n\nA popup surface is a short-lived, temporary surface that can be\nused to implement menus. It takes an explicit grab on the surface\nthat will be dismissed when the user dismisses the popup. This can\nbe done by the user clicking outside the surface, using the keyboard,\nor even locking the screen through closing the lid or a timeout.\n\nWhen the popup is dismissed, a popup_done event will be sent out,\nand at the same time the surface will be unmapped. The xdg_popup\nobject is now inert and cannot be reactivated, so clients should\ndestroy it. Explicitly destroying the xdg_popup object will also\ndismiss the popup and unmap the surface.\n\nClients will receive events for all their surfaces during this\ngrab (which is an \"owner-events\" grab in X11 parlance). This is\ndone so that users can navigate through submenus and other\n\"nested\" popup windows without having to dismiss the topmost\npopup.\n\nClients that want to dismiss the popup when another surface of\ntheir own is clicked should dismiss the popup using the destroy\nrequest.\n\nThe parent surface must have either an xdg_surface or xdg_popup\nrole.\n\nSpecifying an xdg_popup for the parent means that the popups are\nnested, with this popup now being the topmost popup. Nested\npopups must be destroyed in the reverse order they were created\nin, e.g. the only popup you are allowed to destroy at all times\nis the topmost one.\n\nIf there is an existing popup when creating a new popup, the\nparent must be the current topmost popup.\n\nA parent surface must be mapped before the new popup is mapped.\n\nWhen compositors choose to dismiss a popup, they will likely\ndismiss every nested popup as well. When a compositor dismisses\npopups, it will follow the same dismissing order as required\nfrom the client.\n\nThe x and y arguments passed when creating the popup object specify\nwhere the top left of the popup should be placed, relative to the\nlocal surface coordinates of the parent surface. See\nxdg_shell.get_xdg_popup.\n\nThe client must call wl_surface.commit on the corresponding wl_surface\nfor the xdg_popup state to take effect.\n\nFor a surface to be mapped by the compositor the client must have\ncommitted both the xdg_popup state and a buffer." ] pub mod xdg_popup { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_popup { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_popup_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_popup_events : [ wl_message ; 1 ] = [ wl_message { name : b"popup_done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_popup_interface : wl_interface = wl_interface { name : b"xdg_popup\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & xdg_popup_requests as * const _ } , event_count : 1 , events : unsafe { & xdg_popup_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_popup_listener { # [ doc = "popup interaction is done\n\nThe popup_done event is sent out when a popup is dismissed by the\ncompositor. The client should destroy the xdg_popup object at this\npoint." ] fn popup_done ( & mut self , object : * mut xdg_popup , ) { } } pub unsafe fn xdg_popup_set_user_data ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_popup as _ , user_data ) ; } pub unsafe fn xdg_popup_get_user_data ( xdg_popup : * mut super :: xdg_popup :: xdg_popup ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_popup as _ ) ; } pub unsafe fn xdg_popup_get_version ( xdg_popup : * mut super :: xdg_popup :: xdg_popup ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_popup as _ ) ; } pub unsafe fn xdg_popup_add_listener ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_popup as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_popup_add_rust_listener ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , listener : & dyn xdg_popup_listener ) -> bool { let to = ( listener as * const dyn xdg_popup_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_popup_add_listener ( xdg_popup as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "remove xdg_popup interface\n\nThis destroys the popup. Explicitly destroying the xdg_popup\nobject will also dismiss the popup, and unmap the surface.\n\nIf this xdg_popup is not the \"topmost\" popup, a protocol error\nwill be sent." ] pub unsafe fn xdg_popup_destroy ( xdg_popup : * mut super :: xdg_popup :: xdg_popup ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_popup as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_popup as _ ) ; } } } pub mod outputmanagement { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "configuration of server outputs through clients\n\nThis interface enables clients to set properties of output devices for screen\nconfiguration purposes via the server. To this end output devices are referenced\nby global org_kde_kwin_outputdevice objects.\n\noutputmanagement (wl_global)\n--------------------------\nrequest:\n* create_configuration -> outputconfiguration (wl_resource)\n\noutputconfiguration (wl_resource)\n--------------------------\nrequests:\n* enable(outputdevice, bool)\n* mode(outputdevice, mode_id)\n* transformation(outputdevice, flag)\n* position(outputdevice, x, y)\n* apply\n\nevents:\n* applied\n* failed\n\nThe server registers one outputmanagement object as a global object. In order\nto configure outputs a client requests create_configuration, which provides a\nresource referencing an outputconfiguration for one-time configuration. That\nway the server knows which requests belong together and can group them by that.\n\nOn the outputconfiguration object the client calls for each output whether the\noutput should be enabled, which mode should be set (by referencing the mode from\nthe list of announced modes) and the output's global position. Once all outputs\nare configured that way, the client calls apply.\nAt that point and not earlier the server should try to apply the configuration.\nIf this succeeds the server emits the applied signal, otherwise the failed\nsignal, such that the configuring client is noticed about the success of its\nconfiguration request.\n\nThrough this design the interface enables atomic output configuration changes if\ninternally supported by the server." ] pub mod org_kde_kwin_outputmanagement { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_outputmanagement { } static mut org_kde_kwin_outputmanagement_requests_create_configuration_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_outputmanagement_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create_configuration\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputmanagement_requests_create_configuration_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_outputmanagement_interface : wl_interface = wl_interface { name : b"org_kde_kwin_outputmanagement\0" as * const u8 as * const c_char , version : 4 , request_count : 1 , requests : unsafe { & org_kde_kwin_outputmanagement_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_outputmanagement_listener { } pub unsafe fn org_kde_kwin_outputmanagement_set_user_data ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_outputmanagement as _ , user_data ) ; } pub unsafe fn org_kde_kwin_outputmanagement_get_user_data ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_outputmanagement as _ ) ; } pub unsafe fn org_kde_kwin_outputmanagement_get_version ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_outputmanagement as _ ) ; } pub unsafe fn org_kde_kwin_outputmanagement_add_listener ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_outputmanagement as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_outputmanagement_add_rust_listener ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement , listener : & dyn org_kde_kwin_outputmanagement_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_outputmanagement_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_outputmanagement_add_listener ( org_kde_kwin_outputmanagement as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_outputmanagement_destroy ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_outputmanagement as _ ) ; } # [ doc = "provide outputconfiguration object for configuring outputs\n\nRequest an outputconfiguration object through which the client can configure\noutput devices." ] pub unsafe fn org_kde_kwin_outputmanagement_create_configuration ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement ) -> * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_outputmanagement as _ , 0u32 , & super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "configure single output devices\n\noutputconfiguration is a client-specific resource that can be used to ask\nthe server to apply changes to available output devices.\n\nThe client receives a list of output devices from the registry. When it wants\nto apply new settings, it creates a configuration object from the\noutputmanagement global, writes changes through this object's enable, scale,\ntransform and mode calls. It then asks the server to apply these settings in\nan atomic fashion, for example through Linux' DRM interface.\n\nThe server signals back whether the new settings have applied successfully\nor failed to apply. outputdevice objects are updated after the changes have been\napplied to the hardware and before the server side sends the applied event." ] pub mod org_kde_kwin_outputconfiguration { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_outputconfiguration { } # [ doc = "describes vrr policy\n\nDescribes when the compositor may employ variable refresh rate" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum vrr_policy { never = 0 , always = 1 , automatic = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl vrr_policy { pub fn from_raw ( n : u32 ) -> Option < vrr_policy > { match n { 0 => Some ( vrr_policy :: never ) , 1 => Some ( vrr_policy :: always ) , 2 => Some ( vrr_policy :: automatic ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut org_kde_kwin_outputconfiguration_requests_enable_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_mode_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_transform_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_position_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_scale_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_scalef_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_colorcurves_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_overscan_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_set_vrr_policy_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_outputconfiguration_requests : [ wl_message ; 11 ] = [ wl_message { name : b"enable\0" as * const u8 as * const c_char , signature : b"oi\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_enable_types as * const _ } , } , wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"oi\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_mode_types as * const _ } , } , wl_message { name : b"transform\0" as * const u8 as * const c_char , signature : b"oi\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_transform_types as * const _ } , } , wl_message { name : b"position\0" as * const u8 as * const c_char , signature : b"oii\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_position_types as * const _ } , } , wl_message { name : b"scale\0" as * const u8 as * const c_char , signature : b"oi\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_scale_types as * const _ } , } , wl_message { name : b"apply\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"scalef\0" as * const u8 as * const c_char , signature : b"2of\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_scalef_types as * const _ } , } , wl_message { name : b"colorcurves\0" as * const u8 as * const c_char , signature : b"2oaaa\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_colorcurves_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"overscan\0" as * const u8 as * const c_char , signature : b"3ou\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_overscan_types as * const _ } , } , wl_message { name : b"set_vrr_policy\0" as * const u8 as * const c_char , signature : b"4ou\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_set_vrr_policy_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_outputconfiguration_events : [ wl_message ; 2 ] = [ wl_message { name : b"applied\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"failed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_outputconfiguration_interface : wl_interface = wl_interface { name : b"org_kde_kwin_outputconfiguration\0" as * const u8 as * const c_char , version : 4 , request_count : 11 , requests : unsafe { & org_kde_kwin_outputconfiguration_requests as * const _ } , event_count : 2 , events : unsafe { & org_kde_kwin_outputconfiguration_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_outputconfiguration_listener { # [ doc = "configuration changes have been applied\n\nSent after the server has successfully applied the changes.\n." ] fn applied ( & mut self , object : * mut org_kde_kwin_outputconfiguration , ) { } # [ doc = "configuration changes failed to apply\n\nSent if the server rejects the changes or failed to apply them." ] fn failed ( & mut self , object : * mut org_kde_kwin_outputconfiguration , ) { } } pub unsafe fn org_kde_kwin_outputconfiguration_set_user_data ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_outputconfiguration as _ , user_data ) ; } pub unsafe fn org_kde_kwin_outputconfiguration_get_user_data ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_outputconfiguration as _ ) ; } pub unsafe fn org_kde_kwin_outputconfiguration_get_version ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_outputconfiguration as _ ) ; } pub unsafe fn org_kde_kwin_outputconfiguration_add_listener ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_outputconfiguration as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_outputconfiguration_add_rust_listener ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , listener : & dyn org_kde_kwin_outputconfiguration_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_outputconfiguration_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_outputconfiguration_add_listener ( org_kde_kwin_outputconfiguration as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "enable or disable an output\n\nMark the output as enabled or disabled." ] pub unsafe fn org_kde_kwin_outputconfiguration_enable ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , enable : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 0u32 , outputdevice , enable , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "switch outputdevice to mode\n\nSets the mode for a given output by its mode size (width and height) and refresh rate." ] pub unsafe fn org_kde_kwin_outputconfiguration_mode ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , mode_id : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 1u32 , outputdevice , mode_id , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "transform outputdevice\n\nSets the transformation for a given output." ] pub unsafe fn org_kde_kwin_outputconfiguration_transform ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , transform : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 2u32 , outputdevice , transform , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "position output in global space\n\nSets the position for this output device. (x,y) describe the top-left corner\nof the output in global space, whereby the origin (0,0) of the global space\nhas to be aligned with the top-left corner of the most left and in case this\ndoes not define a single one the top output.\n\nThere may be no gaps or overlaps between outputs, i.e. the outputs are\nstacked horizontally, vertically, or both on each other." ] pub unsafe fn org_kde_kwin_outputconfiguration_position ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 3u32 , outputdevice , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set scaling factor of this output\n\nSets the scaling factor for this output device." ] pub unsafe fn org_kde_kwin_outputconfiguration_scale ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , scale : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 4u32 , outputdevice , scale , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "apply configuration changes to all output devices\n\nAsks the server to apply property changes requested through this outputconfiguration\nobject to all outputs on the server side." ] pub unsafe fn org_kde_kwin_outputconfiguration_apply ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 5u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set scaling factor of this output\n\nSets the scaling factor for this output device.\nSending both scale and scalef is undefined." ] pub unsafe fn org_kde_kwin_outputconfiguration_scalef ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , scale : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 6u32 , outputdevice , scale , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set output color curves\n\nSet color curves of output devices through RGB color ramps. Allows color\ncorrection of output device from user space.\n\nThese are the raw values. A compositor might opt to adjust these values\ninternally, for example to shift color temperature at night." ] pub unsafe fn org_kde_kwin_outputconfiguration_colorcurves ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , red : * mut wl_array , green : * mut wl_array , blue : * mut wl_array ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 7u32 , outputdevice , red , green , blue , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the outputconfiguration object" ] pub unsafe fn org_kde_kwin_outputconfiguration_destroy ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 8u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_outputconfiguration as _ ) ; } # [ doc = "set overscan value\n\nSet the overscan value of this output device with a value in percent." ] pub unsafe fn org_kde_kwin_outputconfiguration_overscan ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , overscan : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 9u32 , outputdevice , overscan , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the VRR policy\n\nSet what policy the compositor should employ regarding its use of\nvariable refresh rate." ] pub unsafe fn org_kde_kwin_outputconfiguration_set_vrr_policy ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , policy : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 10u32 , outputdevice , policy , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod viewporter { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "surface cropping and scaling\n\nThe global interface exposing surface cropping and scaling\ncapabilities is used to instantiate an interface extension for a\nwl_surface object. This extended interface will then allow\ncropping and scaling the surface contents, effectively\ndisconnecting the direct relationship between the buffer and the\nsurface size." ] pub mod wp_viewporter { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_viewporter { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "the surface already has a viewport object associated" ] viewport_exists = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: viewport_exists ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wp_viewporter_requests_get_viewport_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wp_viewport :: wp_viewport_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_viewporter_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_viewport\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & wp_viewporter_requests_get_viewport_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_viewporter_interface : wl_interface = wl_interface { name : b"wp_viewporter\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & wp_viewporter_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wp_viewporter_listener { } pub unsafe fn wp_viewporter_set_user_data ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_viewporter as _ , user_data ) ; } pub unsafe fn wp_viewporter_get_user_data ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_viewporter as _ ) ; } pub unsafe fn wp_viewporter_get_version ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_viewporter as _ ) ; } pub unsafe fn wp_viewporter_add_listener ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_viewporter as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_viewporter_add_rust_listener ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter , listener : & dyn wp_viewporter_listener ) -> bool { let to = ( listener as * const dyn wp_viewporter_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_viewporter_add_listener ( wp_viewporter as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "unbind from the cropping and scaling interface\n\nInforms the server that the client will not be using this\nprotocol object anymore. This does not affect any other objects,\nwp_viewport objects included." ] pub unsafe fn wp_viewporter_destroy ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_viewporter as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_viewporter as _ ) ; } # [ doc = "extend surface interface for crop and scale\n\nInstantiate an interface extension for the given wl_surface to\ncrop and scale its content. If the given wl_surface already has\na wp_viewport object associated, the viewport_exists\nprotocol error is raised." ] pub unsafe fn wp_viewporter_get_viewport ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: wp_viewport :: wp_viewport { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wp_viewporter as _ , 1u32 , & super :: wp_viewport :: wp_viewport_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "crop and scale interface to a wl_surface\n\nAn additional interface to a wl_surface object, which allows the\nclient to specify the cropping and scaling of the surface\ncontents.\n\nThis interface works with two concepts: the source rectangle (src_x,\nsrc_y, src_width, src_height), and the destination size (dst_width,\ndst_height). The contents of the source rectangle are scaled to the\ndestination size, and content outside the source rectangle is ignored.\nThis state is double-buffered, and is applied on the next\nwl_surface.commit.\n\nThe two parts of crop and scale state are independent: the source\nrectangle, and the destination size. Initially both are unset, that\nis, no scaling is applied. The whole of the current wl_buffer is\nused as the source, and the surface size is as defined in\nwl_surface.attach.\n\nIf the destination size is set, it causes the surface size to become\ndst_width, dst_height. The source (rectangle) is scaled to exactly\nthis size. This overrides whatever the attached wl_buffer size is,\nunless the wl_buffer is NULL. If the wl_buffer is NULL, the surface\nhas no content and therefore no size. Otherwise, the size is always\nat least 1x1 in surface local coordinates.\n\nIf the source rectangle is set, it defines what area of the wl_buffer is\ntaken as the source. If the source rectangle is set and the destination\nsize is not set, then src_width and src_height must be integers, and the\nsurface size becomes the source rectangle size. This results in cropping\nwithout scaling. If src_width or src_height are not integers and\ndestination size is not set, the bad_size protocol error is raised when\nthe surface state is applied.\n\nThe coordinate transformations from buffer pixel coordinates up to\nthe surface-local coordinates happen in the following order:\n1. buffer_transform (wl_surface.set_buffer_transform)\n2. buffer_scale (wl_surface.set_buffer_scale)\n3. crop and scale (wp_viewport.set*)\nThis means, that the source rectangle coordinates of crop and scale\nare given in the coordinates after the buffer transform and scale,\ni.e. in the coordinates that would be the surface-local coordinates\nif the crop and scale was not applied.\n\nIf src_x or src_y are negative, the bad_value protocol error is raised.\nOtherwise, if the source rectangle is partially or completely outside of\nthe non-NULL wl_buffer, then the out_of_buffer protocol error is raised\nwhen the surface state is applied. A NULL wl_buffer does not raise the\nout_of_buffer error.\n\nThe x, y arguments of wl_surface.attach are applied as normal to\nthe surface. They indicate how many pixels to remove from the\nsurface size from the left and the top. In other words, they are\nstill in the surface-local coordinate system, just like dst_width\nand dst_height are.\n\nIf the wl_surface associated with the wp_viewport is destroyed,\nall wp_viewport requests except 'destroy' raise the protocol error\nno_surface.\n\nIf the wp_viewport object is destroyed, the crop and scale\nstate is removed from the wl_surface. The change will be applied\non the next wl_surface.commit." ] pub mod wp_viewport { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_viewport { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "negative or zero values in width or height" ] bad_value = 0 , # [ doc = "destination size is not integer" ] bad_size = 1 , # [ doc = "source rectangle extends outside of the content area" ] out_of_buffer = 2 , # [ doc = "the wl_surface was destroyed" ] no_surface = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: bad_value ) , 1 => Some ( error :: bad_size ) , 2 => Some ( error :: out_of_buffer ) , 3 => Some ( error :: no_surface ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_viewport_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_source\0" as * const u8 as * const c_char , signature : b"ffff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_destination\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_viewport_interface : wl_interface = wl_interface { name : b"wp_viewport\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & wp_viewport_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wp_viewport_listener { } pub unsafe fn wp_viewport_set_user_data ( wp_viewport : * mut super :: wp_viewport :: wp_viewport , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_viewport as _ , user_data ) ; } pub unsafe fn wp_viewport_get_user_data ( wp_viewport : * mut super :: wp_viewport :: wp_viewport ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_viewport as _ ) ; } pub unsafe fn wp_viewport_get_version ( wp_viewport : * mut super :: wp_viewport :: wp_viewport ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_viewport as _ ) ; } pub unsafe fn wp_viewport_add_listener ( wp_viewport : * mut super :: wp_viewport :: wp_viewport , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_viewport as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_viewport_add_rust_listener ( wp_viewport : * mut super :: wp_viewport :: wp_viewport , listener : & dyn wp_viewport_listener ) -> bool { let to = ( listener as * const dyn wp_viewport_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_viewport_add_listener ( wp_viewport as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "remove scaling and cropping from the surface\n\nThe associated wl_surface's crop and scale state is removed.\nThe change is applied on the next wl_surface.commit." ] pub unsafe fn wp_viewport_destroy ( wp_viewport : * mut super :: wp_viewport :: wp_viewport ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_viewport as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_viewport as _ ) ; } # [ doc = "set the source rectangle for cropping\n\nSet the source rectangle of the associated wl_surface. See\nwp_viewport for the description, and relation to the wl_buffer\nsize.\n\nIf all of x, y, width and height are -1.0, the source rectangle is\nunset instead. Any other set of values where width or height are zero\nor negative, or x or y are negative, raise the bad_value protocol\nerror.\n\nThe crop and scale state is double-buffered state, and will be\napplied on the next wl_surface.commit." ] pub unsafe fn wp_viewport_set_source ( wp_viewport : * mut super :: wp_viewport :: wp_viewport , x : wl_fixed_t , y : wl_fixed_t , width : wl_fixed_t , height : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_viewport as _ , 1u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the surface size for scaling\n\nSet the destination size of the associated wl_surface. See\nwp_viewport for the description, and relation to the wl_buffer\nsize.\n\nIf width is -1 and height is -1, the destination size is unset\ninstead. Any other pair of values for width and height that\ncontains zero or negative values raises the bad_value protocol\nerror.\n\nThe crop and scale state is double-buffered state, and will be\napplied on the next wl_surface.commit." ] pub unsafe fn wp_viewport_set_destination ( wp_viewport : * mut super :: wp_viewport :: wp_viewport , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_viewport as _ , 2u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod text_input_unstable_v3 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "text input\n\nThe zwp_text_input_v3 interface represents text input and input methods\nassociated with a seat. It provides enter/leave events to follow the\ntext input focus for a seat.\n\nRequests are used to enable/disable the text-input object and set\nstate information like surrounding and selected text or the content type.\nThe information about the entered text is sent to the text-input object\nvia the preedit_string and commit_string events.\n\nText is valid UTF-8 encoded, indices and lengths are in bytes. Indices\nmust not point to middle bytes inside a code point: they must either\npoint to the first byte of a code point or to the end of the buffer.\nLengths must be measured between two valid indices.\n\nFocus moving throughout surfaces will result in the emission of\nzwp_text_input_v3.enter and zwp_text_input_v3.leave events. The focused\nsurface must commit zwp_text_input_v3.enable and\nzwp_text_input_v3.disable requests as the keyboard focus moves across\neditable and non-editable elements of the UI. Those two requests are not\nexpected to be paired with each other, the compositor must be able to\nhandle consecutive series of the same request.\n\nState is sent by the state requests (set_surrounding_text,\nset_content_type and set_cursor_rectangle) and a commit request. After an\nenter event or disable request all state information is invalidated and\nneeds to be resent by the client." ] pub mod zwp_text_input_v3 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_text_input_v3 { } # [ doc = "text change reason\n\nReason for the change of surrounding text or cursor posision." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum change_cause { # [ doc = "input method caused the change" ] input_method = 0 , # [ doc = "something else than the input method caused the change" ] other = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl change_cause { pub fn from_raw ( n : u32 ) -> Option < change_cause > { match n { 0 => Some ( change_cause :: input_method ) , 1 => Some ( change_cause :: other ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { # [ doc = "content hint\n\nContent hint is a bitmask to allow to modify the behavior of the text\ninput." ] pub struct content_hint : u32 { # [ doc = "no special behavior" ] const none = 0 ; # [ doc = "suggest word completions" ] const completion = 1 ; # [ doc = "suggest word corrections" ] const spellcheck = 2 ; # [ doc = "switch to uppercase letters at the start of a sentence" ] const auto_capitalization = 4 ; # [ doc = "prefer lowercase letters" ] const lowercase = 8 ; # [ doc = "prefer uppercase letters" ] const uppercase = 16 ; # [ doc = "prefer casing for titles and headings (can be language dependent)" ] const titlecase = 32 ; # [ doc = "characters should be hidden" ] const hidden_text = 64 ; # [ doc = "typed text should not be stored" ] const sensitive_data = 128 ; # [ doc = "just Latin characters should be entered" ] const latin = 256 ; # [ doc = "the text input is multiline" ] const multiline = 512 ; } } impl content_hint { pub fn from_raw ( n : u32 ) -> Option < content_hint > { Some ( content_hint :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = "content purpose\n\nThe content purpose allows to specify the primary purpose of a text\ninput.\n\nThis allows an input method to show special purpose input panels with\nextra characters or to disallow some characters." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum content_purpose { # [ doc = "default input, allowing all characters" ] normal = 0 , # [ doc = "allow only alphabetic characters" ] alpha = 1 , # [ doc = "allow only digits" ] digits = 2 , # [ doc = "input a number (including decimal separator and sign)" ] number = 3 , # [ doc = "input a phone number" ] phone = 4 , # [ doc = "input an URL" ] url = 5 , # [ doc = "input an email address" ] email = 6 , # [ doc = "input a name of a person" ] name = 7 , # [ doc = "input a password (combine with sensitive_data hint)" ] password = 8 , # [ doc = "input is a numeric password (combine with sensitive_data hint)" ] pin = 9 , # [ doc = "input a date" ] date = 10 , # [ doc = "input a time" ] time = 11 , # [ doc = "input a date and time" ] datetime = 12 , # [ doc = "input for a terminal" ] terminal = 13 , # [ doc ( hidden ) ] __nonexhaustive , } impl content_purpose { pub fn from_raw ( n : u32 ) -> Option < content_purpose > { match n { 0 => Some ( content_purpose :: normal ) , 1 => Some ( content_purpose :: alpha ) , 2 => Some ( content_purpose :: digits ) , 3 => Some ( content_purpose :: number ) , 4 => Some ( content_purpose :: phone ) , 5 => Some ( content_purpose :: url ) , 6 => Some ( content_purpose :: email ) , 7 => Some ( content_purpose :: name ) , 8 => Some ( content_purpose :: password ) , 9 => Some ( content_purpose :: pin ) , 10 => Some ( content_purpose :: date ) , 11 => Some ( content_purpose :: time ) , 12 => Some ( content_purpose :: datetime ) , 13 => Some ( content_purpose :: terminal ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_v3_requests : [ wl_message ; 8 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"enable\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"disable\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_surrounding_text\0" as * const u8 as * const c_char , signature : b"sii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_text_change_cause\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_content_type\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_cursor_rectangle\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_text_input_v3_events_enter_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut zwp_text_input_v3_events_leave_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_v3_events : [ wl_message ; 6 ] = [ wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v3_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v3_events_leave_types as * const _ } , } , wl_message { name : b"preedit_string\0" as * const u8 as * const c_char , signature : b"?sii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_string\0" as * const u8 as * const c_char , signature : b"?s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"delete_surrounding_text\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_text_input_v3_interface : wl_interface = wl_interface { name : b"zwp_text_input_v3\0" as * const u8 as * const c_char , version : 1 , request_count : 8 , requests : unsafe { & zwp_text_input_v3_requests as * const _ } , event_count : 6 , events : unsafe { & zwp_text_input_v3_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_text_input_v3_listener { # [ doc = "enter event\n\nNotification that this seat's text-input focus is on a certain surface.\n\nIf client has created multiple text input objects, compositor must send\nthis event to all of them.\n\nWhen the seat has the keyboard capability the text-input focus follows\nthe keyboard focus. This event sets the current surface for the\ntext-input object." ] fn enter ( & mut self , object : * mut zwp_text_input_v3 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "leave event\n\nNotification that this seat's text-input focus is no longer on a\ncertain surface. The client should reset any preedit string previously\nset.\n\nThe leave notification clears the current surface. It is sent before\nthe enter notification for the new focus. After leave event, compositor\nmust ignore requests from any text input instances until next enter\nevent.\n\nWhen the seat has the keyboard capability the text-input focus follows\nthe keyboard focus." ] fn leave ( & mut self , object : * mut zwp_text_input_v3 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "pre-edit\n\nNotify when a new composing text (pre-edit) should be set at the\ncurrent cursor position. Any previously set composing text must be\nremoved. Any previously existing selected text must be removed.\n\nThe argument text contains the pre-edit string buffer.\n\nThe parameters cursor_begin and cursor_end are counted in bytes\nrelative to the beginning of the submitted text buffer. Cursor should\nbe hidden when both are equal to -1.\n\nThey could be represented by the client as a line if both values are\nthe same, or as a text highlight otherwise.\n\nValues set with this event are double-buffered. They must be applied\nand reset to initial on the next zwp_text_input_v3.done event.\n\nThe initial value of text is an empty string, and cursor_begin,\ncursor_end and cursor_hidden are all 0." ] fn preedit_string ( & mut self , object : * mut zwp_text_input_v3 , text : Option < * mut c_char > , cursor_begin : i32 , cursor_end : i32 ) { } # [ doc = "text commit\n\nNotify when text should be inserted into the editor widget. The text to\ncommit could be either just a single character after a key press or the\nresult of some composing (pre-edit).\n\nValues set with this event are double-buffered. They must be applied\nand reset to initial on the next zwp_text_input_v3.done event.\n\nThe initial value of text is an empty string." ] fn commit_string ( & mut self , object : * mut zwp_text_input_v3 , text : Option < * mut c_char > ) { } # [ doc = "delete surrounding text\n\nNotify when the text around the current cursor position should be\ndeleted.\n\nBefore_length and after_length are the number of bytes before and after\nthe current cursor index (excluding the selection) to delete.\n\nIf a preedit text is present, in effect before_length is counted from\nthe beginning of it, and after_length from its end (see done event\nsequence).\n\nValues set with this event are double-buffered. They must be applied\nand reset to initial on the next zwp_text_input_v3.done event.\n\nThe initial values of both before_length and after_length are 0." ] fn delete_surrounding_text ( & mut self , object : * mut zwp_text_input_v3 , before_length : u32 , after_length : u32 ) { } # [ doc = "apply changes\n\nInstruct the application to apply changes to state requested by the\npreedit_string, commit_string and delete_surrounding_text events. The\nstate relating to these events is double-buffered, and each one\nmodifies the pending state. This event replaces the current state with\nthe pending state.\n\nThe application must proceed by evaluating the changes in the following\norder:\n\n1. Replace existing preedit string with the cursor.\n2. Delete requested surrounding text.\n3. Insert commit string with the cursor at its end.\n4. Calculate surrounding text to send.\n5. Insert new preedit text in cursor position.\n6. Place cursor inside preedit text.\n\nThe serial number reflects the last state of the zwp_text_input_v3\nobject known to the compositor. The value of the serial argument must\nbe equal to the number of commit requests already issued on that object.\nWhen the client receives a done event with a serial different than the\nnumber of past commit requests, it must proceed as normal, except it\nshould not change the current state of the zwp_text_input_v3 object." ] fn done ( & mut self , object : * mut zwp_text_input_v3 , serial : u32 ) { } } pub unsafe fn zwp_text_input_v3_set_user_data ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_text_input_v3 as _ , user_data ) ; } pub unsafe fn zwp_text_input_v3_get_user_data ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_text_input_v3 as _ ) ; } pub unsafe fn zwp_text_input_v3_get_version ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_text_input_v3 as _ ) ; } pub unsafe fn zwp_text_input_v3_add_listener ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_text_input_v3 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_text_input_v3_add_rust_listener ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , listener : & dyn zwp_text_input_v3_listener ) -> bool { let to = ( listener as * const dyn zwp_text_input_v3_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_text_input_v3_add_listener ( zwp_text_input_v3 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "Destroy the wp_text_input\n\nDestroy the wp_text_input object. Also disables all surfaces enabled\nthrough this wp_text_input object." ] pub unsafe fn zwp_text_input_v3_destroy ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_text_input_v3 as _ ) ; } # [ doc = "Request text input to be enabled\n\nRequests text input on the surface previously obtained from the enter\nevent.\n\nThis request must be issued every time the active text input changes\nto a new one, including within the current surface. Use\nzwp_text_input_v3.disable when there is no longer any input focus on\nthe current surface.\n\nClients must not enable more than one text input on the single seat\nand should disable the current text input before enabling the new one.\nAt most one instance of text input may be in enabled state per instance,\nRequests to enable the another text input when some text input is active\nmust be ignored by compositor.\n\nThis request resets all state associated with previous enable, disable,\nset_surrounding_text, set_text_change_cause, set_content_type, and\nset_cursor_rectangle requests, as well as the state associated with\npreedit_string, commit_string, and delete_surrounding_text events.\n\nThe set_surrounding_text, set_content_type and set_cursor_rectangle\nrequests must follow if the text input supports the necessary\nfunctionality.\n\nState set with this request is double-buffered. It will get applied on\nthe next zwp_text_input_v3.commit request, and stay valid until the\nnext committed enable or disable request.\n\nThe changes must be applied by the compositor after issuing a\nzwp_text_input_v3.commit request." ] pub unsafe fn zwp_text_input_v3_enable ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Disable text input on a surface\n\nExplicitly disable text input on the current surface (typically when\nthere is no focus on any text entry inside the surface).\n\nState set with this request is double-buffered. It will get applied on\nthe next zwp_text_input_v3.commit request." ] pub unsafe fn zwp_text_input_v3_disable ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets the surrounding text\n\nSets the surrounding plain text around the input, excluding the preedit\ntext.\n\nThe client should notify the compositor of any changes in any of the\nvalues carried with this request, including changes caused by handling\nincoming text-input events as well as changes caused by other\nmechanisms like keyboard typing.\n\nIf the client is unaware of the text around the cursor, it should not\nissue this request, to signify lack of support to the compositor.\n\nText is UTF-8 encoded, and should include the cursor position, the\ncomplete selection and additional characters before and after them.\nThere is a maximum length of wayland messages, so text can not be\nlonger than 4000 bytes.\n\nCursor is the byte offset of the cursor within text buffer.\n\nAnchor is the byte offset of the selection anchor within text buffer.\nIf there is no selected text, anchor is the same as cursor.\n\nIf any preedit text is present, it is replaced with a cursor for the\npurpose of this event.\n\nValues set with this request are double-buffered. They will get applied\non the next zwp_text_input_v3.commit request, and stay valid until the\nnext committed enable or disable request.\n\nThe initial state for affected fields is empty, meaning that the text\ninput does not support sending surrounding text. If the empty values\nget applied, subsequent attempts to change them may have no effect." ] pub unsafe fn zwp_text_input_v3_set_surrounding_text ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , text : * const c_char , cursor : i32 , anchor : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 3u32 , text , cursor , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "indicates the cause of surrounding text change\n\nTells the compositor why the text surrounding the cursor changed.\n\nWhenever the client detects an external change in text, cursor, or\nanchor posision, it must issue this request to the compositor. This\nrequest is intended to give the input method a chance to update the\npreedit text in an appropriate way, e.g. by removing it when the user\nstarts typing with a keyboard.\n\ncause describes the source of the change.\n\nThe value set with this request is double-buffered. It must be applied\nand reset to initial at the next zwp_text_input_v3.commit request.\n\nThe initial value of cause is input_method." ] pub unsafe fn zwp_text_input_v3_set_text_change_cause ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , cause : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 4u32 , cause , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set content purpose and hint\n\nSets the content purpose and content hint. While the purpose is the\nbasic purpose of an input field, the hint flags allow to modify some of\nthe behavior.\n\nValues set with this request are double-buffered. They will get applied\non the next zwp_text_input_v3.commit request.\nSubsequent attempts to update them may have no effect. The values\nremain valid until the next committed enable or disable request.\n\nThe initial value for hint is none, and the initial value for purpose\nis normal." ] pub unsafe fn zwp_text_input_v3_set_content_type ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , hint : u32 , purpose : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 5u32 , hint , purpose , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set cursor position\n\nMarks an area around the cursor as a x, y, width, height rectangle in\nsurface local coordinates.\n\nAllows the compositor to put a window with word suggestions near the\ncursor, without obstructing the text being input.\n\nIf the client is unaware of the position of edited text, it should not\nissue this request, to signify lack of support to the compositor.\n\nValues set with this request are double-buffered. They will get applied\non the next zwp_text_input_v3.commit request, and stay valid until the\nnext committed enable or disable request.\n\nThe initial values describing a cursor rectangle are empty. That means\nthe text input does not support describing the cursor area. If the\nempty values get applied, subsequent attempts to change them may have\nno effect." ] pub unsafe fn zwp_text_input_v3_set_cursor_rectangle ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 6u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "commit state\n\nAtomically applies state changes recently sent to the compositor.\n\nThe commit request establishes and updates the state of the client, and\nmust be issued after any changes to apply them.\n\nText input state (enabled status, content purpose, content hint,\nsurrounding text and change cause, cursor rectangle) is conceptually\ndouble-buffered within the context of a text input, i.e. between a\ncommitted enable request and the following committed enable or disable\nrequest.\n\nProtocol requests modify the pending state, as opposed to the current\nstate in use by the input method. A commit request atomically applies\nall pending state, replacing the current state. After commit, the new\npending state is as documented for each related request.\n\nRequests are applied in the order of arrival.\n\nNeither current nor pending state are modified unless noted otherwise.\n\nThe compositor must count the number of commit requests coming from\neach zwp_text_input_v3 object and use the count as the serial in done\nevents." ] pub unsafe fn zwp_text_input_v3_commit ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 7u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "text input manager\n\nA factory for text-input objects. This object is a global singleton." ] pub mod zwp_text_input_manager_v3 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_text_input_manager_v3 { } static mut zwp_text_input_manager_v3_requests_get_text_input_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_text_input_v3 :: zwp_text_input_v3_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_manager_v3_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_text_input\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_manager_v3_requests_get_text_input_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_text_input_manager_v3_interface : wl_interface = wl_interface { name : b"zwp_text_input_manager_v3\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_text_input_manager_v3_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_text_input_manager_v3_listener { } pub unsafe fn zwp_text_input_manager_v3_set_user_data ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_text_input_manager_v3 as _ , user_data ) ; } pub unsafe fn zwp_text_input_manager_v3_get_user_data ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_text_input_manager_v3 as _ ) ; } pub unsafe fn zwp_text_input_manager_v3_get_version ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_text_input_manager_v3 as _ ) ; } pub unsafe fn zwp_text_input_manager_v3_add_listener ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_text_input_manager_v3 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_text_input_manager_v3_add_rust_listener ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 , listener : & dyn zwp_text_input_manager_v3_listener ) -> bool { let to = ( listener as * const dyn zwp_text_input_manager_v3_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_text_input_manager_v3_add_listener ( zwp_text_input_manager_v3 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "Destroy the wp_text_input_manager\n\nDestroy the wp_text_input_manager object." ] pub unsafe fn zwp_text_input_manager_v3_destroy ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_manager_v3 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_text_input_manager_v3 as _ ) ; } # [ doc = "create a new text input object\n\nCreates a new text-input object for a given seat." ] pub unsafe fn zwp_text_input_manager_v3_get_text_input ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_text_input_manager_v3 as _ , 1u32 , & super :: zwp_text_input_v3 :: zwp_text_input_v3_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat ) ; return r as _ ; } } } pub mod pointer_constraints_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "constrain the movement of a pointer\n\nThe global interface exposing pointer constraining functionality. It\nexposes two requests: lock_pointer for locking the pointer to its\nposition, and confine_pointer for locking the pointer to a region.\n\nThe lock_pointer and confine_pointer requests create the objects\nwp_locked_pointer and wp_confined_pointer respectively, and the client can\nuse these objects to interact with the lock.\n\nFor any surface, only one lock or confinement may be active across all\nwl_pointer objects of the same seat. If a lock or confinement is requested\nwhen another lock or confinement is active or requested on the same surface\nand with any of the wl_pointer objects of the same seat, an\n'already_constrained' error will be raised." ] pub mod zwp_pointer_constraints_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_pointer_constraints_v1 { } # [ doc = "wp_pointer_constraints error values\n\nThese errors can be emitted in response to wp_pointer_constraints\nrequests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "pointer constraint already requested on that surface" ] already_constrained = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 1 => Some ( error :: already_constrained ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "constraint lifetime\n\nThese values represent different lifetime semantics. They are passed\nas arguments to the factory requests to specify how the constraint\nlifetimes should be managed." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum lifetime { # [ doc = "the pointer constraint is defunct once deactivated\n\nA oneshot pointer constraint will never reactivate once it has been\ndeactivated. See the corresponding deactivation event\n(wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for\ndetails." ] oneshot = 1 , # [ doc = "the pointer constraint may reactivate\n\nA persistent pointer constraint may again reactivate once it has\nbeen deactivated. See the corresponding deactivation event\n(wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for\ndetails." ] persistent = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl lifetime { pub fn from_raw ( n : u32 ) -> Option < lifetime > { match n { 1 => Some ( lifetime :: oneshot ) , 2 => Some ( lifetime :: persistent ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_pointer_constraints_v1_requests_lock_pointer_types : [ * const wl_interface ; 5 ] = [ unsafe { & super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut zwp_pointer_constraints_v1_requests_confine_pointer_types : [ * const wl_interface ; 5 ] = [ unsafe { & super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_constraints_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"lock_pointer\0" as * const u8 as * const c_char , signature : b"noo?ou\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_constraints_v1_requests_lock_pointer_types as * const _ } , } , wl_message { name : b"confine_pointer\0" as * const u8 as * const c_char , signature : b"noo?ou\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_constraints_v1_requests_confine_pointer_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_pointer_constraints_v1_interface : wl_interface = wl_interface { name : b"zwp_pointer_constraints_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & zwp_pointer_constraints_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_pointer_constraints_v1_listener { } pub unsafe fn zwp_pointer_constraints_v1_set_user_data ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_pointer_constraints_v1 as _ , user_data ) ; } pub unsafe fn zwp_pointer_constraints_v1_get_user_data ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_pointer_constraints_v1 as _ ) ; } pub unsafe fn zwp_pointer_constraints_v1_get_version ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_pointer_constraints_v1 as _ ) ; } pub unsafe fn zwp_pointer_constraints_v1_add_listener ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_pointer_constraints_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_pointer_constraints_v1_add_rust_listener ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 , listener : & dyn zwp_pointer_constraints_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_pointer_constraints_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_pointer_constraints_v1_add_listener ( zwp_pointer_constraints_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the pointer constraints manager object\n\nUsed by the client to notify the server that it will no longer use this\npointer constraints object." ] pub unsafe fn zwp_pointer_constraints_v1_destroy ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_pointer_constraints_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_pointer_constraints_v1 as _ ) ; } # [ doc = "lock pointer to a position\n\nThe lock_pointer request lets the client request to disable movements of\nthe virtual pointer (i.e. the cursor), effectively locking the pointer\nto a position. This request may not take effect immediately; in the\nfuture, when the compositor deems implementation-specific constraints\nare satisfied, the pointer lock will be activated and the compositor\nsends a locked event.\n\nThe protocol provides no guarantee that the constraints are ever\nsatisfied, and does not require the compositor to send an error if the\nconstraints cannot ever be satisfied. It is thus possible to request a\nlock that will never activate.\n\nThere may not be another pointer constraint of any kind requested or\nactive on the surface for any of the wl_pointer objects of the seat of\nthe passed pointer when requesting a lock. If there is, an error will be\nraised. See general pointer lock documentation for more details.\n\nThe intersection of the region passed with this request and the input\nregion of the surface is used to determine where the pointer must be\nin order for the lock to activate. It is up to the compositor whether to\nwarp the pointer or require some kind of user interaction for the lock\nto activate. If the region is null the surface input region is used.\n\nA surface may receive pointer focus without the lock being activated.\n\nThe request creates a new object wp_locked_pointer which is used to\ninteract with the lock as well as receive updates about its state. See\nthe the description of wp_locked_pointer for further information.\n\nNote that while a pointer is locked, the wl_pointer objects of the\ncorresponding seat will not emit any wl_pointer.motion events, but\nrelative motion events will still be emitted via wp_relative_pointer\nobjects of the same seat. wl_pointer.axis and wl_pointer.button events\nare unaffected." ] pub unsafe fn zwp_pointer_constraints_v1_lock_pointer ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 , surface : * mut super :: wl_surface :: wl_surface , pointer : * mut super :: wl_pointer :: wl_pointer , region : * mut super :: wl_region :: wl_region , lifetime : u32 ) -> * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_pointer_constraints_v1 as _ , 1u32 , & super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface , pointer , region , lifetime ) ; return r as _ ; } # [ doc = "confine pointer to a region\n\nThe confine_pointer request lets the client request to confine the\npointer cursor to a given region. This request may not take effect\nimmediately; in the future, when the compositor deems implementation-\nspecific constraints are satisfied, the pointer confinement will be\nactivated and the compositor sends a confined event.\n\nThe intersection of the region passed with this request and the input\nregion of the surface is used to determine where the pointer must be\nin order for the confinement to activate. It is up to the compositor\nwhether to warp the pointer or require some kind of user interaction for\nthe confinement to activate. If the region is null the surface input\nregion is used.\n\nThe request will create a new object wp_confined_pointer which is used\nto interact with the confinement as well as receive updates about its\nstate. See the the description of wp_confined_pointer for further\ninformation." ] pub unsafe fn zwp_pointer_constraints_v1_confine_pointer ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 , surface : * mut super :: wl_surface :: wl_surface , pointer : * mut super :: wl_pointer :: wl_pointer , region : * mut super :: wl_region :: wl_region , lifetime : u32 ) -> * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_pointer_constraints_v1 as _ , 2u32 , & super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface , pointer , region , lifetime ) ; return r as _ ; } } # [ doc = "receive relative pointer motion events\n\nThe wp_locked_pointer interface represents a locked pointer state.\n\nWhile the lock of this object is active, the wl_pointer objects of the\nassociated seat will not emit any wl_pointer.motion events.\n\nThis object will send the event 'locked' when the lock is activated.\nWhenever the lock is activated, it is guaranteed that the locked surface\nwill already have received pointer focus and that the pointer will be\nwithin the region passed to the request creating this object.\n\nTo unlock the pointer, send the destroy request. This will also destroy\nthe wp_locked_pointer object.\n\nIf the compositor decides to unlock the pointer the unlocked event is\nsent. See wp_locked_pointer.unlock for details.\n\nWhen unlocking, the compositor may warp the cursor position to the set\ncursor position hint. If it does, it will not result in any relative\nmotion events emitted via wp_relative_pointer.\n\nIf the surface the lock was requested on is destroyed and the lock is not\nyet activated, the wp_locked_pointer object is now defunct and must be\ndestroyed." ] pub mod zwp_locked_pointer_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_locked_pointer_v1 { } static mut zwp_locked_pointer_v1_requests_set_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_locked_pointer_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_cursor_position_hint\0" as * const u8 as * const c_char , signature : b"ff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_region\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & zwp_locked_pointer_v1_requests_set_region_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_locked_pointer_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"locked\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unlocked\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_locked_pointer_v1_interface : wl_interface = wl_interface { name : b"zwp_locked_pointer_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & zwp_locked_pointer_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_locked_pointer_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_locked_pointer_v1_listener { # [ doc = "lock activation event\n\nNotification that the pointer lock of the seat's pointer is activated." ] fn locked ( & mut self , object : * mut zwp_locked_pointer_v1 , ) { } # [ doc = "lock deactivation event\n\nNotification that the pointer lock of the seat's pointer is no longer\nactive. If this is a oneshot pointer lock (see\nwp_pointer_constraints.lifetime) this object is now defunct and should\nbe destroyed. If this is a persistent pointer lock (see\nwp_pointer_constraints.lifetime) this pointer lock may again\nreactivate in the future." ] fn unlocked ( & mut self , object : * mut zwp_locked_pointer_v1 , ) { } } pub unsafe fn zwp_locked_pointer_v1_set_user_data ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_locked_pointer_v1 as _ , user_data ) ; } pub unsafe fn zwp_locked_pointer_v1_get_user_data ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_locked_pointer_v1 as _ ) ; } pub unsafe fn zwp_locked_pointer_v1_get_version ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_locked_pointer_v1 as _ ) ; } pub unsafe fn zwp_locked_pointer_v1_add_listener ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_locked_pointer_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_locked_pointer_v1_add_rust_listener ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 , listener : & dyn zwp_locked_pointer_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_locked_pointer_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_locked_pointer_v1_add_listener ( zwp_locked_pointer_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the locked pointer object\n\nDestroy the locked pointer object. If applicable, the compositor will\nunlock the pointer." ] pub unsafe fn zwp_locked_pointer_v1_destroy ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_locked_pointer_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_locked_pointer_v1 as _ ) ; } # [ doc = "set the pointer cursor position hint\n\nSet the cursor position hint relative to the top left corner of the\nsurface.\n\nIf the client is drawing its own cursor, it should update the position\nhint to the position of its own cursor. A compositor may use this\ninformation to warp the pointer upon unlock in order to avoid pointer\njumps.\n\nThe cursor position hint is double buffered. The new hint will only take\neffect when the associated surface gets it pending state applied. See\nwl_surface.commit for details." ] pub unsafe fn zwp_locked_pointer_v1_set_cursor_position_hint ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 , surface_x : wl_fixed_t , surface_y : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_locked_pointer_v1 as _ , 1u32 , surface_x , surface_y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set a new lock region\n\nSet a new region used to lock the pointer.\n\nThe new lock region is double-buffered. The new lock region will\nonly take effect when the associated surface gets its pending state\napplied. See wl_surface.commit for details.\n\nFor details about the lock region, see wp_locked_pointer." ] pub unsafe fn zwp_locked_pointer_v1_set_region ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 , region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_locked_pointer_v1 as _ , 2u32 , region , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "confined pointer object\n\nThe wp_confined_pointer interface represents a confined pointer state.\n\nThis object will send the event 'confined' when the confinement is\nactivated. Whenever the confinement is activated, it is guaranteed that\nthe surface the pointer is confined to will already have received pointer\nfocus and that the pointer will be within the region passed to the request\ncreating this object. It is up to the compositor to decide whether this\nrequires some user interaction and if the pointer will warp to within the\npassed region if outside.\n\nTo unconfine the pointer, send the destroy request. This will also destroy\nthe wp_confined_pointer object.\n\nIf the compositor decides to unconfine the pointer the unconfined event is\nsent. The wp_confined_pointer object is at this point defunct and should\nbe destroyed." ] pub mod zwp_confined_pointer_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_confined_pointer_v1 { } static mut zwp_confined_pointer_v1_requests_set_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_confined_pointer_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_region\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & zwp_confined_pointer_v1_requests_set_region_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_confined_pointer_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"confined\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unconfined\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_confined_pointer_v1_interface : wl_interface = wl_interface { name : b"zwp_confined_pointer_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_confined_pointer_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_confined_pointer_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_confined_pointer_v1_listener { # [ doc = "pointer confined\n\nNotification that the pointer confinement of the seat's pointer is\nactivated." ] fn confined ( & mut self , object : * mut zwp_confined_pointer_v1 , ) { } # [ doc = "pointer unconfined\n\nNotification that the pointer confinement of the seat's pointer is no\nlonger active. If this is a oneshot pointer confinement (see\nwp_pointer_constraints.lifetime) this object is now defunct and should\nbe destroyed. If this is a persistent pointer confinement (see\nwp_pointer_constraints.lifetime) this pointer confinement may again\nreactivate in the future." ] fn unconfined ( & mut self , object : * mut zwp_confined_pointer_v1 , ) { } } pub unsafe fn zwp_confined_pointer_v1_set_user_data ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_confined_pointer_v1 as _ , user_data ) ; } pub unsafe fn zwp_confined_pointer_v1_get_user_data ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_confined_pointer_v1 as _ ) ; } pub unsafe fn zwp_confined_pointer_v1_get_version ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_confined_pointer_v1 as _ ) ; } pub unsafe fn zwp_confined_pointer_v1_add_listener ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_confined_pointer_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_confined_pointer_v1_add_rust_listener ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 , listener : & dyn zwp_confined_pointer_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_confined_pointer_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_confined_pointer_v1_add_listener ( zwp_confined_pointer_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the confined pointer object\n\nDestroy the confined pointer object. If applicable, the compositor will\nunconfine the pointer." ] pub unsafe fn zwp_confined_pointer_v1_destroy ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_confined_pointer_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_confined_pointer_v1 as _ ) ; } # [ doc = "set a new confine region\n\nSet a new region used to confine the pointer.\n\nThe new confine region is double-buffered. The new confine region will\nonly take effect when the associated surface gets its pending state\napplied. See wl_surface.commit for details.\n\nIf the confinement is active when the new confinement region is applied\nand the pointer ends up outside of newly applied region, the pointer may\nwarped to a position within the new confinement region. If warped, a\nwl_pointer.motion event will be emitted, but no\nwp_relative_pointer.relative_motion event.\n\nThe compositor may also, instead of using the new region, unconfine the\npointer.\n\nFor details about the confine region, see wp_confined_pointer." ] pub unsafe fn zwp_confined_pointer_v1_set_region ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 , region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_confined_pointer_v1 as _ , 1u32 , region , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod input_method_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "input method context\n\nCorresponds to a text input on the input method side. An input method context\nis created on text input activation on the input method side. It allows\nreceiving information about the text input from the application via events.\nInput method contexts do not keep state after deactivation and should be\ndestroyed after deactivation is handled.\n\nText is generally UTF-8 encoded, indices and lengths are in bytes.\n\nSerials are used to synchronize the state between the text input and\nan input method. New serials are sent by the text input in the\ncommit_state request and are used by the input method to indicate\nthe known text input state in events like preedit_string, commit_string,\nand keysym. The text input can then ignore events from the input method\nwhich are based on an outdated state (for example after a reset).\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_input_method_context_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_input_method_context_v1 { } static mut zwp_input_method_context_v1_requests_grab_keyboard_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_keyboard :: wl_keyboard_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_method_context_v1_requests : [ wl_message ; 14 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_string\0" as * const u8 as * const c_char , signature : b"us\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_string\0" as * const u8 as * const c_char , signature : b"uss\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_styling\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_cursor\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"delete_surrounding_text\0" as * const u8 as * const c_char , signature : b"iu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cursor_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifiers_map\0" as * const u8 as * const c_char , signature : b"a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"keysym\0" as * const u8 as * const c_char , signature : b"uuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"grab_keyboard\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_method_context_v1_requests_grab_keyboard_types as * const _ } , } , wl_message { name : b"key\0" as * const u8 as * const c_char , signature : b"uuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifiers\0" as * const u8 as * const c_char , signature : b"uuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"language\0" as * const u8 as * const c_char , signature : b"us\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"text_direction\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_method_context_v1_events : [ wl_message ; 6 ] = [ wl_message { name : b"surrounding_text\0" as * const u8 as * const c_char , signature : b"suu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"reset\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"content_type\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"invoke_action\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_state\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preferred_language\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_input_method_context_v1_interface : wl_interface = wl_interface { name : b"zwp_input_method_context_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 14 , requests : unsafe { & zwp_input_method_context_v1_requests as * const _ } , event_count : 6 , events : unsafe { & zwp_input_method_context_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_input_method_context_v1_listener { # [ doc = "surrounding text event\n\nThe plain surrounding text around the input position. Cursor is the\nposition in bytes within the surrounding text relative to the beginning\nof the text. Anchor is the position in bytes of the selection anchor\nwithin the surrounding text relative to the beginning of the text. If\nthere is no selected text then anchor is the same as cursor." ] fn surrounding_text ( & mut self , object : * mut zwp_input_method_context_v1 , text : * mut c_char , cursor : u32 , anchor : u32 ) { } # [ doc = "" ] fn reset ( & mut self , object : * mut zwp_input_method_context_v1 , ) { } # [ doc = "" ] fn content_type ( & mut self , object : * mut zwp_input_method_context_v1 , hint : u32 , purpose : u32 ) { } # [ doc = "" ] fn invoke_action ( & mut self , object : * mut zwp_input_method_context_v1 , button : u32 , index : u32 ) { } # [ doc = "" ] fn commit_state ( & mut self , object : * mut zwp_input_method_context_v1 , serial : u32 ) { } # [ doc = "" ] fn preferred_language ( & mut self , object : * mut zwp_input_method_context_v1 , language : * mut c_char ) { } } pub unsafe fn zwp_input_method_context_v1_set_user_data ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_input_method_context_v1 as _ , user_data ) ; } pub unsafe fn zwp_input_method_context_v1_get_user_data ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_input_method_context_v1 as _ ) ; } pub unsafe fn zwp_input_method_context_v1_get_version ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_input_method_context_v1 as _ ) ; } pub unsafe fn zwp_input_method_context_v1_add_listener ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_input_method_context_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_input_method_context_v1_add_rust_listener ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , listener : & dyn zwp_input_method_context_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_input_method_context_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_input_method_context_v1_add_listener ( zwp_input_method_context_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_input_method_context_v1_destroy ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_input_method_context_v1 as _ ) ; } # [ doc = "commit string\n\nSend the commit string text for insertion to the application.\n\nThe text to commit could be either just a single character after a key\npress or the result of some composing (pre-edit). It could be also an\nempty text when some text should be removed (see\ndelete_surrounding_text) or when the input cursor should be moved (see\ncursor_position).\n\nAny previously set composing text will be removed." ] pub unsafe fn zwp_input_method_context_v1_commit_string ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , text : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 1u32 , serial , text , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "pre-edit string\n\nSend the pre-edit string text to the application text input.\n\nThe commit text can be used to replace the pre-edit text on reset (for\nexample on unfocus).\n\nPreviously sent preedit_style and preedit_cursor requests are also\nprocessed by the text_input." ] pub unsafe fn zwp_input_method_context_v1_preedit_string ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , text : * const c_char , commit : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 2u32 , serial , text , commit , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "pre-edit styling\n\nSet the styling information on composing text. The style is applied for\nlength in bytes from index relative to the beginning of\nthe composing text (as byte offset). Multiple styles can\nbe applied to a composing text.\n\nThis request should be sent before sending a preedit_string request." ] pub unsafe fn zwp_input_method_context_v1_preedit_styling ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , index : u32 , length : u32 , style : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 3u32 , index , length , style , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "pre-edit cursor\n\nSet the cursor position inside the composing text (as byte offset)\nrelative to the start of the composing text.\n\nWhen index is negative no cursor should be displayed.\n\nThis request should be sent before sending a preedit_string request." ] pub unsafe fn zwp_input_method_context_v1_preedit_cursor ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , index : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 4u32 , index , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "delete text\n\nRemove the surrounding text.\n\nThis request will be handled on the text_input side directly following\na commit_string request." ] pub unsafe fn zwp_input_method_context_v1_delete_surrounding_text ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , index : i32 , length : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 5u32 , index , length , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set cursor to a new position\n\nSet the cursor and anchor to a new position. Index is the new cursor\nposition in bytes (when >= 0 this is relative to the end of the inserted text,\notherwise it is relative to the beginning of the inserted text). Anchor is\nthe new anchor position in bytes (when >= 0 this is relative to the end of the\ninserted text, otherwise it is relative to the beginning of the inserted\ntext). When there should be no selected text, anchor should be the same\nas index.\n\nThis request will be handled on the text_input side directly following\na commit_string request." ] pub unsafe fn zwp_input_method_context_v1_cursor_position ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , index : i32 , anchor : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 6u32 , index , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zwp_input_method_context_v1_modifiers_map ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , map : * mut wl_array ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 7u32 , map , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "keysym\n\nNotify when a key event was sent. Key events should not be used for\nnormal text input operations, which should be done with commit_string,\ndelete_surrounding_text, etc. The key event follows the wl_keyboard key\nevent convention. Sym is an XKB keysym, state is a wl_keyboard key_state." ] pub unsafe fn zwp_input_method_context_v1_keysym ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , time : u32 , sym : u32 , state : u32 , modifiers : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 8u32 , serial , time , sym , state , modifiers , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "grab hardware keyboard\n\nAllow an input method to receive hardware keyboard input and process\nkey events to generate text events (with pre-edit) over the wire. This\nallows input methods which compose multiple key events for inputting\ntext like it is done for CJK languages." ] pub unsafe fn zwp_input_method_context_v1_grab_keyboard ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 ) -> * mut super :: wl_keyboard :: wl_keyboard { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_input_method_context_v1 as _ , 9u32 , & super :: wl_keyboard :: wl_keyboard_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "forward key event\n\nForward a wl_keyboard::key event to the client that was not processed\nby the input method itself. Should be used when filtering key events\nwith grab_keyboard. The arguments should be the ones from the\nwl_keyboard::key event.\n\nFor generating custom key events use the keysym request instead." ] pub unsafe fn zwp_input_method_context_v1_key ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , time : u32 , key : u32 , state : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 10u32 , serial , time , key , state , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "forward modifiers event\n\nForward a wl_keyboard::modifiers event to the client that was not\nprocessed by the input method itself. Should be used when filtering\nkey events with grab_keyboard. The arguments should be the ones\nfrom the wl_keyboard::modifiers event." ] pub unsafe fn zwp_input_method_context_v1_modifiers ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , mods_depressed : u32 , mods_latched : u32 , mods_locked : u32 , group : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 11u32 , serial , mods_depressed , mods_latched , mods_locked , group , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zwp_input_method_context_v1_language ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , language : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 12u32 , serial , language , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zwp_input_method_context_v1_text_direction ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , direction : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 13u32 , serial , direction , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "input method\n\nAn input method object is responsible for composing text in response to\ninput from hardware or virtual keyboards. There is one input method\nobject per seat. On activate there is a new input method context object\ncreated which allows the input method to communicate with the text input." ] pub mod zwp_input_method_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_input_method_v1 { } static mut zwp_input_method_v1_events_activate_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1_interface as * const wl_interface } , ] ; static mut zwp_input_method_v1_events_deactivate_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_method_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"activate\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_method_v1_events_activate_types as * const _ } , } , wl_message { name : b"deactivate\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_method_v1_events_deactivate_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_input_method_v1_interface : wl_interface = wl_interface { name : b"zwp_input_method_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 2 , events : unsafe { & zwp_input_method_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_input_method_v1_listener { # [ doc = "activate event\n\nA text input was activated. Creates an input method context object\nwhich allows communication with the text input." ] fn activate ( & mut self , object : * mut zwp_input_method_v1 , id : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 ) { } # [ doc = "deactivate event\n\nThe text input corresponding to the context argument was deactivated.\nThe input method context should be destroyed after deactivation is\nhandled." ] fn deactivate ( & mut self , object : * mut zwp_input_method_v1 , context : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 ) { } } pub unsafe fn zwp_input_method_v1_set_user_data ( zwp_input_method_v1 : * mut super :: zwp_input_method_v1 :: zwp_input_method_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_input_method_v1 as _ , user_data ) ; } pub unsafe fn zwp_input_method_v1_get_user_data ( zwp_input_method_v1 : * mut super :: zwp_input_method_v1 :: zwp_input_method_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_input_method_v1 as _ ) ; } pub unsafe fn zwp_input_method_v1_get_version ( zwp_input_method_v1 : * mut super :: zwp_input_method_v1 :: zwp_input_method_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_input_method_v1 as _ ) ; } pub unsafe fn zwp_input_method_v1_add_listener ( zwp_input_method_v1 : * mut super :: zwp_input_method_v1 :: zwp_input_method_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_input_method_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_input_method_v1_add_rust_listener ( zwp_input_method_v1 : * mut super :: zwp_input_method_v1 :: zwp_input_method_v1 , listener : & dyn zwp_input_method_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_input_method_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_input_method_v1_add_listener ( zwp_input_method_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_input_method_v1_destroy ( zwp_input_method_v1 : * mut super :: zwp_input_method_v1 :: zwp_input_method_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_input_method_v1 as _ ) ; } } # [ doc = "interface for implementing keyboards\n\nOnly one client can bind this interface at a time." ] pub mod zwp_input_panel_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_input_panel_v1 { } static mut zwp_input_panel_v1_requests_get_input_panel_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_panel_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"get_input_panel_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_panel_v1_requests_get_input_panel_surface_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_input_panel_v1_interface : wl_interface = wl_interface { name : b"zwp_input_panel_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_input_panel_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_input_panel_v1_listener { } pub unsafe fn zwp_input_panel_v1_set_user_data ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_input_panel_v1 as _ , user_data ) ; } pub unsafe fn zwp_input_panel_v1_get_user_data ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_input_panel_v1 as _ ) ; } pub unsafe fn zwp_input_panel_v1_get_version ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_input_panel_v1 as _ ) ; } pub unsafe fn zwp_input_panel_v1_add_listener ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_input_panel_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_input_panel_v1_add_rust_listener ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 , listener : & dyn zwp_input_panel_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_input_panel_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_input_panel_v1_add_listener ( zwp_input_panel_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_input_panel_v1_destroy ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_input_panel_v1 as _ ) ; } pub unsafe fn zwp_input_panel_v1_get_input_panel_surface ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_input_panel_v1 as _ , 0u32 , & super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } pub mod zwp_input_panel_surface_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_input_panel_surface_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum position { center_bottom = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl position { pub fn from_raw ( n : u32 ) -> Option < position > { match n { 0 => Some ( position :: center_bottom ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_input_panel_surface_v1_requests_set_toplevel_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_panel_surface_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_toplevel\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_panel_surface_v1_requests_set_toplevel_types as * const _ } , } , wl_message { name : b"set_overlay_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_input_panel_surface_v1_interface : wl_interface = wl_interface { name : b"zwp_input_panel_surface_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_input_panel_surface_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_input_panel_surface_v1_listener { } pub unsafe fn zwp_input_panel_surface_v1_set_user_data ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_input_panel_surface_v1 as _ , user_data ) ; } pub unsafe fn zwp_input_panel_surface_v1_get_user_data ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_input_panel_surface_v1 as _ ) ; } pub unsafe fn zwp_input_panel_surface_v1_get_version ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_input_panel_surface_v1 as _ ) ; } pub unsafe fn zwp_input_panel_surface_v1_add_listener ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_input_panel_surface_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_input_panel_surface_v1_add_rust_listener ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 , listener : & dyn zwp_input_panel_surface_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_input_panel_surface_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_input_panel_surface_v1_add_listener ( zwp_input_panel_surface_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_input_panel_surface_v1_destroy ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_input_panel_surface_v1 as _ ) ; } # [ doc = "set the surface type as a keyboard\n\nSet the input_panel_surface type to keyboard.\n\nA keyboard surface is only shown when a text input is active." ] pub unsafe fn zwp_input_panel_surface_v1_set_toplevel ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 , output : * mut super :: wl_output :: wl_output , position : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_panel_surface_v1 as _ , 0u32 , output , position , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the surface type as an overlay panel\n\nSet the input_panel_surface to be an overlay panel.\n\nThis is shown near the input cursor above the application window when\na text input is active." ] pub unsafe fn zwp_input_panel_surface_v1_set_overlay_panel ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_panel_surface_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod kde_output_device_v2 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; # [ doc = "output configuration representation\n\nAn output device describes a display device available to the compositor.\noutput_device is similar to wl_output, but focuses on output\nconfiguration management.\n\nA client can query all global output_device objects to enlist all\navailable display devices, even those that may currently not be\nrepresented by the compositor as a wl_output.\n\nThe client sends configuration changes to the server through the\noutputconfiguration interface, and the server applies the configuration\nchanges to the hardware and signals changes to the output devices\naccordingly.\n\nThis object is published as global during start up for every available\ndisplay devices, or when one later becomes available, for example by\nbeing hotplugged via a physical connector." ] pub mod kde_output_device_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum kde_output_device_v2 { } # [ doc = "subpixel geometry information\n\nThis enumeration describes how the physical pixels on an output are\nlaid out." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum subpixel { unknown = 0 , none = 1 , horizontal_rgb = 2 , horizontal_bgr = 3 , vertical_rgb = 4 , vertical_bgr = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl subpixel { pub fn from_raw ( n : u32 ) -> Option < subpixel > { match n { 0 => Some ( subpixel :: unknown ) , 1 => Some ( subpixel :: none ) , 2 => Some ( subpixel :: horizontal_rgb ) , 3 => Some ( subpixel :: horizontal_bgr ) , 4 => Some ( subpixel :: vertical_rgb ) , 5 => Some ( subpixel :: vertical_bgr ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "transform from framebuffer to output\n\nThis describes the transform, that a compositor will apply to a\nsurface to compensate for the rotation or mirroring of an\noutput device.\n\nThe flipped values correspond to an initial flip around a\nvertical axis followed by rotation.\n\nThe purpose is mainly to allow clients to render accordingly and\ntell the compositor, so that for fullscreen surfaces, the\ncompositor is still able to scan out directly client surfaces." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum transform { normal = 0 , _90 = 1 , _180 = 2 , _270 = 3 , flipped = 4 , flipped_90 = 5 , flipped_180 = 6 , flipped_270 = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl transform { pub fn from_raw ( n : u32 ) -> Option < transform > { match n { 0 => Some ( transform :: normal ) , 1 => Some ( transform :: _90 ) , 2 => Some ( transform :: _180 ) , 3 => Some ( transform :: _270 ) , 4 => Some ( transform :: flipped ) , 5 => Some ( transform :: flipped_90 ) , 6 => Some ( transform :: flipped_180 ) , 7 => Some ( transform :: flipped_270 ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { # [ doc = "describes capabilities of the outputdevice\n\nDescribes what capabilities this device has." ] pub struct capability : u32 { # [ doc = "if this output_device can use overscan" ] const overscan = 1 ; # [ doc = "if this outputdevice supports variable refresh rate" ] const vrr = 2 ; # [ doc = "if setting the rgb range is possible" ] const rgb_range = 4 ; } } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { Some ( capability :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = "describes vrr policy\n\nDescribes when the compositor may employ variable refresh rate" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum vrr_policy { never = 0 , always = 1 , automatic = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl vrr_policy { pub fn from_raw ( n : u32 ) -> Option < vrr_policy > { match n { 0 => Some ( vrr_policy :: never ) , 1 => Some ( vrr_policy :: always ) , 2 => Some ( vrr_policy :: automatic ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "describes RGB range policy\n\nWhether full or limited color range should be used" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum rgb_range { automatic = 0 , full = 1 , limited = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl rgb_range { pub fn from_raw ( n : u32 ) -> Option < rgb_range > { match n { 0 => Some ( rgb_range :: automatic ) , 1 => Some ( rgb_range :: full ) , 2 => Some ( rgb_range :: limited ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut kde_output_device_v2_events_current_mode_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2_interface as * const wl_interface } , ] ; static mut kde_output_device_v2_events_mode_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut kde_output_device_v2_events : [ wl_message ; 14 ] = [ wl_message { name : b"geometry\0" as * const u8 as * const c_char , signature : b"iiiiissi\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"current_mode\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & kde_output_device_v2_events_current_mode_types as * const _ } , } , wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & kde_output_device_v2_events_mode_types as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"scale\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"edid\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"enabled\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"uuid\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"serial_number\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"eisa_id\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"overscan\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"vrr_policy\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"rgb_range\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut kde_output_device_v2_interface : wl_interface = wl_interface { name : b"kde_output_device_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 14 , events : unsafe { & kde_output_device_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait kde_output_device_v2_listener { # [ doc = "geometric properties of the output\n\nThe geometry event describes geometric properties of the output.\nThe event is sent when binding to the output object and whenever\nany of the properties change." ] fn geometry ( & mut self , object : * mut kde_output_device_v2 , x : i32 , y : i32 , physical_width : i32 , physical_height : i32 , subpixel : i32 , make : * mut c_char , model : * mut c_char , transform : i32 ) { } # [ doc = "current mode\n\nThis event describes the mode currently in use for this head. It is only\nsent if the output is enabled." ] fn current_mode ( & mut self , object : * mut kde_output_device_v2 , mode : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 ) { } # [ doc = "advertise available output modes and current one\n\nThe mode event describes an available mode for the output.\n\nWhen the client binds to the output_device object, the server sends this\nevent once for every available mode the output_device can be operated by.\n\nThere will always be at least one event sent out on initial binding,\nwhich represents the current mode.\n\nLater if an output changes, its mode event is sent again for the\neventual added modes and lastly the current mode. In other words, the\ncurrent mode is always represented by the latest event sent with the current\nflag set.\n\nThe size of a mode is given in physical hardware units of the output device.\nThis is not necessarily the same as the output size in the global compositor\nspace. For instance, the output may be scaled, as described in\nkde_output_device_v2.scale, or transformed, as described in\nkde_output_device_v2.transform." ] fn mode ( & mut self , object : * mut kde_output_device_v2 , mode : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 ) { } # [ doc = "sent all information about output\n\nThis event is sent after all other properties have been\nsent on binding to the output object as well as after any\nother output property change have been applied later on.\nThis allows to see changes to the output properties as atomic,\neven if multiple events successively announce them." ] fn done ( & mut self , object : * mut kde_output_device_v2 , ) { } # [ doc = "output scaling properties\n\nThis event contains scaling geometry information\nthat is not in the geometry event. It may be sent after\nbinding the output object or if the output scale changes\nlater. If it is not sent, the client should assume a\nscale of 1.\n\nA scale larger than 1 means that the compositor will\nautomatically scale surface buffers by this amount\nwhen rendering. This is used for high resolution\ndisplays where applications rendering at the native\nresolution would be too small to be legible.\n\nIt is intended that scaling aware clients track the\ncurrent output of a surface, and if it is on a scaled\noutput it should use wl_surface.set_buffer_scale with\nthe scale of the output. That way the compositor can\navoid scaling the surface, and the client can supply\na higher detail image." ] fn scale ( & mut self , object : * mut kde_output_device_v2 , factor : wl_fixed_t ) { } # [ doc = "advertise EDID data for the output\n\nThe edid event encapsulates the EDID data for the outputdevice.\n\nThe event is sent when binding to the output object. The EDID\ndata may be empty, in which case this event is sent anyway.\nIf the EDID information is empty, you can fall back to the name\net al. properties of the outputdevice." ] fn edid ( & mut self , object : * mut kde_output_device_v2 , raw : * mut c_char ) { } # [ doc = "output is enabled or disabled\n\nThe enabled event notifies whether this output is currently\nenabled and used for displaying content by the server.\nThe event is sent when binding to the output object and\nwhenever later on an output changes its state by becoming\nenabled or disabled." ] fn enabled ( & mut self , object : * mut kde_output_device_v2 , enabled : i32 ) { } # [ doc = "A unique id for this outputdevice\n\nThe uuid can be used to identify the output. It's controlled by\nthe server entirely. The server should make sure the uuid is\npersistent across restarts. An empty uuid is considered invalid." ] fn uuid ( & mut self , object : * mut kde_output_device_v2 , uuid : * mut c_char ) { } # [ doc = "Serial Number\n\nSerial ID of the monitor, sent on startup before the first done event." ] fn serial_number ( & mut self , object : * mut kde_output_device_v2 , serialNumber : * mut c_char ) { } # [ doc = "EISA ID\n\nEISA ID of the monitor, sent on startup before the first done event." ] fn eisa_id ( & mut self , object : * mut kde_output_device_v2 , eisaId : * mut c_char ) { } # [ doc = "capability flags\n\nWhat capabilities this device has, sent on startup before the first\ndone event." ] fn capabilities ( & mut self , object : * mut kde_output_device_v2 , flags : capability ) { } # [ doc = "overscan\n\nOverscan value of the monitor in percent, sent on startup before the\nfirst done event." ] fn overscan ( & mut self , object : * mut kde_output_device_v2 , overscan : u32 ) { } # [ doc = "Variable Refresh Rate Policy\n\nWhat policy the compositor will employ regarding its use of variable\nrefresh rate." ] fn vrr_policy ( & mut self , object : * mut kde_output_device_v2 , vrr_policy : vrr_policy ) { } # [ doc = "RGB range\n\nWhat rgb range the compositor is using for this output" ] fn rgb_range ( & mut self , object : * mut kde_output_device_v2 , rgb_range : rgb_range ) { } } pub unsafe fn kde_output_device_v2_set_user_data ( kde_output_device_v2 : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , kde_output_device_v2 as _ , user_data ) ; } pub unsafe fn kde_output_device_v2_get_user_data ( kde_output_device_v2 : * mut super :: kde_output_device_v2 :: kde_output_device_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , kde_output_device_v2 as _ ) ; } pub unsafe fn kde_output_device_v2_get_version ( kde_output_device_v2 : * mut super :: kde_output_device_v2 :: kde_output_device_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , kde_output_device_v2 as _ ) ; } pub unsafe fn kde_output_device_v2_add_listener ( kde_output_device_v2 : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , kde_output_device_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn kde_output_device_v2_add_rust_listener ( kde_output_device_v2 : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , listener : & dyn kde_output_device_v2_listener ) -> bool { let to = ( listener as * const dyn kde_output_device_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return kde_output_device_v2_add_listener ( kde_output_device_v2 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn kde_output_device_v2_destroy ( kde_output_device_v2 : * mut super :: kde_output_device_v2 :: kde_output_device_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , kde_output_device_v2 as _ ) ; } } # [ doc = "output mode\n\nThis object describes an output mode.\n\nSome heads don't support output modes, in which case modes won't be\nadvertised.\n\nProperties sent via this interface are applied atomically via the\nkde_output_device.done event. No guarantees are made regarding the order\nin which properties are sent." ] pub mod kde_output_device_mode_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum kde_output_device_mode_v2 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut kde_output_device_mode_v2_events : [ wl_message ; 4 ] = [ wl_message { name : b"size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"refresh\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preferred\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut kde_output_device_mode_v2_interface : wl_interface = wl_interface { name : b"kde_output_device_mode_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 4 , events : unsafe { & kde_output_device_mode_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait kde_output_device_mode_v2_listener { # [ doc = "mode size\n\nThis event describes the mode size. The size is given in physical\nhardware units of the output device. This is not necessarily the same as\nthe output size in the global compositor space. For instance, the output\nmay be scaled or transformed." ] fn size ( & mut self , object : * mut kde_output_device_mode_v2 , width : i32 , height : i32 ) { } # [ doc = "mode refresh rate\n\nThis event describes the mode's fixed vertical refresh rate. It is only\nsent if the mode has a fixed refresh rate." ] fn refresh ( & mut self , object : * mut kde_output_device_mode_v2 , refresh : i32 ) { } # [ doc = "mode is preferred\n\nThis event advertises this mode as preferred." ] fn preferred ( & mut self , object : * mut kde_output_device_mode_v2 , ) { } # [ doc = "the mode has been destroyed\n\nThe compositor will destroy the object immediately after sending this\nevent, so it will become invalid and the client should release any\nresources associated with it." ] fn removed ( & mut self , object : * mut kde_output_device_mode_v2 , ) { } } pub unsafe fn kde_output_device_mode_v2_set_user_data ( kde_output_device_mode_v2 : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , kde_output_device_mode_v2 as _ , user_data ) ; } pub unsafe fn kde_output_device_mode_v2_get_user_data ( kde_output_device_mode_v2 : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , kde_output_device_mode_v2 as _ ) ; } pub unsafe fn kde_output_device_mode_v2_get_version ( kde_output_device_mode_v2 : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , kde_output_device_mode_v2 as _ ) ; } pub unsafe fn kde_output_device_mode_v2_add_listener ( kde_output_device_mode_v2 : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , kde_output_device_mode_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn kde_output_device_mode_v2_add_rust_listener ( kde_output_device_mode_v2 : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 , listener : & dyn kde_output_device_mode_v2_listener ) -> bool { let to = ( listener as * const dyn kde_output_device_mode_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return kde_output_device_mode_v2_add_listener ( kde_output_device_mode_v2 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn kde_output_device_mode_v2_destroy ( kde_output_device_mode_v2 : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , kde_output_device_mode_v2 as _ ) ; } } } pub mod kde_output_management_v2 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "configuration of server outputs through clients\n\nThis interface enables clients to set properties of output devices for screen\nconfiguration purposes via the server. To this end output devices are referenced\nby global kde_output_device_v2 objects.\n\noutputmanagement (wl_global)\n--------------------------\nrequest:\n* create_configuration -> outputconfiguration (wl_resource)\n\noutputconfiguration (wl_resource)\n--------------------------\nrequests:\n* enable(outputdevice, bool)\n* mode(outputdevice, mode)\n* transformation(outputdevice, flag)\n* position(outputdevice, x, y)\n* apply\n\nevents:\n* applied\n* failed\n\nThe server registers one outputmanagement object as a global object. In order\nto configure outputs a client requests create_configuration, which provides a\nresource referencing an outputconfiguration for one-time configuration. That\nway the server knows which requests belong together and can group them by that.\n\nOn the outputconfiguration object the client calls for each output whether the\noutput should be enabled, which mode should be set (by referencing the mode from\nthe list of announced modes) and the output's global position. Once all outputs\nare configured that way, the client calls apply.\nAt that point and not earlier the server should try to apply the configuration.\nIf this succeeds the server emits the applied signal, otherwise the failed\nsignal, such that the configuring client is noticed about the success of its\nconfiguration request.\n\nThrough this design the interface enables atomic output configuration changes if\ninternally supported by the server." ] pub mod kde_output_management_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum kde_output_management_v2 { } static mut kde_output_management_v2_requests_create_configuration_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: kde_output_configuration_v2 :: kde_output_configuration_v2_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut kde_output_management_v2_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create_configuration\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & kde_output_management_v2_requests_create_configuration_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut kde_output_management_v2_interface : wl_interface = wl_interface { name : b"kde_output_management_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & kde_output_management_v2_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait kde_output_management_v2_listener { } pub unsafe fn kde_output_management_v2_set_user_data ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , kde_output_management_v2 as _ , user_data ) ; } pub unsafe fn kde_output_management_v2_get_user_data ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , kde_output_management_v2 as _ ) ; } pub unsafe fn kde_output_management_v2_get_version ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , kde_output_management_v2 as _ ) ; } pub unsafe fn kde_output_management_v2_add_listener ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , kde_output_management_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn kde_output_management_v2_add_rust_listener ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 , listener : & dyn kde_output_management_v2_listener ) -> bool { let to = ( listener as * const dyn kde_output_management_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return kde_output_management_v2_add_listener ( kde_output_management_v2 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn kde_output_management_v2_destroy ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , kde_output_management_v2 as _ ) ; } # [ doc = "provide outputconfiguration object for configuring outputs\n\nRequest an outputconfiguration object through which the client can configure\noutput devices." ] pub unsafe fn kde_output_management_v2_create_configuration ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 ) -> * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , kde_output_management_v2 as _ , 0u32 , & super :: kde_output_configuration_v2 :: kde_output_configuration_v2_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "configure single output devices\n\noutputconfiguration is a client-specific resource that can be used to ask\nthe server to apply changes to available output devices.\n\nThe client receives a list of output devices from the registry. When it wants\nto apply new settings, it creates a configuration object from the\noutputmanagement global, writes changes through this object's enable, scale,\ntransform and mode calls. It then asks the server to apply these settings in\nan atomic fashion, for example through Linux' DRM interface.\n\nThe server signals back whether the new settings have applied successfully\nor failed to apply. outputdevice objects are updated after the changes have been\napplied to the hardware and before the server side sends the applied event." ] pub mod kde_output_configuration_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum kde_output_configuration_v2 { } # [ doc = "describes vrr policy\n\nDescribes when the compositor may employ variable refresh rate" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum vrr_policy { never = 0 , always = 1 , automatic = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl vrr_policy { pub fn from_raw ( n : u32 ) -> Option < vrr_policy > { match n { 0 => Some ( vrr_policy :: never ) , 1 => Some ( vrr_policy :: always ) , 2 => Some ( vrr_policy :: automatic ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "describes RGB range policy\n\nWhether this output should use full or limited rgb." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum rgb_range { automatic = 0 , full = 1 , limited = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl rgb_range { pub fn from_raw ( n : u32 ) -> Option < rgb_range > { match n { 0 => Some ( rgb_range :: automatic ) , 1 => Some ( rgb_range :: full ) , 2 => Some ( rgb_range :: limited ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut kde_output_configuration_v2_requests_enable_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut kde_output_configuration_v2_requests_mode_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , unsafe { & super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2_interface as * const wl_interface } , ] ; static mut kde_output_configuration_v2_requests_transform_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut kde_output_configuration_v2_requests_position_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut kde_output_configuration_v2_requests_scale_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut kde_output_configuration_v2_requests_overscan_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut kde_output_configuration_v2_requests_set_vrr_policy_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut kde_output_configuration_v2_requests_set_rgb_range_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut kde_output_configuration_v2_requests : [ wl_message ; 10 ] = [ wl_message { name : b"enable\0" as * const u8 as * const c_char , signature : b"oi\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_enable_types as * const _ } , } , wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"oo\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_mode_types as * const _ } , } , wl_message { name : b"transform\0" as * const u8 as * const c_char , signature : b"oi\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_transform_types as * const _ } , } , wl_message { name : b"position\0" as * const u8 as * const c_char , signature : b"oii\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_position_types as * const _ } , } , wl_message { name : b"scale\0" as * const u8 as * const c_char , signature : b"of\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_scale_types as * const _ } , } , wl_message { name : b"apply\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"overscan\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_overscan_types as * const _ } , } , wl_message { name : b"set_vrr_policy\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_set_vrr_policy_types as * const _ } , } , wl_message { name : b"set_rgb_range\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_set_rgb_range_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut kde_output_configuration_v2_events : [ wl_message ; 2 ] = [ wl_message { name : b"applied\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"failed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut kde_output_configuration_v2_interface : wl_interface = wl_interface { name : b"kde_output_configuration_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 10 , requests : unsafe { & kde_output_configuration_v2_requests as * const _ } , event_count : 2 , events : unsafe { & kde_output_configuration_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait kde_output_configuration_v2_listener { # [ doc = "configuration changes have been applied\n\nSent after the server has successfully applied the changes.\n." ] fn applied ( & mut self , object : * mut kde_output_configuration_v2 , ) { } # [ doc = "configuration changes failed to apply\n\nSent if the server rejects the changes or failed to apply them." ] fn failed ( & mut self , object : * mut kde_output_configuration_v2 , ) { } } pub unsafe fn kde_output_configuration_v2_set_user_data ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , kde_output_configuration_v2 as _ , user_data ) ; } pub unsafe fn kde_output_configuration_v2_get_user_data ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , kde_output_configuration_v2 as _ ) ; } pub unsafe fn kde_output_configuration_v2_get_version ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , kde_output_configuration_v2 as _ ) ; } pub unsafe fn kde_output_configuration_v2_add_listener ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , kde_output_configuration_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn kde_output_configuration_v2_add_rust_listener ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , listener : & dyn kde_output_configuration_v2_listener ) -> bool { let to = ( listener as * const dyn kde_output_configuration_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return kde_output_configuration_v2_add_listener ( kde_output_configuration_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "enable or disable an output\n\nMark the output as enabled or disabled." ] pub unsafe fn kde_output_configuration_v2_enable ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , enable : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 0u32 , outputdevice , enable , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "switch output-device to mode\n\nSets the mode for a given output." ] pub unsafe fn kde_output_configuration_v2_mode ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , mode : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 1u32 , outputdevice , mode , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "transform output-device\n\nSets the transformation for a given output." ] pub unsafe fn kde_output_configuration_v2_transform ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , transform : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 2u32 , outputdevice , transform , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "position output in global space\n\nSets the position for this output device. (x,y) describe the top-left corner\nof the output in global space, whereby the origin (0,0) of the global space\nhas to be aligned with the top-left corner of the most left and in case this\ndoes not define a single one the top output.\n\nThere may be no gaps or overlaps between outputs, i.e. the outputs are\nstacked horizontally, vertically, or both on each other." ] pub unsafe fn kde_output_configuration_v2_position ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 3u32 , outputdevice , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set scaling factor of this output\n\nSets the scaling factor for this output device." ] pub unsafe fn kde_output_configuration_v2_scale ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , scale : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 4u32 , outputdevice , scale , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "apply configuration changes to all output devices\n\nAsks the server to apply property changes requested through this outputconfiguration\nobject to all outputs on the server side." ] pub unsafe fn kde_output_configuration_v2_apply ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 5u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the outputconfiguration object" ] pub unsafe fn kde_output_configuration_v2_destroy ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 6u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , kde_output_configuration_v2 as _ ) ; } # [ doc = "set overscan value\n\nSet the overscan value of this output device with a value in percent." ] pub unsafe fn kde_output_configuration_v2_overscan ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , overscan : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 7u32 , outputdevice , overscan , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the VRR policy\n\nSet what policy the compositor should employ regarding its use of\nvariable refresh rate." ] pub unsafe fn kde_output_configuration_v2_set_vrr_policy ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , policy : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 8u32 , outputdevice , policy , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "RGB range\n\nWhether full or limited color range should be used" ] pub unsafe fn kde_output_configuration_v2_set_rgb_range ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , rgb_range : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 9u32 , outputdevice , rgb_range , std :: ptr :: null :: < c_void > ( ) ) ; } } } [INFO] [stdout] | ~~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> /opt/rustwide/target/debug/build/wayland-raw-protocol-bindings-cb634f59c146b0af/out/client.rs:1:2302 [INFO] [stdout] | [INFO] [stdout] 1 | ... { & super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1_interface as * const wl_interface } , NULLPTR a... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 1 | use std :: os :: raw :: { c_char , c_void } ; const NULLPTR : * const c_void = 0 as * const c_void ; static mut types_null : [ * const sys :: common :: wl_interface ; 8 ] = [ NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , NULLPTR as * const sys :: common :: wl_interface , ] ; pub mod zkde_screencast_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Protocol for managing PipeWire feeds of the different displays and windows." ] pub mod zkde_screencast_unstable_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zkde_screencast_unstable_v1 { } # [ doc = "Stream consumer attachment attributes" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum pointer { # [ doc = "No cursor" ] hidden = 1 , # [ doc = "Render the cursor on the stream" ] embedded = 2 , # [ doc = "Send metadata about where the cursor is through PipeWire" ] metadata = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl pointer { pub fn from_raw ( n : u32 ) -> Option < pointer > { match n { 1 => Some ( pointer :: hidden ) , 2 => Some ( pointer :: embedded ) , 4 => Some ( pointer :: metadata ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zkde_screencast_unstable_v1_requests_stream_output_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1_interface as * const wl_interface } , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut zkde_screencast_unstable_v1_requests_stream_window_types : [ * const wl_interface ; 3 ] = [ unsafe { &raw const super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zkde_screencast_unstable_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"stream_output\0" as * const u8 as * const c_char , signature : b"nou\0" as * const u8 as * const c_char , types : unsafe { & zkde_screencast_unstable_v1_requests_stream_output_types as * const _ } , } , wl_message { name : b"stream_window\0" as * const u8 as * const c_char , signature : b"nsu\0" as * const u8 as * const c_char , types : unsafe { & zkde_screencast_unstable_v1_requests_stream_window_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zkde_screencast_unstable_v1_interface : wl_interface = wl_interface { name : b"zkde_screencast_unstable_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & zkde_screencast_unstable_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zkde_screencast_unstable_v1_listener { } pub unsafe fn zkde_screencast_unstable_v1_set_user_data ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zkde_screencast_unstable_v1 as _ , user_data ) ; } pub unsafe fn zkde_screencast_unstable_v1_get_user_data ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zkde_screencast_unstable_v1 as _ ) ; } pub unsafe fn zkde_screencast_unstable_v1_get_version ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zkde_screencast_unstable_v1 as _ ) ; } pub unsafe fn zkde_screencast_unstable_v1_add_listener ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zkde_screencast_unstable_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zkde_screencast_unstable_v1_add_rust_listener ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 , listener : & dyn zkde_screencast_unstable_v1_listener ) -> bool { let to = ( listener as * const dyn zkde_screencast_unstable_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zkde_screencast_unstable_v1_add_listener ( zkde_screencast_unstable_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "requests a feed from a given source" ] pub unsafe fn zkde_screencast_unstable_v1_stream_output ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 , output : * mut super :: wl_output :: wl_output , pointer : u32 ) -> * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zkde_screencast_unstable_v1 as _ , 0u32 , & super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , output , pointer ) ; return r as _ ; } # [ doc = "requests a feed from a given source" ] pub unsafe fn zkde_screencast_unstable_v1_stream_window ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 , window_uuid : * const c_char , pointer : u32 ) -> * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zkde_screencast_unstable_v1 as _ , 1u32 , & super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , window_uuid , pointer ) ; return r as _ ; } # [ doc = "Destroy the zkde_screencast_unstable_v1\n\nDestroy the zkde_screencast_unstable_v1 object." ] pub unsafe fn zkde_screencast_unstable_v1_destroy ( zkde_screencast_unstable_v1 : * mut super :: zkde_screencast_unstable_v1 :: zkde_screencast_unstable_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zkde_screencast_unstable_v1 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zkde_screencast_unstable_v1 as _ ) ; } } pub mod zkde_screencast_stream_unstable_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zkde_screencast_stream_unstable_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zkde_screencast_stream_unstable_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"close\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zkde_screencast_stream_unstable_v1_events : [ wl_message ; 3 ] = [ wl_message { name : b"closed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"created\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"failed\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zkde_screencast_stream_unstable_v1_interface : wl_interface = wl_interface { name : b"zkde_screencast_stream_unstable_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zkde_screencast_stream_unstable_v1_requests as * const _ } , event_count : 3 , events : unsafe { & zkde_screencast_stream_unstable_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zkde_screencast_stream_unstable_v1_listener { # [ doc = "Notifies that the server has stopped the stream. Clients should now call close." ] fn closed ( & mut self , object : * mut zkde_screencast_stream_unstable_v1 , ) { } # [ doc = "Notifies about a pipewire feed being created" ] fn created ( & mut self , object : * mut zkde_screencast_stream_unstable_v1 , node : u32 ) { } # [ doc = "Offers an error message so the client knows the created event will not arrive, and the client should close the resource." ] fn failed ( & mut self , object : * mut zkde_screencast_stream_unstable_v1 , error : * mut c_char ) { } } pub unsafe fn zkde_screencast_stream_unstable_v1_set_user_data ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zkde_screencast_stream_unstable_v1 as _ , user_data ) ; } pub unsafe fn zkde_screencast_stream_unstable_v1_get_user_data ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zkde_screencast_stream_unstable_v1 as _ ) ; } pub unsafe fn zkde_screencast_stream_unstable_v1_get_version ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zkde_screencast_stream_unstable_v1 as _ ) ; } pub unsafe fn zkde_screencast_stream_unstable_v1_add_listener ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zkde_screencast_stream_unstable_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zkde_screencast_stream_unstable_v1_add_rust_listener ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 , listener : & dyn zkde_screencast_stream_unstable_v1_listener ) -> bool { let to = ( listener as * const dyn zkde_screencast_stream_unstable_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zkde_screencast_stream_unstable_v1_add_listener ( zkde_screencast_stream_unstable_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zkde_screencast_stream_unstable_v1_destroy ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zkde_screencast_stream_unstable_v1 as _ ) ; } # [ doc = "Indicates we are done with the stream and the communication is over." ] pub unsafe fn zkde_screencast_stream_unstable_v1_close ( zkde_screencast_stream_unstable_v1 : * mut super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zkde_screencast_stream_unstable_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zkde_screencast_stream_unstable_v1 as _ ) ; } } } pub mod gtk { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "gtk specific extensions\n\ngtk_shell is a protocol extension providing additional features for\nclients implementing it." ] pub mod gtk_shell1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum gtk_shell1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum capability { global_app_menu = 1 , global_menu_bar = 2 , desktop_icons = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { match n { 1 => Some ( capability :: global_app_menu ) , 2 => Some ( capability :: global_menu_bar ) , 3 => Some ( capability :: desktop_icons ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut gtk_shell1_requests_get_gtk_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: gtk_surface1 :: gtk_surface1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut gtk_shell1_requests_system_bell_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: gtk_surface1 :: gtk_surface1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut gtk_shell1_requests : [ wl_message ; 4 ] = [ wl_message { name : b"get_gtk_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & gtk_shell1_requests_get_gtk_surface_types as * const _ } , } , wl_message { name : b"set_startup_id\0" as * const u8 as * const c_char , signature : b"?s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"system_bell\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & gtk_shell1_requests_system_bell_types as * const _ } , } , wl_message { name : b"notify_launch\0" as * const u8 as * const c_char , signature : b"3s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut gtk_shell1_events : [ wl_message ; 1 ] = [ wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut gtk_shell1_interface : wl_interface = wl_interface { name : b"gtk_shell1\0" as * const u8 as * const c_char , version : 5 , request_count : 4 , requests : unsafe { & gtk_shell1_requests as * const _ } , event_count : 1 , events : unsafe { & gtk_shell1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait gtk_shell1_listener { # [ doc = "" ] fn capabilities ( & mut self , object : * mut gtk_shell1 , capabilities : u32 ) { } } pub unsafe fn gtk_shell1_set_user_data ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , gtk_shell1 as _ , user_data ) ; } pub unsafe fn gtk_shell1_get_user_data ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , gtk_shell1 as _ ) ; } pub unsafe fn gtk_shell1_get_version ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , gtk_shell1 as _ ) ; } pub unsafe fn gtk_shell1_add_listener ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , gtk_shell1 as _ , listener as _ , data as _ ) ; } pub unsafe fn gtk_shell1_add_rust_listener ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , listener : & dyn gtk_shell1_listener ) -> bool { let to = ( listener as * const dyn gtk_shell1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return gtk_shell1_add_listener ( gtk_shell1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn gtk_shell1_destroy ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , gtk_shell1 as _ ) ; } pub unsafe fn gtk_shell1_get_gtk_surface ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: gtk_surface1 :: gtk_surface1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , gtk_shell1 as _ , 0u32 , & super :: gtk_surface1 :: gtk_surface1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } pub unsafe fn gtk_shell1_set_startup_id ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , startup_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_shell1 as _ , 1u32 , startup_id , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_shell1_system_bell ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , surface : * mut super :: gtk_surface1 :: gtk_surface1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_shell1 as _ , 2u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_shell1_notify_launch ( gtk_shell1 : * mut super :: gtk_shell1 :: gtk_shell1 , startup_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_shell1 as _ , 3u32 , startup_id , std :: ptr :: null :: < c_void > ( ) ) ; } } pub mod gtk_surface1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum gtk_surface1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum state { tiled = 1 , tiled_top = 2 , tiled_right = 3 , tiled_bottom = 4 , tiled_left = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl state { pub fn from_raw ( n : u32 ) -> Option < state > { match n { 1 => Some ( state :: tiled ) , 2 => Some ( state :: tiled_top ) , 3 => Some ( state :: tiled_right ) , 4 => Some ( state :: tiled_bottom ) , 5 => Some ( state :: tiled_left ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum edge_constraint { resizable_top = 1 , resizable_right = 2 , resizable_bottom = 3 , resizable_left = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl edge_constraint { pub fn from_raw ( n : u32 ) -> Option < edge_constraint > { match n { 1 => Some ( edge_constraint :: resizable_top ) , 2 => Some ( edge_constraint :: resizable_right ) , 3 => Some ( edge_constraint :: resizable_bottom ) , 4 => Some ( edge_constraint :: resizable_left ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum gesture { double_click = 1 , right_click = 2 , middle_click = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl gesture { pub fn from_raw ( n : u32 ) -> Option < gesture > { match n { 1 => Some ( gesture :: double_click ) , 2 => Some ( gesture :: right_click ) , 3 => Some ( gesture :: middle_click ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { invalid_gesture = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_gesture ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut gtk_surface1_requests_titlebar_gesture_types : [ * const wl_interface ; 3 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut gtk_surface1_requests : [ wl_message ; 7 ] = [ wl_message { name : b"set_dbus_properties\0" as * const u8 as * const c_char , signature : b"?s?s?s?s?s?s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_modal\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unset_modal\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"present\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"request_focus\0" as * const u8 as * const c_char , signature : b"3?s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"4\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"titlebar_gesture\0" as * const u8 as * const c_char , signature : b"5uou\0" as * const u8 as * const c_char , types : unsafe { & gtk_surface1_requests_titlebar_gesture_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut gtk_surface1_events : [ wl_message ; 2 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"configure_edges\0" as * const u8 as * const c_char , signature : b"2a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut gtk_surface1_interface : wl_interface = wl_interface { name : b"gtk_surface1\0" as * const u8 as * const c_char , version : 5 , request_count : 7 , requests : unsafe { & gtk_surface1_requests as * const _ } , event_count : 2 , events : unsafe { & gtk_surface1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait gtk_surface1_listener { # [ doc = "" ] fn configure ( & mut self , object : * mut gtk_surface1 , states : * mut wl_array ) { } # [ doc = "Only available since version 2 of the interface." ] fn configure_edges ( & mut self , object : * mut gtk_surface1 , constraints : * mut wl_array ) { } } pub unsafe fn gtk_surface1_set_user_data ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , gtk_surface1 as _ , user_data ) ; } pub unsafe fn gtk_surface1_get_user_data ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , gtk_surface1 as _ ) ; } pub unsafe fn gtk_surface1_get_version ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , gtk_surface1 as _ ) ; } pub unsafe fn gtk_surface1_add_listener ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , gtk_surface1 as _ , listener as _ , data as _ ) ; } pub unsafe fn gtk_surface1_add_rust_listener ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , listener : & dyn gtk_surface1_listener ) -> bool { let to = ( listener as * const dyn gtk_surface1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return gtk_surface1_add_listener ( gtk_surface1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn gtk_surface1_destroy ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , gtk_surface1 as _ ) ; } pub unsafe fn gtk_surface1_set_dbus_properties ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , application_id : * const c_char , app_menu_path : * const c_char , menubar_path : * const c_char , window_object_path : * const c_char , application_object_path : * const c_char , unique_bus_name : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 0u32 , application_id , app_menu_path , menubar_path , window_object_path , application_object_path , unique_bus_name , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_surface1_set_modal ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_surface1_unset_modal ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_surface1_present ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , time : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 3u32 , time , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_surface1_request_focus ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , startup_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 4u32 , startup_id , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn gtk_surface1_release ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 5u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , gtk_surface1 as _ ) ; } pub unsafe fn gtk_surface1_titlebar_gesture ( gtk_surface1 : * mut super :: gtk_surface1 :: gtk_surface1 , serial : u32 , seat : * mut super :: wl_seat :: wl_seat , gesture : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , gtk_surface1 as _ , 6u32 , serial , seat , gesture , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod wayland { # [ doc = "core global object\n\nThe core global object. This is a special singleton object. It\nis used for internal Wayland protocol features." ] pub mod wl_display { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_display { } # [ doc = "global error values\n\nThese errors are global and can be emitted in response to any\nserver request." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "server couldn't find object" ] invalid_object = 0 , # [ doc = "method doesn't exist on the specified interface" ] invalid_method = 1 , # [ doc = "server is out of memory" ] no_memory = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_object ) , 1 => Some ( error :: invalid_method ) , 2 => Some ( error :: no_memory ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_display_requests_sync_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_callback :: wl_callback_interface as * const wl_interface } , ] ; static mut wl_display_requests_get_registry_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_registry :: wl_registry_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_display_requests : [ wl_message ; 2 ] = [ wl_message { name : b"sync\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_display_requests_sync_types as * const _ } , } , wl_message { name : b"get_registry\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_display_requests_get_registry_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_display_events : [ wl_message ; 2 ] = [ wl_message { name : b"error\0" as * const u8 as * const c_char , signature : b"ous\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"delete_id\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_display_interface : wl_interface = wl_interface { name : b"wl_display\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & wl_display_requests as * const _ } , event_count : 2 , events : unsafe { & wl_display_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_display_listener { # [ doc = "fatal error event\n\nThe error event is sent out when a fatal (non-recoverable)\nerror has occurred. The object_id argument is the object\nwhere the error occurred, most often in response to a request\nto that object. The code identifies the error and is defined\nby the object interface. As such, each interface defines its\nown set of error codes. The message is a brief description\nof the error, for (debugging) convenience." ] fn error ( & mut self , object : * mut wl_display , object_id : * mut wl_proxy , code : u32 , message : * mut c_char ) { } # [ doc = "acknowledge object ID deletion\n\nThis event is used internally by the object ID management\nlogic. When a client deletes an object, the server will send\nthis event to acknowledge that it has seen the delete request.\nWhen the client receives this event, it will know that it can\nsafely reuse the object ID." ] fn delete_id ( & mut self , object : * mut wl_display , id : u32 ) { } } pub unsafe fn wl_display_set_user_data ( wl_display : * mut super :: wl_display :: wl_display , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_display as _ , user_data ) ; } pub unsafe fn wl_display_get_user_data ( wl_display : * mut super :: wl_display :: wl_display ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_display as _ ) ; } pub unsafe fn wl_display_get_version ( wl_display : * mut super :: wl_display :: wl_display ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_display as _ ) ; } pub unsafe fn wl_display_add_listener ( wl_display : * mut super :: wl_display :: wl_display , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_display as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_display_add_rust_listener ( wl_display : * mut super :: wl_display :: wl_display , listener : & dyn wl_display_listener ) -> bool { let to = ( listener as * const dyn wl_display_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_display_add_listener ( wl_display as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "asynchronous roundtrip\n\nThe sync request asks the server to emit the 'done' event\non the returned wl_callback object. Since requests are\nhandled in-order and events are delivered in-order, this can\nbe used as a barrier to ensure all previous requests and the\nresulting events have been handled.\n\nThe object returned by this request will be destroyed by the\ncompositor after the callback is fired and as such the client must not\nattempt to use it after that point.\n\nThe callback_data passed in the callback is the event serial." ] pub unsafe fn wl_display_sync ( wl_display : * mut super :: wl_display :: wl_display ) -> * mut super :: wl_callback :: wl_callback { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_display as _ , 0u32 , & super :: wl_callback :: wl_callback_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "get global registry object\n\nThis request creates a registry object that allows the client\nto list and bind the global objects available from the\ncompositor.\n\nIt should be noted that the server side resources consumed in\nresponse to a get_registry request can only be released when the\nclient disconnects, not when the client side proxy is destroyed.\nTherefore, clients should invoke get_registry as infrequently as\npossible to avoid wasting memory." ] pub unsafe fn wl_display_get_registry ( wl_display : * mut super :: wl_display :: wl_display ) -> * mut super :: wl_registry :: wl_registry { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_display as _ , 1u32 , & super :: wl_registry :: wl_registry_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "global registry object\n\nThe singleton global registry object. The server has a number of\nglobal objects that are available to all clients. These objects\ntypically represent an actual object in the server (for example,\nan input device) or they are singleton objects that provide\nextension functionality.\n\nWhen a client creates a registry object, the registry object\nwill emit a global event for each global currently in the\nregistry. Globals come and go as a result of device or\nmonitor hotplugs, reconfiguration or other events, and the\nregistry will send out global and global_remove events to\nkeep the client up to date with the changes. To mark the end\nof the initial burst of events, the client can use the\nwl_display.sync request immediately after calling\nwl_display.get_registry.\n\nA client can bind to a global object by using the bind\nrequest. This creates a client-side handle that lets the object\nemit events to the client and lets the client invoke requests on\nthe object." ] pub mod wl_registry { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_registry { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_registry_requests : [ wl_message ; 1 ] = [ wl_message { name : b"bind\0" as * const u8 as * const c_char , signature : b"usun\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_registry_events : [ wl_message ; 2 ] = [ wl_message { name : b"global\0" as * const u8 as * const c_char , signature : b"usu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"global_remove\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_registry_interface : wl_interface = wl_interface { name : b"wl_registry\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wl_registry_requests as * const _ } , event_count : 2 , events : unsafe { & wl_registry_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_registry_listener { # [ doc = "announce global object\n\nNotify the client of global objects.\n\nThe event notifies the client that a global object with\nthe given name is now available, and it implements the\ngiven version of the given interface." ] fn global ( & mut self , object : * mut wl_registry , name : u32 , interface : * mut c_char , version : u32 ) { } # [ doc = "announce removal of global object\n\nNotify the client of removed global objects.\n\nThis event notifies the client that the global identified\nby name is no longer available. If the client bound to\nthe global using the bind request, the client should now\ndestroy that object.\n\nThe object remains valid and requests to the object will be\nignored until the client destroys it, to avoid races between\nthe global going away and a client sending a request to it." ] fn global_remove ( & mut self , object : * mut wl_registry , name : u32 ) { } } pub unsafe fn wl_registry_set_user_data ( wl_registry : * mut super :: wl_registry :: wl_registry , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_registry as _ , user_data ) ; } pub unsafe fn wl_registry_get_user_data ( wl_registry : * mut super :: wl_registry :: wl_registry ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_registry as _ ) ; } pub unsafe fn wl_registry_get_version ( wl_registry : * mut super :: wl_registry :: wl_registry ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_registry as _ ) ; } pub unsafe fn wl_registry_add_listener ( wl_registry : * mut super :: wl_registry :: wl_registry , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_registry as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_registry_add_rust_listener ( wl_registry : * mut super :: wl_registry :: wl_registry , listener : & dyn wl_registry_listener ) -> bool { let to = ( listener as * const dyn wl_registry_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_registry_add_listener ( wl_registry as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_registry_destroy ( wl_registry : * mut super :: wl_registry :: wl_registry ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_registry as _ ) ; } # [ doc = "bind an object to the display\n\nBinds a new, client-created object to the server using the\nspecified name as the identifier." ] pub unsafe fn wl_registry_bind ( wl_registry : * mut super :: wl_registry :: wl_registry , name : u32 , interface : * mut wl_interface , version : u32 ) -> * mut wl_proxy { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor_versioned , wl_registry as _ , 0u32 , interface as _ , version , name , ( * interface ) . name , version , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "callback object\n\nClients can handle the 'done' event to get notified when\nthe related request is done." ] pub mod wl_callback { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_callback { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_callback_events : [ wl_message ; 1 ] = [ wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_callback_interface : wl_interface = wl_interface { name : b"wl_callback\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 1 , events : unsafe { & wl_callback_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_callback_listener { # [ doc = "done event\n\nNotify the client when the related request is done." ] fn done ( & mut self , object : * mut wl_callback , callback_data : u32 ) { } } pub unsafe fn wl_callback_set_user_data ( wl_callback : * mut super :: wl_callback :: wl_callback , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_callback as _ , user_data ) ; } pub unsafe fn wl_callback_get_user_data ( wl_callback : * mut super :: wl_callback :: wl_callback ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_callback as _ ) ; } pub unsafe fn wl_callback_get_version ( wl_callback : * mut super :: wl_callback :: wl_callback ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_callback as _ ) ; } pub unsafe fn wl_callback_add_listener ( wl_callback : * mut super :: wl_callback :: wl_callback , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_callback as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_callback_add_rust_listener ( wl_callback : * mut super :: wl_callback :: wl_callback , listener : & dyn wl_callback_listener ) -> bool { let to = ( listener as * const dyn wl_callback_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_callback_add_listener ( wl_callback as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_callback_destroy ( wl_callback : * mut super :: wl_callback :: wl_callback ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_callback as _ ) ; } } # [ doc = "the compositor singleton\n\nA compositor. This object is a singleton global. The\ncompositor is in charge of combining the contents of multiple\nsurfaces into one displayable output." ] pub mod wl_compositor { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_compositor { } static mut wl_compositor_requests_create_surface_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut wl_compositor_requests_create_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_compositor_requests : [ wl_message ; 2 ] = [ wl_message { name : b"create_surface\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_compositor_requests_create_surface_types as * const _ } , } , wl_message { name : b"create_region\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_compositor_requests_create_region_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_compositor_interface : wl_interface = wl_interface { name : b"wl_compositor\0" as * const u8 as * const c_char , version : 4 , request_count : 2 , requests : unsafe { & wl_compositor_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_compositor_listener { } pub unsafe fn wl_compositor_set_user_data ( wl_compositor : * mut super :: wl_compositor :: wl_compositor , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_compositor as _ , user_data ) ; } pub unsafe fn wl_compositor_get_user_data ( wl_compositor : * mut super :: wl_compositor :: wl_compositor ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_compositor as _ ) ; } pub unsafe fn wl_compositor_get_version ( wl_compositor : * mut super :: wl_compositor :: wl_compositor ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_compositor as _ ) ; } pub unsafe fn wl_compositor_add_listener ( wl_compositor : * mut super :: wl_compositor :: wl_compositor , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_compositor as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_compositor_add_rust_listener ( wl_compositor : * mut super :: wl_compositor :: wl_compositor , listener : & dyn wl_compositor_listener ) -> bool { let to = ( listener as * const dyn wl_compositor_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_compositor_add_listener ( wl_compositor as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_compositor_destroy ( wl_compositor : * mut super :: wl_compositor :: wl_compositor ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_compositor as _ ) ; } # [ doc = "create new surface\n\nAsk the compositor to create a new surface." ] pub unsafe fn wl_compositor_create_surface ( wl_compositor : * mut super :: wl_compositor :: wl_compositor ) -> * mut super :: wl_surface :: wl_surface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_compositor as _ , 0u32 , & super :: wl_surface :: wl_surface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "create new region\n\nAsk the compositor to create a new region." ] pub unsafe fn wl_compositor_create_region ( wl_compositor : * mut super :: wl_compositor :: wl_compositor ) -> * mut super :: wl_region :: wl_region { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_compositor as _ , 1u32 , & super :: wl_region :: wl_region_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "a shared memory pool\n\nThe wl_shm_pool object encapsulates a piece of memory shared\nbetween the compositor and client. Through the wl_shm_pool\nobject, the client can allocate shared memory wl_buffer objects.\nAll objects created through the same pool share the same\nunderlying mapped memory. Reusing the mapped memory avoids the\nsetup/teardown overhead and is useful when interactively resizing\na surface or for many small buffers." ] pub mod wl_shm_pool { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_shm_pool { } static mut wl_shm_pool_requests_create_buffer_types : [ * const wl_interface ; 6 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_shm_pool_requests : [ wl_message ; 3 ] = [ wl_message { name : b"create_buffer\0" as * const u8 as * const c_char , signature : b"niiiiu\0" as * const u8 as * const c_char , types : unsafe { & wl_shm_pool_requests_create_buffer_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"resize\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_shm_pool_interface : wl_interface = wl_interface { name : b"wl_shm_pool\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & wl_shm_pool_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_shm_pool_listener { } pub unsafe fn wl_shm_pool_set_user_data ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_shm_pool as _ , user_data ) ; } pub unsafe fn wl_shm_pool_get_user_data ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_shm_pool as _ ) ; } pub unsafe fn wl_shm_pool_get_version ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_shm_pool as _ ) ; } pub unsafe fn wl_shm_pool_add_listener ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_shm_pool as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_shm_pool_add_rust_listener ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool , listener : & dyn wl_shm_pool_listener ) -> bool { let to = ( listener as * const dyn wl_shm_pool_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_shm_pool_add_listener ( wl_shm_pool as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "create a buffer from the pool\n\nCreate a wl_buffer object from the pool.\n\nThe buffer is created offset bytes into the pool and has\nwidth and height as specified. The stride argument specifies\nthe number of bytes from the beginning of one row to the beginning\nof the next. The format is the pixel format of the buffer and\nmust be one of those advertised through the wl_shm.format event.\n\nA buffer will keep a reference to the pool it was created from\nso it is valid to destroy the pool immediately after creating\na buffer from it." ] pub unsafe fn wl_shm_pool_create_buffer ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool , offset : i32 , width : i32 , height : i32 , stride : i32 , format : u32 ) -> * mut super :: wl_buffer :: wl_buffer { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_shm_pool as _ , 0u32 , & super :: wl_buffer :: wl_buffer_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , offset , width , height , stride , format ) ; return r as _ ; } # [ doc = "destroy the pool\n\nDestroy the shared memory pool.\n\nThe mmapped memory will be released when all\nbuffers that have been created from this pool\nare gone." ] pub unsafe fn wl_shm_pool_destroy ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shm_pool as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_shm_pool as _ ) ; } # [ doc = "change the size of the pool mapping\n\nThis request will cause the server to remap the backing memory\nfor the pool from the file descriptor passed when the pool was\ncreated, but using the new size. This request can only be\nused to make the pool bigger." ] pub unsafe fn wl_shm_pool_resize ( wl_shm_pool : * mut super :: wl_shm_pool :: wl_shm_pool , size : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shm_pool as _ , 2u32 , size , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "shared memory support\n\nA singleton global object that provides support for shared\nmemory.\n\nClients can create wl_shm_pool objects using the create_pool\nrequest.\n\nAt connection setup time, the wl_shm object emits one or more\nformat events to inform clients about the valid pixel formats\nthat can be used for buffers." ] pub mod wl_shm { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_shm { } # [ doc = "wl_shm error values\n\nThese errors can be emitted in response to wl_shm requests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "buffer format is not known" ] invalid_format = 0 , # [ doc = "invalid size or stride during pool or buffer creation" ] invalid_stride = 1 , # [ doc = "mmapping the file descriptor failed" ] invalid_fd = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_format ) , 1 => Some ( error :: invalid_stride ) , 2 => Some ( error :: invalid_fd ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "pixel formats\n\nThis describes the memory layout of an individual pixel.\n\nAll renderers should support argb8888 and xrgb8888 but any other\nformats are optional and may not be supported by the particular\nrenderer in use.\n\nThe drm format codes match the macros defined in drm_fourcc.h.\nThe formats actually supported by the compositor will be\nreported by the format event." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum format { # [ doc = "32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian" ] argb8888 = 0 , # [ doc = "32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian" ] xrgb8888 = 1 , # [ doc = "8-bit color index format, [7:0] C" ] c8 = 538982467 , # [ doc = "8-bit RGB format, [7:0] R:G:B 3:3:2" ] rgb332 = 943867730 , # [ doc = "8-bit BGR format, [7:0] B:G:R 2:3:3" ] bgr233 = 944916290 , # [ doc = "16-bit xRGB format, [15:0] x:R:G:B 4:4:4:4 little endian" ] xrgb4444 = 842093144 , # [ doc = "16-bit xBGR format, [15:0] x:B:G:R 4:4:4:4 little endian" ] xbgr4444 = 842089048 , # [ doc = "16-bit RGBx format, [15:0] R:G:B:x 4:4:4:4 little endian" ] rgbx4444 = 842094674 , # [ doc = "16-bit BGRx format, [15:0] B:G:R:x 4:4:4:4 little endian" ] bgrx4444 = 842094658 , # [ doc = "16-bit ARGB format, [15:0] A:R:G:B 4:4:4:4 little endian" ] argb4444 = 842093121 , # [ doc = "16-bit ABGR format, [15:0] A:B:G:R 4:4:4:4 little endian" ] abgr4444 = 842089025 , # [ doc = "16-bit RBGA format, [15:0] R:G:B:A 4:4:4:4 little endian" ] rgba4444 = 842088786 , # [ doc = "16-bit BGRA format, [15:0] B:G:R:A 4:4:4:4 little endian" ] bgra4444 = 842088770 , # [ doc = "16-bit xRGB format, [15:0] x:R:G:B 1:5:5:5 little endian" ] xrgb1555 = 892424792 , # [ doc = "16-bit xBGR 1555 format, [15:0] x:B:G:R 1:5:5:5 little endian" ] xbgr1555 = 892420696 , # [ doc = "16-bit RGBx 5551 format, [15:0] R:G:B:x 5:5:5:1 little endian" ] rgbx5551 = 892426322 , # [ doc = "16-bit BGRx 5551 format, [15:0] B:G:R:x 5:5:5:1 little endian" ] bgrx5551 = 892426306 , # [ doc = "16-bit ARGB 1555 format, [15:0] A:R:G:B 1:5:5:5 little endian" ] argb1555 = 892424769 , # [ doc = "16-bit ABGR 1555 format, [15:0] A:B:G:R 1:5:5:5 little endian" ] abgr1555 = 892420673 , # [ doc = "16-bit RGBA 5551 format, [15:0] R:G:B:A 5:5:5:1 little endian" ] rgba5551 = 892420434 , # [ doc = "16-bit BGRA 5551 format, [15:0] B:G:R:A 5:5:5:1 little endian" ] bgra5551 = 892420418 , # [ doc = "16-bit RGB 565 format, [15:0] R:G:B 5:6:5 little endian" ] rgb565 = 909199186 , # [ doc = "16-bit BGR 565 format, [15:0] B:G:R 5:6:5 little endian" ] bgr565 = 909199170 , # [ doc = "24-bit RGB format, [23:0] R:G:B little endian" ] rgb888 = 875710290 , # [ doc = "24-bit BGR format, [23:0] B:G:R little endian" ] bgr888 = 875710274 , # [ doc = "32-bit xBGR format, [31:0] x:B:G:R 8:8:8:8 little endian" ] xbgr8888 = 875709016 , # [ doc = "32-bit RGBx format, [31:0] R:G:B:x 8:8:8:8 little endian" ] rgbx8888 = 875714642 , # [ doc = "32-bit BGRx format, [31:0] B:G:R:x 8:8:8:8 little endian" ] bgrx8888 = 875714626 , # [ doc = "32-bit ABGR format, [31:0] A:B:G:R 8:8:8:8 little endian" ] abgr8888 = 875708993 , # [ doc = "32-bit RGBA format, [31:0] R:G:B:A 8:8:8:8 little endian" ] rgba8888 = 875708754 , # [ doc = "32-bit BGRA format, [31:0] B:G:R:A 8:8:8:8 little endian" ] bgra8888 = 875708738 , # [ doc = "32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian" ] xrgb2101010 = 808669784 , # [ doc = "32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian" ] xbgr2101010 = 808665688 , # [ doc = "32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian" ] rgbx1010102 = 808671314 , # [ doc = "32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian" ] bgrx1010102 = 808671298 , # [ doc = "32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian" ] argb2101010 = 808669761 , # [ doc = "32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian" ] abgr2101010 = 808665665 , # [ doc = "32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian" ] rgba1010102 = 808665426 , # [ doc = "32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian" ] bgra1010102 = 808665410 , # [ doc = "packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian" ] yuyv = 1448695129 , # [ doc = "packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian" ] yvyu = 1431918169 , # [ doc = "packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian" ] uyvy = 1498831189 , # [ doc = "packed YCbCr format, [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian" ] vyuy = 1498765654 , # [ doc = "packed AYCbCr format, [31:0] A:Y:Cb:Cr 8:8:8:8 little endian" ] ayuv = 1448433985 , # [ doc = "2 plane YCbCr Cr:Cb format, 2x2 subsampled Cr:Cb plane" ] nv12 = 842094158 , # [ doc = "2 plane YCbCr Cb:Cr format, 2x2 subsampled Cb:Cr plane" ] nv21 = 825382478 , # [ doc = "2 plane YCbCr Cr:Cb format, 2x1 subsampled Cr:Cb plane" ] nv16 = 909203022 , # [ doc = "2 plane YCbCr Cb:Cr format, 2x1 subsampled Cb:Cr plane" ] nv61 = 825644622 , # [ doc = "3 plane YCbCr format, 4x4 subsampled Cb (1) and Cr (2) planes" ] yuv410 = 961959257 , # [ doc = "3 plane YCbCr format, 4x4 subsampled Cr (1) and Cb (2) planes" ] yvu410 = 961893977 , # [ doc = "3 plane YCbCr format, 4x1 subsampled Cb (1) and Cr (2) planes" ] yuv411 = 825316697 , # [ doc = "3 plane YCbCr format, 4x1 subsampled Cr (1) and Cb (2) planes" ] yvu411 = 825316953 , # [ doc = "3 plane YCbCr format, 2x2 subsampled Cb (1) and Cr (2) planes" ] yuv420 = 842093913 , # [ doc = "3 plane YCbCr format, 2x2 subsampled Cr (1) and Cb (2) planes" ] yvu420 = 842094169 , # [ doc = "3 plane YCbCr format, 2x1 subsampled Cb (1) and Cr (2) planes" ] yuv422 = 909202777 , # [ doc = "3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes" ] yvu422 = 909203033 , # [ doc = "3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes" ] yuv444 = 875713881 , # [ doc = "3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes" ] yvu444 = 875714137 , # [ doc ( hidden ) ] __nonexhaustive , } impl format { pub fn from_raw ( n : u32 ) -> Option < format > { match n { 0 => Some ( format :: argb8888 ) , 1 => Some ( format :: xrgb8888 ) , 538982467 => Some ( format :: c8 ) , 943867730 => Some ( format :: rgb332 ) , 944916290 => Some ( format :: bgr233 ) , 842093144 => Some ( format :: xrgb4444 ) , 842089048 => Some ( format :: xbgr4444 ) , 842094674 => Some ( format :: rgbx4444 ) , 842094658 => Some ( format :: bgrx4444 ) , 842093121 => Some ( format :: argb4444 ) , 842089025 => Some ( format :: abgr4444 ) , 842088786 => Some ( format :: rgba4444 ) , 842088770 => Some ( format :: bgra4444 ) , 892424792 => Some ( format :: xrgb1555 ) , 892420696 => Some ( format :: xbgr1555 ) , 892426322 => Some ( format :: rgbx5551 ) , 892426306 => Some ( format :: bgrx5551 ) , 892424769 => Some ( format :: argb1555 ) , 892420673 => Some ( format :: abgr1555 ) , 892420434 => Some ( format :: rgba5551 ) , 892420418 => Some ( format :: bgra5551 ) , 909199186 => Some ( format :: rgb565 ) , 909199170 => Some ( format :: bgr565 ) , 875710290 => Some ( format :: rgb888 ) , 875710274 => Some ( format :: bgr888 ) , 875709016 => Some ( format :: xbgr8888 ) , 875714642 => Some ( format :: rgbx8888 ) , 875714626 => Some ( format :: bgrx8888 ) , 875708993 => Some ( format :: abgr8888 ) , 875708754 => Some ( format :: rgba8888 ) , 875708738 => Some ( format :: bgra8888 ) , 808669784 => Some ( format :: xrgb2101010 ) , 808665688 => Some ( format :: xbgr2101010 ) , 808671314 => Some ( format :: rgbx1010102 ) , 808671298 => Some ( format :: bgrx1010102 ) , 808669761 => Some ( format :: argb2101010 ) , 808665665 => Some ( format :: abgr2101010 ) , 808665426 => Some ( format :: rgba1010102 ) , 808665410 => Some ( format :: bgra1010102 ) , 1448695129 => Some ( format :: yuyv ) , 1431918169 => Some ( format :: yvyu ) , 1498831189 => Some ( format :: uyvy ) , 1498765654 => Some ( format :: vyuy ) , 1448433985 => Some ( format :: ayuv ) , 842094158 => Some ( format :: nv12 ) , 825382478 => Some ( format :: nv21 ) , 909203022 => Some ( format :: nv16 ) , 825644622 => Some ( format :: nv61 ) , 961959257 => Some ( format :: yuv410 ) , 961893977 => Some ( format :: yvu410 ) , 825316697 => Some ( format :: yuv411 ) , 825316953 => Some ( format :: yvu411 ) , 842093913 => Some ( format :: yuv420 ) , 842094169 => Some ( format :: yvu420 ) , 909202777 => Some ( format :: yuv422 ) , 909203033 => Some ( format :: yvu422 ) , 875713881 => Some ( format :: yuv444 ) , 875714137 => Some ( format :: yvu444 ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_shm_requests_create_pool_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_shm_pool :: wl_shm_pool_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_shm_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create_pool\0" as * const u8 as * const c_char , signature : b"nhi\0" as * const u8 as * const c_char , types : unsafe { & wl_shm_requests_create_pool_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_shm_events : [ wl_message ; 1 ] = [ wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_shm_interface : wl_interface = wl_interface { name : b"wl_shm\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wl_shm_requests as * const _ } , event_count : 1 , events : unsafe { & wl_shm_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_shm_listener { # [ doc = "pixel format description\n\nInforms the client about a valid pixel format that\ncan be used for buffers. Known formats include\nargb8888 and xrgb8888." ] fn format ( & mut self , object : * mut wl_shm , format : format ) { } } pub unsafe fn wl_shm_set_user_data ( wl_shm : * mut super :: wl_shm :: wl_shm , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_shm as _ , user_data ) ; } pub unsafe fn wl_shm_get_user_data ( wl_shm : * mut super :: wl_shm :: wl_shm ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_shm as _ ) ; } pub unsafe fn wl_shm_get_version ( wl_shm : * mut super :: wl_shm :: wl_shm ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_shm as _ ) ; } pub unsafe fn wl_shm_add_listener ( wl_shm : * mut super :: wl_shm :: wl_shm , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_shm as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_shm_add_rust_listener ( wl_shm : * mut super :: wl_shm :: wl_shm , listener : & dyn wl_shm_listener ) -> bool { let to = ( listener as * const dyn wl_shm_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_shm_add_listener ( wl_shm as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_shm_destroy ( wl_shm : * mut super :: wl_shm :: wl_shm ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_shm as _ ) ; } # [ doc = "create a shm pool\n\nCreate a new wl_shm_pool object.\n\nThe pool can be used to create shared memory based buffer\nobjects. The server will mmap size bytes of the passed file\ndescriptor, to use as backing memory for the pool." ] pub unsafe fn wl_shm_create_pool ( wl_shm : * mut super :: wl_shm :: wl_shm , fd : :: std :: os :: unix :: io :: RawFd , size : i32 ) -> * mut super :: wl_shm_pool :: wl_shm_pool { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_shm as _ , 0u32 , & super :: wl_shm_pool :: wl_shm_pool_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , fd , size ) ; return r as _ ; } } # [ doc = "content for a wl_surface\n\nA buffer provides the content for a wl_surface. Buffers are\ncreated through factory interfaces such as wl_drm, wl_shm or\nsimilar. It has a width and a height and can be attached to a\nwl_surface, but the mechanism by which a client provides and\nupdates the contents is defined by the buffer factory interface." ] pub mod wl_buffer { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_buffer { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_buffer_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_buffer_events : [ wl_message ; 1 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_buffer_interface : wl_interface = wl_interface { name : b"wl_buffer\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wl_buffer_requests as * const _ } , event_count : 1 , events : unsafe { & wl_buffer_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_buffer_listener { # [ doc = "compositor releases buffer\n\nSent when this wl_buffer is no longer used by the compositor.\nThe client is now free to reuse or destroy this buffer and its\nbacking storage.\n\nIf a client receives a release event before the frame callback\nrequested in the same wl_surface.commit that attaches this\nwl_buffer to a surface, then the client is immediately free to\nreuse the buffer and its backing storage, and does not need a\nsecond buffer for the next surface content update. Typically\nthis is possible, when the compositor maintains a copy of the\nwl_surface contents, e.g. as a GL texture. This is an important\noptimization for GL(ES) compositors with wl_shm clients." ] fn release ( & mut self , object : * mut wl_buffer , ) { } } pub unsafe fn wl_buffer_set_user_data ( wl_buffer : * mut super :: wl_buffer :: wl_buffer , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_buffer as _ , user_data ) ; } pub unsafe fn wl_buffer_get_user_data ( wl_buffer : * mut super :: wl_buffer :: wl_buffer ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_buffer as _ ) ; } pub unsafe fn wl_buffer_get_version ( wl_buffer : * mut super :: wl_buffer :: wl_buffer ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_buffer as _ ) ; } pub unsafe fn wl_buffer_add_listener ( wl_buffer : * mut super :: wl_buffer :: wl_buffer , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_buffer as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_buffer_add_rust_listener ( wl_buffer : * mut super :: wl_buffer :: wl_buffer , listener : & dyn wl_buffer_listener ) -> bool { let to = ( listener as * const dyn wl_buffer_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_buffer_add_listener ( wl_buffer as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy a buffer\n\nDestroy a buffer. If and how you need to release the backing\nstorage is defined by the buffer factory interface.\n\nFor possible side-effects to a surface, see wl_surface.attach." ] pub unsafe fn wl_buffer_destroy ( wl_buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_buffer as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_buffer as _ ) ; } } # [ doc = "offer to transfer data\n\nA wl_data_offer represents a piece of data offered for transfer\nby another client (the source client). It is used by the\ncopy-and-paste and drag-and-drop mechanisms. The offer\ndescribes the different mime types that the data can be\nconverted to and provides the mechanism for transferring the\ndata directly from the source client." ] pub mod wl_data_offer { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_data_offer { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "finish request was called untimely" ] invalid_finish = 0 , # [ doc = "action mask contains invalid values" ] invalid_action_mask = 1 , # [ doc = "action argument has an invalid value" ] invalid_action = 2 , # [ doc = "offer doesn't accept this request" ] invalid_offer = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_finish ) , 1 => Some ( error :: invalid_action_mask ) , 2 => Some ( error :: invalid_action ) , 3 => Some ( error :: invalid_offer ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_offer_requests : [ wl_message ; 5 ] = [ wl_message { name : b"accept\0" as * const u8 as * const c_char , signature : b"u?s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"receive\0" as * const u8 as * const c_char , signature : b"sh\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"finish\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_actions\0" as * const u8 as * const c_char , signature : b"3uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_offer_events : [ wl_message ; 3 ] = [ wl_message { name : b"offer\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"source_actions\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"action\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_data_offer_interface : wl_interface = wl_interface { name : b"wl_data_offer\0" as * const u8 as * const c_char , version : 3 , request_count : 5 , requests : unsafe { & wl_data_offer_requests as * const _ } , event_count : 3 , events : unsafe { & wl_data_offer_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_data_offer_listener { # [ doc = "advertise offered mime type\n\nSent immediately after creating the wl_data_offer object. One\nevent per offered mime type." ] fn offer ( & mut self , object : * mut wl_data_offer , mime_type : * mut c_char ) { } # [ doc = "notify the source-side available actions\n\nThis event indicates the actions offered by the data source. It\nwill be sent right after wl_data_device.enter, or anytime the source\nside changes its offered actions through wl_data_source.set_actions.\n\nOnly available since version 3 of the interface." ] fn source_actions ( & mut self , object : * mut wl_data_offer , source_actions : u32 ) { } # [ doc = "notify the selected action\n\nThis event indicates the action selected by the compositor after\nmatching the source/destination side actions. Only one action (or\nnone) will be offered here.\n\nThis event can be emitted multiple times during the drag-and-drop\noperation in response to destination side action changes through\nwl_data_offer.set_actions.\n\nThis event will no longer be emitted after wl_data_device.drop\nhappened on the drag-and-drop destination, the client must\nhonor the last action received, or the last preferred one set\nthrough wl_data_offer.set_actions when handling an \"ask\" action.\n\nCompositors may also change the selected action on the fly, mainly\nin response to keyboard modifier changes during the drag-and-drop\noperation.\n\nThe most recent action received is always the valid one. Prior to\nreceiving wl_data_device.drop, the chosen action may change (e.g.\ndue to keyboard modifiers being pressed). At the time of receiving\nwl_data_device.drop the drag-and-drop destination must honor the\nlast action received.\n\nAction changes may still happen after wl_data_device.drop,\nespecially on \"ask\" actions, where the drag-and-drop destination\nmay choose another action afterwards. Action changes happening\nat this stage are always the result of inter-client negotiation, the\ncompositor shall no longer be able to induce a different action.\n\nUpon \"ask\" actions, it is expected that the drag-and-drop destination\nmay potentially choose a different action and/or mime type,\nbased on wl_data_offer.source_actions and finally chosen by the\nuser (e.g. popping up a menu with the available options). The\nfinal wl_data_offer.set_actions and wl_data_offer.accept requests\nmust happen before the call to wl_data_offer.finish.\n\nOnly available since version 3 of the interface." ] fn action ( & mut self , object : * mut wl_data_offer , dnd_action : u32 ) { } } pub unsafe fn wl_data_offer_set_user_data ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_data_offer as _ , user_data ) ; } pub unsafe fn wl_data_offer_get_user_data ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_data_offer as _ ) ; } pub unsafe fn wl_data_offer_get_version ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_data_offer as _ ) ; } pub unsafe fn wl_data_offer_add_listener ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_data_offer as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_data_offer_add_rust_listener ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer , listener : & dyn wl_data_offer_listener ) -> bool { let to = ( listener as * const dyn wl_data_offer_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_data_offer_add_listener ( wl_data_offer as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "accept one of the offered mime types\n\nIndicate that the client can accept the given mime type, or\nNULL for not accepted.\n\nFor objects of version 2 or older, this request is used by the\nclient to give feedback whether the client can receive the given\nmime type, or NULL if none is accepted; the feedback does not\ndetermine whether the drag-and-drop operation succeeds or not.\n\nFor objects of version 3 or newer, this request determines the\nfinal result of the drag-and-drop operation. If the end result\nis that no mime types were accepted, the drag-and-drop operation\nwill be cancelled and the corresponding drag source will receive\nwl_data_source.cancelled. Clients may still use this event in\nconjunction with wl_data_source.action for feedback." ] pub unsafe fn wl_data_offer_accept ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer , serial : u32 , mime_type : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_offer as _ , 0u32 , serial , mime_type , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "request that the data is transferred\n\nTo transfer the offered data, the client issues this request\nand indicates the mime type it wants to receive. The transfer\nhappens through the passed file descriptor (typically created\nwith the pipe system call). The source client writes the data\nin the mime type representation requested and then closes the\nfile descriptor.\n\nThe receiving client reads from the read end of the pipe until\nEOF and then closes its end, at which point the transfer is\ncomplete.\n\nThis request may happen multiple times for different mime types,\nboth before and after wl_data_device.drop. Drag-and-drop destination\nclients may preemptively fetch data or examine it more closely to\ndetermine acceptance." ] pub unsafe fn wl_data_offer_receive ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer , mime_type : * const c_char , fd : :: std :: os :: unix :: io :: RawFd ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_offer as _ , 1u32 , mime_type , fd , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy data offer\n\nDestroy the data offer." ] pub unsafe fn wl_data_offer_destroy ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_offer as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_data_offer as _ ) ; } # [ doc = "the offer will no longer be used\n\nNotifies the compositor that the drag destination successfully\nfinished the drag-and-drop operation.\n\nUpon receiving this request, the compositor will emit\nwl_data_source.dnd_finished on the drag source client.\n\nIt is a client error to perform other requests than\nwl_data_offer.destroy after this one. It is also an error to perform\nthis request after a NULL mime type has been set in\nwl_data_offer.accept or no action was received through\nwl_data_offer.action." ] pub unsafe fn wl_data_offer_finish ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_offer as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the available/preferred drag-and-drop actions\n\nSets the actions that the destination side client supports for\nthis operation. This request may trigger the emission of\nwl_data_source.action and wl_data_offer.action events if the compositor\nneeds to change the selected action.\n\nThis request can be called multiple times throughout the\ndrag-and-drop operation, typically in response to wl_data_device.enter\nor wl_data_device.motion events.\n\nThis request determines the final result of the drag-and-drop\noperation. If the end result is that no action is accepted,\nthe drag source will receive wl_drag_source.cancelled.\n\nThe dnd_actions argument must contain only values expressed in the\nwl_data_device_manager.dnd_actions enum, and the preferred_action\nargument must only contain one of those values set, otherwise it\nwill result in a protocol error.\n\nWhile managing an \"ask\" action, the destination drag-and-drop client\nmay perform further wl_data_offer.receive requests, and is expected\nto perform one last wl_data_offer.set_actions request with a preferred\naction other than \"ask\" (and optionally wl_data_offer.accept) before\nrequesting wl_data_offer.finish, in order to convey the action selected\nby the user. If the preferred action is not in the\nwl_data_offer.source_actions mask, an error will be raised.\n\nIf the \"ask\" action is dismissed (e.g. user cancellation), the client\nis expected to perform wl_data_offer.destroy right away.\n\nThis request can only be made on drag-and-drop offers, a protocol error\nwill be raised otherwise." ] pub unsafe fn wl_data_offer_set_actions ( wl_data_offer : * mut super :: wl_data_offer :: wl_data_offer , dnd_actions : u32 , preferred_action : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_offer as _ , 4u32 , dnd_actions , preferred_action , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "offer to transfer data\n\nThe wl_data_source object is the source side of a wl_data_offer.\nIt is created by the source client in a data transfer and\nprovides a way to describe the offered data and a way to respond\nto requests to transfer the data." ] pub mod wl_data_source { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_data_source { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "action mask contains invalid values" ] invalid_action_mask = 0 , # [ doc = "source doesn't accept this request" ] invalid_source = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_action_mask ) , 1 => Some ( error :: invalid_source ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_source_requests : [ wl_message ; 3 ] = [ wl_message { name : b"offer\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_actions\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_source_events : [ wl_message ; 6 ] = [ wl_message { name : b"target\0" as * const u8 as * const c_char , signature : b"?s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"send\0" as * const u8 as * const c_char , signature : b"sh\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cancelled\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"dnd_drop_performed\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"dnd_finished\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"action\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_data_source_interface : wl_interface = wl_interface { name : b"wl_data_source\0" as * const u8 as * const c_char , version : 3 , request_count : 3 , requests : unsafe { & wl_data_source_requests as * const _ } , event_count : 6 , events : unsafe { & wl_data_source_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_data_source_listener { # [ doc = "a target accepts an offered mime type\n\nSent when a target accepts pointer_focus or motion events. If\na target does not accept any of the offered types, type is NULL.\n\nUsed for feedback during drag-and-drop." ] fn target ( & mut self , object : * mut wl_data_source , mime_type : Option < * mut c_char > ) { } # [ doc = "send the data\n\nRequest for data from the client. Send the data as the\nspecified mime type over the passed file descriptor, then\nclose it." ] fn send ( & mut self , object : * mut wl_data_source , mime_type : * mut c_char , fd : :: std :: os :: unix :: io :: RawFd ) { } # [ doc = "selection was cancelled\n\nThis data source is no longer valid. There are several reasons why\nthis could happen:\n\n- The data source has been replaced by another data source.\n- The drag-and-drop operation was performed, but the drop destination\ndid not accept any of the mime types offered through\nwl_data_source.target.\n- The drag-and-drop operation was performed, but the drop destination\ndid not select any of the actions present in the mask offered through\nwl_data_source.action.\n- The drag-and-drop operation was performed but didn't happen over a\nsurface.\n- The compositor cancelled the drag-and-drop operation (e.g. compositor\ndependent timeouts to avoid stale drag-and-drop transfers).\n\nThe client should clean up and destroy this data source.\n\nFor objects of version 2 or older, wl_data_source.cancelled will\nonly be emitted if the data source was replaced by another data\nsource." ] fn cancelled ( & mut self , object : * mut wl_data_source , ) { } # [ doc = "the drag-and-drop operation physically finished\n\nThe user performed the drop action. This event does not indicate\nacceptance, wl_data_source.cancelled may still be emitted afterwards\nif the drop destination does not accept any mime type.\n\nHowever, this event might however not be received if the compositor\ncancelled the drag-and-drop operation before this event could happen.\n\nNote that the data_source may still be used in the future and should\nnot be destroyed here.\n\nOnly available since version 3 of the interface." ] fn dnd_drop_performed ( & mut self , object : * mut wl_data_source , ) { } # [ doc = "the drag-and-drop operation concluded\n\nThe drop destination finished interoperating with this data\nsource, so the client is now free to destroy this data source and\nfree all associated data.\n\nIf the action used to perform the operation was \"move\", the\nsource can now delete the transferred data.\n\nOnly available since version 3 of the interface." ] fn dnd_finished ( & mut self , object : * mut wl_data_source , ) { } # [ doc = "notify the selected action\n\nThis event indicates the action selected by the compositor after\nmatching the source/destination side actions. Only one action (or\nnone) will be offered here.\n\nThis event can be emitted multiple times during the drag-and-drop\noperation, mainly in response to destination side changes through\nwl_data_offer.set_actions, and as the data device enters/leaves\nsurfaces.\n\nIt is only possible to receive this event after\nwl_data_source.dnd_drop_performed if the drag-and-drop operation\nended in an \"ask\" action, in which case the final wl_data_source.action\nevent will happen immediately before wl_data_source.dnd_finished.\n\nCompositors may also change the selected action on the fly, mainly\nin response to keyboard modifier changes during the drag-and-drop\noperation.\n\nThe most recent action received is always the valid one. The chosen\naction may change alongside negotiation (e.g. an \"ask\" action can turn\ninto a \"move\" operation), so the effects of the final action must\nalways be applied in wl_data_offer.dnd_finished.\n\nClients can trigger cursor surface changes from this point, so\nthey reflect the current action.\n\nOnly available since version 3 of the interface." ] fn action ( & mut self , object : * mut wl_data_source , dnd_action : u32 ) { } } pub unsafe fn wl_data_source_set_user_data ( wl_data_source : * mut super :: wl_data_source :: wl_data_source , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_data_source as _ , user_data ) ; } pub unsafe fn wl_data_source_get_user_data ( wl_data_source : * mut super :: wl_data_source :: wl_data_source ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_data_source as _ ) ; } pub unsafe fn wl_data_source_get_version ( wl_data_source : * mut super :: wl_data_source :: wl_data_source ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_data_source as _ ) ; } pub unsafe fn wl_data_source_add_listener ( wl_data_source : * mut super :: wl_data_source :: wl_data_source , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_data_source as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_data_source_add_rust_listener ( wl_data_source : * mut super :: wl_data_source :: wl_data_source , listener : & dyn wl_data_source_listener ) -> bool { let to = ( listener as * const dyn wl_data_source_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_data_source_add_listener ( wl_data_source as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "add an offered mime type\n\nThis request adds a mime type to the set of mime types\nadvertised to targets. Can be called several times to offer\nmultiple types." ] pub unsafe fn wl_data_source_offer ( wl_data_source : * mut super :: wl_data_source :: wl_data_source , mime_type : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_source as _ , 0u32 , mime_type , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the data source\n\nDestroy the data source." ] pub unsafe fn wl_data_source_destroy ( wl_data_source : * mut super :: wl_data_source :: wl_data_source ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_source as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_data_source as _ ) ; } # [ doc = "set the available drag-and-drop actions\n\nSets the actions that the source side client supports for this\noperation. This request may trigger wl_data_source.action and\nwl_data_offer.action events if the compositor needs to change the\nselected action.\n\nThe dnd_actions argument must contain only values expressed in the\nwl_data_device_manager.dnd_actions enum, otherwise it will result\nin a protocol error.\n\nThis request must be made once only, and can only be made on sources\nused in drag-and-drop, so it must be performed before\nwl_data_device.start_drag. Attempting to use the source other than\nfor drag-and-drop will raise a protocol error." ] pub unsafe fn wl_data_source_set_actions ( wl_data_source : * mut super :: wl_data_source :: wl_data_source , dnd_actions : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_source as _ , 2u32 , dnd_actions , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "data transfer device\n\nThere is one wl_data_device per seat which can be obtained\nfrom the global wl_data_device_manager singleton.\n\nA wl_data_device provides access to inter-client data transfer\nmechanisms such as copy-and-paste and drag-and-drop." ] pub mod wl_data_device { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_data_device { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_data_device_requests_start_drag_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_data_source :: wl_data_source_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut wl_data_device_requests_set_selection_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_data_source :: wl_data_source_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_device_requests : [ wl_message ; 3 ] = [ wl_message { name : b"start_drag\0" as * const u8 as * const c_char , signature : b"?oo?ou\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_requests_start_drag_types as * const _ } , } , wl_message { name : b"set_selection\0" as * const u8 as * const c_char , signature : b"?ou\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_requests_set_selection_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wl_data_device_events_data_offer_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_data_offer :: wl_data_offer_interface as * const wl_interface } , ] ; static mut wl_data_device_events_enter_types : [ * const wl_interface ; 5 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , unsafe { & super :: wl_data_offer :: wl_data_offer_interface as * const wl_interface } , ] ; static mut wl_data_device_events_selection_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_data_offer :: wl_data_offer_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_device_events : [ wl_message ; 6 ] = [ wl_message { name : b"data_offer\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_events_data_offer_types as * const _ } , } , wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"uoff?o\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"motion\0" as * const u8 as * const c_char , signature : b"uff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"drop\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"selection\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_events_selection_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_data_device_interface : wl_interface = wl_interface { name : b"wl_data_device\0" as * const u8 as * const c_char , version : 3 , request_count : 3 , requests : unsafe { & wl_data_device_requests as * const _ } , event_count : 6 , events : unsafe { & wl_data_device_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_data_device_listener { # [ doc = "introduce a new wl_data_offer\n\nThe data_offer event introduces a new wl_data_offer object,\nwhich will subsequently be used in either the\ndata_device.enter event (for drag-and-drop) or the\ndata_device.selection event (for selections). Immediately\nfollowing the data_device_data_offer event, the new data_offer\nobject will send out data_offer.offer events to describe the\nmime types it offers." ] fn data_offer ( & mut self , object : * mut wl_data_device , id : * mut super :: wl_data_offer :: wl_data_offer ) { } # [ doc = "initiate drag-and-drop session\n\nThis event is sent when an active drag-and-drop pointer enters\na surface owned by the client. The position of the pointer at\nenter time is provided by the x and y arguments, in surface-local\ncoordinates." ] fn enter ( & mut self , object : * mut wl_data_device , serial : u32 , surface : * mut super :: wl_surface :: wl_surface , x : wl_fixed_t , y : wl_fixed_t , id : Option < * mut super :: wl_data_offer :: wl_data_offer > ) { } # [ doc = "end drag-and-drop session\n\nThis event is sent when the drag-and-drop pointer leaves the\nsurface and the session ends. The client must destroy the\nwl_data_offer introduced at enter time at this point." ] fn leave ( & mut self , object : * mut wl_data_device , ) { } # [ doc = "drag-and-drop session motion\n\nThis event is sent when the drag-and-drop pointer moves within\nthe currently focused surface. The new position of the pointer\nis provided by the x and y arguments, in surface-local\ncoordinates." ] fn motion ( & mut self , object : * mut wl_data_device , time : u32 , x : wl_fixed_t , y : wl_fixed_t ) { } # [ doc = "end drag-and-drop session successfully\n\nThe event is sent when a drag-and-drop operation is ended\nbecause the implicit grab is removed.\n\nThe drag-and-drop destination is expected to honor the last action\nreceived through wl_data_offer.action, if the resulting action is\n\"copy\" or \"move\", the destination can still perform\nwl_data_offer.receive requests, and is expected to end all\ntransfers with a wl_data_offer.finish request.\n\nIf the resulting action is \"ask\", the action will not be considered\nfinal. The drag-and-drop destination is expected to perform one last\nwl_data_offer.set_actions request, or wl_data_offer.destroy in order\nto cancel the operation." ] fn drop ( & mut self , object : * mut wl_data_device , ) { } # [ doc = "advertise new selection\n\nThe selection event is sent out to notify the client of a new\nwl_data_offer for the selection for this device. The\ndata_device.data_offer and the data_offer.offer events are\nsent out immediately before this event to introduce the data\noffer object. The selection event is sent to a client\nimmediately before receiving keyboard focus and when a new\nselection is set while the client has keyboard focus. The\ndata_offer is valid until a new data_offer or NULL is received\nor until the client loses keyboard focus. The client must\ndestroy the previous selection data_offer, if any, upon receiving\nthis event." ] fn selection ( & mut self , object : * mut wl_data_device , id : Option < * mut super :: wl_data_offer :: wl_data_offer > ) { } } pub unsafe fn wl_data_device_set_user_data ( wl_data_device : * mut super :: wl_data_device :: wl_data_device , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_data_device as _ , user_data ) ; } pub unsafe fn wl_data_device_get_user_data ( wl_data_device : * mut super :: wl_data_device :: wl_data_device ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_data_device as _ ) ; } pub unsafe fn wl_data_device_get_version ( wl_data_device : * mut super :: wl_data_device :: wl_data_device ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_data_device as _ ) ; } pub unsafe fn wl_data_device_add_listener ( wl_data_device : * mut super :: wl_data_device :: wl_data_device , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_data_device as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_data_device_add_rust_listener ( wl_data_device : * mut super :: wl_data_device :: wl_data_device , listener : & dyn wl_data_device_listener ) -> bool { let to = ( listener as * const dyn wl_data_device_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_data_device_add_listener ( wl_data_device as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_data_device_destroy ( wl_data_device : * mut super :: wl_data_device :: wl_data_device ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_data_device as _ ) ; } # [ doc = "start drag-and-drop operation\n\nThis request asks the compositor to start a drag-and-drop\noperation on behalf of the client.\n\nThe source argument is the data source that provides the data\nfor the eventual data transfer. If source is NULL, enter, leave\nand motion events are sent only to the client that initiated the\ndrag and the client is expected to handle the data passing\ninternally.\n\nThe origin surface is the surface where the drag originates and\nthe client must have an active implicit grab that matches the\nserial.\n\nThe icon surface is an optional (can be NULL) surface that\nprovides an icon to be moved around with the cursor. Initially,\nthe top-left corner of the icon surface is placed at the cursor\nhotspot, but subsequent wl_surface.attach request can move the\nrelative position. Attach requests must be confirmed with\nwl_surface.commit as usual. The icon surface is given the role of\na drag-and-drop icon. If the icon surface already has another role,\nit raises a protocol error.\n\nThe current and pending input regions of the icon wl_surface are\ncleared, and wl_surface.set_input_region is ignored until the\nwl_surface is no longer used as the icon surface. When the use\nas an icon ends, the current and pending input regions become\nundefined, and the wl_surface is unmapped." ] pub unsafe fn wl_data_device_start_drag ( wl_data_device : * mut super :: wl_data_device :: wl_data_device , source : * mut super :: wl_data_source :: wl_data_source , origin : * mut super :: wl_surface :: wl_surface , icon : * mut super :: wl_surface :: wl_surface , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_device as _ , 0u32 , source , origin , icon , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "copy data to the selection\n\nThis request asks the compositor to set the selection\nto the data from the source on behalf of the client.\n\nTo unset the selection, set the source to NULL." ] pub unsafe fn wl_data_device_set_selection ( wl_data_device : * mut super :: wl_data_device :: wl_data_device , source : * mut super :: wl_data_source :: wl_data_source , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_device as _ , 1u32 , source , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy data device\n\nThis request destroys the data device." ] pub unsafe fn wl_data_device_release ( wl_data_device : * mut super :: wl_data_device :: wl_data_device ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_data_device as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_data_device as _ ) ; } } # [ doc = "data transfer interface\n\nThe wl_data_device_manager is a singleton global object that\nprovides access to inter-client data transfer mechanisms such as\ncopy-and-paste and drag-and-drop. These mechanisms are tied to\na wl_seat and this interface lets a client get a wl_data_device\ncorresponding to a wl_seat.\n\nDepending on the version bound, the objects created from the bound\nwl_data_device_manager object will have different requirements for\nfunctioning properly. See wl_data_source.set_actions,\nwl_data_offer.accept and wl_data_offer.finish for details." ] pub mod wl_data_device_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_data_device_manager { } bitflags ! { # [ doc = "drag and drop actions\n\nThis is a bitmask of the available/preferred actions in a\ndrag-and-drop operation.\n\nIn the compositor, the selected action is a result of matching the\nactions offered by the source and destination sides. \"action\" events\nwith a \"none\" action will be sent to both source and destination if\nthere is no match. All further checks will effectively happen on\n(source actions \u{2229} destination actions).\n\nIn addition, compositors may also pick different actions in\nreaction to key modifiers being pressed. One common design that\nis used in major toolkits (and the behavior recommended for\ncompositors) is:\n\n- If no modifiers are pressed, the first match (in bit order)\nwill be used.\n- Pressing Shift selects \"move\", if enabled in the mask.\n- Pressing Control selects \"copy\", if enabled in the mask.\n\nBehavior beyond that is considered implementation-dependent.\nCompositors may for example bind other modifiers (like Alt/Meta)\nor drags initiated with other buttons than BTN_LEFT to specific\nactions (e.g. \"ask\")." ] pub struct dnd_action : u32 { # [ doc = "no action" ] const none = 0 ; # [ doc = "copy action" ] const copy = 1 ; # [ doc = "move action" ] const _move = 2 ; # [ doc = "ask action" ] const ask = 4 ; } } impl dnd_action { pub fn from_raw ( n : u32 ) -> Option < dnd_action > { Some ( dnd_action :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } static mut wl_data_device_manager_requests_create_data_source_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_data_source :: wl_data_source_interface as * const wl_interface } , ] ; static mut wl_data_device_manager_requests_get_data_device_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_data_device :: wl_data_device_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_data_device_manager_requests : [ wl_message ; 2 ] = [ wl_message { name : b"create_data_source\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_manager_requests_create_data_source_types as * const _ } , } , wl_message { name : b"get_data_device\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & wl_data_device_manager_requests_get_data_device_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_data_device_manager_interface : wl_interface = wl_interface { name : b"wl_data_device_manager\0" as * const u8 as * const c_char , version : 3 , request_count : 2 , requests : unsafe { & wl_data_device_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_data_device_manager_listener { } pub unsafe fn wl_data_device_manager_set_user_data ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_data_device_manager as _ , user_data ) ; } pub unsafe fn wl_data_device_manager_get_user_data ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_data_device_manager as _ ) ; } pub unsafe fn wl_data_device_manager_get_version ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_data_device_manager as _ ) ; } pub unsafe fn wl_data_device_manager_add_listener ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_data_device_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_data_device_manager_add_rust_listener ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager , listener : & dyn wl_data_device_manager_listener ) -> bool { let to = ( listener as * const dyn wl_data_device_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_data_device_manager_add_listener ( wl_data_device_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_data_device_manager_destroy ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_data_device_manager as _ ) ; } # [ doc = "create a new data source\n\nCreate a new data source." ] pub unsafe fn wl_data_device_manager_create_data_source ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager ) -> * mut super :: wl_data_source :: wl_data_source { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_data_device_manager as _ , 0u32 , & super :: wl_data_source :: wl_data_source_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "create a new data device\n\nCreate a new data device for a given seat." ] pub unsafe fn wl_data_device_manager_get_data_device ( wl_data_device_manager : * mut super :: wl_data_device_manager :: wl_data_device_manager , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: wl_data_device :: wl_data_device { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_data_device_manager as _ , 1u32 , & super :: wl_data_device :: wl_data_device_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat ) ; return r as _ ; } } # [ doc = "create desktop-style surfaces\n\nThis interface is implemented by servers that provide\ndesktop-style user interfaces.\n\nIt allows clients to associate a wl_shell_surface with\na basic surface.\n\nNote! This protocol is deprecated and not intended for production use.\nFor desktop-style user interfaces, use xdg_shell." ] pub mod wl_shell { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_shell { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_shell_requests_get_shell_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_shell_surface :: wl_shell_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_shell_requests : [ wl_message ; 1 ] = [ wl_message { name : b"get_shell_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_requests_get_shell_surface_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_shell_interface : wl_interface = wl_interface { name : b"wl_shell\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wl_shell_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_shell_listener { } pub unsafe fn wl_shell_set_user_data ( wl_shell : * mut super :: wl_shell :: wl_shell , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_shell as _ , user_data ) ; } pub unsafe fn wl_shell_get_user_data ( wl_shell : * mut super :: wl_shell :: wl_shell ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_shell as _ ) ; } pub unsafe fn wl_shell_get_version ( wl_shell : * mut super :: wl_shell :: wl_shell ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_shell as _ ) ; } pub unsafe fn wl_shell_add_listener ( wl_shell : * mut super :: wl_shell :: wl_shell , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_shell as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_shell_add_rust_listener ( wl_shell : * mut super :: wl_shell :: wl_shell , listener : & dyn wl_shell_listener ) -> bool { let to = ( listener as * const dyn wl_shell_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_shell_add_listener ( wl_shell as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_shell_destroy ( wl_shell : * mut super :: wl_shell :: wl_shell ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_shell as _ ) ; } # [ doc = "create a shell surface from a surface\n\nCreate a shell surface for an existing surface. This gives\nthe wl_surface the role of a shell surface. If the wl_surface\nalready has another role, it raises a protocol error.\n\nOnly one shell surface can be associated with a given surface." ] pub unsafe fn wl_shell_get_shell_surface ( wl_shell : * mut super :: wl_shell :: wl_shell , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: wl_shell_surface :: wl_shell_surface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_shell as _ , 0u32 , & super :: wl_shell_surface :: wl_shell_surface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "desktop-style metadata interface\n\nAn interface that may be implemented by a wl_surface, for\nimplementations that provide a desktop-style user interface.\n\nIt provides requests to treat surfaces like toplevel, fullscreen\nor popup windows, move, resize or maximize them, associate\nmetadata like title and class, etc.\n\nOn the server side the object is automatically destroyed when\nthe related wl_surface is destroyed. On the client side,\nwl_shell_surface_destroy() must be called before destroying\nthe wl_surface object." ] pub mod wl_shell_surface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_shell_surface { } bitflags ! { # [ doc = "edge values for resizing\n\nThese values are used to indicate which edge of a surface\nis being dragged in a resize operation. The server may\nuse this information to adapt its behavior, e.g. choose\nan appropriate cursor image." ] pub struct resize : u32 { # [ doc = "no edge" ] const none = 0 ; # [ doc = "top edge" ] const top = 1 ; # [ doc = "bottom edge" ] const bottom = 2 ; # [ doc = "left edge" ] const left = 4 ; # [ doc = "top and left edges" ] const top_left = 5 ; # [ doc = "bottom and left edges" ] const bottom_left = 6 ; # [ doc = "right edge" ] const right = 8 ; # [ doc = "top and right edges" ] const top_right = 9 ; # [ doc = "bottom and right edges" ] const bottom_right = 10 ; } } impl resize { pub fn from_raw ( n : u32 ) -> Option < resize > { Some ( resize :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } bitflags ! { # [ doc = "details of transient behaviour\n\nThese flags specify details of the expected behaviour\nof transient surfaces. Used in the set_transient request." ] pub struct transient : u32 { # [ doc = "do not set keyboard focus" ] const inactive = 1 ; } } impl transient { pub fn from_raw ( n : u32 ) -> Option < transient > { Some ( transient :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = "different method to set the surface fullscreen\n\nHints to indicate to the compositor how to deal with a conflict\nbetween the dimensions of the surface and the dimensions of the\noutput. The compositor is free to ignore this parameter." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum fullscreen_method { # [ doc = "no preference, apply default policy" ] default = 0 , # [ doc = "scale, preserve the surface's aspect ratio and center on output" ] scale = 1 , # [ doc = "switch output mode to the smallest mode that can fit the surface, add black borders to compensate size mismatch" ] driver = 2 , # [ doc = "no upscaling, center on output and add black borders to compensate size mismatch" ] fill = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl fullscreen_method { pub fn from_raw ( n : u32 ) -> Option < fullscreen_method > { match n { 0 => Some ( fullscreen_method :: default ) , 1 => Some ( fullscreen_method :: scale ) , 2 => Some ( fullscreen_method :: driver ) , 3 => Some ( fullscreen_method :: fill ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_shell_surface_requests_move_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut wl_shell_surface_requests_resize_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut wl_shell_surface_requests_set_transient_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut wl_shell_surface_requests_set_fullscreen_types : [ * const wl_interface ; 3 ] = [ NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; static mut wl_shell_surface_requests_set_popup_types : [ * const wl_interface ; 6 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut wl_shell_surface_requests_set_maximized_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_shell_surface_requests : [ wl_message ; 10 ] = [ wl_message { name : b"pong\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"move\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_surface_requests_move_types as * const _ } , } , wl_message { name : b"resize\0" as * const u8 as * const c_char , signature : b"ouu\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_surface_requests_resize_types as * const _ } , } , wl_message { name : b"set_toplevel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_transient\0" as * const u8 as * const c_char , signature : b"oiiu\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_surface_requests_set_transient_types as * const _ } , } , wl_message { name : b"set_fullscreen\0" as * const u8 as * const c_char , signature : b"uu?o\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_surface_requests_set_fullscreen_types as * const _ } , } , wl_message { name : b"set_popup\0" as * const u8 as * const c_char , signature : b"ouoiiu\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_surface_requests_set_popup_types as * const _ } , } , wl_message { name : b"set_maximized\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & wl_shell_surface_requests_set_maximized_types as * const _ } , } , wl_message { name : b"set_title\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_class\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_shell_surface_events : [ wl_message ; 3 ] = [ wl_message { name : b"ping\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"uii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"popup_done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_shell_surface_interface : wl_interface = wl_interface { name : b"wl_shell_surface\0" as * const u8 as * const c_char , version : 1 , request_count : 10 , requests : unsafe { & wl_shell_surface_requests as * const _ } , event_count : 3 , events : unsafe { & wl_shell_surface_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_shell_surface_listener { # [ doc = "ping client\n\nPing a client to check if it is receiving events and sending\nrequests. A client is expected to reply with a pong request." ] fn ping ( & mut self , object : * mut wl_shell_surface , serial : u32 ) { } # [ doc = "suggest resize\n\nThe configure event asks the client to resize its surface.\n\nThe size is a hint, in the sense that the client is free to\nignore it if it doesn't resize, pick a smaller size (to\nsatisfy aspect ratio or resize in steps of NxM pixels).\n\nThe edges parameter provides a hint about how the surface\nwas resized. The client may use this information to decide\nhow to adjust its content to the new size (e.g. a scrolling\narea might adjust its content position to leave the viewable\ncontent unmoved).\n\nThe client is free to dismiss all but the last configure\nevent it received.\n\nThe width and height arguments specify the size of the window\nin surface-local coordinates." ] fn configure ( & mut self , object : * mut wl_shell_surface , edges : resize , width : i32 , height : i32 ) { } # [ doc = "popup interaction is done\n\nThe popup_done event is sent out when a popup grab is broken,\nthat is, when the user clicks a surface that doesn't belong\nto the client owning the popup surface." ] fn popup_done ( & mut self , object : * mut wl_shell_surface , ) { } } pub unsafe fn wl_shell_surface_set_user_data ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_shell_surface as _ , user_data ) ; } pub unsafe fn wl_shell_surface_get_user_data ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_shell_surface as _ ) ; } pub unsafe fn wl_shell_surface_get_version ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_shell_surface as _ ) ; } pub unsafe fn wl_shell_surface_add_listener ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_shell_surface as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_shell_surface_add_rust_listener ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , listener : & dyn wl_shell_surface_listener ) -> bool { let to = ( listener as * const dyn wl_shell_surface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_shell_surface_add_listener ( wl_shell_surface as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_shell_surface_destroy ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_shell_surface as _ ) ; } # [ doc = "respond to a ping event\n\nA client must respond to a ping event with a pong request or\nthe client may be deemed unresponsive." ] pub unsafe fn wl_shell_surface_pong ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 0u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive move\n\nStart a pointer-driven move of the surface.\n\nThis request must be used in response to a button press event.\nThe server may ignore move requests depending on the state of\nthe surface (e.g. fullscreen or maximized)." ] pub unsafe fn wl_shell_surface_move ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 1u32 , seat , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive resize\n\nStart a pointer-driven resizing of the surface.\n\nThis request must be used in response to a button press event.\nThe server may ignore resize requests depending on the state of\nthe surface (e.g. fullscreen or maximized)." ] pub unsafe fn wl_shell_surface_resize ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , edges : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 2u32 , seat , serial , edges , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the surface a toplevel surface\n\nMap the surface as a toplevel surface.\n\nA toplevel surface is not fullscreen, maximized or transient." ] pub unsafe fn wl_shell_surface_set_toplevel ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the surface a transient surface\n\nMap the surface relative to an existing surface.\n\nThe x and y arguments specify the location of the upper left\ncorner of the surface relative to the upper left corner of the\nparent surface, in surface-local coordinates.\n\nThe flags argument controls details of the transient behaviour." ] pub unsafe fn wl_shell_surface_set_transient ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , parent : * mut super :: wl_surface :: wl_surface , x : i32 , y : i32 , flags : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 4u32 , parent , x , y , flags , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the surface a fullscreen surface\n\nMap the surface as a fullscreen surface.\n\nIf an output parameter is given then the surface will be made\nfullscreen on that output. If the client does not specify the\noutput then the compositor will apply its policy - usually\nchoosing the output on which the surface has the biggest surface\narea.\n\nThe client may specify a method to resolve a size conflict\nbetween the output size and the surface size - this is provided\nthrough the method parameter.\n\nThe framerate parameter is used only when the method is set\nto \"driver\", to indicate the preferred framerate. A value of 0\nindicates that the client does not care about framerate. The\nframerate is specified in mHz, that is framerate of 60000 is 60Hz.\n\nA method of \"scale\" or \"driver\" implies a scaling operation of\nthe surface, either via a direct scaling operation or a change of\nthe output mode. This will override any kind of output scaling, so\nthat mapping a surface with a buffer size equal to the mode can\nfill the screen independent of buffer_scale.\n\nA method of \"fill\" means we don't scale up the buffer, however\nany output scale is applied. This means that you may run into\nan edge case where the application maps a buffer with the same\nsize of the output mode but buffer_scale 1 (thus making a\nsurface larger than the output). In this case it is allowed to\ndownscale the results to fit the screen.\n\nThe compositor must reply to this request with a configure event\nwith the dimensions for the output on which the surface will\nbe made fullscreen." ] pub unsafe fn wl_shell_surface_set_fullscreen ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , method : u32 , framerate : u32 , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 5u32 , method , framerate , output , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the surface a popup surface\n\nMap the surface as a popup.\n\nA popup surface is a transient surface with an added pointer\ngrab.\n\nAn existing implicit grab will be changed to owner-events mode,\nand the popup grab will continue after the implicit grab ends\n(i.e. releasing the mouse button does not cause the popup to\nbe unmapped).\n\nThe popup grab continues until the window is destroyed or a\nmouse button is pressed in any other client's window. A click\nin any of the client's surfaces is reported as normal, however,\nclicks in other clients' surfaces will be discarded and trigger\nthe callback.\n\nThe x and y arguments specify the location of the upper left\ncorner of the surface relative to the upper left corner of the\nparent surface, in surface-local coordinates." ] pub unsafe fn wl_shell_surface_set_popup ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , parent : * mut super :: wl_surface :: wl_surface , x : i32 , y : i32 , flags : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 6u32 , seat , serial , parent , x , y , flags , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the surface a maximized surface\n\nMap the surface as a maximized surface.\n\nIf an output parameter is given then the surface will be\nmaximized on that output. If the client does not specify the\noutput then the compositor will apply its policy - usually\nchoosing the output on which the surface has the biggest surface\narea.\n\nThe compositor will reply with a configure event telling\nthe expected new surface size. The operation is completed\non the next buffer attach to this surface.\n\nA maximized surface typically fills the entire output it is\nbound to, except for desktop elements such as panels. This is\nthe main difference between a maximized shell surface and a\nfullscreen shell surface.\n\nThe details depend on the compositor implementation." ] pub unsafe fn wl_shell_surface_set_maximized ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 7u32 , output , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface title\n\nSet a short title for the surface.\n\nThis string may be used to identify the surface in a task bar,\nwindow list, or other user interface elements provided by the\ncompositor.\n\nThe string must be encoded in UTF-8." ] pub unsafe fn wl_shell_surface_set_title ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , title : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 8u32 , title , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface class\n\nSet a class for the surface.\n\nThe surface class identifies the general class of applications\nto which the surface belongs. A common convention is to use the\nfile name (or the full path if it is a non-standard location) of\nthe application's .desktop file as the class." ] pub unsafe fn wl_shell_surface_set_class ( wl_shell_surface : * mut super :: wl_shell_surface :: wl_shell_surface , class_ : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_shell_surface as _ , 9u32 , class_ , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "an onscreen surface\n\nA surface is a rectangular area that is displayed on the screen.\nIt has a location, size and pixel contents.\n\nThe size of a surface (and relative positions on it) is described\nin surface-local coordinates, which may differ from the buffer\ncoordinates of the pixel content, in case a buffer_transform\nor a buffer_scale is used.\n\nA surface without a \"role\" is fairly useless: a compositor does\nnot know where, when or how to present it. The role is the\npurpose of a wl_surface. Examples of roles are a cursor for a\npointer (as set by wl_pointer.set_cursor), a drag icon\n(wl_data_device.start_drag), a sub-surface\n(wl_subcompositor.get_subsurface), and a window as defined by a\nshell protocol (e.g. wl_shell.get_shell_surface).\n\nA surface can have only one role at a time. Initially a\nwl_surface does not have a role. Once a wl_surface is given a\nrole, it is set permanently for the whole lifetime of the\nwl_surface object. Giving the current role again is allowed,\nunless explicitly forbidden by the relevant interface\nspecification.\n\nSurface roles are given by requests in other interfaces such as\nwl_pointer.set_cursor. The request should explicitly mention\nthat this request gives a role to a wl_surface. Often, this\nrequest also creates a new protocol object that represents the\nrole and adds additional functionality to wl_surface. When a\nclient wants to destroy a wl_surface, they must destroy this 'role\nobject' before the wl_surface.\n\nDestroying the role object does not remove the role from the\nwl_surface, but it may stop the wl_surface from \"playing the role\".\nFor instance, if a wl_subsurface object is destroyed, the wl_surface\nit was created for will be unmapped and forget its position and\nz-order. It is allowed to create a wl_subsurface for the same\nwl_surface again, but it is not allowed to use the wl_surface as\na cursor (cursor is a different role than sub-surface, and role\nswitching is not allowed)." ] pub mod wl_surface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_surface { } # [ doc = "wl_surface error values\n\nThese errors can be emitted in response to wl_surface requests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "buffer scale value is invalid" ] invalid_scale = 0 , # [ doc = "buffer transform value is invalid" ] invalid_transform = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_scale ) , 1 => Some ( error :: invalid_transform ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_surface_requests_attach_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut wl_surface_requests_frame_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_callback :: wl_callback_interface as * const wl_interface } , ] ; static mut wl_surface_requests_set_opaque_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; static mut wl_surface_requests_set_input_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_surface_requests : [ wl_message ; 10 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"attach\0" as * const u8 as * const c_char , signature : b"?oii\0" as * const u8 as * const c_char , types : unsafe { & wl_surface_requests_attach_types as * const _ } , } , wl_message { name : b"damage\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_surface_requests_frame_types as * const _ } , } , wl_message { name : b"set_opaque_region\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & wl_surface_requests_set_opaque_region_types as * const _ } , } , wl_message { name : b"set_input_region\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & wl_surface_requests_set_input_region_types as * const _ } , } , wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_buffer_transform\0" as * const u8 as * const c_char , signature : b"2i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_buffer_scale\0" as * const u8 as * const c_char , signature : b"3i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"damage_buffer\0" as * const u8 as * const c_char , signature : b"4iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wl_surface_events_enter_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; static mut wl_surface_events_leave_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_surface_events : [ wl_message ; 2 ] = [ wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wl_surface_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wl_surface_events_leave_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_surface_interface : wl_interface = wl_interface { name : b"wl_surface\0" as * const u8 as * const c_char , version : 4 , request_count : 10 , requests : unsafe { & wl_surface_requests as * const _ } , event_count : 2 , events : unsafe { & wl_surface_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_surface_listener { # [ doc = "surface enters an output\n\nThis is emitted whenever a surface's creation, movement, or resizing\nresults in some part of it being within the scanout region of an\noutput.\n\nNote that a surface may be overlapping with zero or more outputs." ] fn enter ( & mut self , object : * mut wl_surface , output : * mut super :: wl_output :: wl_output ) { } # [ doc = "surface leaves an output\n\nThis is emitted whenever a surface's creation, movement, or resizing\nresults in it no longer having any part of it within the scanout region\nof an output." ] fn leave ( & mut self , object : * mut wl_surface , output : * mut super :: wl_output :: wl_output ) { } } pub unsafe fn wl_surface_set_user_data ( wl_surface : * mut super :: wl_surface :: wl_surface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_surface as _ , user_data ) ; } pub unsafe fn wl_surface_get_user_data ( wl_surface : * mut super :: wl_surface :: wl_surface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_surface as _ ) ; } pub unsafe fn wl_surface_get_version ( wl_surface : * mut super :: wl_surface :: wl_surface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_surface as _ ) ; } pub unsafe fn wl_surface_add_listener ( wl_surface : * mut super :: wl_surface :: wl_surface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_surface as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_surface_add_rust_listener ( wl_surface : * mut super :: wl_surface :: wl_surface , listener : & dyn wl_surface_listener ) -> bool { let to = ( listener as * const dyn wl_surface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_surface_add_listener ( wl_surface as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "delete surface\n\nDeletes the surface and invalidates its object ID." ] pub unsafe fn wl_surface_destroy ( wl_surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_surface as _ ) ; } # [ doc = "set the surface contents\n\nSet a buffer as the content of this surface.\n\nThe new size of the surface is calculated based on the buffer\nsize transformed by the inverse buffer_transform and the\ninverse buffer_scale. This means that the supplied buffer\nmust be an integer multiple of the buffer_scale.\n\nThe x and y arguments specify the location of the new pending\nbuffer's upper left corner, relative to the current buffer's upper\nleft corner, in surface-local coordinates. In other words, the\nx and y, combined with the new surface size define in which\ndirections the surface's size changes.\n\nSurface contents are double-buffered state, see wl_surface.commit.\n\nThe initial surface contents are void; there is no content.\nwl_surface.attach assigns the given wl_buffer as the pending\nwl_buffer. wl_surface.commit makes the pending wl_buffer the new\nsurface contents, and the size of the surface becomes the size\ncalculated from the wl_buffer, as described above. After commit,\nthere is no pending buffer until the next attach.\n\nCommitting a pending wl_buffer allows the compositor to read the\npixels in the wl_buffer. The compositor may access the pixels at\nany time after the wl_surface.commit request. When the compositor\nwill not access the pixels anymore, it will send the\nwl_buffer.release event. Only after receiving wl_buffer.release,\nthe client may reuse the wl_buffer. A wl_buffer that has been\nattached and then replaced by another attach instead of committed\nwill not receive a release event, and is not used by the\ncompositor.\n\nDestroying the wl_buffer after wl_buffer.release does not change\nthe surface contents. However, if the client destroys the\nwl_buffer before receiving the wl_buffer.release event, the surface\ncontents become undefined immediately.\n\nIf wl_surface.attach is sent with a NULL wl_buffer, the\nfollowing wl_surface.commit will remove the surface content." ] pub unsafe fn wl_surface_attach ( wl_surface : * mut super :: wl_surface :: wl_surface , buffer : * mut super :: wl_buffer :: wl_buffer , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 1u32 , buffer , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "mark part of the surface damaged\n\nThis request is used to describe the regions where the pending\nbuffer is different from the current surface contents, and where\nthe surface therefore needs to be repainted. The compositor\nignores the parts of the damage that fall outside of the surface.\n\nDamage is double-buffered state, see wl_surface.commit.\n\nThe damage rectangle is specified in surface-local coordinates,\nwhere x and y specify the upper left corner of the damage rectangle.\n\nThe initial value for pending damage is empty: no damage.\nwl_surface.damage adds pending damage: the new pending damage\nis the union of old pending damage and the given rectangle.\n\nwl_surface.commit assigns pending damage as the current damage,\nand clears pending damage. The server will clear the current\ndamage as it repaints the surface.\n\nAlternatively, damage can be posted with wl_surface.damage_buffer\nwhich uses buffer coordinates instead of surface coordinates,\nand is probably the preferred and intuitive way of doing this." ] pub unsafe fn wl_surface_damage ( wl_surface : * mut super :: wl_surface :: wl_surface , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 2u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "request a frame throttling hint\n\nRequest a notification when it is a good time to start drawing a new\nframe, by creating a frame callback. This is useful for throttling\nredrawing operations, and driving animations.\n\nWhen a client is animating on a wl_surface, it can use the 'frame'\nrequest to get notified when it is a good time to draw and commit the\nnext frame of animation. If the client commits an update earlier than\nthat, it is likely that some updates will not make it to the display,\nand the client is wasting resources by drawing too often.\n\nThe frame request will take effect on the next wl_surface.commit.\nThe notification will only be posted for one frame unless\nrequested again. For a wl_surface, the notifications are posted in\nthe order the frame requests were committed.\n\nThe server must send the notifications so that a client\nwill not send excessive updates, while still allowing\nthe highest possible update rate for clients that wait for the reply\nbefore drawing again. The server should give some time for the client\nto draw and commit after sending the frame callback events to let it\nhit the next output refresh.\n\nA server should avoid signaling the frame callbacks if the\nsurface is not visible in any way, e.g. the surface is off-screen,\nor completely obscured by other opaque surfaces.\n\nThe object returned by this request will be destroyed by the\ncompositor after the callback is fired and as such the client must not\nattempt to use it after that point.\n\nThe callback_data passed in the callback is the current time, in\nmilliseconds, with an undefined base." ] pub unsafe fn wl_surface_frame ( wl_surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: wl_callback :: wl_callback { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_surface as _ , 3u32 , & super :: wl_callback :: wl_callback_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "set opaque region\n\nThis request sets the region of the surface that contains\nopaque content.\n\nThe opaque region is an optimization hint for the compositor\nthat lets it optimize the redrawing of content behind opaque\nregions. Setting an opaque region is not required for correct\nbehaviour, but marking transparent content as opaque will result\nin repaint artifacts.\n\nThe opaque region is specified in surface-local coordinates.\n\nThe compositor ignores the parts of the opaque region that fall\noutside of the surface.\n\nOpaque region is double-buffered state, see wl_surface.commit.\n\nwl_surface.set_opaque_region changes the pending opaque region.\nwl_surface.commit copies the pending region to the current region.\nOtherwise, the pending and current regions are never changed.\n\nThe initial value for an opaque region is empty. Setting the pending\nopaque region has copy semantics, and the wl_region object can be\ndestroyed immediately. A NULL wl_region causes the pending opaque\nregion to be set to empty." ] pub unsafe fn wl_surface_set_opaque_region ( wl_surface : * mut super :: wl_surface :: wl_surface , region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 4u32 , region , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set input region\n\nThis request sets the region of the surface that can receive\npointer and touch events.\n\nInput events happening outside of this region will try the next\nsurface in the server surface stack. The compositor ignores the\nparts of the input region that fall outside of the surface.\n\nThe input region is specified in surface-local coordinates.\n\nInput region is double-buffered state, see wl_surface.commit.\n\nwl_surface.set_input_region changes the pending input region.\nwl_surface.commit copies the pending region to the current region.\nOtherwise the pending and current regions are never changed,\nexcept cursor and icon surfaces are special cases, see\nwl_pointer.set_cursor and wl_data_device.start_drag.\n\nThe initial value for an input region is infinite. That means the\nwhole surface will accept input. Setting the pending input region\nhas copy semantics, and the wl_region object can be destroyed\nimmediately. A NULL wl_region causes the input region to be set\nto infinite." ] pub unsafe fn wl_surface_set_input_region ( wl_surface : * mut super :: wl_surface :: wl_surface , region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 5u32 , region , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "commit pending surface state\n\nSurface state (input, opaque, and damage regions, attached buffers,\netc.) is double-buffered. Protocol requests modify the pending state,\nas opposed to the current state in use by the compositor. A commit\nrequest atomically applies all pending state, replacing the current\nstate. After commit, the new pending state is as documented for each\nrelated request.\n\nOn commit, a pending wl_buffer is applied first, and all other state\nsecond. This means that all coordinates in double-buffered state are\nrelative to the new wl_buffer coming into use, except for\nwl_surface.attach itself. If there is no pending wl_buffer, the\ncoordinates are relative to the current surface contents.\n\nAll requests that need a commit to become effective are documented\nto affect double-buffered state.\n\nOther interfaces may add further double-buffered surface state." ] pub unsafe fn wl_surface_commit ( wl_surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 6u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets the buffer transformation\n\nThis request sets an optional transformation on how the compositor\ninterprets the contents of the buffer attached to the surface. The\naccepted values for the transform parameter are the values for\nwl_output.transform.\n\nBuffer transform is double-buffered state, see wl_surface.commit.\n\nA newly created surface has its buffer transformation set to normal.\n\nwl_surface.set_buffer_transform changes the pending buffer\ntransformation. wl_surface.commit copies the pending buffer\ntransformation to the current one. Otherwise, the pending and current\nvalues are never changed.\n\nThe purpose of this request is to allow clients to render content\naccording to the output transform, thus permitting the compositor to\nuse certain optimizations even if the display is rotated. Using\nhardware overlays and scanning out a client buffer for fullscreen\nsurfaces are examples of such optimizations. Those optimizations are\nhighly dependent on the compositor implementation, so the use of this\nrequest should be considered on a case-by-case basis.\n\nNote that if the transform value includes 90 or 270 degree rotation,\nthe width of the buffer will become the surface height and the height\nof the buffer will become the surface width.\n\nIf transform is not one of the values from the\nwl_output.transform enum the invalid_transform protocol error\nis raised." ] pub unsafe fn wl_surface_set_buffer_transform ( wl_surface : * mut super :: wl_surface :: wl_surface , transform : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 7u32 , transform , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets the buffer scaling factor\n\nThis request sets an optional scaling factor on how the compositor\ninterprets the contents of the buffer attached to the window.\n\nBuffer scale is double-buffered state, see wl_surface.commit.\n\nA newly created surface has its buffer scale set to 1.\n\nwl_surface.set_buffer_scale changes the pending buffer scale.\nwl_surface.commit copies the pending buffer scale to the current one.\nOtherwise, the pending and current values are never changed.\n\nThe purpose of this request is to allow clients to supply higher\nresolution buffer data for use on high resolution outputs. It is\nintended that you pick the same buffer scale as the scale of the\noutput that the surface is displayed on. This means the compositor\ncan avoid scaling when rendering the surface on that output.\n\nNote that if the scale is larger than 1, then you have to attach\na buffer that is larger (by a factor of scale in each dimension)\nthan the desired surface size.\n\nIf scale is not positive the invalid_scale protocol error is\nraised." ] pub unsafe fn wl_surface_set_buffer_scale ( wl_surface : * mut super :: wl_surface :: wl_surface , scale : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 8u32 , scale , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "mark part of the surface damaged using buffer coordinates\n\nThis request is used to describe the regions where the pending\nbuffer is different from the current surface contents, and where\nthe surface therefore needs to be repainted. The compositor\nignores the parts of the damage that fall outside of the surface.\n\nDamage is double-buffered state, see wl_surface.commit.\n\nThe damage rectangle is specified in buffer coordinates,\nwhere x and y specify the upper left corner of the damage rectangle.\n\nThe initial value for pending damage is empty: no damage.\nwl_surface.damage_buffer adds pending damage: the new pending\ndamage is the union of old pending damage and the given rectangle.\n\nwl_surface.commit assigns pending damage as the current damage,\nand clears pending damage. The server will clear the current\ndamage as it repaints the surface.\n\nThis request differs from wl_surface.damage in only one way - it\ntakes damage in buffer coordinates instead of surface-local\ncoordinates. While this generally is more intuitive than surface\ncoordinates, it is especially desirable when using wp_viewport\nor when a drawing library (like EGL) is unaware of buffer scale\nand buffer transform.\n\nNote: Because buffer transformation changes and damage requests may\nbe interleaved in the protocol stream, it is impossible to determine\nthe actual mapping between surface and buffer damage until\nwl_surface.commit time. Therefore, compositors wishing to take both\nkinds of damage into account will have to accumulate damage from the\ntwo requests separately and only transform from one to the other\nafter receiving the wl_surface.commit." ] pub unsafe fn wl_surface_damage_buffer ( wl_surface : * mut super :: wl_surface :: wl_surface , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_surface as _ , 9u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "group of input devices\n\nA seat is a group of keyboards, pointer and touch devices. This\nobject is published as a global during start up, or when such a\ndevice is hot plugged. A seat typically has a pointer and\nmaintains a keyboard focus and a pointer focus." ] pub mod wl_seat { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_seat { } bitflags ! { # [ doc = "seat capability bitmask\n\nThis is a bitmask of capabilities this seat has; if a member is\nset, then it is present on the seat." ] pub struct capability : u32 { # [ doc = "the seat has pointer devices" ] const pointer = 1 ; # [ doc = "the seat has one or more keyboards" ] const keyboard = 2 ; # [ doc = "the seat has touch devices" ] const touch = 4 ; } } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { Some ( capability :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } static mut wl_seat_requests_get_pointer_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , ] ; static mut wl_seat_requests_get_keyboard_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_keyboard :: wl_keyboard_interface as * const wl_interface } , ] ; static mut wl_seat_requests_get_touch_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_touch :: wl_touch_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_seat_requests : [ wl_message ; 4 ] = [ wl_message { name : b"get_pointer\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_seat_requests_get_pointer_types as * const _ } , } , wl_message { name : b"get_keyboard\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_seat_requests_get_keyboard_types as * const _ } , } , wl_message { name : b"get_touch\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_seat_requests_get_touch_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"5\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_seat_events : [ wl_message ; 2 ] = [ wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"name\0" as * const u8 as * const c_char , signature : b"2s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_seat_interface : wl_interface = wl_interface { name : b"wl_seat\0" as * const u8 as * const c_char , version : 6 , request_count : 4 , requests : unsafe { & wl_seat_requests as * const _ } , event_count : 2 , events : unsafe { & wl_seat_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_seat_listener { # [ doc = "seat capabilities changed\n\nThis is emitted whenever a seat gains or loses the pointer,\nkeyboard or touch capabilities. The argument is a capability\nenum containing the complete set of capabilities this seat has.\n\nWhen the pointer capability is added, a client may create a\nwl_pointer object using the wl_seat.get_pointer request. This object\nwill receive pointer events until the capability is removed in the\nfuture.\n\nWhen the pointer capability is removed, a client should destroy the\nwl_pointer objects associated with the seat where the capability was\nremoved, using the wl_pointer.release request. No further pointer\nevents will be received on these objects.\n\nIn some compositors, if a seat regains the pointer capability and a\nclient has a previously obtained wl_pointer object of version 4 or\nless, that object may start sending pointer events again. This\nbehavior is considered a misinterpretation of the intended behavior\nand must not be relied upon by the client. wl_pointer objects of\nversion 5 or later must not send events if created before the most\nrecent event notifying the client of an added pointer capability.\n\nThe above behavior also applies to wl_keyboard and wl_touch with the\nkeyboard and touch capabilities, respectively." ] fn capabilities ( & mut self , object : * mut wl_seat , capabilities : capability ) { } # [ doc = "unique identifier for this seat\n\nIn a multiseat configuration this can be used by the client to help\nidentify which physical devices the seat represents. Based on\nthe seat configuration used by the compositor.\n\nOnly available since version 2 of the interface." ] fn name ( & mut self , object : * mut wl_seat , name : * mut c_char ) { } } pub unsafe fn wl_seat_set_user_data ( wl_seat : * mut super :: wl_seat :: wl_seat , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_seat as _ , user_data ) ; } pub unsafe fn wl_seat_get_user_data ( wl_seat : * mut super :: wl_seat :: wl_seat ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_seat as _ ) ; } pub unsafe fn wl_seat_get_version ( wl_seat : * mut super :: wl_seat :: wl_seat ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_seat as _ ) ; } pub unsafe fn wl_seat_add_listener ( wl_seat : * mut super :: wl_seat :: wl_seat , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_seat as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_seat_add_rust_listener ( wl_seat : * mut super :: wl_seat :: wl_seat , listener : & dyn wl_seat_listener ) -> bool { let to = ( listener as * const dyn wl_seat_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_seat_add_listener ( wl_seat as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_seat_destroy ( wl_seat : * mut super :: wl_seat :: wl_seat ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_seat as _ ) ; } # [ doc = "return pointer object\n\nThe ID provided will be initialized to the wl_pointer interface\nfor this seat.\n\nThis request only takes effect if the seat has the pointer\ncapability, or has had the pointer capability in the past.\nIt is a protocol violation to issue this request on a seat that has\nnever had the pointer capability." ] pub unsafe fn wl_seat_get_pointer ( wl_seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: wl_pointer :: wl_pointer { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_seat as _ , 0u32 , & super :: wl_pointer :: wl_pointer_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "return keyboard object\n\nThe ID provided will be initialized to the wl_keyboard interface\nfor this seat.\n\nThis request only takes effect if the seat has the keyboard\ncapability, or has had the keyboard capability in the past.\nIt is a protocol violation to issue this request on a seat that has\nnever had the keyboard capability." ] pub unsafe fn wl_seat_get_keyboard ( wl_seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: wl_keyboard :: wl_keyboard { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_seat as _ , 1u32 , & super :: wl_keyboard :: wl_keyboard_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "return touch object\n\nThe ID provided will be initialized to the wl_touch interface\nfor this seat.\n\nThis request only takes effect if the seat has the touch\ncapability, or has had the touch capability in the past.\nIt is a protocol violation to issue this request on a seat that has\nnever had the touch capability." ] pub unsafe fn wl_seat_get_touch ( wl_seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: wl_touch :: wl_touch { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_seat as _ , 2u32 , & super :: wl_touch :: wl_touch_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "release the seat object\n\nUsing this request a client can tell the server that it is not going to\nuse the seat object anymore." ] pub unsafe fn wl_seat_release ( wl_seat : * mut super :: wl_seat :: wl_seat ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_seat as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_seat as _ ) ; } } # [ doc = "pointer input device\n\nThe wl_pointer interface represents one or more input devices,\nsuch as mice, which control the pointer location and pointer_focus\nof a seat.\n\nThe wl_pointer interface generates motion, enter and leave\nevents for the surfaces that the pointer is located over,\nand button and axis events for button presses, button releases\nand scrolling." ] pub mod wl_pointer { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_pointer { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "physical button state\n\nDescribes the physical state of a button that produced the button\nevent." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum button_state { # [ doc = "the button is not pressed" ] released = 0 , # [ doc = "the button is pressed" ] pressed = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl button_state { pub fn from_raw ( n : u32 ) -> Option < button_state > { match n { 0 => Some ( button_state :: released ) , 1 => Some ( button_state :: pressed ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "axis types\n\nDescribes the axis types of scroll events." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum axis { # [ doc = "vertical axis" ] vertical_scroll = 0 , # [ doc = "horizontal axis" ] horizontal_scroll = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl axis { pub fn from_raw ( n : u32 ) -> Option < axis > { match n { 0 => Some ( axis :: vertical_scroll ) , 1 => Some ( axis :: horizontal_scroll ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "axis source types\n\nDescribes the source types for axis events. This indicates to the\nclient how an axis event was physically generated; a client may\nadjust the user interface accordingly. For example, scroll events\nfrom a \"finger\" source may be in a smooth coordinate space with\nkinetic scrolling whereas a \"wheel\" source may be in discrete steps\nof a number of lines.\n\nThe \"continuous\" axis source is a device generating events in a\ncontinuous coordinate space, but using something other than a\nfinger. One example for this source is button-based scrolling where\nthe vertical motion of a device is converted to scroll events while\na button is held down.\n\nThe \"wheel tilt\" axis source indicates that the actual device is a\nwheel but the scroll event is not caused by a rotation but a\n(usually sideways) tilt of the wheel." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum axis_source { # [ doc = "a physical wheel rotation" ] wheel = 0 , # [ doc = "finger on a touch surface" ] finger = 1 , # [ doc = "continuous coordinate space" ] continuous = 2 , # [ doc = "a physical wheel tilt" ] wheel_tilt = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl axis_source { pub fn from_raw ( n : u32 ) -> Option < axis_source > { match n { 0 => Some ( axis_source :: wheel ) , 1 => Some ( axis_source :: finger ) , 2 => Some ( axis_source :: continuous ) , 3 => Some ( axis_source :: wheel_tilt ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_pointer_requests_set_cursor_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_pointer_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_cursor\0" as * const u8 as * const c_char , signature : b"u?oii\0" as * const u8 as * const c_char , types : unsafe { & wl_pointer_requests_set_cursor_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wl_pointer_events_enter_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut wl_pointer_events_leave_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_pointer_events : [ wl_message ; 9 ] = [ wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"uoff\0" as * const u8 as * const c_char , types : unsafe { & wl_pointer_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"uo\0" as * const u8 as * const c_char , types : unsafe { & wl_pointer_events_leave_types as * const _ } , } , wl_message { name : b"motion\0" as * const u8 as * const c_char , signature : b"uff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"button\0" as * const u8 as * const c_char , signature : b"uuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"axis\0" as * const u8 as * const c_char , signature : b"uuf\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"5\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"axis_source\0" as * const u8 as * const c_char , signature : b"5u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"axis_stop\0" as * const u8 as * const c_char , signature : b"5uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"axis_discrete\0" as * const u8 as * const c_char , signature : b"5ui\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_pointer_interface : wl_interface = wl_interface { name : b"wl_pointer\0" as * const u8 as * const c_char , version : 6 , request_count : 2 , requests : unsafe { & wl_pointer_requests as * const _ } , event_count : 9 , events : unsafe { & wl_pointer_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_pointer_listener { # [ doc = "enter event\n\nNotification that this seat's pointer is focused on a certain\nsurface.\n\nWhen a seat's focus enters a surface, the pointer image\nis undefined and a client should respond to this event by setting\nan appropriate pointer image with the set_cursor request." ] fn enter ( & mut self , object : * mut wl_pointer , serial : u32 , surface : * mut super :: wl_surface :: wl_surface , surface_x : wl_fixed_t , surface_y : wl_fixed_t ) { } # [ doc = "leave event\n\nNotification that this seat's pointer is no longer focused on\na certain surface.\n\nThe leave notification is sent before the enter notification\nfor the new focus." ] fn leave ( & mut self , object : * mut wl_pointer , serial : u32 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "pointer motion event\n\nNotification of pointer location change. The arguments\nsurface_x and surface_y are the location relative to the\nfocused surface." ] fn motion ( & mut self , object : * mut wl_pointer , time : u32 , surface_x : wl_fixed_t , surface_y : wl_fixed_t ) { } # [ doc = "pointer button event\n\nMouse button click and release notifications.\n\nThe location of the click is given by the last motion or\nenter event.\nThe time argument is a timestamp with millisecond\ngranularity, with an undefined base.\n\nThe button is a button code as defined in the Linux kernel's\nlinux/input-event-codes.h header file, e.g. BTN_LEFT.\n\nAny 16-bit button code value is reserved for future additions to the\nkernel's event code list. All other button codes above 0xFFFF are\ncurrently undefined but may be used in future versions of this\nprotocol." ] fn button ( & mut self , object : * mut wl_pointer , serial : u32 , time : u32 , button : u32 , state : button_state ) { } # [ doc = "axis event\n\nScroll and other axis notifications.\n\nFor scroll events (vertical and horizontal scroll axes), the\nvalue parameter is the length of a vector along the specified\naxis in a coordinate space identical to those of motion events,\nrepresenting a relative movement along the specified axis.\n\nFor devices that support movements non-parallel to axes multiple\naxis events will be emitted.\n\nWhen applicable, for example for touch pads, the server can\nchoose to emit scroll events where the motion vector is\nequivalent to a motion event vector.\n\nWhen applicable, a client can transform its content relative to the\nscroll distance." ] fn axis ( & mut self , object : * mut wl_pointer , time : u32 , axis : axis , value : wl_fixed_t ) { } # [ doc = "end of a pointer event sequence\n\nIndicates the end of a set of events that logically belong together.\nA client is expected to accumulate the data in all events within the\nframe before proceeding.\n\nAll wl_pointer events before a wl_pointer.frame event belong\nlogically together. For example, in a diagonal scroll motion the\ncompositor will send an optional wl_pointer.axis_source event, two\nwl_pointer.axis events (horizontal and vertical) and finally a\nwl_pointer.frame event. The client may use this information to\ncalculate a diagonal vector for scrolling.\n\nWhen multiple wl_pointer.axis events occur within the same frame,\nthe motion vector is the combined motion of all events.\nWhen a wl_pointer.axis and a wl_pointer.axis_stop event occur within\nthe same frame, this indicates that axis movement in one axis has\nstopped but continues in the other axis.\nWhen multiple wl_pointer.axis_stop events occur within the same\nframe, this indicates that these axes stopped in the same instance.\n\nA wl_pointer.frame event is sent for every logical event group,\neven if the group only contains a single wl_pointer event.\nSpecifically, a client may get a sequence: motion, frame, button,\nframe, axis, frame, axis_stop, frame.\n\nThe wl_pointer.enter and wl_pointer.leave events are logical events\ngenerated by the compositor and not the hardware. These events are\nalso grouped by a wl_pointer.frame. When a pointer moves from one\nsurface to another, a compositor should group the\nwl_pointer.leave event within the same wl_pointer.frame.\nHowever, a client must not rely on wl_pointer.leave and\nwl_pointer.enter being in the same wl_pointer.frame.\nCompositor-specific policies may require the wl_pointer.leave and\nwl_pointer.enter event being split across multiple wl_pointer.frame\ngroups.\n\nOnly available since version 5 of the interface." ] fn frame ( & mut self , object : * mut wl_pointer , ) { } # [ doc = "axis source event\n\nSource information for scroll and other axes.\n\nThis event does not occur on its own. It is sent before a\nwl_pointer.frame event and carries the source information for\nall events within that frame.\n\nThe source specifies how this event was generated. If the source is\nwl_pointer.axis_source.finger, a wl_pointer.axis_stop event will be\nsent when the user lifts the finger off the device.\n\nIf the source is wl_pointer.axis_source.wheel,\nwl_pointer.axis_source.wheel_tilt or\nwl_pointer.axis_source.continuous, a wl_pointer.axis_stop event may\nor may not be sent. Whether a compositor sends an axis_stop event\nfor these sources is hardware-specific and implementation-dependent;\nclients must not rely on receiving an axis_stop event for these\nscroll sources and should treat scroll sequences from these scroll\nsources as unterminated by default.\n\nThis event is optional. If the source is unknown for a particular\naxis event sequence, no event is sent.\nOnly one wl_pointer.axis_source event is permitted per frame.\n\nThe order of wl_pointer.axis_discrete and wl_pointer.axis_source is\nnot guaranteed.\n\nOnly available since version 5 of the interface." ] fn axis_source ( & mut self , object : * mut wl_pointer , axis_source : axis_source ) { } # [ doc = "axis stop event\n\nStop notification for scroll and other axes.\n\nFor some wl_pointer.axis_source types, a wl_pointer.axis_stop event\nis sent to notify a client that the axis sequence has terminated.\nThis enables the client to implement kinetic scrolling.\nSee the wl_pointer.axis_source documentation for information on when\nthis event may be generated.\n\nAny wl_pointer.axis events with the same axis_source after this\nevent should be considered as the start of a new axis motion.\n\nThe timestamp is to be interpreted identical to the timestamp in the\nwl_pointer.axis event. The timestamp value may be the same as a\npreceding wl_pointer.axis event.\n\nOnly available since version 5 of the interface." ] fn axis_stop ( & mut self , object : * mut wl_pointer , time : u32 , axis : axis ) { } # [ doc = "axis click event\n\nDiscrete step information for scroll and other axes.\n\nThis event carries the axis value of the wl_pointer.axis event in\ndiscrete steps (e.g. mouse wheel clicks).\n\nThis event does not occur on its own, it is coupled with a\nwl_pointer.axis event that represents this axis value on a\ncontinuous scale. The protocol guarantees that each axis_discrete\nevent is always followed by exactly one axis event with the same\naxis number within the same wl_pointer.frame. Note that the protocol\nallows for other events to occur between the axis_discrete and\nits coupled axis event, including other axis_discrete or axis\nevents.\n\nThis event is optional; continuous scrolling devices\nlike two-finger scrolling on touchpads do not have discrete\nsteps and do not generate this event.\n\nThe discrete value carries the directional information. e.g. a value\nof -2 is two steps towards the negative direction of this axis.\n\nThe axis number is identical to the axis number in the associated\naxis event.\n\nThe order of wl_pointer.axis_discrete and wl_pointer.axis_source is\nnot guaranteed.\n\nOnly available since version 5 of the interface." ] fn axis_discrete ( & mut self , object : * mut wl_pointer , axis : axis , discrete : i32 ) { } } pub unsafe fn wl_pointer_set_user_data ( wl_pointer : * mut super :: wl_pointer :: wl_pointer , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_pointer as _ , user_data ) ; } pub unsafe fn wl_pointer_get_user_data ( wl_pointer : * mut super :: wl_pointer :: wl_pointer ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_pointer as _ ) ; } pub unsafe fn wl_pointer_get_version ( wl_pointer : * mut super :: wl_pointer :: wl_pointer ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_pointer as _ ) ; } pub unsafe fn wl_pointer_add_listener ( wl_pointer : * mut super :: wl_pointer :: wl_pointer , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_pointer as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_pointer_add_rust_listener ( wl_pointer : * mut super :: wl_pointer :: wl_pointer , listener : & dyn wl_pointer_listener ) -> bool { let to = ( listener as * const dyn wl_pointer_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_pointer_add_listener ( wl_pointer as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_pointer_destroy ( wl_pointer : * mut super :: wl_pointer :: wl_pointer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_pointer as _ ) ; } # [ doc = "set the pointer surface\n\nSet the pointer surface, i.e., the surface that contains the\npointer image (cursor). This request gives the surface the role\nof a cursor. If the surface already has another role, it raises\na protocol error.\n\nThe cursor actually changes only if the pointer\nfocus for this device is one of the requesting client's surfaces\nor the surface parameter is the current pointer surface. If\nthere was a previous surface set with this request it is\nreplaced. If surface is NULL, the pointer image is hidden.\n\nThe parameters hotspot_x and hotspot_y define the position of\nthe pointer surface relative to the pointer location. Its\ntop-left corner is always at (x, y) - (hotspot_x, hotspot_y),\nwhere (x, y) are the coordinates of the pointer location, in\nsurface-local coordinates.\n\nOn surface.attach requests to the pointer surface, hotspot_x\nand hotspot_y are decremented by the x and y parameters\npassed to the request. Attach must be confirmed by\nwl_surface.commit as usual.\n\nThe hotspot can also be updated by passing the currently set\npointer surface to this request with new values for hotspot_x\nand hotspot_y.\n\nThe current and pending input regions of the wl_surface are\ncleared, and wl_surface.set_input_region is ignored until the\nwl_surface is no longer used as the cursor. When the use as a\ncursor ends, the current and pending input regions become\nundefined, and the wl_surface is unmapped." ] pub unsafe fn wl_pointer_set_cursor ( wl_pointer : * mut super :: wl_pointer :: wl_pointer , serial : u32 , surface : * mut super :: wl_surface :: wl_surface , hotspot_x : i32 , hotspot_y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_pointer as _ , 0u32 , serial , surface , hotspot_x , hotspot_y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the pointer object\n\nUsing this request a client can tell the server that it is not going to\nuse the pointer object anymore.\n\nThis request destroys the pointer proxy object, so clients must not call\nwl_pointer_destroy() after using this request." ] pub unsafe fn wl_pointer_release ( wl_pointer : * mut super :: wl_pointer :: wl_pointer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_pointer as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_pointer as _ ) ; } } # [ doc = "keyboard input device\n\nThe wl_keyboard interface represents one or more keyboards\nassociated with a seat." ] pub mod wl_keyboard { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_keyboard { } # [ doc = "keyboard mapping format\n\nThis specifies the format of the keymap provided to the\nclient with the wl_keyboard.keymap event." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum keymap_format { # [ doc = "no keymap; client must understand how to interpret the raw keycode" ] no_keymap = 0 , # [ doc = "libxkbcommon compatible; to determine the xkb keycode, clients must add 8 to the key event keycode" ] xkb_v1 = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl keymap_format { pub fn from_raw ( n : u32 ) -> Option < keymap_format > { match n { 0 => Some ( keymap_format :: no_keymap ) , 1 => Some ( keymap_format :: xkb_v1 ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "physical key state\n\nDescribes the physical state of a key that produced the key event." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum key_state { # [ doc = "key is not pressed" ] released = 0 , # [ doc = "key is pressed" ] pressed = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl key_state { pub fn from_raw ( n : u32 ) -> Option < key_state > { match n { 0 => Some ( key_state :: released ) , 1 => Some ( key_state :: pressed ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_keyboard_requests : [ wl_message ; 1 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wl_keyboard_events_enter_types : [ * const wl_interface ; 3 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut wl_keyboard_events_leave_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_keyboard_events : [ wl_message ; 6 ] = [ wl_message { name : b"keymap\0" as * const u8 as * const c_char , signature : b"uhu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"uoa\0" as * const u8 as * const c_char , types : unsafe { & wl_keyboard_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"uo\0" as * const u8 as * const c_char , types : unsafe { & wl_keyboard_events_leave_types as * const _ } , } , wl_message { name : b"key\0" as * const u8 as * const c_char , signature : b"uuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifiers\0" as * const u8 as * const c_char , signature : b"uuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"repeat_info\0" as * const u8 as * const c_char , signature : b"4ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_keyboard_interface : wl_interface = wl_interface { name : b"wl_keyboard\0" as * const u8 as * const c_char , version : 6 , request_count : 1 , requests : unsafe { & wl_keyboard_requests as * const _ } , event_count : 6 , events : unsafe { & wl_keyboard_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_keyboard_listener { # [ doc = "keyboard mapping\n\nThis event provides a file descriptor to the client which can be\nmemory-mapped to provide a keyboard mapping description." ] fn keymap ( & mut self , object : * mut wl_keyboard , format : keymap_format , fd : :: std :: os :: unix :: io :: RawFd , size : u32 ) { } # [ doc = "enter event\n\nNotification that this seat's keyboard focus is on a certain\nsurface." ] fn enter ( & mut self , object : * mut wl_keyboard , serial : u32 , surface : * mut super :: wl_surface :: wl_surface , keys : * mut wl_array ) { } # [ doc = "leave event\n\nNotification that this seat's keyboard focus is no longer on\na certain surface.\n\nThe leave notification is sent before the enter notification\nfor the new focus." ] fn leave ( & mut self , object : * mut wl_keyboard , serial : u32 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "key event\n\nA key was pressed or released.\nThe time argument is a timestamp with millisecond\ngranularity, with an undefined base." ] fn key ( & mut self , object : * mut wl_keyboard , serial : u32 , time : u32 , key : u32 , state : key_state ) { } # [ doc = "modifier and group state\n\nNotifies clients that the modifier and/or group state has\nchanged, and it should update its local state." ] fn modifiers ( & mut self , object : * mut wl_keyboard , serial : u32 , mods_depressed : u32 , mods_latched : u32 , mods_locked : u32 , group : u32 ) { } # [ doc = "repeat rate and delay\n\nInforms the client about the keyboard's repeat rate and delay.\n\nThis event is sent as soon as the wl_keyboard object has been created,\nand is guaranteed to be received by the client before any key press\nevent.\n\nNegative values for either rate or delay are illegal. A rate of zero\nwill disable any repeating (regardless of the value of delay).\n\nThis event can be sent later on as well with a new value if necessary,\nso clients should continue listening for the event past the creation\nof wl_keyboard.\n\nOnly available since version 4 of the interface." ] fn repeat_info ( & mut self , object : * mut wl_keyboard , rate : i32 , delay : i32 ) { } } pub unsafe fn wl_keyboard_set_user_data ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_keyboard as _ , user_data ) ; } pub unsafe fn wl_keyboard_get_user_data ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_keyboard as _ ) ; } pub unsafe fn wl_keyboard_get_version ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_keyboard as _ ) ; } pub unsafe fn wl_keyboard_add_listener ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_keyboard as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_keyboard_add_rust_listener ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard , listener : & dyn wl_keyboard_listener ) -> bool { let to = ( listener as * const dyn wl_keyboard_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_keyboard_add_listener ( wl_keyboard as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_keyboard_destroy ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_keyboard as _ ) ; } # [ doc = "release the keyboard object" ] pub unsafe fn wl_keyboard_release ( wl_keyboard : * mut super :: wl_keyboard :: wl_keyboard ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_keyboard as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_keyboard as _ ) ; } } # [ doc = "touchscreen input device\n\nThe wl_touch interface represents a touchscreen\nassociated with a seat.\n\nTouch interactions can consist of one or more contacts.\nFor each contact, a series of events is generated, starting\nwith a down event, followed by zero or more motion events,\nand ending with an up event. Events relating to the same\ncontact point can be identified by the ID of the sequence." ] pub mod wl_touch { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_touch { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_touch_requests : [ wl_message ; 1 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wl_touch_events_down_types : [ * const wl_interface ; 6 ] = [ NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_touch_events : [ wl_message ; 7 ] = [ wl_message { name : b"down\0" as * const u8 as * const c_char , signature : b"uuoiff\0" as * const u8 as * const c_char , types : unsafe { & wl_touch_events_down_types as * const _ } , } , wl_message { name : b"up\0" as * const u8 as * const c_char , signature : b"uui\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"motion\0" as * const u8 as * const c_char , signature : b"uiff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cancel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"shape\0" as * const u8 as * const c_char , signature : b"6iff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"orientation\0" as * const u8 as * const c_char , signature : b"6if\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_touch_interface : wl_interface = wl_interface { name : b"wl_touch\0" as * const u8 as * const c_char , version : 6 , request_count : 1 , requests : unsafe { & wl_touch_requests as * const _ } , event_count : 7 , events : unsafe { & wl_touch_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_touch_listener { # [ doc = "touch down event and beginning of a touch sequence\n\nA new touch point has appeared on the surface. This touch point is\nassigned a unique ID. Future events from this touch point reference\nthis ID. The ID ceases to be valid after a touch up event and may be\nreused in the future." ] fn down ( & mut self , object : * mut wl_touch , serial : u32 , time : u32 , surface : * mut super :: wl_surface :: wl_surface , id : i32 , x : wl_fixed_t , y : wl_fixed_t ) { } # [ doc = "end of a touch event sequence\n\nThe touch point has disappeared. No further events will be sent for\nthis touch point and the touch point's ID is released and may be\nreused in a future touch down event." ] fn up ( & mut self , object : * mut wl_touch , serial : u32 , time : u32 , id : i32 ) { } # [ doc = "update of touch point coordinates\n\nA touch point has changed coordinates." ] fn motion ( & mut self , object : * mut wl_touch , time : u32 , id : i32 , x : wl_fixed_t , y : wl_fixed_t ) { } # [ doc = "end of touch frame event\n\nIndicates the end of a set of events that logically belong together.\nA client is expected to accumulate the data in all events within the\nframe before proceeding.\n\nA wl_touch.frame terminates at least one event but otherwise no\nguarantee is provided about the set of events within a frame. A client\nmust assume that any state not updated in a frame is unchanged from the\npreviously known state." ] fn frame ( & mut self , object : * mut wl_touch , ) { } # [ doc = "touch session cancelled\n\nSent if the compositor decides the touch stream is a global\ngesture. No further events are sent to the clients from that\nparticular gesture. Touch cancellation applies to all touch points\ncurrently active on this client's surface. The client is\nresponsible for finalizing the touch points, future touch points on\nthis surface may reuse the touch point ID." ] fn cancel ( & mut self , object : * mut wl_touch , ) { } # [ doc = "update shape of touch point\n\nSent when a touchpoint has changed its shape.\n\nThis event does not occur on its own. It is sent before a\nwl_touch.frame event and carries the new shape information for\nany previously reported, or new touch points of that frame.\n\nOther events describing the touch point such as wl_touch.down,\nwl_touch.motion or wl_touch.orientation may be sent within the\nsame wl_touch.frame. A client should treat these events as a single\nlogical touch point update. The order of wl_touch.shape,\nwl_touch.orientation and wl_touch.motion is not guaranteed.\nA wl_touch.down event is guaranteed to occur before the first\nwl_touch.shape event for this touch ID but both events may occur within\nthe same wl_touch.frame.\n\nA touchpoint shape is approximated by an ellipse through the major and\nminor axis length. The major axis length describes the longer diameter\nof the ellipse, while the minor axis length describes the shorter\ndiameter. Major and minor are orthogonal and both are specified in\nsurface-local coordinates. The center of the ellipse is always at the\ntouchpoint location as reported by wl_touch.down or wl_touch.move.\n\nThis event is only sent by the compositor if the touch device supports\nshape reports. The client has to make reasonable assumptions about the\nshape if it did not receive this event.\n\nOnly available since version 6 of the interface." ] fn shape ( & mut self , object : * mut wl_touch , id : i32 , major : wl_fixed_t , minor : wl_fixed_t ) { } # [ doc = "update orientation of touch point\n\nSent when a touchpoint has changed its orientation.\n\nThis event does not occur on its own. It is sent before a\nwl_touch.frame event and carries the new shape information for\nany previously reported, or new touch points of that frame.\n\nOther events describing the touch point such as wl_touch.down,\nwl_touch.motion or wl_touch.shape may be sent within the\nsame wl_touch.frame. A client should treat these events as a single\nlogical touch point update. The order of wl_touch.shape,\nwl_touch.orientation and wl_touch.motion is not guaranteed.\nA wl_touch.down event is guaranteed to occur before the first\nwl_touch.orientation event for this touch ID but both events may occur\nwithin the same wl_touch.frame.\n\nThe orientation describes the clockwise angle of a touchpoint's major\naxis to the positive surface y-axis and is normalized to the -180 to\n+180 degree range. The granularity of orientation depends on the touch\ndevice, some devices only support binary rotation values between 0 and\n90 degrees.\n\nThis event is only sent by the compositor if the touch device supports\norientation reports.\n\nOnly available since version 6 of the interface." ] fn orientation ( & mut self , object : * mut wl_touch , id : i32 , orientation : wl_fixed_t ) { } } pub unsafe fn wl_touch_set_user_data ( wl_touch : * mut super :: wl_touch :: wl_touch , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_touch as _ , user_data ) ; } pub unsafe fn wl_touch_get_user_data ( wl_touch : * mut super :: wl_touch :: wl_touch ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_touch as _ ) ; } pub unsafe fn wl_touch_get_version ( wl_touch : * mut super :: wl_touch :: wl_touch ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_touch as _ ) ; } pub unsafe fn wl_touch_add_listener ( wl_touch : * mut super :: wl_touch :: wl_touch , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_touch as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_touch_add_rust_listener ( wl_touch : * mut super :: wl_touch :: wl_touch , listener : & dyn wl_touch_listener ) -> bool { let to = ( listener as * const dyn wl_touch_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_touch_add_listener ( wl_touch as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_touch_destroy ( wl_touch : * mut super :: wl_touch :: wl_touch ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_touch as _ ) ; } # [ doc = "release the touch object" ] pub unsafe fn wl_touch_release ( wl_touch : * mut super :: wl_touch :: wl_touch ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_touch as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_touch as _ ) ; } } # [ doc = "compositor output region\n\nAn output describes part of the compositor geometry. The\ncompositor works in the 'compositor coordinate system' and an\noutput corresponds to a rectangular area in that space that is\nactually visible. This typically corresponds to a monitor that\ndisplays part of the compositor space. This object is published\nas global during start up, or when a monitor is hotplugged." ] pub mod wl_output { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_output { } # [ doc = "subpixel geometry information\n\nThis enumeration describes how the physical\npixels on an output are laid out." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum subpixel { # [ doc = "unknown geometry" ] unknown = 0 , # [ doc = "no geometry" ] none = 1 , # [ doc = "horizontal RGB" ] horizontal_rgb = 2 , # [ doc = "horizontal BGR" ] horizontal_bgr = 3 , # [ doc = "vertical RGB" ] vertical_rgb = 4 , # [ doc = "vertical BGR" ] vertical_bgr = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl subpixel { pub fn from_raw ( n : u32 ) -> Option < subpixel > { match n { 0 => Some ( subpixel :: unknown ) , 1 => Some ( subpixel :: none ) , 2 => Some ( subpixel :: horizontal_rgb ) , 3 => Some ( subpixel :: horizontal_bgr ) , 4 => Some ( subpixel :: vertical_rgb ) , 5 => Some ( subpixel :: vertical_bgr ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "transform from framebuffer to output\n\nThis describes the transform that a compositor will apply to a\nsurface to compensate for the rotation or mirroring of an\noutput device.\n\nThe flipped values correspond to an initial flip around a\nvertical axis followed by rotation.\n\nThe purpose is mainly to allow clients to render accordingly and\ntell the compositor, so that for fullscreen surfaces, the\ncompositor will still be able to scan out directly from client\nsurfaces." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum transform { # [ doc = "no transform" ] normal = 0 , # [ doc = "90 degrees counter-clockwise" ] _90 = 1 , # [ doc = "180 degrees counter-clockwise" ] _180 = 2 , # [ doc = "270 degrees counter-clockwise" ] _270 = 3 , # [ doc = "180 degree flip around a vertical axis" ] flipped = 4 , # [ doc = "flip and rotate 90 degrees counter-clockwise" ] flipped_90 = 5 , # [ doc = "flip and rotate 180 degrees counter-clockwise" ] flipped_180 = 6 , # [ doc = "flip and rotate 270 degrees counter-clockwise" ] flipped_270 = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl transform { pub fn from_raw ( n : u32 ) -> Option < transform > { match n { 0 => Some ( transform :: normal ) , 1 => Some ( transform :: _90 ) , 2 => Some ( transform :: _180 ) , 3 => Some ( transform :: _270 ) , 4 => Some ( transform :: flipped ) , 5 => Some ( transform :: flipped_90 ) , 6 => Some ( transform :: flipped_180 ) , 7 => Some ( transform :: flipped_270 ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { # [ doc = "mode information\n\nThese flags describe properties of an output mode.\nThey are used in the flags bitfield of the mode event." ] pub struct mode : u32 { # [ doc = "indicates this is the current mode" ] const current = 1 ; # [ doc = "indicates this is the preferred mode" ] const preferred = 2 ; } } impl mode { pub fn from_raw ( n : u32 ) -> Option < mode > { Some ( mode :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_output_requests : [ wl_message ; 1 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_output_events : [ wl_message ; 4 ] = [ wl_message { name : b"geometry\0" as * const u8 as * const c_char , signature : b"iiiiissi\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"uiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"scale\0" as * const u8 as * const c_char , signature : b"2i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_output_interface : wl_interface = wl_interface { name : b"wl_output\0" as * const u8 as * const c_char , version : 3 , request_count : 1 , requests : unsafe { & wl_output_requests as * const _ } , event_count : 4 , events : unsafe { & wl_output_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_output_listener { # [ doc = "properties of the output\n\nThe geometry event describes geometric properties of the output.\nThe event is sent when binding to the output object and whenever\nany of the properties change.\n\nThe physical size can be set to zero if it doesn't make sense for this\noutput (e.g. for projectors or virtual outputs)." ] fn geometry ( & mut self , object : * mut wl_output , x : i32 , y : i32 , physical_width : i32 , physical_height : i32 , subpixel : subpixel , make : * mut c_char , model : * mut c_char , transform : transform ) { } # [ doc = "advertise available modes for the output\n\nThe mode event describes an available mode for the output.\n\nThe event is sent when binding to the output object and there\nwill always be one mode, the current mode. The event is sent\nagain if an output changes mode, for the mode that is now\ncurrent. In other words, the current mode is always the last\nmode that was received with the current flag set.\n\nThe size of a mode is given in physical hardware units of\nthe output device. This is not necessarily the same as\nthe output size in the global compositor space. For instance,\nthe output may be scaled, as described in wl_output.scale,\nor transformed, as described in wl_output.transform." ] fn mode ( & mut self , object : * mut wl_output , flags : mode , width : i32 , height : i32 , refresh : i32 ) { } # [ doc = "sent all information about output\n\nThis event is sent after all other properties have been\nsent after binding to the output object and after any\nother property changes done after that. This allows\nchanges to the output properties to be seen as\natomic, even if they happen via multiple events.\n\nOnly available since version 2 of the interface." ] fn done ( & mut self , object : * mut wl_output , ) { } # [ doc = "output scaling properties\n\nThis event contains scaling geometry information\nthat is not in the geometry event. It may be sent after\nbinding the output object or if the output scale changes\nlater. If it is not sent, the client should assume a\nscale of 1.\n\nA scale larger than 1 means that the compositor will\nautomatically scale surface buffers by this amount\nwhen rendering. This is used for very high resolution\ndisplays where applications rendering at the native\nresolution would be too small to be legible.\n\nIt is intended that scaling aware clients track the\ncurrent output of a surface, and if it is on a scaled\noutput it should use wl_surface.set_buffer_scale with\nthe scale of the output. That way the compositor can\navoid scaling the surface, and the client can supply\na higher detail image.\n\nOnly available since version 2 of the interface." ] fn scale ( & mut self , object : * mut wl_output , factor : i32 ) { } } pub unsafe fn wl_output_set_user_data ( wl_output : * mut super :: wl_output :: wl_output , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_output as _ , user_data ) ; } pub unsafe fn wl_output_get_user_data ( wl_output : * mut super :: wl_output :: wl_output ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_output as _ ) ; } pub unsafe fn wl_output_get_version ( wl_output : * mut super :: wl_output :: wl_output ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_output as _ ) ; } pub unsafe fn wl_output_add_listener ( wl_output : * mut super :: wl_output :: wl_output , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_output as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_output_add_rust_listener ( wl_output : * mut super :: wl_output :: wl_output , listener : & dyn wl_output_listener ) -> bool { let to = ( listener as * const dyn wl_output_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_output_add_listener ( wl_output as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_output_destroy ( wl_output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_output as _ ) ; } # [ doc = "release the output object\n\nUsing this request a client can tell the server that it is not going to\nuse the output object anymore." ] pub unsafe fn wl_output_release ( wl_output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_output as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_output as _ ) ; } } # [ doc = "region interface\n\nA region object describes an area.\n\nRegion objects are used to describe the opaque and input\nregions of a surface." ] pub mod wl_region { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_region { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_region_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"add\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"subtract\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_region_interface : wl_interface = wl_interface { name : b"wl_region\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & wl_region_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_region_listener { } pub unsafe fn wl_region_set_user_data ( wl_region : * mut super :: wl_region :: wl_region , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_region as _ , user_data ) ; } pub unsafe fn wl_region_get_user_data ( wl_region : * mut super :: wl_region :: wl_region ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_region as _ ) ; } pub unsafe fn wl_region_get_version ( wl_region : * mut super :: wl_region :: wl_region ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_region as _ ) ; } pub unsafe fn wl_region_add_listener ( wl_region : * mut super :: wl_region :: wl_region , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_region as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_region_add_rust_listener ( wl_region : * mut super :: wl_region :: wl_region , listener : & dyn wl_region_listener ) -> bool { let to = ( listener as * const dyn wl_region_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_region_add_listener ( wl_region as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy region\n\nDestroy the region. This will invalidate the object ID." ] pub unsafe fn wl_region_destroy ( wl_region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_region as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_region as _ ) ; } # [ doc = "add rectangle to region\n\nAdd the specified rectangle to the region." ] pub unsafe fn wl_region_add ( wl_region : * mut super :: wl_region :: wl_region , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_region as _ , 1u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "subtract rectangle from region\n\nSubtract the specified rectangle from the region." ] pub unsafe fn wl_region_subtract ( wl_region : * mut super :: wl_region :: wl_region , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_region as _ , 2u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "sub-surface compositing\n\nThe global interface exposing sub-surface compositing capabilities.\nA wl_surface, that has sub-surfaces associated, is called the\nparent surface. Sub-surfaces can be arbitrarily nested and create\na tree of sub-surfaces.\n\nThe root surface in a tree of sub-surfaces is the main\nsurface. The main surface cannot be a sub-surface, because\nsub-surfaces must always have a parent.\n\nA main surface with its sub-surfaces forms a (compound) window.\nFor window management purposes, this set of wl_surface objects is\nto be considered as a single window, and it should also behave as\nsuch.\n\nThe aim of sub-surfaces is to offload some of the compositing work\nwithin a window from clients to the compositor. A prime example is\na video player with decorations and video in separate wl_surface\nobjects. This should allow the compositor to pass YUV video buffer\nprocessing to dedicated overlay hardware when possible." ] pub mod wl_subcompositor { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_subcompositor { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "the to-be sub-surface is invalid" ] bad_surface = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: bad_surface ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_subcompositor_requests_get_subsurface_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_subsurface :: wl_subsurface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_subcompositor_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_subsurface\0" as * const u8 as * const c_char , signature : b"noo\0" as * const u8 as * const c_char , types : unsafe { & wl_subcompositor_requests_get_subsurface_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_subcompositor_interface : wl_interface = wl_interface { name : b"wl_subcompositor\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & wl_subcompositor_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_subcompositor_listener { } pub unsafe fn wl_subcompositor_set_user_data ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_subcompositor as _ , user_data ) ; } pub unsafe fn wl_subcompositor_get_user_data ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_subcompositor as _ ) ; } pub unsafe fn wl_subcompositor_get_version ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_subcompositor as _ ) ; } pub unsafe fn wl_subcompositor_add_listener ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_subcompositor as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_subcompositor_add_rust_listener ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor , listener : & dyn wl_subcompositor_listener ) -> bool { let to = ( listener as * const dyn wl_subcompositor_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_subcompositor_add_listener ( wl_subcompositor as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "unbind from the subcompositor interface\n\nInforms the server that the client will not be using this\nprotocol object anymore. This does not affect any other\nobjects, wl_subsurface objects included." ] pub unsafe fn wl_subcompositor_destroy ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subcompositor as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_subcompositor as _ ) ; } # [ doc = "give a surface the role sub-surface\n\nCreate a sub-surface interface for the given surface, and\nassociate it with the given parent surface. This turns a\nplain wl_surface into a sub-surface.\n\nThe to-be sub-surface must not already have another role, and it\nmust not have an existing wl_subsurface object. Otherwise a protocol\nerror is raised.\n\nAdding sub-surfaces to a parent is a double-buffered operation on the\nparent (see wl_surface.commit). The effect of adding a sub-surface\nbecomes visible on the next time the state of the parent surface is\napplied.\n\nThis request modifies the behaviour of wl_surface.commit request on\nthe sub-surface, see the documentation on wl_subsurface interface." ] pub unsafe fn wl_subcompositor_get_subsurface ( wl_subcompositor : * mut super :: wl_subcompositor :: wl_subcompositor , surface : * mut super :: wl_surface :: wl_surface , parent : * mut super :: wl_surface :: wl_surface ) -> * mut super :: wl_subsurface :: wl_subsurface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_subcompositor as _ , 1u32 , & super :: wl_subsurface :: wl_subsurface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface , parent ) ; return r as _ ; } } # [ doc = "sub-surface interface to a wl_surface\n\nAn additional interface to a wl_surface object, which has been\nmade a sub-surface. A sub-surface has one parent surface. A\nsub-surface's size and position are not limited to that of the parent.\nParticularly, a sub-surface is not automatically clipped to its\nparent's area.\n\nA sub-surface becomes mapped, when a non-NULL wl_buffer is applied\nand the parent surface is mapped. The order of which one happens\nfirst is irrelevant. A sub-surface is hidden if the parent becomes\nhidden, or if a NULL wl_buffer is applied. These rules apply\nrecursively through the tree of surfaces.\n\nThe behaviour of a wl_surface.commit request on a sub-surface\ndepends on the sub-surface's mode. The possible modes are\nsynchronized and desynchronized, see methods\nwl_subsurface.set_sync and wl_subsurface.set_desync. Synchronized\nmode caches the wl_surface state to be applied when the parent's\nstate gets applied, and desynchronized mode applies the pending\nwl_surface state directly. A sub-surface is initially in the\nsynchronized mode.\n\nSub-surfaces have also other kind of state, which is managed by\nwl_subsurface requests, as opposed to wl_surface requests. This\nstate includes the sub-surface position relative to the parent\nsurface (wl_subsurface.set_position), and the stacking order of\nthe parent and its sub-surfaces (wl_subsurface.place_above and\n.place_below). This state is applied when the parent surface's\nwl_surface state is applied, regardless of the sub-surface's mode.\nAs the exception, set_sync and set_desync are effective immediately.\n\nThe main surface can be thought to be always in desynchronized mode,\nsince it does not have a parent in the sub-surfaces sense.\n\nEven if a sub-surface is in desynchronized mode, it will behave as\nin synchronized mode, if its parent surface behaves as in\nsynchronized mode. This rule is applied recursively throughout the\ntree of surfaces. This means, that one can set a sub-surface into\nsynchronized mode, and then assume that all its child and grand-child\nsub-surfaces are synchronized, too, without explicitly setting them.\n\nIf the wl_surface associated with the wl_subsurface is destroyed, the\nwl_subsurface object becomes inert. Note, that destroying either object\ntakes effect immediately. If you need to synchronize the removal\nof a sub-surface to the parent surface update, unmap the sub-surface\nfirst by attaching a NULL wl_buffer, update parent, and then destroy\nthe sub-surface.\n\nIf the parent wl_surface object is destroyed, the sub-surface is\nunmapped." ] pub mod wl_subsurface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_subsurface { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "wl_surface is not a sibling or the parent" ] bad_surface = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: bad_surface ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_subsurface_requests_place_above_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut wl_subsurface_requests_place_below_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_subsurface_requests : [ wl_message ; 6 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"place_above\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wl_subsurface_requests_place_above_types as * const _ } , } , wl_message { name : b"place_below\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wl_subsurface_requests_place_below_types as * const _ } , } , wl_message { name : b"set_sync\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_desync\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_subsurface_interface : wl_interface = wl_interface { name : b"wl_subsurface\0" as * const u8 as * const c_char , version : 1 , request_count : 6 , requests : unsafe { & wl_subsurface_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_subsurface_listener { } pub unsafe fn wl_subsurface_set_user_data ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_subsurface as _ , user_data ) ; } pub unsafe fn wl_subsurface_get_user_data ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_subsurface as _ ) ; } pub unsafe fn wl_subsurface_get_version ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_subsurface as _ ) ; } pub unsafe fn wl_subsurface_add_listener ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_subsurface as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_subsurface_add_rust_listener ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface , listener : & dyn wl_subsurface_listener ) -> bool { let to = ( listener as * const dyn wl_subsurface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_subsurface_add_listener ( wl_subsurface as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "remove sub-surface interface\n\nThe sub-surface interface is removed from the wl_surface object\nthat was turned into a sub-surface with a\nwl_subcompositor.get_subsurface request. The wl_surface's association\nto the parent is deleted, and the wl_surface loses its role as\na sub-surface. The wl_surface is unmapped immediately." ] pub unsafe fn wl_subsurface_destroy ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subsurface as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_subsurface as _ ) ; } # [ doc = "reposition the sub-surface\n\nThis schedules a sub-surface position change.\nThe sub-surface will be moved so that its origin (top left\ncorner pixel) will be at the location x, y of the parent surface\ncoordinate system. The coordinates are not restricted to the parent\nsurface area. Negative values are allowed.\n\nThe scheduled coordinates will take effect whenever the state of the\nparent surface is applied. When this happens depends on whether the\nparent surface is in synchronized mode or not. See\nwl_subsurface.set_sync and wl_subsurface.set_desync for details.\n\nIf more than one set_position request is invoked by the client before\nthe commit of the parent surface, the position of a new request always\nreplaces the scheduled position from any previous request.\n\nThe initial position is 0, 0." ] pub unsafe fn wl_subsurface_set_position ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subsurface as _ , 1u32 , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "restack the sub-surface\n\nThis sub-surface is taken from the stack, and put back just\nabove the reference surface, changing the z-order of the sub-surfaces.\nThe reference surface must be one of the sibling surfaces, or the\nparent surface. Using any other surface, including this sub-surface,\nwill cause a protocol error.\n\nThe z-order is double-buffered. Requests are handled in order and\napplied immediately to a pending state. The final pending state is\ncopied to the active state the next time the state of the parent\nsurface is applied. When this happens depends on whether the parent\nsurface is in synchronized mode or not. See wl_subsurface.set_sync and\nwl_subsurface.set_desync for details.\n\nA new sub-surface is initially added as the top-most in the stack\nof its siblings and parent." ] pub unsafe fn wl_subsurface_place_above ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface , sibling : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subsurface as _ , 2u32 , sibling , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "restack the sub-surface\n\nThe sub-surface is placed just below the reference surface.\nSee wl_subsurface.place_above." ] pub unsafe fn wl_subsurface_place_below ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface , sibling : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subsurface as _ , 3u32 , sibling , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set sub-surface to synchronized mode\n\nChange the commit behaviour of the sub-surface to synchronized\nmode, also described as the parent dependent mode.\n\nIn synchronized mode, wl_surface.commit on a sub-surface will\naccumulate the committed state in a cache, but the state will\nnot be applied and hence will not change the compositor output.\nThe cached state is applied to the sub-surface immediately after\nthe parent surface's state is applied. This ensures atomic\nupdates of the parent and all its synchronized sub-surfaces.\nApplying the cached state will invalidate the cache, so further\nparent surface commits do not (re-)apply old state.\n\nSee wl_subsurface for the recursive effect of this mode." ] pub unsafe fn wl_subsurface_set_sync ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subsurface as _ , 4u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set sub-surface to desynchronized mode\n\nChange the commit behaviour of the sub-surface to desynchronized\nmode, also described as independent or freely running mode.\n\nIn desynchronized mode, wl_surface.commit on a sub-surface will\napply the pending state directly, without caching, as happens\nnormally with a wl_surface. Calling wl_surface.commit on the\nparent surface has no effect on the sub-surface's wl_surface\nstate. This mode allows a sub-surface to be updated on its own.\n\nIf cached state exists when wl_surface.commit is called in\ndesynchronized mode, the pending state is added to the cached\nstate, and applied as a whole. This invalidates the cache.\n\nNote: even if a sub-surface is set to desynchronized, a parent\nsub-surface may override it to behave as synchronized. For details,\nsee wl_subsurface.\n\nIf a surface's parent surface behaves as desynchronized, then\nthe cached state is applied on set_desync." ] pub unsafe fn wl_subsurface_set_desync ( wl_subsurface : * mut super :: wl_subsurface :: wl_subsurface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_subsurface as _ , 5u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod xdg_foreign_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "interface for exporting surfaces\n\nA global interface used for exporting surfaces that can later be imported\nusing xdg_importer." ] pub mod zxdg_exporter_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_exporter_v1 { } static mut zxdg_exporter_v1_requests_export_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_exported_v1 :: zxdg_exported_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_exporter_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"export\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zxdg_exporter_v1_requests_export_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_exporter_v1_interface : wl_interface = wl_interface { name : b"zxdg_exporter_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_exporter_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_exporter_v1_listener { } pub unsafe fn zxdg_exporter_v1_set_user_data ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_exporter_v1 as _ , user_data ) ; } pub unsafe fn zxdg_exporter_v1_get_user_data ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_exporter_v1 as _ ) ; } pub unsafe fn zxdg_exporter_v1_get_version ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_exporter_v1 as _ ) ; } pub unsafe fn zxdg_exporter_v1_add_listener ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_exporter_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_exporter_v1_add_rust_listener ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 , listener : & dyn zxdg_exporter_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_exporter_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_exporter_v1_add_listener ( zxdg_exporter_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_exporter object\n\nNotify the compositor that the xdg_exporter object will no longer be\nused." ] pub unsafe fn zxdg_exporter_v1_destroy ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_exporter_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_exporter_v1 as _ ) ; } # [ doc = "export a surface\n\nThe export request exports the passed surface so that it can later be\nimported via xdg_importer. When called, a new xdg_exported object will\nbe created and xdg_exported.handle will be sent immediately. See the\ncorresponding interface and event for details.\n\nA surface may be exported multiple times, and each exported handle may\nbe used to create an xdg_imported multiple times. Only xdg_surface\nsurfaces may be exported." ] pub unsafe fn zxdg_exporter_v1_export ( zxdg_exporter_v1 : * mut super :: zxdg_exporter_v1 :: zxdg_exporter_v1 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_exporter_v1 as _ , 1u32 , & super :: zxdg_exported_v1 :: zxdg_exported_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "interface for importing surfaces\n\nA global interface used for importing surfaces exported by xdg_exporter.\nWith this interface, a client can create a reference to a surface of\nanother client." ] pub mod zxdg_importer_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_importer_v1 { } static mut zxdg_importer_v1_requests_import_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_imported_v1 :: zxdg_imported_v1_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_importer_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"import\0" as * const u8 as * const c_char , signature : b"ns\0" as * const u8 as * const c_char , types : unsafe { & zxdg_importer_v1_requests_import_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_importer_v1_interface : wl_interface = wl_interface { name : b"zxdg_importer_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_importer_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_importer_v1_listener { } pub unsafe fn zxdg_importer_v1_set_user_data ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_importer_v1 as _ , user_data ) ; } pub unsafe fn zxdg_importer_v1_get_user_data ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_importer_v1 as _ ) ; } pub unsafe fn zxdg_importer_v1_get_version ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_importer_v1 as _ ) ; } pub unsafe fn zxdg_importer_v1_add_listener ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_importer_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_importer_v1_add_rust_listener ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 , listener : & dyn zxdg_importer_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_importer_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_importer_v1_add_listener ( zxdg_importer_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_importer object\n\nNotify the compositor that the xdg_importer object will no longer be\nused." ] pub unsafe fn zxdg_importer_v1_destroy ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_importer_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_importer_v1 as _ ) ; } # [ doc = "import a surface\n\nThe import request imports a surface from any client given a handle\nretrieved by exporting said surface using xdg_exporter.export. When\ncalled, a new xdg_imported object will be created. This new object\nrepresents the imported surface, and the importing client can\nmanipulate its relationship using it. See xdg_imported for details." ] pub unsafe fn zxdg_importer_v1_import ( zxdg_importer_v1 : * mut super :: zxdg_importer_v1 :: zxdg_importer_v1 , handle : * const c_char ) -> * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_importer_v1 as _ , 1u32 , & super :: zxdg_imported_v1 :: zxdg_imported_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , handle ) ; return r as _ ; } } # [ doc = "an exported surface handle\n\nAn xdg_exported object represents an exported reference to a surface. The\nexported surface may be referenced as long as the xdg_exported object not\ndestroyed. Destroying the xdg_exported invalidates any relationship the\nimporter may have established using xdg_imported." ] pub mod zxdg_exported_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_exported_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_exported_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_exported_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"handle\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_exported_v1_interface : wl_interface = wl_interface { name : b"zxdg_exported_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zxdg_exported_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_exported_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_exported_v1_listener { # [ doc = "the exported surface handle\n\nThe handle event contains the unique handle of this exported surface\nreference. It may be shared with any client, which then can use it to\nimport the surface by calling xdg_importer.import. A handle may be\nused to import the surface multiple times." ] fn handle ( & mut self , object : * mut zxdg_exported_v1 , handle : * mut c_char ) { } } pub unsafe fn zxdg_exported_v1_set_user_data ( zxdg_exported_v1 : * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_exported_v1 as _ , user_data ) ; } pub unsafe fn zxdg_exported_v1_get_user_data ( zxdg_exported_v1 : * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_exported_v1 as _ ) ; } pub unsafe fn zxdg_exported_v1_get_version ( zxdg_exported_v1 : * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_exported_v1 as _ ) ; } pub unsafe fn zxdg_exported_v1_add_listener ( zxdg_exported_v1 : * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_exported_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_exported_v1_add_rust_listener ( zxdg_exported_v1 : * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 , listener : & dyn zxdg_exported_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_exported_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_exported_v1_add_listener ( zxdg_exported_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "unexport the exported surface\n\nRevoke the previously exported surface. This invalidates any\nrelationship the importer may have set up using the xdg_imported created\ngiven the handle sent via xdg_exported.handle." ] pub unsafe fn zxdg_exported_v1_destroy ( zxdg_exported_v1 : * mut super :: zxdg_exported_v1 :: zxdg_exported_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_exported_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_exported_v1 as _ ) ; } } # [ doc = "an imported surface handle\n\nAn xdg_imported object represents an imported reference to surface exported\nby some client. A client can use this interface to manipulate\nrelationships between its own surfaces and the imported surface." ] pub mod zxdg_imported_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_imported_v1 { } static mut zxdg_imported_v1_requests_set_parent_of_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_imported_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent_of\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zxdg_imported_v1_requests_set_parent_of_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_imported_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"destroyed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_imported_v1_interface : wl_interface = wl_interface { name : b"zxdg_imported_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_imported_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_imported_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_imported_v1_listener { # [ doc = "the imported surface handle has been destroyed\n\nThe imported surface handle has been destroyed and any relationship set\nup has been invalidated. This may happen for various reasons, for\nexample if the exported surface or the exported surface handle has been\ndestroyed, if the handle used for importing was invalid." ] fn destroyed ( & mut self , object : * mut zxdg_imported_v1 , ) { } } pub unsafe fn zxdg_imported_v1_set_user_data ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_imported_v1 as _ , user_data ) ; } pub unsafe fn zxdg_imported_v1_get_user_data ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_imported_v1 as _ ) ; } pub unsafe fn zxdg_imported_v1_get_version ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_imported_v1 as _ ) ; } pub unsafe fn zxdg_imported_v1_add_listener ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_imported_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_imported_v1_add_rust_listener ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 , listener : & dyn zxdg_imported_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_imported_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_imported_v1_add_listener ( zxdg_imported_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_imported object\n\nNotify the compositor that it will no longer use the xdg_imported\nobject. Any relationship that may have been set up will at this point\nbe invalidated." ] pub unsafe fn zxdg_imported_v1_destroy ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_imported_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_imported_v1 as _ ) ; } # [ doc = "set as the parent of some surface\n\nSet the imported surface as the parent of some surface of the client.\nThe passed surface must be a toplevel xdg_surface. Calling this function\nsets up a surface to surface relation with the same stacking and positioning\nsemantics as xdg_surface.set_parent." ] pub unsafe fn zxdg_imported_v1_set_parent_of ( zxdg_imported_v1 : * mut super :: zxdg_imported_v1 :: zxdg_imported_v1 , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_imported_v1 as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod fullscreen_shell_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "displays a single surface per output\n\nDisplays a single surface per output.\n\nThis interface provides a mechanism for a single client to display\nsimple full-screen surfaces. While there technically may be multiple\nclients bound to this interface, only one of those clients should be\nshown at a time.\n\nTo present a surface, the client uses either the present_surface or\npresent_surface_for_mode requests. Presenting a surface takes effect\non the next wl_surface.commit. See the individual requests for\ndetails about scaling and mode switches.\n\nThe client can have at most one surface per output at any time.\nRequesting a surface to be presented on an output that already has a\nsurface replaces the previously presented surface. Presenting a null\nsurface removes its content and effectively disables the output.\nExactly what happens when an output is \"disabled\" is\ncompositor-specific. The same surface may be presented on multiple\noutputs simultaneously.\n\nOnce a surface is presented on an output, it stays on that output\nuntil either the client removes it or the compositor destroys the\noutput. This way, the client can update the output's contents by\nsimply attaching a new buffer.\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_fullscreen_shell_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_fullscreen_shell_v1 { } # [ doc = "capabilities advertised by the compositor\n\nVarious capabilities that can be advertised by the compositor. They\nare advertised one-at-a-time when the wl_fullscreen_shell interface is\nbound. See the wl_fullscreen_shell.capability event for more details.\n\nARBITRARY_MODES:\nThis is a hint to the client that indicates that the compositor is\ncapable of setting practically any mode on its outputs. If this\ncapability is provided, wl_fullscreen_shell.present_surface_for_mode\nwill almost never fail and clients should feel free to set whatever\nmode they like. If the compositor does not advertise this, it may\nstill support some modes that are not advertised through wl_global.mode\nbut it is less likely.\n\nCURSOR_PLANE:\nThis is a hint to the client that indicates that the compositor can\nhandle a cursor surface from the client without actually compositing.\nThis may be because of a hardware cursor plane or some other mechanism.\nIf the compositor does not advertise this capability then setting\nwl_pointer.cursor may degrade performance or be ignored entirely. If\nCURSOR_PLANE is not advertised, it is recommended that the client draw\nits own cursor and set wl_pointer.cursor(NULL)." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum capability { # [ doc = "compositor is capable of almost any output mode" ] arbitrary_modes = 1 , # [ doc = "compositor has a separate cursor plane" ] cursor_plane = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { match n { 1 => Some ( capability :: arbitrary_modes ) , 2 => Some ( capability :: cursor_plane ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "different method to set the surface fullscreen\n\nHints to indicate to the compositor how to deal with a conflict\nbetween the dimensions of the surface and the dimensions of the\noutput. The compositor is free to ignore this parameter." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum present_method { # [ doc = "no preference, apply default policy" ] default = 0 , # [ doc = "center the surface on the output" ] center = 1 , # [ doc = "scale the surface, preserving aspect ratio, to the largest size that will fit on the output" ] zoom = 2 , # [ doc = "scale the surface, preserving aspect ratio, to fully fill the output cropping if needed" ] zoom_crop = 3 , # [ doc = "scale the surface to the size of the output ignoring aspect ratio" ] stretch = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl present_method { pub fn from_raw ( n : u32 ) -> Option < present_method > { match n { 0 => Some ( present_method :: default ) , 1 => Some ( present_method :: center ) , 2 => Some ( present_method :: zoom ) , 3 => Some ( present_method :: zoom_crop ) , 4 => Some ( present_method :: stretch ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "wl_fullscreen_shell error values\n\nThese errors can be emitted in response to wl_fullscreen_shell requests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "present_method is not known" ] invalid_method = 0 , # [ doc = "given wl_surface has another role" ] role = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_method ) , 1 => Some ( error :: role ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_fullscreen_shell_v1_requests_present_surface_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; static mut zwp_fullscreen_shell_v1_requests_present_surface_for_mode_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , NULLPTR as * const wl_interface , unsafe { & super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_fullscreen_shell_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"present_surface\0" as * const u8 as * const c_char , signature : b"?ou?o\0" as * const u8 as * const c_char , types : unsafe { & zwp_fullscreen_shell_v1_requests_present_surface_types as * const _ } , } , wl_message { name : b"present_surface_for_mode\0" as * const u8 as * const c_char , signature : b"ooin\0" as * const u8 as * const c_char , types : unsafe { & zwp_fullscreen_shell_v1_requests_present_surface_for_mode_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_fullscreen_shell_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"capability\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_fullscreen_shell_v1_interface : wl_interface = wl_interface { name : b"zwp_fullscreen_shell_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & zwp_fullscreen_shell_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zwp_fullscreen_shell_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_fullscreen_shell_v1_listener { # [ doc = "advertises a capability of the compositor\n\nAdvertises a single capability of the compositor.\n\nWhen the wl_fullscreen_shell interface is bound, this event is emitted\nonce for each capability advertised. Valid capabilities are given by\nthe wl_fullscreen_shell.capability enum. If clients want to take\nadvantage of any of these capabilities, they should use a\nwl_display.sync request immediately after binding to ensure that they\nreceive all the capability events." ] fn capability ( & mut self , object : * mut zwp_fullscreen_shell_v1 , capability : capability ) { } } pub unsafe fn zwp_fullscreen_shell_v1_set_user_data ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_fullscreen_shell_v1 as _ , user_data ) ; } pub unsafe fn zwp_fullscreen_shell_v1_get_user_data ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_fullscreen_shell_v1 as _ ) ; } pub unsafe fn zwp_fullscreen_shell_v1_get_version ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_fullscreen_shell_v1 as _ ) ; } pub unsafe fn zwp_fullscreen_shell_v1_add_listener ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_fullscreen_shell_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_fullscreen_shell_v1_add_rust_listener ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 , listener : & dyn zwp_fullscreen_shell_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_fullscreen_shell_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_fullscreen_shell_v1_add_listener ( zwp_fullscreen_shell_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_fullscreen_shell_v1_destroy ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_fullscreen_shell_v1 as _ ) ; } # [ doc = "release the wl_fullscreen_shell interface\n\nRelease the binding from the wl_fullscreen_shell interface.\n\nThis destroys the server-side object and frees this binding. If\nthe client binds to wl_fullscreen_shell multiple times, it may wish\nto free some of those bindings." ] pub unsafe fn zwp_fullscreen_shell_v1_release ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_fullscreen_shell_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_fullscreen_shell_v1 as _ ) ; } # [ doc = "present surface for display\n\nPresent a surface on the given output.\n\nIf the output is null, the compositor will present the surface on\nwhatever display (or displays) it thinks best. In particular, this\nmay replace any or all surfaces currently presented so it should\nnot be used in combination with placing surfaces on specific\noutputs.\n\nThe method parameter is a hint to the compositor for how the surface\nis to be presented. In particular, it tells the compositor how to\nhandle a size mismatch between the presented surface and the\noutput. The compositor is free to ignore this parameter.\n\nThe \"zoom\", \"zoom_crop\", and \"stretch\" methods imply a scaling\noperation on the surface. This will override any kind of output\nscaling, so the buffer_scale property of the surface is effectively\nignored.\n\nThis request gives the surface the role of a fullscreen shell surface.\nIf the surface already has another role, it raises a role protocol\nerror." ] pub unsafe fn zwp_fullscreen_shell_v1_present_surface ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 , surface : * mut super :: wl_surface :: wl_surface , method : u32 , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_fullscreen_shell_v1 as _ , 1u32 , surface , method , output , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "present surface for display at a particular mode\n\nPresents a surface on the given output for a particular mode.\n\nIf the current size of the output differs from that of the surface,\nthe compositor will attempt to change the size of the output to\nmatch the surface. The result of the mode-switch operation will be\nreturned via the provided wl_fullscreen_shell_mode_feedback object.\n\nIf the current output mode matches the one requested or if the\ncompositor successfully switches the mode to match the surface,\nthen the mode_successful event will be sent and the output will\ncontain the contents of the given surface. If the compositor\ncannot match the output size to the surface size, the mode_failed\nwill be sent and the output will contain the contents of the\npreviously presented surface (if any). If another surface is\npresented on the given output before either of these has a chance\nto happen, the present_cancelled event will be sent.\n\nDue to race conditions and other issues unknown to the client, no\nmode-switch operation is guaranteed to succeed. However, if the\nmode is one advertised by wl_output.mode or if the compositor\nadvertises the ARBITRARY_MODES capability, then the client should\nexpect that the mode-switch operation will usually succeed.\n\nIf the size of the presented surface changes, the resulting output\nis undefined. The compositor may attempt to change the output mode\nto compensate. However, there is no guarantee that a suitable mode\nwill be found and the client has no way to be notified of success\nor failure.\n\nThe framerate parameter specifies the desired framerate for the\noutput in mHz. The compositor is free to ignore this parameter. A\nvalue of 0 indicates that the client has no preference.\n\nIf the value of wl_output.scale differs from wl_surface.buffer_scale,\nthen the compositor may choose a mode that matches either the buffer\nsize or the surface size. In either case, the surface will fill the\noutput.\n\nThis request gives the surface the role of a fullscreen shell surface.\nIf the surface already has another role, it raises a role protocol\nerror." ] pub unsafe fn zwp_fullscreen_shell_v1_present_surface_for_mode ( zwp_fullscreen_shell_v1 : * mut super :: zwp_fullscreen_shell_v1 :: zwp_fullscreen_shell_v1 , surface : * mut super :: wl_surface :: wl_surface , output : * mut super :: wl_output :: wl_output , framerate : i32 ) -> * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_fullscreen_shell_v1 as _ , 2u32 , & super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1_interface as * const _ , surface , output , framerate , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } pub mod zwp_fullscreen_shell_mode_feedback_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_fullscreen_shell_mode_feedback_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_fullscreen_shell_mode_feedback_v1_events : [ wl_message ; 3 ] = [ wl_message { name : b"mode_successful\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"mode_failed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"present_cancelled\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_fullscreen_shell_mode_feedback_v1_interface : wl_interface = wl_interface { name : b"zwp_fullscreen_shell_mode_feedback_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 3 , events : unsafe { & zwp_fullscreen_shell_mode_feedback_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_fullscreen_shell_mode_feedback_v1_listener { # [ doc = "mode switch succeeded\n\nThis event indicates that the attempted mode switch operation was\nsuccessful. A surface of the size requested in the mode switch\nwill fill the output without scaling.\n\nUpon receiving this event, the client should destroy the\nwl_fullscreen_shell_mode_feedback object." ] fn mode_successful ( & mut self , object : * mut zwp_fullscreen_shell_mode_feedback_v1 , ) { } # [ doc = "mode switch failed\n\nThis event indicates that the attempted mode switch operation\nfailed. This may be because the requested output mode is not\npossible or it may mean that the compositor does not want to allow it.\n\nUpon receiving this event, the client should destroy the\nwl_fullscreen_shell_mode_feedback object." ] fn mode_failed ( & mut self , object : * mut zwp_fullscreen_shell_mode_feedback_v1 , ) { } # [ doc = "mode switch cancelled\n\nThis event indicates that the attempted mode switch operation was\ncancelled. Most likely this is because the client requested a\nsecond mode switch before the first one completed.\n\nUpon receiving this event, the client should destroy the\nwl_fullscreen_shell_mode_feedback object." ] fn present_cancelled ( & mut self , object : * mut zwp_fullscreen_shell_mode_feedback_v1 , ) { } } pub unsafe fn zwp_fullscreen_shell_mode_feedback_v1_set_user_data ( zwp_fullscreen_shell_mode_feedback_v1 : * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_fullscreen_shell_mode_feedback_v1 as _ , user_data ) ; } pub unsafe fn zwp_fullscreen_shell_mode_feedback_v1_get_user_data ( zwp_fullscreen_shell_mode_feedback_v1 : * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_fullscreen_shell_mode_feedback_v1 as _ ) ; } pub unsafe fn zwp_fullscreen_shell_mode_feedback_v1_get_version ( zwp_fullscreen_shell_mode_feedback_v1 : * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_fullscreen_shell_mode_feedback_v1 as _ ) ; } pub unsafe fn zwp_fullscreen_shell_mode_feedback_v1_add_listener ( zwp_fullscreen_shell_mode_feedback_v1 : * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_fullscreen_shell_mode_feedback_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_fullscreen_shell_mode_feedback_v1_add_rust_listener ( zwp_fullscreen_shell_mode_feedback_v1 : * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 , listener : & dyn zwp_fullscreen_shell_mode_feedback_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_fullscreen_shell_mode_feedback_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_fullscreen_shell_mode_feedback_v1_add_listener ( zwp_fullscreen_shell_mode_feedback_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_fullscreen_shell_mode_feedback_v1_destroy ( zwp_fullscreen_shell_mode_feedback_v1 : * mut super :: zwp_fullscreen_shell_mode_feedback_v1 :: zwp_fullscreen_shell_mode_feedback_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_fullscreen_shell_mode_feedback_v1 as _ ) ; } } } pub mod pointer_gestures_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "touchpad gestures\n\nA global interface to provide semantic touchpad gestures for a given\npointer.\n\nThree gestures are currently supported: swipe, pinch, and hold.\nPinch and swipe gestures follow a three-stage cycle: begin, update,\nend, hold gestures follow a two-stage cycle: begin and end. All\ngestures are identified by a unique id.\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_pointer_gestures_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_pointer_gestures_v1 { } static mut zwp_pointer_gestures_v1_requests_get_swipe_gesture_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , ] ; static mut zwp_pointer_gestures_v1_requests_get_pinch_gesture_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , ] ; static mut zwp_pointer_gestures_v1_requests_get_hold_gesture_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gestures_v1_requests : [ wl_message ; 4 ] = [ wl_message { name : b"get_swipe_gesture\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_gestures_v1_requests_get_swipe_gesture_types as * const _ } , } , wl_message { name : b"get_pinch_gesture\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_gestures_v1_requests_get_pinch_gesture_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_hold_gesture\0" as * const u8 as * const c_char , signature : b"3no\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_gestures_v1_requests_get_hold_gesture_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_pointer_gestures_v1_interface : wl_interface = wl_interface { name : b"zwp_pointer_gestures_v1\0" as * const u8 as * const c_char , version : 3 , request_count : 4 , requests : unsafe { & zwp_pointer_gestures_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_pointer_gestures_v1_listener { } pub unsafe fn zwp_pointer_gestures_v1_set_user_data ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_pointer_gestures_v1 as _ , user_data ) ; } pub unsafe fn zwp_pointer_gestures_v1_get_user_data ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_pointer_gestures_v1 as _ ) ; } pub unsafe fn zwp_pointer_gestures_v1_get_version ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_pointer_gestures_v1 as _ ) ; } pub unsafe fn zwp_pointer_gestures_v1_add_listener ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_pointer_gestures_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_pointer_gestures_v1_add_rust_listener ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 , listener : & dyn zwp_pointer_gestures_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_pointer_gestures_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_pointer_gestures_v1_add_listener ( zwp_pointer_gestures_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_pointer_gestures_v1_destroy ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_pointer_gestures_v1 as _ ) ; } # [ doc = "get swipe gesture\n\nCreate a swipe gesture object. See the\nwl_pointer_gesture_swipe interface for details." ] pub unsafe fn zwp_pointer_gestures_v1_get_swipe_gesture ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 , pointer : * mut super :: wl_pointer :: wl_pointer ) -> * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_pointer_gestures_v1 as _ , 0u32 , & super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , pointer ) ; return r as _ ; } # [ doc = "get pinch gesture\n\nCreate a pinch gesture object. See the\nwl_pointer_gesture_pinch interface for details." ] pub unsafe fn zwp_pointer_gestures_v1_get_pinch_gesture ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 , pointer : * mut super :: wl_pointer :: wl_pointer ) -> * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_pointer_gestures_v1 as _ , 1u32 , & super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , pointer ) ; return r as _ ; } # [ doc = "destroy the pointer gesture object\n\nDestroy the pointer gesture object. Swipe, pinch and hold objects\ncreated via this gesture object remain valid." ] pub unsafe fn zwp_pointer_gestures_v1_release ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_pointer_gestures_v1 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_pointer_gestures_v1 as _ ) ; } # [ doc = "get hold gesture\n\nCreate a hold gesture object. See the\nwl_pointer_gesture_hold interface for details." ] pub unsafe fn zwp_pointer_gestures_v1_get_hold_gesture ( zwp_pointer_gestures_v1 : * mut super :: zwp_pointer_gestures_v1 :: zwp_pointer_gestures_v1 , pointer : * mut super :: wl_pointer :: wl_pointer ) -> * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_pointer_gestures_v1 as _ , 3u32 , & super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , pointer ) ; return r as _ ; } } # [ doc = "a swipe gesture object\n\nA swipe gesture object notifies a client about a multi-finger swipe\ngesture detected on an indirect input device such as a touchpad.\nThe gesture is usually initiated by multiple fingers moving in the\nsame direction but once initiated the direction may change.\nThe precise conditions of when such a gesture is detected are\nimplementation-dependent.\n\nA gesture consists of three stages: begin, update (optional) and end.\nThere cannot be multiple simultaneous hold, pinch or swipe gestures on a\nsame pointer/seat, how compositors prevent these situations is\nimplementation-dependent.\n\nA gesture may be cancelled by the compositor or the hardware.\nClients should not consider performing permanent or irreversible\nactions until the end of a gesture has been received." ] pub mod zwp_pointer_gesture_swipe_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_pointer_gesture_swipe_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gesture_swipe_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_pointer_gesture_swipe_v1_events_begin_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gesture_swipe_v1_events : [ wl_message ; 3 ] = [ wl_message { name : b"begin\0" as * const u8 as * const c_char , signature : b"uuou\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_gesture_swipe_v1_events_begin_types as * const _ } , } , wl_message { name : b"update\0" as * const u8 as * const c_char , signature : b"uff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"end\0" as * const u8 as * const c_char , signature : b"uui\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_pointer_gesture_swipe_v1_interface : wl_interface = wl_interface { name : b"zwp_pointer_gesture_swipe_v1\0" as * const u8 as * const c_char , version : 2 , request_count : 1 , requests : unsafe { & zwp_pointer_gesture_swipe_v1_requests as * const _ } , event_count : 3 , events : unsafe { & zwp_pointer_gesture_swipe_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_pointer_gesture_swipe_v1_listener { # [ doc = "multi-finger swipe begin\n\nThis event is sent when a multi-finger swipe gesture is detected\non the device." ] fn begin ( & mut self , object : * mut zwp_pointer_gesture_swipe_v1 , serial : u32 , time : u32 , surface : * mut super :: wl_surface :: wl_surface , fingers : u32 ) { } # [ doc = "multi-finger swipe motion\n\nThis event is sent when a multi-finger swipe gesture changes the\nposition of the logical center.\n\nThe dx and dy coordinates are relative coordinates of the logical\ncenter of the gesture compared to the previous event." ] fn update ( & mut self , object : * mut zwp_pointer_gesture_swipe_v1 , time : u32 , dx : wl_fixed_t , dy : wl_fixed_t ) { } # [ doc = "multi-finger swipe end\n\nThis event is sent when a multi-finger swipe gesture ceases to\nbe valid. This may happen when one or more fingers are lifted or\nthe gesture is cancelled.\n\nWhen a gesture is cancelled, the client should undo state changes\ncaused by this gesture. What causes a gesture to be cancelled is\nimplementation-dependent." ] fn end ( & mut self , object : * mut zwp_pointer_gesture_swipe_v1 , serial : u32 , time : u32 , cancelled : i32 ) { } } pub unsafe fn zwp_pointer_gesture_swipe_v1_set_user_data ( zwp_pointer_gesture_swipe_v1 : * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_pointer_gesture_swipe_v1 as _ , user_data ) ; } pub unsafe fn zwp_pointer_gesture_swipe_v1_get_user_data ( zwp_pointer_gesture_swipe_v1 : * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_pointer_gesture_swipe_v1 as _ ) ; } pub unsafe fn zwp_pointer_gesture_swipe_v1_get_version ( zwp_pointer_gesture_swipe_v1 : * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_pointer_gesture_swipe_v1 as _ ) ; } pub unsafe fn zwp_pointer_gesture_swipe_v1_add_listener ( zwp_pointer_gesture_swipe_v1 : * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_pointer_gesture_swipe_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_pointer_gesture_swipe_v1_add_rust_listener ( zwp_pointer_gesture_swipe_v1 : * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 , listener : & dyn zwp_pointer_gesture_swipe_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_pointer_gesture_swipe_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_pointer_gesture_swipe_v1_add_listener ( zwp_pointer_gesture_swipe_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the pointer swipe gesture object" ] pub unsafe fn zwp_pointer_gesture_swipe_v1_destroy ( zwp_pointer_gesture_swipe_v1 : * mut super :: zwp_pointer_gesture_swipe_v1 :: zwp_pointer_gesture_swipe_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_pointer_gesture_swipe_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_pointer_gesture_swipe_v1 as _ ) ; } } # [ doc = "a pinch gesture object\n\nA pinch gesture object notifies a client about a multi-finger pinch\ngesture detected on an indirect input device such as a touchpad.\nThe gesture is usually initiated by multiple fingers moving towards\neach other or away from each other, or by two or more fingers rotating\naround a logical center of gravity. The precise conditions of when\nsuch a gesture is detected are implementation-dependent.\n\nA gesture consists of three stages: begin, update (optional) and end.\nThere cannot be multiple simultaneous hold, pinch or swipe gestures on a\nsame pointer/seat, how compositors prevent these situations is\nimplementation-dependent.\n\nA gesture may be cancelled by the compositor or the hardware.\nClients should not consider performing permanent or irreversible\nactions until the end of a gesture has been received." ] pub mod zwp_pointer_gesture_pinch_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_pointer_gesture_pinch_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gesture_pinch_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_pointer_gesture_pinch_v1_events_begin_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gesture_pinch_v1_events : [ wl_message ; 3 ] = [ wl_message { name : b"begin\0" as * const u8 as * const c_char , signature : b"uuou\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_gesture_pinch_v1_events_begin_types as * const _ } , } , wl_message { name : b"update\0" as * const u8 as * const c_char , signature : b"uffff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"end\0" as * const u8 as * const c_char , signature : b"uui\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_pointer_gesture_pinch_v1_interface : wl_interface = wl_interface { name : b"zwp_pointer_gesture_pinch_v1\0" as * const u8 as * const c_char , version : 2 , request_count : 1 , requests : unsafe { & zwp_pointer_gesture_pinch_v1_requests as * const _ } , event_count : 3 , events : unsafe { & zwp_pointer_gesture_pinch_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_pointer_gesture_pinch_v1_listener { # [ doc = "multi-finger pinch begin\n\nThis event is sent when a multi-finger pinch gesture is detected\non the device." ] fn begin ( & mut self , object : * mut zwp_pointer_gesture_pinch_v1 , serial : u32 , time : u32 , surface : * mut super :: wl_surface :: wl_surface , fingers : u32 ) { } # [ doc = "multi-finger pinch motion\n\nThis event is sent when a multi-finger pinch gesture changes the\nposition of the logical center, the rotation or the relative scale.\n\nThe dx and dy coordinates are relative coordinates in the\nsurface coordinate space of the logical center of the gesture.\n\nThe scale factor is an absolute scale compared to the\npointer_gesture_pinch.begin event, e.g. a scale of 2 means the fingers\nare now twice as far apart as on pointer_gesture_pinch.begin.\n\nThe rotation is the relative angle in degrees clockwise compared to the previous\npointer_gesture_pinch.begin or pointer_gesture_pinch.update event." ] fn update ( & mut self , object : * mut zwp_pointer_gesture_pinch_v1 , time : u32 , dx : wl_fixed_t , dy : wl_fixed_t , scale : wl_fixed_t , rotation : wl_fixed_t ) { } # [ doc = "multi-finger pinch end\n\nThis event is sent when a multi-finger pinch gesture ceases to\nbe valid. This may happen when one or more fingers are lifted or\nthe gesture is cancelled.\n\nWhen a gesture is cancelled, the client should undo state changes\ncaused by this gesture. What causes a gesture to be cancelled is\nimplementation-dependent." ] fn end ( & mut self , object : * mut zwp_pointer_gesture_pinch_v1 , serial : u32 , time : u32 , cancelled : i32 ) { } } pub unsafe fn zwp_pointer_gesture_pinch_v1_set_user_data ( zwp_pointer_gesture_pinch_v1 : * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_pointer_gesture_pinch_v1 as _ , user_data ) ; } pub unsafe fn zwp_pointer_gesture_pinch_v1_get_user_data ( zwp_pointer_gesture_pinch_v1 : * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_pointer_gesture_pinch_v1 as _ ) ; } pub unsafe fn zwp_pointer_gesture_pinch_v1_get_version ( zwp_pointer_gesture_pinch_v1 : * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_pointer_gesture_pinch_v1 as _ ) ; } pub unsafe fn zwp_pointer_gesture_pinch_v1_add_listener ( zwp_pointer_gesture_pinch_v1 : * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_pointer_gesture_pinch_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_pointer_gesture_pinch_v1_add_rust_listener ( zwp_pointer_gesture_pinch_v1 : * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 , listener : & dyn zwp_pointer_gesture_pinch_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_pointer_gesture_pinch_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_pointer_gesture_pinch_v1_add_listener ( zwp_pointer_gesture_pinch_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the pinch gesture object" ] pub unsafe fn zwp_pointer_gesture_pinch_v1_destroy ( zwp_pointer_gesture_pinch_v1 : * mut super :: zwp_pointer_gesture_pinch_v1 :: zwp_pointer_gesture_pinch_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_pointer_gesture_pinch_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_pointer_gesture_pinch_v1 as _ ) ; } } # [ doc = "a hold gesture object\n\nA hold gesture object notifies a client about a single- or\nmulti-finger hold gesture detected on an indirect input device such as\na touchpad. The gesture is usually initiated by one or more fingers\nbeing held down without significant movement. The precise conditions\nof when such a gesture is detected are implementation-dependent.\n\nIn particular, this gesture may be used to cancel kinetic scrolling.\n\nA hold gesture consists of two stages: begin and end. Unlike pinch and\nswipe there is no update stage.\nThere cannot be multiple simultaneous hold, pinch or swipe gestures on a\nsame pointer/seat, how compositors prevent these situations is\nimplementation-dependent.\n\nA gesture may be cancelled by the compositor or the hardware.\nClients should not consider performing permanent or irreversible\nactions until the end of a gesture has been received." ] pub mod zwp_pointer_gesture_hold_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_pointer_gesture_hold_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gesture_hold_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_pointer_gesture_hold_v1_events_begin_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_gesture_hold_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"begin\0" as * const u8 as * const c_char , signature : b"3uuou\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_gesture_hold_v1_events_begin_types as * const _ } , } , wl_message { name : b"end\0" as * const u8 as * const c_char , signature : b"3uui\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_pointer_gesture_hold_v1_interface : wl_interface = wl_interface { name : b"zwp_pointer_gesture_hold_v1\0" as * const u8 as * const c_char , version : 3 , request_count : 1 , requests : unsafe { & zwp_pointer_gesture_hold_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_pointer_gesture_hold_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_pointer_gesture_hold_v1_listener { # [ doc = "multi-finger hold begin\n\nThis event is sent when a hold gesture is detected on the device.\n\nOnly available since version 3 of the interface." ] fn begin ( & mut self , object : * mut zwp_pointer_gesture_hold_v1 , serial : u32 , time : u32 , surface : * mut super :: wl_surface :: wl_surface , fingers : u32 ) { } # [ doc = "multi-finger hold end\n\nThis event is sent when a hold gesture ceases to\nbe valid. This may happen when the holding fingers are lifted or\nthe gesture is cancelled, for example if the fingers move past an\nimplementation-defined threshold, the finger count changes or the hold\ngesture changes into a different type of gesture.\n\nWhen a gesture is cancelled, the client may need to undo state changes\ncaused by this gesture. What causes a gesture to be cancelled is\nimplementation-dependent.\n\nOnly available since version 3 of the interface." ] fn end ( & mut self , object : * mut zwp_pointer_gesture_hold_v1 , serial : u32 , time : u32 , cancelled : i32 ) { } } pub unsafe fn zwp_pointer_gesture_hold_v1_set_user_data ( zwp_pointer_gesture_hold_v1 : * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_pointer_gesture_hold_v1 as _ , user_data ) ; } pub unsafe fn zwp_pointer_gesture_hold_v1_get_user_data ( zwp_pointer_gesture_hold_v1 : * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_pointer_gesture_hold_v1 as _ ) ; } pub unsafe fn zwp_pointer_gesture_hold_v1_get_version ( zwp_pointer_gesture_hold_v1 : * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_pointer_gesture_hold_v1 as _ ) ; } pub unsafe fn zwp_pointer_gesture_hold_v1_add_listener ( zwp_pointer_gesture_hold_v1 : * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_pointer_gesture_hold_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_pointer_gesture_hold_v1_add_rust_listener ( zwp_pointer_gesture_hold_v1 : * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 , listener : & dyn zwp_pointer_gesture_hold_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_pointer_gesture_hold_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_pointer_gesture_hold_v1_add_listener ( zwp_pointer_gesture_hold_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the hold gesture object" ] pub unsafe fn zwp_pointer_gesture_hold_v1_destroy ( zwp_pointer_gesture_hold_v1 : * mut super :: zwp_pointer_gesture_hold_v1 :: zwp_pointer_gesture_hold_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_pointer_gesture_hold_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_pointer_gesture_hold_v1 as _ ) ; } } } pub mod surface_extension { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod qt_surface_extension { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum qt_surface_extension { } static mut qt_surface_extension_requests_get_extended_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: qt_extended_surface :: qt_extended_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut qt_surface_extension_requests : [ wl_message ; 1 ] = [ wl_message { name : b"get_extended_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & qt_surface_extension_requests_get_extended_surface_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut qt_surface_extension_interface : wl_interface = wl_interface { name : b"qt_surface_extension\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & qt_surface_extension_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait qt_surface_extension_listener { } pub unsafe fn qt_surface_extension_set_user_data ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , qt_surface_extension as _ , user_data ) ; } pub unsafe fn qt_surface_extension_get_user_data ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , qt_surface_extension as _ ) ; } pub unsafe fn qt_surface_extension_get_version ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , qt_surface_extension as _ ) ; } pub unsafe fn qt_surface_extension_add_listener ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , qt_surface_extension as _ , listener as _ , data as _ ) ; } pub unsafe fn qt_surface_extension_add_rust_listener ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension , listener : & dyn qt_surface_extension_listener ) -> bool { let to = ( listener as * const dyn qt_surface_extension_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return qt_surface_extension_add_listener ( qt_surface_extension as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn qt_surface_extension_destroy ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , qt_surface_extension as _ ) ; } pub unsafe fn qt_surface_extension_get_extended_surface ( qt_surface_extension : * mut super :: qt_surface_extension :: qt_surface_extension , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: qt_extended_surface :: qt_extended_surface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , qt_surface_extension as _ , 0u32 , & super :: qt_extended_surface :: qt_extended_surface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } pub mod qt_extended_surface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum qt_extended_surface { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum orientation { PrimaryOrientation = 0 , PortraitOrientation = 1 , LandscapeOrientation = 2 , InvertedPortraitOrientation = 4 , InvertedLandscapeOrientation = 8 , # [ doc ( hidden ) ] __nonexhaustive , } impl orientation { pub fn from_raw ( n : u32 ) -> Option < orientation > { match n { 0 => Some ( orientation :: PrimaryOrientation ) , 1 => Some ( orientation :: PortraitOrientation ) , 2 => Some ( orientation :: LandscapeOrientation ) , 4 => Some ( orientation :: InvertedPortraitOrientation ) , 8 => Some ( orientation :: InvertedLandscapeOrientation ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum windowflag { OverridesSystemGestures = 1 , StaysOnTop = 2 , BypassWindowManager = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl windowflag { pub fn from_raw ( n : u32 ) -> Option < windowflag > { match n { 1 => Some ( windowflag :: OverridesSystemGestures ) , 2 => Some ( windowflag :: StaysOnTop ) , 4 => Some ( windowflag :: BypassWindowManager ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut qt_extended_surface_requests : [ wl_message ; 5 ] = [ wl_message { name : b"update_generic_property\0" as * const u8 as * const c_char , signature : b"sa\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_content_orientation_mask\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_window_flags\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"raise\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"lower\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut qt_extended_surface_events : [ wl_message ; 3 ] = [ wl_message { name : b"onscreen_visibility\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_generic_property\0" as * const u8 as * const c_char , signature : b"sa\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"close\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut qt_extended_surface_interface : wl_interface = wl_interface { name : b"qt_extended_surface\0" as * const u8 as * const c_char , version : 1 , request_count : 5 , requests : unsafe { & qt_extended_surface_requests as * const _ } , event_count : 3 , events : unsafe { & qt_extended_surface_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait qt_extended_surface_listener { # [ doc = "" ] fn onscreen_visibility ( & mut self , object : * mut qt_extended_surface , visible : i32 ) { } # [ doc = "" ] fn set_generic_property ( & mut self , object : * mut qt_extended_surface , name : * mut c_char , value : * mut wl_array ) { } # [ doc = "" ] fn close ( & mut self , object : * mut qt_extended_surface , ) { } } pub unsafe fn qt_extended_surface_set_user_data ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , qt_extended_surface as _ , user_data ) ; } pub unsafe fn qt_extended_surface_get_user_data ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , qt_extended_surface as _ ) ; } pub unsafe fn qt_extended_surface_get_version ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , qt_extended_surface as _ ) ; } pub unsafe fn qt_extended_surface_add_listener ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , qt_extended_surface as _ , listener as _ , data as _ ) ; } pub unsafe fn qt_extended_surface_add_rust_listener ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface , listener : & dyn qt_extended_surface_listener ) -> bool { let to = ( listener as * const dyn qt_extended_surface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return qt_extended_surface_add_listener ( qt_extended_surface as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn qt_extended_surface_destroy ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , qt_extended_surface as _ ) ; } pub unsafe fn qt_extended_surface_update_generic_property ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface , name : * const c_char , value : * mut wl_array ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , qt_extended_surface as _ , 0u32 , name , value , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn qt_extended_surface_set_content_orientation_mask ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface , orientation : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , qt_extended_surface as _ , 1u32 , orientation , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn qt_extended_surface_set_window_flags ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface , flags : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , qt_extended_surface as _ , 2u32 , flags , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn qt_extended_surface_raise ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , qt_extended_surface as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn qt_extended_surface_lower ( qt_extended_surface : * mut super :: qt_extended_surface :: qt_extended_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , qt_extended_surface as _ , 4u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod blur { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod org_kde_kwin_blur_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_blur_manager { } static mut org_kde_kwin_blur_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_blur :: org_kde_kwin_blur_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut org_kde_kwin_blur_manager_requests_unset_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_blur_manager_requests : [ wl_message ; 2 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_blur_manager_requests_create_types as * const _ } , } , wl_message { name : b"unset\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_blur_manager_requests_unset_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_blur_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_blur_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_blur_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_blur_manager_listener { } pub unsafe fn org_kde_kwin_blur_manager_set_user_data ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_blur_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_blur_manager_get_user_data ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_blur_manager as _ ) ; } pub unsafe fn org_kde_kwin_blur_manager_get_version ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_blur_manager as _ ) ; } pub unsafe fn org_kde_kwin_blur_manager_add_listener ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_blur_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_blur_manager_add_rust_listener ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager , listener : & dyn org_kde_kwin_blur_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_blur_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_blur_manager_add_listener ( org_kde_kwin_blur_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_blur_manager_destroy ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_blur_manager as _ ) ; } pub unsafe fn org_kde_kwin_blur_manager_create ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_blur_manager as _ , 0u32 , & super :: org_kde_kwin_blur :: org_kde_kwin_blur_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } pub unsafe fn org_kde_kwin_blur_manager_unset ( org_kde_kwin_blur_manager : * mut super :: org_kde_kwin_blur_manager :: org_kde_kwin_blur_manager , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_blur_manager as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } } pub mod org_kde_kwin_blur { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_blur { } static mut org_kde_kwin_blur_requests_set_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_blur_requests : [ wl_message ; 3 ] = [ wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_region\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_blur_requests_set_region_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_blur_interface : wl_interface = wl_interface { name : b"org_kde_kwin_blur\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & org_kde_kwin_blur_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_blur_listener { } pub unsafe fn org_kde_kwin_blur_set_user_data ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_blur as _ , user_data ) ; } pub unsafe fn org_kde_kwin_blur_get_user_data ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_blur as _ ) ; } pub unsafe fn org_kde_kwin_blur_get_version ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_blur as _ ) ; } pub unsafe fn org_kde_kwin_blur_add_listener ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_blur as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_blur_add_rust_listener ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur , listener : & dyn org_kde_kwin_blur_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_blur_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_blur_add_listener ( org_kde_kwin_blur as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_blur_destroy ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_blur as _ ) ; } pub unsafe fn org_kde_kwin_blur_commit ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_blur as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_blur_set_region ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur , region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_blur as _ , 1u32 , region , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the blur object" ] pub unsafe fn org_kde_kwin_blur_release ( org_kde_kwin_blur : * mut super :: org_kde_kwin_blur :: org_kde_kwin_blur ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_blur as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_blur as _ ) ; } } } pub mod contrast { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod org_kde_kwin_contrast_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_contrast_manager { } static mut org_kde_kwin_contrast_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_contrast :: org_kde_kwin_contrast_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut org_kde_kwin_contrast_manager_requests_unset_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_contrast_manager_requests : [ wl_message ; 2 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_contrast_manager_requests_create_types as * const _ } , } , wl_message { name : b"unset\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_contrast_manager_requests_unset_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_contrast_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_contrast_manager\0" as * const u8 as * const c_char , version : 2 , request_count : 2 , requests : unsafe { & org_kde_kwin_contrast_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_contrast_manager_listener { } pub unsafe fn org_kde_kwin_contrast_manager_set_user_data ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_contrast_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_contrast_manager_get_user_data ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_contrast_manager as _ ) ; } pub unsafe fn org_kde_kwin_contrast_manager_get_version ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_contrast_manager as _ ) ; } pub unsafe fn org_kde_kwin_contrast_manager_add_listener ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_contrast_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_contrast_manager_add_rust_listener ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager , listener : & dyn org_kde_kwin_contrast_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_contrast_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_contrast_manager_add_listener ( org_kde_kwin_contrast_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_contrast_manager_destroy ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_contrast_manager as _ ) ; } pub unsafe fn org_kde_kwin_contrast_manager_create ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_contrast_manager as _ , 0u32 , & super :: org_kde_kwin_contrast :: org_kde_kwin_contrast_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } pub unsafe fn org_kde_kwin_contrast_manager_unset ( org_kde_kwin_contrast_manager : * mut super :: org_kde_kwin_contrast_manager :: org_kde_kwin_contrast_manager , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast_manager as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } } pub mod org_kde_kwin_contrast { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_contrast { } static mut org_kde_kwin_contrast_requests_set_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_contrast_requests : [ wl_message ; 8 ] = [ wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_region\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_contrast_requests_set_region_types as * const _ } , } , wl_message { name : b"set_contrast\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_intensity\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_saturation\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_frost\0" as * const u8 as * const c_char , signature : b"2iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unset_frost\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_contrast_interface : wl_interface = wl_interface { name : b"org_kde_kwin_contrast\0" as * const u8 as * const c_char , version : 2 , request_count : 8 , requests : unsafe { & org_kde_kwin_contrast_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_contrast_listener { } pub unsafe fn org_kde_kwin_contrast_set_user_data ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_contrast as _ , user_data ) ; } pub unsafe fn org_kde_kwin_contrast_get_user_data ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_contrast as _ ) ; } pub unsafe fn org_kde_kwin_contrast_get_version ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_contrast as _ ) ; } pub unsafe fn org_kde_kwin_contrast_add_listener ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_contrast as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_contrast_add_rust_listener ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , listener : & dyn org_kde_kwin_contrast_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_contrast_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_contrast_add_listener ( org_kde_kwin_contrast as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_contrast_destroy ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_contrast as _ ) ; } pub unsafe fn org_kde_kwin_contrast_commit ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_contrast_set_region ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 1u32 , region , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_contrast_set_contrast ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , contrast : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 2u32 , contrast , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_contrast_set_intensity ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , intensity : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 3u32 , intensity , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_contrast_set_saturation ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , saturation : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 4u32 , saturation , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the contrast object" ] pub unsafe fn org_kde_kwin_contrast_release ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 5u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_contrast as _ ) ; } # [ doc = "opt into frost effect w/ given colour\n\nenables 'frost' variant of contrast effect.\n\n'frost' is an enhanced version of the contrast effect that\nuses different colour arithmetic to get backgrounds simultaneously\nhigher in contrast and (apparent) transparency.\n\nr, g, b, a are channels from 0-255, indicating a colour to use in contrast calculation.\nshould be based off of the \"main\" background colour of the surface." ] pub unsafe fn org_kde_kwin_contrast_set_frost ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast , red : i32 , green : i32 , blue : i32 , alpha : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 6u32 , red , green , blue , alpha , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "opts out of frost effect" ] pub unsafe fn org_kde_kwin_contrast_unset_frost ( org_kde_kwin_contrast : * mut super :: org_kde_kwin_contrast :: org_kde_kwin_contrast ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_contrast as _ , 7u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod server_decoration_palette { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "server side decoration palette manager interface\n\nThis interface allows a client to alter the palette of a server side decoration." ] pub mod org_kde_kwin_server_decoration_palette_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_server_decoration_palette_manager { } static mut org_kde_kwin_server_decoration_palette_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_palette_manager_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_server_decoration_palette_manager_requests_create_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_palette_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_server_decoration_palette_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_kwin_server_decoration_palette_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_server_decoration_palette_manager_listener { } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_set_user_data ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_server_decoration_palette_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_get_user_data ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_server_decoration_palette_manager as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_get_version ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_server_decoration_palette_manager as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_add_listener ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_server_decoration_palette_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_add_rust_listener ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager , listener : & dyn org_kde_kwin_server_decoration_palette_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_server_decoration_palette_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_server_decoration_palette_manager_add_listener ( org_kde_kwin_server_decoration_palette_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_destroy ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_server_decoration_palette_manager as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_manager_create ( org_kde_kwin_server_decoration_palette_manager : * mut super :: org_kde_kwin_server_decoration_palette_manager :: org_kde_kwin_server_decoration_palette_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_server_decoration_palette_manager as _ , 0u32 , & super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "server side decoration palette interface\n\nThis interface allows a client to alter the palette of a server side decoration." ] pub mod org_kde_kwin_server_decoration_palette { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_server_decoration_palette { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_palette_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_palette\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_palette_interface : wl_interface = wl_interface { name : b"org_kde_kwin_server_decoration_palette\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_server_decoration_palette_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_server_decoration_palette_listener { } pub unsafe fn org_kde_kwin_server_decoration_palette_set_user_data ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_server_decoration_palette as _ , user_data ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_get_user_data ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_server_decoration_palette as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_get_version ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_server_decoration_palette as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_add_listener ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_server_decoration_palette as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_palette_add_rust_listener ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette , listener : & dyn org_kde_kwin_server_decoration_palette_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_server_decoration_palette_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_server_decoration_palette_add_listener ( org_kde_kwin_server_decoration_palette as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_server_decoration_palette_destroy ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_server_decoration_palette as _ ) ; } # [ doc = "Set a on the server side window decoration\n\nColor scheme that should be applied to the window decoration.\nAbsolute file path, or name of palette in the user's config directory.\nThe server may choose not to follow the requested style." ] pub unsafe fn org_kde_kwin_server_decoration_palette_set_palette ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette , palette : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_server_decoration_palette as _ , 0u32 , palette , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the palette object" ] pub unsafe fn org_kde_kwin_server_decoration_palette_release ( org_kde_kwin_server_decoration_palette : * mut super :: org_kde_kwin_server_decoration_palette :: org_kde_kwin_server_decoration_palette ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_server_decoration_palette as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_server_decoration_palette as _ ) ; } } } pub mod dpms { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Output dpms manager\n\nThe Dpms manager allows to get a org_kde_kwin_dpms for a given wl_output.\nThe org_kde_kwin_dpms provides the currently used VESA Display Power Management\nSignaling state (see https://en.wikipedia.org/wiki/VESA_Display_Power_Management_Signaling ).\nIn addition it allows to request a state change. A compositor is not obliged to honor it\nand will normally automatically switch back to on state." ] pub mod org_kde_kwin_dpms_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_dpms_manager { } static mut org_kde_kwin_dpms_manager_requests_get_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_dpms :: org_kde_kwin_dpms_interface as * const wl_interface } , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_dpms_manager_requests : [ wl_message ; 1 ] = [ wl_message { name : b"get\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_dpms_manager_requests_get_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_dpms_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_dpms_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_kwin_dpms_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_dpms_manager_listener { } pub unsafe fn org_kde_kwin_dpms_manager_set_user_data ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_dpms_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_dpms_manager_get_user_data ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_dpms_manager as _ ) ; } pub unsafe fn org_kde_kwin_dpms_manager_get_version ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_dpms_manager as _ ) ; } pub unsafe fn org_kde_kwin_dpms_manager_add_listener ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_dpms_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_dpms_manager_add_rust_listener ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager , listener : & dyn org_kde_kwin_dpms_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_dpms_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_dpms_manager_add_listener ( org_kde_kwin_dpms_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_dpms_manager_destroy ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_dpms_manager as _ ) ; } # [ doc = "Get org_kde_kwin_dpms for wl_output\n\nFactory request to get the org_kde_kwin_dpms for a given wl_output." ] pub unsafe fn org_kde_kwin_dpms_manager_get ( org_kde_kwin_dpms_manager : * mut super :: org_kde_kwin_dpms_manager :: org_kde_kwin_dpms_manager , output : * mut super :: wl_output :: wl_output ) -> * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_dpms_manager as _ , 0u32 , & super :: org_kde_kwin_dpms :: org_kde_kwin_dpms_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , output ) ; return r as _ ; } } # [ doc = "Dpms for a wl_output\n\nThis interface provides information about the VESA DPMS state for a wl_output.\nIt gets created through the request get on the org_kde_kwin_dpms_manager interface.\n\nOn creating the resource the server will push whether DPSM is supported for the output,\nthe currently used DPMS state and notifies the client through the done event once all\nstates are pushed. Whenever a state changes the set of changes is committed with the\ndone event." ] pub mod org_kde_kwin_dpms { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_dpms { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum mode { On = 0 , Standby = 1 , Suspend = 2 , Off = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl mode { pub fn from_raw ( n : u32 ) -> Option < mode > { match n { 0 => Some ( mode :: On ) , 1 => Some ( mode :: Standby ) , 2 => Some ( mode :: Suspend ) , 3 => Some ( mode :: Off ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_dpms_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_dpms_events : [ wl_message ; 3 ] = [ wl_message { name : b"supported\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_dpms_interface : wl_interface = wl_interface { name : b"org_kde_kwin_dpms\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_dpms_requests as * const _ } , event_count : 3 , events : unsafe { & org_kde_kwin_dpms_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_dpms_listener { # [ doc = "Event indicating whether DPMS is supported on the wl_output\n\nThis event gets pushed on binding the resource and indicates whether the wl_output\nsupports DPMS. There are operation modes of a Wayland server where DPMS might not\nmake sense (e.g. nested compositors)." ] fn supported ( & mut self , object : * mut org_kde_kwin_dpms , supported : u32 ) { } # [ doc = "Event indicating used DPMS mode\n\nThis mode gets pushed on binding the resource and provides the currently used\nDPMS mode. It also gets pushed if DPMS is not supported for the wl_output, in that\ncase the value will be On.\n\nThe event is also pushed whenever the state changes." ] fn mode ( & mut self , object : * mut org_kde_kwin_dpms , mode : u32 ) { } # [ doc = "All changes are pushed\n\nThis event gets pushed on binding the resource once all other states are pushed.\n\nIn addition it gets pushed whenever a state changes to tell the client that all\nstate changes have been pushed." ] fn done ( & mut self , object : * mut org_kde_kwin_dpms , ) { } } pub unsafe fn org_kde_kwin_dpms_set_user_data ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_dpms as _ , user_data ) ; } pub unsafe fn org_kde_kwin_dpms_get_user_data ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_dpms as _ ) ; } pub unsafe fn org_kde_kwin_dpms_get_version ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_dpms as _ ) ; } pub unsafe fn org_kde_kwin_dpms_add_listener ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_dpms as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_dpms_add_rust_listener ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms , listener : & dyn org_kde_kwin_dpms_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_dpms_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_dpms_add_listener ( org_kde_kwin_dpms as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_dpms_destroy ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_dpms as _ ) ; } # [ doc = "Request DPMS state change for the wl_output\n\nRequests that the compositor puts the wl_output into the passed mode. The compositor\nis not obliged to change the state. In addition the compositor might leave the mode\nwhenever it seems suitable. E.g. the compositor might return to On state on user input.\n\nThe client should not assume that the mode changed after requesting a new mode.\nInstead the client should listen for the mode event." ] pub unsafe fn org_kde_kwin_dpms_set ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms , mode : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_dpms as _ , 0u32 , mode , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the dpms object" ] pub unsafe fn org_kde_kwin_dpms_release ( org_kde_kwin_dpms : * mut super :: org_kde_kwin_dpms :: org_kde_kwin_dpms ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_dpms as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_dpms as _ ) ; } } } pub mod zwp_linux_explicit_synchronization_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "protocol for providing explicit synchronization\n\nThis global is a factory interface, allowing clients to request\nexplicit synchronization for buffers on a per-surface basis.\n\nSee zwp_linux_surface_synchronization_v1 for more information.\n\nThis interface is derived from Chromium's\nzcr_linux_explicit_synchronization_v1.\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_linux_explicit_synchronization_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_linux_explicit_synchronization_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "the surface already has a synchronization object associated" ] synchronization_exists = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: synchronization_exists ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_linux_explicit_synchronization_v1_requests_get_synchronization_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_explicit_synchronization_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_synchronization\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_linux_explicit_synchronization_v1_requests_get_synchronization_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_linux_explicit_synchronization_v1_interface : wl_interface = wl_interface { name : b"zwp_linux_explicit_synchronization_v1\0" as * const u8 as * const c_char , version : 2 , request_count : 2 , requests : unsafe { & zwp_linux_explicit_synchronization_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_linux_explicit_synchronization_v1_listener { } pub unsafe fn zwp_linux_explicit_synchronization_v1_set_user_data ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_linux_explicit_synchronization_v1 as _ , user_data ) ; } pub unsafe fn zwp_linux_explicit_synchronization_v1_get_user_data ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_linux_explicit_synchronization_v1 as _ ) ; } pub unsafe fn zwp_linux_explicit_synchronization_v1_get_version ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_linux_explicit_synchronization_v1 as _ ) ; } pub unsafe fn zwp_linux_explicit_synchronization_v1_add_listener ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_linux_explicit_synchronization_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_linux_explicit_synchronization_v1_add_rust_listener ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 , listener : & dyn zwp_linux_explicit_synchronization_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_linux_explicit_synchronization_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_linux_explicit_synchronization_v1_add_listener ( zwp_linux_explicit_synchronization_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy explicit synchronization factory object\n\nDestroy this explicit synchronization factory object. Other objects,\nincluding zwp_linux_surface_synchronization_v1 objects created by this\nfactory, shall not be affected by this request." ] pub unsafe fn zwp_linux_explicit_synchronization_v1_destroy ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_explicit_synchronization_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_linux_explicit_synchronization_v1 as _ ) ; } # [ doc = "extend surface interface for explicit synchronization\n\nInstantiate an interface extension for the given wl_surface to provide\nexplicit synchronization.\n\nIf the given wl_surface already has an explicit synchronization object\nassociated, the synchronization_exists protocol error is raised.\n\nGraphics APIs, like EGL or Vulkan, that manage the buffer queue and\ncommits of a wl_surface themselves, are likely to be using this\nextension internally. If a client is using such an API for a\nwl_surface, it should not directly use this extension on that surface,\nto avoid raising a synchronization_exists protocol error." ] pub unsafe fn zwp_linux_explicit_synchronization_v1_get_synchronization ( zwp_linux_explicit_synchronization_v1 : * mut super :: zwp_linux_explicit_synchronization_v1 :: zwp_linux_explicit_synchronization_v1 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_linux_explicit_synchronization_v1 as _ , 1u32 , & super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "per-surface explicit synchronization support\n\nThis object implements per-surface explicit synchronization.\n\nSynchronization refers to co-ordination of pipelined operations performed\non buffers. Most GPU clients will schedule an asynchronous operation to\nrender to the buffer, then immediately send the buffer to the compositor\nto be attached to a surface.\n\nIn implicit synchronization, ensuring that the rendering operation is\ncomplete before the compositor displays the buffer is an implementation\ndetail handled by either the kernel or userspace graphics driver.\n\nBy contrast, in explicit synchronization, dma_fence objects mark when the\nasynchronous operations are complete. When submitting a buffer, the\nclient provides an acquire fence which will be waited on before the\ncompositor accesses the buffer. The Wayland server, through a\nzwp_linux_buffer_release_v1 object, will inform the client with an event\nwhich may be accompanied by a release fence, when the compositor will no\nlonger access the buffer contents due to the specific commit that\nrequested the release event.\n\nEach surface can be associated with only one object of this interface at\nany time.\n\nIn version 1 of this interface, explicit synchronization is only\nguaranteed to be supported for buffers created with any version of the\nwp_linux_dmabuf buffer factory. Version 2 additionally guarantees\nexplicit synchronization support for opaque EGL buffers, which is a type\nof platform specific buffers described in the EGL_WL_bind_wayland_display\nextension. Compositors are free to support explicit synchronization for\nadditional buffer types." ] pub mod zwp_linux_surface_synchronization_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_linux_surface_synchronization_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "the fence specified by the client could not be imported" ] invalid_fence = 0 , # [ doc = "multiple fences added for a single surface commit" ] duplicate_fence = 1 , # [ doc = "multiple releases added for a single surface commit" ] duplicate_release = 2 , # [ doc = "the associated wl_surface was destroyed" ] no_surface = 3 , # [ doc = "the buffer does not support explicit synchronization" ] unsupported_buffer = 4 , # [ doc = "no buffer was attached" ] no_buffer = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_fence ) , 1 => Some ( error :: duplicate_fence ) , 2 => Some ( error :: duplicate_release ) , 3 => Some ( error :: no_surface ) , 4 => Some ( error :: unsupported_buffer ) , 5 => Some ( error :: no_buffer ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_linux_surface_synchronization_v1_requests_get_release_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_surface_synchronization_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_acquire_fence\0" as * const u8 as * const c_char , signature : b"h\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_release\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_linux_surface_synchronization_v1_requests_get_release_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_linux_surface_synchronization_v1_interface : wl_interface = wl_interface { name : b"zwp_linux_surface_synchronization_v1\0" as * const u8 as * const c_char , version : 2 , request_count : 3 , requests : unsafe { & zwp_linux_surface_synchronization_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_linux_surface_synchronization_v1_listener { } pub unsafe fn zwp_linux_surface_synchronization_v1_set_user_data ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_linux_surface_synchronization_v1 as _ , user_data ) ; } pub unsafe fn zwp_linux_surface_synchronization_v1_get_user_data ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_linux_surface_synchronization_v1 as _ ) ; } pub unsafe fn zwp_linux_surface_synchronization_v1_get_version ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_linux_surface_synchronization_v1 as _ ) ; } pub unsafe fn zwp_linux_surface_synchronization_v1_add_listener ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_linux_surface_synchronization_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_linux_surface_synchronization_v1_add_rust_listener ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 , listener : & dyn zwp_linux_surface_synchronization_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_linux_surface_synchronization_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_linux_surface_synchronization_v1_add_listener ( zwp_linux_surface_synchronization_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy synchronization object\n\nDestroy this explicit synchronization object.\n\nAny fence set by this object with set_acquire_fence since the last\ncommit will be discarded by the server. Any fences set by this object\nbefore the last commit are not affected.\n\nzwp_linux_buffer_release_v1 objects created by this object are not\naffected by this request." ] pub unsafe fn zwp_linux_surface_synchronization_v1_destroy ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_surface_synchronization_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_linux_surface_synchronization_v1 as _ ) ; } # [ doc = "set the acquire fence\n\nSet the acquire fence that must be signaled before the compositor\nmay sample from the buffer attached with wl_surface.attach. The fence\nis a dma_fence kernel object.\n\nThe acquire fence is double-buffered state, and will be applied on the\nnext wl_surface.commit request for the associated surface. Thus, it\napplies only to the buffer that is attached to the surface at commit\ntime.\n\nIf the provided fd is not a valid dma_fence fd, then an INVALID_FENCE\nerror is raised.\n\nIf a fence has already been attached during the same commit cycle, a\nDUPLICATE_FENCE error is raised.\n\nIf the associated wl_surface was destroyed, a NO_SURFACE error is\nraised.\n\nIf at surface commit time the attached buffer does not support explicit\nsynchronization, an UNSUPPORTED_BUFFER error is raised.\n\nIf at surface commit time there is no buffer attached, a NO_BUFFER\nerror is raised." ] pub unsafe fn zwp_linux_surface_synchronization_v1_set_acquire_fence ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 , fd : :: std :: os :: unix :: io :: RawFd ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_surface_synchronization_v1 as _ , 1u32 , fd , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release fence for last-attached buffer\n\nCreate a listener for the release of the buffer attached by the\nclient with wl_surface.attach. See zwp_linux_buffer_release_v1\ndocumentation for more information.\n\nThe release object is double-buffered state, and will be associated\nwith the buffer that is attached to the surface at wl_surface.commit\ntime.\n\nIf a zwp_linux_buffer_release_v1 object has already been requested for\nthe surface in the same commit cycle, a DUPLICATE_RELEASE error is\nraised.\n\nIf the associated wl_surface was destroyed, a NO_SURFACE error\nis raised.\n\nIf at surface commit time there is no buffer attached, a NO_BUFFER\nerror is raised." ] pub unsafe fn zwp_linux_surface_synchronization_v1_get_release ( zwp_linux_surface_synchronization_v1 : * mut super :: zwp_linux_surface_synchronization_v1 :: zwp_linux_surface_synchronization_v1 ) -> * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_linux_surface_synchronization_v1 as _ , 2u32 , & super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "buffer release explicit synchronization\n\nThis object is instantiated in response to a\nzwp_linux_surface_synchronization_v1.get_release request.\n\nIt provides an alternative to wl_buffer.release events, providing a\nunique release from a single wl_surface.commit request. The release event\nalso supports explicit synchronization, providing a fence FD for the\nclient to synchronize against.\n\nExactly one event, either a fenced_release or an immediate_release, will\nbe emitted for the wl_surface.commit request. The compositor can choose\nrelease by release which event it uses.\n\nThis event does not replace wl_buffer.release events; servers are still\nrequired to send those events.\n\nOnce a buffer release object has delivered a 'fenced_release' or an\n'immediate_release' event it is automatically destroyed." ] pub mod zwp_linux_buffer_release_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_linux_buffer_release_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_buffer_release_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"fenced_release\0" as * const u8 as * const c_char , signature : b"h\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"immediate_release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_linux_buffer_release_v1_interface : wl_interface = wl_interface { name : b"zwp_linux_buffer_release_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 2 , events : unsafe { & zwp_linux_buffer_release_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_linux_buffer_release_v1_listener { # [ doc = "release buffer with fence\n\nSent when the compositor has finalised its usage of the associated\nbuffer for the relevant commit, providing a dma_fence which will be\nsignaled when all operations by the compositor on that buffer for that\ncommit have finished.\n\nOnce the fence has signaled, and assuming the associated buffer is not\npending release from other wl_surface.commit requests, no additional\nexplicit or implicit synchronization is required to safely reuse or\ndestroy the buffer.\n\nThis event destroys the zwp_linux_buffer_release_v1 object." ] fn fenced_release ( & mut self , object : * mut zwp_linux_buffer_release_v1 , fence : :: std :: os :: unix :: io :: RawFd ) { } # [ doc = "release buffer immediately\n\nSent when the compositor has finalised its usage of the associated\nbuffer for the relevant commit, and either performed no operations\nusing it, or has a guarantee that all its operations on that buffer for\nthat commit have finished.\n\nOnce this event is received, and assuming the associated buffer is not\npending release from other wl_surface.commit requests, no additional\nexplicit or implicit synchronization is required to safely reuse or\ndestroy the buffer.\n\nThis event destroys the zwp_linux_buffer_release_v1 object." ] fn immediate_release ( & mut self , object : * mut zwp_linux_buffer_release_v1 , ) { } } pub unsafe fn zwp_linux_buffer_release_v1_set_user_data ( zwp_linux_buffer_release_v1 : * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_linux_buffer_release_v1 as _ , user_data ) ; } pub unsafe fn zwp_linux_buffer_release_v1_get_user_data ( zwp_linux_buffer_release_v1 : * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_linux_buffer_release_v1 as _ ) ; } pub unsafe fn zwp_linux_buffer_release_v1_get_version ( zwp_linux_buffer_release_v1 : * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_linux_buffer_release_v1 as _ ) ; } pub unsafe fn zwp_linux_buffer_release_v1_add_listener ( zwp_linux_buffer_release_v1 : * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_linux_buffer_release_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_linux_buffer_release_v1_add_rust_listener ( zwp_linux_buffer_release_v1 : * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 , listener : & dyn zwp_linux_buffer_release_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_linux_buffer_release_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_linux_buffer_release_v1_add_listener ( zwp_linux_buffer_release_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_linux_buffer_release_v1_destroy ( zwp_linux_buffer_release_v1 : * mut super :: zwp_linux_buffer_release_v1 :: zwp_linux_buffer_release_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_linux_buffer_release_v1 as _ ) ; } } } pub mod idle_inhibit_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "control behavior when display idles\n\nThis interface permits inhibiting the idle behavior such as screen\nblanking, locking, and screensaving. The client binds the idle manager\nglobally, then creates idle-inhibitor objects for each surface.\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_idle_inhibit_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_idle_inhibit_manager_v1 { } static mut zwp_idle_inhibit_manager_v1_requests_create_inhibitor_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_idle_inhibit_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_inhibitor\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_idle_inhibit_manager_v1_requests_create_inhibitor_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_idle_inhibit_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_idle_inhibit_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_idle_inhibit_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_idle_inhibit_manager_v1_listener { } pub unsafe fn zwp_idle_inhibit_manager_v1_set_user_data ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_idle_inhibit_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_idle_inhibit_manager_v1_get_user_data ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_idle_inhibit_manager_v1 as _ ) ; } pub unsafe fn zwp_idle_inhibit_manager_v1_get_version ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_idle_inhibit_manager_v1 as _ ) ; } pub unsafe fn zwp_idle_inhibit_manager_v1_add_listener ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_idle_inhibit_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_idle_inhibit_manager_v1_add_rust_listener ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 , listener : & dyn zwp_idle_inhibit_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_idle_inhibit_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_idle_inhibit_manager_v1_add_listener ( zwp_idle_inhibit_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the idle inhibitor object\n\nDestroy the inhibit manager." ] pub unsafe fn zwp_idle_inhibit_manager_v1_destroy ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_idle_inhibit_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_idle_inhibit_manager_v1 as _ ) ; } # [ doc = "create a new inhibitor object\n\nCreate a new inhibitor object associated with the given surface." ] pub unsafe fn zwp_idle_inhibit_manager_v1_create_inhibitor ( zwp_idle_inhibit_manager_v1 : * mut super :: zwp_idle_inhibit_manager_v1 :: zwp_idle_inhibit_manager_v1 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_idle_inhibit_manager_v1 as _ , 1u32 , & super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "context object for inhibiting idle behavior\n\nAn idle inhibitor prevents the output that the associated surface is\nvisible on from being set to a state where it is not visually usable due\nto lack of user interaction (e.g. blanked, dimmed, locked, set to power\nsave, etc.) Any screensaver processes are also blocked from displaying.\n\nIf the surface is destroyed, unmapped, becomes occluded, loses\nvisibility, or otherwise becomes not visually relevant for the user, the\nidle inhibitor will not be honored by the compositor; if the surface\nsubsequently regains visibility the inhibitor takes effect once again.\nLikewise, the inhibitor isn't honored if the system was already idled at\nthe time the inhibitor was established, although if the system later\nde-idles and re-idles the inhibitor will take effect." ] pub mod zwp_idle_inhibitor_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_idle_inhibitor_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_idle_inhibitor_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_idle_inhibitor_v1_interface : wl_interface = wl_interface { name : b"zwp_idle_inhibitor_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_idle_inhibitor_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_idle_inhibitor_v1_listener { } pub unsafe fn zwp_idle_inhibitor_v1_set_user_data ( zwp_idle_inhibitor_v1 : * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_idle_inhibitor_v1 as _ , user_data ) ; } pub unsafe fn zwp_idle_inhibitor_v1_get_user_data ( zwp_idle_inhibitor_v1 : * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_idle_inhibitor_v1 as _ ) ; } pub unsafe fn zwp_idle_inhibitor_v1_get_version ( zwp_idle_inhibitor_v1 : * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_idle_inhibitor_v1 as _ ) ; } pub unsafe fn zwp_idle_inhibitor_v1_add_listener ( zwp_idle_inhibitor_v1 : * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_idle_inhibitor_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_idle_inhibitor_v1_add_rust_listener ( zwp_idle_inhibitor_v1 : * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 , listener : & dyn zwp_idle_inhibitor_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_idle_inhibitor_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_idle_inhibitor_v1_add_listener ( zwp_idle_inhibitor_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the idle inhibitor object\n\nRemove the inhibitor effect from the associated wl_surface." ] pub unsafe fn zwp_idle_inhibitor_v1_destroy ( zwp_idle_inhibitor_v1 : * mut super :: zwp_idle_inhibitor_v1 :: zwp_idle_inhibitor_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_idle_inhibitor_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_idle_inhibitor_v1 as _ ) ; } } } pub mod fake_input { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Fake input manager\n\nThis interface allows other processes to provide fake input events.\nPurpose is on the one hand side to provide testing facilities like XTest on X11.\nBut also to support use case like kdeconnect's mouse pad interface.\n\nA compositor should not trust the input received from this interface.\nClients should not expect that the compositor honors the requests from this\ninterface." ] pub mod org_kde_kwin_fake_input { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_fake_input { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_fake_input_requests : [ wl_message ; 11 ] = [ wl_message { name : b"authenticate\0" as * const u8 as * const c_char , signature : b"ss\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"pointer_motion\0" as * const u8 as * const c_char , signature : b"ff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"button\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"axis\0" as * const u8 as * const c_char , signature : b"uf\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"touch_down\0" as * const u8 as * const c_char , signature : b"2uff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"touch_motion\0" as * const u8 as * const c_char , signature : b"2uff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"touch_up\0" as * const u8 as * const c_char , signature : b"2u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"touch_cancel\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"touch_frame\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"pointer_motion_absolute\0" as * const u8 as * const c_char , signature : b"3ff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"keyboard_key\0" as * const u8 as * const c_char , signature : b"4uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_fake_input_interface : wl_interface = wl_interface { name : b"org_kde_kwin_fake_input\0" as * const u8 as * const c_char , version : 4 , request_count : 11 , requests : unsafe { & org_kde_kwin_fake_input_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_fake_input_listener { } pub unsafe fn org_kde_kwin_fake_input_set_user_data ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_fake_input as _ , user_data ) ; } pub unsafe fn org_kde_kwin_fake_input_get_user_data ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_fake_input as _ ) ; } pub unsafe fn org_kde_kwin_fake_input_get_version ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_fake_input as _ ) ; } pub unsafe fn org_kde_kwin_fake_input_add_listener ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_fake_input as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_fake_input_add_rust_listener ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , listener : & dyn org_kde_kwin_fake_input_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_fake_input_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_fake_input_add_listener ( org_kde_kwin_fake_input as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_fake_input_destroy ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_fake_input as _ ) ; } # [ doc = "Information why the client wants to use the interface\n\nA client should use this request to tell the compositor why it wants to\nuse this interface. The compositor might use the information to decide\nwhether it wants to grant the request. The data might also be passed to\nthe user to decide whether the application should get granted access to\nthis very privileged interface." ] pub unsafe fn org_kde_kwin_fake_input_authenticate ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , application : * const c_char , reason : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 0u32 , application , reason , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_fake_input_pointer_motion ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , delta_x : wl_fixed_t , delta_y : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 1u32 , delta_x , delta_y , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_fake_input_button ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , button : u32 , state : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 2u32 , button , state , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_fake_input_axis ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , axis : u32 , value : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 3u32 , axis , value , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "touch down event\n\nA client should use this request to send touch down event at specific\ncoordinates." ] pub unsafe fn org_kde_kwin_fake_input_touch_down ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , id : u32 , x : wl_fixed_t , y : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 4u32 , id , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "touch motion event\n\nA client should use this request to send touch motion to specific position." ] pub unsafe fn org_kde_kwin_fake_input_touch_motion ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , id : u32 , x : wl_fixed_t , y : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 5u32 , id , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "touch up event\n\nA client should use this request to send touch up event." ] pub unsafe fn org_kde_kwin_fake_input_touch_up ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , id : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 6u32 , id , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "touch cancel event\n\nA client should use this request to cancel the current\ntouch event." ] pub unsafe fn org_kde_kwin_fake_input_touch_cancel ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 7u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "touch frame event\n\nA client should use this request to send touch frame event." ] pub unsafe fn org_kde_kwin_fake_input_touch_frame ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 8u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_fake_input_pointer_motion_absolute ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , x : wl_fixed_t , y : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 9u32 , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_fake_input_keyboard_key ( org_kde_kwin_fake_input : * mut super :: org_kde_kwin_fake_input :: org_kde_kwin_fake_input , button : u32 , state : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_fake_input as _ , 10u32 , button , state , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod shadow { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod org_kde_kwin_shadow_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_shadow_manager { } static mut org_kde_kwin_shadow_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_shadow :: org_kde_kwin_shadow_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_manager_requests_unset_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_shadow_manager_requests : [ wl_message ; 3 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_manager_requests_create_types as * const _ } , } , wl_message { name : b"unset\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_manager_requests_unset_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_shadow_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_shadow_manager\0" as * const u8 as * const c_char , version : 2 , request_count : 3 , requests : unsafe { & org_kde_kwin_shadow_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_shadow_manager_listener { } pub unsafe fn org_kde_kwin_shadow_manager_set_user_data ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_shadow_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_shadow_manager_get_user_data ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_shadow_manager as _ ) ; } pub unsafe fn org_kde_kwin_shadow_manager_get_version ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_shadow_manager as _ ) ; } pub unsafe fn org_kde_kwin_shadow_manager_add_listener ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_shadow_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_shadow_manager_add_rust_listener ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager , listener : & dyn org_kde_kwin_shadow_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_shadow_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_shadow_manager_add_listener ( org_kde_kwin_shadow_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_shadow_manager_create ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_shadow_manager as _ , 0u32 , & super :: org_kde_kwin_shadow :: org_kde_kwin_shadow_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } pub unsafe fn org_kde_kwin_shadow_manager_unset ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow_manager as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Destroy the org_kde_kwin_shadow_manager\n\nDestroy the org_kde_kwin_shadow_manager object." ] pub unsafe fn org_kde_kwin_shadow_manager_destroy ( org_kde_kwin_shadow_manager : * mut super :: org_kde_kwin_shadow_manager :: org_kde_kwin_shadow_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow_manager as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_shadow_manager as _ ) ; } } pub mod org_kde_kwin_shadow { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_shadow { } static mut org_kde_kwin_shadow_requests_attach_left_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_top_left_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_top_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_top_right_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_right_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_bottom_right_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_bottom_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut org_kde_kwin_shadow_requests_attach_bottom_left_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_shadow_requests : [ wl_message ; 14 ] = [ wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"attach_left\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_left_types as * const _ } , } , wl_message { name : b"attach_top_left\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_top_left_types as * const _ } , } , wl_message { name : b"attach_top\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_top_types as * const _ } , } , wl_message { name : b"attach_top_right\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_top_right_types as * const _ } , } , wl_message { name : b"attach_right\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_right_types as * const _ } , } , wl_message { name : b"attach_bottom_right\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_bottom_right_types as * const _ } , } , wl_message { name : b"attach_bottom\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_bottom_types as * const _ } , } , wl_message { name : b"attach_bottom_left\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_shadow_requests_attach_bottom_left_types as * const _ } , } , wl_message { name : b"set_left_offset\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_top_offset\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_right_offset\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_bottom_offset\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_shadow_interface : wl_interface = wl_interface { name : b"org_kde_kwin_shadow\0" as * const u8 as * const c_char , version : 2 , request_count : 14 , requests : unsafe { & org_kde_kwin_shadow_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_shadow_listener { } pub unsafe fn org_kde_kwin_shadow_set_user_data ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_shadow as _ , user_data ) ; } pub unsafe fn org_kde_kwin_shadow_get_user_data ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_shadow as _ ) ; } pub unsafe fn org_kde_kwin_shadow_get_version ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_shadow as _ ) ; } pub unsafe fn org_kde_kwin_shadow_add_listener ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_shadow as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_shadow_add_rust_listener ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , listener : & dyn org_kde_kwin_shadow_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_shadow_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_shadow_add_listener ( org_kde_kwin_shadow as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_shadow_commit ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_left ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 1u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_top_left ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 2u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_top ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 3u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_top_right ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 4u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_right ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 5u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_bottom_right ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 6u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_bottom ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 7u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_attach_bottom_left ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , buffer : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 8u32 , buffer , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_set_left_offset ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , offset : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 9u32 , offset , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_set_top_offset ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , offset : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 10u32 , offset , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_set_right_offset ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , offset : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 11u32 , offset , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_shadow_set_bottom_offset ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow , offset : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 12u32 , offset , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Destroy the org_kde_kwin_shadow\n\nDestroy the org_kde_kwin_shadow object. If the org_kde_kwin_shadow is\nstill set on a wl_surface the shadow will be immediately removed.\nPrefer to first call the request unset on the org_kde_kwin_shadow_manager and\ncommit the wl_surface to apply the change." ] pub unsafe fn org_kde_kwin_shadow_destroy ( org_kde_kwin_shadow : * mut super :: org_kde_kwin_shadow :: org_kde_kwin_shadow ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_shadow as _ , 13u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_shadow as _ ) ; } } } pub mod keyboard_shortcuts_inhibit_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "context object for keyboard grab_manager\n\nA global interface used for inhibiting the compositor keyboard shortcuts." ] pub mod zwp_keyboard_shortcuts_inhibit_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_keyboard_shortcuts_inhibit_manager_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "the shortcuts are already inhibited for this surface" ] already_inhibited = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: already_inhibited ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_keyboard_shortcuts_inhibit_manager_v1_requests_inhibit_shortcuts_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_keyboard_shortcuts_inhibit_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"inhibit_shortcuts\0" as * const u8 as * const c_char , signature : b"noo\0" as * const u8 as * const c_char , types : unsafe { & zwp_keyboard_shortcuts_inhibit_manager_v1_requests_inhibit_shortcuts_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_keyboard_shortcuts_inhibit_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_keyboard_shortcuts_inhibit_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_keyboard_shortcuts_inhibit_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_keyboard_shortcuts_inhibit_manager_v1_listener { } pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_set_user_data ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_get_user_data ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_get_version ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_add_listener ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_add_rust_listener ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 , listener : & dyn zwp_keyboard_shortcuts_inhibit_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_keyboard_shortcuts_inhibit_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_keyboard_shortcuts_inhibit_manager_v1_add_listener ( zwp_keyboard_shortcuts_inhibit_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the keyboard shortcuts inhibitor object\n\nDestroy the keyboard shortcuts inhibitor manager." ] pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_destroy ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ ) ; } # [ doc = "create a new keyboard shortcuts inhibitor object\n\nCreate a new keyboard shortcuts inhibitor object associated with\nthe given surface for the given seat.\n\nIf shortcuts are already inhibited for the specified seat and surface,\na protocol error \"already_inhibited\" is raised by the compositor." ] pub unsafe fn zwp_keyboard_shortcuts_inhibit_manager_v1_inhibit_shortcuts ( zwp_keyboard_shortcuts_inhibit_manager_v1 : * mut super :: zwp_keyboard_shortcuts_inhibit_manager_v1 :: zwp_keyboard_shortcuts_inhibit_manager_v1 , surface : * mut super :: wl_surface :: wl_surface , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_keyboard_shortcuts_inhibit_manager_v1 as _ , 1u32 , & super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface , seat ) ; return r as _ ; } } # [ doc = "context object for keyboard shortcuts inhibitor\n\nA keyboard shortcuts inhibitor instructs the compositor to ignore\nits own keyboard shortcuts when the associated surface has keyboard\nfocus. As a result, when the surface has keyboard focus on the given\nseat, it will receive all key events originating from the specified\nseat, even those which would normally be caught by the compositor for\nits own shortcuts.\n\nThe Wayland compositor is however under no obligation to disable\nall of its shortcuts, and may keep some special key combo for its own\nuse, including but not limited to one allowing the user to forcibly\nrestore normal keyboard events routing in the case of an unwilling\nclient. The compositor may also use the same key combo to reactivate\nan existing shortcut inhibitor that was previously deactivated on\nuser request.\n\nWhen the compositor restores its own keyboard shortcuts, an\n\"inactive\" event is emitted to notify the client that the keyboard\nshortcuts inhibitor is not effectively active for the surface and\nseat any more, and the client should not expect to receive all\nkeyboard events.\n\nWhen the keyboard shortcuts inhibitor is inactive, the client has\nno way to forcibly reactivate the keyboard shortcuts inhibitor.\n\nThe user can chose to re-enable a previously deactivated keyboard\nshortcuts inhibitor using any mechanism the compositor may offer,\nin which case the compositor will send an \"active\" event to notify\nthe client.\n\nIf the surface is destroyed, unmapped, or loses the seat's keyboard\nfocus, the keyboard shortcuts inhibitor becomes irrelevant and the\ncompositor will restore its own keyboard shortcuts but no \"inactive\"\nevent is emitted in this case." ] pub mod zwp_keyboard_shortcuts_inhibitor_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_keyboard_shortcuts_inhibitor_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_keyboard_shortcuts_inhibitor_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_keyboard_shortcuts_inhibitor_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"active\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"inactive\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_keyboard_shortcuts_inhibitor_v1_interface : wl_interface = wl_interface { name : b"zwp_keyboard_shortcuts_inhibitor_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_keyboard_shortcuts_inhibitor_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_keyboard_shortcuts_inhibitor_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_keyboard_shortcuts_inhibitor_v1_listener { # [ doc = "shortcuts are inhibited\n\nThis event indicates that the shortcut inhibitor is active.\n\nThe compositor sends this event every time compositor shortcuts\nare inhibited on behalf of the surface. When active, the client\nmay receive input events normally reserved by the compositor\n(see zwp_keyboard_shortcuts_inhibitor_v1).\n\nThis occurs typically when the initial request \"inhibit_shortcuts\"\nfirst becomes active or when the user instructs the compositor to\nre-enable and existing shortcuts inhibitor using any mechanism\noffered by the compositor." ] fn active ( & mut self , object : * mut zwp_keyboard_shortcuts_inhibitor_v1 , ) { } # [ doc = "shortcuts are restored\n\nThis event indicates that the shortcuts inhibitor is inactive,\nnormal shortcuts processing is restored by the compositor." ] fn inactive ( & mut self , object : * mut zwp_keyboard_shortcuts_inhibitor_v1 , ) { } } pub unsafe fn zwp_keyboard_shortcuts_inhibitor_v1_set_user_data ( zwp_keyboard_shortcuts_inhibitor_v1 : * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_keyboard_shortcuts_inhibitor_v1 as _ , user_data ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibitor_v1_get_user_data ( zwp_keyboard_shortcuts_inhibitor_v1 : * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_keyboard_shortcuts_inhibitor_v1 as _ ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibitor_v1_get_version ( zwp_keyboard_shortcuts_inhibitor_v1 : * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_keyboard_shortcuts_inhibitor_v1 as _ ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibitor_v1_add_listener ( zwp_keyboard_shortcuts_inhibitor_v1 : * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_keyboard_shortcuts_inhibitor_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_keyboard_shortcuts_inhibitor_v1_add_rust_listener ( zwp_keyboard_shortcuts_inhibitor_v1 : * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 , listener : & dyn zwp_keyboard_shortcuts_inhibitor_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_keyboard_shortcuts_inhibitor_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_keyboard_shortcuts_inhibitor_v1_add_listener ( zwp_keyboard_shortcuts_inhibitor_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the keyboard shortcuts inhibitor object\n\nRemove the keyboard shortcuts inhibitor from the associated wl_surface." ] pub unsafe fn zwp_keyboard_shortcuts_inhibitor_v1_destroy ( zwp_keyboard_shortcuts_inhibitor_v1 : * mut super :: zwp_keyboard_shortcuts_inhibitor_v1 :: zwp_keyboard_shortcuts_inhibitor_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_keyboard_shortcuts_inhibitor_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_keyboard_shortcuts_inhibitor_v1 as _ ) ; } } } pub mod tablet_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "controller object for graphic tablet devices\n\nAn object that provides access to the graphics tablets available on this\nsystem. All tablets are associated with a seat, to get access to the\nactual tablets, use wp_tablet_manager.get_tablet_seat." ] pub mod zwp_tablet_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_manager_v1 { } static mut zwp_tablet_manager_v1_requests_get_tablet_seat_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"get_tablet_seat\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_manager_v1_requests_get_tablet_seat_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_tablet_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_manager_v1_listener { } pub unsafe fn zwp_tablet_manager_v1_set_user_data ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_tablet_manager_v1_get_user_data ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_manager_v1 as _ ) ; } pub unsafe fn zwp_tablet_manager_v1_get_version ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_manager_v1 as _ ) ; } pub unsafe fn zwp_tablet_manager_v1_add_listener ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_manager_v1_add_rust_listener ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 , listener : & dyn zwp_tablet_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_manager_v1_add_listener ( zwp_tablet_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "get the tablet seat\n\nGet the wp_tablet_seat object for the given seat. This object\nprovides access to all graphics tablets in this seat." ] pub unsafe fn zwp_tablet_manager_v1_get_tablet_seat ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_tablet_manager_v1 as _ , 0u32 , & super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat ) ; return r as _ ; } # [ doc = "release the memory for the tablet manager object\n\nDestroy the wp_tablet_manager object. Objects created from this\nobject are unaffected and should be destroyed separately." ] pub unsafe fn zwp_tablet_manager_v1_destroy ( zwp_tablet_manager_v1 : * mut super :: zwp_tablet_manager_v1 :: zwp_tablet_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_manager_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_manager_v1 as _ ) ; } } # [ doc = "controller object for graphic tablet devices of a seat\n\nAn object that provides access to the graphics tablets available on this\nseat. After binding to this interface, the compositor sends a set of\nwp_tablet_seat.tablet_added and wp_tablet_seat.tool_added events." ] pub mod zwp_tablet_seat_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_seat_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_seat_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_tablet_seat_v1_events_tablet_added_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_v1 :: zwp_tablet_v1_interface as * const wl_interface } , ] ; static mut zwp_tablet_seat_v1_events_tool_added_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_seat_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"tablet_added\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_seat_v1_events_tablet_added_types as * const _ } , } , wl_message { name : b"tool_added\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_seat_v1_events_tool_added_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_seat_v1_interface : wl_interface = wl_interface { name : b"zwp_tablet_seat_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_tablet_seat_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_tablet_seat_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_seat_v1_listener { # [ doc = "new device notification\n\nThis event is sent whenever a new tablet becomes available on this\nseat. This event only provides the object id of the tablet, any\nstatic information about the tablet (device name, vid/pid, etc.) is\nsent through the wp_tablet interface." ] fn tablet_added ( & mut self , object : * mut zwp_tablet_seat_v1 , id : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 ) { } # [ doc = "a new tool has been used with a tablet\n\nThis event is sent whenever a tool that has not previously been used\nwith a tablet comes into use. This event only provides the object id\nof the tool; any static information about the tool (capabilities,\ntype, etc.) is sent through the wp_tablet_tool interface." ] fn tool_added ( & mut self , object : * mut zwp_tablet_seat_v1 , id : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 ) { } } pub unsafe fn zwp_tablet_seat_v1_set_user_data ( zwp_tablet_seat_v1 : * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_seat_v1 as _ , user_data ) ; } pub unsafe fn zwp_tablet_seat_v1_get_user_data ( zwp_tablet_seat_v1 : * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_seat_v1 as _ ) ; } pub unsafe fn zwp_tablet_seat_v1_get_version ( zwp_tablet_seat_v1 : * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_seat_v1 as _ ) ; } pub unsafe fn zwp_tablet_seat_v1_add_listener ( zwp_tablet_seat_v1 : * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_seat_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_seat_v1_add_rust_listener ( zwp_tablet_seat_v1 : * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 , listener : & dyn zwp_tablet_seat_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_seat_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_seat_v1_add_listener ( zwp_tablet_seat_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "release the memory for the tablet seat object\n\nDestroy the wp_tablet_seat object. Objects created from this\nobject are unaffected and should be destroyed separately." ] pub unsafe fn zwp_tablet_seat_v1_destroy ( zwp_tablet_seat_v1 : * mut super :: zwp_tablet_seat_v1 :: zwp_tablet_seat_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_seat_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_seat_v1 as _ ) ; } } # [ doc = "a physical tablet tool\n\nAn object that represents a physical tool that has been, or is\ncurrently in use with a tablet in this seat. Each wp_tablet_tool\nobject stays valid until the client destroys it; the compositor\nreuses the wp_tablet_tool object to indicate that the object's\nrespective physical tool has come into proximity of a tablet again.\n\nA wp_tablet_tool object's relation to a physical tool depends on the\ntablet's ability to report serial numbers. If the tablet supports\nthis capability, then the object represents a specific physical tool\nand can be identified even when used on multiple tablets.\n\nA tablet tool has a number of static characteristics, e.g. tool type,\nhardware_serial and capabilities. These capabilities are sent in an\nevent sequence after the wp_tablet_seat.tool_added event before any\nactual events from this tool. This initial event sequence is\nterminated by a wp_tablet_tool.done event.\n\nTablet tool events are grouped by wp_tablet_tool.frame events.\nAny events received before a wp_tablet_tool.frame event should be\nconsidered part of the same hardware state change." ] pub mod zwp_tablet_tool_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_tool_v1 { } # [ doc = "a physical tool type\n\nDescribes the physical type of a tool. The physical type of a tool\ngenerally defines its base usage.\n\nThe mouse tool represents a mouse-shaped tool that is not a relative\ndevice but bound to the tablet's surface, providing absolute\ncoordinates.\n\nThe lens tool is a mouse-shaped tool with an attached lens to\nprovide precision focus." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum _type { # [ doc = "Pen" ] pen = 320 , # [ doc = "Eraser" ] eraser = 321 , # [ doc = "Brush" ] brush = 322 , # [ doc = "Pencil" ] pencil = 323 , # [ doc = "Airbrush" ] airbrush = 324 , # [ doc = "Finger" ] finger = 325 , # [ doc = "Mouse" ] mouse = 326 , # [ doc = "Lens" ] lens = 327 , # [ doc ( hidden ) ] __nonexhaustive , } impl _type { pub fn from_raw ( n : u32 ) -> Option < _type > { match n { 320 => Some ( _type :: pen ) , 321 => Some ( _type :: eraser ) , 322 => Some ( _type :: brush ) , 323 => Some ( _type :: pencil ) , 324 => Some ( _type :: airbrush ) , 325 => Some ( _type :: finger ) , 326 => Some ( _type :: mouse ) , 327 => Some ( _type :: lens ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "capability flags for a tool\n\nDescribes extra capabilities on a tablet.\n\nAny tool must provide x and y values, extra axes are\ndevice-specific." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum capability { # [ doc = "Tilt axes" ] tilt = 1 , # [ doc = "Pressure axis" ] pressure = 2 , # [ doc = "Distance axis" ] distance = 3 , # [ doc = "Z-rotation axis" ] rotation = 4 , # [ doc = "Slider axis" ] slider = 5 , # [ doc = "Wheel axis" ] wheel = 6 , # [ doc ( hidden ) ] __nonexhaustive , } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { match n { 1 => Some ( capability :: tilt ) , 2 => Some ( capability :: pressure ) , 3 => Some ( capability :: distance ) , 4 => Some ( capability :: rotation ) , 5 => Some ( capability :: slider ) , 6 => Some ( capability :: wheel ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "physical button state\n\nDescribes the physical state of a button that produced the button event." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum button_state { # [ doc = "button is not pressed" ] released = 0 , # [ doc = "button is pressed" ] pressed = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl button_state { pub fn from_raw ( n : u32 ) -> Option < button_state > { match n { 0 => Some ( button_state :: released ) , 1 => Some ( button_state :: pressed ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_tablet_tool_v1_requests_set_cursor_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_tool_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_cursor\0" as * const u8 as * const c_char , signature : b"u?oii\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_tool_v1_requests_set_cursor_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_tablet_tool_v1_events_proximity_in_types : [ * const wl_interface ; 3 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: zwp_tablet_v1 :: zwp_tablet_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_tool_v1_events : [ wl_message ; 19 ] = [ wl_message { name : b"type\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hardware_serial\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hardware_id_wacom\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capability\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"proximity_in\0" as * const u8 as * const c_char , signature : b"uoo\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_tool_v1_events_proximity_in_types as * const _ } , } , wl_message { name : b"proximity_out\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"down\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"up\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"motion\0" as * const u8 as * const c_char , signature : b"ff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"pressure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"distance\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"tilt\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"rotation\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"slider\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"wheel\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"button\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_tool_v1_interface : wl_interface = wl_interface { name : b"zwp_tablet_tool_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_tool_v1_requests as * const _ } , event_count : 19 , events : unsafe { & zwp_tablet_tool_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_tool_v1_listener { # [ doc = "tool type\n\nThe tool type is the high-level type of the tool and usually decides\nthe interaction expected from this tool.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn _type ( & mut self , object : * mut zwp_tablet_tool_v1 , tool_type : _type ) { } # [ doc = "unique hardware serial number of the tool\n\nIf the physical tool can be identified by a unique 64-bit serial\nnumber, this event notifies the client of this serial number.\n\nIf multiple tablets are available in the same seat and the tool is\nuniquely identifiable by the serial number, that tool may move\nbetween tablets.\n\nOtherwise, if the tool has no serial number and this event is\nmissing, the tool is tied to the tablet it first comes into\nproximity with. Even if the physical tool is used on multiple\ntablets, separate wp_tablet_tool objects will be created, one per\ntablet.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn hardware_serial ( & mut self , object : * mut zwp_tablet_tool_v1 , hardware_serial_hi : u32 , hardware_serial_lo : u32 ) { } # [ doc = "hardware id notification in Wacom's format\n\nThis event notifies the client of a hardware id available on this tool.\n\nThe hardware id is a device-specific 64-bit id that provides extra\ninformation about the tool in use, beyond the wl_tool.type\nenumeration. The format of the id is specific to tablets made by\nWacom Inc. For example, the hardware id of a Wacom Grip\nPen (a stylus) is 0x802.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn hardware_id_wacom ( & mut self , object : * mut zwp_tablet_tool_v1 , hardware_id_hi : u32 , hardware_id_lo : u32 ) { } # [ doc = "tool capability notification\n\nThis event notifies the client of any capabilities of this tool,\nbeyond the main set of x/y axes and tip up/down detection.\n\nOne event is sent for each extra capability available on this tool.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn capability ( & mut self , object : * mut zwp_tablet_tool_v1 , capability : capability ) { } # [ doc = "tool description events sequence complete\n\nThis event signals the end of the initial burst of descriptive\nevents. A client may consider the static description of the tool to\nbe complete and finalize initialization of the tool." ] fn done ( & mut self , object : * mut zwp_tablet_tool_v1 , ) { } # [ doc = "tool removed\n\nThis event is sent when the tool is removed from the system and will\nsend no further events. Should the physical tool come back into\nproximity later, a new wp_tablet_tool object will be created.\n\nIt is compositor-dependent when a tool is removed. A compositor may\nremove a tool on proximity out, tablet removal or any other reason.\nA compositor may also keep a tool alive until shutdown.\n\nIf the tool is currently in proximity, a proximity_out event will be\nsent before the removed event. See wp_tablet_tool.proximity_out for\nthe handling of any buttons logically down.\n\nWhen this event is received, the client must wp_tablet_tool.destroy\nthe object." ] fn removed ( & mut self , object : * mut zwp_tablet_tool_v1 , ) { } # [ doc = "proximity in event\n\nNotification that this tool is focused on a certain surface.\n\nThis event can be received when the tool has moved from one surface to\nanother, or when the tool has come back into proximity above the\nsurface.\n\nIf any button is logically down when the tool comes into proximity,\nthe respective button event is sent after the proximity_in event but\nwithin the same frame as the proximity_in event." ] fn proximity_in ( & mut self , object : * mut zwp_tablet_tool_v1 , serial : u32 , tablet : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "proximity out event\n\nNotification that this tool has either left proximity, or is no\nlonger focused on a certain surface.\n\nWhen the tablet tool leaves proximity of the tablet, button release\nevents are sent for each button that was held down at the time of\nleaving proximity. These events are sent before the proximity_out\nevent but within the same wp_tablet.frame.\n\nIf the tool stays within proximity of the tablet, but the focus\nchanges from one surface to another, a button release event may not\nbe sent until the button is actually released or the tool leaves the\nproximity of the tablet." ] fn proximity_out ( & mut self , object : * mut zwp_tablet_tool_v1 , ) { } # [ doc = "tablet tool is making contact\n\nSent whenever the tablet tool comes in contact with the surface of the\ntablet.\n\nIf the tool is already in contact with the tablet when entering the\ninput region, the client owning said region will receive a\nwp_tablet.proximity_in event, followed by a wp_tablet.down\nevent and a wp_tablet.frame event.\n\nNote that this event describes logical contact, not physical\ncontact. On some devices, a compositor may not consider a tool in\nlogical contact until a minimum physical pressure threshold is\nexceeded." ] fn down ( & mut self , object : * mut zwp_tablet_tool_v1 , serial : u32 ) { } # [ doc = "tablet tool is no longer making contact\n\nSent whenever the tablet tool stops making contact with the surface of\nthe tablet, or when the tablet tool moves out of the input region\nand the compositor grab (if any) is dismissed.\n\nIf the tablet tool moves out of the input region while in contact\nwith the surface of the tablet and the compositor does not have an\nongoing grab on the surface, the client owning said region will\nreceive a wp_tablet.up event, followed by a wp_tablet.proximity_out\nevent and a wp_tablet.frame event. If the compositor has an ongoing\ngrab on this device, this event sequence is sent whenever the grab\nis dismissed in the future.\n\nNote that this event describes logical contact, not physical\ncontact. On some devices, a compositor may not consider a tool out\nof logical contact until physical pressure falls below a specific\nthreshold." ] fn up ( & mut self , object : * mut zwp_tablet_tool_v1 , ) { } # [ doc = "motion event\n\nSent whenever a tablet tool moves." ] fn motion ( & mut self , object : * mut zwp_tablet_tool_v1 , x : wl_fixed_t , y : wl_fixed_t ) { } # [ doc = "pressure change event\n\nSent whenever the pressure axis on a tool changes. The value of this\nevent is normalized to a value between 0 and 65535.\n\nNote that pressure may be nonzero even when a tool is not in logical\ncontact. See the down and up events for more details." ] fn pressure ( & mut self , object : * mut zwp_tablet_tool_v1 , pressure : u32 ) { } # [ doc = "distance change event\n\nSent whenever the distance axis on a tool changes. The value of this\nevent is normalized to a value between 0 and 65535.\n\nNote that distance may be nonzero even when a tool is not in logical\ncontact. See the down and up events for more details." ] fn distance ( & mut self , object : * mut zwp_tablet_tool_v1 , distance : u32 ) { } # [ doc = "tilt change event\n\nSent whenever one or both of the tilt axes on a tool change. Each tilt\nvalue is in 0.01 of a degree, relative to the z-axis of the tablet.\nThe angle is positive when the top of a tool tilts along the\npositive x or y axis." ] fn tilt ( & mut self , object : * mut zwp_tablet_tool_v1 , tilt_x : i32 , tilt_y : i32 ) { } # [ doc = "z-rotation change event\n\nSent whenever the z-rotation axis on the tool changes. The\nrotation value is in 0.01 of a degree clockwise from the tool's\nlogical neutral position." ] fn rotation ( & mut self , object : * mut zwp_tablet_tool_v1 , degrees : i32 ) { } # [ doc = "Slider position change event\n\nSent whenever the slider position on the tool changes. The\nvalue is normalized between -65535 and 65535, with 0 as the logical\nneutral position of the slider.\n\nThe slider is available on e.g. the Wacom Airbrush tool." ] fn slider ( & mut self , object : * mut zwp_tablet_tool_v1 , position : i32 ) { } # [ doc = "Wheel delta event\n\nSent whenever the wheel on the tool emits an event. This event\ncontains two values for the same axis change. The degrees value is\nin 0.01 of a degree in the same orientation as the\nwl_pointer.vertical_scroll axis. The clicks value is in discrete\nlogical clicks of the mouse wheel. This value may be zero if the\nmovement of the wheel was less than one logical click.\n\nClients should choose either value and avoid mixing degrees and\nclicks. The compositor may accumulate values smaller than a logical\nclick and emulate click events when a certain threshold is met.\nThus, wl_tablet_tool.wheel events with non-zero clicks values may\nhave different degrees values." ] fn wheel ( & mut self , object : * mut zwp_tablet_tool_v1 , degrees : i32 , clicks : i32 ) { } # [ doc = "button event\n\nSent whenever a button on the tool is pressed or released.\n\nIf a button is held down when the tool moves in or out of proximity,\nbutton events are generated by the compositor. See\nwp_tablet_tool.proximity_in and wp_tablet_tool.proximity_out for\ndetails." ] fn button ( & mut self , object : * mut zwp_tablet_tool_v1 , serial : u32 , button : u32 , state : button_state ) { } # [ doc = "frame event\n\nMarks the end of a series of axis and/or button updates from the\ntablet. The Wayland protocol requires axis updates to be sent\nsequentially, however all events within a frame should be considered\none hardware event." ] fn frame ( & mut self , object : * mut zwp_tablet_tool_v1 , time : u32 ) { } } pub unsafe fn zwp_tablet_tool_v1_set_user_data ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_tool_v1 as _ , user_data ) ; } pub unsafe fn zwp_tablet_tool_v1_get_user_data ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_tool_v1 as _ ) ; } pub unsafe fn zwp_tablet_tool_v1_get_version ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_tool_v1 as _ ) ; } pub unsafe fn zwp_tablet_tool_v1_add_listener ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_tool_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_tool_v1_add_rust_listener ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 , listener : & dyn zwp_tablet_tool_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_tool_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_tool_v1_add_listener ( zwp_tablet_tool_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "set the tablet tool's surface\n\nSets the surface of the cursor used for this tool on the given\ntablet. This request only takes effect if the tool is in proximity\nof one of the requesting client's surfaces or the surface parameter\nis the current pointer surface. If there was a previous surface set\nwith this request it is replaced. If surface is NULL, the cursor\nimage is hidden.\n\nThe parameters hotspot_x and hotspot_y define the position of the\npointer surface relative to the pointer location. Its top-left corner\nis always at (x, y) - (hotspot_x, hotspot_y), where (x, y) are the\ncoordinates of the pointer location, in surface-local coordinates.\n\nOn surface.attach requests to the pointer surface, hotspot_x and\nhotspot_y are decremented by the x and y parameters passed to the\nrequest. Attach must be confirmed by wl_surface.commit as usual.\n\nThe hotspot can also be updated by passing the currently set pointer\nsurface to this request with new values for hotspot_x and hotspot_y.\n\nThe current and pending input regions of the wl_surface are cleared,\nand wl_surface.set_input_region is ignored until the wl_surface is no\nlonger used as the cursor. When the use as a cursor ends, the current\nand pending input regions become undefined, and the wl_surface is\nunmapped.\n\nThis request gives the surface the role of a cursor. The role\nassigned by this request is the same as assigned by\nwl_pointer.set_cursor meaning the same surface can be\nused both as a wl_pointer cursor and a wp_tablet cursor. If the\nsurface already has another role, it raises a protocol error.\nThe surface may be used on multiple tablets and across multiple\nseats." ] pub unsafe fn zwp_tablet_tool_v1_set_cursor ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 , serial : u32 , surface : * mut super :: wl_surface :: wl_surface , hotspot_x : i32 , hotspot_y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_tool_v1 as _ , 0u32 , serial , surface , hotspot_x , hotspot_y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the tool object\n\nThis destroys the client's resource for this tool object." ] pub unsafe fn zwp_tablet_tool_v1_destroy ( zwp_tablet_tool_v1 : * mut super :: zwp_tablet_tool_v1 :: zwp_tablet_tool_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_tool_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_tool_v1 as _ ) ; } } # [ doc = "graphics tablet device\n\nThe wp_tablet interface represents one graphics tablet device. The\ntablet interface itself does not generate events; all events are\ngenerated by wp_tablet_tool objects when in proximity above a tablet.\n\nA tablet has a number of static characteristics, e.g. device name and\npid/vid. These capabilities are sent in an event sequence after the\nwp_tablet_seat.tablet_added event. This initial event sequence is\nterminated by a wp_tablet.done event." ] pub mod zwp_tablet_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_v1_events : [ wl_message ; 5 ] = [ wl_message { name : b"name\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"id\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"path\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_v1_interface : wl_interface = wl_interface { name : b"zwp_tablet_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_tablet_v1_requests as * const _ } , event_count : 5 , events : unsafe { & zwp_tablet_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_v1_listener { # [ doc = "tablet device name\n\nThis event is sent in the initial burst of events before the\nwp_tablet.done event." ] fn name ( & mut self , object : * mut zwp_tablet_v1 , name : * mut c_char ) { } # [ doc = "tablet device USB vendor/product id\n\nThis event is sent in the initial burst of events before the\nwp_tablet.done event." ] fn id ( & mut self , object : * mut zwp_tablet_v1 , vid : u32 , pid : u32 ) { } # [ doc = "path to the device\n\nA system-specific device path that indicates which device is behind\nthis wp_tablet. This information may be used to gather additional\ninformation about the device, e.g. through libwacom.\n\nA device may have more than one device path. If so, multiple\nwp_tablet.path events are sent. A device may be emulated and not\nhave a device path, and in that case this event will not be sent.\n\nThe format of the path is unspecified, it may be a device node, a\nsysfs path, or some other identifier. It is up to the client to\nidentify the string provided.\n\nThis event is sent in the initial burst of events before the\nwp_tablet.done event." ] fn path ( & mut self , object : * mut zwp_tablet_v1 , path : * mut c_char ) { } # [ doc = "tablet description events sequence complete\n\nThis event is sent immediately to signal the end of the initial\nburst of descriptive events. A client may consider the static\ndescription of the tablet to be complete and finalize initialization\nof the tablet." ] fn done ( & mut self , object : * mut zwp_tablet_v1 , ) { } # [ doc = "tablet removed event\n\nSent when the tablet has been removed from the system. When a tablet\nis removed, some tools may be removed.\n\nWhen this event is received, the client must wp_tablet.destroy\nthe object." ] fn removed ( & mut self , object : * mut zwp_tablet_v1 , ) { } } pub unsafe fn zwp_tablet_v1_set_user_data ( zwp_tablet_v1 : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_v1 as _ , user_data ) ; } pub unsafe fn zwp_tablet_v1_get_user_data ( zwp_tablet_v1 : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_v1 as _ ) ; } pub unsafe fn zwp_tablet_v1_get_version ( zwp_tablet_v1 : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_v1 as _ ) ; } pub unsafe fn zwp_tablet_v1_add_listener ( zwp_tablet_v1 : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_v1_add_rust_listener ( zwp_tablet_v1 : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 , listener : & dyn zwp_tablet_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_v1_add_listener ( zwp_tablet_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the tablet object\n\nThis destroys the client's resource for this tablet object." ] pub unsafe fn zwp_tablet_v1_destroy ( zwp_tablet_v1 : * mut super :: zwp_tablet_v1 :: zwp_tablet_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_v1 as _ ) ; } } } pub mod relative_pointer_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "get relative pointer objects\n\nA global interface used for getting the relative pointer object for a\ngiven pointer." ] pub mod zwp_relative_pointer_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_relative_pointer_manager_v1 { } static mut zwp_relative_pointer_manager_v1_requests_get_relative_pointer_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_relative_pointer_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_relative_pointer\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_relative_pointer_manager_v1_requests_get_relative_pointer_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_relative_pointer_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_relative_pointer_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_relative_pointer_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_relative_pointer_manager_v1_listener { } pub unsafe fn zwp_relative_pointer_manager_v1_set_user_data ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_relative_pointer_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_relative_pointer_manager_v1_get_user_data ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_relative_pointer_manager_v1 as _ ) ; } pub unsafe fn zwp_relative_pointer_manager_v1_get_version ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_relative_pointer_manager_v1 as _ ) ; } pub unsafe fn zwp_relative_pointer_manager_v1_add_listener ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_relative_pointer_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_relative_pointer_manager_v1_add_rust_listener ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 , listener : & dyn zwp_relative_pointer_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_relative_pointer_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_relative_pointer_manager_v1_add_listener ( zwp_relative_pointer_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the relative pointer manager object\n\nUsed by the client to notify the server that it will no longer use this\nrelative pointer manager object." ] pub unsafe fn zwp_relative_pointer_manager_v1_destroy ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_relative_pointer_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_relative_pointer_manager_v1 as _ ) ; } # [ doc = "get a relative pointer object\n\nCreate a relative pointer interface given a wl_pointer object. See the\nwp_relative_pointer interface for more details." ] pub unsafe fn zwp_relative_pointer_manager_v1_get_relative_pointer ( zwp_relative_pointer_manager_v1 : * mut super :: zwp_relative_pointer_manager_v1 :: zwp_relative_pointer_manager_v1 , pointer : * mut super :: wl_pointer :: wl_pointer ) -> * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_relative_pointer_manager_v1 as _ , 1u32 , & super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , pointer ) ; return r as _ ; } } # [ doc = "relative pointer object\n\nA wp_relative_pointer object is an extension to the wl_pointer interface\nused for emitting relative pointer events. It shares the same focus as\nwl_pointer objects of the same seat and will only emit events when it has\nfocus." ] pub mod zwp_relative_pointer_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_relative_pointer_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_relative_pointer_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_relative_pointer_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"relative_motion\0" as * const u8 as * const c_char , signature : b"uuffff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_relative_pointer_v1_interface : wl_interface = wl_interface { name : b"zwp_relative_pointer_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_relative_pointer_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zwp_relative_pointer_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_relative_pointer_v1_listener { # [ doc = "relative pointer motion\n\nRelative x/y pointer motion from the pointer of the seat associated with\nthis object.\n\nA relative motion is in the same dimension as regular wl_pointer motion\nevents, except they do not represent an absolute position. For example,\nmoving a pointer from (x, y) to (x', y') would have the equivalent\nrelative motion (x' - x, y' - y). If a pointer motion caused the\nabsolute pointer position to be clipped by for example the edge of the\nmonitor, the relative motion is unaffected by the clipping and will\nrepresent the unclipped motion.\n\nThis event also contains non-accelerated motion deltas. The\nnon-accelerated delta is, when applicable, the regular pointer motion\ndelta as it was before having applied motion acceleration and other\ntransformations such as normalization.\n\nNote that the non-accelerated delta does not represent 'raw' events as\nthey were read from some device. Pointer motion acceleration is device-\nand configuration-specific and non-accelerated deltas and accelerated\ndeltas may have the same value on some devices.\n\nRelative motions are not coupled to wl_pointer.motion events, and can be\nsent in combination with such events, but also independently. There may\nalso be scenarios where wl_pointer.motion is sent, but there is no\nrelative motion. The order of an absolute and relative motion event\noriginating from the same physical motion is not guaranteed.\n\nIf the client needs button events or focus state, it can receive them\nfrom a wl_pointer object of the same seat that the wp_relative_pointer\nobject is associated with." ] fn relative_motion ( & mut self , object : * mut zwp_relative_pointer_v1 , utime_hi : u32 , utime_lo : u32 , dx : wl_fixed_t , dy : wl_fixed_t , dx_unaccel : wl_fixed_t , dy_unaccel : wl_fixed_t ) { } } pub unsafe fn zwp_relative_pointer_v1_set_user_data ( zwp_relative_pointer_v1 : * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_relative_pointer_v1 as _ , user_data ) ; } pub unsafe fn zwp_relative_pointer_v1_get_user_data ( zwp_relative_pointer_v1 : * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_relative_pointer_v1 as _ ) ; } pub unsafe fn zwp_relative_pointer_v1_get_version ( zwp_relative_pointer_v1 : * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_relative_pointer_v1 as _ ) ; } pub unsafe fn zwp_relative_pointer_v1_add_listener ( zwp_relative_pointer_v1 : * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_relative_pointer_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_relative_pointer_v1_add_rust_listener ( zwp_relative_pointer_v1 : * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 , listener : & dyn zwp_relative_pointer_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_relative_pointer_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_relative_pointer_v1_add_listener ( zwp_relative_pointer_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "release the relative pointer object" ] pub unsafe fn zwp_relative_pointer_v1_destroy ( zwp_relative_pointer_v1 : * mut super :: zwp_relative_pointer_v1 :: zwp_relative_pointer_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_relative_pointer_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_relative_pointer_v1 as _ ) ; } } } pub mod tablet_unstable_v2 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "controller object for graphic tablet devices\n\nAn object that provides access to the graphics tablets available on this\nsystem. All tablets are associated with a seat, to get access to the\nactual tablets, use wp_tablet_manager.get_tablet_seat." ] pub mod zwp_tablet_manager_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_manager_v2 { } static mut zwp_tablet_manager_v2_requests_get_tablet_seat_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_manager_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"get_tablet_seat\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_manager_v2_requests_get_tablet_seat_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_manager_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_manager_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_manager_v2_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_manager_v2_listener { } pub unsafe fn zwp_tablet_manager_v2_set_user_data ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_manager_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_manager_v2_get_user_data ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_manager_v2 as _ ) ; } pub unsafe fn zwp_tablet_manager_v2_get_version ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_manager_v2 as _ ) ; } pub unsafe fn zwp_tablet_manager_v2_add_listener ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_manager_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_manager_v2_add_rust_listener ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 , listener : & dyn zwp_tablet_manager_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_manager_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_manager_v2_add_listener ( zwp_tablet_manager_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "get the tablet seat\n\nGet the wp_tablet_seat object for the given seat. This object\nprovides access to all graphics tablets in this seat." ] pub unsafe fn zwp_tablet_manager_v2_get_tablet_seat ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_tablet_manager_v2 as _ , 0u32 , & super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat ) ; return r as _ ; } # [ doc = "release the memory for the tablet manager object\n\nDestroy the wp_tablet_manager object. Objects created from this\nobject are unaffected and should be destroyed separately." ] pub unsafe fn zwp_tablet_manager_v2_destroy ( zwp_tablet_manager_v2 : * mut super :: zwp_tablet_manager_v2 :: zwp_tablet_manager_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_manager_v2 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_manager_v2 as _ ) ; } } # [ doc = "controller object for graphic tablet devices of a seat\n\nAn object that provides access to the graphics tablets available on this\nseat. After binding to this interface, the compositor sends a set of\nwp_tablet_seat.tablet_added and wp_tablet_seat.tool_added events." ] pub mod zwp_tablet_seat_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_seat_v2 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_seat_v2_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_tablet_seat_v2_events_tablet_added_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_v2 :: zwp_tablet_v2_interface as * const wl_interface } , ] ; static mut zwp_tablet_seat_v2_events_tool_added_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2_interface as * const wl_interface } , ] ; static mut zwp_tablet_seat_v2_events_pad_added_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_seat_v2_events : [ wl_message ; 3 ] = [ wl_message { name : b"tablet_added\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_seat_v2_events_tablet_added_types as * const _ } , } , wl_message { name : b"tool_added\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_seat_v2_events_tool_added_types as * const _ } , } , wl_message { name : b"pad_added\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_seat_v2_events_pad_added_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_seat_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_seat_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_tablet_seat_v2_requests as * const _ } , event_count : 3 , events : unsafe { & zwp_tablet_seat_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_seat_v2_listener { # [ doc = "new device notification\n\nThis event is sent whenever a new tablet becomes available on this\nseat. This event only provides the object id of the tablet, any\nstatic information about the tablet (device name, vid/pid, etc.) is\nsent through the wp_tablet interface." ] fn tablet_added ( & mut self , object : * mut zwp_tablet_seat_v2 , id : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 ) { } # [ doc = "a new tool has been used with a tablet\n\nThis event is sent whenever a tool that has not previously been used\nwith a tablet comes into use. This event only provides the object id\nof the tool; any static information about the tool (capabilities,\ntype, etc.) is sent through the wp_tablet_tool interface." ] fn tool_added ( & mut self , object : * mut zwp_tablet_seat_v2 , id : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 ) { } # [ doc = "new pad notification\n\nThis event is sent whenever a new pad is known to the system. Typically,\npads are physically attached to tablets and a pad_added event is\nsent immediately after the wp_tablet_seat.tablet_added.\nHowever, some standalone pad devices logically attach to tablets at\nruntime, and the client must wait for wp_tablet_pad.enter to know\nthe tablet a pad is attached to.\n\nThis event only provides the object id of the pad. All further\nfeatures (buttons, strips, rings) are sent through the wp_tablet_pad\ninterface." ] fn pad_added ( & mut self , object : * mut zwp_tablet_seat_v2 , id : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 ) { } } pub unsafe fn zwp_tablet_seat_v2_set_user_data ( zwp_tablet_seat_v2 : * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_seat_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_seat_v2_get_user_data ( zwp_tablet_seat_v2 : * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_seat_v2 as _ ) ; } pub unsafe fn zwp_tablet_seat_v2_get_version ( zwp_tablet_seat_v2 : * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_seat_v2 as _ ) ; } pub unsafe fn zwp_tablet_seat_v2_add_listener ( zwp_tablet_seat_v2 : * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_seat_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_seat_v2_add_rust_listener ( zwp_tablet_seat_v2 : * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 , listener : & dyn zwp_tablet_seat_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_seat_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_seat_v2_add_listener ( zwp_tablet_seat_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "release the memory for the tablet seat object\n\nDestroy the wp_tablet_seat object. Objects created from this\nobject are unaffected and should be destroyed separately." ] pub unsafe fn zwp_tablet_seat_v2_destroy ( zwp_tablet_seat_v2 : * mut super :: zwp_tablet_seat_v2 :: zwp_tablet_seat_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_seat_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_seat_v2 as _ ) ; } } # [ doc = "a physical tablet tool\n\nAn object that represents a physical tool that has been, or is\ncurrently in use with a tablet in this seat. Each wp_tablet_tool\nobject stays valid until the client destroys it; the compositor\nreuses the wp_tablet_tool object to indicate that the object's\nrespective physical tool has come into proximity of a tablet again.\n\nA wp_tablet_tool object's relation to a physical tool depends on the\ntablet's ability to report serial numbers. If the tablet supports\nthis capability, then the object represents a specific physical tool\nand can be identified even when used on multiple tablets.\n\nA tablet tool has a number of static characteristics, e.g. tool type,\nhardware_serial and capabilities. These capabilities are sent in an\nevent sequence after the wp_tablet_seat.tool_added event before any\nactual events from this tool. This initial event sequence is\nterminated by a wp_tablet_tool.done event.\n\nTablet tool events are grouped by wp_tablet_tool.frame events.\nAny events received before a wp_tablet_tool.frame event should be\nconsidered part of the same hardware state change." ] pub mod zwp_tablet_tool_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_tool_v2 { } # [ doc = "a physical tool type\n\nDescribes the physical type of a tool. The physical type of a tool\ngenerally defines its base usage.\n\nThe mouse tool represents a mouse-shaped tool that is not a relative\ndevice but bound to the tablet's surface, providing absolute\ncoordinates.\n\nThe lens tool is a mouse-shaped tool with an attached lens to\nprovide precision focus." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum _type { # [ doc = "Pen" ] pen = 320 , # [ doc = "Eraser" ] eraser = 321 , # [ doc = "Brush" ] brush = 322 , # [ doc = "Pencil" ] pencil = 323 , # [ doc = "Airbrush" ] airbrush = 324 , # [ doc = "Finger" ] finger = 325 , # [ doc = "Mouse" ] mouse = 326 , # [ doc = "Lens" ] lens = 327 , # [ doc ( hidden ) ] __nonexhaustive , } impl _type { pub fn from_raw ( n : u32 ) -> Option < _type > { match n { 320 => Some ( _type :: pen ) , 321 => Some ( _type :: eraser ) , 322 => Some ( _type :: brush ) , 323 => Some ( _type :: pencil ) , 324 => Some ( _type :: airbrush ) , 325 => Some ( _type :: finger ) , 326 => Some ( _type :: mouse ) , 327 => Some ( _type :: lens ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "capability flags for a tool\n\nDescribes extra capabilities on a tablet.\n\nAny tool must provide x and y values, extra axes are\ndevice-specific." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum capability { # [ doc = "Tilt axes" ] tilt = 1 , # [ doc = "Pressure axis" ] pressure = 2 , # [ doc = "Distance axis" ] distance = 3 , # [ doc = "Z-rotation axis" ] rotation = 4 , # [ doc = "Slider axis" ] slider = 5 , # [ doc = "Wheel axis" ] wheel = 6 , # [ doc ( hidden ) ] __nonexhaustive , } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { match n { 1 => Some ( capability :: tilt ) , 2 => Some ( capability :: pressure ) , 3 => Some ( capability :: distance ) , 4 => Some ( capability :: rotation ) , 5 => Some ( capability :: slider ) , 6 => Some ( capability :: wheel ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "physical button state\n\nDescribes the physical state of a button that produced the button event." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum button_state { # [ doc = "button is not pressed" ] released = 0 , # [ doc = "button is pressed" ] pressed = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl button_state { pub fn from_raw ( n : u32 ) -> Option < button_state > { match n { 0 => Some ( button_state :: released ) , 1 => Some ( button_state :: pressed ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_tablet_tool_v2_requests_set_cursor_types : [ * const wl_interface ; 4 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_tool_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_cursor\0" as * const u8 as * const c_char , signature : b"u?oii\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_tool_v2_requests_set_cursor_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_tablet_tool_v2_events_proximity_in_types : [ * const wl_interface ; 3 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: zwp_tablet_v2 :: zwp_tablet_v2_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_tool_v2_events : [ wl_message ; 19 ] = [ wl_message { name : b"type\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hardware_serial\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hardware_id_wacom\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capability\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"proximity_in\0" as * const u8 as * const c_char , signature : b"uoo\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_tool_v2_events_proximity_in_types as * const _ } , } , wl_message { name : b"proximity_out\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"down\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"up\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"motion\0" as * const u8 as * const c_char , signature : b"ff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"pressure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"distance\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"tilt\0" as * const u8 as * const c_char , signature : b"ff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"rotation\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"slider\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"wheel\0" as * const u8 as * const c_char , signature : b"fi\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"button\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_tool_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_tool_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_tool_v2_requests as * const _ } , event_count : 19 , events : unsafe { & zwp_tablet_tool_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_tool_v2_listener { # [ doc = "tool type\n\nThe tool type is the high-level type of the tool and usually decides\nthe interaction expected from this tool.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn _type ( & mut self , object : * mut zwp_tablet_tool_v2 , tool_type : _type ) { } # [ doc = "unique hardware serial number of the tool\n\nIf the physical tool can be identified by a unique 64-bit serial\nnumber, this event notifies the client of this serial number.\n\nIf multiple tablets are available in the same seat and the tool is\nuniquely identifiable by the serial number, that tool may move\nbetween tablets.\n\nOtherwise, if the tool has no serial number and this event is\nmissing, the tool is tied to the tablet it first comes into\nproximity with. Even if the physical tool is used on multiple\ntablets, separate wp_tablet_tool objects will be created, one per\ntablet.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn hardware_serial ( & mut self , object : * mut zwp_tablet_tool_v2 , hardware_serial_hi : u32 , hardware_serial_lo : u32 ) { } # [ doc = "hardware id notification in Wacom's format\n\nThis event notifies the client of a hardware id available on this tool.\n\nThe hardware id is a device-specific 64-bit id that provides extra\ninformation about the tool in use, beyond the wl_tool.type\nenumeration. The format of the id is specific to tablets made by\nWacom Inc. For example, the hardware id of a Wacom Grip\nPen (a stylus) is 0x802.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn hardware_id_wacom ( & mut self , object : * mut zwp_tablet_tool_v2 , hardware_id_hi : u32 , hardware_id_lo : u32 ) { } # [ doc = "tool capability notification\n\nThis event notifies the client of any capabilities of this tool,\nbeyond the main set of x/y axes and tip up/down detection.\n\nOne event is sent for each extra capability available on this tool.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_tool.done event." ] fn capability ( & mut self , object : * mut zwp_tablet_tool_v2 , capability : capability ) { } # [ doc = "tool description events sequence complete\n\nThis event signals the end of the initial burst of descriptive\nevents. A client may consider the static description of the tool to\nbe complete and finalize initialization of the tool." ] fn done ( & mut self , object : * mut zwp_tablet_tool_v2 , ) { } # [ doc = "tool removed\n\nThis event is sent when the tool is removed from the system and will\nsend no further events. Should the physical tool come back into\nproximity later, a new wp_tablet_tool object will be created.\n\nIt is compositor-dependent when a tool is removed. A compositor may\nremove a tool on proximity out, tablet removal or any other reason.\nA compositor may also keep a tool alive until shutdown.\n\nIf the tool is currently in proximity, a proximity_out event will be\nsent before the removed event. See wp_tablet_tool.proximity_out for\nthe handling of any buttons logically down.\n\nWhen this event is received, the client must wp_tablet_tool.destroy\nthe object." ] fn removed ( & mut self , object : * mut zwp_tablet_tool_v2 , ) { } # [ doc = "proximity in event\n\nNotification that this tool is focused on a certain surface.\n\nThis event can be received when the tool has moved from one surface to\nanother, or when the tool has come back into proximity above the\nsurface.\n\nIf any button is logically down when the tool comes into proximity,\nthe respective button event is sent after the proximity_in event but\nwithin the same frame as the proximity_in event." ] fn proximity_in ( & mut self , object : * mut zwp_tablet_tool_v2 , serial : u32 , tablet : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "proximity out event\n\nNotification that this tool has either left proximity, or is no\nlonger focused on a certain surface.\n\nWhen the tablet tool leaves proximity of the tablet, button release\nevents are sent for each button that was held down at the time of\nleaving proximity. These events are sent before the proximity_out\nevent but within the same wp_tablet.frame.\n\nIf the tool stays within proximity of the tablet, but the focus\nchanges from one surface to another, a button release event may not\nbe sent until the button is actually released or the tool leaves the\nproximity of the tablet." ] fn proximity_out ( & mut self , object : * mut zwp_tablet_tool_v2 , ) { } # [ doc = "tablet tool is making contact\n\nSent whenever the tablet tool comes in contact with the surface of the\ntablet.\n\nIf the tool is already in contact with the tablet when entering the\ninput region, the client owning said region will receive a\nwp_tablet.proximity_in event, followed by a wp_tablet.down\nevent and a wp_tablet.frame event.\n\nNote that this event describes logical contact, not physical\ncontact. On some devices, a compositor may not consider a tool in\nlogical contact until a minimum physical pressure threshold is\nexceeded." ] fn down ( & mut self , object : * mut zwp_tablet_tool_v2 , serial : u32 ) { } # [ doc = "tablet tool is no longer making contact\n\nSent whenever the tablet tool stops making contact with the surface of\nthe tablet, or when the tablet tool moves out of the input region\nand the compositor grab (if any) is dismissed.\n\nIf the tablet tool moves out of the input region while in contact\nwith the surface of the tablet and the compositor does not have an\nongoing grab on the surface, the client owning said region will\nreceive a wp_tablet.up event, followed by a wp_tablet.proximity_out\nevent and a wp_tablet.frame event. If the compositor has an ongoing\ngrab on this device, this event sequence is sent whenever the grab\nis dismissed in the future.\n\nNote that this event describes logical contact, not physical\ncontact. On some devices, a compositor may not consider a tool out\nof logical contact until physical pressure falls below a specific\nthreshold." ] fn up ( & mut self , object : * mut zwp_tablet_tool_v2 , ) { } # [ doc = "motion event\n\nSent whenever a tablet tool moves." ] fn motion ( & mut self , object : * mut zwp_tablet_tool_v2 , x : wl_fixed_t , y : wl_fixed_t ) { } # [ doc = "pressure change event\n\nSent whenever the pressure axis on a tool changes. The value of this\nevent is normalized to a value between 0 and 65535.\n\nNote that pressure may be nonzero even when a tool is not in logical\ncontact. See the down and up events for more details." ] fn pressure ( & mut self , object : * mut zwp_tablet_tool_v2 , pressure : u32 ) { } # [ doc = "distance change event\n\nSent whenever the distance axis on a tool changes. The value of this\nevent is normalized to a value between 0 and 65535.\n\nNote that distance may be nonzero even when a tool is not in logical\ncontact. See the down and up events for more details." ] fn distance ( & mut self , object : * mut zwp_tablet_tool_v2 , distance : u32 ) { } # [ doc = "tilt change event\n\nSent whenever one or both of the tilt axes on a tool change. Each tilt\nvalue is in degrees, relative to the z-axis of the tablet.\nThe angle is positive when the top of a tool tilts along the\npositive x or y axis." ] fn tilt ( & mut self , object : * mut zwp_tablet_tool_v2 , tilt_x : wl_fixed_t , tilt_y : wl_fixed_t ) { } # [ doc = "z-rotation change event\n\nSent whenever the z-rotation axis on the tool changes. The\nrotation value is in degrees clockwise from the tool's\nlogical neutral position." ] fn rotation ( & mut self , object : * mut zwp_tablet_tool_v2 , degrees : wl_fixed_t ) { } # [ doc = "Slider position change event\n\nSent whenever the slider position on the tool changes. The\nvalue is normalized between -65535 and 65535, with 0 as the logical\nneutral position of the slider.\n\nThe slider is available on e.g. the Wacom Airbrush tool." ] fn slider ( & mut self , object : * mut zwp_tablet_tool_v2 , position : i32 ) { } # [ doc = "Wheel delta event\n\nSent whenever the wheel on the tool emits an event. This event\ncontains two values for the same axis change. The degrees value is\nin the same orientation as the wl_pointer.vertical_scroll axis. The\nclicks value is in discrete logical clicks of the mouse wheel. This\nvalue may be zero if the movement of the wheel was less\nthan one logical click.\n\nClients should choose either value and avoid mixing degrees and\nclicks. The compositor may accumulate values smaller than a logical\nclick and emulate click events when a certain threshold is met.\nThus, wl_tablet_tool.wheel events with non-zero clicks values may\nhave different degrees values." ] fn wheel ( & mut self , object : * mut zwp_tablet_tool_v2 , degrees : wl_fixed_t , clicks : i32 ) { } # [ doc = "button event\n\nSent whenever a button on the tool is pressed or released.\n\nIf a button is held down when the tool moves in or out of proximity,\nbutton events are generated by the compositor. See\nwp_tablet_tool.proximity_in and wp_tablet_tool.proximity_out for\ndetails." ] fn button ( & mut self , object : * mut zwp_tablet_tool_v2 , serial : u32 , button : u32 , state : button_state ) { } # [ doc = "frame event\n\nMarks the end of a series of axis and/or button updates from the\ntablet. The Wayland protocol requires axis updates to be sent\nsequentially, however all events within a frame should be considered\none hardware event." ] fn frame ( & mut self , object : * mut zwp_tablet_tool_v2 , time : u32 ) { } } pub unsafe fn zwp_tablet_tool_v2_set_user_data ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_tool_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_tool_v2_get_user_data ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_tool_v2 as _ ) ; } pub unsafe fn zwp_tablet_tool_v2_get_version ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_tool_v2 as _ ) ; } pub unsafe fn zwp_tablet_tool_v2_add_listener ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_tool_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_tool_v2_add_rust_listener ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 , listener : & dyn zwp_tablet_tool_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_tool_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_tool_v2_add_listener ( zwp_tablet_tool_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "set the tablet tool's surface\n\nSets the surface of the cursor used for this tool on the given\ntablet. This request only takes effect if the tool is in proximity\nof one of the requesting client's surfaces or the surface parameter\nis the current pointer surface. If there was a previous surface set\nwith this request it is replaced. If surface is NULL, the cursor\nimage is hidden.\n\nThe parameters hotspot_x and hotspot_y define the position of the\npointer surface relative to the pointer location. Its top-left corner\nis always at (x, y) - (hotspot_x, hotspot_y), where (x, y) are the\ncoordinates of the pointer location, in surface-local coordinates.\n\nOn surface.attach requests to the pointer surface, hotspot_x and\nhotspot_y are decremented by the x and y parameters passed to the\nrequest. Attach must be confirmed by wl_surface.commit as usual.\n\nThe hotspot can also be updated by passing the currently set pointer\nsurface to this request with new values for hotspot_x and hotspot_y.\n\nThe current and pending input regions of the wl_surface are cleared,\nand wl_surface.set_input_region is ignored until the wl_surface is no\nlonger used as the cursor. When the use as a cursor ends, the current\nand pending input regions become undefined, and the wl_surface is\nunmapped.\n\nThis request gives the surface the role of a wp_tablet_tool cursor. A\nsurface may only ever be used as the cursor surface for one\nwp_tablet_tool. If the surface already has another role or has\npreviously been used as cursor surface for a different tool, a\nprotocol error is raised." ] pub unsafe fn zwp_tablet_tool_v2_set_cursor ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 , serial : u32 , surface : * mut super :: wl_surface :: wl_surface , hotspot_x : i32 , hotspot_y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_tool_v2 as _ , 0u32 , serial , surface , hotspot_x , hotspot_y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the tool object\n\nThis destroys the client's resource for this tool object." ] pub unsafe fn zwp_tablet_tool_v2_destroy ( zwp_tablet_tool_v2 : * mut super :: zwp_tablet_tool_v2 :: zwp_tablet_tool_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_tool_v2 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_tool_v2 as _ ) ; } } # [ doc = "graphics tablet device\n\nThe wp_tablet interface represents one graphics tablet device. The\ntablet interface itself does not generate events; all events are\ngenerated by wp_tablet_tool objects when in proximity above a tablet.\n\nA tablet has a number of static characteristics, e.g. device name and\npid/vid. These capabilities are sent in an event sequence after the\nwp_tablet_seat.tablet_added event. This initial event sequence is\nterminated by a wp_tablet.done event." ] pub mod zwp_tablet_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_v2 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_v2_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_v2_events : [ wl_message ; 5 ] = [ wl_message { name : b"name\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"id\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"path\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_tablet_v2_requests as * const _ } , event_count : 5 , events : unsafe { & zwp_tablet_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_v2_listener { # [ doc = "tablet device name\n\nThis event is sent in the initial burst of events before the\nwp_tablet.done event." ] fn name ( & mut self , object : * mut zwp_tablet_v2 , name : * mut c_char ) { } # [ doc = "tablet device USB vendor/product id\n\nThis event is sent in the initial burst of events before the\nwp_tablet.done event." ] fn id ( & mut self , object : * mut zwp_tablet_v2 , vid : u32 , pid : u32 ) { } # [ doc = "path to the device\n\nA system-specific device path that indicates which device is behind\nthis wp_tablet. This information may be used to gather additional\ninformation about the device, e.g. through libwacom.\n\nA device may have more than one device path. If so, multiple\nwp_tablet.path events are sent. A device may be emulated and not\nhave a device path, and in that case this event will not be sent.\n\nThe format of the path is unspecified, it may be a device node, a\nsysfs path, or some other identifier. It is up to the client to\nidentify the string provided.\n\nThis event is sent in the initial burst of events before the\nwp_tablet.done event." ] fn path ( & mut self , object : * mut zwp_tablet_v2 , path : * mut c_char ) { } # [ doc = "tablet description events sequence complete\n\nThis event is sent immediately to signal the end of the initial\nburst of descriptive events. A client may consider the static\ndescription of the tablet to be complete and finalize initialization\nof the tablet." ] fn done ( & mut self , object : * mut zwp_tablet_v2 , ) { } # [ doc = "tablet removed event\n\nSent when the tablet has been removed from the system. When a tablet\nis removed, some tools may be removed.\n\nWhen this event is received, the client must wp_tablet.destroy\nthe object." ] fn removed ( & mut self , object : * mut zwp_tablet_v2 , ) { } } pub unsafe fn zwp_tablet_v2_set_user_data ( zwp_tablet_v2 : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_v2_get_user_data ( zwp_tablet_v2 : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_v2 as _ ) ; } pub unsafe fn zwp_tablet_v2_get_version ( zwp_tablet_v2 : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_v2 as _ ) ; } pub unsafe fn zwp_tablet_v2_add_listener ( zwp_tablet_v2 : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_v2_add_rust_listener ( zwp_tablet_v2 : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 , listener : & dyn zwp_tablet_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_v2_add_listener ( zwp_tablet_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the tablet object\n\nThis destroys the client's resource for this tablet object." ] pub unsafe fn zwp_tablet_v2_destroy ( zwp_tablet_v2 : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_v2 as _ ) ; } } # [ doc = "pad ring\n\nA circular interaction area, such as the touch ring on the Wacom Intuos\nPro series tablets.\n\nEvents on a ring are logically grouped by the wl_tablet_pad_ring.frame\nevent." ] pub mod zwp_tablet_pad_ring_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_pad_ring_v2 { } # [ doc = "ring axis source\n\nDescribes the source types for ring events. This indicates to the\nclient how a ring event was physically generated; a client may\nadjust the user interface accordingly. For example, events\nfrom a \"finger\" source may trigger kinetic scrolling." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum source { # [ doc = "finger" ] finger = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl source { pub fn from_raw ( n : u32 ) -> Option < source > { match n { 1 => Some ( source :: finger ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_ring_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_feedback\0" as * const u8 as * const c_char , signature : b"su\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_ring_v2_events : [ wl_message ; 4 ] = [ wl_message { name : b"source\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"angle\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"stop\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_pad_ring_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_pad_ring_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_pad_ring_v2_requests as * const _ } , event_count : 4 , events : unsafe { & zwp_tablet_pad_ring_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_pad_ring_v2_listener { # [ doc = "ring event source\n\nSource information for ring events.\n\nThis event does not occur on its own. It is sent before a\nwp_tablet_pad_ring.frame event and carries the source information\nfor all events within that frame.\n\nThe source specifies how this event was generated. If the source is\nwp_tablet_pad_ring.source.finger, a wp_tablet_pad_ring.stop event\nwill be sent when the user lifts the finger off the device.\n\nThis event is optional. If the source is unknown for an interaction,\nno event is sent." ] fn source ( & mut self , object : * mut zwp_tablet_pad_ring_v2 , source : source ) { } # [ doc = "angle changed\n\nSent whenever the angle on a ring changes.\n\nThe angle is provided in degrees clockwise from the logical\nnorth of the ring in the pad's current rotation." ] fn angle ( & mut self , object : * mut zwp_tablet_pad_ring_v2 , degrees : wl_fixed_t ) { } # [ doc = "interaction stopped\n\nStop notification for ring events.\n\nFor some wp_tablet_pad_ring.source types, a wp_tablet_pad_ring.stop\nevent is sent to notify a client that the interaction with the ring\nhas terminated. This enables the client to implement kinetic scrolling.\nSee the wp_tablet_pad_ring.source documentation for information on\nwhen this event may be generated.\n\nAny wp_tablet_pad_ring.angle events with the same source after this\nevent should be considered as the start of a new interaction." ] fn stop ( & mut self , object : * mut zwp_tablet_pad_ring_v2 , ) { } # [ doc = "end of a ring event sequence\n\nIndicates the end of a set of ring events that logically belong\ntogether. A client is expected to accumulate the data in all events\nwithin the frame before proceeding.\n\nAll wp_tablet_pad_ring events before a wp_tablet_pad_ring.frame event belong\nlogically together. For example, on termination of a finger interaction\non a ring the compositor will send a wp_tablet_pad_ring.source event,\na wp_tablet_pad_ring.stop event and a wp_tablet_pad_ring.frame event.\n\nA wp_tablet_pad_ring.frame event is sent for every logical event\ngroup, even if the group only contains a single wp_tablet_pad_ring\nevent. Specifically, a client may get a sequence: angle, frame,\nangle, frame, etc." ] fn frame ( & mut self , object : * mut zwp_tablet_pad_ring_v2 , time : u32 ) { } } pub unsafe fn zwp_tablet_pad_ring_v2_set_user_data ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_pad_ring_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_pad_ring_v2_get_user_data ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_pad_ring_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_ring_v2_get_version ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_pad_ring_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_ring_v2_add_listener ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_pad_ring_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_pad_ring_v2_add_rust_listener ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 , listener : & dyn zwp_tablet_pad_ring_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_pad_ring_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_pad_ring_v2_add_listener ( zwp_tablet_pad_ring_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "set compositor feedback\n\nRequest that the compositor use the provided feedback string\nassociated with this ring. This request should be issued immediately\nafter a wp_tablet_pad_group.mode_switch event from the corresponding\ngroup is received, or whenever the ring is mapped to a different\naction. See wp_tablet_pad_group.mode_switch for more details.\n\nClients are encouraged to provide context-aware descriptions for\nthe actions associated with the ring; compositors may use this\ninformation to offer visual feedback about the button layout\n(eg. on-screen displays).\n\nThe provided string 'description' is a UTF-8 encoded string to be\nassociated with this ring, and is considered user-visible; general\ninternationalization rules apply.\n\nThe serial argument will be that of the last\nwp_tablet_pad_group.mode_switch event received for the group of this\nring. Requests providing other serials than the most recent one will be\nignored." ] pub unsafe fn zwp_tablet_pad_ring_v2_set_feedback ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 , description : * const c_char , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_ring_v2 as _ , 0u32 , description , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the ring object\n\nThis destroys the client's resource for this ring object." ] pub unsafe fn zwp_tablet_pad_ring_v2_destroy ( zwp_tablet_pad_ring_v2 : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_ring_v2 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_pad_ring_v2 as _ ) ; } } # [ doc = "pad strip\n\nA linear interaction area, such as the strips found in Wacom Cintiq\nmodels.\n\nEvents on a strip are logically grouped by the wl_tablet_pad_strip.frame\nevent." ] pub mod zwp_tablet_pad_strip_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_pad_strip_v2 { } # [ doc = "strip axis source\n\nDescribes the source types for strip events. This indicates to the\nclient how a strip event was physically generated; a client may\nadjust the user interface accordingly. For example, events\nfrom a \"finger\" source may trigger kinetic scrolling." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum source { # [ doc = "finger" ] finger = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl source { pub fn from_raw ( n : u32 ) -> Option < source > { match n { 1 => Some ( source :: finger ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_strip_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_feedback\0" as * const u8 as * const c_char , signature : b"su\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_strip_v2_events : [ wl_message ; 4 ] = [ wl_message { name : b"source\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"position\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"stop\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"frame\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_pad_strip_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_pad_strip_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_pad_strip_v2_requests as * const _ } , event_count : 4 , events : unsafe { & zwp_tablet_pad_strip_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_pad_strip_v2_listener { # [ doc = "strip event source\n\nSource information for strip events.\n\nThis event does not occur on its own. It is sent before a\nwp_tablet_pad_strip.frame event and carries the source information\nfor all events within that frame.\n\nThe source specifies how this event was generated. If the source is\nwp_tablet_pad_strip.source.finger, a wp_tablet_pad_strip.stop event\nwill be sent when the user lifts their finger off the device.\n\nThis event is optional. If the source is unknown for an interaction,\nno event is sent." ] fn source ( & mut self , object : * mut zwp_tablet_pad_strip_v2 , source : source ) { } # [ doc = "position changed\n\nSent whenever the position on a strip changes.\n\nThe position is normalized to a range of [0, 65535], the 0-value\nrepresents the top-most and/or left-most position of the strip in\nthe pad's current rotation." ] fn position ( & mut self , object : * mut zwp_tablet_pad_strip_v2 , position : u32 ) { } # [ doc = "interaction stopped\n\nStop notification for strip events.\n\nFor some wp_tablet_pad_strip.source types, a wp_tablet_pad_strip.stop\nevent is sent to notify a client that the interaction with the strip\nhas terminated. This enables the client to implement kinetic\nscrolling. See the wp_tablet_pad_strip.source documentation for\ninformation on when this event may be generated.\n\nAny wp_tablet_pad_strip.position events with the same source after this\nevent should be considered as the start of a new interaction." ] fn stop ( & mut self , object : * mut zwp_tablet_pad_strip_v2 , ) { } # [ doc = "end of a strip event sequence\n\nIndicates the end of a set of events that represent one logical\nhardware strip event. A client is expected to accumulate the data\nin all events within the frame before proceeding.\n\nAll wp_tablet_pad_strip events before a wp_tablet_pad_strip.frame event belong\nlogically together. For example, on termination of a finger interaction\non a strip the compositor will send a wp_tablet_pad_strip.source event,\na wp_tablet_pad_strip.stop event and a wp_tablet_pad_strip.frame\nevent.\n\nA wp_tablet_pad_strip.frame event is sent for every logical event\ngroup, even if the group only contains a single wp_tablet_pad_strip\nevent. Specifically, a client may get a sequence: position, frame,\nposition, frame, etc." ] fn frame ( & mut self , object : * mut zwp_tablet_pad_strip_v2 , time : u32 ) { } } pub unsafe fn zwp_tablet_pad_strip_v2_set_user_data ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_pad_strip_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_pad_strip_v2_get_user_data ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_pad_strip_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_strip_v2_get_version ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_pad_strip_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_strip_v2_add_listener ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_pad_strip_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_pad_strip_v2_add_rust_listener ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 , listener : & dyn zwp_tablet_pad_strip_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_pad_strip_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_pad_strip_v2_add_listener ( zwp_tablet_pad_strip_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "set compositor feedback\n\nRequests the compositor to use the provided feedback string\nassociated with this strip. This request should be issued immediately\nafter a wp_tablet_pad_group.mode_switch event from the corresponding\ngroup is received, or whenever the strip is mapped to a different\naction. See wp_tablet_pad_group.mode_switch for more details.\n\nClients are encouraged to provide context-aware descriptions for\nthe actions associated with the strip, and compositors may use this\ninformation to offer visual feedback about the button layout\n(eg. on-screen displays).\n\nThe provided string 'description' is a UTF-8 encoded string to be\nassociated with this ring, and is considered user-visible; general\ninternationalization rules apply.\n\nThe serial argument will be that of the last\nwp_tablet_pad_group.mode_switch event received for the group of this\nstrip. Requests providing other serials than the most recent one will be\nignored." ] pub unsafe fn zwp_tablet_pad_strip_v2_set_feedback ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 , description : * const c_char , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_strip_v2 as _ , 0u32 , description , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the strip object\n\nThis destroys the client's resource for this strip object." ] pub unsafe fn zwp_tablet_pad_strip_v2_destroy ( zwp_tablet_pad_strip_v2 : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_strip_v2 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_pad_strip_v2 as _ ) ; } } # [ doc = "a set of buttons, rings and strips\n\nA pad group describes a distinct (sub)set of buttons, rings and strips\npresent in the tablet. The criteria of this grouping is usually positional,\neg. if a tablet has buttons on the left and right side, 2 groups will be\npresented. The physical arrangement of groups is undisclosed and may\nchange on the fly.\n\nPad groups will announce their features during pad initialization. Between\nthe corresponding wp_tablet_pad.group event and wp_tablet_pad_group.done, the\npad group will announce the buttons, rings and strips contained in it,\nplus the number of supported modes.\n\nModes are a mechanism to allow multiple groups of actions for every element\nin the pad group. The number of groups and available modes in each is\npersistent across device plugs. The current mode is user-switchable, it\nwill be announced through the wp_tablet_pad_group.mode_switch event both\nwhenever it is switched, and after wp_tablet_pad.enter.\n\nThe current mode logically applies to all elements in the pad group,\nalthough it is at clients' discretion whether to actually perform different\nactions, and/or issue the respective .set_feedback requests to notify the\ncompositor. See the wp_tablet_pad_group.mode_switch event for more details." ] pub mod zwp_tablet_pad_group_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_pad_group_v2 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_group_v2_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_tablet_pad_group_v2_events_ring_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2_interface as * const wl_interface } , ] ; static mut zwp_tablet_pad_group_v2_events_strip_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_group_v2_events : [ wl_message ; 6 ] = [ wl_message { name : b"buttons\0" as * const u8 as * const c_char , signature : b"a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"ring\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_pad_group_v2_events_ring_types as * const _ } , } , wl_message { name : b"strip\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_pad_group_v2_events_strip_types as * const _ } , } , wl_message { name : b"modes\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"mode_switch\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_pad_group_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_pad_group_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_tablet_pad_group_v2_requests as * const _ } , event_count : 6 , events : unsafe { & zwp_tablet_pad_group_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_pad_group_v2_listener { # [ doc = "buttons announced\n\nSent on wp_tablet_pad_group initialization to announce the available\nbuttons in the group. Button indices start at 0, a button may only be\nin one group at a time.\n\nThis event is first sent in the initial burst of events before the\nwp_tablet_pad_group.done event.\n\nSome buttons are reserved by the compositor. These buttons may not be\nassigned to any wp_tablet_pad_group. Compositors may broadcast this\nevent in the case of changes to the mapping of these reserved buttons.\nIf the compositor happens to reserve all buttons in a group, this event\nwill be sent with an empty array." ] fn buttons ( & mut self , object : * mut zwp_tablet_pad_group_v2 , buttons : * mut wl_array ) { } # [ doc = "ring announced\n\nSent on wp_tablet_pad_group initialization to announce available rings.\nOne event is sent for each ring available on this pad group.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_pad_group.done event." ] fn ring ( & mut self , object : * mut zwp_tablet_pad_group_v2 , ring : * mut super :: zwp_tablet_pad_ring_v2 :: zwp_tablet_pad_ring_v2 ) { } # [ doc = "strip announced\n\nSent on wp_tablet_pad initialization to announce available strips.\nOne event is sent for each strip available on this pad group.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_pad_group.done event." ] fn strip ( & mut self , object : * mut zwp_tablet_pad_group_v2 , strip : * mut super :: zwp_tablet_pad_strip_v2 :: zwp_tablet_pad_strip_v2 ) { } # [ doc = "mode-switch ability announced\n\nSent on wp_tablet_pad_group initialization to announce that the pad\ngroup may switch between modes. A client may use a mode to store a\nspecific configuration for buttons, rings and strips and use the\nwl_tablet_pad_group.mode_switch event to toggle between these\nconfigurations. Mode indices start at 0.\n\nSwitching modes is compositor-dependent. See the\nwp_tablet_pad_group.mode_switch event for more details.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_pad_group.done event. This event is only sent when more than\nmore than one mode is available." ] fn modes ( & mut self , object : * mut zwp_tablet_pad_group_v2 , modes : u32 ) { } # [ doc = "tablet group description events sequence complete\n\nThis event is sent immediately to signal the end of the initial\nburst of descriptive events. A client may consider the static\ndescription of the tablet to be complete and finalize initialization\nof the tablet group." ] fn done ( & mut self , object : * mut zwp_tablet_pad_group_v2 , ) { } # [ doc = "mode switch event\n\nNotification that the mode was switched.\n\nA mode applies to all buttons, rings and strips in a group\nsimultaneously, but a client is not required to assign different actions\nfor each mode. For example, a client may have mode-specific button\nmappings but map the ring to vertical scrolling in all modes. Mode\nindices start at 0.\n\nSwitching modes is compositor-dependent. The compositor may provide\nvisual cues to the client about the mode, e.g. by toggling LEDs on\nthe tablet device. Mode-switching may be software-controlled or\ncontrolled by one or more physical buttons. For example, on a Wacom\nIntuos Pro, the button inside the ring may be assigned to switch\nbetween modes.\n\nThe compositor will also send this event after wp_tablet_pad.enter on\neach group in order to notify of the current mode. Groups that only\nfeature one mode will use mode=0 when emitting this event.\n\nIf a button action in the new mode differs from the action in the\nprevious mode, the client should immediately issue a\nwp_tablet_pad.set_feedback request for each changed button.\n\nIf a ring or strip action in the new mode differs from the action\nin the previous mode, the client should immediately issue a\nwp_tablet_ring.set_feedback or wp_tablet_strip.set_feedback request\nfor each changed ring or strip." ] fn mode_switch ( & mut self , object : * mut zwp_tablet_pad_group_v2 , time : u32 , serial : u32 , mode : u32 ) { } } pub unsafe fn zwp_tablet_pad_group_v2_set_user_data ( zwp_tablet_pad_group_v2 : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_pad_group_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_pad_group_v2_get_user_data ( zwp_tablet_pad_group_v2 : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_pad_group_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_group_v2_get_version ( zwp_tablet_pad_group_v2 : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_pad_group_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_group_v2_add_listener ( zwp_tablet_pad_group_v2 : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_pad_group_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_pad_group_v2_add_rust_listener ( zwp_tablet_pad_group_v2 : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 , listener : & dyn zwp_tablet_pad_group_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_pad_group_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_pad_group_v2_add_listener ( zwp_tablet_pad_group_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the pad object\n\nDestroy the wp_tablet_pad_group object. Objects created from this object\nare unaffected and should be destroyed separately." ] pub unsafe fn zwp_tablet_pad_group_v2_destroy ( zwp_tablet_pad_group_v2 : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_group_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_pad_group_v2 as _ ) ; } } # [ doc = "a set of buttons, rings and strips\n\nA pad device is a set of buttons, rings and strips\nusually physically present on the tablet device itself. Some\nexceptions exist where the pad device is physically detached, e.g. the\nWacom ExpressKey Remote.\n\nPad devices have no axes that control the cursor and are generally\nauxiliary devices to the tool devices used on the tablet surface.\n\nA pad device has a number of static characteristics, e.g. the number\nof rings. These capabilities are sent in an event sequence after the\nwp_tablet_seat.pad_added event before any actual events from this pad.\nThis initial event sequence is terminated by a wp_tablet_pad.done\nevent.\n\nAll pad features (buttons, rings and strips) are logically divided into\ngroups and all pads have at least one group. The available groups are\nnotified through the wp_tablet_pad.group event; the compositor will\nemit one event per group before emitting wp_tablet_pad.done.\n\nGroups may have multiple modes. Modes allow clients to map multiple\nactions to a single pad feature. Only one mode can be active per group,\nalthough different groups may have different active modes." ] pub mod zwp_tablet_pad_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_tablet_pad_v2 { } # [ doc = "physical button state\n\nDescribes the physical state of a button that caused the button\nevent." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum button_state { # [ doc = "the button is not pressed" ] released = 0 , # [ doc = "the button is pressed" ] pressed = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl button_state { pub fn from_raw ( n : u32 ) -> Option < button_state > { match n { 0 => Some ( button_state :: released ) , 1 => Some ( button_state :: pressed ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_feedback\0" as * const u8 as * const c_char , signature : b"usu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_tablet_pad_v2_events_group_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2_interface as * const wl_interface } , ] ; static mut zwp_tablet_pad_v2_events_enter_types : [ * const wl_interface ; 3 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: zwp_tablet_v2 :: zwp_tablet_v2_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut zwp_tablet_pad_v2_events_leave_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_tablet_pad_v2_events : [ wl_message ; 8 ] = [ wl_message { name : b"group\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_pad_v2_events_group_types as * const _ } , } , wl_message { name : b"path\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"buttons\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"button\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"uoo\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_pad_v2_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"uo\0" as * const u8 as * const c_char , types : unsafe { & zwp_tablet_pad_v2_events_leave_types as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_tablet_pad_v2_interface : wl_interface = wl_interface { name : b"zwp_tablet_pad_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_tablet_pad_v2_requests as * const _ } , event_count : 8 , events : unsafe { & zwp_tablet_pad_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_tablet_pad_v2_listener { # [ doc = "group announced\n\nSent on wp_tablet_pad initialization to announce available groups.\nOne event is sent for each pad group available.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_pad.done event. At least one group will be announced." ] fn group ( & mut self , object : * mut zwp_tablet_pad_v2 , pad_group : * mut super :: zwp_tablet_pad_group_v2 :: zwp_tablet_pad_group_v2 ) { } # [ doc = "path to the device\n\nA system-specific device path that indicates which device is behind\nthis wp_tablet_pad. This information may be used to gather additional\ninformation about the device, e.g. through libwacom.\n\nThe format of the path is unspecified, it may be a device node, a\nsysfs path, or some other identifier. It is up to the client to\nidentify the string provided.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_pad.done event." ] fn path ( & mut self , object : * mut zwp_tablet_pad_v2 , path : * mut c_char ) { } # [ doc = "buttons announced\n\nSent on wp_tablet_pad initialization to announce the available\nbuttons.\n\nThis event is sent in the initial burst of events before the\nwp_tablet_pad.done event. This event is only sent when at least one\nbutton is available." ] fn buttons ( & mut self , object : * mut zwp_tablet_pad_v2 , buttons : u32 ) { } # [ doc = "pad description event sequence complete\n\nThis event signals the end of the initial burst of descriptive\nevents. A client may consider the static description of the pad to\nbe complete and finalize initialization of the pad." ] fn done ( & mut self , object : * mut zwp_tablet_pad_v2 , ) { } # [ doc = "physical button state\n\nSent whenever the physical state of a button changes." ] fn button ( & mut self , object : * mut zwp_tablet_pad_v2 , time : u32 , button : u32 , state : button_state ) { } # [ doc = "enter event\n\nNotification that this pad is focused on the specified surface." ] fn enter ( & mut self , object : * mut zwp_tablet_pad_v2 , serial : u32 , tablet : * mut super :: zwp_tablet_v2 :: zwp_tablet_v2 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "enter event\n\nNotification that this pad is no longer focused on the specified\nsurface." ] fn leave ( & mut self , object : * mut zwp_tablet_pad_v2 , serial : u32 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "pad removed event\n\nSent when the pad has been removed from the system. When a tablet\nis removed its pad(s) will be removed too.\n\nWhen this event is received, the client must destroy all rings, strips\nand groups that were offered by this pad, and issue wp_tablet_pad.destroy\nthe pad itself." ] fn removed ( & mut self , object : * mut zwp_tablet_pad_v2 , ) { } } pub unsafe fn zwp_tablet_pad_v2_set_user_data ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_tablet_pad_v2 as _ , user_data ) ; } pub unsafe fn zwp_tablet_pad_v2_get_user_data ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_tablet_pad_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_v2_get_version ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_tablet_pad_v2 as _ ) ; } pub unsafe fn zwp_tablet_pad_v2_add_listener ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_tablet_pad_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_tablet_pad_v2_add_rust_listener ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 , listener : & dyn zwp_tablet_pad_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_tablet_pad_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_tablet_pad_v2_add_listener ( zwp_tablet_pad_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "set compositor feedback\n\nRequests the compositor to use the provided feedback string\nassociated with this button. This request should be issued immediately\nafter a wp_tablet_pad_group.mode_switch event from the corresponding\ngroup is received, or whenever a button is mapped to a different\naction. See wp_tablet_pad_group.mode_switch for more details.\n\nClients are encouraged to provide context-aware descriptions for\nthe actions associated with each button, and compositors may use\nthis information to offer visual feedback on the button layout\n(e.g. on-screen displays).\n\nButton indices start at 0. Setting the feedback string on a button\nthat is reserved by the compositor (i.e. not belonging to any\nwp_tablet_pad_group) does not generate an error but the compositor\nis free to ignore the request.\n\nThe provided string 'description' is a UTF-8 encoded string to be\nassociated with this ring, and is considered user-visible; general\ninternationalization rules apply.\n\nThe serial argument will be that of the last\nwp_tablet_pad_group.mode_switch event received for the group of this\nbutton. Requests providing other serials than the most recent one will\nbe ignored." ] pub unsafe fn zwp_tablet_pad_v2_set_feedback ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 , button : u32 , description : * const c_char , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_v2 as _ , 0u32 , button , description , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the pad object\n\nDestroy the wp_tablet_pad object. Objects created from this object\nare unaffected and should be destroyed separately." ] pub unsafe fn zwp_tablet_pad_v2_destroy ( zwp_tablet_pad_v2 : * mut super :: zwp_tablet_pad_v2 :: zwp_tablet_pad_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_tablet_pad_v2 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_tablet_pad_v2 as _ ) ; } } } pub mod wl_eglstream_controller { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod wl_eglstream_controller { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_eglstream_controller { } # [ doc = "Stream present mode\n\n- dont_care: Using this enum will tell the server to make its own\ndecisions regarding present mode.\n\n- fifo: Tells the server to use a fifo present mode. The decision to\nuse fifo synchronous is left up to the server.\n\n- mailbox: Tells the server to use a mailbox present mode." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum present_mode { # [ doc = "Let the Server decide present mode" ] dont_care = 0 , # [ doc = "Use a fifo present mode" ] fifo = 1 , # [ doc = "Use a mailbox mode" ] mailbox = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl present_mode { pub fn from_raw ( n : u32 ) -> Option < present_mode > { match n { 0 => Some ( present_mode :: dont_care ) , 1 => Some ( present_mode :: fifo ) , 2 => Some ( present_mode :: mailbox ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "Stream consumer attachment attributes\n\n- present_mode: Must be one of wl_eglstream_controller_present_mode. Tells the\nserver the desired present mode that should be used.\n\n- fifo_length: Only valid when the present_mode attrib is provided and its\nvalue is specified as fifo. Tells the server the desired fifo\nlength to be used when the desired present_mode is fifo." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum attrib { # [ doc = "Tells the server the desired present mode" ] present_mode = 0 , # [ doc = "Tells the server the desired fifo length when the desired presenation_mode is fifo." ] fifo_length = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl attrib { pub fn from_raw ( n : u32 ) -> Option < attrib > { match n { 0 => Some ( attrib :: present_mode ) , 1 => Some ( attrib :: fifo_length ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_eglstream_controller_requests_attach_eglstream_consumer_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; static mut wl_eglstream_controller_requests_attach_eglstream_consumer_attribs_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_eglstream_controller_requests : [ wl_message ; 2 ] = [ wl_message { name : b"attach_eglstream_consumer\0" as * const u8 as * const c_char , signature : b"oo\0" as * const u8 as * const c_char , types : unsafe { & wl_eglstream_controller_requests_attach_eglstream_consumer_types as * const _ } , } , wl_message { name : b"attach_eglstream_consumer_attribs\0" as * const u8 as * const c_char , signature : b"2ooa\0" as * const u8 as * const c_char , types : unsafe { & wl_eglstream_controller_requests_attach_eglstream_consumer_attribs_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_eglstream_controller_interface : wl_interface = wl_interface { name : b"wl_eglstream_controller\0" as * const u8 as * const c_char , version : 2 , request_count : 2 , requests : unsafe { & wl_eglstream_controller_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_eglstream_controller_listener { } pub unsafe fn wl_eglstream_controller_set_user_data ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_eglstream_controller as _ , user_data ) ; } pub unsafe fn wl_eglstream_controller_get_user_data ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_eglstream_controller as _ ) ; } pub unsafe fn wl_eglstream_controller_get_version ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_eglstream_controller as _ ) ; } pub unsafe fn wl_eglstream_controller_add_listener ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_eglstream_controller as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_eglstream_controller_add_rust_listener ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller , listener : & dyn wl_eglstream_controller_listener ) -> bool { let to = ( listener as * const dyn wl_eglstream_controller_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_eglstream_controller_add_listener ( wl_eglstream_controller as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_eglstream_controller_destroy ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_eglstream_controller as _ ) ; } # [ doc = "Create server stream and attach consumer\n\nCreates the corresponding server side EGLStream from the given wl_buffer\nand attaches a consumer to it." ] pub unsafe fn wl_eglstream_controller_attach_eglstream_consumer ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller , wl_surface : * mut super :: wl_surface :: wl_surface , wl_resource : * mut super :: wl_buffer :: wl_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_eglstream_controller as _ , 0u32 , wl_surface , wl_resource , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Create server stream and attach consumer using attributes\n\nCreates the corresponding server side EGLStream from the given wl_buffer\nand attaches a consumer to it using the given attributes." ] pub unsafe fn wl_eglstream_controller_attach_eglstream_consumer_attribs ( wl_eglstream_controller : * mut super :: wl_eglstream_controller :: wl_eglstream_controller , wl_surface : * mut super :: wl_surface :: wl_surface , wl_resource : * mut super :: wl_buffer :: wl_buffer , attribs : * mut wl_array ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_eglstream_controller as _ , 1u32 , wl_surface , wl_resource , attribs , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod linux_dmabuf_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "factory for creating dmabuf-based wl_buffers\n\nFollowing the interfaces from:\nhttps://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt\nhttps://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import_modifiers.txt\nand the Linux DRM sub-system's AddFb2 ioctl.\n\nThis interface offers ways to create generic dmabuf-based\nwl_buffers. Immediately after a client binds to this interface,\nthe set of supported formats and format modifiers is sent with\n'format' and 'modifier' events.\n\nThe following are required from clients:\n\n- Clients must ensure that either all data in the dma-buf is\ncoherent for all subsequent read access or that coherency is\ncorrectly handled by the underlying kernel-side dma-buf\nimplementation.\n\n- Don't make any more attachments after sending the buffer to the\ncompositor. Making more attachments later increases the risk of\nthe compositor not being able to use (re-import) an existing\ndmabuf-based wl_buffer.\n\nThe underlying graphics stack must ensure the following:\n\n- The dmabuf file descriptors relayed to the server will stay valid\nfor the whole lifetime of the wl_buffer. This means the server may\nat any time use those fds to import the dmabuf into any kernel\nsub-system that might accept it.\n\nHowever, when the underlying graphics stack fails to deliver the\npromise, because of e.g. a device hot-unplug which raises internal\nerrors, after the wl_buffer has been successfully created the\ncompositor must not raise protocol errors to the client when dmabuf\nimport later fails.\n\nTo create a wl_buffer from one or more dmabufs, a client creates a\nzwp_linux_dmabuf_params_v1 object with a zwp_linux_dmabuf_v1.create_params\nrequest. All planes required by the intended format are added with\nthe 'add' request. Finally, a 'create' or 'create_immed' request is\nissued, which has the following outcome depending on the import success.\n\nThe 'create' request,\n- on success, triggers a 'created' event which provides the final\nwl_buffer to the client.\n- on failure, triggers a 'failed' event to convey that the server\ncannot use the dmabufs received from the client.\n\nFor the 'create_immed' request,\n- on success, the server immediately imports the added dmabufs to\ncreate a wl_buffer. No event is sent from the server in this case.\n- on failure, the server can choose to either:\n- terminate the client by raising a fatal error.\n- mark the wl_buffer as failed, and send a 'failed' event to the\nclient. If the client uses a failed wl_buffer as an argument to any\nrequest, the behaviour is compositor implementation-defined.\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_linux_dmabuf_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_linux_dmabuf_v1 { } static mut zwp_linux_dmabuf_v1_requests_create_params_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_dmabuf_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_params\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_linux_dmabuf_v1_requests_create_params_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_dmabuf_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"format\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifier\0" as * const u8 as * const c_char , signature : b"3uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_linux_dmabuf_v1_interface : wl_interface = wl_interface { name : b"zwp_linux_dmabuf_v1\0" as * const u8 as * const c_char , version : 3 , request_count : 2 , requests : unsafe { & zwp_linux_dmabuf_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_linux_dmabuf_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_linux_dmabuf_v1_listener { # [ doc = "supported buffer format\n\nThis event advertises one buffer format that the server supports.\nAll the supported formats are advertised once when the client\nbinds to this interface. A roundtrip after binding guarantees\nthat the client has received all supported formats.\n\nFor the definition of the format codes, see the\nzwp_linux_buffer_params_v1::create request.\n\nWarning: the 'format' event is likely to be deprecated and replaced\nwith the 'modifier' event introduced in zwp_linux_dmabuf_v1\nversion 3, described below. Please refrain from using the information\nreceived from this event." ] fn format ( & mut self , object : * mut zwp_linux_dmabuf_v1 , format : u32 ) { } # [ doc = "supported buffer format modifier\n\nThis event advertises the formats that the server supports, along with\nthe modifiers supported for each format. All the supported modifiers\nfor all the supported formats are advertised once when the client\nbinds to this interface. A roundtrip after binding guarantees that\nthe client has received all supported format-modifier pairs.\n\nFor legacy support, DRM_FORMAT_MOD_INVALID (that is, modifier_hi ==\n0x00ffffff and modifier_lo == 0xffffffff) is allowed in this event.\nIt indicates that the server can support the format with an implicit\nmodifier. When a plane has DRM_FORMAT_MOD_INVALID as its modifier, it\nis as if no explicit modifier is specified. The effective modifier\nwill be derived from the dmabuf.\n\nA compositor that sends valid modifiers and DRM_FORMAT_MOD_INVALID for\na given format supports both explicit modifiers and implicit modifiers.\n\nFor the definition of the format and modifier codes, see the\nzwp_linux_buffer_params_v1::create and zwp_linux_buffer_params_v1::add\nrequests.\n\nOnly available since version 3 of the interface." ] fn modifier ( & mut self , object : * mut zwp_linux_dmabuf_v1 , format : u32 , modifier_hi : u32 , modifier_lo : u32 ) { } } pub unsafe fn zwp_linux_dmabuf_v1_set_user_data ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_linux_dmabuf_v1 as _ , user_data ) ; } pub unsafe fn zwp_linux_dmabuf_v1_get_user_data ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_linux_dmabuf_v1 as _ ) ; } pub unsafe fn zwp_linux_dmabuf_v1_get_version ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_linux_dmabuf_v1 as _ ) ; } pub unsafe fn zwp_linux_dmabuf_v1_add_listener ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_linux_dmabuf_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_linux_dmabuf_v1_add_rust_listener ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 , listener : & dyn zwp_linux_dmabuf_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_linux_dmabuf_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_linux_dmabuf_v1_add_listener ( zwp_linux_dmabuf_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "unbind the factory\n\nObjects created through this interface, especially wl_buffers, will\nremain valid." ] pub unsafe fn zwp_linux_dmabuf_v1_destroy ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_dmabuf_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_linux_dmabuf_v1 as _ ) ; } # [ doc = "create a temporary object for buffer parameters\n\nThis temporary object is used to collect multiple dmabuf handles into\na single batch to create a wl_buffer. It can only be used once and\nshould be destroyed after a 'created' or 'failed' event has been\nreceived." ] pub unsafe fn zwp_linux_dmabuf_v1_create_params ( zwp_linux_dmabuf_v1 : * mut super :: zwp_linux_dmabuf_v1 :: zwp_linux_dmabuf_v1 ) -> * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_linux_dmabuf_v1 as _ , 1u32 , & super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "parameters for creating a dmabuf-based wl_buffer\n\nThis temporary object is a collection of dmabufs and other\nparameters that together form a single logical buffer. The temporary\nobject may eventually create one wl_buffer unless cancelled by\ndestroying it before requesting 'create'.\n\nSingle-planar formats only require one dmabuf, however\nmulti-planar formats may require more than one dmabuf. For all\nformats, an 'add' request must be called once per plane (even if the\nunderlying dmabuf fd is identical).\n\nYou must use consecutive plane indices ('plane_idx' argument for 'add')\nfrom zero to the number of planes used by the drm_fourcc format code.\nAll planes required by the format must be given exactly once, but can\nbe given in any order. Each plane index can be set only once." ] pub mod zwp_linux_buffer_params_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_linux_buffer_params_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "the dmabuf_batch object has already been used to create a wl_buffer" ] already_used = 0 , # [ doc = "plane index out of bounds" ] plane_idx = 1 , # [ doc = "the plane index was already set" ] plane_set = 2 , # [ doc = "missing or too many planes to create a buffer" ] incomplete = 3 , # [ doc = "format not supported" ] invalid_format = 4 , # [ doc = "invalid width or height" ] invalid_dimensions = 5 , # [ doc = "offset + stride * height goes out of dmabuf bounds" ] out_of_bounds = 6 , # [ doc = "invalid wl_buffer resulted from importing dmabufs via the create_immed request on given buffer_params" ] invalid_wl_buffer = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: already_used ) , 1 => Some ( error :: plane_idx ) , 2 => Some ( error :: plane_set ) , 3 => Some ( error :: incomplete ) , 4 => Some ( error :: invalid_format ) , 5 => Some ( error :: invalid_dimensions ) , 6 => Some ( error :: out_of_bounds ) , 7 => Some ( error :: invalid_wl_buffer ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { pub struct flags : u32 { # [ doc = "contents are y-inverted" ] const y_invert = 1 ; # [ doc = "content is interlaced" ] const interlaced = 2 ; # [ doc = "bottom field first" ] const bottom_first = 4 ; } } impl flags { pub fn from_raw ( n : u32 ) -> Option < flags > { Some ( flags :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } static mut zwp_linux_buffer_params_v1_requests_create_immed_types : [ * const wl_interface ; 5 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_buffer_params_v1_requests : [ wl_message ; 4 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"add\0" as * const u8 as * const c_char , signature : b"huuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"iiuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_immed\0" as * const u8 as * const c_char , signature : b"2niiuu\0" as * const u8 as * const c_char , types : unsafe { & zwp_linux_buffer_params_v1_requests_create_immed_types as * const _ } , } , ] ; static mut zwp_linux_buffer_params_v1_events_created_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_buffer :: wl_buffer_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_linux_buffer_params_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"created\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_linux_buffer_params_v1_events_created_types as * const _ } , } , wl_message { name : b"failed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_linux_buffer_params_v1_interface : wl_interface = wl_interface { name : b"zwp_linux_buffer_params_v1\0" as * const u8 as * const c_char , version : 3 , request_count : 4 , requests : unsafe { & zwp_linux_buffer_params_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_linux_buffer_params_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_linux_buffer_params_v1_listener { # [ doc = "buffer creation succeeded\n\nThis event indicates that the attempted buffer creation was\nsuccessful. It provides the new wl_buffer referencing the dmabuf(s).\n\nUpon receiving this event, the client should destroy the\nzlinux_dmabuf_params object." ] fn created ( & mut self , object : * mut zwp_linux_buffer_params_v1 , buffer : * mut super :: wl_buffer :: wl_buffer ) { } # [ doc = "buffer creation failed\n\nThis event indicates that the attempted buffer creation has\nfailed. It usually means that one of the dmabuf constraints\nhas not been fulfilled.\n\nUpon receiving this event, the client should destroy the\nzlinux_buffer_params object." ] fn failed ( & mut self , object : * mut zwp_linux_buffer_params_v1 , ) { } } pub unsafe fn zwp_linux_buffer_params_v1_set_user_data ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_linux_buffer_params_v1 as _ , user_data ) ; } pub unsafe fn zwp_linux_buffer_params_v1_get_user_data ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_linux_buffer_params_v1 as _ ) ; } pub unsafe fn zwp_linux_buffer_params_v1_get_version ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_linux_buffer_params_v1 as _ ) ; } pub unsafe fn zwp_linux_buffer_params_v1_add_listener ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_linux_buffer_params_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_linux_buffer_params_v1_add_rust_listener ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 , listener : & dyn zwp_linux_buffer_params_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_linux_buffer_params_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_linux_buffer_params_v1_add_listener ( zwp_linux_buffer_params_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "delete this object, used or not\n\nCleans up the temporary data sent to the server for dmabuf-based\nwl_buffer creation." ] pub unsafe fn zwp_linux_buffer_params_v1_destroy ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_buffer_params_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_linux_buffer_params_v1 as _ ) ; } # [ doc = "add a dmabuf to the temporary set\n\nThis request adds one dmabuf to the set in this\nzwp_linux_buffer_params_v1.\n\nThe 64-bit unsigned value combined from modifier_hi and modifier_lo\nis the dmabuf layout modifier. DRM AddFB2 ioctl calls this the\nfb modifier, which is defined in drm_mode.h of Linux UAPI.\nThis is an opaque token. Drivers use this token to express tiling,\ncompression, etc. driver-specific modifications to the base format\ndefined by the DRM fourcc code.\n\nWarning: It should be an error if the format/modifier pair was not\nadvertised with the modifier event. This is not enforced yet because\nsome implementations always accept DRM_FORMAT_MOD_INVALID. Also\nversion 2 of this protocol does not have the modifier event.\n\nThis request raises the PLANE_IDX error if plane_idx is too large.\nThe error PLANE_SET is raised if attempting to set a plane that\nwas already set." ] pub unsafe fn zwp_linux_buffer_params_v1_add ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 , fd : :: std :: os :: unix :: io :: RawFd , plane_idx : u32 , offset : u32 , stride : u32 , modifier_hi : u32 , modifier_lo : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_buffer_params_v1 as _ , 1u32 , fd , plane_idx , offset , stride , modifier_hi , modifier_lo , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "create a wl_buffer from the given dmabufs\n\nThis asks for creation of a wl_buffer from the added dmabuf\nbuffers. The wl_buffer is not created immediately but returned via\nthe 'created' event if the dmabuf sharing succeeds. The sharing\nmay fail at runtime for reasons a client cannot predict, in\nwhich case the 'failed' event is triggered.\n\nThe 'format' argument is a DRM_FORMAT code, as defined by the\nlibdrm's drm_fourcc.h. The Linux kernel's DRM sub-system is the\nauthoritative source on how the format codes should work.\n\nThe 'flags' is a bitfield of the flags defined in enum \"flags\".\n'y_invert' means the that the image needs to be y-flipped.\n\nFlag 'interlaced' means that the frame in the buffer is not\nprogressive as usual, but interlaced. An interlaced buffer as\nsupported here must always contain both top and bottom fields.\nThe top field always begins on the first pixel row. The temporal\nordering between the two fields is top field first, unless\n'bottom_first' is specified. It is undefined whether 'bottom_first'\nis ignored if 'interlaced' is not set.\n\nThis protocol does not convey any information about field rate,\nduration, or timing, other than the relative ordering between the\ntwo fields in one buffer. A compositor may have to estimate the\nintended field rate from the incoming buffer rate. It is undefined\nwhether the time of receiving wl_surface.commit with a new buffer\nattached, applying the wl_surface state, wl_surface.frame callback\ntrigger, presentation, or any other point in the compositor cycle\nis used to measure the frame or field times. There is no support\nfor detecting missed or late frames/fields/buffers either, and\nthere is no support whatsoever for cooperating with interlaced\ncompositor output.\n\nThe composited image quality resulting from the use of interlaced\nbuffers is explicitly undefined. A compositor may use elaborate\nhardware features or software to deinterlace and create progressive\noutput frames from a sequence of interlaced input buffers, or it\nmay produce substandard image quality. However, compositors that\ncannot guarantee reasonable image quality in all cases are recommended\nto just reject all interlaced buffers.\n\nAny argument errors, including non-positive width or height,\nmismatch between the number of planes and the format, bad\nformat, bad offset or stride, may be indicated by fatal protocol\nerrors: INCOMPLETE, INVALID_FORMAT, INVALID_DIMENSIONS,\nOUT_OF_BOUNDS.\n\nDmabuf import errors in the server that are not obvious client\nbugs are returned via the 'failed' event as non-fatal. This\nallows attempting dmabuf sharing and falling back in the client\nif it fails.\n\nThis request can be sent only once in the object's lifetime, after\nwhich the only legal request is destroy. This object should be\ndestroyed after issuing a 'create' request. Attempting to use this\nobject after issuing 'create' raises ALREADY_USED protocol error.\n\nIt is not mandatory to issue 'create'. If a client wants to\ncancel the buffer creation, it can just destroy this object." ] pub unsafe fn zwp_linux_buffer_params_v1_create ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 , width : i32 , height : i32 , format : u32 , flags : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_linux_buffer_params_v1 as _ , 2u32 , width , height , format , flags , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "immediately create a wl_buffer from the given dmabufs\n\nThis asks for immediate creation of a wl_buffer by importing the\nadded dmabufs.\n\nIn case of import success, no event is sent from the server, and the\nwl_buffer is ready to be used by the client.\n\nUpon import failure, either of the following may happen, as seen fit\nby the implementation:\n- the client is terminated with one of the following fatal protocol\nerrors:\n- INCOMPLETE, INVALID_FORMAT, INVALID_DIMENSIONS, OUT_OF_BOUNDS,\nin case of argument errors such as mismatch between the number\nof planes and the format, bad format, non-positive width or\nheight, or bad offset or stride.\n- INVALID_WL_BUFFER, in case the cause for failure is unknown or\nplaform specific.\n- the server creates an invalid wl_buffer, marks it as failed and\nsends a 'failed' event to the client. The result of using this\ninvalid wl_buffer as an argument in any request by the client is\ndefined by the compositor implementation.\n\nThis takes the same arguments as a 'create' request, and obeys the\nsame restrictions." ] pub unsafe fn zwp_linux_buffer_params_v1_create_immed ( zwp_linux_buffer_params_v1 : * mut super :: zwp_linux_buffer_params_v1 :: zwp_linux_buffer_params_v1 , width : i32 , height : i32 , format : u32 , flags : u32 ) -> * mut super :: wl_buffer :: wl_buffer { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_linux_buffer_params_v1 as _ , 3u32 , & super :: wl_buffer :: wl_buffer_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , width , height , format , flags ) ; return r as _ ; } } } pub mod xdg_shell_unstable_v6 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "create desktop-style surfaces\n\nxdg_shell allows clients to turn a wl_surface into a \"real window\"\nwhich can be dragged, resized, stacked, and moved around by the\nuser. Everything about this interface is suited towards traditional\ndesktop environments." ] pub mod zxdg_shell_v6 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_shell_v6 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc = "xdg_shell was destroyed before children" ] defunct_surfaces = 1 , # [ doc = "the client tried to map or destroy a non-topmost popup" ] not_the_topmost_popup = 2 , # [ doc = "the client specified an invalid popup parent surface" ] invalid_popup_parent = 3 , # [ doc = "the client provided an invalid surface state" ] invalid_surface_state = 4 , # [ doc = "the client provided an invalid positioner" ] invalid_positioner = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , 1 => Some ( error :: defunct_surfaces ) , 2 => Some ( error :: not_the_topmost_popup ) , 3 => Some ( error :: invalid_popup_parent ) , 4 => Some ( error :: invalid_surface_state ) , 5 => Some ( error :: invalid_positioner ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zxdg_shell_v6_requests_create_positioner_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zxdg_positioner_v6 :: zxdg_positioner_v6_interface as * const wl_interface } , ] ; static mut zxdg_shell_v6_requests_get_xdg_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_surface_v6 :: zxdg_surface_v6_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_shell_v6_requests : [ wl_message ; 4 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_positioner\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zxdg_shell_v6_requests_create_positioner_types as * const _ } , } , wl_message { name : b"get_xdg_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zxdg_shell_v6_requests_get_xdg_surface_types as * const _ } , } , wl_message { name : b"pong\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_shell_v6_events : [ wl_message ; 1 ] = [ wl_message { name : b"ping\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_shell_v6_interface : wl_interface = wl_interface { name : b"zxdg_shell_v6\0" as * const u8 as * const c_char , version : 1 , request_count : 4 , requests : unsafe { & zxdg_shell_v6_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_shell_v6_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_shell_v6_listener { # [ doc = "check if the client is alive\n\nThe ping event asks the client if it's still alive. Pass the\nserial specified in the event back to the compositor by sending\na \"pong\" request back with the specified serial. See xdg_shell.ping.\n\nCompositors can use this to determine if the client is still\nalive. It's unspecified what will happen if the client doesn't\nrespond to the ping request, or in what timeframe. Clients should\ntry to respond in a reasonable amount of time.\n\nA compositor is free to ping in any way it wants, but a client must\nalways respond to any xdg_shell object it created." ] fn ping ( & mut self , object : * mut zxdg_shell_v6 , serial : u32 ) { } } pub unsafe fn zxdg_shell_v6_set_user_data ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_shell_v6 as _ , user_data ) ; } pub unsafe fn zxdg_shell_v6_get_user_data ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_shell_v6 as _ ) ; } pub unsafe fn zxdg_shell_v6_get_version ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_shell_v6 as _ ) ; } pub unsafe fn zxdg_shell_v6_add_listener ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_shell_v6 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_shell_v6_add_rust_listener ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 , listener : & dyn zxdg_shell_v6_listener ) -> bool { let to = ( listener as * const dyn zxdg_shell_v6_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_shell_v6_add_listener ( zxdg_shell_v6 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy xdg_shell\n\nDestroy this xdg_shell object.\n\nDestroying a bound xdg_shell object while there are surfaces\nstill alive created by this xdg_shell object instance is illegal\nand will result in a protocol error." ] pub unsafe fn zxdg_shell_v6_destroy ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_shell_v6 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_shell_v6 as _ ) ; } # [ doc = "create a positioner object\n\nCreate a positioner object. A positioner object is used to position\nsurfaces relative to some parent surface. See the interface description\nand xdg_surface.get_popup for details." ] pub unsafe fn zxdg_shell_v6_create_positioner ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 ) -> * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_shell_v6 as _ , 1u32 , & super :: zxdg_positioner_v6 :: zxdg_positioner_v6_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "create a shell surface from a surface\n\nThis creates an xdg_surface for the given surface. While xdg_surface\nitself is not a role, the corresponding surface may only be assigned\na role extending xdg_surface, such as xdg_toplevel or xdg_popup.\n\nThis creates an xdg_surface for the given surface. An xdg_surface is\nused as basis to define a role to a given surface, such as xdg_toplevel\nor xdg_popup. It also manages functionality shared between xdg_surface\nbased surface roles.\n\nSee the documentation of xdg_surface for more details about what an\nxdg_surface is and how it is used." ] pub unsafe fn zxdg_shell_v6_get_xdg_surface ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_shell_v6 as _ , 2u32 , & super :: zxdg_surface_v6 :: zxdg_surface_v6_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } # [ doc = "respond to a ping event\n\nA client must respond to a ping event with a pong request or\nthe client may be deemed unresponsive. See xdg_shell.ping." ] pub unsafe fn zxdg_shell_v6_pong ( zxdg_shell_v6 : * mut super :: zxdg_shell_v6 :: zxdg_shell_v6 , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_shell_v6 as _ , 3u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "child surface positioner\n\nThe xdg_positioner provides a collection of rules for the placement of a\nchild surface relative to a parent surface. Rules can be defined to ensure\nthe child surface remains within the visible area's borders, and to\nspecify how the child surface changes its position, such as sliding along\nan axis, or flipping around a rectangle. These positioner-created rules are\nconstrained by the requirement that a child surface must intersect with or\nbe at least partially adjacent to its parent surface.\n\nSee the various requests for details about possible rules.\n\nAt the time of the request, the compositor makes a copy of the rules\nspecified by the xdg_positioner. Thus, after the request is complete the\nxdg_positioner object can be destroyed or reused; further changes to the\nobject will have no effect on previous usages.\n\nFor an xdg_positioner object to be considered complete, it must have a\nnon-zero size set by set_size, and a non-zero anchor rectangle set by\nset_anchor_rect. Passing an incomplete xdg_positioner object when\npositioning a surface raises an error." ] pub mod zxdg_positioner_v6 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_positioner_v6 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "invalid input provided" ] invalid_input = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_input ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { pub struct anchor : u32 { # [ doc = "the center of the anchor rectangle" ] const none = 0 ; # [ doc = "the top edge of the anchor rectangle" ] const top = 1 ; # [ doc = "the bottom edge of the anchor rectangle" ] const bottom = 2 ; # [ doc = "the left edge of the anchor rectangle" ] const left = 4 ; # [ doc = "the right edge of the anchor rectangle" ] const right = 8 ; } } impl anchor { pub fn from_raw ( n : u32 ) -> Option < anchor > { Some ( anchor :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } bitflags ! { pub struct gravity : u32 { # [ doc = "center over the anchor edge" ] const none = 0 ; # [ doc = "position above the anchor edge" ] const top = 1 ; # [ doc = "position below the anchor edge" ] const bottom = 2 ; # [ doc = "position to the left of the anchor edge" ] const left = 4 ; # [ doc = "position to the right of the anchor edge" ] const right = 8 ; } } impl gravity { pub fn from_raw ( n : u32 ) -> Option < gravity > { Some ( gravity :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } bitflags ! { # [ doc = "constraint adjustments\n\nThe constraint adjustment value define ways the compositor will adjust\nthe position of the surface, if the unadjusted position would result\nin the surface being partly constrained.\n\nWhether a surface is considered 'constrained' is left to the compositor\nto determine. For example, the surface may be partly outside the\ncompositor's defined 'work area', thus necessitating the child surface's\nposition be adjusted until it is entirely inside the work area.\n\nThe adjustments can be combined, according to a defined precedence: 1)\nFlip, 2) Slide, 3) Resize." ] pub struct constraint_adjustment : u32 { # [ doc = "don't move the child surface when constrained\n\nDon't alter the surface position even if it is constrained on some\naxis, for example partially outside the edge of a monitor." ] const none = 0 ; # [ doc = "move along the x axis until unconstrained\n\nSlide the surface along the x axis until it is no longer constrained.\n\nFirst try to slide towards the direction of the gravity on the x axis\nuntil either the edge in the opposite direction of the gravity is\nunconstrained or the edge in the direction of the gravity is\nconstrained.\n\nThen try to slide towards the opposite direction of the gravity on the\nx axis until either the edge in the direction of the gravity is\nunconstrained or the edge in the opposite direction of the gravity is\nconstrained." ] const slide_x = 1 ; # [ doc = "move along the y axis until unconstrained\n\nSlide the surface along the y axis until it is no longer constrained.\n\nFirst try to slide towards the direction of the gravity on the y axis\nuntil either the edge in the opposite direction of the gravity is\nunconstrained or the edge in the direction of the gravity is\nconstrained.\n\nThen try to slide towards the opposite direction of the gravity on the\ny axis until either the edge in the direction of the gravity is\nunconstrained or the edge in the opposite direction of the gravity is\nconstrained." ] const slide_y = 2 ; # [ doc = "invert the anchor and gravity on the x axis\n\nInvert the anchor and gravity on the x axis if the surface is\nconstrained on the x axis. For example, if the left edge of the\nsurface is constrained, the gravity is 'left' and the anchor is\n'left', change the gravity to 'right' and the anchor to 'right'.\n\nIf the adjusted position also ends up being constrained, the resulting\nposition of the flip_x adjustment will be the one before the\nadjustment." ] const flip_x = 4 ; # [ doc = "invert the anchor and gravity on the y axis\n\nInvert the anchor and gravity on the y axis if the surface is\nconstrained on the y axis. For example, if the bottom edge of the\nsurface is constrained, the gravity is 'bottom' and the anchor is\n'bottom', change the gravity to 'top' and the anchor to 'top'.\n\nIf the adjusted position also ends up being constrained, the resulting\nposition of the flip_y adjustment will be the one before the\nadjustment." ] const flip_y = 8 ; # [ doc = "horizontally resize the surface\n\nResize the surface horizontally so that it is completely\nunconstrained." ] const resize_x = 16 ; # [ doc = "vertically resize the surface\n\nResize the surface vertically so that it is completely unconstrained." ] const resize_y = 32 ; } } impl constraint_adjustment { pub fn from_raw ( n : u32 ) -> Option < constraint_adjustment > { Some ( constraint_adjustment :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_positioner_v6_requests : [ wl_message ; 7 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_anchor_rect\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_anchor\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_gravity\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_constraint_adjustment\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_offset\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_positioner_v6_interface : wl_interface = wl_interface { name : b"zxdg_positioner_v6\0" as * const u8 as * const c_char , version : 1 , request_count : 7 , requests : unsafe { & zxdg_positioner_v6_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_positioner_v6_listener { } pub unsafe fn zxdg_positioner_v6_set_user_data ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_positioner_v6 as _ , user_data ) ; } pub unsafe fn zxdg_positioner_v6_get_user_data ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_positioner_v6 as _ ) ; } pub unsafe fn zxdg_positioner_v6_get_version ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_positioner_v6 as _ ) ; } pub unsafe fn zxdg_positioner_v6_add_listener ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_positioner_v6 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_positioner_v6_add_rust_listener ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , listener : & dyn zxdg_positioner_v6_listener ) -> bool { let to = ( listener as * const dyn zxdg_positioner_v6_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_positioner_v6_add_listener ( zxdg_positioner_v6 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_positioner object\n\nNotify the compositor that the xdg_positioner will no longer be used." ] pub unsafe fn zxdg_positioner_v6_destroy ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_positioner_v6 as _ ) ; } # [ doc = "set the size of the to-be positioned rectangle\n\nSet the size of the surface that is to be positioned with the positioner\nobject. The size is in surface-local coordinates and corresponds to the\nwindow geometry. See xdg_surface.set_window_geometry.\n\nIf a zero or negative size is set the invalid_input error is raised." ] pub unsafe fn zxdg_positioner_v6_set_size ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 1u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the anchor rectangle within the parent surface\n\nSpecify the anchor rectangle within the parent surface that the child\nsurface will be placed relative to. The rectangle is relative to the\nwindow geometry as defined by xdg_surface.set_window_geometry of the\nparent surface. The rectangle must be at least 1x1 large.\n\nWhen the xdg_positioner object is used to position a child surface, the\nanchor rectangle may not extend outside the window geometry of the\npositioned child's parent surface.\n\nIf a zero or negative size is set the invalid_input error is raised." ] pub unsafe fn zxdg_positioner_v6_set_anchor_rect ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 2u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set anchor rectangle anchor edges\n\nDefines a set of edges for the anchor rectangle. These are used to\nderive an anchor point that the child surface will be positioned\nrelative to. If two orthogonal edges are specified (e.g. 'top' and\n'left'), then the anchor point will be the intersection of the edges\n(e.g. the top left position of the rectangle); otherwise, the derived\nanchor point will be centered on the specified edge, or in the center of\nthe anchor rectangle if no edge is specified.\n\nIf two parallel anchor edges are specified (e.g. 'left' and 'right'),\nthe invalid_input error is raised." ] pub unsafe fn zxdg_positioner_v6_set_anchor ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , anchor : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 3u32 , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set child surface gravity\n\nDefines in what direction a surface should be positioned, relative to\nthe anchor point of the parent surface. If two orthogonal gravities are\nspecified (e.g. 'bottom' and 'right'), then the child surface will be\nplaced in the specified direction; otherwise, the child surface will be\ncentered over the anchor point on any axis that had no gravity\nspecified.\n\nIf two parallel gravities are specified (e.g. 'left' and 'right'), the\ninvalid_input error is raised." ] pub unsafe fn zxdg_positioner_v6_set_gravity ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , gravity : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 4u32 , gravity , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the adjustment to be done when constrained\n\nSpecify how the window should be positioned if the originally intended\nposition caused the surface to be constrained, meaning at least\npartially outside positioning boundaries set by the compositor. The\nadjustment is set by constructing a bitmask describing the adjustment to\nbe made when the surface is constrained on that axis.\n\nIf no bit for one axis is set, the compositor will assume that the child\nsurface should not change its position on that axis when constrained.\n\nIf more than one bit for one axis is set, the order of how adjustments\nare applied is specified in the corresponding adjustment descriptions.\n\nThe default adjustment is none." ] pub unsafe fn zxdg_positioner_v6_set_constraint_adjustment ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , constraint_adjustment : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 5u32 , constraint_adjustment , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface position offset\n\nSpecify the surface position offset relative to the position of the\nanchor on the anchor rectangle and the anchor on the surface. For\nexample if the anchor of the anchor rectangle is at (x, y), the surface\nhas the gravity bottom|right, and the offset is (ox, oy), the calculated\nsurface position will be (x + ox, y + oy). The offset position of the\nsurface is the one used for constraint testing. See\nset_constraint_adjustment.\n\nAn example use case is placing a popup menu on top of a user interface\nelement, while aligning the user interface element of the parent surface\nwith some user interface element placed somewhere in the popup surface." ] pub unsafe fn zxdg_positioner_v6_set_offset ( zxdg_positioner_v6 : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_positioner_v6 as _ , 6u32 , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "desktop user interface surface base interface\n\nAn interface that may be implemented by a wl_surface, for\nimplementations that provide a desktop-style user interface.\n\nIt provides a base set of functionality required to construct user\ninterface elements requiring management by the compositor, such as\ntoplevel windows, menus, etc. The types of functionality are split into\nxdg_surface roles.\n\nCreating an xdg_surface does not set the role for a wl_surface. In order\nto map an xdg_surface, the client must create a role-specific object\nusing, e.g., get_toplevel, get_popup. The wl_surface for any given\nxdg_surface can have at most one role, and may not be assigned any role\nnot based on xdg_surface.\n\nA role must be assigned before any other requests are made to the\nxdg_surface object.\n\nThe client must call wl_surface.commit on the corresponding wl_surface\nfor the xdg_surface state to take effect.\n\nCreating an xdg_surface from a wl_surface which has a buffer attached or\ncommitted is a client error, and any attempts by a client to attach or\nmanipulate a buffer prior to the first xdg_surface.configure call must\nalso be treated as errors.\n\nFor a surface to be mapped by the compositor, the following conditions\nmust be met: (1) the client has assigned an xdg_surface based role to the\nsurface, (2) the client has set and committed the xdg_surface state and\nthe role dependent state to the surface and (3) the client has committed a\nbuffer to the surface." ] pub mod zxdg_surface_v6 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_surface_v6 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { not_constructed = 1 , already_constructed = 2 , unconfigured_buffer = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 1 => Some ( error :: not_constructed ) , 2 => Some ( error :: already_constructed ) , 3 => Some ( error :: unconfigured_buffer ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zxdg_surface_v6_requests_get_toplevel_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6_interface as * const wl_interface } , ] ; static mut zxdg_surface_v6_requests_get_popup_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: zxdg_popup_v6 :: zxdg_popup_v6_interface as * const wl_interface } , unsafe { & super :: zxdg_surface_v6 :: zxdg_surface_v6_interface as * const wl_interface } , unsafe { & super :: zxdg_positioner_v6 :: zxdg_positioner_v6_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_surface_v6_requests : [ wl_message ; 5 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_toplevel\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zxdg_surface_v6_requests_get_toplevel_types as * const _ } , } , wl_message { name : b"get_popup\0" as * const u8 as * const c_char , signature : b"noo\0" as * const u8 as * const c_char , types : unsafe { & zxdg_surface_v6_requests_get_popup_types as * const _ } , } , wl_message { name : b"set_window_geometry\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"ack_configure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_surface_v6_events : [ wl_message ; 1 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_surface_v6_interface : wl_interface = wl_interface { name : b"zxdg_surface_v6\0" as * const u8 as * const c_char , version : 1 , request_count : 5 , requests : unsafe { & zxdg_surface_v6_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_surface_v6_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_surface_v6_listener { # [ doc = "suggest a surface change\n\nThe configure event marks the end of a configure sequence. A configure\nsequence is a set of one or more events configuring the state of the\nxdg_surface, including the final xdg_surface.configure event.\n\nWhere applicable, xdg_surface surface roles will during a configure\nsequence extend this event as a latched state sent as events before the\nxdg_surface.configure event. Such events should be considered to make up\na set of atomically applied configuration states, where the\nxdg_surface.configure commits the accumulated state.\n\nClients should arrange their surface for the new states, and then send\nan ack_configure request with the serial sent in this configure event at\nsome point before committing the new surface.\n\nIf the client receives multiple configure events before it can respond\nto one, it is free to discard all but the last event it received." ] fn configure ( & mut self , object : * mut zxdg_surface_v6 , serial : u32 ) { } } pub unsafe fn zxdg_surface_v6_set_user_data ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_surface_v6 as _ , user_data ) ; } pub unsafe fn zxdg_surface_v6_get_user_data ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_surface_v6 as _ ) ; } pub unsafe fn zxdg_surface_v6_get_version ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_surface_v6 as _ ) ; } pub unsafe fn zxdg_surface_v6_add_listener ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_surface_v6 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_surface_v6_add_rust_listener ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , listener : & dyn zxdg_surface_v6_listener ) -> bool { let to = ( listener as * const dyn zxdg_surface_v6_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_surface_v6_add_listener ( zxdg_surface_v6 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_surface\n\nDestroy the xdg_surface object. An xdg_surface must only be destroyed\nafter its role object has been destroyed." ] pub unsafe fn zxdg_surface_v6_destroy ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_surface_v6 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_surface_v6 as _ ) ; } # [ doc = "assign the xdg_toplevel surface role\n\nThis creates an xdg_toplevel object for the given xdg_surface and gives\nthe associated wl_surface the xdg_toplevel role.\n\nSee the documentation of xdg_toplevel for more details about what an\nxdg_toplevel is and how it is used." ] pub unsafe fn zxdg_surface_v6_get_toplevel ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 ) -> * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_surface_v6 as _ , 1u32 , & super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "assign the xdg_popup surface role\n\nThis creates an xdg_popup object for the given xdg_surface and gives the\nassociated wl_surface the xdg_popup role.\n\nSee the documentation of xdg_popup for more details about what an\nxdg_popup is and how it is used." ] pub unsafe fn zxdg_surface_v6_get_popup ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , parent : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , positioner : * mut super :: zxdg_positioner_v6 :: zxdg_positioner_v6 ) -> * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_surface_v6 as _ , 2u32 , & super :: zxdg_popup_v6 :: zxdg_popup_v6_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , parent , positioner ) ; return r as _ ; } # [ doc = "set the new window geometry\n\nThe window geometry of a surface is its \"visible bounds\" from the\nuser's perspective. Client-side decorations often have invisible\nportions like drop-shadows which should be ignored for the\npurposes of aligning, placing and constraining windows.\n\nThe window geometry is double buffered, and will be applied at the\ntime wl_surface.commit of the corresponding wl_surface is called.\n\nOnce the window geometry of the surface is set, it is not possible to\nunset it, and it will remain the same until set_window_geometry is\ncalled again, even if a new subsurface or buffer is attached.\n\nIf never set, the value is the full bounds of the surface,\nincluding any subsurfaces. This updates dynamically on every\ncommit. This unset is meant for extremely simple clients.\n\nThe arguments are given in the surface-local coordinate space of\nthe wl_surface associated with this xdg_surface.\n\nThe width and height must be greater than zero. Setting an invalid size\nwill raise an error. When applied, the effective window geometry will be\nthe set window geometry clamped to the bounding rectangle of the\ncombined geometry of the surface of the xdg_surface and the associated\nsubsurfaces." ] pub unsafe fn zxdg_surface_v6_set_window_geometry ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_surface_v6 as _ , 3u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "ack a configure event\n\nWhen a configure event is received, if a client commits the\nsurface in response to the configure event, then the client\nmust make an ack_configure request sometime before the commit\nrequest, passing along the serial of the configure event.\n\nFor instance, for toplevel surfaces the compositor might use this\ninformation to move a surface to the top left only when the client has\ndrawn itself for the maximized or fullscreen state.\n\nIf the client receives multiple configure events before it\ncan respond to one, it only has to ack the last configure event.\n\nA client is not required to commit immediately after sending\nan ack_configure request - it may even ack_configure several times\nbefore its next surface commit.\n\nA client may send multiple ack_configure requests before committing, but\nonly the last request sent before a commit indicates which configure\nevent the client really is responding to." ] pub unsafe fn zxdg_surface_v6_ack_configure ( zxdg_surface_v6 : * mut super :: zxdg_surface_v6 :: zxdg_surface_v6 , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_surface_v6 as _ , 4u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "toplevel surface\n\nThis interface defines an xdg_surface role which allows a surface to,\namong other things, set window-like properties such as maximize,\nfullscreen, and minimize, set application-specific metadata like title and\nid, and well as trigger user interactive operations such as interactive\nresize and move." ] pub mod zxdg_toplevel_v6 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_toplevel_v6 { } # [ doc = "edge values for resizing\n\nThese values are used to indicate which edge of a surface\nis being dragged in a resize operation." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum resize_edge { none = 0 , top = 1 , bottom = 2 , left = 4 , top_left = 5 , bottom_left = 6 , right = 8 , top_right = 9 , bottom_right = 10 , # [ doc ( hidden ) ] __nonexhaustive , } impl resize_edge { pub fn from_raw ( n : u32 ) -> Option < resize_edge > { match n { 0 => Some ( resize_edge :: none ) , 1 => Some ( resize_edge :: top ) , 2 => Some ( resize_edge :: bottom ) , 4 => Some ( resize_edge :: left ) , 5 => Some ( resize_edge :: top_left ) , 6 => Some ( resize_edge :: bottom_left ) , 8 => Some ( resize_edge :: right ) , 9 => Some ( resize_edge :: top_right ) , 10 => Some ( resize_edge :: bottom_right ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "types of state on the surface\n\nThe different state values used on the surface. This is designed for\nstate values like maximized, fullscreen. It is paired with the\nconfigure event to ensure that both the client and the compositor\nsetting the state can be synchronized.\n\nStates set in this way are double-buffered. They will get applied on\nthe next commit." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum state { # [ doc = "the surface is maximized\n\nThe surface is maximized. The window geometry specified in the configure\nevent must be obeyed by the client." ] maximized = 1 , # [ doc = "the surface is fullscreen\n\nThe surface is fullscreen. The window geometry specified in the configure\nevent must be obeyed by the client." ] fullscreen = 2 , # [ doc = "the surface is being resized\n\nThe surface is being resized. The window geometry specified in the\nconfigure event is a maximum; the client cannot resize beyond it.\nClients that have aspect ratio or cell sizing configuration can use\na smaller size, however." ] resizing = 3 , # [ doc = "the surface is now activated\n\nClient window decorations should be painted as if the window is\nactive. Do not assume this means that the window actually has\nkeyboard or pointer focus." ] activated = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl state { pub fn from_raw ( n : u32 ) -> Option < state > { match n { 1 => Some ( state :: maximized ) , 2 => Some ( state :: fullscreen ) , 3 => Some ( state :: resizing ) , 4 => Some ( state :: activated ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zxdg_toplevel_v6_requests_set_parent_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6_interface as * const wl_interface } , ] ; static mut zxdg_toplevel_v6_requests_show_window_menu_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut zxdg_toplevel_v6_requests_move_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut zxdg_toplevel_v6_requests_resize_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut zxdg_toplevel_v6_requests_set_fullscreen_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_toplevel_v6_requests : [ wl_message ; 14 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & zxdg_toplevel_v6_requests_set_parent_types as * const _ } , } , wl_message { name : b"set_title\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_app_id\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"show_window_menu\0" as * const u8 as * const c_char , signature : b"ouii\0" as * const u8 as * const c_char , types : unsafe { & zxdg_toplevel_v6_requests_show_window_menu_types as * const _ } , } , wl_message { name : b"move\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & zxdg_toplevel_v6_requests_move_types as * const _ } , } , wl_message { name : b"resize\0" as * const u8 as * const c_char , signature : b"ouu\0" as * const u8 as * const c_char , types : unsafe { & zxdg_toplevel_v6_requests_resize_types as * const _ } , } , wl_message { name : b"set_max_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_min_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_maximized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unset_maximized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_fullscreen\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & zxdg_toplevel_v6_requests_set_fullscreen_types as * const _ } , } , wl_message { name : b"unset_fullscreen\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_minimized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_toplevel_v6_events : [ wl_message ; 2 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"iia\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"close\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_toplevel_v6_interface : wl_interface = wl_interface { name : b"zxdg_toplevel_v6\0" as * const u8 as * const c_char , version : 1 , request_count : 14 , requests : unsafe { & zxdg_toplevel_v6_requests as * const _ } , event_count : 2 , events : unsafe { & zxdg_toplevel_v6_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_toplevel_v6_listener { # [ doc = "suggest a surface change\n\nThis configure event asks the client to resize its toplevel surface or\nto change its state. The configured state should not be applied\nimmediately. See xdg_surface.configure for details.\n\nThe width and height arguments specify a hint to the window\nabout how its surface should be resized in window geometry\ncoordinates. See set_window_geometry.\n\nIf the width or height arguments are zero, it means the client\nshould decide its own window dimension. This may happen when the\ncompositor needs to configure the state of the surface but doesn't\nhave any information about any previous or expected dimension.\n\nThe states listed in the event specify how the width/height\narguments should be interpreted, and possibly how it should be\ndrawn.\n\nClients must send an ack_configure in response to this event. See\nxdg_surface.configure and xdg_surface.ack_configure for details." ] fn configure ( & mut self , object : * mut zxdg_toplevel_v6 , width : i32 , height : i32 , states : * mut wl_array ) { } # [ doc = "surface wants to be closed\n\nThe close event is sent by the compositor when the user\nwants the surface to be closed. This should be equivalent to\nthe user clicking the close button in client-side decorations,\nif your application has any.\n\nThis is only a request that the user intends to close the\nwindow. The client may choose to ignore this request, or show\na dialog to ask the user to save their data, etc." ] fn close ( & mut self , object : * mut zxdg_toplevel_v6 , ) { } } pub unsafe fn zxdg_toplevel_v6_set_user_data ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_toplevel_v6 as _ , user_data ) ; } pub unsafe fn zxdg_toplevel_v6_get_user_data ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_toplevel_v6 as _ ) ; } pub unsafe fn zxdg_toplevel_v6_get_version ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_toplevel_v6 as _ ) ; } pub unsafe fn zxdg_toplevel_v6_add_listener ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_toplevel_v6 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_toplevel_v6_add_rust_listener ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , listener : & dyn zxdg_toplevel_v6_listener ) -> bool { let to = ( listener as * const dyn zxdg_toplevel_v6_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_toplevel_v6_add_listener ( zxdg_toplevel_v6 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_toplevel\n\nUnmap and destroy the window. The window will be effectively\nhidden from the user's point of view, and all state like\nmaximization, fullscreen, and so on, will be lost." ] pub unsafe fn zxdg_toplevel_v6_destroy ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_toplevel_v6 as _ ) ; } # [ doc = "set the parent of this surface\n\nSet the \"parent\" of this surface. This window should be stacked\nabove a parent. The parent surface must be mapped as long as this\nsurface is mapped.\n\nParent windows should be set on dialogs, toolboxes, or other\n\"auxiliary\" surfaces, so that the parent is raised when the dialog\nis raised." ] pub unsafe fn zxdg_toplevel_v6_set_parent ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , parent : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 1u32 , parent , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface title\n\nSet a short title for the surface.\n\nThis string may be used to identify the surface in a task bar,\nwindow list, or other user interface elements provided by the\ncompositor.\n\nThe string must be encoded in UTF-8." ] pub unsafe fn zxdg_toplevel_v6_set_title ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , title : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 2u32 , title , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set application ID\n\nSet an application identifier for the surface.\n\nThe app ID identifies the general class of applications to which\nthe surface belongs. The compositor can use this to group multiple\nsurfaces together, or to determine how to launch a new application.\n\nFor D-Bus activatable applications, the app ID is used as the D-Bus\nservice name.\n\nThe compositor shell will try to group application surfaces together\nby their app ID. As a best practice, it is suggested to select app\nID's that match the basename of the application's .desktop file.\nFor example, \"org.freedesktop.FooViewer\" where the .desktop file is\n\"org.freedesktop.FooViewer.desktop\".\n\nSee the desktop-entry specification [0] for more details on\napplication identifiers and how they relate to well-known D-Bus\nnames and .desktop files.\n\n[0] http://standards.freedesktop.org/desktop-entry-spec/" ] pub unsafe fn zxdg_toplevel_v6_set_app_id ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , app_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 3u32 , app_id , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "show the window menu\n\nClients implementing client-side decorations might want to show\na context menu when right-clicking on the decorations, giving the\nuser a menu that they can use to maximize or minimize the window.\n\nThis request asks the compositor to pop up such a window menu at\nthe given position, relative to the local surface coordinates of\nthe parent surface. There are no guarantees as to what menu items\nthe window menu contains.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event." ] pub unsafe fn zxdg_toplevel_v6_show_window_menu ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 4u32 , seat , serial , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive move\n\nStart an interactive, user-driven move of the surface.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event. The passed\nserial is used to determine the type of interactive move (touch,\npointer, etc).\n\nThe server may ignore move requests depending on the state of\nthe surface (e.g. fullscreen or maximized), or if the passed serial\nis no longer valid.\n\nIf triggered, the surface will lose the focus of the device\n(wl_pointer, wl_touch, etc) used for the move. It is up to the\ncompositor to visually indicate that the move is taking place, such as\nupdating a pointer cursor, during the move. There is no guarantee\nthat the device focus will return when the move is completed." ] pub unsafe fn zxdg_toplevel_v6_move ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , seat : * mut super :: wl_seat :: wl_seat , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 5u32 , seat , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive resize\n\nStart a user-driven, interactive resize of the surface.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event. The passed\nserial is used to determine the type of interactive resize (touch,\npointer, etc).\n\nThe server may ignore resize requests depending on the state of\nthe surface (e.g. fullscreen or maximized).\n\nIf triggered, the client will receive configure events with the\n\"resize\" state enum value and the expected sizes. See the \"resize\"\nenum value for more details about what is required. The client\nmust also acknowledge configure events using \"ack_configure\". After\nthe resize is completed, the client will receive another \"configure\"\nevent without the resize state.\n\nIf triggered, the surface also will lose the focus of the device\n(wl_pointer, wl_touch, etc) used for the resize. It is up to the\ncompositor to visually indicate that the resize is taking place,\nsuch as updating a pointer cursor, during the resize. There is no\nguarantee that the device focus will return when the resize is\ncompleted.\n\nThe edges parameter specifies how the surface should be resized,\nand is one of the values of the resize_edge enum. The compositor\nmay use this information to update the surface position for\nexample when dragging the top left corner. The compositor may also\nuse this information to adapt its behavior, e.g. choose an\nappropriate cursor image." ] pub unsafe fn zxdg_toplevel_v6_resize ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , edges : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 6u32 , seat , serial , edges , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the maximum size\n\nSet a maximum size for the window.\n\nThe client can specify a maximum size so that the compositor does\nnot try to configure the window beyond this size.\n\nThe width and height arguments are in window geometry coordinates.\nSee xdg_surface.set_window_geometry.\n\nValues set in this way are double-buffered. They will get applied\non the next commit.\n\nThe compositor can use this information to allow or disallow\ndifferent states like maximize or fullscreen and draw accurate\nanimations.\n\nSimilarly, a tiling window manager may use this information to\nplace and resize client windows in a more effective way.\n\nThe client should not rely on the compositor to obey the maximum\nsize. The compositor may decide to ignore the values set by the\nclient and request a larger size.\n\nIf never set, or a value of zero in the request, means that the\nclient has no expected maximum size in the given dimension.\nAs a result, a client wishing to reset the maximum size\nto an unspecified state can use zero for width and height in the\nrequest.\n\nRequesting a maximum size to be smaller than the minimum size of\na surface is illegal and will result in a protocol error.\n\nThe width and height must be greater than or equal to zero. Using\nstrictly negative values for width and height will result in a\nprotocol error." ] pub unsafe fn zxdg_toplevel_v6_set_max_size ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 7u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the minimum size\n\nSet a minimum size for the window.\n\nThe client can specify a minimum size so that the compositor does\nnot try to configure the window below this size.\n\nThe width and height arguments are in window geometry coordinates.\nSee xdg_surface.set_window_geometry.\n\nValues set in this way are double-buffered. They will get applied\non the next commit.\n\nThe compositor can use this information to allow or disallow\ndifferent states like maximize or fullscreen and draw accurate\nanimations.\n\nSimilarly, a tiling window manager may use this information to\nplace and resize client windows in a more effective way.\n\nThe client should not rely on the compositor to obey the minimum\nsize. The compositor may decide to ignore the values set by the\nclient and request a smaller size.\n\nIf never set, or a value of zero in the request, means that the\nclient has no expected minimum size in the given dimension.\nAs a result, a client wishing to reset the minimum size\nto an unspecified state can use zero for width and height in the\nrequest.\n\nRequesting a minimum size to be larger than the maximum size of\na surface is illegal and will result in a protocol error.\n\nThe width and height must be greater than or equal to zero. Using\nstrictly negative values for width and height will result in a\nprotocol error." ] pub unsafe fn zxdg_toplevel_v6_set_min_size ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 8u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "maximize the window\n\nMaximize the surface.\n\nAfter requesting that the surface should be maximized, the compositor\nwill respond by emitting a configure event with the \"maximized\" state\nand the required window geometry. The client should then update its\ncontent, drawing it in a maximized state, i.e. without shadow or other\ndecoration outside of the window geometry. The client must also\nacknowledge the configure when committing the new content (see\nack_configure).\n\nIt is up to the compositor to decide how and where to maximize the\nsurface, for example which output and what region of the screen should\nbe used.\n\nIf the surface was already maximized, the compositor will still emit\na configure event with the \"maximized\" state." ] pub unsafe fn zxdg_toplevel_v6_set_maximized ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 9u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "unmaximize the window\n\nUnmaximize the surface.\n\nAfter requesting that the surface should be unmaximized, the compositor\nwill respond by emitting a configure event without the \"maximized\"\nstate. If available, the compositor will include the window geometry\ndimensions the window had prior to being maximized in the configure\nrequest. The client must then update its content, drawing it in a\nregular state, i.e. potentially with shadow, etc. The client must also\nacknowledge the configure when committing the new content (see\nack_configure).\n\nIt is up to the compositor to position the surface after it was\nunmaximized; usually the position the surface had before maximizing, if\napplicable.\n\nIf the surface was already not maximized, the compositor will still\nemit a configure event without the \"maximized\" state." ] pub unsafe fn zxdg_toplevel_v6_unset_maximized ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 10u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the window as fullscreen on a monitor\n\nMake the surface fullscreen.\n\nYou can specify an output that you would prefer to be fullscreen.\nIf this value is NULL, it's up to the compositor to choose which\ndisplay will be used to map this surface.\n\nIf the surface doesn't cover the whole output, the compositor will\nposition the surface in the center of the output and compensate with\nblack borders filling the rest of the output." ] pub unsafe fn zxdg_toplevel_v6_set_fullscreen ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 11u32 , output , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zxdg_toplevel_v6_unset_fullscreen ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 12u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the window as minimized\n\nRequest that the compositor minimize your surface. There is no\nway to know if the surface is currently minimized, nor is there\nany way to unset minimization on this surface.\n\nIf you are looking to throttle redrawing when minimized, please\ninstead use the wl_surface.frame event for this, as this will\nalso work with live previews on windows in Alt-Tab, Expose or\nsimilar compositor features." ] pub unsafe fn zxdg_toplevel_v6_set_minimized ( zxdg_toplevel_v6 : * mut super :: zxdg_toplevel_v6 :: zxdg_toplevel_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_v6 as _ , 13u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "short-lived, popup surfaces for menus\n\nA popup surface is a short-lived, temporary surface. It can be used to\nimplement for example menus, popovers, tooltips and other similar user\ninterface concepts.\n\nA popup can be made to take an explicit grab. See xdg_popup.grab for\ndetails.\n\nWhen the popup is dismissed, a popup_done event will be sent out, and at\nthe same time the surface will be unmapped. See the xdg_popup.popup_done\nevent for details.\n\nExplicitly destroying the xdg_popup object will also dismiss the popup and\nunmap the surface. Clients that want to dismiss the popup when another\nsurface of their own is clicked should dismiss the popup using the destroy\nrequest.\n\nThe parent surface must have either the xdg_toplevel or xdg_popup surface\nrole.\n\nA newly created xdg_popup will be stacked on top of all previously created\nxdg_popup surfaces associated with the same xdg_toplevel.\n\nThe parent of an xdg_popup must be mapped (see the xdg_surface\ndescription) before the xdg_popup itself.\n\nThe x and y arguments passed when creating the popup object specify\nwhere the top left of the popup should be placed, relative to the\nlocal surface coordinates of the parent surface. See\nxdg_surface.get_popup. An xdg_popup must intersect with or be at least\npartially adjacent to its parent surface.\n\nThe client must call wl_surface.commit on the corresponding wl_surface\nfor the xdg_popup state to take effect." ] pub mod zxdg_popup_v6 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_popup_v6 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "tried to grab after being mapped" ] invalid_grab = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_grab ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zxdg_popup_v6_requests_grab_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_popup_v6_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"grab\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & zxdg_popup_v6_requests_grab_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_popup_v6_events : [ wl_message ; 2 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"popup_done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_popup_v6_interface : wl_interface = wl_interface { name : b"zxdg_popup_v6\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_popup_v6_requests as * const _ } , event_count : 2 , events : unsafe { & zxdg_popup_v6_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_popup_v6_listener { # [ doc = "configure the popup surface\n\nThis event asks the popup surface to configure itself given the\nconfiguration. The configured state should not be applied immediately.\nSee xdg_surface.configure for details.\n\nThe x and y arguments represent the position the popup was placed at\ngiven the xdg_positioner rule, relative to the upper left corner of the\nwindow geometry of the parent surface." ] fn configure ( & mut self , object : * mut zxdg_popup_v6 , x : i32 , y : i32 , width : i32 , height : i32 ) { } # [ doc = "popup interaction is done\n\nThe popup_done event is sent out when a popup is dismissed by the\ncompositor. The client should destroy the xdg_popup object at this\npoint." ] fn popup_done ( & mut self , object : * mut zxdg_popup_v6 , ) { } } pub unsafe fn zxdg_popup_v6_set_user_data ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_popup_v6 as _ , user_data ) ; } pub unsafe fn zxdg_popup_v6_get_user_data ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_popup_v6 as _ ) ; } pub unsafe fn zxdg_popup_v6_get_version ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_popup_v6 as _ ) ; } pub unsafe fn zxdg_popup_v6_add_listener ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_popup_v6 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_popup_v6_add_rust_listener ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 , listener : & dyn zxdg_popup_v6_listener ) -> bool { let to = ( listener as * const dyn zxdg_popup_v6_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_popup_v6_add_listener ( zxdg_popup_v6 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "remove xdg_popup interface\n\nThis destroys the popup. Explicitly destroying the xdg_popup\nobject will also dismiss the popup, and unmap the surface.\n\nIf this xdg_popup is not the \"topmost\" popup, a protocol error\nwill be sent." ] pub unsafe fn zxdg_popup_v6_destroy ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_popup_v6 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_popup_v6 as _ ) ; } # [ doc = "make the popup take an explicit grab\n\nThis request makes the created popup take an explicit grab. An explicit\ngrab will be dismissed when the user dismisses the popup, or when the\nclient destroys the xdg_popup. This can be done by the user clicking\noutside the surface, using the keyboard, or even locking the screen\nthrough closing the lid or a timeout.\n\nIf the compositor denies the grab, the popup will be immediately\ndismissed.\n\nThis request must be used in response to some sort of user action like a\nbutton press, key press, or touch down event. The serial number of the\nevent should be passed as 'serial'.\n\nThe parent of a grabbing popup must either be an xdg_toplevel surface or\nanother xdg_popup with an explicit grab. If the parent is another\nxdg_popup it means that the popups are nested, with this popup now being\nthe topmost popup.\n\nNested popups must be destroyed in the reverse order they were created\nin, e.g. the only popup you are allowed to destroy at all times is the\ntopmost one.\n\nWhen compositors choose to dismiss a popup, they may dismiss every\nnested grabbing popup as well. When a compositor dismisses popups, it\nwill follow the same dismissing order as required from the client.\n\nThe parent of a grabbing popup must either be another xdg_popup with an\nactive explicit grab, or an xdg_popup or xdg_toplevel, if there are no\nexplicit grabs already taken.\n\nIf the topmost grabbing popup is destroyed, the grab will be returned to\nthe parent of the popup, if that parent previously had an explicit grab.\n\nIf the parent is a grabbing popup which has already been dismissed, this\npopup will be immediately dismissed. If the parent is a popup that did\nnot take an explicit grab, an error will be raised.\n\nDuring a popup grab, the client owning the grab will receive pointer\nand touch events for all their surfaces as normal (similar to an\n\"owner-events\" grab in X11 parlance), while the top most grabbing popup\nwill always have keyboard focus." ] pub unsafe fn zxdg_popup_v6_grab ( zxdg_popup_v6 : * mut super :: zxdg_popup_v6 :: zxdg_popup_v6 , seat : * mut super :: wl_seat :: wl_seat , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_popup_v6 as _ , 1u32 , seat , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod presentation_time { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "timed presentation related wl_surface requests\n\nThe main feature of this interface is accurate presentation\ntiming feedback to ensure smooth video playback while maintaining\naudio/video synchronization. Some features use the concept of a\npresentation clock, which is defined in the\npresentation.clock_id event.\n\nA content update for a wl_surface is submitted by a\nwl_surface.commit request. Request 'feedback' associates with\nthe wl_surface.commit and provides feedback on the content\nupdate, particularly the final realized presentation time.\n\n\n\nWhen the final realized presentation time is available, e.g.\nafter a framebuffer flip completes, the requested\npresentation_feedback.presented events are sent. The final\npresentation time can differ from the compositor's predicted\ndisplay update time and the update's target time, especially\nwhen the compositor misses its target vertical blanking period." ] pub mod wp_presentation { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_presentation { } # [ doc = "fatal presentation errors\n\nThese fatal protocol errors may be emitted in response to\nillegal presentation requests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "invalid value in tv_nsec" ] invalid_timestamp = 0 , # [ doc = "invalid flag" ] invalid_flag = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_timestamp ) , 1 => Some ( error :: invalid_flag ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wp_presentation_requests_feedback_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wp_presentation_feedback :: wp_presentation_feedback_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_presentation_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"feedback\0" as * const u8 as * const c_char , signature : b"on\0" as * const u8 as * const c_char , types : unsafe { & wp_presentation_requests_feedback_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_presentation_events : [ wl_message ; 1 ] = [ wl_message { name : b"clock_id\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_presentation_interface : wl_interface = wl_interface { name : b"wp_presentation\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & wp_presentation_requests as * const _ } , event_count : 1 , events : unsafe { & wp_presentation_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wp_presentation_listener { # [ doc = "clock ID for timestamps\n\nThis event tells the client in which clock domain the\ncompositor interprets the timestamps used by the presentation\nextension. This clock is called the presentation clock.\n\nThe compositor sends this event when the client binds to the\npresentation interface. The presentation clock does not change\nduring the lifetime of the client connection.\n\nThe clock identifier is platform dependent. On Linux/glibc,\nthe identifier value is one of the clockid_t values accepted\nby clock_gettime(). clock_gettime() is defined by\nPOSIX.1-2001.\n\nTimestamps in this clock domain are expressed as tv_sec_hi,\ntv_sec_lo, tv_nsec triples, each component being an unsigned\n32-bit value. Whole seconds are in tv_sec which is a 64-bit\nvalue combined from tv_sec_hi and tv_sec_lo, and the\nadditional fractional part in tv_nsec as nanoseconds. Hence,\nfor valid timestamps tv_nsec must be in [0, 999999999].\n\nNote that clock_id applies only to the presentation clock,\nand implies nothing about e.g. the timestamps used in the\nWayland core protocol input events.\n\nCompositors should prefer a clock which does not jump and is\nnot slewed e.g. by NTP. The absolute value of the clock is\nirrelevant. Precision of one millisecond or better is\nrecommended. Clients must be able to query the current clock\nvalue directly, not by asking the compositor." ] fn clock_id ( & mut self , object : * mut wp_presentation , clk_id : u32 ) { } } pub unsafe fn wp_presentation_set_user_data ( wp_presentation : * mut super :: wp_presentation :: wp_presentation , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_presentation as _ , user_data ) ; } pub unsafe fn wp_presentation_get_user_data ( wp_presentation : * mut super :: wp_presentation :: wp_presentation ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_presentation as _ ) ; } pub unsafe fn wp_presentation_get_version ( wp_presentation : * mut super :: wp_presentation :: wp_presentation ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_presentation as _ ) ; } pub unsafe fn wp_presentation_add_listener ( wp_presentation : * mut super :: wp_presentation :: wp_presentation , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_presentation as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_presentation_add_rust_listener ( wp_presentation : * mut super :: wp_presentation :: wp_presentation , listener : & dyn wp_presentation_listener ) -> bool { let to = ( listener as * const dyn wp_presentation_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_presentation_add_listener ( wp_presentation as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "unbind from the presentation interface\n\nInforms the server that the client will no longer be using\nthis protocol object. Existing objects created by this object\nare not affected." ] pub unsafe fn wp_presentation_destroy ( wp_presentation : * mut super :: wp_presentation :: wp_presentation ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_presentation as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_presentation as _ ) ; } # [ doc = "request presentation feedback information\n\nRequest presentation feedback for the current content submission\non the given surface. This creates a new presentation_feedback\nobject, which will deliver the feedback information once. If\nmultiple presentation_feedback objects are created for the same\nsubmission, they will all deliver the same information.\n\nFor details on what information is returned, see the\npresentation_feedback interface." ] pub unsafe fn wp_presentation_feedback ( wp_presentation : * mut super :: wp_presentation :: wp_presentation , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: wp_presentation_feedback :: wp_presentation_feedback { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wp_presentation as _ , 1u32 , & super :: wp_presentation_feedback :: wp_presentation_feedback_interface as * const _ , surface , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "presentation time feedback event\n\nA presentation_feedback object returns an indication that a\nwl_surface content update has become visible to the user.\nOne object corresponds to one content update submission\n(wl_surface.commit). There are two possible outcomes: the\ncontent update is presented to the user, and a presentation\ntimestamp delivered; or, the user did not see the content\nupdate because it was superseded or its surface destroyed,\nand the content update is discarded.\n\nOnce a presentation_feedback object has delivered a 'presented'\nor 'discarded' event it is automatically destroyed." ] pub mod wp_presentation_feedback { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_presentation_feedback { } bitflags ! { # [ doc = "bitmask of flags in presented event\n\nThese flags provide information about how the presentation of\nthe related content update was done. The intent is to help\nclients assess the reliability of the feedback and the visual\nquality with respect to possible tearing and timings." ] pub struct kind : u32 { # [ doc = "presentation was vsync'd\n\nThe presentation was synchronized to the \"vertical retrace\" by\nthe display hardware such that tearing does not happen.\nRelying on user space scheduling is not acceptable for this\nflag. If presentation is done by a copy to the active\nfrontbuffer, then it must guarantee that tearing cannot\nhappen." ] const vsync = 1 ; # [ doc = "hardware provided the presentation timestamp\n\nThe display hardware provided measurements that the hardware\ndriver converted into a presentation timestamp. Sampling a\nclock in user space is not acceptable for this flag." ] const hw_clock = 2 ; # [ doc = "hardware signalled the start of the presentation\n\nThe display hardware signalled that it started using the new\nimage content. The opposite of this is e.g. a timer being used\nto guess when the display hardware has switched to the new\nimage content." ] const hw_completion = 4 ; # [ doc = "presentation was done zero-copy\n\nThe presentation of this update was done zero-copy. This means\nthe buffer from the client was given to display hardware as\nis, without copying it. Compositing with OpenGL counts as\ncopying, even if textured directly from the client buffer.\nPossible zero-copy cases include direct scanout of a\nfullscreen surface and a surface on a hardware overlay." ] const zero_copy = 8 ; } } impl kind { pub fn from_raw ( n : u32 ) -> Option < kind > { Some ( kind :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } static mut wp_presentation_feedback_events_sync_output_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_presentation_feedback_events : [ wl_message ; 3 ] = [ wl_message { name : b"sync_output\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wp_presentation_feedback_events_sync_output_types as * const _ } , } , wl_message { name : b"presented\0" as * const u8 as * const c_char , signature : b"uuuuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"discarded\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_presentation_feedback_interface : wl_interface = wl_interface { name : b"wp_presentation_feedback\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 3 , events : unsafe { & wp_presentation_feedback_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wp_presentation_feedback_listener { # [ doc = "presentation synchronized to this output\n\nAs presentation can be synchronized to only one output at a\ntime, this event tells which output it was. This event is only\nsent prior to the presented event.\n\nAs clients may bind to the same global wl_output multiple\ntimes, this event is sent for each bound instance that matches\nthe synchronized output. If a client has not bound to the\nright wl_output global at all, this event is not sent." ] fn sync_output ( & mut self , object : * mut wp_presentation_feedback , output : * mut super :: wl_output :: wl_output ) { } # [ doc = "the content update was displayed\n\nThe associated content update was displayed to the user at the\nindicated time (tv_sec_hi/lo, tv_nsec). For the interpretation of\nthe timestamp, see presentation.clock_id event.\n\nThe timestamp corresponds to the time when the content update\nturned into light the first time on the surface's main output.\nCompositors may approximate this from the framebuffer flip\ncompletion events from the system, and the latency of the\nphysical display path if known.\n\nThis event is preceded by all related sync_output events\ntelling which output's refresh cycle the feedback corresponds\nto, i.e. the main output for the surface. Compositors are\nrecommended to choose the output containing the largest part\nof the wl_surface, or keeping the output they previously\nchose. Having a stable presentation output association helps\nclients predict future output refreshes (vblank).\n\nThe 'refresh' argument gives the compositor's prediction of how\nmany nanoseconds after tv_sec, tv_nsec the very next output\nrefresh may occur. This is to further aid clients in\npredicting future refreshes, i.e., estimating the timestamps\ntargeting the next few vblanks. If such prediction cannot\nusefully be done, the argument is zero.\n\nIf the output does not have a constant refresh rate, explicit\nvideo mode switches excluded, then the refresh argument must\nbe zero.\n\nThe 64-bit value combined from seq_hi and seq_lo is the value\nof the output's vertical retrace counter when the content\nupdate was first scanned out to the display. This value must\nbe compatible with the definition of MSC in\nGLX_OML_sync_control specification. Note, that if the display\npath has a non-zero latency, the time instant specified by\nthis counter may differ from the timestamp's.\n\nIf the output does not have a concept of vertical retrace or a\nrefresh cycle, or the output device is self-refreshing without\na way to query the refresh count, then the arguments seq_hi\nand seq_lo must be zero." ] fn presented ( & mut self , object : * mut wp_presentation_feedback , tv_sec_hi : u32 , tv_sec_lo : u32 , tv_nsec : u32 , refresh : u32 , seq_hi : u32 , seq_lo : u32 , flags : kind ) { } # [ doc = "the content update was not displayed\n\nThe content update was never displayed to the user." ] fn discarded ( & mut self , object : * mut wp_presentation_feedback , ) { } } pub unsafe fn wp_presentation_feedback_set_user_data ( wp_presentation_feedback : * mut super :: wp_presentation_feedback :: wp_presentation_feedback , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_presentation_feedback as _ , user_data ) ; } pub unsafe fn wp_presentation_feedback_get_user_data ( wp_presentation_feedback : * mut super :: wp_presentation_feedback :: wp_presentation_feedback ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_presentation_feedback as _ ) ; } pub unsafe fn wp_presentation_feedback_get_version ( wp_presentation_feedback : * mut super :: wp_presentation_feedback :: wp_presentation_feedback ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_presentation_feedback as _ ) ; } pub unsafe fn wp_presentation_feedback_add_listener ( wp_presentation_feedback : * mut super :: wp_presentation_feedback :: wp_presentation_feedback , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_presentation_feedback as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_presentation_feedback_add_rust_listener ( wp_presentation_feedback : * mut super :: wp_presentation_feedback :: wp_presentation_feedback , listener : & dyn wp_presentation_feedback_listener ) -> bool { let to = ( listener as * const dyn wp_presentation_feedback_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_presentation_feedback_add_listener ( wp_presentation_feedback as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wp_presentation_feedback_destroy ( wp_presentation_feedback : * mut super :: wp_presentation_feedback :: wp_presentation_feedback ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_presentation_feedback as _ ) ; } } } pub mod fullscreen_shell { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Displays a single surface per output\n\nDisplays a single surface per output.\n\nThis interface provides a mechanism for a single client to display\nsimple full-screen surfaces. While there technically may be multiple\nclients bound to this interface, only one of those clients should be\nshown at a time.\n\nTo present a surface, the client uses either the present_surface or\npresent_surface_for_mode requests. Presenting a surface takes effect\non the next wl_surface.commit. See the individual requests for\ndetails about scaling and mode switches.\n\nThe client can have at most one surface per output at any time.\nRequesting a surface be presented on an output that already has a\nsurface replaces the previously presented surface. Presenting a null\nsurface removes its content and effectively disables the output.\nExactly what happens when an output is \"disabled\" is\ncompositor-specific. The same surface may be presented on multiple\noutputs simultaneously.\n\nOnce a surface is presented on an output, it stays on that output\nuntil either the client removes it or the compositor destroys the\noutput. This way, the client can update the output's contents by\nsimply attaching a new buffer." ] pub mod _wl_fullscreen_shell { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum _wl_fullscreen_shell { } # [ doc = "capabilities advertised by the compositor\n\nVarious capabilities that can be advertised by the compositor. They\nare advertised one-at-a-time when the wl_fullscreen_shell interface is\nbound. See the wl_fullscreen_shell.capability event for more details.\n\nARBITRARY_MODE:\nThis is a hint to the client that indicates that the compositor is\ncapable of setting practically any mode on its outputs. If this\ncapability is provided, wl_fullscreen_shell.present_surface_for_mode\nwill almost never fail and clients should feel free to set whatever\nmode they like. If the compositor does not advertise this, it may\nstill support some modes that are not advertised through wl_global.mode\nbut it is less likely.\n\nCURSOR_PLANE:\nThis is a hint to the client that indicates that the compositor can\nhandle a cursor surface from the client without actually compositing.\nThis may be because of a hardware cursor plane or some other mechanism.\nIf the compositor does not advertise this capability then setting\nwl_pointer.cursor may degrade performance or be ignored entirely. If\nCURSOR_PLANE is not advertised, it is recommended that the client draw\nits own cursor and set wl_pointer.cursor(NULL)." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum capability { # [ doc = "compositor is capable of almost any output mode" ] arbitrary_modes = 1 , # [ doc = "compositor has a separate cursor plane" ] cursor_plane = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { match n { 1 => Some ( capability :: arbitrary_modes ) , 2 => Some ( capability :: cursor_plane ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "different method to set the surface fullscreen\n\nHints to indicate to the compositor how to deal with a conflict\nbetween the dimensions of the surface and the dimensions of the\noutput. The compositor is free to ignore this parameter." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum present_method { # [ doc = "no preference, apply default policy" ] default = 0 , # [ doc = "center the surface on the output" ] center = 1 , # [ doc = "scale the surface, preserving aspect ratio, to the largest size that will fit on the output" ] zoom = 2 , # [ doc = "scale the surface, preserving aspect ratio, to fully fill the output cropping if needed" ] zoom_crop = 3 , # [ doc = "scale the surface to the size of the output ignoring aspect ratio" ] stretch = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl present_method { pub fn from_raw ( n : u32 ) -> Option < present_method > { match n { 0 => Some ( present_method :: default ) , 1 => Some ( present_method :: center ) , 2 => Some ( present_method :: zoom ) , 3 => Some ( present_method :: zoom_crop ) , 4 => Some ( present_method :: stretch ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "wl_fullscreen_shell error values\n\nThese errors can be emitted in response to wl_fullscreen_shell requests" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "present_method is not known" ] invalid_method = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_method ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut _wl_fullscreen_shell_requests_present_surface_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , NULLPTR as * const wl_interface , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; static mut _wl_fullscreen_shell_requests_present_surface_for_mode_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , NULLPTR as * const wl_interface , unsafe { & super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut _wl_fullscreen_shell_requests : [ wl_message ; 3 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"present_surface\0" as * const u8 as * const c_char , signature : b"?ou?o\0" as * const u8 as * const c_char , types : unsafe { & _wl_fullscreen_shell_requests_present_surface_types as * const _ } , } , wl_message { name : b"present_surface_for_mode\0" as * const u8 as * const c_char , signature : b"ooin\0" as * const u8 as * const c_char , types : unsafe { & _wl_fullscreen_shell_requests_present_surface_for_mode_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut _wl_fullscreen_shell_events : [ wl_message ; 1 ] = [ wl_message { name : b"capability\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut _wl_fullscreen_shell_interface : wl_interface = wl_interface { name : b"_wl_fullscreen_shell\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & _wl_fullscreen_shell_requests as * const _ } , event_count : 1 , events : unsafe { & _wl_fullscreen_shell_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait _wl_fullscreen_shell_listener { # [ doc = "advertises a capability of the compositor\n\nAdvertises a single capability of the compositor.\n\nWhen the wl_fullscreen_shell interface is bound, this event is emitted\nonce for each capability advertised. Valid capabilities are given by\nthe wl_fullscreen_shell.capability enum. If clients want to take\nadvantage of any of these capabilities, they should use a\nwl_display.sync request immediately after binding to ensure that they\nreceive all the capability events." ] fn capability ( & mut self , object : * mut _wl_fullscreen_shell , capability : u32 ) { } } pub unsafe fn _wl_fullscreen_shell_set_user_data ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , _wl_fullscreen_shell as _ , user_data ) ; } pub unsafe fn _wl_fullscreen_shell_get_user_data ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , _wl_fullscreen_shell as _ ) ; } pub unsafe fn _wl_fullscreen_shell_get_version ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , _wl_fullscreen_shell as _ ) ; } pub unsafe fn _wl_fullscreen_shell_add_listener ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , _wl_fullscreen_shell as _ , listener as _ , data as _ ) ; } pub unsafe fn _wl_fullscreen_shell_add_rust_listener ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell , listener : & dyn _wl_fullscreen_shell_listener ) -> bool { let to = ( listener as * const dyn _wl_fullscreen_shell_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return _wl_fullscreen_shell_add_listener ( _wl_fullscreen_shell as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn _wl_fullscreen_shell_destroy ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , _wl_fullscreen_shell as _ ) ; } # [ doc = "release the wl_fullscreen_shell interface\n\nRelease the binding from the wl_fullscreen_shell interface\n\nThis destroys the server-side object and frees this binding. If\nthe client binds to wl_fullscreen_shell multiple times, it may wish\nto free some of those bindings." ] pub unsafe fn _wl_fullscreen_shell_release ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , _wl_fullscreen_shell as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , _wl_fullscreen_shell as _ ) ; } # [ doc = "present surface for display\n\nPresent a surface on the given output.\n\nIf the output is null, the compositor will present the surface on\nwhatever display (or displays) it thinks best. In particular, this\nmay replace any or all surfaces currently presented so it should\nnot be used in combination with placing surfaces on specific\noutputs.\n\nThe method parameter is a hint to the compositor for how the surface\nis to be presented. In particular, it tells the compostior how to\nhandle a size mismatch between the presented surface and the\noutput. The compositor is free to ignore this parameter.\n\nThe \"zoom\", \"zoom_crop\", and \"stretch\" methods imply a scaling\noperation on the surface. This will override any kind of output\nscaling, so the buffer_scale property of the surface is effectively\nignored." ] pub unsafe fn _wl_fullscreen_shell_present_surface ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell , surface : * mut super :: wl_surface :: wl_surface , method : u32 , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , _wl_fullscreen_shell as _ , 1u32 , surface , method , output , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "present surface for display at a particular mode\n\nPresents a surface on the given output for a particular mode.\n\nIf the current size of the output differs from that of the surface,\nthe compositor will attempt to change the size of the output to\nmatch the surface. The result of the mode-switch operation will be\nreturned via the provided wl_fullscreen_shell_mode_feedback object.\n\nIf the current output mode matches the one requested or if the\ncompositor successfully switches the mode to match the surface,\nthen the mode_successful event will be sent and the output will\ncontain the contents of the given surface. If the compositor\ncannot match the output size to the surface size, the mode_failed\nwill be sent and the output will contain the contents of the\npreviously presented surface (if any). If another surface is\npresented on the given output before either of these has a chance\nto happen, the present_cancelled event will be sent.\n\nDue to race conditions and other issues unknown to the client, no\nmode-switch operation is guaranteed to succeed. However, if the\nmode is one advertised by wl_output.mode or if the compositor\nadvertises the ARBITRARY_MODES capability, then the client should\nexpect that the mode-switch operation will usually succeed.\n\nIf the size of the presented surface changes, the resulting output\nis undefined. The compositor may attempt to change the output mode\nto compensate. However, there is no guarantee that a suitable mode\nwill be found and the client has no way to be notified of success\nor failure.\n\nThe framerate parameter specifies the desired framerate for the\noutput in mHz. The compositor is free to ignore this parameter. A\nvalue of 0 indicates that the client has no preference.\n\nIf the value of wl_output.scale differs from wl_surface.buffer_scale,\nthen the compositor may choose a mode that matches either the buffer\nsize or the surface size. In either case, the surface will fill the\noutput." ] pub unsafe fn _wl_fullscreen_shell_present_surface_for_mode ( _wl_fullscreen_shell : * mut super :: _wl_fullscreen_shell :: _wl_fullscreen_shell , surface : * mut super :: wl_surface :: wl_surface , output : * mut super :: wl_output :: wl_output , framerate : i32 ) -> * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , _wl_fullscreen_shell as _ , 2u32 , & super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback_interface as * const _ , surface , output , framerate , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } pub mod _wl_fullscreen_shell_mode_feedback { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum _wl_fullscreen_shell_mode_feedback { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut _wl_fullscreen_shell_mode_feedback_events : [ wl_message ; 3 ] = [ wl_message { name : b"mode_successful\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"mode_failed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"present_cancelled\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut _wl_fullscreen_shell_mode_feedback_interface : wl_interface = wl_interface { name : b"_wl_fullscreen_shell_mode_feedback\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 3 , events : unsafe { & _wl_fullscreen_shell_mode_feedback_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait _wl_fullscreen_shell_mode_feedback_listener { # [ doc = "mode switch succeeded\n\nThis event indicates that the attempted mode switch operation was\nsuccessful. A surface of the size requested in the mode switch\nwill fill the output without scaling.\n\nUpon receiving this event, the client should destroy the\nwl_fullscreen_shell_mode_feedback object." ] fn mode_successful ( & mut self , object : * mut _wl_fullscreen_shell_mode_feedback , ) { } # [ doc = "mode switch failed\n\nThis event indicates that the attempted mode switch operation\nfailed. This may be because the requested output mode is not\npossible or it may mean that the compositor does not want to allow it.\n\nUpon receiving this event, the client should destroy the\nwl_fullscreen_shell_mode_feedback object." ] fn mode_failed ( & mut self , object : * mut _wl_fullscreen_shell_mode_feedback , ) { } # [ doc = "mode switch cancelled\n\nThis event indicates that the attempted mode switch operation was\ncancelled. Most likely this is because the client requested a\nsecond mode switch before the first one completed.\n\nUpon receiving this event, the client should destroy the\nwl_fullscreen_shell_mode_feedback object." ] fn present_cancelled ( & mut self , object : * mut _wl_fullscreen_shell_mode_feedback , ) { } } pub unsafe fn _wl_fullscreen_shell_mode_feedback_set_user_data ( _wl_fullscreen_shell_mode_feedback : * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , _wl_fullscreen_shell_mode_feedback as _ , user_data ) ; } pub unsafe fn _wl_fullscreen_shell_mode_feedback_get_user_data ( _wl_fullscreen_shell_mode_feedback : * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , _wl_fullscreen_shell_mode_feedback as _ ) ; } pub unsafe fn _wl_fullscreen_shell_mode_feedback_get_version ( _wl_fullscreen_shell_mode_feedback : * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , _wl_fullscreen_shell_mode_feedback as _ ) ; } pub unsafe fn _wl_fullscreen_shell_mode_feedback_add_listener ( _wl_fullscreen_shell_mode_feedback : * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , _wl_fullscreen_shell_mode_feedback as _ , listener as _ , data as _ ) ; } pub unsafe fn _wl_fullscreen_shell_mode_feedback_add_rust_listener ( _wl_fullscreen_shell_mode_feedback : * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback , listener : & dyn _wl_fullscreen_shell_mode_feedback_listener ) -> bool { let to = ( listener as * const dyn _wl_fullscreen_shell_mode_feedback_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return _wl_fullscreen_shell_mode_feedback_add_listener ( _wl_fullscreen_shell_mode_feedback as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn _wl_fullscreen_shell_mode_feedback_destroy ( _wl_fullscreen_shell_mode_feedback : * mut super :: _wl_fullscreen_shell_mode_feedback :: _wl_fullscreen_shell_mode_feedback ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , _wl_fullscreen_shell_mode_feedback as _ ) ; } } } pub mod xdg_shell { use super :: wayland :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "create desktop-style surfaces\n\nThe xdg_wm_base interface is exposed as a global object enabling clients\nto turn their wl_surfaces into windows in a desktop environment. It\ndefines the basic functionality needed for clients and the compositor to\ncreate windows that can be dragged, resized, maximized, etc, as well as\ncreating transient windows such as popup menus." ] pub mod xdg_wm_base { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_wm_base { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc = "xdg_wm_base was destroyed before children" ] defunct_surfaces = 1 , # [ doc = "the client tried to map or destroy a non-topmost popup" ] not_the_topmost_popup = 2 , # [ doc = "the client specified an invalid popup parent surface" ] invalid_popup_parent = 3 , # [ doc = "the client provided an invalid surface state" ] invalid_surface_state = 4 , # [ doc = "the client provided an invalid positioner" ] invalid_positioner = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , 1 => Some ( error :: defunct_surfaces ) , 2 => Some ( error :: not_the_topmost_popup ) , 3 => Some ( error :: invalid_popup_parent ) , 4 => Some ( error :: invalid_surface_state ) , 5 => Some ( error :: invalid_positioner ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_wm_base_requests_create_positioner_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: xdg_positioner :: xdg_positioner_interface as * const wl_interface } , ] ; static mut xdg_wm_base_requests_get_xdg_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: xdg_surface :: xdg_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_wm_base_requests : [ wl_message ; 4 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"create_positioner\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & xdg_wm_base_requests_create_positioner_types as * const _ } , } , wl_message { name : b"get_xdg_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & xdg_wm_base_requests_get_xdg_surface_types as * const _ } , } , wl_message { name : b"pong\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_wm_base_events : [ wl_message ; 1 ] = [ wl_message { name : b"ping\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_wm_base_interface : wl_interface = wl_interface { name : b"xdg_wm_base\0" as * const u8 as * const c_char , version : 3 , request_count : 4 , requests : unsafe { & xdg_wm_base_requests as * const _ } , event_count : 1 , events : unsafe { & xdg_wm_base_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_wm_base_listener { # [ doc = "check if the client is alive\n\nThe ping event asks the client if it's still alive. Pass the\nserial specified in the event back to the compositor by sending\na \"pong\" request back with the specified serial. See xdg_wm_base.pong.\n\nCompositors can use this to determine if the client is still\nalive. It's unspecified what will happen if the client doesn't\nrespond to the ping request, or in what timeframe. Clients should\ntry to respond in a reasonable amount of time.\n\nA compositor is free to ping in any way it wants, but a client must\nalways respond to any xdg_wm_base object it created." ] fn ping ( & mut self , object : * mut xdg_wm_base , serial : u32 ) { } } pub unsafe fn xdg_wm_base_set_user_data ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_wm_base as _ , user_data ) ; } pub unsafe fn xdg_wm_base_get_user_data ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_wm_base as _ ) ; } pub unsafe fn xdg_wm_base_get_version ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_wm_base as _ ) ; } pub unsafe fn xdg_wm_base_add_listener ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_wm_base as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_wm_base_add_rust_listener ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base , listener : & dyn xdg_wm_base_listener ) -> bool { let to = ( listener as * const dyn xdg_wm_base_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_wm_base_add_listener ( xdg_wm_base as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy xdg_wm_base\n\nDestroy this xdg_wm_base object.\n\nDestroying a bound xdg_wm_base object while there are surfaces\nstill alive created by this xdg_wm_base object instance is illegal\nand will result in a protocol error." ] pub unsafe fn xdg_wm_base_destroy ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_wm_base as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_wm_base as _ ) ; } # [ doc = "create a positioner object\n\nCreate a positioner object. A positioner object is used to position\nsurfaces relative to some parent surface. See the interface description\nand xdg_surface.get_popup for details." ] pub unsafe fn xdg_wm_base_create_positioner ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base ) -> * mut super :: xdg_positioner :: xdg_positioner { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_wm_base as _ , 1u32 , & super :: xdg_positioner :: xdg_positioner_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "create a shell surface from a surface\n\nThis creates an xdg_surface for the given surface. While xdg_surface\nitself is not a role, the corresponding surface may only be assigned\na role extending xdg_surface, such as xdg_toplevel or xdg_popup. It is\nillegal to create an xdg_surface for a wl_surface which already has an\nassigned role and this will result in a protocol error.\n\nThis creates an xdg_surface for the given surface. An xdg_surface is\nused as basis to define a role to a given surface, such as xdg_toplevel\nor xdg_popup. It also manages functionality shared between xdg_surface\nbased surface roles.\n\nSee the documentation of xdg_surface for more details about what an\nxdg_surface is and how it is used." ] pub unsafe fn xdg_wm_base_get_xdg_surface ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: xdg_surface :: xdg_surface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_wm_base as _ , 2u32 , & super :: xdg_surface :: xdg_surface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } # [ doc = "respond to a ping event\n\nA client must respond to a ping event with a pong request or\nthe client may be deemed unresponsive. See xdg_wm_base.ping." ] pub unsafe fn xdg_wm_base_pong ( xdg_wm_base : * mut super :: xdg_wm_base :: xdg_wm_base , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_wm_base as _ , 3u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "child surface positioner\n\nThe xdg_positioner provides a collection of rules for the placement of a\nchild surface relative to a parent surface. Rules can be defined to ensure\nthe child surface remains within the visible area's borders, and to\nspecify how the child surface changes its position, such as sliding along\nan axis, or flipping around a rectangle. These positioner-created rules are\nconstrained by the requirement that a child surface must intersect with or\nbe at least partially adjacent to its parent surface.\n\nSee the various requests for details about possible rules.\n\nAt the time of the request, the compositor makes a copy of the rules\nspecified by the xdg_positioner. Thus, after the request is complete the\nxdg_positioner object can be destroyed or reused; further changes to the\nobject will have no effect on previous usages.\n\nFor an xdg_positioner object to be considered complete, it must have a\nnon-zero size set by set_size, and a non-zero anchor rectangle set by\nset_anchor_rect. Passing an incomplete xdg_positioner object when\npositioning a surface raises an error." ] pub mod xdg_positioner { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_positioner { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "invalid input provided" ] invalid_input = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_input ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum anchor { none = 0 , top = 1 , bottom = 2 , left = 3 , right = 4 , top_left = 5 , bottom_left = 6 , top_right = 7 , bottom_right = 8 , # [ doc ( hidden ) ] __nonexhaustive , } impl anchor { pub fn from_raw ( n : u32 ) -> Option < anchor > { match n { 0 => Some ( anchor :: none ) , 1 => Some ( anchor :: top ) , 2 => Some ( anchor :: bottom ) , 3 => Some ( anchor :: left ) , 4 => Some ( anchor :: right ) , 5 => Some ( anchor :: top_left ) , 6 => Some ( anchor :: bottom_left ) , 7 => Some ( anchor :: top_right ) , 8 => Some ( anchor :: bottom_right ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum gravity { none = 0 , top = 1 , bottom = 2 , left = 3 , right = 4 , top_left = 5 , bottom_left = 6 , top_right = 7 , bottom_right = 8 , # [ doc ( hidden ) ] __nonexhaustive , } impl gravity { pub fn from_raw ( n : u32 ) -> Option < gravity > { match n { 0 => Some ( gravity :: none ) , 1 => Some ( gravity :: top ) , 2 => Some ( gravity :: bottom ) , 3 => Some ( gravity :: left ) , 4 => Some ( gravity :: right ) , 5 => Some ( gravity :: top_left ) , 6 => Some ( gravity :: bottom_left ) , 7 => Some ( gravity :: top_right ) , 8 => Some ( gravity :: bottom_right ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { # [ doc = "constraint adjustments\n\nThe constraint adjustment value define ways the compositor will adjust\nthe position of the surface, if the unadjusted position would result\nin the surface being partly constrained.\n\nWhether a surface is considered 'constrained' is left to the compositor\nto determine. For example, the surface may be partly outside the\ncompositor's defined 'work area', thus necessitating the child surface's\nposition be adjusted until it is entirely inside the work area.\n\nThe adjustments can be combined, according to a defined precedence: 1)\nFlip, 2) Slide, 3) Resize." ] pub struct constraint_adjustment : u32 { # [ doc = "don't move the child surface when constrained\n\nDon't alter the surface position even if it is constrained on some\naxis, for example partially outside the edge of an output." ] const none = 0 ; # [ doc = "move along the x axis until unconstrained\n\nSlide the surface along the x axis until it is no longer constrained.\n\nFirst try to slide towards the direction of the gravity on the x axis\nuntil either the edge in the opposite direction of the gravity is\nunconstrained or the edge in the direction of the gravity is\nconstrained.\n\nThen try to slide towards the opposite direction of the gravity on the\nx axis until either the edge in the direction of the gravity is\nunconstrained or the edge in the opposite direction of the gravity is\nconstrained." ] const slide_x = 1 ; # [ doc = "move along the y axis until unconstrained\n\nSlide the surface along the y axis until it is no longer constrained.\n\nFirst try to slide towards the direction of the gravity on the y axis\nuntil either the edge in the opposite direction of the gravity is\nunconstrained or the edge in the direction of the gravity is\nconstrained.\n\nThen try to slide towards the opposite direction of the gravity on the\ny axis until either the edge in the direction of the gravity is\nunconstrained or the edge in the opposite direction of the gravity is\nconstrained." ] const slide_y = 2 ; # [ doc = "invert the anchor and gravity on the x axis\n\nInvert the anchor and gravity on the x axis if the surface is\nconstrained on the x axis. For example, if the left edge of the\nsurface is constrained, the gravity is 'left' and the anchor is\n'left', change the gravity to 'right' and the anchor to 'right'.\n\nIf the adjusted position also ends up being constrained, the resulting\nposition of the flip_x adjustment will be the one before the\nadjustment." ] const flip_x = 4 ; # [ doc = "invert the anchor and gravity on the y axis\n\nInvert the anchor and gravity on the y axis if the surface is\nconstrained on the y axis. For example, if the bottom edge of the\nsurface is constrained, the gravity is 'bottom' and the anchor is\n'bottom', change the gravity to 'top' and the anchor to 'top'.\n\nThe adjusted position is calculated given the original anchor\nrectangle and offset, but with the new flipped anchor and gravity\nvalues.\n\nIf the adjusted position also ends up being constrained, the resulting\nposition of the flip_y adjustment will be the one before the\nadjustment." ] const flip_y = 8 ; # [ doc = "horizontally resize the surface\n\nResize the surface horizontally so that it is completely\nunconstrained." ] const resize_x = 16 ; # [ doc = "vertically resize the surface\n\nResize the surface vertically so that it is completely unconstrained." ] const resize_y = 32 ; } } impl constraint_adjustment { pub fn from_raw ( n : u32 ) -> Option < constraint_adjustment > { Some ( constraint_adjustment :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_positioner_requests : [ wl_message ; 10 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_anchor_rect\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_anchor\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_gravity\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_constraint_adjustment\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_offset\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_reactive\0" as * const u8 as * const c_char , signature : b"3\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent_size\0" as * const u8 as * const c_char , signature : b"3ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent_configure\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_positioner_interface : wl_interface = wl_interface { name : b"xdg_positioner\0" as * const u8 as * const c_char , version : 3 , request_count : 10 , requests : unsafe { & xdg_positioner_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_positioner_listener { } pub unsafe fn xdg_positioner_set_user_data ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_positioner as _ , user_data ) ; } pub unsafe fn xdg_positioner_get_user_data ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_positioner as _ ) ; } pub unsafe fn xdg_positioner_get_version ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_positioner as _ ) ; } pub unsafe fn xdg_positioner_add_listener ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_positioner as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_positioner_add_rust_listener ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , listener : & dyn xdg_positioner_listener ) -> bool { let to = ( listener as * const dyn xdg_positioner_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_positioner_add_listener ( xdg_positioner as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_positioner object\n\nNotify the compositor that the xdg_positioner will no longer be used." ] pub unsafe fn xdg_positioner_destroy ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_positioner as _ ) ; } # [ doc = "set the size of the to-be positioned rectangle\n\nSet the size of the surface that is to be positioned with the positioner\nobject. The size is in surface-local coordinates and corresponds to the\nwindow geometry. See xdg_surface.set_window_geometry.\n\nIf a zero or negative size is set the invalid_input error is raised." ] pub unsafe fn xdg_positioner_set_size ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 1u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the anchor rectangle within the parent surface\n\nSpecify the anchor rectangle within the parent surface that the child\nsurface will be placed relative to. The rectangle is relative to the\nwindow geometry as defined by xdg_surface.set_window_geometry of the\nparent surface.\n\nWhen the xdg_positioner object is used to position a child surface, the\nanchor rectangle may not extend outside the window geometry of the\npositioned child's parent surface.\n\nIf a negative size is set the invalid_input error is raised." ] pub unsafe fn xdg_positioner_set_anchor_rect ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 2u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set anchor rectangle anchor\n\nDefines the anchor point for the anchor rectangle. The specified anchor\nis used derive an anchor point that the child surface will be\npositioned relative to. If a corner anchor is set (e.g. 'top_left' or\n'bottom_right'), the anchor point will be at the specified corner;\notherwise, the derived anchor point will be centered on the specified\nedge, or in the center of the anchor rectangle if no edge is specified." ] pub unsafe fn xdg_positioner_set_anchor ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , anchor : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 3u32 , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set child surface gravity\n\nDefines in what direction a surface should be positioned, relative to\nthe anchor point of the parent surface. If a corner gravity is\nspecified (e.g. 'bottom_right' or 'top_left'), then the child surface\nwill be placed towards the specified gravity; otherwise, the child\nsurface will be centered over the anchor point on any axis that had no\ngravity specified." ] pub unsafe fn xdg_positioner_set_gravity ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , gravity : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 4u32 , gravity , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the adjustment to be done when constrained\n\nSpecify how the window should be positioned if the originally intended\nposition caused the surface to be constrained, meaning at least\npartially outside positioning boundaries set by the compositor. The\nadjustment is set by constructing a bitmask describing the adjustment to\nbe made when the surface is constrained on that axis.\n\nIf no bit for one axis is set, the compositor will assume that the child\nsurface should not change its position on that axis when constrained.\n\nIf more than one bit for one axis is set, the order of how adjustments\nare applied is specified in the corresponding adjustment descriptions.\n\nThe default adjustment is none." ] pub unsafe fn xdg_positioner_set_constraint_adjustment ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , constraint_adjustment : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 5u32 , constraint_adjustment , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface position offset\n\nSpecify the surface position offset relative to the position of the\nanchor on the anchor rectangle and the anchor on the surface. For\nexample if the anchor of the anchor rectangle is at (x, y), the surface\nhas the gravity bottom|right, and the offset is (ox, oy), the calculated\nsurface position will be (x + ox, y + oy). The offset position of the\nsurface is the one used for constraint testing. See\nset_constraint_adjustment.\n\nAn example use case is placing a popup menu on top of a user interface\nelement, while aligning the user interface element of the parent surface\nwith some user interface element placed somewhere in the popup surface." ] pub unsafe fn xdg_positioner_set_offset ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 6u32 , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "continuously reconstrain the surface\n\nWhen set reactive, the surface is reconstrained if the conditions used\nfor constraining changed, e.g. the parent window moved.\n\nIf the conditions changed and the popup was reconstrained, an\nxdg_popup.configure event is sent with updated geometry, followed by an\nxdg_surface.configure event." ] pub unsafe fn xdg_positioner_set_reactive ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 7u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Set the parent window geometry the compositor should use when\npositioning the popup. The compositor may use this information to\ndetermine the future state the popup should be constrained using. If\nthis doesn't match the dimension of the parent the popup is eventually\npositioned against, the behavior is undefined.\n\nThe arguments are given in the surface-local coordinate space." ] pub unsafe fn xdg_positioner_set_parent_size ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , parent_width : i32 , parent_height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 8u32 , parent_width , parent_height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set parent configure this is a response to\n\nSet the serial of an xdg_surface.configure event this positioner will be\nused in response to. The compositor may use this information together\nwith set_parent_size to determine what future state the popup should be\nconstrained using." ] pub unsafe fn xdg_positioner_set_parent_configure ( xdg_positioner : * mut super :: xdg_positioner :: xdg_positioner , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_positioner as _ , 9u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "desktop user interface surface base interface\n\nAn interface that may be implemented by a wl_surface, for\nimplementations that provide a desktop-style user interface.\n\nIt provides a base set of functionality required to construct user\ninterface elements requiring management by the compositor, such as\ntoplevel windows, menus, etc. The types of functionality are split into\nxdg_surface roles.\n\nCreating an xdg_surface does not set the role for a wl_surface. In order\nto map an xdg_surface, the client must create a role-specific object\nusing, e.g., get_toplevel, get_popup. The wl_surface for any given\nxdg_surface can have at most one role, and may not be assigned any role\nnot based on xdg_surface.\n\nA role must be assigned before any other requests are made to the\nxdg_surface object.\n\nThe client must call wl_surface.commit on the corresponding wl_surface\nfor the xdg_surface state to take effect.\n\nCreating an xdg_surface from a wl_surface which has a buffer attached or\ncommitted is a client error, and any attempts by a client to attach or\nmanipulate a buffer prior to the first xdg_surface.configure call must\nalso be treated as errors.\n\nAfter creating a role-specific object and setting it up, the client must\nperform an initial commit without any buffer attached. The compositor\nwill reply with an xdg_surface.configure event. The client must\nacknowledge it and is then allowed to attach a buffer to map the surface.\n\nMapping an xdg_surface-based role surface is defined as making it\npossible for the surface to be shown by the compositor. Note that\na mapped surface is not guaranteed to be visible once it is mapped.\n\nFor an xdg_surface to be mapped by the compositor, the following\nconditions must be met:\n(1) the client has assigned an xdg_surface-based role to the surface\n(2) the client has set and committed the xdg_surface state and the\nrole-dependent state to the surface\n(3) the client has committed a buffer to the surface\n\nA newly-unmapped surface is considered to have met condition (1) out\nof the 3 required conditions for mapping a surface if its role surface\nhas not been destroyed." ] pub mod xdg_surface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_surface { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { not_constructed = 1 , already_constructed = 2 , unconfigured_buffer = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 1 => Some ( error :: not_constructed ) , 2 => Some ( error :: already_constructed ) , 3 => Some ( error :: unconfigured_buffer ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_surface_requests_get_toplevel_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: xdg_toplevel :: xdg_toplevel_interface as * const wl_interface } , ] ; static mut xdg_surface_requests_get_popup_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: xdg_popup :: xdg_popup_interface as * const wl_interface } , unsafe { & super :: xdg_surface :: xdg_surface_interface as * const wl_interface } , unsafe { & super :: xdg_positioner :: xdg_positioner_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_surface_requests : [ wl_message ; 5 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_toplevel\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_get_toplevel_types as * const _ } , } , wl_message { name : b"get_popup\0" as * const u8 as * const c_char , signature : b"n?oo\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_get_popup_types as * const _ } , } , wl_message { name : b"set_window_geometry\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"ack_configure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_surface_events : [ wl_message ; 1 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_surface_interface : wl_interface = wl_interface { name : b"xdg_surface\0" as * const u8 as * const c_char , version : 3 , request_count : 5 , requests : unsafe { & xdg_surface_requests as * const _ } , event_count : 1 , events : unsafe { & xdg_surface_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_surface_listener { # [ doc = "suggest a surface change\n\nThe configure event marks the end of a configure sequence. A configure\nsequence is a set of one or more events configuring the state of the\nxdg_surface, including the final xdg_surface.configure event.\n\nWhere applicable, xdg_surface surface roles will during a configure\nsequence extend this event as a latched state sent as events before the\nxdg_surface.configure event. Such events should be considered to make up\na set of atomically applied configuration states, where the\nxdg_surface.configure commits the accumulated state.\n\nClients should arrange their surface for the new states, and then send\nan ack_configure request with the serial sent in this configure event at\nsome point before committing the new surface.\n\nIf the client receives multiple configure events before it can respond\nto one, it is free to discard all but the last event it received." ] fn configure ( & mut self , object : * mut xdg_surface , serial : u32 ) { } } pub unsafe fn xdg_surface_set_user_data ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_surface as _ , user_data ) ; } pub unsafe fn xdg_surface_get_user_data ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_surface as _ ) ; } pub unsafe fn xdg_surface_get_version ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_surface as _ ) ; } pub unsafe fn xdg_surface_add_listener ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_surface as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_surface_add_rust_listener ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , listener : & dyn xdg_surface_listener ) -> bool { let to = ( listener as * const dyn xdg_surface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_surface_add_listener ( xdg_surface as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_surface\n\nDestroy the xdg_surface object. An xdg_surface must only be destroyed\nafter its role object has been destroyed." ] pub unsafe fn xdg_surface_destroy ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_surface as _ ) ; } # [ doc = "assign the xdg_toplevel surface role\n\nThis creates an xdg_toplevel object for the given xdg_surface and gives\nthe associated wl_surface the xdg_toplevel role.\n\nSee the documentation of xdg_toplevel for more details about what an\nxdg_toplevel is and how it is used." ] pub unsafe fn xdg_surface_get_toplevel ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) -> * mut super :: xdg_toplevel :: xdg_toplevel { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_surface as _ , 1u32 , & super :: xdg_toplevel :: xdg_toplevel_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "assign the xdg_popup surface role\n\nThis creates an xdg_popup object for the given xdg_surface and gives\nthe associated wl_surface the xdg_popup role.\n\nIf null is passed as a parent, a parent surface must be specified using\nsome other protocol, before committing the initial state.\n\nSee the documentation of xdg_popup for more details about what an\nxdg_popup is and how it is used." ] pub unsafe fn xdg_surface_get_popup ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , parent : * mut super :: xdg_surface :: xdg_surface , positioner : * mut super :: xdg_positioner :: xdg_positioner ) -> * mut super :: xdg_popup :: xdg_popup { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_surface as _ , 2u32 , & super :: xdg_popup :: xdg_popup_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , parent , positioner ) ; return r as _ ; } # [ doc = "set the new window geometry\n\nThe window geometry of a surface is its \"visible bounds\" from the\nuser's perspective. Client-side decorations often have invisible\nportions like drop-shadows which should be ignored for the\npurposes of aligning, placing and constraining windows.\n\nThe window geometry is double buffered, and will be applied at the\ntime wl_surface.commit of the corresponding wl_surface is called.\n\nWhen maintaining a position, the compositor should treat the (x, y)\ncoordinate of the window geometry as the top left corner of the window.\nA client changing the (x, y) window geometry coordinate should in\ngeneral not alter the position of the window.\n\nOnce the window geometry of the surface is set, it is not possible to\nunset it, and it will remain the same until set_window_geometry is\ncalled again, even if a new subsurface or buffer is attached.\n\nIf never set, the value is the full bounds of the surface,\nincluding any subsurfaces. This updates dynamically on every\ncommit. This unset is meant for extremely simple clients.\n\nThe arguments are given in the surface-local coordinate space of\nthe wl_surface associated with this xdg_surface.\n\nThe width and height must be greater than zero. Setting an invalid size\nwill raise an error. When applied, the effective window geometry will be\nthe set window geometry clamped to the bounding rectangle of the\ncombined geometry of the surface of the xdg_surface and the associated\nsubsurfaces." ] pub unsafe fn xdg_surface_set_window_geometry ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 3u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "ack a configure event\n\nWhen a configure event is received, if a client commits the\nsurface in response to the configure event, then the client\nmust make an ack_configure request sometime before the commit\nrequest, passing along the serial of the configure event.\n\nFor instance, for toplevel surfaces the compositor might use this\ninformation to move a surface to the top left only when the client has\ndrawn itself for the maximized or fullscreen state.\n\nIf the client receives multiple configure events before it\ncan respond to one, it only has to ack the last configure event.\n\nA client is not required to commit immediately after sending\nan ack_configure request - it may even ack_configure several times\nbefore its next surface commit.\n\nA client may send multiple ack_configure requests before committing, but\nonly the last request sent before a commit indicates which configure\nevent the client really is responding to." ] pub unsafe fn xdg_surface_ack_configure ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 4u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "toplevel surface\n\nThis interface defines an xdg_surface role which allows a surface to,\namong other things, set window-like properties such as maximize,\nfullscreen, and minimize, set application-specific metadata like title and\nid, and well as trigger user interactive operations such as interactive\nresize and move.\n\nUnmapping an xdg_toplevel means that the surface cannot be shown\nby the compositor until it is explicitly mapped again.\nAll active operations (e.g., move, resize) are canceled and all\nattributes (e.g. title, state, stacking, ...) are discarded for\nan xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to\nthe state it had right after xdg_surface.get_toplevel. The client\ncan re-map the toplevel by perfoming a commit without any buffer\nattached, waiting for a configure event and handling it as usual (see\nxdg_surface description).\n\nAttaching a null buffer to a toplevel unmaps the surface." ] pub mod xdg_toplevel { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_toplevel { } # [ doc = "edge values for resizing\n\nThese values are used to indicate which edge of a surface\nis being dragged in a resize operation." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum resize_edge { none = 0 , top = 1 , bottom = 2 , left = 4 , top_left = 5 , bottom_left = 6 , right = 8 , top_right = 9 , bottom_right = 10 , # [ doc ( hidden ) ] __nonexhaustive , } impl resize_edge { pub fn from_raw ( n : u32 ) -> Option < resize_edge > { match n { 0 => Some ( resize_edge :: none ) , 1 => Some ( resize_edge :: top ) , 2 => Some ( resize_edge :: bottom ) , 4 => Some ( resize_edge :: left ) , 5 => Some ( resize_edge :: top_left ) , 6 => Some ( resize_edge :: bottom_left ) , 8 => Some ( resize_edge :: right ) , 9 => Some ( resize_edge :: top_right ) , 10 => Some ( resize_edge :: bottom_right ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "types of state on the surface\n\nThe different state values used on the surface. This is designed for\nstate values like maximized, fullscreen. It is paired with the\nconfigure event to ensure that both the client and the compositor\nsetting the state can be synchronized.\n\nStates set in this way are double-buffered. They will get applied on\nthe next commit." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum state { # [ doc = "the surface is maximized\n\nThe surface is maximized. The window geometry specified in the configure\nevent must be obeyed by the client.\n\nThe client should draw without shadow or other\ndecoration outside of the window geometry." ] maximized = 1 , # [ doc = "the surface is fullscreen\n\nThe surface is fullscreen. The window geometry specified in the\nconfigure event is a maximum; the client cannot resize beyond it. For\na surface to cover the whole fullscreened area, the geometry\ndimensions must be obeyed by the client. For more details, see\nxdg_toplevel.set_fullscreen." ] fullscreen = 2 , # [ doc = "the surface is being resized\n\nThe surface is being resized. The window geometry specified in the\nconfigure event is a maximum; the client cannot resize beyond it.\nClients that have aspect ratio or cell sizing configuration can use\na smaller size, however." ] resizing = 3 , # [ doc = "the surface is now activated\n\nClient window decorations should be painted as if the window is\nactive. Do not assume this means that the window actually has\nkeyboard or pointer focus." ] activated = 4 , # [ doc = "the surface is tiled\n\nThe window is currently in a tiled layout and the left edge is\nconsidered to be adjacent to another part of the tiling grid." ] tiled_left = 5 , # [ doc = "the surface is tiled\n\nThe window is currently in a tiled layout and the right edge is\nconsidered to be adjacent to another part of the tiling grid." ] tiled_right = 6 , # [ doc = "the surface is tiled\n\nThe window is currently in a tiled layout and the top edge is\nconsidered to be adjacent to another part of the tiling grid." ] tiled_top = 7 , # [ doc = "the surface is tiled\n\nThe window is currently in a tiled layout and the bottom edge is\nconsidered to be adjacent to another part of the tiling grid." ] tiled_bottom = 8 , # [ doc ( hidden ) ] __nonexhaustive , } impl state { pub fn from_raw ( n : u32 ) -> Option < state > { match n { 1 => Some ( state :: maximized ) , 2 => Some ( state :: fullscreen ) , 3 => Some ( state :: resizing ) , 4 => Some ( state :: activated ) , 5 => Some ( state :: tiled_left ) , 6 => Some ( state :: tiled_right ) , 7 => Some ( state :: tiled_top ) , 8 => Some ( state :: tiled_bottom ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_toplevel_requests_set_parent_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: xdg_toplevel :: xdg_toplevel_interface as * const wl_interface } , ] ; static mut xdg_toplevel_requests_show_window_menu_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut xdg_toplevel_requests_move_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut xdg_toplevel_requests_resize_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut xdg_toplevel_requests_set_fullscreen_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_toplevel_requests : [ wl_message ; 14 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & xdg_toplevel_requests_set_parent_types as * const _ } , } , wl_message { name : b"set_title\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_app_id\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"show_window_menu\0" as * const u8 as * const c_char , signature : b"ouii\0" as * const u8 as * const c_char , types : unsafe { & xdg_toplevel_requests_show_window_menu_types as * const _ } , } , wl_message { name : b"move\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & xdg_toplevel_requests_move_types as * const _ } , } , wl_message { name : b"resize\0" as * const u8 as * const c_char , signature : b"ouu\0" as * const u8 as * const c_char , types : unsafe { & xdg_toplevel_requests_resize_types as * const _ } , } , wl_message { name : b"set_max_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_min_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_maximized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unset_maximized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_fullscreen\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & xdg_toplevel_requests_set_fullscreen_types as * const _ } , } , wl_message { name : b"unset_fullscreen\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_minimized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_toplevel_events : [ wl_message ; 2 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"iia\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"close\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_toplevel_interface : wl_interface = wl_interface { name : b"xdg_toplevel\0" as * const u8 as * const c_char , version : 3 , request_count : 14 , requests : unsafe { & xdg_toplevel_requests as * const _ } , event_count : 2 , events : unsafe { & xdg_toplevel_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_toplevel_listener { # [ doc = "suggest a surface change\n\nThis configure event asks the client to resize its toplevel surface or\nto change its state. The configured state should not be applied\nimmediately. See xdg_surface.configure for details.\n\nThe width and height arguments specify a hint to the window\nabout how its surface should be resized in window geometry\ncoordinates. See set_window_geometry.\n\nIf the width or height arguments are zero, it means the client\nshould decide its own window dimension. This may happen when the\ncompositor needs to configure the state of the surface but doesn't\nhave any information about any previous or expected dimension.\n\nThe states listed in the event specify how the width/height\narguments should be interpreted, and possibly how it should be\ndrawn.\n\nClients must send an ack_configure in response to this event. See\nxdg_surface.configure and xdg_surface.ack_configure for details." ] fn configure ( & mut self , object : * mut xdg_toplevel , width : i32 , height : i32 , states : * mut wl_array ) { } # [ doc = "surface wants to be closed\n\nThe close event is sent by the compositor when the user\nwants the surface to be closed. This should be equivalent to\nthe user clicking the close button in client-side decorations,\nif your application has any.\n\nThis is only a request that the user intends to close the\nwindow. The client may choose to ignore this request, or show\na dialog to ask the user to save their data, etc." ] fn close ( & mut self , object : * mut xdg_toplevel , ) { } } pub unsafe fn xdg_toplevel_set_user_data ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_toplevel as _ , user_data ) ; } pub unsafe fn xdg_toplevel_get_user_data ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_toplevel as _ ) ; } pub unsafe fn xdg_toplevel_get_version ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_toplevel as _ ) ; } pub unsafe fn xdg_toplevel_add_listener ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_toplevel as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_toplevel_add_rust_listener ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , listener : & dyn xdg_toplevel_listener ) -> bool { let to = ( listener as * const dyn xdg_toplevel_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_toplevel_add_listener ( xdg_toplevel as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_toplevel\n\nThis request destroys the role surface and unmaps the surface;\nsee \"Unmapping\" behavior in interface section for details." ] pub unsafe fn xdg_toplevel_destroy ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_toplevel as _ ) ; } # [ doc = "set the parent of this surface\n\nSet the \"parent\" of this surface. This surface should be stacked\nabove the parent surface and all other ancestor surfaces.\n\nParent windows should be set on dialogs, toolboxes, or other\n\"auxiliary\" surfaces, so that the parent is raised when the dialog\nis raised.\n\nSetting a null parent for a child window removes any parent-child\nrelationship for the child. Setting a null parent for a window which\ncurrently has no parent is a no-op.\n\nIf the parent is unmapped then its children are managed as\nthough the parent of the now-unmapped parent has become the\nparent of this surface. If no parent exists for the now-unmapped\nparent then the children are managed as though they have no\nparent surface." ] pub unsafe fn xdg_toplevel_set_parent ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , parent : * mut super :: xdg_toplevel :: xdg_toplevel ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 1u32 , parent , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface title\n\nSet a short title for the surface.\n\nThis string may be used to identify the surface in a task bar,\nwindow list, or other user interface elements provided by the\ncompositor.\n\nThe string must be encoded in UTF-8." ] pub unsafe fn xdg_toplevel_set_title ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , title : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 2u32 , title , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set application ID\n\nSet an application identifier for the surface.\n\nThe app ID identifies the general class of applications to which\nthe surface belongs. The compositor can use this to group multiple\nsurfaces together, or to determine how to launch a new application.\n\nFor D-Bus activatable applications, the app ID is used as the D-Bus\nservice name.\n\nThe compositor shell will try to group application surfaces together\nby their app ID. As a best practice, it is suggested to select app\nID's that match the basename of the application's .desktop file.\nFor example, \"org.freedesktop.FooViewer\" where the .desktop file is\n\"org.freedesktop.FooViewer.desktop\".\n\nLike other properties, a set_app_id request can be sent after the\nxdg_toplevel has been mapped to update the property.\n\nSee the desktop-entry specification [0] for more details on\napplication identifiers and how they relate to well-known D-Bus\nnames and .desktop files.\n\n[0] http://standards.freedesktop.org/desktop-entry-spec/" ] pub unsafe fn xdg_toplevel_set_app_id ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , app_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 3u32 , app_id , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "show the window menu\n\nClients implementing client-side decorations might want to show\na context menu when right-clicking on the decorations, giving the\nuser a menu that they can use to maximize or minimize the window.\n\nThis request asks the compositor to pop up such a window menu at\nthe given position, relative to the local surface coordinates of\nthe parent surface. There are no guarantees as to what menu items\nthe window menu contains.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event." ] pub unsafe fn xdg_toplevel_show_window_menu ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 4u32 , seat , serial , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive move\n\nStart an interactive, user-driven move of the surface.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event. The passed\nserial is used to determine the type of interactive move (touch,\npointer, etc).\n\nThe server may ignore move requests depending on the state of\nthe surface (e.g. fullscreen or maximized), or if the passed serial\nis no longer valid.\n\nIf triggered, the surface will lose the focus of the device\n(wl_pointer, wl_touch, etc) used for the move. It is up to the\ncompositor to visually indicate that the move is taking place, such as\nupdating a pointer cursor, during the move. There is no guarantee\nthat the device focus will return when the move is completed." ] pub unsafe fn xdg_toplevel_move ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , seat : * mut super :: wl_seat :: wl_seat , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 5u32 , seat , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive resize\n\nStart a user-driven, interactive resize of the surface.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event. The passed\nserial is used to determine the type of interactive resize (touch,\npointer, etc).\n\nThe server may ignore resize requests depending on the state of\nthe surface (e.g. fullscreen or maximized).\n\nIf triggered, the client will receive configure events with the\n\"resize\" state enum value and the expected sizes. See the \"resize\"\nenum value for more details about what is required. The client\nmust also acknowledge configure events using \"ack_configure\". After\nthe resize is completed, the client will receive another \"configure\"\nevent without the resize state.\n\nIf triggered, the surface also will lose the focus of the device\n(wl_pointer, wl_touch, etc) used for the resize. It is up to the\ncompositor to visually indicate that the resize is taking place,\nsuch as updating a pointer cursor, during the resize. There is no\nguarantee that the device focus will return when the resize is\ncompleted.\n\nThe edges parameter specifies how the surface should be resized,\nand is one of the values of the resize_edge enum. The compositor\nmay use this information to update the surface position for\nexample when dragging the top left corner. The compositor may also\nuse this information to adapt its behavior, e.g. choose an\nappropriate cursor image." ] pub unsafe fn xdg_toplevel_resize ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , edges : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 6u32 , seat , serial , edges , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the maximum size\n\nSet a maximum size for the window.\n\nThe client can specify a maximum size so that the compositor does\nnot try to configure the window beyond this size.\n\nThe width and height arguments are in window geometry coordinates.\nSee xdg_surface.set_window_geometry.\n\nValues set in this way are double-buffered. They will get applied\non the next commit.\n\nThe compositor can use this information to allow or disallow\ndifferent states like maximize or fullscreen and draw accurate\nanimations.\n\nSimilarly, a tiling window manager may use this information to\nplace and resize client windows in a more effective way.\n\nThe client should not rely on the compositor to obey the maximum\nsize. The compositor may decide to ignore the values set by the\nclient and request a larger size.\n\nIf never set, or a value of zero in the request, means that the\nclient has no expected maximum size in the given dimension.\nAs a result, a client wishing to reset the maximum size\nto an unspecified state can use zero for width and height in the\nrequest.\n\nRequesting a maximum size to be smaller than the minimum size of\na surface is illegal and will result in a protocol error.\n\nThe width and height must be greater than or equal to zero. Using\nstrictly negative values for width and height will result in a\nprotocol error." ] pub unsafe fn xdg_toplevel_set_max_size ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 7u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the minimum size\n\nSet a minimum size for the window.\n\nThe client can specify a minimum size so that the compositor does\nnot try to configure the window below this size.\n\nThe width and height arguments are in window geometry coordinates.\nSee xdg_surface.set_window_geometry.\n\nValues set in this way are double-buffered. They will get applied\non the next commit.\n\nThe compositor can use this information to allow or disallow\ndifferent states like maximize or fullscreen and draw accurate\nanimations.\n\nSimilarly, a tiling window manager may use this information to\nplace and resize client windows in a more effective way.\n\nThe client should not rely on the compositor to obey the minimum\nsize. The compositor may decide to ignore the values set by the\nclient and request a smaller size.\n\nIf never set, or a value of zero in the request, means that the\nclient has no expected minimum size in the given dimension.\nAs a result, a client wishing to reset the minimum size\nto an unspecified state can use zero for width and height in the\nrequest.\n\nRequesting a minimum size to be larger than the maximum size of\na surface is illegal and will result in a protocol error.\n\nThe width and height must be greater than or equal to zero. Using\nstrictly negative values for width and height will result in a\nprotocol error." ] pub unsafe fn xdg_toplevel_set_min_size ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 8u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "maximize the window\n\nMaximize the surface.\n\nAfter requesting that the surface should be maximized, the compositor\nwill respond by emitting a configure event. Whether this configure\nactually sets the window maximized is subject to compositor policies.\nThe client must then update its content, drawing in the configured\nstate. The client must also acknowledge the configure when committing\nthe new content (see ack_configure).\n\nIt is up to the compositor to decide how and where to maximize the\nsurface, for example which output and what region of the screen should\nbe used.\n\nIf the surface was already maximized, the compositor will still emit\na configure event with the \"maximized\" state.\n\nIf the surface is in a fullscreen state, this request has no direct\neffect. It may alter the state the surface is returned to when\nunmaximized unless overridden by the compositor." ] pub unsafe fn xdg_toplevel_set_maximized ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 9u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "unmaximize the window\n\nUnmaximize the surface.\n\nAfter requesting that the surface should be unmaximized, the compositor\nwill respond by emitting a configure event. Whether this actually\nun-maximizes the window is subject to compositor policies.\nIf available and applicable, the compositor will include the window\ngeometry dimensions the window had prior to being maximized in the\nconfigure event. The client must then update its content, drawing it in\nthe configured state. The client must also acknowledge the configure\nwhen committing the new content (see ack_configure).\n\nIt is up to the compositor to position the surface after it was\nunmaximized; usually the position the surface had before maximizing, if\napplicable.\n\nIf the surface was already not maximized, the compositor will still\nemit a configure event without the \"maximized\" state.\n\nIf the surface is in a fullscreen state, this request has no direct\neffect. It may alter the state the surface is returned to when\nunmaximized unless overridden by the compositor." ] pub unsafe fn xdg_toplevel_unset_maximized ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 10u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the window as fullscreen on an output\n\nMake the surface fullscreen.\n\nAfter requesting that the surface should be fullscreened, the\ncompositor will respond by emitting a configure event. Whether the\nclient is actually put into a fullscreen state is subject to compositor\npolicies. The client must also acknowledge the configure when\ncommitting the new content (see ack_configure).\n\nThe output passed by the request indicates the client's preference as\nto which display it should be set fullscreen on. If this value is NULL,\nit's up to the compositor to choose which display will be used to map\nthis surface.\n\nIf the surface doesn't cover the whole output, the compositor will\nposition the surface in the center of the output and compensate with\nwith border fill covering the rest of the output. The content of the\nborder fill is undefined, but should be assumed to be in some way that\nattempts to blend into the surrounding area (e.g. solid black).\n\nIf the fullscreened surface is not opaque, the compositor must make\nsure that other screen content not part of the same surface tree (made\nup of subsurfaces, popups or similarly coupled surfaces) are not\nvisible below the fullscreened surface." ] pub unsafe fn xdg_toplevel_set_fullscreen ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 11u32 , output , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "unset the window as fullscreen\n\nMake the surface no longer fullscreen.\n\nAfter requesting that the surface should be unfullscreened, the\ncompositor will respond by emitting a configure event.\nWhether this actually removes the fullscreen state of the client is\nsubject to compositor policies.\n\nMaking a surface unfullscreen sets states for the surface based on the following:\n* the state(s) it may have had before becoming fullscreen\n* any state(s) decided by the compositor\n* any state(s) requested by the client while the surface was fullscreen\n\nThe compositor may include the previous window geometry dimensions in\nthe configure event, if applicable.\n\nThe client must also acknowledge the configure when committing the new\ncontent (see ack_configure)." ] pub unsafe fn xdg_toplevel_unset_fullscreen ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 12u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the window as minimized\n\nRequest that the compositor minimize your surface. There is no\nway to know if the surface is currently minimized, nor is there\nany way to unset minimization on this surface.\n\nIf you are looking to throttle redrawing when minimized, please\ninstead use the wl_surface.frame event for this, as this will\nalso work with live previews on windows in Alt-Tab, Expose or\nsimilar compositor features." ] pub unsafe fn xdg_toplevel_set_minimized ( xdg_toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_toplevel as _ , 13u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "short-lived, popup surfaces for menus\n\nA popup surface is a short-lived, temporary surface. It can be used to\nimplement for example menus, popovers, tooltips and other similar user\ninterface concepts.\n\nA popup can be made to take an explicit grab. See xdg_popup.grab for\ndetails.\n\nWhen the popup is dismissed, a popup_done event will be sent out, and at\nthe same time the surface will be unmapped. See the xdg_popup.popup_done\nevent for details.\n\nExplicitly destroying the xdg_popup object will also dismiss the popup and\nunmap the surface. Clients that want to dismiss the popup when another\nsurface of their own is clicked should dismiss the popup using the destroy\nrequest.\n\nA newly created xdg_popup will be stacked on top of all previously created\nxdg_popup surfaces associated with the same xdg_toplevel.\n\nThe parent of an xdg_popup must be mapped (see the xdg_surface\ndescription) before the xdg_popup itself.\n\nThe client must call wl_surface.commit on the corresponding wl_surface\nfor the xdg_popup state to take effect." ] pub mod xdg_popup { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_popup { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "tried to grab after being mapped" ] invalid_grab = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_grab ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_popup_requests_grab_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut xdg_popup_requests_reposition_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: xdg_positioner :: xdg_positioner_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_popup_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"grab\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & xdg_popup_requests_grab_types as * const _ } , } , wl_message { name : b"reposition\0" as * const u8 as * const c_char , signature : b"3ou\0" as * const u8 as * const c_char , types : unsafe { & xdg_popup_requests_reposition_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_popup_events : [ wl_message ; 3 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"popup_done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"repositioned\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_popup_interface : wl_interface = wl_interface { name : b"xdg_popup\0" as * const u8 as * const c_char , version : 3 , request_count : 3 , requests : unsafe { & xdg_popup_requests as * const _ } , event_count : 3 , events : unsafe { & xdg_popup_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_popup_listener { # [ doc = "configure the popup surface\n\nThis event asks the popup surface to configure itself given the\nconfiguration. The configured state should not be applied immediately.\nSee xdg_surface.configure for details.\n\nThe x and y arguments represent the position the popup was placed at\ngiven the xdg_positioner rule, relative to the upper left corner of the\nwindow geometry of the parent surface.\n\nFor version 2 or older, the configure event for an xdg_popup is only\never sent once for the initial configuration. Starting with version 3,\nit may be sent again if the popup is setup with an xdg_positioner with\nset_reactive requested, or in response to xdg_popup.reposition requests." ] fn configure ( & mut self , object : * mut xdg_popup , x : i32 , y : i32 , width : i32 , height : i32 ) { } # [ doc = "popup interaction is done\n\nThe popup_done event is sent out when a popup is dismissed by the\ncompositor. The client should destroy the xdg_popup object at this\npoint." ] fn popup_done ( & mut self , object : * mut xdg_popup , ) { } # [ doc = "signal the completion of a repositioned request\n\nThe repositioned event is sent as part of a popup configuration\nsequence, together with xdg_popup.configure and lastly\nxdg_surface.configure to notify the completion of a reposition request.\n\nThe repositioned event is to notify about the completion of a\nxdg_popup.reposition request. The token argument is the token passed\nin the xdg_popup.reposition request.\n\nImmediately after this event is emitted, xdg_popup.configure and\nxdg_surface.configure will be sent with the updated size and position,\nas well as a new configure serial.\n\nThe client should optionally update the content of the popup, but must\nacknowledge the new popup configuration for the new position to take\neffect. See xdg_surface.ack_configure for details.\n\nOnly available since version 3 of the interface." ] fn repositioned ( & mut self , object : * mut xdg_popup , token : u32 ) { } } pub unsafe fn xdg_popup_set_user_data ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_popup as _ , user_data ) ; } pub unsafe fn xdg_popup_get_user_data ( xdg_popup : * mut super :: xdg_popup :: xdg_popup ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_popup as _ ) ; } pub unsafe fn xdg_popup_get_version ( xdg_popup : * mut super :: xdg_popup :: xdg_popup ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_popup as _ ) ; } pub unsafe fn xdg_popup_add_listener ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_popup as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_popup_add_rust_listener ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , listener : & dyn xdg_popup_listener ) -> bool { let to = ( listener as * const dyn xdg_popup_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_popup_add_listener ( xdg_popup as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "remove xdg_popup interface\n\nThis destroys the popup. Explicitly destroying the xdg_popup\nobject will also dismiss the popup, and unmap the surface.\n\nIf this xdg_popup is not the \"topmost\" popup, a protocol error\nwill be sent." ] pub unsafe fn xdg_popup_destroy ( xdg_popup : * mut super :: xdg_popup :: xdg_popup ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_popup as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_popup as _ ) ; } # [ doc = "make the popup take an explicit grab\n\nThis request makes the created popup take an explicit grab. An explicit\ngrab will be dismissed when the user dismisses the popup, or when the\nclient destroys the xdg_popup. This can be done by the user clicking\noutside the surface, using the keyboard, or even locking the screen\nthrough closing the lid or a timeout.\n\nIf the compositor denies the grab, the popup will be immediately\ndismissed.\n\nThis request must be used in response to some sort of user action like a\nbutton press, key press, or touch down event. The serial number of the\nevent should be passed as 'serial'.\n\nThe parent of a grabbing popup must either be an xdg_toplevel surface or\nanother xdg_popup with an explicit grab. If the parent is another\nxdg_popup it means that the popups are nested, with this popup now being\nthe topmost popup.\n\nNested popups must be destroyed in the reverse order they were created\nin, e.g. the only popup you are allowed to destroy at all times is the\ntopmost one.\n\nWhen compositors choose to dismiss a popup, they may dismiss every\nnested grabbing popup as well. When a compositor dismisses popups, it\nwill follow the same dismissing order as required from the client.\n\nThe parent of a grabbing popup must either be another xdg_popup with an\nactive explicit grab, or an xdg_popup or xdg_toplevel, if there are no\nexplicit grabs already taken.\n\nIf the topmost grabbing popup is destroyed, the grab will be returned to\nthe parent of the popup, if that parent previously had an explicit grab.\n\nIf the parent is a grabbing popup which has already been dismissed, this\npopup will be immediately dismissed. If the parent is a popup that did\nnot take an explicit grab, an error will be raised.\n\nDuring a popup grab, the client owning the grab will receive pointer\nand touch events for all their surfaces as normal (similar to an\n\"owner-events\" grab in X11 parlance), while the top most grabbing popup\nwill always have keyboard focus." ] pub unsafe fn xdg_popup_grab ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , seat : * mut super :: wl_seat :: wl_seat , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_popup as _ , 1u32 , seat , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "recalculate the popup's location\n\nReposition an already-mapped popup. The popup will be placed given the\ndetails in the passed xdg_positioner object, and a\nxdg_popup.repositioned followed by xdg_popup.configure and\nxdg_surface.configure will be emitted in response. Any parameters set\nby the previous positioner will be discarded.\n\nThe passed token will be sent in the corresponding\nxdg_popup.repositioned event. The new popup position will not take\neffect until the corresponding configure event is acknowledged by the\nclient. See xdg_popup.repositioned for details. The token itself is\nopaque, and has no other special meaning.\n\nIf multiple reposition requests are sent, the compositor may skip all\nbut the last one.\n\nIf the popup is repositioned in response to a configure event for its\nparent, the client should send an xdg_positioner.set_parent_configure\nand possibly an xdg_positioner.set_parent_size request to allow the\ncompositor to properly constrain the popup.\n\nIf the popup is repositioned together with a parent that is being\nresized, but not in response to a configure event, the client should\nsend an xdg_positioner.set_parent_size request." ] pub unsafe fn xdg_popup_reposition ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , positioner : * mut super :: xdg_positioner :: xdg_positioner , token : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_popup as _ , 2u32 , positioner , token , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod xdg_activation_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "interface for activating surfaces\n\nA global interface used for informing the compositor about applications\nbeing activated or started, or for applications to request to be\nactivated." ] pub mod xdg_activation_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_activation_v1 { } static mut xdg_activation_v1_requests_get_activation_token_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: xdg_activation_token_v1 :: xdg_activation_token_v1_interface as * const wl_interface } , ] ; static mut xdg_activation_v1_requests_activate_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_activation_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_activation_token\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & xdg_activation_v1_requests_get_activation_token_types as * const _ } , } , wl_message { name : b"activate\0" as * const u8 as * const c_char , signature : b"so\0" as * const u8 as * const c_char , types : unsafe { & xdg_activation_v1_requests_activate_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_activation_v1_interface : wl_interface = wl_interface { name : b"xdg_activation_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & xdg_activation_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_activation_v1_listener { } pub unsafe fn xdg_activation_v1_set_user_data ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_activation_v1 as _ , user_data ) ; } pub unsafe fn xdg_activation_v1_get_user_data ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_activation_v1 as _ ) ; } pub unsafe fn xdg_activation_v1_get_version ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_activation_v1 as _ ) ; } pub unsafe fn xdg_activation_v1_add_listener ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_activation_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_activation_v1_add_rust_listener ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 , listener : & dyn xdg_activation_v1_listener ) -> bool { let to = ( listener as * const dyn xdg_activation_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_activation_v1_add_listener ( xdg_activation_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_activation object\n\nNotify the compositor that the xdg_activation object will no longer be\nused.\n\nThe child objects created via this interface are unaffected and should\nbe destroyed separately." ] pub unsafe fn xdg_activation_v1_destroy ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_activation_v1 as _ ) ; } # [ doc = "requests a token\n\nCreates an xdg_activation_token_v1 object that will provide\nthe initiating client with a unique token for this activation. This\ntoken should be offered to the clients to be activated." ] pub unsafe fn xdg_activation_v1_get_activation_token ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 ) -> * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_activation_v1 as _ , 1u32 , & super :: xdg_activation_token_v1 :: xdg_activation_token_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "notify new interaction being available\n\nRequests surface activation. It's up to the compositor to display\nthis information as desired, for example by placing the surface above\nthe rest.\n\nThe compositor may know who requested this by checking the activation\ntoken and might decide not to follow through with the activation if it's\nconsidered unwanted.\n\nCompositors can ignore unknown activation tokens when an invalid\ntoken is passed." ] pub unsafe fn xdg_activation_v1_activate ( xdg_activation_v1 : * mut super :: xdg_activation_v1 :: xdg_activation_v1 , token : * const c_char , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_v1 as _ , 2u32 , token , surface , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "an exported activation handle\n\nAn object for setting up a token and receiving a token handle that can\nbe passed as an activation token to another client.\n\nThe object is created using the xdg_activation_v1.get_activation_token\nrequest. This object should then be populated with the app_id, surface\nand serial information and committed. The compositor shall then issue a\ndone event with the token. In case the request's parameters are invalid,\nthe compositor will provide an invalid token." ] pub mod xdg_activation_token_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_activation_token_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "The token has already been used previously" ] already_used = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: already_used ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_activation_token_v1_requests_set_serial_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; static mut xdg_activation_token_v1_requests_set_surface_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_activation_token_v1_requests : [ wl_message ; 5 ] = [ wl_message { name : b"set_serial\0" as * const u8 as * const c_char , signature : b"uo\0" as * const u8 as * const c_char , types : unsafe { & xdg_activation_token_v1_requests_set_serial_types as * const _ } , } , wl_message { name : b"set_app_id\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_surface\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & xdg_activation_token_v1_requests_set_surface_types as * const _ } , } , wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_activation_token_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_activation_token_v1_interface : wl_interface = wl_interface { name : b"xdg_activation_token_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 5 , requests : unsafe { & xdg_activation_token_v1_requests as * const _ } , event_count : 1 , events : unsafe { & xdg_activation_token_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_activation_token_v1_listener { # [ doc = "the exported activation token\n\nThe 'done' event contains the unique token of this activation request\nand notifies that the provider is done." ] fn done ( & mut self , object : * mut xdg_activation_token_v1 , token : * mut c_char ) { } } pub unsafe fn xdg_activation_token_v1_set_user_data ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_activation_token_v1 as _ , user_data ) ; } pub unsafe fn xdg_activation_token_v1_get_user_data ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_activation_token_v1 as _ ) ; } pub unsafe fn xdg_activation_token_v1_get_version ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_activation_token_v1 as _ ) ; } pub unsafe fn xdg_activation_token_v1_add_listener ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_activation_token_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_activation_token_v1_add_rust_listener ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 , listener : & dyn xdg_activation_token_v1_listener ) -> bool { let to = ( listener as * const dyn xdg_activation_token_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_activation_token_v1_add_listener ( xdg_activation_token_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "specifies the seat and serial of the activating event\n\nProvides information about the seat and serial event that requested the\ntoken.\n\nThe serial can come from an input or focus event. For instance, if a\nclick triggers the launch of a third-party client, the launcher client\nshould send a set_serial request with the serial and seat from the\nwl_pointer.button event.\n\nSome compositors might refuse to activate toplevels when the token\ndoesn't have a valid and recent enough event serial.\n\nMust be sent before commit. This information is optional." ] pub unsafe fn xdg_activation_token_v1_set_serial ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 , serial : u32 , seat : * mut super :: wl_seat :: wl_seat ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_token_v1 as _ , 0u32 , serial , seat , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "specifies the application being activated\n\nThe requesting client can specify an app_id to associate the token\nbeing created with it.\n\nMust be sent before commit. This information is optional." ] pub unsafe fn xdg_activation_token_v1_set_app_id ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 , app_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_token_v1 as _ , 1u32 , app_id , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "specifies the surface requesting activation\n\nThis request sets the surface requesting the activation. Note, this is\ndifferent from the surface that will be activated.\n\nSome compositors might refuse to activate toplevels when the token\ndoesn't have a requesting surface.\n\nMust be sent before commit. This information is optional." ] pub unsafe fn xdg_activation_token_v1_set_surface ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_token_v1 as _ , 2u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "issues the token request\n\nRequests an activation token based on the different parameters that\nhave been offered through set_serial, set_surface and set_app_id." ] pub unsafe fn xdg_activation_token_v1_commit ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_token_v1 as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the xdg_activation_token_v1 object\n\nNotify the compositor that the xdg_activation_token_v1 object will no\nlonger be used." ] pub unsafe fn xdg_activation_token_v1_destroy ( xdg_activation_token_v1 : * mut super :: xdg_activation_token_v1 :: xdg_activation_token_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_activation_token_v1 as _ , 4u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_activation_token_v1 as _ ) ; } } } pub mod text { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "text input\n\nAn object used for text input. Adds support for text input and input\nmethods to applications. A text-input object is created from a\nwl_text_input_manager and corresponds typically to a text entry in an\napplication.\nRequests are used to activate/deactivate the text-input object and set\nstate information like surrounding and selected text or the content type.\nThe information about entered text is sent to the text-input object via\nthe pre-edit and commit events. Using this interface removes the need\nfor applications to directly process hardware key events and compose text\nout of them.\n\nText is generally UTF-8 encoded, indices and lengths are in bytes.\n\nSerials are used to synchronize the state between the text input and\nan input method. New serials are sent by the text input in the\ncommit_state request and are used by the input method to indicate\nthe known text input state in events like preedit_string, commit_string,\nand keysym. The text input can then ignore events from the input method\nwhich are based on an outdated state (for example after a reset)." ] pub mod wl_text_input { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_text_input { } # [ doc = "content hint\n\nContent hint is a bitmask to allow to modify the behavior of the text\ninput." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum content_hint { # [ doc = "no special behaviour" ] none = 0 , # [ doc = "auto completion, correction and capitalization" ] default = 7 , # [ doc = "hidden and sensitive text" ] password = 192 , # [ doc = "suggest word completions" ] auto_completion = 1 , # [ doc = "suggest word corrections" ] auto_correction = 2 , # [ doc = "switch to uppercase letters at the start of a sentence" ] auto_capitalization = 4 , # [ doc = "prefer lowercase letters" ] lowercase = 8 , # [ doc = "prefer uppercase letters" ] uppercase = 16 , # [ doc = "prefer casing for titles and headings (can be language dependent)" ] titlecase = 32 , # [ doc = "characters should be hidden" ] hidden_text = 64 , # [ doc = "typed text should not be stored" ] sensitive_data = 128 , # [ doc = "just latin characters should be entered" ] latin = 256 , # [ doc = "the text input is multiline" ] multiline = 512 , # [ doc ( hidden ) ] __nonexhaustive , } impl content_hint { pub fn from_raw ( n : u32 ) -> Option < content_hint > { match n { 0 => Some ( content_hint :: none ) , 7 => Some ( content_hint :: default ) , 192 => Some ( content_hint :: password ) , 1 => Some ( content_hint :: auto_completion ) , 2 => Some ( content_hint :: auto_correction ) , 4 => Some ( content_hint :: auto_capitalization ) , 8 => Some ( content_hint :: lowercase ) , 16 => Some ( content_hint :: uppercase ) , 32 => Some ( content_hint :: titlecase ) , 64 => Some ( content_hint :: hidden_text ) , 128 => Some ( content_hint :: sensitive_data ) , 256 => Some ( content_hint :: latin ) , 512 => Some ( content_hint :: multiline ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "content purpose\n\nThe content purpose allows to specify the primary purpose of a text\ninput.\n\nThis allows an input method to show special purpose input panels with\nextra characters or to disallow some characters." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum content_purpose { # [ doc = "default input, allowing all characters" ] normal = 0 , # [ doc = "allow only alphabetic characters" ] alpha = 1 , # [ doc = "allow only digits" ] digits = 2 , # [ doc = "input a number (including decimal separator and sign)" ] number = 3 , # [ doc = "input a phone number" ] phone = 4 , # [ doc = "input an URL" ] url = 5 , # [ doc = "input an email address" ] email = 6 , # [ doc = "input a name of a person" ] name = 7 , # [ doc = "input a password (combine with password or sensitive_data hint)" ] password = 8 , # [ doc = "input a date" ] date = 9 , # [ doc = "input a time" ] time = 10 , # [ doc = "input a date and time" ] datetime = 11 , # [ doc = "input for a terminal" ] terminal = 12 , # [ doc ( hidden ) ] __nonexhaustive , } impl content_purpose { pub fn from_raw ( n : u32 ) -> Option < content_purpose > { match n { 0 => Some ( content_purpose :: normal ) , 1 => Some ( content_purpose :: alpha ) , 2 => Some ( content_purpose :: digits ) , 3 => Some ( content_purpose :: number ) , 4 => Some ( content_purpose :: phone ) , 5 => Some ( content_purpose :: url ) , 6 => Some ( content_purpose :: email ) , 7 => Some ( content_purpose :: name ) , 8 => Some ( content_purpose :: password ) , 9 => Some ( content_purpose :: date ) , 10 => Some ( content_purpose :: time ) , 11 => Some ( content_purpose :: datetime ) , 12 => Some ( content_purpose :: terminal ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum preedit_style { # [ doc = "default style for composing text" ] default = 0 , # [ doc = "style should be the same as in non-composing text" ] none = 1 , active = 2 , inactive = 3 , highlight = 4 , underline = 5 , selection = 6 , incorrect = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl preedit_style { pub fn from_raw ( n : u32 ) -> Option < preedit_style > { match n { 0 => Some ( preedit_style :: default ) , 1 => Some ( preedit_style :: none ) , 2 => Some ( preedit_style :: active ) , 3 => Some ( preedit_style :: inactive ) , 4 => Some ( preedit_style :: highlight ) , 5 => Some ( preedit_style :: underline ) , 6 => Some ( preedit_style :: selection ) , 7 => Some ( preedit_style :: incorrect ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum text_direction { # [ doc = "automatic text direction based on text and language" ] auto = 0 , # [ doc = "left-to-right" ] ltr = 1 , # [ doc = "right-to-left" ] rtl = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl text_direction { pub fn from_raw ( n : u32 ) -> Option < text_direction > { match n { 0 => Some ( text_direction :: auto ) , 1 => Some ( text_direction :: ltr ) , 2 => Some ( text_direction :: rtl ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wl_text_input_requests_activate_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut wl_text_input_requests_deactivate_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_text_input_requests : [ wl_message ; 11 ] = [ wl_message { name : b"activate\0" as * const u8 as * const c_char , signature : b"oo\0" as * const u8 as * const c_char , types : unsafe { & wl_text_input_requests_activate_types as * const _ } , } , wl_message { name : b"deactivate\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wl_text_input_requests_deactivate_types as * const _ } , } , wl_message { name : b"show_input_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hide_input_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"reset\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_surrounding_text\0" as * const u8 as * const c_char , signature : b"suu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_content_type\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_cursor_rectangle\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_preferred_language\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_state\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"invoke_action\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wl_text_input_events_enter_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_text_input_events : [ wl_message ; 13 ] = [ wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wl_text_input_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifiers_map\0" as * const u8 as * const c_char , signature : b"a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"input_panel_state\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_string\0" as * const u8 as * const c_char , signature : b"uss\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_styling\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_cursor\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_string\0" as * const u8 as * const c_char , signature : b"us\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cursor_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"delete_surrounding_text\0" as * const u8 as * const c_char , signature : b"iu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"keysym\0" as * const u8 as * const c_char , signature : b"uuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"language\0" as * const u8 as * const c_char , signature : b"us\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"text_direction\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_text_input_interface : wl_interface = wl_interface { name : b"wl_text_input\0" as * const u8 as * const c_char , version : 1 , request_count : 11 , requests : unsafe { & wl_text_input_requests as * const _ } , event_count : 13 , events : unsafe { & wl_text_input_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wl_text_input_listener { # [ doc = "enter event\n\nNotify the text-input object when it received focus. Typically in\nresponse to an activate request." ] fn enter ( & mut self , object : * mut wl_text_input , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "leave event\n\nNotify the text-input object when it lost focus. Either in response\nto a deactivate request or when the assigned surface lost focus or was\ndestroyed." ] fn leave ( & mut self , object : * mut wl_text_input , ) { } # [ doc = "modifiers map\n\nTransfer an array of 0-terminated modifiers names. The position in\nthe array is the index of the modifier as used in the modifiers\nbitmask in the keysym event." ] fn modifiers_map ( & mut self , object : * mut wl_text_input , map : * mut wl_array ) { } # [ doc = "state of the input panel\n\nNotify when the visibility state of the input panel changed." ] fn input_panel_state ( & mut self , object : * mut wl_text_input , state : u32 ) { } # [ doc = "pre-edit\n\nNotify when a new composing text (pre-edit) should be set around the\ncurrent cursor position. Any previously set composing text should\nbe removed.\n\nThe commit text can be used to replace the preedit text on reset\n(for example on unfocus).\n\nThe text input should also handle all preedit_style and preedit_cursor\nevents occurring directly before preedit_string." ] fn preedit_string ( & mut self , object : * mut wl_text_input , serial : u32 , text : * mut c_char , commit : * mut c_char ) { } # [ doc = "pre-edit styling\n\nSets styling information on composing text. The style is applied for\nlength bytes from index relative to the beginning of the composing\ntext (as byte offset). Multiple styles can\nbe applied to a composing text by sending multiple preedit_styling\nevents.\n\nThis event is handled as part of a following preedit_string event." ] fn preedit_styling ( & mut self , object : * mut wl_text_input , index : u32 , length : u32 , style : u32 ) { } # [ doc = "pre-edit cursor\n\nSets the cursor position inside the composing text (as byte\noffset) relative to the start of the composing text. When index is a\nnegative number no cursor is shown.\n\nThis event is handled as part of a following preedit_string event." ] fn preedit_cursor ( & mut self , object : * mut wl_text_input , index : i32 ) { } # [ doc = "commit\n\nNotify when text should be inserted into the editor widget. The text to\ncommit could be either just a single character after a key press or the\nresult of some composing (pre-edit). It could be also an empty text\nwhen some text should be removed (see delete_surrounding_text) or when\nthe input cursor should be moved (see cursor_position).\n\nAny previously set composing text should be removed." ] fn commit_string ( & mut self , object : * mut wl_text_input , serial : u32 , text : * mut c_char ) { } # [ doc = "set cursor to new position\n\nNotify when the cursor or anchor position should be modified.\n\nThis event should be handled as part of a following commit_string\nevent." ] fn cursor_position ( & mut self , object : * mut wl_text_input , index : i32 , anchor : i32 ) { } # [ doc = "delete surrounding text\n\nNotify when the text around the current cursor position should be\ndeleted.\n\nIndex is relative to the current cursor (in bytes).\nLength is the length of deleted text (in bytes).\n\nThis event should be handled as part of a following commit_string\nevent." ] fn delete_surrounding_text ( & mut self , object : * mut wl_text_input , index : i32 , length : u32 ) { } # [ doc = "keysym\n\nNotify when a key event was sent. Key events should not be used\nfor normal text input operations, which should be done with\ncommit_string, delete_surrounding_text, etc. The key event follows\nthe wl_keyboard key event convention. Sym is a XKB keysym, state a\nwl_keyboard key_state. Modifiers are a mask for effective modifiers\n(where the modifier indices are set by the modifiers_map event)" ] fn keysym ( & mut self , object : * mut wl_text_input , serial : u32 , time : u32 , sym : u32 , state : u32 , modifiers : u32 ) { } # [ doc = "language\n\nSets the language of the input text. The \"language\" argument is a RFC-3066\nformat language tag." ] fn language ( & mut self , object : * mut wl_text_input , serial : u32 , language : * mut c_char ) { } # [ doc = "text direction\n\nSets the text direction of input text.\n\nIt is mainly needed for showing input cursor on correct side of the\neditor when there is no input yet done and making sure neutral\ndirection text is laid out properly." ] fn text_direction ( & mut self , object : * mut wl_text_input , serial : u32 , direction : u32 ) { } } pub unsafe fn wl_text_input_set_user_data ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_text_input as _ , user_data ) ; } pub unsafe fn wl_text_input_get_user_data ( wl_text_input : * mut super :: wl_text_input :: wl_text_input ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_text_input as _ ) ; } pub unsafe fn wl_text_input_get_version ( wl_text_input : * mut super :: wl_text_input :: wl_text_input ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_text_input as _ ) ; } pub unsafe fn wl_text_input_add_listener ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_text_input as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_text_input_add_rust_listener ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , listener : & dyn wl_text_input_listener ) -> bool { let to = ( listener as * const dyn wl_text_input_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_text_input_add_listener ( wl_text_input as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_text_input_destroy ( wl_text_input : * mut super :: wl_text_input :: wl_text_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_text_input as _ ) ; } # [ doc = "request activation\n\nRequests the text-input object to be activated (typically when the\ntext entry gets focus).\nThe seat argument is a wl_seat which maintains the focus for this\nactivation. The surface argument is a wl_surface assigned to the\ntext-input object and tracked for focus lost. The enter event\nis emitted on successful activation." ] pub unsafe fn wl_text_input_activate ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , seat : * mut super :: wl_seat :: wl_seat , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 0u32 , seat , surface , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "request deactivation\n\nRequests the text-input object to be deactivated (typically when the\ntext entry lost focus). The seat argument is a wl_seat which was used\nfor activation." ] pub unsafe fn wl_text_input_deactivate ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , seat : * mut super :: wl_seat :: wl_seat ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 1u32 , seat , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "show input panels\n\nRequests input panels (virtual keyboard) to show." ] pub unsafe fn wl_text_input_show_input_panel ( wl_text_input : * mut super :: wl_text_input :: wl_text_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "hide input panels\n\nRequests input panels (virtual keyboard) to hide." ] pub unsafe fn wl_text_input_hide_input_panel ( wl_text_input : * mut super :: wl_text_input :: wl_text_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "reset\n\nShould be called by an editor widget when the input state should be\nreset, for example after the text was changed outside of the normal\ninput method flow." ] pub unsafe fn wl_text_input_reset ( wl_text_input : * mut super :: wl_text_input :: wl_text_input ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 4u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets the surrounding text\n\nSets the plain surrounding text around the input position. Text is\nUTF-8 encoded. Cursor is the byte offset within the\nsurrounding text. Anchor is the byte offset of the\nselection anchor within the surrounding text. If there is no selected\ntext anchor is the same as cursor." ] pub unsafe fn wl_text_input_set_surrounding_text ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , text : * const c_char , cursor : u32 , anchor : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 5u32 , text , cursor , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set content purpose and hint\n\nSets the content purpose and content hint. While the purpose is the\nbasic purpose of an input field, the hint flags allow to modify some\nof the behavior.\n\nWhen no content type is explicitly set, a normal content purpose with\ndefault hints (auto completion, auto correction, auto capitalization)\nshould be assumed." ] pub unsafe fn wl_text_input_set_content_type ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , hint : u32 , purpose : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 6u32 , hint , purpose , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn wl_text_input_set_cursor_rectangle ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 7u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets preferred language\n\nSets a specific language. This allows for example a virtual keyboard to\nshow a language specific layout. The \"language\" argument is a RFC-3066\nformat language tag.\n\nIt could be used for example in a word processor to indicate language of\ncurrently edited document or in an instant message application which tracks\nlanguages of contacts." ] pub unsafe fn wl_text_input_set_preferred_language ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , language : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 8u32 , language , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn wl_text_input_commit_state ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 9u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn wl_text_input_invoke_action ( wl_text_input : * mut super :: wl_text_input :: wl_text_input , button : u32 , index : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wl_text_input as _ , 10u32 , button , index , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "text input manager\n\nA factory for text-input objects. This object is a global singleton." ] pub mod wl_text_input_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wl_text_input_manager { } static mut wl_text_input_manager_requests_create_text_input_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_text_input :: wl_text_input_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wl_text_input_manager_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create_text_input\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wl_text_input_manager_requests_create_text_input_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wl_text_input_manager_interface : wl_interface = wl_interface { name : b"wl_text_input_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wl_text_input_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wl_text_input_manager_listener { } pub unsafe fn wl_text_input_manager_set_user_data ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wl_text_input_manager as _ , user_data ) ; } pub unsafe fn wl_text_input_manager_get_user_data ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wl_text_input_manager as _ ) ; } pub unsafe fn wl_text_input_manager_get_version ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wl_text_input_manager as _ ) ; } pub unsafe fn wl_text_input_manager_add_listener ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wl_text_input_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn wl_text_input_manager_add_rust_listener ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager , listener : & dyn wl_text_input_manager_listener ) -> bool { let to = ( listener as * const dyn wl_text_input_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wl_text_input_manager_add_listener ( wl_text_input_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wl_text_input_manager_destroy ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wl_text_input_manager as _ ) ; } # [ doc = "create text input\n\nCreates a new text-input object." ] pub unsafe fn wl_text_input_manager_create_text_input ( wl_text_input_manager : * mut super :: wl_text_input_manager :: wl_text_input_manager ) -> * mut super :: wl_text_input :: wl_text_input { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wl_text_input_manager as _ , 0u32 , & super :: wl_text_input :: wl_text_input_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } } pub mod appmenu { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "appmenu dbus address interface\n\nThis interface allows a client to link a window (or wl_surface) to an com.canonical.dbusmenu\ninterface registered on DBus." ] pub mod org_kde_kwin_appmenu_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_appmenu_manager { } static mut org_kde_kwin_appmenu_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_appmenu_manager_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_appmenu_manager_requests_create_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_appmenu_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_appmenu_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_kwin_appmenu_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_appmenu_manager_listener { } pub unsafe fn org_kde_kwin_appmenu_manager_set_user_data ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_appmenu_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_appmenu_manager_get_user_data ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_appmenu_manager as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_manager_get_version ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_appmenu_manager as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_manager_add_listener ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_appmenu_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_manager_add_rust_listener ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager , listener : & dyn org_kde_kwin_appmenu_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_appmenu_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_appmenu_manager_add_listener ( org_kde_kwin_appmenu_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_appmenu_manager_destroy ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_appmenu_manager as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_manager_create ( org_kde_kwin_appmenu_manager : * mut super :: org_kde_kwin_appmenu_manager :: org_kde_kwin_appmenu_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_appmenu_manager as _ , 0u32 , & super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "appmenu dbus address interface\n\nThe DBus service name and object path where the appmenu interface is present\nThe object should be registered on the session bus before sending this request.\nIf not applicable, clients should remove this object." ] pub mod org_kde_kwin_appmenu { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_appmenu { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_appmenu_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_address\0" as * const u8 as * const c_char , signature : b"ss\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_appmenu_interface : wl_interface = wl_interface { name : b"org_kde_kwin_appmenu\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_appmenu_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_appmenu_listener { } pub unsafe fn org_kde_kwin_appmenu_set_user_data ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_appmenu as _ , user_data ) ; } pub unsafe fn org_kde_kwin_appmenu_get_user_data ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_appmenu as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_get_version ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_appmenu as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_add_listener ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_appmenu as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_appmenu_add_rust_listener ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu , listener : & dyn org_kde_kwin_appmenu_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_appmenu_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_appmenu_add_listener ( org_kde_kwin_appmenu as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_appmenu_destroy ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_appmenu as _ ) ; } # [ doc = "initialise or update the location of the AppMenu interface\n\nSet or update the service name and object path.\nStrings should be formatted in Latin-1 matching the relevant DBus specifications." ] pub unsafe fn org_kde_kwin_appmenu_set_address ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu , service_name : * const c_char , object_path : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_appmenu as _ , 0u32 , service_name , object_path , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the appmenu object" ] pub unsafe fn org_kde_kwin_appmenu_release ( org_kde_kwin_appmenu : * mut super :: org_kde_kwin_appmenu :: org_kde_kwin_appmenu ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_appmenu as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_appmenu as _ ) ; } } } pub mod plasma_shell { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "create shell windows and helpers\n\nThis interface is used by KF5 powered Wayland shells to communicate with\nthe compositor and can only be bound one time." ] pub mod org_kde_plasma_shell { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_plasma_shell { } static mut org_kde_plasma_shell_requests_get_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_plasma_surface :: org_kde_plasma_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_shell_requests : [ wl_message ; 1 ] = [ wl_message { name : b"get_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_plasma_shell_requests_get_surface_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_plasma_shell_interface : wl_interface = wl_interface { name : b"org_kde_plasma_shell\0" as * const u8 as * const c_char , version : 6 , request_count : 1 , requests : unsafe { & org_kde_plasma_shell_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_plasma_shell_listener { } pub unsafe fn org_kde_plasma_shell_set_user_data ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_plasma_shell as _ , user_data ) ; } pub unsafe fn org_kde_plasma_shell_get_user_data ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_plasma_shell as _ ) ; } pub unsafe fn org_kde_plasma_shell_get_version ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_plasma_shell as _ ) ; } pub unsafe fn org_kde_plasma_shell_add_listener ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_plasma_shell as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_plasma_shell_add_rust_listener ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell , listener : & dyn org_kde_plasma_shell_listener ) -> bool { let to = ( listener as * const dyn org_kde_plasma_shell_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_plasma_shell_add_listener ( org_kde_plasma_shell as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_plasma_shell_destroy ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_plasma_shell as _ ) ; } # [ doc = "create a shell surface from a surface\n\nCreate a shell surface for an existing surface.\n\nOnly one shell surface can be associated with a given\nsurface." ] pub unsafe fn org_kde_plasma_shell_get_surface ( org_kde_plasma_shell : * mut super :: org_kde_plasma_shell :: org_kde_plasma_shell , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_plasma_shell as _ , 0u32 , & super :: org_kde_plasma_surface :: org_kde_plasma_surface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "metadata interface\n\nAn interface that may be implemented by a wl_surface, for\nimplementations that provide the shell user interface.\n\nIt provides requests to set surface roles, assign an output\nor set the position in output coordinates.\n\nOn the server side the object is automatically destroyed when\nthe related wl_surface is destroyed. On client side,\norg_kde_plasma_surface.destroy() must be called before\ndestroying the wl_surface object." ] pub mod org_kde_plasma_surface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_plasma_surface { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum role { normal = 0 , desktop = 1 , panel = 2 , onscreendisplay = 3 , notification = 4 , tooltip = 5 , criticalnotification = 6 , # [ doc ( hidden ) ] __nonexhaustive , } impl role { pub fn from_raw ( n : u32 ) -> Option < role > { match n { 0 => Some ( role :: normal ) , 1 => Some ( role :: desktop ) , 2 => Some ( role :: panel ) , 3 => Some ( role :: onscreendisplay ) , 4 => Some ( role :: notification ) , 5 => Some ( role :: tooltip ) , 6 => Some ( role :: criticalnotification ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "Behavior for panel surface" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum panel_behavior { # [ doc = "normal panel visibility\n\nThe panel is on top of other surfaces, windows cannot cover (full screen\nwindows excluded)." ] always_visible = 1 , # [ doc = "hide automatically\n\nThe panel is hidden automatically and restored when the mouse is over." ] auto_hide = 2 , # [ doc = "windows can cover\n\nWindows can cover the panel." ] windows_can_cover = 3 , # [ doc = "windows go below\n\nMaximized windows take the whole screen space but the panel is above\nthe windows." ] windows_go_below = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl panel_behavior { pub fn from_raw ( n : u32 ) -> Option < panel_behavior > { match n { 1 => Some ( panel_behavior :: always_visible ) , 2 => Some ( panel_behavior :: auto_hide ) , 3 => Some ( panel_behavior :: windows_can_cover ) , 4 => Some ( panel_behavior :: windows_go_below ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "Request panel_auto_hide performed on a surface which does not correspond to an auto-hide panel." ] panel_not_auto_hide = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: panel_not_auto_hide ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut org_kde_plasma_surface_requests_set_output_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_surface_requests : [ wl_message ; 10 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_output\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_plasma_surface_requests_set_output_types as * const _ } , } , wl_message { name : b"set_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_role\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_panel_behavior\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_skip_taskbar\0" as * const u8 as * const c_char , signature : b"2u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"panel_auto_hide_hide\0" as * const u8 as * const c_char , signature : b"4\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"panel_auto_hide_show\0" as * const u8 as * const c_char , signature : b"4\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_panel_takes_focus\0" as * const u8 as * const c_char , signature : b"4u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_skip_switcher\0" as * const u8 as * const c_char , signature : b"5u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_surface_events : [ wl_message ; 2 ] = [ wl_message { name : b"auto_hidden_panel_hidden\0" as * const u8 as * const c_char , signature : b"4\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"auto_hidden_panel_shown\0" as * const u8 as * const c_char , signature : b"4\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_plasma_surface_interface : wl_interface = wl_interface { name : b"org_kde_plasma_surface\0" as * const u8 as * const c_char , version : 6 , request_count : 10 , requests : unsafe { & org_kde_plasma_surface_requests as * const _ } , event_count : 2 , events : unsafe { & org_kde_plasma_surface_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_plasma_surface_listener { # [ doc = "Auto-hiding panel is hidden\n\nAn auto-hiding panel got hidden by the compositor.\n\nOnly available since version 4 of the interface." ] fn auto_hidden_panel_hidden ( & mut self , object : * mut org_kde_plasma_surface , ) { } # [ doc = "Auto-hiding panel is shown\n\nAn auto-hiding panel got shown by the compositor.\n\nOnly available since version 4 of the interface." ] fn auto_hidden_panel_shown ( & mut self , object : * mut org_kde_plasma_surface , ) { } } pub unsafe fn org_kde_plasma_surface_set_user_data ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_plasma_surface as _ , user_data ) ; } pub unsafe fn org_kde_plasma_surface_get_user_data ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_plasma_surface as _ ) ; } pub unsafe fn org_kde_plasma_surface_get_version ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_plasma_surface as _ ) ; } pub unsafe fn org_kde_plasma_surface_add_listener ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_plasma_surface as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_plasma_surface_add_rust_listener ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , listener : & dyn org_kde_plasma_surface_listener ) -> bool { let to = ( listener as * const dyn org_kde_plasma_surface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_plasma_surface_add_listener ( org_kde_plasma_surface as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "remove org_kde_plasma_surface interface\n\nThe org_kde_plasma_surface interface is removed from the\nwl_surface object that was turned into a shell surface with the\norg_kde_plasma_shell.get_surface request.\nThe shell surface role is lost and wl_surface is unmapped." ] pub unsafe fn org_kde_plasma_surface_destroy ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_plasma_surface as _ ) ; } # [ doc = "assign an output to this shell surface\n\nAssign an output to this shell surface.\nThe compositor will use this information to set the position\nwhen org_kde_plasma_surface.set_position request is\ncalled." ] pub unsafe fn org_kde_plasma_surface_set_output ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 1u32 , output , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "change the shell surface position\n\nMove the surface to new coordinates.\n\nCoordinates are global, for example 50,50 for a 1920,0+1920x1080 output\nis 1970,50 in global coordinates space.\n\nUse org_kde_plasma_surface.set_output to assign an output\nto this surface." ] pub unsafe fn org_kde_plasma_surface_set_position ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 2u32 , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "assign a role to this surface\n\nAssign a role to a shell surface.\n\nThe compositor handles surfaces depending on their role.\nSee the explanation below.\n\nThis request fails if the surface already has a role, this means\nthe surface role may be assigned only once.\n\n== Surfaces with splash role ==\n\nSplash surfaces are placed above every other surface during the\nshell startup phase.\n\nThe surfaces are placed according to the output coordinates.\nNo size is imposed to those surfaces, the shell has to resize\nthem according to output size.\n\nThese surfaces are meant to hide the desktop during the startup\nphase so that the user will always see a ready to work desktop.\n\nA shell might not create splash surfaces if the compositor reveals\nthe desktop in an alternative fashion, for example with a fade\nin effect.\n\nThat depends on how much time the desktop usually need to prepare\nthe workspace or specific design decisions.\nThis specification doesn't impose any particular design.\n\nWhen the startup phase is finished, the shell will send the\norg_kde_plasma.desktop_ready request to the compositor.\n\n== Surfaces with desktop role ==\n\nDesktop surfaces are placed below all other surfaces and are used\nto show the actual desktop view with icons, search results or\ncontrols the user will interact with. What to show depends on the\nshell implementation.\n\nThe surfaces are placed according to the output coordinates.\nNo size is imposed to those surfaces, the shell has to resize\nthem according to output size.\n\nOnly one surface per output can have the desktop role.\n\n== Surfaces with dashboard role ==\n\nDashboard surfaces are placed above desktop surfaces and are used to\nshow additional widgets and controls.\n\nThe surfaces are placed according to the output coordinates.\nNo size is imposed to those surfaces, the shell has to resize\nthem according to output size.\n\nOnly one surface per output can have the dashboard role.\n\n== Surfaces with config role ==\n\nA configuration surface is shown when the user wants to configure\npanel or desktop views.\n\nOnly one surface per output can have the config role.\n\nTODO: This should grab the input like popup menus, right?\n\n== Surfaces with overlay role ==\n\nOverlays are special surfaces that shows for a limited amount\nof time. Such surfaces are useful to display things like volume,\nbrightness and status changes.\n\nCompositors may decide to show those surfaces in a layer above\nall surfaces, even full screen ones if so is desired.\n\n== Surfaces with notification role ==\n\nNotification surfaces display informative content for a limited\namount of time. The compositor may decide to show them in a corner\ndepending on the configuration.\n\nThese surfaces are shown in a layer above all other surfaces except\nfor full screen ones.\n\n== Surfaces with lock role ==\n\nThe lock surface is shown by the compositor when the session is\nlocked, users interact with it to unlock the session.\n\nCompositors should move lock surfaces to 0,0 in output\ncoordinates space and hide all other surfaces for security sake.\nFor the same reason it is recommended that clients make the\nlock surface as big as the screen.\n\nOnly one surface per output can have the lock role." ] pub unsafe fn org_kde_plasma_surface_set_role ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , role : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 3u32 , role , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set or unset the panel\n\nSet flags bitmask as described by the flag enum.\nPass 0 to unset any flag, the surface will adjust its behavior to\nthe default." ] pub unsafe fn org_kde_plasma_surface_set_panel_behavior ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , flag : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 4u32 , flag , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the window skip the taskbar\n\nSetting this bit to the window, will make it say it prefers to not be listed in the taskbar. Taskbar implementations may or may not follow this hint." ] pub unsafe fn org_kde_plasma_surface_set_skip_taskbar ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , skip : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 5u32 , skip , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Hide the auto-hiding panel\n\nA panel surface with panel_behavior auto_hide can perform this request to hide the panel\non a screen edge without unmapping it. The compositor informs the client about the panel\nbeing hidden with the event auto_hidden_panel_hidden.\n\nThe compositor will restore the visibility state of the\nsurface when the pointer touches the screen edge the panel borders. Once the compositor restores\nthe visibility the event auto_hidden_panel_shown will be sent. This event will also be sent\nif the compositor is unable to hide the panel.\n\nThe client can also request to show the panel again with the request panel_auto_hide_show." ] pub unsafe fn org_kde_plasma_surface_panel_auto_hide_hide ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 6u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Show the auto-hiding panel\n\nA panel surface with panel_behavior auto_hide can perform this request to show the panel\nagain which got hidden with panel_auto_hide_hide." ] pub unsafe fn org_kde_plasma_surface_panel_auto_hide_show ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 7u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Whether a panel takes focus\n\nBy default various org_kde_plasma_surface roles do not take focus and cannot be\nactivated. With this request the compositor can be instructed to pass focus also to this\norg_kde_plasma_surface." ] pub unsafe fn org_kde_plasma_surface_set_panel_takes_focus ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , takes_focus : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 8u32 , takes_focus , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "make the window not appear in a switcher\n\nSetting this bit will indicate that the window prefers not to be listed in a switcher." ] pub unsafe fn org_kde_plasma_surface_set_skip_switcher ( org_kde_plasma_surface : * mut super :: org_kde_plasma_surface :: org_kde_plasma_surface , skip : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_surface as _ , 9u32 , skip , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod slide { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod org_kde_kwin_slide_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_slide_manager { } static mut org_kde_kwin_slide_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_slide :: org_kde_kwin_slide_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut org_kde_kwin_slide_manager_requests_unset_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_slide_manager_requests : [ wl_message ; 2 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_slide_manager_requests_create_types as * const _ } , } , wl_message { name : b"unset\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_slide_manager_requests_unset_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_slide_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_slide_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_slide_manager_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_slide_manager_listener { } pub unsafe fn org_kde_kwin_slide_manager_set_user_data ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_slide_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_slide_manager_get_user_data ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_slide_manager as _ ) ; } pub unsafe fn org_kde_kwin_slide_manager_get_version ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_slide_manager as _ ) ; } pub unsafe fn org_kde_kwin_slide_manager_add_listener ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_slide_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_slide_manager_add_rust_listener ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager , listener : & dyn org_kde_kwin_slide_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_slide_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_slide_manager_add_listener ( org_kde_kwin_slide_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_slide_manager_destroy ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_slide_manager as _ ) ; } pub unsafe fn org_kde_kwin_slide_manager_create ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_slide_manager as _ , 0u32 , & super :: org_kde_kwin_slide :: org_kde_kwin_slide_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } pub unsafe fn org_kde_kwin_slide_manager_unset ( org_kde_kwin_slide_manager : * mut super :: org_kde_kwin_slide_manager :: org_kde_kwin_slide_manager , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_slide_manager as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "slide a surface from a location to another\n\nAsk the compositor to move the surface from a location to another\nwith a slide animation.\n\nThe from argument provides a clue about where the slide animation\nbegins, offset is the distance from screen edge to begin the animation." ] pub mod org_kde_kwin_slide { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_slide { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum location { left = 0 , top = 1 , right = 2 , bottom = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl location { pub fn from_raw ( n : u32 ) -> Option < location > { match n { 0 => Some ( location :: left ) , 1 => Some ( location :: top ) , 2 => Some ( location :: right ) , 3 => Some ( location :: bottom ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_slide_requests : [ wl_message ; 4 ] = [ wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_location\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_offset\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_slide_interface : wl_interface = wl_interface { name : b"org_kde_kwin_slide\0" as * const u8 as * const c_char , version : 1 , request_count : 4 , requests : unsafe { & org_kde_kwin_slide_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_slide_listener { } pub unsafe fn org_kde_kwin_slide_set_user_data ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_slide as _ , user_data ) ; } pub unsafe fn org_kde_kwin_slide_get_user_data ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_slide as _ ) ; } pub unsafe fn org_kde_kwin_slide_get_version ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_slide as _ ) ; } pub unsafe fn org_kde_kwin_slide_add_listener ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_slide as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_slide_add_rust_listener ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide , listener : & dyn org_kde_kwin_slide_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_slide_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_slide_add_listener ( org_kde_kwin_slide as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_slide_destroy ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_slide as _ ) ; } pub unsafe fn org_kde_kwin_slide_commit ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_slide as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_slide_set_location ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide , location : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_slide as _ , 1u32 , location , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn org_kde_kwin_slide_set_offset ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide , offset : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_slide as _ , 2u32 , offset , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the slide object" ] pub unsafe fn org_kde_kwin_slide_release ( org_kde_kwin_slide : * mut super :: org_kde_kwin_slide :: org_kde_kwin_slide ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_slide as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_slide as _ ) ; } } } pub mod wp_primary_selection_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "X primary selection emulation\n\nThe primary selection device manager is a singleton global object that\nprovides access to the primary selection. It allows to create\nwp_primary_selection_source objects, as well as retrieving the per-seat\nwp_primary_selection_device objects." ] pub mod zwp_primary_selection_device_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_primary_selection_device_manager_v1 { } static mut zwp_primary_selection_device_manager_v1_requests_create_source_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1_interface as * const wl_interface } , ] ; static mut zwp_primary_selection_device_manager_v1_requests_get_device_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_device_manager_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"create_source\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_primary_selection_device_manager_v1_requests_create_source_types as * const _ } , } , wl_message { name : b"get_device\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_primary_selection_device_manager_v1_requests_get_device_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_primary_selection_device_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_primary_selection_device_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & zwp_primary_selection_device_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_primary_selection_device_manager_v1_listener { } pub unsafe fn zwp_primary_selection_device_manager_v1_set_user_data ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_primary_selection_device_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_primary_selection_device_manager_v1_get_user_data ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_primary_selection_device_manager_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_device_manager_v1_get_version ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_primary_selection_device_manager_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_device_manager_v1_add_listener ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_primary_selection_device_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_primary_selection_device_manager_v1_add_rust_listener ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 , listener : & dyn zwp_primary_selection_device_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_primary_selection_device_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_primary_selection_device_manager_v1_add_listener ( zwp_primary_selection_device_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "create a new primary selection source\n\nCreate a new primary selection source." ] pub unsafe fn zwp_primary_selection_device_manager_v1_create_source ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 ) -> * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_primary_selection_device_manager_v1 as _ , 0u32 , & super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "create a new primary selection device\n\nCreate a new data device for a given seat." ] pub unsafe fn zwp_primary_selection_device_manager_v1_get_device ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_primary_selection_device_manager_v1 as _ , 1u32 , & super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat ) ; return r as _ ; } # [ doc = "destroy the primary selection device manager\n\nDestroy the primary selection device manager." ] pub unsafe fn zwp_primary_selection_device_manager_v1_destroy ( zwp_primary_selection_device_manager_v1 : * mut super :: zwp_primary_selection_device_manager_v1 :: zwp_primary_selection_device_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_device_manager_v1 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_primary_selection_device_manager_v1 as _ ) ; } } pub mod zwp_primary_selection_device_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_primary_selection_device_v1 { } static mut zwp_primary_selection_device_v1_requests_set_selection_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_device_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_selection\0" as * const u8 as * const c_char , signature : b"?ou\0" as * const u8 as * const c_char , types : unsafe { & zwp_primary_selection_device_v1_requests_set_selection_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_primary_selection_device_v1_events_data_offer_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1_interface as * const wl_interface } , ] ; static mut zwp_primary_selection_device_v1_events_selection_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_device_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"data_offer\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_primary_selection_device_v1_events_data_offer_types as * const _ } , } , wl_message { name : b"selection\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & zwp_primary_selection_device_v1_events_selection_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_primary_selection_device_v1_interface : wl_interface = wl_interface { name : b"zwp_primary_selection_device_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_primary_selection_device_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_primary_selection_device_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_primary_selection_device_v1_listener { # [ doc = "introduce a new wp_primary_selection_offer\n\nIntroduces a new wp_primary_selection_offer object that may be used\nto receive the current primary selection. Immediately following this\nevent, the new wp_primary_selection_offer object will send\nwp_primary_selection_offer.offer events to describe the offered mime\ntypes." ] fn data_offer ( & mut self , object : * mut zwp_primary_selection_device_v1 , offer : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 ) { } # [ doc = "advertise a new primary selection\n\nThe wp_primary_selection_device.selection event is sent to notify the\nclient of a new primary selection. This event is sent after the\nwp_primary_selection.data_offer event introducing this object, and after\nthe offer has announced its mimetypes through\nwp_primary_selection_offer.offer.\n\nThe data_offer is valid until a new offer or NULL is received\nor until the client loses keyboard focus. The client must destroy the\nprevious selection data_offer, if any, upon receiving this event." ] fn selection ( & mut self , object : * mut zwp_primary_selection_device_v1 , id : Option < * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 > ) { } } pub unsafe fn zwp_primary_selection_device_v1_set_user_data ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_primary_selection_device_v1 as _ , user_data ) ; } pub unsafe fn zwp_primary_selection_device_v1_get_user_data ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_primary_selection_device_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_device_v1_get_version ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_primary_selection_device_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_device_v1_add_listener ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_primary_selection_device_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_primary_selection_device_v1_add_rust_listener ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 , listener : & dyn zwp_primary_selection_device_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_primary_selection_device_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_primary_selection_device_v1_add_listener ( zwp_primary_selection_device_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "set the primary selection\n\nReplaces the current selection. The previous owner of the primary\nselection will receive a wp_primary_selection_source.cancelled event.\n\nTo unset the selection, set the source to NULL." ] pub unsafe fn zwp_primary_selection_device_v1_set_selection ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 , source : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_device_v1 as _ , 0u32 , source , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the primary selection device\n\nDestroy the primary selection device." ] pub unsafe fn zwp_primary_selection_device_v1_destroy ( zwp_primary_selection_device_v1 : * mut super :: zwp_primary_selection_device_v1 :: zwp_primary_selection_device_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_device_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_primary_selection_device_v1 as _ ) ; } } # [ doc = "offer to transfer primary selection contents\n\nA wp_primary_selection_offer represents an offer to transfer the contents\nof the primary selection clipboard to the client. Similar to\nwl_data_offer, the offer also describes the mime types that the data can\nbe converted to and provides the mechanisms for transferring the data\ndirectly to the client." ] pub mod zwp_primary_selection_offer_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_primary_selection_offer_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_offer_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"receive\0" as * const u8 as * const c_char , signature : b"sh\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_offer_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"offer\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_primary_selection_offer_v1_interface : wl_interface = wl_interface { name : b"zwp_primary_selection_offer_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_primary_selection_offer_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zwp_primary_selection_offer_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_primary_selection_offer_v1_listener { # [ doc = "advertise offered mime type\n\nSent immediately after creating announcing the\nwp_primary_selection_offer through\nwp_primary_selection_device.data_offer. One event is sent per offered\nmime type." ] fn offer ( & mut self , object : * mut zwp_primary_selection_offer_v1 , mime_type : * mut c_char ) { } } pub unsafe fn zwp_primary_selection_offer_v1_set_user_data ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_primary_selection_offer_v1 as _ , user_data ) ; } pub unsafe fn zwp_primary_selection_offer_v1_get_user_data ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_primary_selection_offer_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_offer_v1_get_version ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_primary_selection_offer_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_offer_v1_add_listener ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_primary_selection_offer_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_primary_selection_offer_v1_add_rust_listener ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 , listener : & dyn zwp_primary_selection_offer_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_primary_selection_offer_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_primary_selection_offer_v1_add_listener ( zwp_primary_selection_offer_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "request that the data is transferred\n\nTo transfer the contents of the primary selection clipboard, the client\nissues this request and indicates the mime type that it wants to\nreceive. The transfer happens through the passed file descriptor\n(typically created with the pipe system call). The source client writes\nthe data in the mime type representation requested and then closes the\nfile descriptor.\n\nThe receiving client reads from the read end of the pipe until EOF and\ncloses its end, at which point the transfer is complete." ] pub unsafe fn zwp_primary_selection_offer_v1_receive ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 , mime_type : * const c_char , fd : :: std :: os :: unix :: io :: RawFd ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_offer_v1 as _ , 0u32 , mime_type , fd , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the primary selection offer\n\nDestroy the primary selection offer." ] pub unsafe fn zwp_primary_selection_offer_v1_destroy ( zwp_primary_selection_offer_v1 : * mut super :: zwp_primary_selection_offer_v1 :: zwp_primary_selection_offer_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_offer_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_primary_selection_offer_v1 as _ ) ; } } # [ doc = "offer to replace the contents of the primary selection\n\nThe source side of a wp_primary_selection_offer, it provides a way to\ndescribe the offered data and respond to requests to transfer the\nrequested contents of the primary selection clipboard." ] pub mod zwp_primary_selection_source_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_primary_selection_source_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_source_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"offer\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_primary_selection_source_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"send\0" as * const u8 as * const c_char , signature : b"sh\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cancelled\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_primary_selection_source_v1_interface : wl_interface = wl_interface { name : b"zwp_primary_selection_source_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_primary_selection_source_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_primary_selection_source_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_primary_selection_source_v1_listener { # [ doc = "send the primary selection contents\n\nRequest for the current primary selection contents from the client.\nSend the specified mime type over the passed file descriptor, then\nclose it." ] fn send ( & mut self , object : * mut zwp_primary_selection_source_v1 , mime_type : * mut c_char , fd : :: std :: os :: unix :: io :: RawFd ) { } # [ doc = "request for primary selection contents was canceled\n\nThis primary selection source is no longer valid. The client should\nclean up and destroy this primary selection source." ] fn cancelled ( & mut self , object : * mut zwp_primary_selection_source_v1 , ) { } } pub unsafe fn zwp_primary_selection_source_v1_set_user_data ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_primary_selection_source_v1 as _ , user_data ) ; } pub unsafe fn zwp_primary_selection_source_v1_get_user_data ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_primary_selection_source_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_source_v1_get_version ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_primary_selection_source_v1 as _ ) ; } pub unsafe fn zwp_primary_selection_source_v1_add_listener ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_primary_selection_source_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_primary_selection_source_v1_add_rust_listener ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 , listener : & dyn zwp_primary_selection_source_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_primary_selection_source_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_primary_selection_source_v1_add_listener ( zwp_primary_selection_source_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "add an offered mime type\n\nThis request adds a mime type to the set of mime types advertised to\ntargets. Can be called several times to offer multiple types." ] pub unsafe fn zwp_primary_selection_source_v1_offer ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 , mime_type : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_source_v1 as _ , 0u32 , mime_type , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "destroy the primary selection source\n\nDestroy the primary selection source." ] pub unsafe fn zwp_primary_selection_source_v1_destroy ( zwp_primary_selection_source_v1 : * mut super :: zwp_primary_selection_source_v1 :: zwp_primary_selection_source_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_primary_selection_source_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_primary_selection_source_v1 as _ ) ; } } } pub mod idle { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "User idle time manager\n\nThis interface allows to monitor user idle time on a given seat. The interface\nallows to register timers which trigger after no user activity was registered\non the seat for a given interval. It notifies when user activity resumes.\n\nThis is useful for applications wanting to perform actions when the user is not\ninteracting with the system, e.g. chat applications setting the user as away, power\nmanagement features to dim screen, etc.." ] pub mod org_kde_kwin_idle { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_idle { } static mut org_kde_kwin_idle_requests_get_idle_timeout_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_idle_requests : [ wl_message ; 1 ] = [ wl_message { name : b"get_idle_timeout\0" as * const u8 as * const c_char , signature : b"nou\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_idle_requests_get_idle_timeout_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_idle_interface : wl_interface = wl_interface { name : b"org_kde_kwin_idle\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_kwin_idle_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_idle_listener { } pub unsafe fn org_kde_kwin_idle_set_user_data ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_idle as _ , user_data ) ; } pub unsafe fn org_kde_kwin_idle_get_user_data ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_idle as _ ) ; } pub unsafe fn org_kde_kwin_idle_get_version ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_idle as _ ) ; } pub unsafe fn org_kde_kwin_idle_add_listener ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_idle as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_idle_add_rust_listener ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle , listener : & dyn org_kde_kwin_idle_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_idle_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_idle_add_listener ( org_kde_kwin_idle as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_idle_destroy ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_idle as _ ) ; } pub unsafe fn org_kde_kwin_idle_get_idle_timeout ( org_kde_kwin_idle : * mut super :: org_kde_kwin_idle :: org_kde_kwin_idle , seat : * mut super :: wl_seat :: wl_seat , timeout : u32 ) -> * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_idle as _ , 0u32 , & super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat , timeout ) ; return r as _ ; } } pub mod org_kde_kwin_idle_timeout { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_idle_timeout { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_idle_timeout_requests : [ wl_message ; 2 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"simulate_user_activity\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_idle_timeout_events : [ wl_message ; 2 ] = [ wl_message { name : b"idle\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"resumed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_idle_timeout_interface : wl_interface = wl_interface { name : b"org_kde_kwin_idle_timeout\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_idle_timeout_requests as * const _ } , event_count : 2 , events : unsafe { & org_kde_kwin_idle_timeout_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_idle_timeout_listener { # [ doc = "Triggered when there has not been any user activity in the requested idle time interval" ] fn idle ( & mut self , object : * mut org_kde_kwin_idle_timeout , ) { } # [ doc = "Triggered on the first user activity after an idle event" ] fn resumed ( & mut self , object : * mut org_kde_kwin_idle_timeout , ) { } } pub unsafe fn org_kde_kwin_idle_timeout_set_user_data ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_idle_timeout as _ , user_data ) ; } pub unsafe fn org_kde_kwin_idle_timeout_get_user_data ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_idle_timeout as _ ) ; } pub unsafe fn org_kde_kwin_idle_timeout_get_version ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_idle_timeout as _ ) ; } pub unsafe fn org_kde_kwin_idle_timeout_add_listener ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_idle_timeout as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_idle_timeout_add_rust_listener ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout , listener : & dyn org_kde_kwin_idle_timeout_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_idle_timeout_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_idle_timeout_add_listener ( org_kde_kwin_idle_timeout as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_idle_timeout_destroy ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_idle_timeout as _ ) ; } # [ doc = "release the timeout object" ] pub unsafe fn org_kde_kwin_idle_timeout_release ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_idle_timeout as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_idle_timeout as _ ) ; } # [ doc = "Simulates user activity for this timeout, behaves just like real user activity on the seat" ] pub unsafe fn org_kde_kwin_idle_timeout_simulate_user_activity ( org_kde_kwin_idle_timeout : * mut super :: org_kde_kwin_idle_timeout :: org_kde_kwin_idle_timeout ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_idle_timeout as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod remote_access { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Protocol for managing rendered GBM buffers passing" ] pub mod org_kde_kwin_remote_access_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_remote_access_manager { } static mut org_kde_kwin_remote_access_manager_requests_get_buffer_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_remote_access_manager_requests : [ wl_message ; 2 ] = [ wl_message { name : b"get_buffer\0" as * const u8 as * const c_char , signature : b"ni\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_remote_access_manager_requests_get_buffer_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut org_kde_kwin_remote_access_manager_events_buffer_ready_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_remote_access_manager_events : [ wl_message ; 1 ] = [ wl_message { name : b"buffer_ready\0" as * const u8 as * const c_char , signature : b"io\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_remote_access_manager_events_buffer_ready_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_remote_access_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_remote_access_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_remote_access_manager_requests as * const _ } , event_count : 1 , events : unsafe { & org_kde_kwin_remote_access_manager_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_remote_access_manager_listener { # [ doc = "Signals about buffer ready to be consumed by clients" ] fn buffer_ready ( & mut self , object : * mut org_kde_kwin_remote_access_manager , id : i32 , output : * mut super :: wl_output :: wl_output ) { } } pub unsafe fn org_kde_kwin_remote_access_manager_set_user_data ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_remote_access_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_remote_access_manager_get_user_data ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_remote_access_manager as _ ) ; } pub unsafe fn org_kde_kwin_remote_access_manager_get_version ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_remote_access_manager as _ ) ; } pub unsafe fn org_kde_kwin_remote_access_manager_add_listener ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_remote_access_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_remote_access_manager_add_rust_listener ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager , listener : & dyn org_kde_kwin_remote_access_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_remote_access_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_remote_access_manager_add_listener ( org_kde_kwin_remote_access_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_remote_access_manager_destroy ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_remote_access_manager as _ ) ; } # [ doc = "Answer on buffer_ready event, retrieves new buffer from server" ] pub unsafe fn org_kde_kwin_remote_access_manager_get_buffer ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager , internal_buffer_id : i32 ) -> * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_remote_access_manager as _ , 0u32 , & super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , internal_buffer_id ) ; return r as _ ; } # [ doc = "release org_kde_kwin_remote_access_manager interface" ] pub unsafe fn org_kde_kwin_remote_access_manager_release ( org_kde_kwin_remote_access_manager : * mut super :: org_kde_kwin_remote_access_manager :: org_kde_kwin_remote_access_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_remote_access_manager as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_remote_access_manager as _ ) ; } } # [ doc = "This interface allows finer control of remote buffer lifecycle" ] pub mod org_kde_kwin_remote_buffer { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_remote_buffer { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_remote_buffer_requests : [ wl_message ; 1 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_remote_buffer_events : [ wl_message ; 1 ] = [ wl_message { name : b"gbm_handle\0" as * const u8 as * const c_char , signature : b"huuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_remote_buffer_interface : wl_interface = wl_interface { name : b"org_kde_kwin_remote_buffer\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_kwin_remote_buffer_requests as * const _ } , event_count : 1 , events : unsafe { & org_kde_kwin_remote_buffer_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_remote_buffer_listener { # [ doc = "This is sent after binding to remote access manager" ] fn gbm_handle ( & mut self , object : * mut org_kde_kwin_remote_buffer , fd : :: std :: os :: unix :: io :: RawFd , width : u32 , height : u32 , stride : u32 , format : u32 ) { } } pub unsafe fn org_kde_kwin_remote_buffer_set_user_data ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_remote_buffer as _ , user_data ) ; } pub unsafe fn org_kde_kwin_remote_buffer_get_user_data ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_remote_buffer as _ ) ; } pub unsafe fn org_kde_kwin_remote_buffer_get_version ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_remote_buffer as _ ) ; } pub unsafe fn org_kde_kwin_remote_buffer_add_listener ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_remote_buffer as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_remote_buffer_add_rust_listener ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer , listener : & dyn org_kde_kwin_remote_buffer_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_remote_buffer_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_remote_buffer_add_listener ( org_kde_kwin_remote_buffer as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_remote_buffer_destroy ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_remote_buffer as _ ) ; } # [ doc = "This request comes once client no longer needs this buffer." ] pub unsafe fn org_kde_kwin_remote_buffer_release ( org_kde_kwin_remote_buffer : * mut super :: org_kde_kwin_remote_buffer :: org_kde_kwin_remote_buffer ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_remote_buffer as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_remote_buffer as _ ) ; } } } pub mod org_kde_plasma_virtual_desktop { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; pub mod org_kde_plasma_virtual_desktop_management { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_plasma_virtual_desktop_management { } static mut org_kde_plasma_virtual_desktop_management_requests_get_virtual_desktop_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_virtual_desktop_management_requests : [ wl_message ; 3 ] = [ wl_message { name : b"get_virtual_desktop\0" as * const u8 as * const c_char , signature : b"ns\0" as * const u8 as * const c_char , types : unsafe { & org_kde_plasma_virtual_desktop_management_requests_get_virtual_desktop_types as * const _ } , } , wl_message { name : b"request_create_virtual_desktop\0" as * const u8 as * const c_char , signature : b"su\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"request_remove_virtual_desktop\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_virtual_desktop_management_events : [ wl_message ; 4 ] = [ wl_message { name : b"desktop_created\0" as * const u8 as * const c_char , signature : b"su\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"desktop_removed\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"rows\0" as * const u8 as * const c_char , signature : b"2u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_plasma_virtual_desktop_management_interface : wl_interface = wl_interface { name : b"org_kde_plasma_virtual_desktop_management\0" as * const u8 as * const c_char , version : 2 , request_count : 3 , requests : unsafe { & org_kde_plasma_virtual_desktop_management_requests as * const _ } , event_count : 4 , events : unsafe { & org_kde_plasma_virtual_desktop_management_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_plasma_virtual_desktop_management_listener { # [ doc = "Emitted when a new desktop has been created" ] fn desktop_created ( & mut self , object : * mut org_kde_plasma_virtual_desktop_management , desktop_id : * mut c_char , position : u32 ) { } # [ doc = "Emitted when a desktop has been removed" ] fn desktop_removed ( & mut self , object : * mut org_kde_plasma_virtual_desktop_management , desktop_id : * mut c_char ) { } # [ doc = "sent all information about desktops\n\nThis event is sent after all other properties has been\nsent after binding to the desktop manager object and after any\nother property changes done after that. This allows\nchanges to the org_kde_plasma_virtual_desktop_management properties to be seen as\natomic, even if they happen via multiple events." ] fn done ( & mut self , object : * mut org_kde_plasma_virtual_desktop_management , ) { } # [ doc = "Only available since version 2 of the interface." ] fn rows ( & mut self , object : * mut org_kde_plasma_virtual_desktop_management , rows : u32 ) { } } pub unsafe fn org_kde_plasma_virtual_desktop_management_set_user_data ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_plasma_virtual_desktop_management as _ , user_data ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_management_get_user_data ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_plasma_virtual_desktop_management as _ ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_management_get_version ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_plasma_virtual_desktop_management as _ ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_management_add_listener ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_plasma_virtual_desktop_management as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_management_add_rust_listener ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management , listener : & dyn org_kde_plasma_virtual_desktop_management_listener ) -> bool { let to = ( listener as * const dyn org_kde_plasma_virtual_desktop_management_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_plasma_virtual_desktop_management_add_listener ( org_kde_plasma_virtual_desktop_management as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_plasma_virtual_desktop_management_destroy ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_plasma_virtual_desktop_management as _ ) ; } # [ doc = "get the org_kde_plasma_virtual_desktop interface for a desktop\n\nGiven the id of a particular virtual desktop, get the corresponding org_kde_plasma_virtual_desktop which represents only the desktop with that id;" ] pub unsafe fn org_kde_plasma_virtual_desktop_management_get_virtual_desktop ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management , desktop_id : * const c_char ) -> * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_plasma_virtual_desktop_management as _ , 0u32 , & super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , desktop_id ) ; return r as _ ; } # [ doc = "ask for the creation of a new desktop at a specified position\n\nAsk the server to create a new virtual desktop, and position it at a specified position. If the position is zero or less, it will be positioned at the beginning, if the cosition is the count or more, it will be positioned at the end." ] pub unsafe fn org_kde_plasma_virtual_desktop_management_request_create_virtual_desktop ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management , name : * const c_char , position : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_virtual_desktop_management as _ , 1u32 , name , position , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "ask for a desktop removal identified by id\n\nAsk the server to get rid of a virtual desktop, the server may or may not acconsent to the request." ] pub unsafe fn org_kde_plasma_virtual_desktop_management_request_remove_virtual_desktop ( org_kde_plasma_virtual_desktop_management : * mut super :: org_kde_plasma_virtual_desktop_management :: org_kde_plasma_virtual_desktop_management , desktop_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_virtual_desktop_management as _ , 2u32 , desktop_id , std :: ptr :: null :: < c_void > ( ) ) ; } } pub mod org_kde_plasma_virtual_desktop { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_plasma_virtual_desktop { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_virtual_desktop_requests : [ wl_message ; 1 ] = [ wl_message { name : b"request_activate\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_plasma_virtual_desktop_events : [ wl_message ; 6 ] = [ wl_message { name : b"desktop_id\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"name\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"activated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"deactivated\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_plasma_virtual_desktop_interface : wl_interface = wl_interface { name : b"org_kde_plasma_virtual_desktop\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_plasma_virtual_desktop_requests as * const _ } , event_count : 6 , events : unsafe { & org_kde_plasma_virtual_desktop_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_plasma_virtual_desktop_listener { # [ doc = "The desktop got an id\n\nThe format of the id is decided by the compositor implementation. A desktop id univocally identifies a virtual desktop and must be guaranteed to never exist two desktops with the same id. The format of the string id is up to the server implementation." ] fn desktop_id ( & mut self , object : * mut org_kde_plasma_virtual_desktop , desktop_id : * mut c_char ) { } # [ doc = "" ] fn name ( & mut self , object : * mut org_kde_plasma_virtual_desktop , name : * mut c_char ) { } # [ doc = "The desktop has been activated\n\nThe desktop will be the new \"current\" desktop of the system. The server may support either one virtual desktop active at a time, or other combinations such as one virtual desktop active per screen.\nWindows associated to this virtual desktop will be shown." ] fn activated ( & mut self , object : * mut org_kde_plasma_virtual_desktop , ) { } # [ doc = "This desktop is no longer active\n\nWindows that were associated only to this desktop will be hidden." ] fn deactivated ( & mut self , object : * mut org_kde_plasma_virtual_desktop , ) { } # [ doc = "sent all information about desktops\n\nThis event is sent after all other properties has been\nsent after binding to the desktop object and after any\nother property changes done after that. This allows\nchanges to the org_kde_plasma_virtual_desktop properties to be seen as\natomic, even if they happen via multiple events." ] fn done ( & mut self , object : * mut org_kde_plasma_virtual_desktop , ) { } # [ doc = "This desktop has been removed\n\nThis virtual desktop has just been removed by the server:\nAll windows will lose the association to this desktop." ] fn removed ( & mut self , object : * mut org_kde_plasma_virtual_desktop , ) { } } pub unsafe fn org_kde_plasma_virtual_desktop_set_user_data ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_plasma_virtual_desktop as _ , user_data ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_get_user_data ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_plasma_virtual_desktop as _ ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_get_version ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_plasma_virtual_desktop as _ ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_add_listener ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_plasma_virtual_desktop as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_plasma_virtual_desktop_add_rust_listener ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop , listener : & dyn org_kde_plasma_virtual_desktop_listener ) -> bool { let to = ( listener as * const dyn org_kde_plasma_virtual_desktop_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_plasma_virtual_desktop_add_listener ( org_kde_plasma_virtual_desktop as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_plasma_virtual_desktop_destroy ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_plasma_virtual_desktop as _ ) ; } # [ doc = "Requests this desktop to be activated\n\nRequest the server to set the status of this desktop to active: The server is free to consent or deny the request. This will be the new \"current\" virtual desktop of the system." ] pub unsafe fn org_kde_plasma_virtual_desktop_request_activate ( org_kde_plasma_virtual_desktop : * mut super :: org_kde_plasma_virtual_desktop :: org_kde_plasma_virtual_desktop ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_plasma_virtual_desktop as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod xdg_output_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "manage xdg_output objects\n\nA global factory interface for xdg_output objects." ] pub mod zxdg_output_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_output_manager_v1 { } static mut zxdg_output_manager_v1_requests_get_xdg_output_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_output_v1 :: zxdg_output_v1_interface as * const wl_interface } , unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_output_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_xdg_output\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zxdg_output_manager_v1_requests_get_xdg_output_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_output_manager_v1_interface : wl_interface = wl_interface { name : b"zxdg_output_manager_v1\0" as * const u8 as * const c_char , version : 3 , request_count : 2 , requests : unsafe { & zxdg_output_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_output_manager_v1_listener { } pub unsafe fn zxdg_output_manager_v1_set_user_data ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_output_manager_v1 as _ , user_data ) ; } pub unsafe fn zxdg_output_manager_v1_get_user_data ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_output_manager_v1 as _ ) ; } pub unsafe fn zxdg_output_manager_v1_get_version ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_output_manager_v1 as _ ) ; } pub unsafe fn zxdg_output_manager_v1_add_listener ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_output_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_output_manager_v1_add_rust_listener ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 , listener : & dyn zxdg_output_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_output_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_output_manager_v1_add_listener ( zxdg_output_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_output_manager object\n\nUsing this request a client can tell the server that it is not\ngoing to use the xdg_output_manager object anymore.\n\nAny objects already created through this instance are not affected." ] pub unsafe fn zxdg_output_manager_v1_destroy ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_output_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_output_manager_v1 as _ ) ; } # [ doc = "create an xdg output from a wl_output\n\nThis creates a new xdg_output object for the given wl_output." ] pub unsafe fn zxdg_output_manager_v1_get_xdg_output ( zxdg_output_manager_v1 : * mut super :: zxdg_output_manager_v1 :: zxdg_output_manager_v1 , output : * mut super :: wl_output :: wl_output ) -> * mut super :: zxdg_output_v1 :: zxdg_output_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_output_manager_v1 as _ , 1u32 , & super :: zxdg_output_v1 :: zxdg_output_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , output ) ; return r as _ ; } } # [ doc = "compositor logical output region\n\nAn xdg_output describes part of the compositor geometry.\n\nThis typically corresponds to a monitor that displays part of the\ncompositor space.\n\nFor objects version 3 onwards, after all xdg_output properties have been\nsent (when the object is created and when properties are updated), a\nwl_output.done event is sent. This allows changes to the output\nproperties to be seen as atomic, even if they happen via multiple events." ] pub mod zxdg_output_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_output_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_output_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_output_v1_events : [ wl_message ; 5 ] = [ wl_message { name : b"logical_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"logical_size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"name\0" as * const u8 as * const c_char , signature : b"2s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"description\0" as * const u8 as * const c_char , signature : b"2s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_output_v1_interface : wl_interface = wl_interface { name : b"zxdg_output_v1\0" as * const u8 as * const c_char , version : 3 , request_count : 1 , requests : unsafe { & zxdg_output_v1_requests as * const _ } , event_count : 5 , events : unsafe { & zxdg_output_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_output_v1_listener { # [ doc = "position of the output within the global compositor space\n\nThe position event describes the location of the wl_output within\nthe global compositor space.\n\nThe logical_position event is sent after creating an xdg_output\n(see xdg_output_manager.get_xdg_output) and whenever the location\nof the output changes within the global compositor space." ] fn logical_position ( & mut self , object : * mut zxdg_output_v1 , x : i32 , y : i32 ) { } # [ doc = "size of the output in the global compositor space\n\nThe logical_size event describes the size of the output in the\nglobal compositor space.\n\nFor example, a surface without any buffer scale, transformation\nnor rotation set, with the size matching the logical_size will\nhave the same size as the corresponding output when displayed.\n\nMost regular Wayland clients should not pay attention to the\nlogical size and would rather rely on xdg_shell interfaces.\n\nSome clients such as Xwayland, however, need this to configure\ntheir surfaces in the global compositor space as the compositor\nmay apply a different scale from what is advertised by the output\nscaling property (to achieve fractional scaling, for example).\n\nFor example, for a wl_output mode 3840\u{d7}2160 and a scale factor 2:\n\n- A compositor not scaling the surface buffers will advertise a\nlogical size of 3840\u{d7}2160,\n\n- A compositor automatically scaling the surface buffers will\nadvertise a logical size of 1920\u{d7}1080,\n\n- A compositor using a fractional scale of 1.5 will advertise a\nlogical size of 2560\u{d7}1440.\n\nFor example, for a wl_output mode 1920\u{d7}1080 and a 90 degree rotation,\nthe compositor will advertise a logical size of 1080x1920.\n\nThe logical_size event is sent after creating an xdg_output\n(see xdg_output_manager.get_xdg_output) and whenever the logical\nsize of the output changes, either as a result of a change in the\napplied scale or because of a change in the corresponding output\nmode(see wl_output.mode) or transform (see wl_output.transform)." ] fn logical_size ( & mut self , object : * mut zxdg_output_v1 , width : i32 , height : i32 ) { } # [ doc = "all information about the output have been sent\n\nThis event is sent after all other properties of an xdg_output\nhave been sent.\n\nThis allows changes to the xdg_output properties to be seen as\natomic, even if they happen via multiple events.\n\nFor objects version 3 onwards, this event is deprecated. Compositors\nare not required to send it anymore and must send wl_output.done\ninstead." ] fn done ( & mut self , object : * mut zxdg_output_v1 , ) { } # [ doc = "name of this output\n\nMany compositors will assign names to their outputs, show them to the\nuser, allow them to be configured by name, etc. The client may wish to\nknow this name as well to offer the user similar behaviors.\n\nThe naming convention is compositor defined, but limited to\nalphanumeric characters and dashes (-). Each name is unique among all\nwl_output globals, but if a wl_output global is destroyed the same name\nmay be reused later. The names will also remain consistent across\nsessions with the same hardware and software configuration.\n\nExamples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc. However, do\nnot assume that the name is a reflection of an underlying DRM\nconnector, X11 connection, etc.\n\nThe name event is sent after creating an xdg_output (see\nxdg_output_manager.get_xdg_output). This event is only sent once per\nxdg_output, and the name does not change over the lifetime of the\nwl_output global.\n\nOnly available since version 2 of the interface." ] fn name ( & mut self , object : * mut zxdg_output_v1 , name : * mut c_char ) { } # [ doc = "human-readable description of this output\n\nMany compositors can produce human-readable descriptions of their\noutputs. The client may wish to know this description as well, to\ncommunicate the user for various purposes.\n\nThe description is a UTF-8 string with no convention defined for its\ncontents. Examples might include 'Foocorp 11\" Display' or 'Virtual X11\noutput via :1'.\n\nThe description event is sent after creating an xdg_output (see\nxdg_output_manager.get_xdg_output) and whenever the description\nchanges. The description is optional, and may not be sent at all.\n\nFor objects of version 2 and lower, this event is only sent once per\nxdg_output, and the description does not change over the lifetime of\nthe wl_output global.\n\nOnly available since version 2 of the interface." ] fn description ( & mut self , object : * mut zxdg_output_v1 , description : * mut c_char ) { } } pub unsafe fn zxdg_output_v1_set_user_data ( zxdg_output_v1 : * mut super :: zxdg_output_v1 :: zxdg_output_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_output_v1 as _ , user_data ) ; } pub unsafe fn zxdg_output_v1_get_user_data ( zxdg_output_v1 : * mut super :: zxdg_output_v1 :: zxdg_output_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_output_v1 as _ ) ; } pub unsafe fn zxdg_output_v1_get_version ( zxdg_output_v1 : * mut super :: zxdg_output_v1 :: zxdg_output_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_output_v1 as _ ) ; } pub unsafe fn zxdg_output_v1_add_listener ( zxdg_output_v1 : * mut super :: zxdg_output_v1 :: zxdg_output_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_output_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_output_v1_add_rust_listener ( zxdg_output_v1 : * mut super :: zxdg_output_v1 :: zxdg_output_v1 , listener : & dyn zxdg_output_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_output_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_output_v1_add_listener ( zxdg_output_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_output object\n\nUsing this request a client can tell the server that it is not\ngoing to use the xdg_output object anymore." ] pub unsafe fn zxdg_output_v1_destroy ( zxdg_output_v1 : * mut super :: zxdg_output_v1 :: zxdg_output_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_output_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_output_v1 as _ ) ; } } } pub mod keystate { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Key States\n\nKeeps track of the states of the different keys that have a state attached to it." ] pub mod org_kde_kwin_keystate { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_keystate { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum key { capslock = 0 , numlock = 1 , scrolllock = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl key { pub fn from_raw ( n : u32 ) -> Option < key > { match n { 0 => Some ( key :: capslock ) , 1 => Some ( key :: numlock ) , 2 => Some ( key :: scrolllock ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum state { unlocked = 0 , latched = 1 , locked = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl state { pub fn from_raw ( n : u32 ) -> Option < state > { match n { 0 => Some ( state :: unlocked ) , 1 => Some ( state :: latched ) , 2 => Some ( state :: locked ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_keystate_requests : [ wl_message ; 1 ] = [ wl_message { name : b"fetchStates\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_keystate_events : [ wl_message ; 1 ] = [ wl_message { name : b"stateChanged\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_keystate_interface : wl_interface = wl_interface { name : b"org_kde_kwin_keystate\0" as * const u8 as * const c_char , version : 3 , request_count : 1 , requests : unsafe { & org_kde_kwin_keystate_requests as * const _ } , event_count : 1 , events : unsafe { & org_kde_kwin_keystate_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_keystate_listener { # [ doc = "Updates the state for a said key" ] fn stateChanged ( & mut self , object : * mut org_kde_kwin_keystate , key : u32 , state : u32 ) { } } pub unsafe fn org_kde_kwin_keystate_set_user_data ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_keystate as _ , user_data ) ; } pub unsafe fn org_kde_kwin_keystate_get_user_data ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_keystate as _ ) ; } pub unsafe fn org_kde_kwin_keystate_get_version ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_keystate as _ ) ; } pub unsafe fn org_kde_kwin_keystate_add_listener ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_keystate as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_keystate_add_rust_listener ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate , listener : & dyn org_kde_kwin_keystate_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_keystate_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_keystate_add_listener ( org_kde_kwin_keystate as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_keystate_destroy ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_keystate as _ ) ; } pub unsafe fn org_kde_kwin_keystate_fetchStates ( org_kde_kwin_keystate : * mut super :: org_kde_kwin_keystate :: org_kde_kwin_keystate ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_keystate as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod input_timestamps_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "context object for high-resolution input timestamps\n\nA global interface used for requesting high-resolution timestamps\nfor input events." ] pub mod zwp_input_timestamps_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_input_timestamps_manager_v1 { } static mut zwp_input_timestamps_manager_v1_requests_get_keyboard_timestamps_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1_interface as * const wl_interface } , unsafe { & super :: wl_keyboard :: wl_keyboard_interface as * const wl_interface } , ] ; static mut zwp_input_timestamps_manager_v1_requests_get_pointer_timestamps_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , ] ; static mut zwp_input_timestamps_manager_v1_requests_get_touch_timestamps_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1_interface as * const wl_interface } , unsafe { & super :: wl_touch :: wl_touch_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_timestamps_manager_v1_requests : [ wl_message ; 4 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_keyboard_timestamps\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_timestamps_manager_v1_requests_get_keyboard_timestamps_types as * const _ } , } , wl_message { name : b"get_pointer_timestamps\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_timestamps_manager_v1_requests_get_pointer_timestamps_types as * const _ } , } , wl_message { name : b"get_touch_timestamps\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_timestamps_manager_v1_requests_get_touch_timestamps_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_input_timestamps_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_input_timestamps_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 4 , requests : unsafe { & zwp_input_timestamps_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_input_timestamps_manager_v1_listener { } pub unsafe fn zwp_input_timestamps_manager_v1_set_user_data ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_input_timestamps_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_input_timestamps_manager_v1_get_user_data ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_input_timestamps_manager_v1 as _ ) ; } pub unsafe fn zwp_input_timestamps_manager_v1_get_version ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_input_timestamps_manager_v1 as _ ) ; } pub unsafe fn zwp_input_timestamps_manager_v1_add_listener ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_input_timestamps_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_input_timestamps_manager_v1_add_rust_listener ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 , listener : & dyn zwp_input_timestamps_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_input_timestamps_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_input_timestamps_manager_v1_add_listener ( zwp_input_timestamps_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the input timestamps manager object\n\nInforms the server that the client will no longer be using this\nprotocol object. Existing objects created by this object are not\naffected." ] pub unsafe fn zwp_input_timestamps_manager_v1_destroy ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_timestamps_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_input_timestamps_manager_v1 as _ ) ; } # [ doc = "subscribe to high-resolution keyboard timestamp events\n\nCreates a new input timestamps object that represents a subscription\nto high-resolution timestamp events for all wl_keyboard events that\ncarry a timestamp.\n\nIf the associated wl_keyboard object is invalidated, either through\nclient action (e.g. release) or server-side changes, the input\ntimestamps object becomes inert and the client should destroy it\nby calling zwp_input_timestamps_v1.destroy." ] pub unsafe fn zwp_input_timestamps_manager_v1_get_keyboard_timestamps ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 , keyboard : * mut super :: wl_keyboard :: wl_keyboard ) -> * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_input_timestamps_manager_v1 as _ , 1u32 , & super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , keyboard ) ; return r as _ ; } # [ doc = "subscribe to high-resolution pointer timestamp events\n\nCreates a new input timestamps object that represents a subscription\nto high-resolution timestamp events for all wl_pointer events that\ncarry a timestamp.\n\nIf the associated wl_pointer object is invalidated, either through\nclient action (e.g. release) or server-side changes, the input\ntimestamps object becomes inert and the client should destroy it\nby calling zwp_input_timestamps_v1.destroy." ] pub unsafe fn zwp_input_timestamps_manager_v1_get_pointer_timestamps ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 , pointer : * mut super :: wl_pointer :: wl_pointer ) -> * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_input_timestamps_manager_v1 as _ , 2u32 , & super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , pointer ) ; return r as _ ; } # [ doc = "subscribe to high-resolution touch timestamp events\n\nCreates a new input timestamps object that represents a subscription\nto high-resolution timestamp events for all wl_touch events that\ncarry a timestamp.\n\nIf the associated wl_touch object becomes invalid, either through\nclient action (e.g. release) or server-side changes, the input\ntimestamps object becomes inert and the client should destroy it\nby calling zwp_input_timestamps_v1.destroy." ] pub unsafe fn zwp_input_timestamps_manager_v1_get_touch_timestamps ( zwp_input_timestamps_manager_v1 : * mut super :: zwp_input_timestamps_manager_v1 :: zwp_input_timestamps_manager_v1 , touch : * mut super :: wl_touch :: wl_touch ) -> * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_input_timestamps_manager_v1 as _ , 3u32 , & super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , touch ) ; return r as _ ; } } # [ doc = "context object for input timestamps\n\nProvides high-resolution timestamp events for a set of subscribed input\nevents. The set of subscribed input events is determined by the\nzwp_input_timestamps_manager_v1 request used to create this object." ] pub mod zwp_input_timestamps_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_input_timestamps_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_timestamps_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_timestamps_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"timestamp\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_input_timestamps_v1_interface : wl_interface = wl_interface { name : b"zwp_input_timestamps_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_input_timestamps_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zwp_input_timestamps_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_input_timestamps_v1_listener { # [ doc = "high-resolution timestamp event\n\nThe timestamp event is associated with the first subsequent input event\ncarrying a timestamp which belongs to the set of input events this\nobject is subscribed to.\n\nThe timestamp provided by this event is a high-resolution version of\nthe timestamp argument of the associated input event. The provided\ntimestamp is in the same clock domain and is at least as accurate as\nthe associated input event timestamp.\n\nThe timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples,\neach component being an unsigned 32-bit value. Whole seconds are in\ntv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo,\nand the additional fractional part in tv_nsec as nanoseconds. Hence,\nfor valid timestamps tv_nsec must be in [0, 999999999]." ] fn timestamp ( & mut self , object : * mut zwp_input_timestamps_v1 , tv_sec_hi : u32 , tv_sec_lo : u32 , tv_nsec : u32 ) { } } pub unsafe fn zwp_input_timestamps_v1_set_user_data ( zwp_input_timestamps_v1 : * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_input_timestamps_v1 as _ , user_data ) ; } pub unsafe fn zwp_input_timestamps_v1_get_user_data ( zwp_input_timestamps_v1 : * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_input_timestamps_v1 as _ ) ; } pub unsafe fn zwp_input_timestamps_v1_get_version ( zwp_input_timestamps_v1 : * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_input_timestamps_v1 as _ ) ; } pub unsafe fn zwp_input_timestamps_v1_add_listener ( zwp_input_timestamps_v1 : * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_input_timestamps_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_input_timestamps_v1_add_rust_listener ( zwp_input_timestamps_v1 : * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 , listener : & dyn zwp_input_timestamps_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_input_timestamps_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_input_timestamps_v1_add_listener ( zwp_input_timestamps_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the input timestamps object\n\nInforms the server that the client will no longer be using this\nprotocol object. After the server processes the request, no more\ntimestamp events will be emitted." ] pub unsafe fn zwp_input_timestamps_v1_destroy ( zwp_input_timestamps_v1 : * mut super :: zwp_input_timestamps_v1 :: zwp_input_timestamps_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_timestamps_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_input_timestamps_v1 as _ ) ; } } } pub mod text_input_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "text input\n\nAn object used for text input. Adds support for text input and input\nmethods to applications. A text_input object is created from a\nwl_text_input_manager and corresponds typically to a text entry in an\napplication.\n\nRequests are used to activate/deactivate the text_input object and set\nstate information like surrounding and selected text or the content type.\nThe information about entered text is sent to the text_input object via\nthe pre-edit and commit events. Using this interface removes the need\nfor applications to directly process hardware key events and compose text\nout of them.\n\nText is generally UTF-8 encoded, indices and lengths are in bytes.\n\nSerials are used to synchronize the state between the text input and\nan input method. New serials are sent by the text input in the\ncommit_state request and are used by the input method to indicate\nthe known text input state in events like preedit_string, commit_string,\nand keysym. The text input can then ignore events from the input method\nwhich are based on an outdated state (for example after a reset).\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_text_input_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_text_input_v1 { } bitflags ! { # [ doc = "content hint\n\nContent hint is a bitmask to allow to modify the behavior of the text\ninput." ] pub struct content_hint : u32 { # [ doc = "no special behaviour" ] const none = 0 ; # [ doc = "auto completion, correction and capitalization" ] const default = 7 ; # [ doc = "hidden and sensitive text" ] const password = 192 ; # [ doc = "suggest word completions" ] const auto_completion = 1 ; # [ doc = "suggest word corrections" ] const auto_correction = 2 ; # [ doc = "switch to uppercase letters at the start of a sentence" ] const auto_capitalization = 4 ; # [ doc = "prefer lowercase letters" ] const lowercase = 8 ; # [ doc = "prefer uppercase letters" ] const uppercase = 16 ; # [ doc = "prefer casing for titles and headings (can be language dependent)" ] const titlecase = 32 ; # [ doc = "characters should be hidden" ] const hidden_text = 64 ; # [ doc = "typed text should not be stored" ] const sensitive_data = 128 ; # [ doc = "just latin characters should be entered" ] const latin = 256 ; # [ doc = "the text input is multiline" ] const multiline = 512 ; } } impl content_hint { pub fn from_raw ( n : u32 ) -> Option < content_hint > { Some ( content_hint :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = "content purpose\n\nThe content purpose allows to specify the primary purpose of a text\ninput.\n\nThis allows an input method to show special purpose input panels with\nextra characters or to disallow some characters." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum content_purpose { # [ doc = "default input, allowing all characters" ] normal = 0 , # [ doc = "allow only alphabetic characters" ] alpha = 1 , # [ doc = "allow only digits" ] digits = 2 , # [ doc = "input a number (including decimal separator and sign)" ] number = 3 , # [ doc = "input a phone number" ] phone = 4 , # [ doc = "input an URL" ] url = 5 , # [ doc = "input an email address" ] email = 6 , # [ doc = "input a name of a person" ] name = 7 , # [ doc = "input a password (combine with password or sensitive_data hint)" ] password = 8 , # [ doc = "input a date" ] date = 9 , # [ doc = "input a time" ] time = 10 , # [ doc = "input a date and time" ] datetime = 11 , # [ doc = "input for a terminal" ] terminal = 12 , # [ doc ( hidden ) ] __nonexhaustive , } impl content_purpose { pub fn from_raw ( n : u32 ) -> Option < content_purpose > { match n { 0 => Some ( content_purpose :: normal ) , 1 => Some ( content_purpose :: alpha ) , 2 => Some ( content_purpose :: digits ) , 3 => Some ( content_purpose :: number ) , 4 => Some ( content_purpose :: phone ) , 5 => Some ( content_purpose :: url ) , 6 => Some ( content_purpose :: email ) , 7 => Some ( content_purpose :: name ) , 8 => Some ( content_purpose :: password ) , 9 => Some ( content_purpose :: date ) , 10 => Some ( content_purpose :: time ) , 11 => Some ( content_purpose :: datetime ) , 12 => Some ( content_purpose :: terminal ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum preedit_style { # [ doc = "default style for composing text" ] default = 0 , # [ doc = "style should be the same as in non-composing text" ] none = 1 , active = 2 , inactive = 3 , highlight = 4 , underline = 5 , selection = 6 , incorrect = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl preedit_style { pub fn from_raw ( n : u32 ) -> Option < preedit_style > { match n { 0 => Some ( preedit_style :: default ) , 1 => Some ( preedit_style :: none ) , 2 => Some ( preedit_style :: active ) , 3 => Some ( preedit_style :: inactive ) , 4 => Some ( preedit_style :: highlight ) , 5 => Some ( preedit_style :: underline ) , 6 => Some ( preedit_style :: selection ) , 7 => Some ( preedit_style :: incorrect ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum text_direction { # [ doc = "automatic text direction based on text and language" ] auto = 0 , # [ doc = "left-to-right" ] ltr = 1 , # [ doc = "right-to-left" ] rtl = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl text_direction { pub fn from_raw ( n : u32 ) -> Option < text_direction > { match n { 0 => Some ( text_direction :: auto ) , 1 => Some ( text_direction :: ltr ) , 2 => Some ( text_direction :: rtl ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_text_input_v1_requests_activate_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut zwp_text_input_v1_requests_deactivate_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_v1_requests : [ wl_message ; 11 ] = [ wl_message { name : b"activate\0" as * const u8 as * const c_char , signature : b"oo\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v1_requests_activate_types as * const _ } , } , wl_message { name : b"deactivate\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v1_requests_deactivate_types as * const _ } , } , wl_message { name : b"show_input_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hide_input_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"reset\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_surrounding_text\0" as * const u8 as * const c_char , signature : b"suu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_content_type\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_cursor_rectangle\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_preferred_language\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_state\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"invoke_action\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_text_input_v1_events_enter_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_v1_events : [ wl_message ; 13 ] = [ wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v1_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifiers_map\0" as * const u8 as * const c_char , signature : b"a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"input_panel_state\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_string\0" as * const u8 as * const c_char , signature : b"uss\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_styling\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_cursor\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_string\0" as * const u8 as * const c_char , signature : b"us\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cursor_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"delete_surrounding_text\0" as * const u8 as * const c_char , signature : b"iu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"keysym\0" as * const u8 as * const c_char , signature : b"uuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"language\0" as * const u8 as * const c_char , signature : b"us\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"text_direction\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_text_input_v1_interface : wl_interface = wl_interface { name : b"zwp_text_input_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 11 , requests : unsafe { & zwp_text_input_v1_requests as * const _ } , event_count : 13 , events : unsafe { & zwp_text_input_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_text_input_v1_listener { # [ doc = "enter event\n\nNotify the text_input object when it received focus. Typically in\nresponse to an activate request." ] fn enter ( & mut self , object : * mut zwp_text_input_v1 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "leave event\n\nNotify the text_input object when it lost focus. Either in response\nto a deactivate request or when the assigned surface lost focus or was\ndestroyed." ] fn leave ( & mut self , object : * mut zwp_text_input_v1 , ) { } # [ doc = "modifiers map\n\nTransfer an array of 0-terminated modifier names. The position in\nthe array is the index of the modifier as used in the modifiers\nbitmask in the keysym event." ] fn modifiers_map ( & mut self , object : * mut zwp_text_input_v1 , map : * mut wl_array ) { } # [ doc = "state of the input panel\n\nNotify when the visibility state of the input panel changed." ] fn input_panel_state ( & mut self , object : * mut zwp_text_input_v1 , state : u32 ) { } # [ doc = "pre-edit\n\nNotify when a new composing text (pre-edit) should be set around the\ncurrent cursor position. Any previously set composing text should\nbe removed.\n\nThe commit text can be used to replace the preedit text on reset\n(for example on unfocus).\n\nThe text input should also handle all preedit_style and preedit_cursor\nevents occurring directly before preedit_string." ] fn preedit_string ( & mut self , object : * mut zwp_text_input_v1 , serial : u32 , text : * mut c_char , commit : * mut c_char ) { } # [ doc = "pre-edit styling\n\nSets styling information on composing text. The style is applied for\nlength bytes from index relative to the beginning of the composing\ntext (as byte offset). Multiple styles can\nbe applied to a composing text by sending multiple preedit_styling\nevents.\n\nThis event is handled as part of a following preedit_string event." ] fn preedit_styling ( & mut self , object : * mut zwp_text_input_v1 , index : u32 , length : u32 , style : preedit_style ) { } # [ doc = "pre-edit cursor\n\nSets the cursor position inside the composing text (as byte\noffset) relative to the start of the composing text. When index is a\nnegative number no cursor is shown.\n\nThis event is handled as part of a following preedit_string event." ] fn preedit_cursor ( & mut self , object : * mut zwp_text_input_v1 , index : i32 ) { } # [ doc = "commit\n\nNotify when text should be inserted into the editor widget. The text to\ncommit could be either just a single character after a key press or the\nresult of some composing (pre-edit). It could also be an empty text\nwhen some text should be removed (see delete_surrounding_text) or when\nthe input cursor should be moved (see cursor_position).\n\nAny previously set composing text should be removed." ] fn commit_string ( & mut self , object : * mut zwp_text_input_v1 , serial : u32 , text : * mut c_char ) { } # [ doc = "set cursor to new position\n\nNotify when the cursor or anchor position should be modified.\n\nThis event should be handled as part of a following commit_string\nevent." ] fn cursor_position ( & mut self , object : * mut zwp_text_input_v1 , index : i32 , anchor : i32 ) { } # [ doc = "delete surrounding text\n\nNotify when the text around the current cursor position should be\ndeleted.\n\nIndex is relative to the current cursor (in bytes).\nLength is the length of deleted text (in bytes).\n\nThis event should be handled as part of a following commit_string\nevent." ] fn delete_surrounding_text ( & mut self , object : * mut zwp_text_input_v1 , index : i32 , length : u32 ) { } # [ doc = "keysym\n\nNotify when a key event was sent. Key events should not be used\nfor normal text input operations, which should be done with\ncommit_string, delete_surrounding_text, etc. The key event follows\nthe wl_keyboard key event convention. Sym is an XKB keysym, state a\nwl_keyboard key_state. Modifiers are a mask for effective modifiers\n(where the modifier indices are set by the modifiers_map event)" ] fn keysym ( & mut self , object : * mut zwp_text_input_v1 , serial : u32 , time : u32 , sym : u32 , state : u32 , modifiers : u32 ) { } # [ doc = "language\n\nSets the language of the input text. The \"language\" argument is an\nRFC-3066 format language tag." ] fn language ( & mut self , object : * mut zwp_text_input_v1 , serial : u32 , language : * mut c_char ) { } # [ doc = "text direction\n\nSets the text direction of input text.\n\nIt is mainly needed for showing an input cursor on the correct side of\nthe editor when there is no input done yet and making sure neutral\ndirection text is laid out properly." ] fn text_direction ( & mut self , object : * mut zwp_text_input_v1 , serial : u32 , direction : text_direction ) { } } pub unsafe fn zwp_text_input_v1_set_user_data ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_text_input_v1 as _ , user_data ) ; } pub unsafe fn zwp_text_input_v1_get_user_data ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_text_input_v1 as _ ) ; } pub unsafe fn zwp_text_input_v1_get_version ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_text_input_v1 as _ ) ; } pub unsafe fn zwp_text_input_v1_add_listener ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_text_input_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_text_input_v1_add_rust_listener ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , listener : & dyn zwp_text_input_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_text_input_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_text_input_v1_add_listener ( zwp_text_input_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_text_input_v1_destroy ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_text_input_v1 as _ ) ; } # [ doc = "request activation\n\nRequests the text_input object to be activated (typically when the\ntext entry gets focus).\n\nThe seat argument is a wl_seat which maintains the focus for this\nactivation. The surface argument is a wl_surface assigned to the\ntext_input object and tracked for focus lost. The enter event\nis emitted on successful activation." ] pub unsafe fn zwp_text_input_v1_activate ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , seat : * mut super :: wl_seat :: wl_seat , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 0u32 , seat , surface , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "request deactivation\n\nRequests the text_input object to be deactivated (typically when the\ntext entry lost focus). The seat argument is a wl_seat which was used\nfor activation." ] pub unsafe fn zwp_text_input_v1_deactivate ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , seat : * mut super :: wl_seat :: wl_seat ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 1u32 , seat , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "show input panels\n\nRequests input panels (virtual keyboard) to show." ] pub unsafe fn zwp_text_input_v1_show_input_panel ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "hide input panels\n\nRequests input panels (virtual keyboard) to hide." ] pub unsafe fn zwp_text_input_v1_hide_input_panel ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "reset\n\nShould be called by an editor widget when the input state should be\nreset, for example after the text was changed outside of the normal\ninput method flow." ] pub unsafe fn zwp_text_input_v1_reset ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 4u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets the surrounding text\n\nSets the plain surrounding text around the input position. Text is\nUTF-8 encoded. Cursor is the byte offset within the\nsurrounding text. Anchor is the byte offset of the\nselection anchor within the surrounding text. If there is no selected\ntext anchor, then it is the same as cursor." ] pub unsafe fn zwp_text_input_v1_set_surrounding_text ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , text : * const c_char , cursor : u32 , anchor : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 5u32 , text , cursor , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set content purpose and hint\n\nSets the content purpose and content hint. While the purpose is the\nbasic purpose of an input field, the hint flags allow to modify some\nof the behavior.\n\nWhen no content type is explicitly set, a normal content purpose with\ndefault hints (auto completion, auto correction, auto capitalization)\nshould be assumed." ] pub unsafe fn zwp_text_input_v1_set_content_type ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , hint : u32 , purpose : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 6u32 , hint , purpose , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zwp_text_input_v1_set_cursor_rectangle ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 7u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets preferred language\n\nSets a specific language. This allows for example a virtual keyboard to\nshow a language specific layout. The \"language\" argument is an RFC-3066\nformat language tag.\n\nIt could be used for example in a word processor to indicate the\nlanguage of the currently edited document or in an instant message\napplication which tracks languages of contacts." ] pub unsafe fn zwp_text_input_v1_set_preferred_language ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , language : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 8u32 , language , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zwp_text_input_v1_commit_state ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 9u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zwp_text_input_v1_invoke_action ( zwp_text_input_v1 : * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 , button : u32 , index : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v1 as _ , 10u32 , button , index , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "text input manager\n\nA factory for text_input objects. This object is a global singleton." ] pub mod zwp_text_input_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_text_input_manager_v1 { } static mut zwp_text_input_manager_v1_requests_create_text_input_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_text_input_v1 :: zwp_text_input_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_manager_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create_text_input\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_manager_v1_requests_create_text_input_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_text_input_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_text_input_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_text_input_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_text_input_manager_v1_listener { } pub unsafe fn zwp_text_input_manager_v1_set_user_data ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_text_input_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_text_input_manager_v1_get_user_data ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_text_input_manager_v1 as _ ) ; } pub unsafe fn zwp_text_input_manager_v1_get_version ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_text_input_manager_v1 as _ ) ; } pub unsafe fn zwp_text_input_manager_v1_add_listener ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_text_input_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_text_input_manager_v1_add_rust_listener ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 , listener : & dyn zwp_text_input_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_text_input_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_text_input_manager_v1_add_listener ( zwp_text_input_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_text_input_manager_v1_destroy ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_text_input_manager_v1 as _ ) ; } # [ doc = "create text input\n\nCreates a new text_input object." ] pub unsafe fn zwp_text_input_manager_v1_create_text_input ( zwp_text_input_manager_v1 : * mut super :: zwp_text_input_manager_v1 :: zwp_text_input_manager_v1 ) -> * mut super :: zwp_text_input_v1 :: zwp_text_input_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_text_input_manager_v1 as _ , 0u32 , & super :: zwp_text_input_v1 :: zwp_text_input_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } } pub mod server_decoration { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "Server side window decoration manager\n\nThis interface allows to coordinate whether the server should create\na server-side window decoration around a wl_surface representing a\nshell surface (wl_shell_surface or similar). By announcing support\nfor this interface the server indicates that it supports server\nside decorations.\n\nUse in conjunction with zxdg_decoration_manager_v1 is undefined." ] pub mod org_kde_kwin_server_decoration_manager { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_server_decoration_manager { } # [ doc = "Possible values to use in request_mode and the event mode." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum mode { # [ doc = "Undecorated: The surface is not decorated at all, neither server nor client-side. An example is a popup surface which should not be decorated." ] None = 0 , # [ doc = "Client-side decoration: The decoration is part of the surface and the client." ] Client = 1 , # [ doc = "Server-side decoration: The server embeds the surface into a decoration frame." ] Server = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl mode { pub fn from_raw ( n : u32 ) -> Option < mode > { match n { 0 => Some ( mode :: None ) , 1 => Some ( mode :: Client ) , 2 => Some ( mode :: Server ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut org_kde_kwin_server_decoration_manager_requests_create_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_manager_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_server_decoration_manager_requests_create_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_manager_events : [ wl_message ; 1 ] = [ wl_message { name : b"default_mode\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_manager_interface : wl_interface = wl_interface { name : b"org_kde_kwin_server_decoration_manager\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & org_kde_kwin_server_decoration_manager_requests as * const _ } , event_count : 1 , events : unsafe { & org_kde_kwin_server_decoration_manager_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_server_decoration_manager_listener { # [ doc = "The default mode used on the server\n\nThis event is emitted directly after binding the interface. It contains\nthe default mode for the decoration. When a new server decoration object\nis created this new object will be in the default mode until the first\nrequest_mode is requested.\n\nThe server may change the default mode at any time." ] fn default_mode ( & mut self , object : * mut org_kde_kwin_server_decoration_manager , mode : u32 ) { } } pub unsafe fn org_kde_kwin_server_decoration_manager_set_user_data ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_server_decoration_manager as _ , user_data ) ; } pub unsafe fn org_kde_kwin_server_decoration_manager_get_user_data ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_server_decoration_manager as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_manager_get_version ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_server_decoration_manager as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_manager_add_listener ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_server_decoration_manager as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_manager_add_rust_listener ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager , listener : & dyn org_kde_kwin_server_decoration_manager_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_server_decoration_manager_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_server_decoration_manager_add_listener ( org_kde_kwin_server_decoration_manager as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_server_decoration_manager_destroy ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_server_decoration_manager as _ ) ; } # [ doc = "Create a server-side decoration object for a given surface\n\nWhen a client creates a server-side decoration object it indicates\nthat it supports the protocol. The client is supposed to tell the\nserver whether it wants server-side decorations or will provide\nclient-side decorations.\n\nIf the client does not create a server-side decoration object for\na surface the server interprets this as lack of support for this\nprotocol and considers it as client-side decorated. Nevertheless a\nclient-side decorated surface should use this protocol to indicate\nto the server that it does not want a server-side deco." ] pub unsafe fn org_kde_kwin_server_decoration_manager_create ( org_kde_kwin_server_decoration_manager : * mut super :: org_kde_kwin_server_decoration_manager :: org_kde_kwin_server_decoration_manager , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_server_decoration_manager as _ , 0u32 , & super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } pub mod org_kde_kwin_server_decoration { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_server_decoration { } # [ doc = "Possible values to use in request_mode and the event mode." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum mode { # [ doc = "Undecorated: The surface is not decorated at all, neither server nor client-side. An example is a popup surface which should not be decorated." ] None = 0 , # [ doc = "Client-side decoration: The decoration is part of the surface and the client." ] Client = 1 , # [ doc = "Server-side decoration: The server embeds the surface into a decoration frame." ] Server = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl mode { pub fn from_raw ( n : u32 ) -> Option < mode > { match n { 0 => Some ( mode :: None ) , 1 => Some ( mode :: Client ) , 2 => Some ( mode :: Server ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_requests : [ wl_message ; 2 ] = [ wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"request_mode\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_events : [ wl_message ; 1 ] = [ wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_server_decoration_interface : wl_interface = wl_interface { name : b"org_kde_kwin_server_decoration\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & org_kde_kwin_server_decoration_requests as * const _ } , event_count : 1 , events : unsafe { & org_kde_kwin_server_decoration_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_server_decoration_listener { # [ doc = "The new decoration mode applied by the server\n\nThis event is emitted directly after the decoration is created and\nrepresents the base decoration policy by the server. E.g. a server\nwhich wants all surfaces to be client-side decorated will send Client,\na server which wants server-side decoration will send Server.\n\nThe client can request a different mode through the decoration request.\nThe server will acknowledge this by another event with the same mode. So\neven if a server prefers server-side decoration it's possible to force a\nclient-side decoration.\n\nThe server may emit this event at any time. In this case the client can\nagain request a different mode. It's the responsibility of the server to\nprevent a feedback loop." ] fn mode ( & mut self , object : * mut org_kde_kwin_server_decoration , mode : u32 ) { } } pub unsafe fn org_kde_kwin_server_decoration_set_user_data ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_server_decoration as _ , user_data ) ; } pub unsafe fn org_kde_kwin_server_decoration_get_user_data ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_server_decoration as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_get_version ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_server_decoration as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_add_listener ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_server_decoration as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_server_decoration_add_rust_listener ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration , listener : & dyn org_kde_kwin_server_decoration_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_server_decoration_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_server_decoration_add_listener ( org_kde_kwin_server_decoration as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_server_decoration_destroy ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_server_decoration as _ ) ; } # [ doc = "release the server decoration object" ] pub unsafe fn org_kde_kwin_server_decoration_release ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_server_decoration as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_server_decoration as _ ) ; } # [ doc = "The decoration mode the surface wants to use." ] pub unsafe fn org_kde_kwin_server_decoration_request_mode ( org_kde_kwin_server_decoration : * mut super :: org_kde_kwin_server_decoration :: org_kde_kwin_server_decoration , mode : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_server_decoration as _ , 1u32 , mode , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod text_input_unstable_v2 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "text input\n\nThe zwp_text_input_v2 interface represents text input and input methods\nassociated with a seat. It provides enter/leave events to follow the\ntext input focus for a seat.\n\nRequests are used to enable/disable the text-input object and set\nstate information like surrounding and selected text or the content type.\nThe information about the entered text is sent to the text-input object\nvia the pre-edit and commit events. Using this interface removes the need\nfor applications to directly process hardware key events and compose text\nout of them.\n\nText is valid UTF-8 encoded, indices and lengths are in bytes. Indices\nhave to always point to the first byte of an UTF-8 encoded code point.\nLengths are not allowed to contain just a part of an UTF-8 encoded code\npoint.\n\nState is sent by the state requests (set_surrounding_text,\nset_content_type, set_cursor_rectangle and set_preferred_language) and\nan update_state request. After an enter or an input_method_change event\nall state information is invalidated and needs to be resent from the\nclient. A reset or entering a new widget on client side also\ninvalidates all current state information." ] pub mod zwp_text_input_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_text_input_v2 { } bitflags ! { # [ doc = "content hint\n\nContent hint is a bitmask to allow to modify the behavior of the text\ninput." ] pub struct content_hint : u32 { # [ doc = "no special behaviour" ] const none = 0 ; # [ doc = "suggest word completions" ] const auto_completion = 1 ; # [ doc = "suggest word corrections" ] const auto_correction = 2 ; # [ doc = "switch to uppercase letters at the start of a sentence" ] const auto_capitalization = 4 ; # [ doc = "prefer lowercase letters" ] const lowercase = 8 ; # [ doc = "prefer uppercase letters" ] const uppercase = 16 ; # [ doc = "prefer casing for titles and headings (can be language dependent)" ] const titlecase = 32 ; # [ doc = "characters should be hidden" ] const hidden_text = 64 ; # [ doc = "typed text should not be stored" ] const sensitive_data = 128 ; # [ doc = "just latin characters should be entered" ] const latin = 256 ; # [ doc = "the text input is multiline" ] const multiline = 512 ; } } impl content_hint { pub fn from_raw ( n : u32 ) -> Option < content_hint > { Some ( content_hint :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = "content purpose\n\nThe content purpose allows to specify the primary purpose of a text\ninput.\n\nThis allows an input method to show special purpose input panels with\nextra characters or to disallow some characters." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum content_purpose { # [ doc = "default input, allowing all characters" ] normal = 0 , # [ doc = "allow only alphabetic characters" ] alpha = 1 , # [ doc = "allow only digits" ] digits = 2 , # [ doc = "input a number (including decimal separator and sign)" ] number = 3 , # [ doc = "input a phone number" ] phone = 4 , # [ doc = "input an URL" ] url = 5 , # [ doc = "input an email address" ] email = 6 , # [ doc = "input a name of a person" ] name = 7 , # [ doc = "input a password (combine with password or sensitive_data hint)" ] password = 8 , # [ doc = "input a date" ] date = 9 , # [ doc = "input a time" ] time = 10 , # [ doc = "input a date and time" ] datetime = 11 , # [ doc = "input for a terminal" ] terminal = 12 , # [ doc ( hidden ) ] __nonexhaustive , } impl content_purpose { pub fn from_raw ( n : u32 ) -> Option < content_purpose > { match n { 0 => Some ( content_purpose :: normal ) , 1 => Some ( content_purpose :: alpha ) , 2 => Some ( content_purpose :: digits ) , 3 => Some ( content_purpose :: number ) , 4 => Some ( content_purpose :: phone ) , 5 => Some ( content_purpose :: url ) , 6 => Some ( content_purpose :: email ) , 7 => Some ( content_purpose :: name ) , 8 => Some ( content_purpose :: password ) , 9 => Some ( content_purpose :: date ) , 10 => Some ( content_purpose :: time ) , 11 => Some ( content_purpose :: datetime ) , 12 => Some ( content_purpose :: terminal ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "update_state flags\n\nDefines the reason for sending an updated state." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum update_state { # [ doc = "updated state because it changed" ] change = 0 , # [ doc = "full state after enter or input_method_changed event" ] full = 1 , # [ doc = "full state after reset" ] reset = 2 , # [ doc = "full state after switching focus to a different widget on client side" ] enter = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl update_state { pub fn from_raw ( n : u32 ) -> Option < update_state > { match n { 0 => Some ( update_state :: change ) , 1 => Some ( update_state :: full ) , 2 => Some ( update_state :: reset ) , 3 => Some ( update_state :: enter ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum input_panel_visibility { # [ doc = "the input panel (virtual keyboard) is hidden" ] hidden = 0 , # [ doc = "the input panel (virtual keyboard) is visible" ] visible = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl input_panel_visibility { pub fn from_raw ( n : u32 ) -> Option < input_panel_visibility > { match n { 0 => Some ( input_panel_visibility :: hidden ) , 1 => Some ( input_panel_visibility :: visible ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum preedit_style { # [ doc = "default style for composing text" ] default = 0 , # [ doc = "composing text should be shown the same as non-composing text" ] none = 1 , # [ doc = "composing text might be bold" ] active = 2 , # [ doc = "composing text might be cursive" ] inactive = 3 , # [ doc = "composing text might have a different background color" ] highlight = 4 , # [ doc = "composing text might be underlined" ] underline = 5 , # [ doc = "composing text should be shown the same as selected text" ] selection = 6 , # [ doc = "composing text might be underlined with a red wavy line" ] incorrect = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl preedit_style { pub fn from_raw ( n : u32 ) -> Option < preedit_style > { match n { 0 => Some ( preedit_style :: default ) , 1 => Some ( preedit_style :: none ) , 2 => Some ( preedit_style :: active ) , 3 => Some ( preedit_style :: inactive ) , 4 => Some ( preedit_style :: highlight ) , 5 => Some ( preedit_style :: underline ) , 6 => Some ( preedit_style :: selection ) , 7 => Some ( preedit_style :: incorrect ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum text_direction { # [ doc = "automatic text direction based on text and language" ] auto = 0 , # [ doc = "left-to-right" ] ltr = 1 , # [ doc = "right-to-left" ] rtl = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl text_direction { pub fn from_raw ( n : u32 ) -> Option < text_direction > { match n { 0 => Some ( text_direction :: auto ) , 1 => Some ( text_direction :: ltr ) , 2 => Some ( text_direction :: rtl ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_text_input_v2_requests_enable_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut zwp_text_input_v2_requests_disable_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_v2_requests : [ wl_message ; 10 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"enable\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v2_requests_enable_types as * const _ } , } , wl_message { name : b"disable\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v2_requests_disable_types as * const _ } , } , wl_message { name : b"show_input_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"hide_input_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_surrounding_text\0" as * const u8 as * const c_char , signature : b"sii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_content_type\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_cursor_rectangle\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_preferred_language\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"update_state\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_text_input_v2_events_enter_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut zwp_text_input_v2_events_leave_types : [ * const wl_interface ; 2 ] = [ NULLPTR as * const wl_interface , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_v2_events : [ wl_message ; 15 ] = [ wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"uo\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v2_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"uo\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v2_events_leave_types as * const _ } , } , wl_message { name : b"input_panel_state\0" as * const u8 as * const c_char , signature : b"uiiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_string\0" as * const u8 as * const c_char , signature : b"ss\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_styling\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_cursor\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_string\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cursor_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"delete_surrounding_text\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifiers_map\0" as * const u8 as * const c_char , signature : b"a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"keysym\0" as * const u8 as * const c_char , signature : b"uuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"language\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"text_direction\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"configure_surrounding_text\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"input_method_changed\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_text_input_v2_interface : wl_interface = wl_interface { name : b"zwp_text_input_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 10 , requests : unsafe { & zwp_text_input_v2_requests as * const _ } , event_count : 15 , events : unsafe { & zwp_text_input_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_text_input_v2_listener { # [ doc = "enter event\n\nNotification that this seat's text-input focus is on a certain surface.\n\nWhen the seat has the keyboard capability the text-input focus follows\nthe keyboard focus." ] fn enter ( & mut self , object : * mut zwp_text_input_v2 , serial : u32 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "leave event\n\nNotification that this seat's text-input focus is no longer on\na certain surface.\n\nThe leave notification is sent before the enter notification\nfor the new focus.\n\nWhen the seat has the keyboard capability the text-input focus follows\nthe keyboard focus." ] fn leave ( & mut self , object : * mut zwp_text_input_v2 , serial : u32 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "state of the input panel\n\nNotification that the visibility of the input panel (virtual keyboard)\nchanged.\n\nThe rectangle x, y, width, height defines the area overlapped by the\ninput panel (virtual keyboard) on the surface having the text\nfocus in surface local coordinates.\n\nThat can be used to make sure widgets are visible and not covered by\na virtual keyboard." ] fn input_panel_state ( & mut self , object : * mut zwp_text_input_v2 , state : input_panel_visibility , x : i32 , y : i32 , width : i32 , height : i32 ) { } # [ doc = "pre-edit\n\nNotify when a new composing text (pre-edit) should be set around the\ncurrent cursor position. Any previously set composing text should\nbe removed.\n\nThe commit text can be used to replace the composing text in some cases\n(for example when losing focus).\n\nThe text input should also handle all preedit_style and preedit_cursor\nevents occurring directly before preedit_string." ] fn preedit_string ( & mut self , object : * mut zwp_text_input_v2 , text : * mut c_char , commit : * mut c_char ) { } # [ doc = "pre-edit styling\n\nSets styling information on composing text. The style is applied for\nlength bytes from index relative to the beginning of the composing\ntext (as byte offset). Multiple styles can be applied to a composing\ntext by sending multiple preedit_styling events.\n\nThis event is handled as part of a following preedit_string event." ] fn preedit_styling ( & mut self , object : * mut zwp_text_input_v2 , index : u32 , length : u32 , style : preedit_style ) { } # [ doc = "pre-edit cursor\n\nSets the cursor position inside the composing text (as byte\noffset) relative to the start of the composing text. When index is a\nnegative number no cursor is shown.\n\nWhen no preedit_cursor event is sent the cursor will be at the end of\nthe composing text by default.\n\nThis event is handled as part of a following preedit_string event." ] fn preedit_cursor ( & mut self , object : * mut zwp_text_input_v2 , index : i32 ) { } # [ doc = "commit\n\nNotify when text should be inserted into the editor widget. The text to\ncommit could be either just a single character after a key press or the\nresult of some composing (pre-edit). It could be also an empty text\nwhen some text should be removed (see delete_surrounding_text) or when\nthe input cursor should be moved (see cursor_position).\n\nAny previously set composing text should be removed." ] fn commit_string ( & mut self , object : * mut zwp_text_input_v2 , text : * mut c_char ) { } # [ doc = "set cursor to new position\n\nNotify when the cursor or anchor position should be modified.\n\nThis event should be handled as part of a following commit_string\nevent.\n\nThe text between anchor and index should be selected." ] fn cursor_position ( & mut self , object : * mut zwp_text_input_v2 , index : i32 , anchor : i32 ) { } # [ doc = "delete surrounding text\n\nNotify when the text around the current cursor position should be\ndeleted. BeforeLength and afterLength is the length (in bytes) of text\nbefore and after the current cursor position (excluding the selection)\nto delete.\n\nThis event should be handled as part of a following commit_string\nor preedit_string event." ] fn delete_surrounding_text ( & mut self , object : * mut zwp_text_input_v2 , before_length : u32 , after_length : u32 ) { } # [ doc = "modifiers map\n\nTransfer an array of 0-terminated modifiers names. The position in\nthe array is the index of the modifier as used in the modifiers\nbitmask in the keysym event." ] fn modifiers_map ( & mut self , object : * mut zwp_text_input_v2 , map : * mut wl_array ) { } # [ doc = "keysym\n\nNotify when a key event was sent. Key events should not be used\nfor normal text input operations, which should be done with\ncommit_string, delete_surrounding_text, etc. The key event follows\nthe wl_keyboard key event convention. Sym is a XKB keysym, state a\nwl_keyboard key_state. Modifiers are a mask for effective modifiers\n(where the modifier indices are set by the modifiers_map event)" ] fn keysym ( & mut self , object : * mut zwp_text_input_v2 , time : u32 , sym : u32 , state : u32 , modifiers : u32 ) { } # [ doc = "language\n\nSets the language of the input text. The \"language\" argument is a RFC-3066\nformat language tag." ] fn language ( & mut self , object : * mut zwp_text_input_v2 , language : * mut c_char ) { } # [ doc = "text direction\n\nSets the text direction of input text.\n\nIt is mainly needed for showing input cursor on correct side of the\neditor when there is no input yet done and making sure neutral\ndirection text is laid out properly." ] fn text_direction ( & mut self , object : * mut zwp_text_input_v2 , direction : text_direction ) { } # [ doc = "configure amount of surrounding text to be sent\n\nConfigure what amount of surrounding text is expected by the\ninput method. The surrounding text will be sent in the\nset_surrounding_text request on the following state information updates." ] fn configure_surrounding_text ( & mut self , object : * mut zwp_text_input_v2 , before_cursor : i32 , after_cursor : i32 ) { } # [ doc = "Notifies about a changed input method\n\nThe input method changed on compositor side, which invalidates all\ncurrent state information. New state information should be sent from\nthe client via state requests (set_surrounding_text,\nset_content_hint, ...) and update_state." ] fn input_method_changed ( & mut self , object : * mut zwp_text_input_v2 , serial : u32 , flags : u32 ) { } } pub unsafe fn zwp_text_input_v2_set_user_data ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_text_input_v2 as _ , user_data ) ; } pub unsafe fn zwp_text_input_v2_get_user_data ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_text_input_v2 as _ ) ; } pub unsafe fn zwp_text_input_v2_get_version ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_text_input_v2 as _ ) ; } pub unsafe fn zwp_text_input_v2_add_listener ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_text_input_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_text_input_v2_add_rust_listener ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , listener : & dyn zwp_text_input_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_text_input_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_text_input_v2_add_listener ( zwp_text_input_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "Destroy the wp_text_input\n\nDestroy the wp_text_input object. Also disables all surfaces enabled\nthrough this wp_text_input object" ] pub unsafe fn zwp_text_input_v2_destroy ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_text_input_v2 as _ ) ; } # [ doc = "enable text input for surface\n\nEnable text input in a surface (usually when a text entry inside of it\nhas focus).\n\nThis can be called before or after a surface gets text (or keyboard)\nfocus via the enter event. Text input to a surface is only active\nwhen it has the current text (or keyboard) focus and is enabled." ] pub unsafe fn zwp_text_input_v2_enable ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "disable text input for surface\n\nDisable text input in a surface (typically when there is no focus on any\ntext entry inside the surface)." ] pub unsafe fn zwp_text_input_v2_disable ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 2u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "show input panels\n\nRequests input panels (virtual keyboard) to show.\n\nThis should be used for example to show a virtual keyboard again\n(with a tap) after it was closed by pressing on a close button on the\nkeyboard." ] pub unsafe fn zwp_text_input_v2_show_input_panel ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 3u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "hide input panels\n\nRequests input panels (virtual keyboard) to hide." ] pub unsafe fn zwp_text_input_v2_hide_input_panel ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 4u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets the surrounding text\n\nSets the plain surrounding text around the input position. Text is\nUTF-8 encoded. Cursor is the byte offset within the surrounding text.\nAnchor is the byte offset of the selection anchor within the\nsurrounding text. If there is no selected text, anchor is the same as\ncursor.\n\nMake sure to always send some text before and after the cursor\nexcept when the cursor is at the beginning or end of text.\n\nWhen there was a configure_surrounding_text event take the\nbefore_cursor and after_cursor arguments into account for picking how\nmuch surrounding text to send.\n\nThere is a maximum length of wayland messages so text can not be\nlonger than 4000 bytes." ] pub unsafe fn zwp_text_input_v2_set_surrounding_text ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , text : * const c_char , cursor : i32 , anchor : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 5u32 , text , cursor , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set content purpose and hint\n\nSets the content purpose and content hint. While the purpose is the\nbasic purpose of an input field, the hint flags allow to modify some\nof the behavior.\n\nWhen no content type is explicitly set, a normal content purpose with\nnone hint should be assumed." ] pub unsafe fn zwp_text_input_v2_set_content_type ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , hint : u32 , purpose : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 6u32 , hint , purpose , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set cursor position\n\nSets the cursor outline as a x, y, width, height rectangle in surface\nlocal coordinates.\n\nAllows the compositor to put a window with word suggestions near the\ncursor." ] pub unsafe fn zwp_text_input_v2_set_cursor_rectangle ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 7u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets preferred language\n\nSets a specific language. This allows for example a virtual keyboard to\nshow a language specific layout. The \"language\" argument is a RFC-3066\nformat language tag.\n\nIt could be used for example in a word processor to indicate language of\ncurrently edited document or in an instant message application which\ntracks languages of contacts." ] pub unsafe fn zwp_text_input_v2_set_preferred_language ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , language : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 8u32 , language , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "update state\n\nAllows to atomically send state updates from client.\n\nThis request should follow after a batch of state updating requests\nlike set_surrounding_text, set_content_type, set_cursor_rectangle and\nset_preferred_language.\n\nThe flags field indicates why an updated state is sent to the input\nmethod.\n\nReset should be used by an editor widget after the text was changed\noutside of the normal input method flow.\n\nFor \"change\" it is enough to send the changed state, else the full\nstate should be send.\n\nSerial should be set to the serial from the last enter or\ninput_method_changed event.\n\nTo make sure to not receive outdated input method events after a\nreset or switching to a new widget wl_display_sync() should be used\nafter update_state in these cases." ] pub unsafe fn zwp_text_input_v2_update_state ( zwp_text_input_v2 : * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 , serial : u32 , reason : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v2 as _ , 9u32 , serial , reason , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "text input manager\n\nA factory for text-input objects. This object is a global singleton." ] pub mod zwp_text_input_manager_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_text_input_manager_v2 { } static mut zwp_text_input_manager_v2_requests_get_text_input_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_text_input_v2 :: zwp_text_input_v2_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_manager_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_text_input\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_manager_v2_requests_get_text_input_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_text_input_manager_v2_interface : wl_interface = wl_interface { name : b"zwp_text_input_manager_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_text_input_manager_v2_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_text_input_manager_v2_listener { } pub unsafe fn zwp_text_input_manager_v2_set_user_data ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_text_input_manager_v2 as _ , user_data ) ; } pub unsafe fn zwp_text_input_manager_v2_get_user_data ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_text_input_manager_v2 as _ ) ; } pub unsafe fn zwp_text_input_manager_v2_get_version ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_text_input_manager_v2 as _ ) ; } pub unsafe fn zwp_text_input_manager_v2_add_listener ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_text_input_manager_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_text_input_manager_v2_add_rust_listener ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 , listener : & dyn zwp_text_input_manager_v2_listener ) -> bool { let to = ( listener as * const dyn zwp_text_input_manager_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_text_input_manager_v2_add_listener ( zwp_text_input_manager_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "Destroy the wp_text_input_manager\n\nDestroy the wp_text_input_manager object." ] pub unsafe fn zwp_text_input_manager_v2_destroy ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_manager_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_text_input_manager_v2 as _ ) ; } # [ doc = "create a new text input object\n\nCreates a new text-input object for a given seat." ] pub unsafe fn zwp_text_input_manager_v2_get_text_input ( zwp_text_input_manager_v2 : * mut super :: zwp_text_input_manager_v2 :: zwp_text_input_manager_v2 , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_text_input_v2 :: zwp_text_input_v2 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_text_input_manager_v2 as _ , 1u32 , & super :: zwp_text_input_v2 :: zwp_text_input_v2_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat ) ; return r as _ ; } } } pub mod org_kde_kwin_outputdevice { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "output configuration representation\n\nAn outputdevice describes a display device available to the compositor.\noutputdevice is similar to wl_output, but focuses on output\nconfiguration management.\n\nA client can query all global outputdevice objects to enlist all\navailable display devices, even those that may currently not be\nrepresented by the compositor as a wl_output.\n\nThe client sends configuration changes to the server through the\noutputconfiguration interface, and the server applies the configuration\nchanges to the hardware and signals changes to the outputdevices\naccordingly.\n\nThis object is published as global during start up for every available\ndisplay devices, or when one later becomes available, for example by\nbeing hotplugged via a physical connector." ] pub mod org_kde_kwin_outputdevice { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_outputdevice { } # [ doc = "subpixel geometry information\n\nThis enumeration describes how the physical pixels on an output are\nlaid out." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum subpixel { unknown = 0 , none = 1 , horizontal_rgb = 2 , horizontal_bgr = 3 , vertical_rgb = 4 , vertical_bgr = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl subpixel { pub fn from_raw ( n : u32 ) -> Option < subpixel > { match n { 0 => Some ( subpixel :: unknown ) , 1 => Some ( subpixel :: none ) , 2 => Some ( subpixel :: horizontal_rgb ) , 3 => Some ( subpixel :: horizontal_bgr ) , 4 => Some ( subpixel :: vertical_rgb ) , 5 => Some ( subpixel :: vertical_bgr ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "transform from framebuffer to output\n\nThis describes the transform, that a compositor will apply to a\nsurface to compensate for the rotation or mirroring of an\noutput device.\n\nThe flipped values correspond to an initial flip around a\nvertical axis followed by rotation.\n\nThe purpose is mainly to allow clients to render accordingly and\ntell the compositor, so that for fullscreen surfaces, the\ncompositor is still able to scan out directly client surfaces." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum transform { normal = 0 , _90 = 1 , _180 = 2 , _270 = 3 , flipped = 4 , flipped_90 = 5 , flipped_180 = 6 , flipped_270 = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl transform { pub fn from_raw ( n : u32 ) -> Option < transform > { match n { 0 => Some ( transform :: normal ) , 1 => Some ( transform :: _90 ) , 2 => Some ( transform :: _180 ) , 3 => Some ( transform :: _270 ) , 4 => Some ( transform :: flipped ) , 5 => Some ( transform :: flipped_90 ) , 6 => Some ( transform :: flipped_180 ) , 7 => Some ( transform :: flipped_270 ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "mode information\n\nThese flags describe properties of an output mode. They are\nused in the flags bitfield of the mode event." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum mode { # [ doc = "indicates this is the current mode" ] current = 1 , # [ doc = "indicates this is the preferred mode" ] preferred = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl mode { pub fn from_raw ( n : u32 ) -> Option < mode > { match n { 1 => Some ( mode :: current ) , 2 => Some ( mode :: preferred ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "describes enabled state\n\nDescribes whether a device is enabled, i.e. device is used to\ndisplay content by the compositor. This wraps a boolean around\nan int to avoid a boolean trap." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum enablement { disabled = 0 , enabled = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl enablement { pub fn from_raw ( n : u32 ) -> Option < enablement > { match n { 0 => Some ( enablement :: disabled ) , 1 => Some ( enablement :: enabled ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { # [ doc = "describes capabilities of the outputdevice\n\nDescribes what capabilities this device has." ] pub struct capability : u32 { # [ doc = "if this outputdevice can use overscan" ] const overscan = 1 ; # [ doc = "if this outputdevice supports variable refresh rate" ] const vrr = 2 ; } } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { Some ( capability :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = "describes vrr policy\n\nDescribes when the compositor may employ variable refresh rate" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum vrr_policy { never = 0 , always = 1 , automatic = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl vrr_policy { pub fn from_raw ( n : u32 ) -> Option < vrr_policy > { match n { 0 => Some ( vrr_policy :: never ) , 1 => Some ( vrr_policy :: always ) , 2 => Some ( vrr_policy :: automatic ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_outputdevice_events : [ wl_message ; 14 ] = [ wl_message { name : b"geometry\0" as * const u8 as * const c_char , signature : b"iiiiissi\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"uiiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"scale\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"edid\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"enabled\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"uuid\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"scalef\0" as * const u8 as * const c_char , signature : b"2f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"colorcurves\0" as * const u8 as * const c_char , signature : b"2aaa\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"serial_number\0" as * const u8 as * const c_char , signature : b"2s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"eisa_id\0" as * const u8 as * const c_char , signature : b"2s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"overscan\0" as * const u8 as * const c_char , signature : b"3u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"vrr_policy\0" as * const u8 as * const c_char , signature : b"4u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_outputdevice_interface : wl_interface = wl_interface { name : b"org_kde_kwin_outputdevice\0" as * const u8 as * const c_char , version : 4 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 14 , events : unsafe { & org_kde_kwin_outputdevice_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_outputdevice_listener { # [ doc = "geometric properties of the output\n\nThe geometry event describes geometric properties of the output.\nThe event is sent when binding to the output object and whenever\nany of the properties change." ] fn geometry ( & mut self , object : * mut org_kde_kwin_outputdevice , x : i32 , y : i32 , physical_width : i32 , physical_height : i32 , subpixel : i32 , make : * mut c_char , model : * mut c_char , transform : i32 ) { } # [ doc = "advertise available output modes and current one\n\nThe mode event describes an available mode for the output.\n\nWhen the client binds to the outputdevice object, the server sends this\nevent once for every available mode the outputdevice can be operated by.\n\nThere will always be at least one event sent out on initial binding,\nwhich represents the current mode.\n\nLater on if an output changes its mode the event is sent again, whereby\nthis event represents the mode that has now become current. In other\nwords, the current mode is always represented by the latest event sent\nwith the current flag set.\n\nThe size of a mode is given in physical hardware units of the output device.\nThis is not necessarily the same as the output size in the global compositor\nspace. For instance, the output may be scaled, as described in\norg_kde_kwin_outputdevice.scale, or transformed, as described in\norg_kde_kwin_outputdevice.transform.\n\nThe id can be used to refer to a mode when calling set_mode on an\norg_kde_kwin_outputconfiguration object." ] fn mode ( & mut self , object : * mut org_kde_kwin_outputdevice , flags : u32 , width : i32 , height : i32 , refresh : i32 , mode_id : i32 ) { } # [ doc = "sent all information about output\n\nThis event is sent after all other properties have been\nsent on binding to the output object as well as after any\nother output property change have been applied later on.\nThis allows to see changes to the output properties as atomic,\neven if multiple events successively announce them." ] fn done ( & mut self , object : * mut org_kde_kwin_outputdevice , ) { } # [ doc = "output scaling properties\n\nThis event contains scaling geometry information\nthat is not in the geometry event. It may be sent after\nbinding the output object or if the output scale changes\nlater. If it is not sent, the client should assume a\nscale of 1.\n\nA scale larger than 1 means that the compositor will\nautomatically scale surface buffers by this amount\nwhen rendering. This is used for high resolution\ndisplays where applications rendering at the native\nresolution would be too small to be legible.\n\nIt is intended that scaling aware clients track the\ncurrent output of a surface, and if it is on a scaled\noutput it should use wl_surface.set_buffer_scale with\nthe scale of the output. That way the compositor can\navoid scaling the surface, and the client can supply\na higher detail image." ] fn scale ( & mut self , object : * mut org_kde_kwin_outputdevice , factor : i32 ) { } # [ doc = "advertise EDID data for the output\n\nThe edid event encapsulates the EDID data for the outputdevice.\n\nThe event is sent when binding to the output object. The EDID\ndata may be empty, in which case this event is sent anyway.\nIf the EDID information is empty, you can fall back to the name\net al. properties of the outputdevice." ] fn edid ( & mut self , object : * mut org_kde_kwin_outputdevice , raw : * mut c_char ) { } # [ doc = "output is enabled or disabled\n\nThe enabled event notifies whether this output is currently\nenabled and used for displaying content by the server.\nThe event is sent when binding to the output object and\nwhenever later on an output changes its state by becoming\nenabled or disabled." ] fn enabled ( & mut self , object : * mut org_kde_kwin_outputdevice , enabled : i32 ) { } # [ doc = "A unique id for this outputdevice\n\nThe uuid can be used to identify the output. It's controlled by\nthe server entirely. The server should make sure the uuid is\npersistent across restarts. An empty uuid is considered invalid." ] fn uuid ( & mut self , object : * mut org_kde_kwin_outputdevice , uuid : * mut c_char ) { } # [ doc = "output scaling properties\n\nThis event contains scaling geometry information\nthat is not in the geometry event. It may be sent after\nbinding the output object or if the output scale changes\nlater. If it is not sent, the client should assume a\nscale of 1.\n\nA scale larger than 1 means that the compositor will\nautomatically scale surface buffers by this amount\nwhen rendering. This is used for high resolution\ndisplays where applications rendering at the native\nresolution would be too small to be legible.\n\nIt is intended that scaling aware clients track the\ncurrent output of a surface, and if it is on a scaled\noutput it should use wl_surface.set_buffer_scale with\nthe scale of the output. That way the compositor can\navoid scaling the surface, and the client can supply\na higher detail image.\n\nwl_output will keep the output scale as an integer. In every situation except\nconfiguring the window manager you want to use that.\n\nOnly available since version 2 of the interface." ] fn scalef ( & mut self , object : * mut org_kde_kwin_outputdevice , factor : wl_fixed_t ) { } # [ doc = "output color curves\n\nDescribes the color intensity profile of the output.\nCommonly used for gamma/color correction.\n\nThe array contains all color ramp values of the output.\nFor example on 8bit screens there are 256 of them.\n\nThe array elements are unsigned 16bit integers.\n\nOnly available since version 2 of the interface." ] fn colorcurves ( & mut self , object : * mut org_kde_kwin_outputdevice , red : * mut wl_array , green : * mut wl_array , blue : * mut wl_array ) { } # [ doc = "Serial Number\n\nSerial ID of the monitor, sent on startup before the first done event.\n\nOnly available since version 2 of the interface." ] fn serial_number ( & mut self , object : * mut org_kde_kwin_outputdevice , serialNumber : * mut c_char ) { } # [ doc = "EISA ID\n\nEISA ID of the monitor, sent on startup before the first done event.\n\nOnly available since version 2 of the interface." ] fn eisa_id ( & mut self , object : * mut org_kde_kwin_outputdevice , eisaId : * mut c_char ) { } # [ doc = "capability flags\n\nWhat capabilities this device has, sent on startup before the first\ndone event.\n\nOnly available since version 3 of the interface." ] fn capabilities ( & mut self , object : * mut org_kde_kwin_outputdevice , flags : capability ) { } # [ doc = "overscan\n\nOverscan value of the monitor in percent, sent on startup before the\nfirst done event.\n\nOnly available since version 3 of the interface." ] fn overscan ( & mut self , object : * mut org_kde_kwin_outputdevice , overscan : u32 ) { } # [ doc = "Variable Refresh Rate Policy\n\nWhat policy the compositor will employ regarding its use of variable\nrefresh rate.\n\nOnly available since version 4 of the interface." ] fn vrr_policy ( & mut self , object : * mut org_kde_kwin_outputdevice , vrr_policy : vrr_policy ) { } } pub unsafe fn org_kde_kwin_outputdevice_set_user_data ( org_kde_kwin_outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_outputdevice as _ , user_data ) ; } pub unsafe fn org_kde_kwin_outputdevice_get_user_data ( org_kde_kwin_outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_outputdevice as _ ) ; } pub unsafe fn org_kde_kwin_outputdevice_get_version ( org_kde_kwin_outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_outputdevice as _ ) ; } pub unsafe fn org_kde_kwin_outputdevice_add_listener ( org_kde_kwin_outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_outputdevice as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_outputdevice_add_rust_listener ( org_kde_kwin_outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , listener : & dyn org_kde_kwin_outputdevice_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_outputdevice_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_outputdevice_add_listener ( org_kde_kwin_outputdevice as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_outputdevice_destroy ( org_kde_kwin_outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_outputdevice as _ ) ; } } } pub mod xwayland_keyboard_grab_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "context object for keyboard grab manager\n\nA global interface used for grabbing the keyboard." ] pub mod zwp_xwayland_keyboard_grab_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_xwayland_keyboard_grab_manager_v1 { } static mut zwp_xwayland_keyboard_grab_manager_v1_requests_grab_keyboard_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_xwayland_keyboard_grab_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"grab_keyboard\0" as * const u8 as * const c_char , signature : b"noo\0" as * const u8 as * const c_char , types : unsafe { & zwp_xwayland_keyboard_grab_manager_v1_requests_grab_keyboard_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_xwayland_keyboard_grab_manager_v1_interface : wl_interface = wl_interface { name : b"zwp_xwayland_keyboard_grab_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_xwayland_keyboard_grab_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_xwayland_keyboard_grab_manager_v1_listener { } pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_set_user_data ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_xwayland_keyboard_grab_manager_v1 as _ , user_data ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_get_user_data ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_xwayland_keyboard_grab_manager_v1 as _ ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_get_version ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_xwayland_keyboard_grab_manager_v1 as _ ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_add_listener ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_xwayland_keyboard_grab_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_add_rust_listener ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 , listener : & dyn zwp_xwayland_keyboard_grab_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_xwayland_keyboard_grab_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_xwayland_keyboard_grab_manager_v1_add_listener ( zwp_xwayland_keyboard_grab_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the keyboard grab manager\n\nDestroy the keyboard grab manager." ] pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_destroy ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_xwayland_keyboard_grab_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_xwayland_keyboard_grab_manager_v1 as _ ) ; } # [ doc = "grab the keyboard to a surface\n\nThe grab_keyboard request asks for a grab of the keyboard, forcing\nthe keyboard focus for the given seat upon the given surface.\n\nThe protocol provides no guarantee that the grab is ever satisfied,\nand does not require the compositor to send an error if the grab\ncannot ever be satisfied. It is thus possible to request a keyboard\ngrab that will never be effective.\n\nThe protocol:\n\n* does not guarantee that the grab itself is applied for a surface,\nthe grab request may be silently ignored by the compositor,\n* does not guarantee that any events are sent to this client even\nif the grab is applied to a surface,\n* does not guarantee that events sent to this client are exhaustive,\na compositor may filter some events for its own consumption,\n* does not guarantee that events sent to this client are continuous,\na compositor may change and reroute keyboard events while the grab\nis nominally active." ] pub unsafe fn zwp_xwayland_keyboard_grab_manager_v1_grab_keyboard ( zwp_xwayland_keyboard_grab_manager_v1 : * mut super :: zwp_xwayland_keyboard_grab_manager_v1 :: zwp_xwayland_keyboard_grab_manager_v1 , surface : * mut super :: wl_surface :: wl_surface , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_xwayland_keyboard_grab_manager_v1 as _ , 1u32 , & super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface , seat ) ; return r as _ ; } } # [ doc = "interface for grabbing the keyboard\n\nA global interface used for grabbing the keyboard." ] pub mod zwp_xwayland_keyboard_grab_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_xwayland_keyboard_grab_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_xwayland_keyboard_grab_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_xwayland_keyboard_grab_v1_interface : wl_interface = wl_interface { name : b"zwp_xwayland_keyboard_grab_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_xwayland_keyboard_grab_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_xwayland_keyboard_grab_v1_listener { } pub unsafe fn zwp_xwayland_keyboard_grab_v1_set_user_data ( zwp_xwayland_keyboard_grab_v1 : * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_xwayland_keyboard_grab_v1 as _ , user_data ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_v1_get_user_data ( zwp_xwayland_keyboard_grab_v1 : * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_xwayland_keyboard_grab_v1 as _ ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_v1_get_version ( zwp_xwayland_keyboard_grab_v1 : * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_xwayland_keyboard_grab_v1 as _ ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_v1_add_listener ( zwp_xwayland_keyboard_grab_v1 : * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_xwayland_keyboard_grab_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_xwayland_keyboard_grab_v1_add_rust_listener ( zwp_xwayland_keyboard_grab_v1 : * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 , listener : & dyn zwp_xwayland_keyboard_grab_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_xwayland_keyboard_grab_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_xwayland_keyboard_grab_v1_add_listener ( zwp_xwayland_keyboard_grab_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the grabbed keyboard object\n\nDestroy the grabbed keyboard object. If applicable, the compositor\nwill ungrab the keyboard." ] pub unsafe fn zwp_xwayland_keyboard_grab_v1_destroy ( zwp_xwayland_keyboard_grab_v1 : * mut super :: zwp_xwayland_keyboard_grab_v1 :: zwp_xwayland_keyboard_grab_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_xwayland_keyboard_grab_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_xwayland_keyboard_grab_v1 as _ ) ; } } } pub mod xdg_foreign_unstable_v2 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "interface for exporting surfaces\n\nA global interface used for exporting surfaces that can later be imported\nusing xdg_importer." ] pub mod zxdg_exporter_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_exporter_v2 { } # [ doc = "error values\n\nThese errors can be emitted in response to invalid xdg_exporter\nrequests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "surface is not an xdg_toplevel" ] invalid_surface = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_surface ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zxdg_exporter_v2_requests_export_toplevel_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_exported_v2 :: zxdg_exported_v2_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_exporter_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"export_toplevel\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zxdg_exporter_v2_requests_export_toplevel_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_exporter_v2_interface : wl_interface = wl_interface { name : b"zxdg_exporter_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_exporter_v2_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_exporter_v2_listener { } pub unsafe fn zxdg_exporter_v2_set_user_data ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_exporter_v2 as _ , user_data ) ; } pub unsafe fn zxdg_exporter_v2_get_user_data ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_exporter_v2 as _ ) ; } pub unsafe fn zxdg_exporter_v2_get_version ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_exporter_v2 as _ ) ; } pub unsafe fn zxdg_exporter_v2_add_listener ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_exporter_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_exporter_v2_add_rust_listener ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 , listener : & dyn zxdg_exporter_v2_listener ) -> bool { let to = ( listener as * const dyn zxdg_exporter_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_exporter_v2_add_listener ( zxdg_exporter_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_exporter object\n\nNotify the compositor that the xdg_exporter object will no longer be\nused." ] pub unsafe fn zxdg_exporter_v2_destroy ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_exporter_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_exporter_v2 as _ ) ; } # [ doc = "export a toplevel surface\n\nThe export_toplevel request exports the passed surface so that it can later be\nimported via xdg_importer. When called, a new xdg_exported object will\nbe created and xdg_exported.handle will be sent immediately. See the\ncorresponding interface and event for details.\n\nA surface may be exported multiple times, and each exported handle may\nbe used to create an xdg_imported multiple times. Only xdg_toplevel\nequivalent surfaces may be exported, otherwise an invalid_surface\nprotocol error is sent." ] pub unsafe fn zxdg_exporter_v2_export_toplevel ( zxdg_exporter_v2 : * mut super :: zxdg_exporter_v2 :: zxdg_exporter_v2 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_exporter_v2 as _ , 1u32 , & super :: zxdg_exported_v2 :: zxdg_exported_v2_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "interface for importing surfaces\n\nA global interface used for importing surfaces exported by xdg_exporter.\nWith this interface, a client can create a reference to a surface of\nanother client." ] pub mod zxdg_importer_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_importer_v2 { } static mut zxdg_importer_v2_requests_import_toplevel_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_imported_v2 :: zxdg_imported_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_importer_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"import_toplevel\0" as * const u8 as * const c_char , signature : b"ns\0" as * const u8 as * const c_char , types : unsafe { & zxdg_importer_v2_requests_import_toplevel_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_importer_v2_interface : wl_interface = wl_interface { name : b"zxdg_importer_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_importer_v2_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_importer_v2_listener { } pub unsafe fn zxdg_importer_v2_set_user_data ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_importer_v2 as _ , user_data ) ; } pub unsafe fn zxdg_importer_v2_get_user_data ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_importer_v2 as _ ) ; } pub unsafe fn zxdg_importer_v2_get_version ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_importer_v2 as _ ) ; } pub unsafe fn zxdg_importer_v2_add_listener ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_importer_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_importer_v2_add_rust_listener ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 , listener : & dyn zxdg_importer_v2_listener ) -> bool { let to = ( listener as * const dyn zxdg_importer_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_importer_v2_add_listener ( zxdg_importer_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_importer object\n\nNotify the compositor that the xdg_importer object will no longer be\nused." ] pub unsafe fn zxdg_importer_v2_destroy ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_importer_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_importer_v2 as _ ) ; } # [ doc = "import a toplevel surface\n\nThe import_toplevel request imports a surface from any client given a handle\nretrieved by exporting said surface using xdg_exporter.export_toplevel.\nWhen called, a new xdg_imported object will be created. This new object\nrepresents the imported surface, and the importing client can\nmanipulate its relationship using it. See xdg_imported for details." ] pub unsafe fn zxdg_importer_v2_import_toplevel ( zxdg_importer_v2 : * mut super :: zxdg_importer_v2 :: zxdg_importer_v2 , handle : * const c_char ) -> * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_importer_v2 as _ , 1u32 , & super :: zxdg_imported_v2 :: zxdg_imported_v2_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , handle ) ; return r as _ ; } } # [ doc = "an exported surface handle\n\nAn xdg_exported object represents an exported reference to a surface. The\nexported surface may be referenced as long as the xdg_exported object not\ndestroyed. Destroying the xdg_exported invalidates any relationship the\nimporter may have established using xdg_imported." ] pub mod zxdg_exported_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_exported_v2 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_exported_v2_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_exported_v2_events : [ wl_message ; 1 ] = [ wl_message { name : b"handle\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_exported_v2_interface : wl_interface = wl_interface { name : b"zxdg_exported_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zxdg_exported_v2_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_exported_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_exported_v2_listener { # [ doc = "the exported surface handle\n\nThe handle event contains the unique handle of this exported surface\nreference. It may be shared with any client, which then can use it to\nimport the surface by calling xdg_importer.import_toplevel. A handle\nmay be used to import the surface multiple times." ] fn handle ( & mut self , object : * mut zxdg_exported_v2 , handle : * mut c_char ) { } } pub unsafe fn zxdg_exported_v2_set_user_data ( zxdg_exported_v2 : * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_exported_v2 as _ , user_data ) ; } pub unsafe fn zxdg_exported_v2_get_user_data ( zxdg_exported_v2 : * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_exported_v2 as _ ) ; } pub unsafe fn zxdg_exported_v2_get_version ( zxdg_exported_v2 : * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_exported_v2 as _ ) ; } pub unsafe fn zxdg_exported_v2_add_listener ( zxdg_exported_v2 : * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_exported_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_exported_v2_add_rust_listener ( zxdg_exported_v2 : * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 , listener : & dyn zxdg_exported_v2_listener ) -> bool { let to = ( listener as * const dyn zxdg_exported_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_exported_v2_add_listener ( zxdg_exported_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "unexport the exported surface\n\nRevoke the previously exported surface. This invalidates any\nrelationship the importer may have set up using the xdg_imported created\ngiven the handle sent via xdg_exported.handle." ] pub unsafe fn zxdg_exported_v2_destroy ( zxdg_exported_v2 : * mut super :: zxdg_exported_v2 :: zxdg_exported_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_exported_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_exported_v2 as _ ) ; } } # [ doc = "an imported surface handle\n\nAn xdg_imported object represents an imported reference to surface exported\nby some client. A client can use this interface to manipulate\nrelationships between its own surfaces and the imported surface." ] pub mod zxdg_imported_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_imported_v2 { } # [ doc = "error values\n\nThese errors can be emitted in response to invalid xdg_imported\nrequests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "surface is not an xdg_toplevel" ] invalid_surface = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: invalid_surface ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zxdg_imported_v2_requests_set_parent_of_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_imported_v2_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent_of\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zxdg_imported_v2_requests_set_parent_of_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_imported_v2_events : [ wl_message ; 1 ] = [ wl_message { name : b"destroyed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_imported_v2_interface : wl_interface = wl_interface { name : b"zxdg_imported_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_imported_v2_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_imported_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_imported_v2_listener { # [ doc = "the imported surface handle has been destroyed\n\nThe imported surface handle has been destroyed and any relationship set\nup has been invalidated. This may happen for various reasons, for\nexample if the exported surface or the exported surface handle has been\ndestroyed, if the handle used for importing was invalid." ] fn destroyed ( & mut self , object : * mut zxdg_imported_v2 , ) { } } pub unsafe fn zxdg_imported_v2_set_user_data ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_imported_v2 as _ , user_data ) ; } pub unsafe fn zxdg_imported_v2_get_user_data ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_imported_v2 as _ ) ; } pub unsafe fn zxdg_imported_v2_get_version ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_imported_v2 as _ ) ; } pub unsafe fn zxdg_imported_v2_add_listener ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_imported_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_imported_v2_add_rust_listener ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 , listener : & dyn zxdg_imported_v2_listener ) -> bool { let to = ( listener as * const dyn zxdg_imported_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_imported_v2_add_listener ( zxdg_imported_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the xdg_imported object\n\nNotify the compositor that it will no longer use the xdg_imported\nobject. Any relationship that may have been set up will at this point\nbe invalidated." ] pub unsafe fn zxdg_imported_v2_destroy ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_imported_v2 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_imported_v2 as _ ) ; } # [ doc = "set as the parent of some surface\n\nSet the imported surface as the parent of some surface of the client.\nThe passed surface must be an xdg_toplevel equivalent, otherwise an\ninvalid_surface protocol error is sent. Calling this function sets up\na surface to surface relation with the same stacking and positioning\nsemantics as xdg_toplevel.set_parent." ] pub unsafe fn zxdg_imported_v2_set_parent_of ( zxdg_imported_v2 : * mut super :: zxdg_imported_v2 :: zxdg_imported_v2 , surface : * mut super :: wl_surface :: wl_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_imported_v2 as _ , 1u32 , surface , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod xdg_decoration_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "window decoration manager\n\nThis interface allows a compositor to announce support for server-side\ndecorations.\n\nA window decoration is a set of window controls as deemed appropriate by\nthe party managing them, such as user interface components used to move,\nresize and change a window's state.\n\nA client can use this protocol to request being decorated by a supporting\ncompositor.\n\nIf compositor and client do not negotiate the use of a server-side\ndecoration using this protocol, clients continue to self-decorate as they\nsee fit.\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zxdg_decoration_manager_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_decoration_manager_v1 { } static mut zxdg_decoration_manager_v1_requests_get_toplevel_decoration_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1_interface as * const wl_interface } , unsafe { & super :: xdg_toplevel :: xdg_toplevel_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_decoration_manager_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_toplevel_decoration\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zxdg_decoration_manager_v1_requests_get_toplevel_decoration_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_decoration_manager_v1_interface : wl_interface = wl_interface { name : b"zxdg_decoration_manager_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zxdg_decoration_manager_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_decoration_manager_v1_listener { } pub unsafe fn zxdg_decoration_manager_v1_set_user_data ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_decoration_manager_v1 as _ , user_data ) ; } pub unsafe fn zxdg_decoration_manager_v1_get_user_data ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_decoration_manager_v1 as _ ) ; } pub unsafe fn zxdg_decoration_manager_v1_get_version ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_decoration_manager_v1 as _ ) ; } pub unsafe fn zxdg_decoration_manager_v1_add_listener ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_decoration_manager_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_decoration_manager_v1_add_rust_listener ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 , listener : & dyn zxdg_decoration_manager_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_decoration_manager_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_decoration_manager_v1_add_listener ( zxdg_decoration_manager_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the decoration manager object\n\nDestroy the decoration manager. This doesn't destroy objects created\nwith the manager." ] pub unsafe fn zxdg_decoration_manager_v1_destroy ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_decoration_manager_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_decoration_manager_v1 as _ ) ; } # [ doc = "create a new toplevel decoration object\n\nCreate a new decoration object associated with the given toplevel.\n\nCreating an xdg_toplevel_decoration from an xdg_toplevel which has a\nbuffer attached or committed is a client error, and any attempts by a\nclient to attach or manipulate a buffer prior to the first\nxdg_toplevel_decoration.configure event must also be treated as\nerrors." ] pub unsafe fn zxdg_decoration_manager_v1_get_toplevel_decoration ( zxdg_decoration_manager_v1 : * mut super :: zxdg_decoration_manager_v1 :: zxdg_decoration_manager_v1 , toplevel : * mut super :: xdg_toplevel :: xdg_toplevel ) -> * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zxdg_decoration_manager_v1 as _ , 1u32 , & super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , toplevel ) ; return r as _ ; } } # [ doc = "decoration object for a toplevel surface\n\nThe decoration object allows the compositor to toggle server-side window\ndecorations for a toplevel surface. The client can request to switch to\nanother mode.\n\nThe xdg_toplevel_decoration object must be destroyed before its\nxdg_toplevel." ] pub mod zxdg_toplevel_decoration_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zxdg_toplevel_decoration_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "xdg_toplevel has a buffer attached before configure" ] unconfigured_buffer = 0 , # [ doc = "xdg_toplevel already has a decoration object" ] already_constructed = 1 , # [ doc = "xdg_toplevel destroyed before the decoration object" ] orphaned = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: unconfigured_buffer ) , 1 => Some ( error :: already_constructed ) , 2 => Some ( error :: orphaned ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "window decoration modes\n\nThese values describe window decoration modes." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum mode { # [ doc = "no server-side window decoration" ] client_side = 1 , # [ doc = "server-side window decoration" ] server_side = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl mode { pub fn from_raw ( n : u32 ) -> Option < mode > { match n { 1 => Some ( mode :: client_side ) , 2 => Some ( mode :: server_side ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_toplevel_decoration_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_mode\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unset_mode\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zxdg_toplevel_decoration_v1_events : [ wl_message ; 1 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zxdg_toplevel_decoration_v1_interface : wl_interface = wl_interface { name : b"zxdg_toplevel_decoration_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & zxdg_toplevel_decoration_v1_requests as * const _ } , event_count : 1 , events : unsafe { & zxdg_toplevel_decoration_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zxdg_toplevel_decoration_v1_listener { # [ doc = "suggest a surface change\n\nThe configure event asks the client to change its decoration mode. The\nconfigured state should not be applied immediately. Clients must send an\nack_configure in response to this event. See xdg_surface.configure and\nxdg_surface.ack_configure for details.\n\nA configure event can be sent at any time. The specified mode must be\nobeyed by the client." ] fn configure ( & mut self , object : * mut zxdg_toplevel_decoration_v1 , mode : mode ) { } } pub unsafe fn zxdg_toplevel_decoration_v1_set_user_data ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zxdg_toplevel_decoration_v1 as _ , user_data ) ; } pub unsafe fn zxdg_toplevel_decoration_v1_get_user_data ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zxdg_toplevel_decoration_v1 as _ ) ; } pub unsafe fn zxdg_toplevel_decoration_v1_get_version ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zxdg_toplevel_decoration_v1 as _ ) ; } pub unsafe fn zxdg_toplevel_decoration_v1_add_listener ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zxdg_toplevel_decoration_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zxdg_toplevel_decoration_v1_add_rust_listener ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 , listener : & dyn zxdg_toplevel_decoration_v1_listener ) -> bool { let to = ( listener as * const dyn zxdg_toplevel_decoration_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zxdg_toplevel_decoration_v1_add_listener ( zxdg_toplevel_decoration_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the decoration object\n\nSwitch back to a mode without any server-side decorations at the next\ncommit." ] pub unsafe fn zxdg_toplevel_decoration_v1_destroy ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_decoration_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zxdg_toplevel_decoration_v1 as _ ) ; } # [ doc = "set the decoration mode\n\nSet the toplevel surface decoration mode. This informs the compositor\nthat the client prefers the provided decoration mode.\n\nAfter requesting a decoration mode, the compositor will respond by\nemitting an xdg_surface.configure event. The client should then update\nits content, drawing it without decorations if the received mode is\nserver-side decorations. The client must also acknowledge the configure\nwhen committing the new content (see xdg_surface.ack_configure).\n\nThe compositor can decide not to use the client's mode and enforce a\ndifferent mode instead.\n\nClients whose decoration mode depend on the xdg_toplevel state may send\na set_mode request in response to an xdg_surface.configure event and wait\nfor the next xdg_surface.configure event to prevent unwanted state.\nSuch clients are responsible for preventing configure loops and must\nmake sure not to send multiple successive set_mode requests with the\nsame decoration mode." ] pub unsafe fn zxdg_toplevel_decoration_v1_set_mode ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 , mode : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_decoration_v1 as _ , 1u32 , mode , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "unset the decoration mode\n\nUnset the toplevel surface decoration mode. This informs the compositor\nthat the client doesn't prefer a particular decoration mode.\n\nThis request has the same semantics as set_mode." ] pub unsafe fn zxdg_toplevel_decoration_v1_unset_mode ( zxdg_toplevel_decoration_v1 : * mut super :: zxdg_toplevel_decoration_v1 :: zxdg_toplevel_decoration_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zxdg_toplevel_decoration_v1 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod drm_lease_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "lease device\n\nThis protocol is used by Wayland compositors which act as Direct\nRenderering Manager (DRM) masters to lease DRM resources to Wayland\nclients.\n\nThe compositor will advertise one wp_drm_lease_device_v1 global for each\nDRM node. Some time after a client binds to the wp_drm_lease_device_v1\nglobal, the compositor will send a drm_fd event followed by zero, one or\nmore connector events. After all currently available connectors have been\nsent, the compositor will send a wp_drm_lease_device_v1.done event.\n\nWhen the list of connectors available for lease changes the compositor\nwill send wp_drm_lease_device_v1.connector events for added connectors and\nwp_drm_lease_connector_v1.withdrawn events for removed connectors,\nfollowed by a wp_drm_lease_device_v1.done event.\n\nThe compositor will indicate when a device is gone by removing the global\nvia a wl_registry.global_remove event. Upon receiving this event, the\nclient should destroy any matching wp_drm_lease_device_v1 object.\n\nTo destroy a wp_drm_lease_device_v1 object, the client must first issue\na release request. Upon receiving this request, the compositor will\nimmediately send a released event and destroy the object. The client must\ncontinue to process and discard drm_fd and connector events until it\nreceives the released event. Upon receiving the released event, the\nclient can safely cleanup any client-side resources.\n\nWarning! The protocol described in this file is currently in the testing\nphase. Backward compatible changes may be added together with the\ncorresponding interface version bump. Backward incompatible changes can\nonly be done by creating a new major version of the extension." ] pub mod wp_drm_lease_device_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_drm_lease_device_v1 { } static mut wp_drm_lease_device_v1_requests_create_lease_request_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_device_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"create_lease_request\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wp_drm_lease_device_v1_requests_create_lease_request_types as * const _ } , } , wl_message { name : b"release\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut wp_drm_lease_device_v1_events_connector_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_device_v1_events : [ wl_message ; 4 ] = [ wl_message { name : b"drm_fd\0" as * const u8 as * const c_char , signature : b"h\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"connector\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wp_drm_lease_device_v1_events_connector_types as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"released\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_drm_lease_device_v1_interface : wl_interface = wl_interface { name : b"wp_drm_lease_device_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & wp_drm_lease_device_v1_requests as * const _ } , event_count : 4 , events : unsafe { & wp_drm_lease_device_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wp_drm_lease_device_v1_listener { # [ doc = "open a non-master fd for this DRM node\n\nThe compositor will send this event when the wp_drm_lease_device_v1\nglobal is bound, although there are no guarantees as to how long this\ntakes - the compositor might need to wait until regaining DRM master.\nThe included fd is a non-master DRM file descriptor opened for this\ndevice and the compositor must not authenticate it.\nThe purpose of this event is to give the client the ability to\nquery DRM and discover information which may help them pick the\nappropriate DRM device or select the appropriate connectors therein." ] fn drm_fd ( & mut self , object : * mut wp_drm_lease_device_v1 , fd : :: std :: os :: unix :: io :: RawFd ) { } # [ doc = "advertise connectors available for leases\n\nThe compositor will use this event to advertise connectors available for\nlease by clients. This object may be passed into a lease request to\nindicate the client would like to lease that connector, see\nwp_drm_lease_request_v1.request_connector for details. While the\ncompositor will make a best effort to not send disconnected connectors,\nno guarantees can be made.\n\nThe compositor must send the drm_fd event before sending connectors.\nAfter the drm_fd event it will send all available connectors but may\nsend additional connectors at any time." ] fn connector ( & mut self , object : * mut wp_drm_lease_device_v1 , id : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 ) { } # [ doc = "signals grouping of connectors\n\nThe compositor will send this event to indicate that it has sent all\ncurrently available connectors after the client binds to the global or\nwhen it updates the connector list, for example on hotplug, drm master\nchange or when a leased connector becomes available again. It will\nsimilarly send this event to group wp_drm_lease_connector_v1.withdrawn\nevents of connectors of this device." ] fn done ( & mut self , object : * mut wp_drm_lease_device_v1 , ) { } # [ doc = "the compositor has finished using the device\n\nThis event is sent in response to the release request and indicates\nthat the compositor is done sending connector events.\nThe compositor will destroy this object immediately after sending the\nevent and it will become invalid. The client should release any\nresources associated with this device after receiving this event." ] fn released ( & mut self , object : * mut wp_drm_lease_device_v1 , ) { } } pub unsafe fn wp_drm_lease_device_v1_set_user_data ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_drm_lease_device_v1 as _ , user_data ) ; } pub unsafe fn wp_drm_lease_device_v1_get_user_data ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_drm_lease_device_v1 as _ ) ; } pub unsafe fn wp_drm_lease_device_v1_get_version ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_drm_lease_device_v1 as _ ) ; } pub unsafe fn wp_drm_lease_device_v1_add_listener ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_drm_lease_device_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_drm_lease_device_v1_add_rust_listener ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 , listener : & dyn wp_drm_lease_device_v1_listener ) -> bool { let to = ( listener as * const dyn wp_drm_lease_device_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_drm_lease_device_v1_add_listener ( wp_drm_lease_device_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wp_drm_lease_device_v1_destroy ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_drm_lease_device_v1 as _ ) ; } # [ doc = "create a lease request object\n\nCreates a lease request object.\n\nSee the documentation for wp_drm_lease_request_v1 for details." ] pub unsafe fn wp_drm_lease_device_v1_create_lease_request ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 ) -> * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wp_drm_lease_device_v1 as _ , 0u32 , & super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "release this object\n\nIndicates the client no longer wishes to use this object. In response\nthe compositor will immediately send the released event and destroy\nthis object. It can however not guarantee that the client won't receive\nconnector events before the released event. The client must not send any\nrequests after this one, doing so will raise a wl_display error.\nExisting connectors, lease request and leases will not be affected." ] pub unsafe fn wp_drm_lease_device_v1_release ( wp_drm_lease_device_v1 : * mut super :: wp_drm_lease_device_v1 :: wp_drm_lease_device_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_drm_lease_device_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "a leasable DRM connector\n\nRepresents a DRM connector which is available for lease. These objects are\ncreated via wp_drm_lease_device_v1.connector events, and should be passed\nto lease requests via wp_drm_lease_request_v1.request_connector.\nImmediately after the wp_drm_lease_connector_v1 object is created the\ncompositor will send a name, a description, a connector_id and a done\nevent. When the description is updated the compositor will send a\ndescription event followed by a done event." ] pub mod wp_drm_lease_connector_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_drm_lease_connector_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_connector_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_connector_v1_events : [ wl_message ; 5 ] = [ wl_message { name : b"name\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"description\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"connector_id\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"withdrawn\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_drm_lease_connector_v1_interface : wl_interface = wl_interface { name : b"wp_drm_lease_connector_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wp_drm_lease_connector_v1_requests as * const _ } , event_count : 5 , events : unsafe { & wp_drm_lease_connector_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wp_drm_lease_connector_v1_listener { # [ doc = "name\n\nThe compositor sends this event once the connector is created to\nindicate the name of this connector. This will not change for the\nduration of the Wayland session, but is not guaranteed to be consistent\nbetween sessions." ] fn name ( & mut self , object : * mut wp_drm_lease_connector_v1 , name : * mut c_char ) { } # [ doc = "description\n\nThe compositor sends this event once the connector is created to provide\na human-readable description for this connector, which may be presented\nto the user. The compositor may send this event multiple times over the\nlifetime of this object to reflect changes in the description." ] fn description ( & mut self , object : * mut wp_drm_lease_connector_v1 , description : * mut c_char ) { } # [ doc = "connector_id\n\nThe compositor sends this event once the connector is created to\nindicate the DRM object ID which represents the underlying connector\nthat is being offered. Note that the final lease may include additional\nobject IDs, such as CRTCs and planes." ] fn connector_id ( & mut self , object : * mut wp_drm_lease_connector_v1 , connector_id : u32 ) { } # [ doc = "all properties have been sent\n\nThis event is sent after all properties of a connector have been sent.\nThis allows changes to the properties to be seen as atomic even if they\nhappen via multiple events." ] fn done ( & mut self , object : * mut wp_drm_lease_connector_v1 , ) { } # [ doc = "lease offer withdrawn\n\nSent to indicate that the compositor will no longer honor requests for\nDRM leases which include this connector. The client may still issue a\nlease request including this connector, but the compositor will send\nwp_drm_lease_v1.finished without issuing a lease fd. Compositors are\nencouraged to send this event when they lose access to connector, for\nexample when the connector is hot-unplugged, when the connector gets\nleased to a client or when the compositor loses DRM master." ] fn withdrawn ( & mut self , object : * mut wp_drm_lease_connector_v1 , ) { } } pub unsafe fn wp_drm_lease_connector_v1_set_user_data ( wp_drm_lease_connector_v1 : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_drm_lease_connector_v1 as _ , user_data ) ; } pub unsafe fn wp_drm_lease_connector_v1_get_user_data ( wp_drm_lease_connector_v1 : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_drm_lease_connector_v1 as _ ) ; } pub unsafe fn wp_drm_lease_connector_v1_get_version ( wp_drm_lease_connector_v1 : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_drm_lease_connector_v1 as _ ) ; } pub unsafe fn wp_drm_lease_connector_v1_add_listener ( wp_drm_lease_connector_v1 : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_drm_lease_connector_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_drm_lease_connector_v1_add_rust_listener ( wp_drm_lease_connector_v1 : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 , listener : & dyn wp_drm_lease_connector_v1_listener ) -> bool { let to = ( listener as * const dyn wp_drm_lease_connector_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_drm_lease_connector_v1_add_listener ( wp_drm_lease_connector_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy connector\n\nThe client may send this request to indicate that it will not use this\nconnector. Clients are encouraged to send this after receiving the\n\"withdrawn\" event so that the server can release the resources\nassociated with this connector offer. Neither existing lease requests\nnor leases will be affected." ] pub unsafe fn wp_drm_lease_connector_v1_destroy ( wp_drm_lease_connector_v1 : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_drm_lease_connector_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_drm_lease_connector_v1 as _ ) ; } } # [ doc = "DRM lease request\n\nA client that wishes to lease DRM resources will attach the list of\nconnectors advertised with wp_drm_lease_device_v1.connector that they\nwish to lease, then use wp_drm_lease_request_v1.submit to submit the\nrequest." ] pub mod wp_drm_lease_request_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_drm_lease_request_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "requested a connector from a different lease device" ] wrong_device = 0 , # [ doc = "requested a connector twice" ] duplicate_connector = 1 , # [ doc = "requested a lease without requesting a connector" ] empty_lease = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: wrong_device ) , 1 => Some ( error :: duplicate_connector ) , 2 => Some ( error :: empty_lease ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wp_drm_lease_request_v1_requests_request_connector_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1_interface as * const wl_interface } , ] ; static mut wp_drm_lease_request_v1_requests_submit_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wp_drm_lease_v1 :: wp_drm_lease_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_request_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"request_connector\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & wp_drm_lease_request_v1_requests_request_connector_types as * const _ } , } , wl_message { name : b"submit\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & wp_drm_lease_request_v1_requests_submit_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_drm_lease_request_v1_interface : wl_interface = wl_interface { name : b"wp_drm_lease_request_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & wp_drm_lease_request_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wp_drm_lease_request_v1_listener { } pub unsafe fn wp_drm_lease_request_v1_set_user_data ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_drm_lease_request_v1 as _ , user_data ) ; } pub unsafe fn wp_drm_lease_request_v1_get_user_data ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_drm_lease_request_v1 as _ ) ; } pub unsafe fn wp_drm_lease_request_v1_get_version ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_drm_lease_request_v1 as _ ) ; } pub unsafe fn wp_drm_lease_request_v1_add_listener ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_drm_lease_request_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_drm_lease_request_v1_add_rust_listener ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 , listener : & dyn wp_drm_lease_request_v1_listener ) -> bool { let to = ( listener as * const dyn wp_drm_lease_request_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_drm_lease_request_v1_add_listener ( wp_drm_lease_request_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn wp_drm_lease_request_v1_destroy ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_drm_lease_request_v1 as _ ) ; } # [ doc = "request a connector for this lease\n\nIndicates that the client would like to lease the given connector.\nThis is only used as a suggestion, the compositor may choose to\ninclude any resources in the lease it issues, or change the set of\nleased resources at any time. Compositors are however encouraged to\ninclude the requested connector and other resources necessary\nto drive the connected output in the lease.\n\nRequesting a connector that was created from a different lease device\nthan this lease request raises the wrong_device error. Requesting a\nconnector twice will raise the duplicate_connector error." ] pub unsafe fn wp_drm_lease_request_v1_request_connector ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 , connector : * mut super :: wp_drm_lease_connector_v1 :: wp_drm_lease_connector_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_drm_lease_request_v1 as _ , 0u32 , connector , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "submit the lease request\n\nSubmits the lease request and creates a new wp_drm_lease_v1 object.\nAfter calling submit the compositor will immediately destroy this\nobject, issuing any more requests will cause a wl_diplay error.\nThe compositor doesn't make any guarantees about the events of the\nlease object, clients cannot expect an immediate response.\nNot requesting any connectors before submitting the lease request\nwill raise the empty_lease error." ] pub unsafe fn wp_drm_lease_request_v1_submit ( wp_drm_lease_request_v1 : * mut super :: wp_drm_lease_request_v1 :: wp_drm_lease_request_v1 ) -> * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wp_drm_lease_request_v1 as _ , 1u32 , & super :: wp_drm_lease_v1 :: wp_drm_lease_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_drm_lease_request_v1 as _ ) ; return r as _ ; } } # [ doc = "a DRM lease\n\nA DRM lease object is used to transfer the DRM file descriptor to the\nclient and manage the lifetime of the lease.\n\nSome time after the wp_drm_lease_v1 object is created, the compositor\nwill reply with the lease request's result. If the lease request is\ngranted, the compositor will send a lease_fd event. If the lease request\nis denied, the compositor will send a finished event without a lease_fd\nevent." ] pub mod wp_drm_lease_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_drm_lease_v1 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_drm_lease_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"lease_fd\0" as * const u8 as * const c_char , signature : b"h\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"finished\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_drm_lease_v1_interface : wl_interface = wl_interface { name : b"wp_drm_lease_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & wp_drm_lease_v1_requests as * const _ } , event_count : 2 , events : unsafe { & wp_drm_lease_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait wp_drm_lease_v1_listener { # [ doc = "shares the DRM file descriptor\n\nThis event returns a file descriptor suitable for use with DRM-related\nioctls. The client should use drmModeGetLease to enumerate the DRM\nobjects which have been leased to them. The compositor guarantees it\nwill not use the leased DRM objects itself until it sends the finished\nevent. If the compositor cannot or will not grant a lease for the\nrequested connectors, it will not send this event, instead sending the\nfinished event.\n\nThe compositor will send this event at most once during this objects\nlifetime." ] fn lease_fd ( & mut self , object : * mut wp_drm_lease_v1 , leased_fd : :: std :: os :: unix :: io :: RawFd ) { } # [ doc = "sent when the lease has been revoked\n\nThe compositor uses this event to either reject a lease request, or if\nit previously sent a lease_fd, to notify the client that the lease has\nbeen revoked. If the client requires a new lease, they should destroy\nthis object and submit a new lease request. The compositor will send\nno further events for this object after sending the finish event.\nCompositors should revoke the lease when any of the leased resources\nbecome unavailable, namely when a hot-unplug occurs or when the\ncompositor loses DRM master." ] fn finished ( & mut self , object : * mut wp_drm_lease_v1 , ) { } } pub unsafe fn wp_drm_lease_v1_set_user_data ( wp_drm_lease_v1 : * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_drm_lease_v1 as _ , user_data ) ; } pub unsafe fn wp_drm_lease_v1_get_user_data ( wp_drm_lease_v1 : * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_drm_lease_v1 as _ ) ; } pub unsafe fn wp_drm_lease_v1_get_version ( wp_drm_lease_v1 : * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_drm_lease_v1 as _ ) ; } pub unsafe fn wp_drm_lease_v1_add_listener ( wp_drm_lease_v1 : * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_drm_lease_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_drm_lease_v1_add_rust_listener ( wp_drm_lease_v1 : * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 , listener : & dyn wp_drm_lease_v1_listener ) -> bool { let to = ( listener as * const dyn wp_drm_lease_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_drm_lease_v1_add_listener ( wp_drm_lease_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroys the lease object\n\nThe client should send this to indicate that it no longer wishes to use\nthis lease. The compositor should use drmModeRevokeLease on the\nappropriate file descriptor, if necessary." ] pub unsafe fn wp_drm_lease_v1_destroy ( wp_drm_lease_v1 : * mut super :: wp_drm_lease_v1 :: wp_drm_lease_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_drm_lease_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_drm_lease_v1 as _ ) ; } } } pub mod xdg_shell_unstable_v5 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "create desktop-style surfaces\n\nxdg_shell allows clients to turn a wl_surface into a \"real window\"\nwhich can be dragged, resized, stacked, and moved around by the\nuser. Everything about this interface is suited towards traditional\ndesktop environments." ] pub mod xdg_shell { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_shell { } # [ doc = "latest protocol version\n\nThe 'current' member of this enum gives the version of the\nprotocol. Implementations can compare this to the version\nthey implement using static_assert to ensure the protocol and\nimplementation versions match." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum version { # [ doc = "Always the latest version" ] current = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl version { pub fn from_raw ( n : u32 ) -> Option < version > { match n { 5 => Some ( version :: current ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "given wl_surface has another role" ] role = 0 , # [ doc = "xdg_shell was destroyed before children" ] defunct_surfaces = 1 , # [ doc = "the client tried to map or destroy a non-topmost popup" ] not_the_topmost_popup = 2 , # [ doc = "the client specified an invalid popup parent surface" ] invalid_popup_parent = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: role ) , 1 => Some ( error :: defunct_surfaces ) , 2 => Some ( error :: not_the_topmost_popup ) , 3 => Some ( error :: invalid_popup_parent ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_shell_requests_get_xdg_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: xdg_surface :: xdg_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut xdg_shell_requests_get_xdg_popup_types : [ * const wl_interface ; 7 ] = [ unsafe { & super :: xdg_popup :: xdg_popup_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_shell_requests : [ wl_message ; 5 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"use_unstable_version\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_xdg_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & xdg_shell_requests_get_xdg_surface_types as * const _ } , } , wl_message { name : b"get_xdg_popup\0" as * const u8 as * const c_char , signature : b"nooouii\0" as * const u8 as * const c_char , types : unsafe { & xdg_shell_requests_get_xdg_popup_types as * const _ } , } , wl_message { name : b"pong\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_shell_events : [ wl_message ; 1 ] = [ wl_message { name : b"ping\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_shell_interface : wl_interface = wl_interface { name : b"xdg_shell\0" as * const u8 as * const c_char , version : 1 , request_count : 5 , requests : unsafe { & xdg_shell_requests as * const _ } , event_count : 1 , events : unsafe { & xdg_shell_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_shell_listener { # [ doc = "check if the client is alive\n\nThe ping event asks the client if it's still alive. Pass the\nserial specified in the event back to the compositor by sending\na \"pong\" request back with the specified serial.\n\nCompositors can use this to determine if the client is still\nalive. It's unspecified what will happen if the client doesn't\nrespond to the ping request, or in what timeframe. Clients should\ntry to respond in a reasonable amount of time.\n\nA compositor is free to ping in any way it wants, but a client must\nalways respond to any xdg_shell object it created." ] fn ping ( & mut self , object : * mut xdg_shell , serial : u32 ) { } } pub unsafe fn xdg_shell_set_user_data ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_shell as _ , user_data ) ; } pub unsafe fn xdg_shell_get_user_data ( xdg_shell : * mut super :: xdg_shell :: xdg_shell ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_shell as _ ) ; } pub unsafe fn xdg_shell_get_version ( xdg_shell : * mut super :: xdg_shell :: xdg_shell ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_shell as _ ) ; } pub unsafe fn xdg_shell_add_listener ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_shell as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_shell_add_rust_listener ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , listener : & dyn xdg_shell_listener ) -> bool { let to = ( listener as * const dyn xdg_shell_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_shell_add_listener ( xdg_shell as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy xdg_shell\n\nDestroy this xdg_shell object.\n\nDestroying a bound xdg_shell object while there are surfaces\nstill alive created by this xdg_shell object instance is illegal\nand will result in a protocol error." ] pub unsafe fn xdg_shell_destroy ( xdg_shell : * mut super :: xdg_shell :: xdg_shell ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_shell as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_shell as _ ) ; } # [ doc = "enable use of this unstable version\n\nNegotiate the unstable version of the interface. This\nmechanism is in place to ensure client and server agree on the\nunstable versions of the protocol that they speak or exit\ncleanly if they don't agree. This request will go away once\nthe xdg-shell protocol is stable." ] pub unsafe fn xdg_shell_use_unstable_version ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , version : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_shell as _ , 1u32 , version , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "create a shell surface from a surface\n\nThis creates an xdg_surface for the given surface and gives it the\nxdg_surface role. A wl_surface can only be given an xdg_surface role\nonce. If get_xdg_surface is called with a wl_surface that already has\nan active xdg_surface associated with it, or if it had any other role,\nan error is raised.\n\nSee the documentation of xdg_surface for more details about what an\nxdg_surface is and how it is used." ] pub unsafe fn xdg_shell_get_xdg_surface ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: xdg_surface :: xdg_surface { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_shell as _ , 2u32 , & super :: xdg_surface :: xdg_surface_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } # [ doc = "create a popup for a surface\n\nThis creates an xdg_popup for the given surface and gives it the\nxdg_popup role. A wl_surface can only be given an xdg_popup role\nonce. If get_xdg_popup is called with a wl_surface that already has\nan active xdg_popup associated with it, or if it had any other role,\nan error is raised.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event.\n\nSee the documentation of xdg_popup for more details about what an\nxdg_popup is and how it is used." ] pub unsafe fn xdg_shell_get_xdg_popup ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , surface : * mut super :: wl_surface :: wl_surface , parent : * mut super :: wl_surface :: wl_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , x : i32 , y : i32 ) -> * mut super :: xdg_popup :: xdg_popup { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , xdg_shell as _ , 3u32 , & super :: xdg_popup :: xdg_popup_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface , parent , seat , serial , x , y ) ; return r as _ ; } # [ doc = "respond to a ping event\n\nA client must respond to a ping event with a pong request or\nthe client may be deemed unresponsive." ] pub unsafe fn xdg_shell_pong ( xdg_shell : * mut super :: xdg_shell :: xdg_shell , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_shell as _ , 4u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "A desktop window\n\nAn interface that may be implemented by a wl_surface, for\nimplementations that provide a desktop-style user interface.\n\nIt provides requests to treat surfaces like windows, allowing to set\nproperties like maximized, fullscreen, minimized, and to move and resize\nthem, and associate metadata like title and app id.\n\nThe client must call wl_surface.commit on the corresponding wl_surface\nfor the xdg_surface state to take effect. Prior to committing the new\nstate, it can set up initial configuration, such as maximizing or setting\na window geometry.\n\nEven without attaching a buffer the compositor must respond to initial\ncommitted configuration, for instance sending a configure event with\nexpected window geometry if the client maximized its surface during\ninitialization.\n\nFor a surface to be mapped by the compositor the client must have\ncommitted both an xdg_surface state and a buffer." ] pub mod xdg_surface { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_surface { } # [ doc = "edge values for resizing\n\nThese values are used to indicate which edge of a surface\nis being dragged in a resize operation." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum resize_edge { none = 0 , top = 1 , bottom = 2 , left = 4 , top_left = 5 , bottom_left = 6 , right = 8 , top_right = 9 , bottom_right = 10 , # [ doc ( hidden ) ] __nonexhaustive , } impl resize_edge { pub fn from_raw ( n : u32 ) -> Option < resize_edge > { match n { 0 => Some ( resize_edge :: none ) , 1 => Some ( resize_edge :: top ) , 2 => Some ( resize_edge :: bottom ) , 4 => Some ( resize_edge :: left ) , 5 => Some ( resize_edge :: top_left ) , 6 => Some ( resize_edge :: bottom_left ) , 8 => Some ( resize_edge :: right ) , 9 => Some ( resize_edge :: top_right ) , 10 => Some ( resize_edge :: bottom_right ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "types of state on the surface\n\nThe different state values used on the surface. This is designed for\nstate values like maximized, fullscreen. It is paired with the\nconfigure event to ensure that both the client and the compositor\nsetting the state can be synchronized.\n\nStates set in this way are double-buffered. They will get applied on\nthe next commit.\n\nDesktop environments may extend this enum by taking up a range of\nvalues and documenting the range they chose in this description.\nThey are not required to document the values for the range that they\nchose. Ideally, any good extensions from a desktop environment should\nmake its way into standardization into this enum.\n\nThe current reserved ranges are:\n\n0x0000 - 0x0FFF: xdg-shell core values, documented below.\n0x1000 - 0x1FFF: GNOME\n0x2000 - 0x2FFF: EFL" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum state { # [ doc = "the surface is maximized\n\nThe surface is maximized. The window geometry specified in the configure\nevent must be obeyed by the client." ] maximized = 1 , # [ doc = "the surface is fullscreen\n\nThe surface is fullscreen. The window geometry specified in the configure\nevent must be obeyed by the client." ] fullscreen = 2 , # [ doc = "the surface is being resized\n\nThe surface is being resized. The window geometry specified in the\nconfigure event is a maximum; the client cannot resize beyond it.\nClients that have aspect ratio or cell sizing configuration can use\na smaller size, however." ] resizing = 3 , # [ doc = "the surface is now activated\n\nClient window decorations should be painted as if the window is\nactive. Do not assume this means that the window actually has\nkeyboard or pointer focus." ] activated = 4 , # [ doc ( hidden ) ] __nonexhaustive , } impl state { pub fn from_raw ( n : u32 ) -> Option < state > { match n { 1 => Some ( state :: maximized ) , 2 => Some ( state :: fullscreen ) , 3 => Some ( state :: resizing ) , 4 => Some ( state :: activated ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut xdg_surface_requests_set_parent_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: xdg_surface :: xdg_surface_interface as * const wl_interface } , ] ; static mut xdg_surface_requests_show_window_menu_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut xdg_surface_requests_move_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut xdg_surface_requests_resize_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut xdg_surface_requests_set_fullscreen_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_surface_requests : [ wl_message ; 14 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_parent\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_set_parent_types as * const _ } , } , wl_message { name : b"set_title\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_app_id\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"show_window_menu\0" as * const u8 as * const c_char , signature : b"ouii\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_show_window_menu_types as * const _ } , } , wl_message { name : b"move\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_move_types as * const _ } , } , wl_message { name : b"resize\0" as * const u8 as * const c_char , signature : b"ouu\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_resize_types as * const _ } , } , wl_message { name : b"ack_configure\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_window_geometry\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_maximized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unset_maximized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_fullscreen\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & xdg_surface_requests_set_fullscreen_types as * const _ } , } , wl_message { name : b"unset_fullscreen\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_minimized\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_surface_events : [ wl_message ; 2 ] = [ wl_message { name : b"configure\0" as * const u8 as * const c_char , signature : b"iiau\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"close\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_surface_interface : wl_interface = wl_interface { name : b"xdg_surface\0" as * const u8 as * const c_char , version : 1 , request_count : 14 , requests : unsafe { & xdg_surface_requests as * const _ } , event_count : 2 , events : unsafe { & xdg_surface_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_surface_listener { # [ doc = "suggest a surface change\n\nThe configure event asks the client to resize its surface or to\nchange its state.\n\nThe width and height arguments specify a hint to the window\nabout how its surface should be resized in window geometry\ncoordinates. See set_window_geometry.\n\nIf the width or height arguments are zero, it means the client\nshould decide its own window dimension. This may happen when the\ncompositor need to configure the state of the surface but doesn't\nhave any information about any previous or expected dimension.\n\nThe states listed in the event specify how the width/height\narguments should be interpreted, and possibly how it should be\ndrawn.\n\nClients should arrange their surface for the new size and\nstates, and then send a ack_configure request with the serial\nsent in this configure event at some point before committing\nthe new surface.\n\nIf the client receives multiple configure events before it\ncan respond to one, it is free to discard all but the last\nevent it received." ] fn configure ( & mut self , object : * mut xdg_surface , width : i32 , height : i32 , states : * mut wl_array , serial : u32 ) { } # [ doc = "surface wants to be closed\n\nThe close event is sent by the compositor when the user\nwants the surface to be closed. This should be equivalent to\nthe user clicking the close button in client-side decorations,\nif your application has any...\n\nThis is only a request that the user intends to close your\nwindow. The client may choose to ignore this request, or show\na dialog to ask the user to save their data..." ] fn close ( & mut self , object : * mut xdg_surface , ) { } } pub unsafe fn xdg_surface_set_user_data ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_surface as _ , user_data ) ; } pub unsafe fn xdg_surface_get_user_data ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_surface as _ ) ; } pub unsafe fn xdg_surface_get_version ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_surface as _ ) ; } pub unsafe fn xdg_surface_add_listener ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_surface as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_surface_add_rust_listener ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , listener : & dyn xdg_surface_listener ) -> bool { let to = ( listener as * const dyn xdg_surface_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_surface_add_listener ( xdg_surface as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "Destroy the xdg_surface\n\nUnmap and destroy the window. The window will be effectively\nhidden from the user's point of view, and all state like\nmaximization, fullscreen, and so on, will be lost." ] pub unsafe fn xdg_surface_destroy ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_surface as _ ) ; } # [ doc = "set the parent of this surface\n\nSet the \"parent\" of this surface. This window should be stacked\nabove a parent. The parent surface must be mapped as long as this\nsurface is mapped.\n\nParent windows should be set on dialogs, toolboxes, or other\n\"auxiliary\" surfaces, so that the parent is raised when the dialog\nis raised." ] pub unsafe fn xdg_surface_set_parent ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , parent : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 1u32 , parent , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set surface title\n\nSet a short title for the surface.\n\nThis string may be used to identify the surface in a task bar,\nwindow list, or other user interface elements provided by the\ncompositor.\n\nThe string must be encoded in UTF-8." ] pub unsafe fn xdg_surface_set_title ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , title : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 2u32 , title , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set application ID\n\nSet an application identifier for the surface.\n\nThe app ID identifies the general class of applications to which\nthe surface belongs. The compositor can use this to group multiple\nsurfaces together, or to determine how to launch a new application.\n\nFor D-Bus activatable applications, the app ID is used as the D-Bus\nservice name.\n\nThe compositor shell will try to group application surfaces together\nby their app ID. As a best practice, it is suggested to select app\nID's that match the basename of the application's .desktop file.\nFor example, \"org.freedesktop.FooViewer\" where the .desktop file is\n\"org.freedesktop.FooViewer.desktop\".\n\nSee the desktop-entry specification [0] for more details on\napplication identifiers and how they relate to well-known D-Bus\nnames and .desktop files.\n\n[0] http://standards.freedesktop.org/desktop-entry-spec/" ] pub unsafe fn xdg_surface_set_app_id ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , app_id : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 3u32 , app_id , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "show the window menu\n\nClients implementing client-side decorations might want to show\na context menu when right-clicking on the decorations, giving the\nuser a menu that they can use to maximize or minimize the window.\n\nThis request asks the compositor to pop up such a window menu at\nthe given position, relative to the local surface coordinates of\nthe parent surface. There are no guarantees as to what menu items\nthe window menu contains.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event." ] pub unsafe fn xdg_surface_show_window_menu ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 4u32 , seat , serial , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive move\n\nStart an interactive, user-driven move of the surface.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event. The passed\nserial is used to determine the type of interactive move (touch,\npointer, etc).\n\nThe server may ignore move requests depending on the state of\nthe surface (e.g. fullscreen or maximized), or if the passed serial\nis no longer valid.\n\nIf triggered, the surface will lose the focus of the device\n(wl_pointer, wl_touch, etc) used for the move. It is up to the\ncompositor to visually indicate that the move is taking place, such as\nupdating a pointer cursor, during the move. There is no guarantee\nthat the device focus will return when the move is completed." ] pub unsafe fn xdg_surface_move ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 5u32 , seat , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "start an interactive resize\n\nStart a user-driven, interactive resize of the surface.\n\nThis request must be used in response to some sort of user action\nlike a button press, key press, or touch down event. The passed\nserial is used to determine the type of interactive resize (touch,\npointer, etc).\n\nThe server may ignore resize requests depending on the state of\nthe surface (e.g. fullscreen or maximized).\n\nIf triggered, the client will receive configure events with the\n\"resize\" state enum value and the expected sizes. See the \"resize\"\nenum value for more details about what is required. The client\nmust also acknowledge configure events using \"ack_configure\". After\nthe resize is completed, the client will receive another \"configure\"\nevent without the resize state.\n\nIf triggered, the surface also will lose the focus of the device\n(wl_pointer, wl_touch, etc) used for the resize. It is up to the\ncompositor to visually indicate that the resize is taking place,\nsuch as updating a pointer cursor, during the resize. There is no\nguarantee that the device focus will return when the resize is\ncompleted.\n\nThe edges parameter specifies how the surface should be resized,\nand is one of the values of the resize_edge enum. The compositor\nmay use this information to update the surface position for\nexample when dragging the top left corner. The compositor may also\nuse this information to adapt its behavior, e.g. choose an\nappropriate cursor image." ] pub unsafe fn xdg_surface_resize ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , seat : * mut super :: wl_seat :: wl_seat , serial : u32 , edges : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 6u32 , seat , serial , edges , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "ack a configure event\n\nWhen a configure event is received, if a client commits the\nsurface in response to the configure event, then the client\nmust make an ack_configure request sometime before the commit\nrequest, passing along the serial of the configure event.\n\nFor instance, the compositor might use this information to move\na surface to the top left only when the client has drawn itself\nfor the maximized or fullscreen state.\n\nIf the client receives multiple configure events before it\ncan respond to one, it only has to ack the last configure event.\n\nA client is not required to commit immediately after sending\nan ack_configure request - it may even ack_configure several times\nbefore its next surface commit.\n\nThe compositor expects that the most recently received\nack_configure request at the time of a commit indicates which\nconfigure event the client is responding to." ] pub unsafe fn xdg_surface_ack_configure ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , serial : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 7u32 , serial , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the new window geometry\n\nThe window geometry of a window is its \"visible bounds\" from the\nuser's perspective. Client-side decorations often have invisible\nportions like drop-shadows which should be ignored for the\npurposes of aligning, placing and constraining windows.\n\nThe window geometry is double buffered, and will be applied at the\ntime wl_surface.commit of the corresponding wl_surface is called.\n\nOnce the window geometry of the surface is set once, it is not\npossible to unset it, and it will remain the same until\nset_window_geometry is called again, even if a new subsurface or\nbuffer is attached.\n\nIf never set, the value is the full bounds of the surface,\nincluding any subsurfaces. This updates dynamically on every\ncommit. This unset mode is meant for extremely simple clients.\n\nIf responding to a configure event, the window geometry in here\nmust respect the sizing negotiations specified by the states in\nthe configure event.\n\nThe arguments are given in the surface local coordinate space of\nthe wl_surface associated with this xdg_surface.\n\nThe width and height must be greater than zero." ] pub unsafe fn xdg_surface_set_window_geometry ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 8u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "maximize the window\n\nMaximize the surface.\n\nAfter requesting that the surface should be maximized, the compositor\nwill respond by emitting a configure event with the \"maximized\" state\nand the required window geometry. The client should then update its\ncontent, drawing it in a maximized state, i.e. without shadow or other\ndecoration outside of the window geometry. The client must also\nacknowledge the configure when committing the new content (see\nack_configure).\n\nIt is up to the compositor to decide how and where to maximize the\nsurface, for example which output and what region of the screen should\nbe used.\n\nIf the surface was already maximized, the compositor will still emit\na configure event with the \"maximized\" state." ] pub unsafe fn xdg_surface_set_maximized ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 9u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "unmaximize the window\n\nUnmaximize the surface.\n\nAfter requesting that the surface should be unmaximized, the compositor\nwill respond by emitting a configure event without the \"maximized\"\nstate. If available, the compositor will include the window geometry\ndimensions the window had prior to being maximized in the configure\nrequest. The client must then update its content, drawing it in a\nregular state, i.e. potentially with shadow, etc. The client must also\nacknowledge the configure when committing the new content (see\nack_configure).\n\nIt is up to the compositor to position the surface after it was\nunmaximized; usually the position the surface had before maximizing, if\napplicable.\n\nIf the surface was already not maximized, the compositor will still\nemit a configure event without the \"maximized\" state." ] pub unsafe fn xdg_surface_unset_maximized ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 10u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the window as fullscreen on a monitor\n\nMake the surface fullscreen.\n\nYou can specify an output that you would prefer to be fullscreen.\nIf this value is NULL, it's up to the compositor to choose which\ndisplay will be used to map this surface.\n\nIf the surface doesn't cover the whole output, the compositor will\nposition the surface in the center of the output and compensate with\nblack borders filling the rest of the output." ] pub unsafe fn xdg_surface_set_fullscreen ( xdg_surface : * mut super :: xdg_surface :: xdg_surface , output : * mut super :: wl_output :: wl_output ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 11u32 , output , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn xdg_surface_unset_fullscreen ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 12u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the window as minimized\n\nRequest that the compositor minimize your surface. There is no\nway to know if the surface is currently minimized, nor is there\nany way to unset minimization on this surface.\n\nIf you are looking to throttle redrawing when minimized, please\ninstead use the wl_surface.frame event for this, as this will\nalso work with live previews on windows in Alt-Tab, Expose or\nsimilar compositor features." ] pub unsafe fn xdg_surface_set_minimized ( xdg_surface : * mut super :: xdg_surface :: xdg_surface ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_surface as _ , 13u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "short-lived, popup surfaces for menus\n\nA popup surface is a short-lived, temporary surface that can be\nused to implement menus. It takes an explicit grab on the surface\nthat will be dismissed when the user dismisses the popup. This can\nbe done by the user clicking outside the surface, using the keyboard,\nor even locking the screen through closing the lid or a timeout.\n\nWhen the popup is dismissed, a popup_done event will be sent out,\nand at the same time the surface will be unmapped. The xdg_popup\nobject is now inert and cannot be reactivated, so clients should\ndestroy it. Explicitly destroying the xdg_popup object will also\ndismiss the popup and unmap the surface.\n\nClients will receive events for all their surfaces during this\ngrab (which is an \"owner-events\" grab in X11 parlance). This is\ndone so that users can navigate through submenus and other\n\"nested\" popup windows without having to dismiss the topmost\npopup.\n\nClients that want to dismiss the popup when another surface of\ntheir own is clicked should dismiss the popup using the destroy\nrequest.\n\nThe parent surface must have either an xdg_surface or xdg_popup\nrole.\n\nSpecifying an xdg_popup for the parent means that the popups are\nnested, with this popup now being the topmost popup. Nested\npopups must be destroyed in the reverse order they were created\nin, e.g. the only popup you are allowed to destroy at all times\nis the topmost one.\n\nIf there is an existing popup when creating a new popup, the\nparent must be the current topmost popup.\n\nA parent surface must be mapped before the new popup is mapped.\n\nWhen compositors choose to dismiss a popup, they will likely\ndismiss every nested popup as well. When a compositor dismisses\npopups, it will follow the same dismissing order as required\nfrom the client.\n\nThe x and y arguments passed when creating the popup object specify\nwhere the top left of the popup should be placed, relative to the\nlocal surface coordinates of the parent surface. See\nxdg_shell.get_xdg_popup.\n\nThe client must call wl_surface.commit on the corresponding wl_surface\nfor the xdg_popup state to take effect.\n\nFor a surface to be mapped by the compositor the client must have\ncommitted both the xdg_popup state and a buffer." ] pub mod xdg_popup { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum xdg_popup { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_popup_requests : [ wl_message ; 1 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut xdg_popup_events : [ wl_message ; 1 ] = [ wl_message { name : b"popup_done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut xdg_popup_interface : wl_interface = wl_interface { name : b"xdg_popup\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & xdg_popup_requests as * const _ } , event_count : 1 , events : unsafe { & xdg_popup_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait xdg_popup_listener { # [ doc = "popup interaction is done\n\nThe popup_done event is sent out when a popup is dismissed by the\ncompositor. The client should destroy the xdg_popup object at this\npoint." ] fn popup_done ( & mut self , object : * mut xdg_popup , ) { } } pub unsafe fn xdg_popup_set_user_data ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , xdg_popup as _ , user_data ) ; } pub unsafe fn xdg_popup_get_user_data ( xdg_popup : * mut super :: xdg_popup :: xdg_popup ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , xdg_popup as _ ) ; } pub unsafe fn xdg_popup_get_version ( xdg_popup : * mut super :: xdg_popup :: xdg_popup ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , xdg_popup as _ ) ; } pub unsafe fn xdg_popup_add_listener ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , xdg_popup as _ , listener as _ , data as _ ) ; } pub unsafe fn xdg_popup_add_rust_listener ( xdg_popup : * mut super :: xdg_popup :: xdg_popup , listener : & dyn xdg_popup_listener ) -> bool { let to = ( listener as * const dyn xdg_popup_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return xdg_popup_add_listener ( xdg_popup as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "remove xdg_popup interface\n\nThis destroys the popup. Explicitly destroying the xdg_popup\nobject will also dismiss the popup, and unmap the surface.\n\nIf this xdg_popup is not the \"topmost\" popup, a protocol error\nwill be sent." ] pub unsafe fn xdg_popup_destroy ( xdg_popup : * mut super :: xdg_popup :: xdg_popup ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , xdg_popup as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , xdg_popup as _ ) ; } } } pub mod outputmanagement { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "configuration of server outputs through clients\n\nThis interface enables clients to set properties of output devices for screen\nconfiguration purposes via the server. To this end output devices are referenced\nby global org_kde_kwin_outputdevice objects.\n\noutputmanagement (wl_global)\n--------------------------\nrequest:\n* create_configuration -> outputconfiguration (wl_resource)\n\noutputconfiguration (wl_resource)\n--------------------------\nrequests:\n* enable(outputdevice, bool)\n* mode(outputdevice, mode_id)\n* transformation(outputdevice, flag)\n* position(outputdevice, x, y)\n* apply\n\nevents:\n* applied\n* failed\n\nThe server registers one outputmanagement object as a global object. In order\nto configure outputs a client requests create_configuration, which provides a\nresource referencing an outputconfiguration for one-time configuration. That\nway the server knows which requests belong together and can group them by that.\n\nOn the outputconfiguration object the client calls for each output whether the\noutput should be enabled, which mode should be set (by referencing the mode from\nthe list of announced modes) and the output's global position. Once all outputs\nare configured that way, the client calls apply.\nAt that point and not earlier the server should try to apply the configuration.\nIf this succeeds the server emits the applied signal, otherwise the failed\nsignal, such that the configuring client is noticed about the success of its\nconfiguration request.\n\nThrough this design the interface enables atomic output configuration changes if\ninternally supported by the server." ] pub mod org_kde_kwin_outputmanagement { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_outputmanagement { } static mut org_kde_kwin_outputmanagement_requests_create_configuration_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_outputmanagement_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create_configuration\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputmanagement_requests_create_configuration_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_outputmanagement_interface : wl_interface = wl_interface { name : b"org_kde_kwin_outputmanagement\0" as * const u8 as * const c_char , version : 4 , request_count : 1 , requests : unsafe { & org_kde_kwin_outputmanagement_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_outputmanagement_listener { } pub unsafe fn org_kde_kwin_outputmanagement_set_user_data ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_outputmanagement as _ , user_data ) ; } pub unsafe fn org_kde_kwin_outputmanagement_get_user_data ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_outputmanagement as _ ) ; } pub unsafe fn org_kde_kwin_outputmanagement_get_version ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_outputmanagement as _ ) ; } pub unsafe fn org_kde_kwin_outputmanagement_add_listener ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_outputmanagement as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_outputmanagement_add_rust_listener ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement , listener : & dyn org_kde_kwin_outputmanagement_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_outputmanagement_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_outputmanagement_add_listener ( org_kde_kwin_outputmanagement as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn org_kde_kwin_outputmanagement_destroy ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_outputmanagement as _ ) ; } # [ doc = "provide outputconfiguration object for configuring outputs\n\nRequest an outputconfiguration object through which the client can configure\noutput devices." ] pub unsafe fn org_kde_kwin_outputmanagement_create_configuration ( org_kde_kwin_outputmanagement : * mut super :: org_kde_kwin_outputmanagement :: org_kde_kwin_outputmanagement ) -> * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , org_kde_kwin_outputmanagement as _ , 0u32 , & super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "configure single output devices\n\noutputconfiguration is a client-specific resource that can be used to ask\nthe server to apply changes to available output devices.\n\nThe client receives a list of output devices from the registry. When it wants\nto apply new settings, it creates a configuration object from the\noutputmanagement global, writes changes through this object's enable, scale,\ntransform and mode calls. It then asks the server to apply these settings in\nan atomic fashion, for example through Linux' DRM interface.\n\nThe server signals back whether the new settings have applied successfully\nor failed to apply. outputdevice objects are updated after the changes have been\napplied to the hardware and before the server side sends the applied event." ] pub mod org_kde_kwin_outputconfiguration { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum org_kde_kwin_outputconfiguration { } # [ doc = "describes vrr policy\n\nDescribes when the compositor may employ variable refresh rate" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum vrr_policy { never = 0 , always = 1 , automatic = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl vrr_policy { pub fn from_raw ( n : u32 ) -> Option < vrr_policy > { match n { 0 => Some ( vrr_policy :: never ) , 1 => Some ( vrr_policy :: always ) , 2 => Some ( vrr_policy :: automatic ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut org_kde_kwin_outputconfiguration_requests_enable_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_mode_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_transform_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_position_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_scale_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_scalef_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_colorcurves_types : [ * const wl_interface ; 4 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_overscan_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut org_kde_kwin_outputconfiguration_requests_set_vrr_policy_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_outputconfiguration_requests : [ wl_message ; 11 ] = [ wl_message { name : b"enable\0" as * const u8 as * const c_char , signature : b"oi\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_enable_types as * const _ } , } , wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"oi\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_mode_types as * const _ } , } , wl_message { name : b"transform\0" as * const u8 as * const c_char , signature : b"oi\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_transform_types as * const _ } , } , wl_message { name : b"position\0" as * const u8 as * const c_char , signature : b"oii\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_position_types as * const _ } , } , wl_message { name : b"scale\0" as * const u8 as * const c_char , signature : b"oi\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_scale_types as * const _ } , } , wl_message { name : b"apply\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"scalef\0" as * const u8 as * const c_char , signature : b"2of\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_scalef_types as * const _ } , } , wl_message { name : b"colorcurves\0" as * const u8 as * const c_char , signature : b"2oaaa\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_colorcurves_types as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"2\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"overscan\0" as * const u8 as * const c_char , signature : b"3ou\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_overscan_types as * const _ } , } , wl_message { name : b"set_vrr_policy\0" as * const u8 as * const c_char , signature : b"4ou\0" as * const u8 as * const c_char , types : unsafe { & org_kde_kwin_outputconfiguration_requests_set_vrr_policy_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut org_kde_kwin_outputconfiguration_events : [ wl_message ; 2 ] = [ wl_message { name : b"applied\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"failed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut org_kde_kwin_outputconfiguration_interface : wl_interface = wl_interface { name : b"org_kde_kwin_outputconfiguration\0" as * const u8 as * const c_char , version : 4 , request_count : 11 , requests : unsafe { & org_kde_kwin_outputconfiguration_requests as * const _ } , event_count : 2 , events : unsafe { & org_kde_kwin_outputconfiguration_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait org_kde_kwin_outputconfiguration_listener { # [ doc = "configuration changes have been applied\n\nSent after the server has successfully applied the changes.\n." ] fn applied ( & mut self , object : * mut org_kde_kwin_outputconfiguration , ) { } # [ doc = "configuration changes failed to apply\n\nSent if the server rejects the changes or failed to apply them." ] fn failed ( & mut self , object : * mut org_kde_kwin_outputconfiguration , ) { } } pub unsafe fn org_kde_kwin_outputconfiguration_set_user_data ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , org_kde_kwin_outputconfiguration as _ , user_data ) ; } pub unsafe fn org_kde_kwin_outputconfiguration_get_user_data ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , org_kde_kwin_outputconfiguration as _ ) ; } pub unsafe fn org_kde_kwin_outputconfiguration_get_version ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , org_kde_kwin_outputconfiguration as _ ) ; } pub unsafe fn org_kde_kwin_outputconfiguration_add_listener ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , org_kde_kwin_outputconfiguration as _ , listener as _ , data as _ ) ; } pub unsafe fn org_kde_kwin_outputconfiguration_add_rust_listener ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , listener : & dyn org_kde_kwin_outputconfiguration_listener ) -> bool { let to = ( listener as * const dyn org_kde_kwin_outputconfiguration_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return org_kde_kwin_outputconfiguration_add_listener ( org_kde_kwin_outputconfiguration as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "enable or disable an output\n\nMark the output as enabled or disabled." ] pub unsafe fn org_kde_kwin_outputconfiguration_enable ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , enable : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 0u32 , outputdevice , enable , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "switch outputdevice to mode\n\nSets the mode for a given output by its mode size (width and height) and refresh rate." ] pub unsafe fn org_kde_kwin_outputconfiguration_mode ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , mode_id : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 1u32 , outputdevice , mode_id , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "transform outputdevice\n\nSets the transformation for a given output." ] pub unsafe fn org_kde_kwin_outputconfiguration_transform ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , transform : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 2u32 , outputdevice , transform , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "position output in global space\n\nSets the position for this output device. (x,y) describe the top-left corner\nof the output in global space, whereby the origin (0,0) of the global space\nhas to be aligned with the top-left corner of the most left and in case this\ndoes not define a single one the top output.\n\nThere may be no gaps or overlaps between outputs, i.e. the outputs are\nstacked horizontally, vertically, or both on each other." ] pub unsafe fn org_kde_kwin_outputconfiguration_position ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 3u32 , outputdevice , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set scaling factor of this output\n\nSets the scaling factor for this output device." ] pub unsafe fn org_kde_kwin_outputconfiguration_scale ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , scale : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 4u32 , outputdevice , scale , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "apply configuration changes to all output devices\n\nAsks the server to apply property changes requested through this outputconfiguration\nobject to all outputs on the server side." ] pub unsafe fn org_kde_kwin_outputconfiguration_apply ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 5u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set scaling factor of this output\n\nSets the scaling factor for this output device.\nSending both scale and scalef is undefined." ] pub unsafe fn org_kde_kwin_outputconfiguration_scalef ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , scale : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 6u32 , outputdevice , scale , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set output color curves\n\nSet color curves of output devices through RGB color ramps. Allows color\ncorrection of output device from user space.\n\nThese are the raw values. A compositor might opt to adjust these values\ninternally, for example to shift color temperature at night." ] pub unsafe fn org_kde_kwin_outputconfiguration_colorcurves ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , red : * mut wl_array , green : * mut wl_array , blue : * mut wl_array ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 7u32 , outputdevice , red , green , blue , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the outputconfiguration object" ] pub unsafe fn org_kde_kwin_outputconfiguration_destroy ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 8u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , org_kde_kwin_outputconfiguration as _ ) ; } # [ doc = "set overscan value\n\nSet the overscan value of this output device with a value in percent." ] pub unsafe fn org_kde_kwin_outputconfiguration_overscan ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , overscan : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 9u32 , outputdevice , overscan , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the VRR policy\n\nSet what policy the compositor should employ regarding its use of\nvariable refresh rate." ] pub unsafe fn org_kde_kwin_outputconfiguration_set_vrr_policy ( org_kde_kwin_outputconfiguration : * mut super :: org_kde_kwin_outputconfiguration :: org_kde_kwin_outputconfiguration , outputdevice : * mut super :: org_kde_kwin_outputdevice :: org_kde_kwin_outputdevice , policy : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , org_kde_kwin_outputconfiguration as _ , 10u32 , outputdevice , policy , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod viewporter { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "surface cropping and scaling\n\nThe global interface exposing surface cropping and scaling\ncapabilities is used to instantiate an interface extension for a\nwl_surface object. This extended interface will then allow\ncropping and scaling the surface contents, effectively\ndisconnecting the direct relationship between the buffer and the\nsurface size." ] pub mod wp_viewporter { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_viewporter { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "the surface already has a viewport object associated" ] viewport_exists = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: viewport_exists ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut wp_viewporter_requests_get_viewport_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wp_viewport :: wp_viewport_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_viewporter_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_viewport\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & wp_viewporter_requests_get_viewport_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_viewporter_interface : wl_interface = wl_interface { name : b"wp_viewporter\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & wp_viewporter_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wp_viewporter_listener { } pub unsafe fn wp_viewporter_set_user_data ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_viewporter as _ , user_data ) ; } pub unsafe fn wp_viewporter_get_user_data ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_viewporter as _ ) ; } pub unsafe fn wp_viewporter_get_version ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_viewporter as _ ) ; } pub unsafe fn wp_viewporter_add_listener ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_viewporter as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_viewporter_add_rust_listener ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter , listener : & dyn wp_viewporter_listener ) -> bool { let to = ( listener as * const dyn wp_viewporter_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_viewporter_add_listener ( wp_viewporter as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "unbind from the cropping and scaling interface\n\nInforms the server that the client will not be using this\nprotocol object anymore. This does not affect any other objects,\nwp_viewport objects included." ] pub unsafe fn wp_viewporter_destroy ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_viewporter as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_viewporter as _ ) ; } # [ doc = "extend surface interface for crop and scale\n\nInstantiate an interface extension for the given wl_surface to\ncrop and scale its content. If the given wl_surface already has\na wp_viewport object associated, the viewport_exists\nprotocol error is raised." ] pub unsafe fn wp_viewporter_get_viewport ( wp_viewporter : * mut super :: wp_viewporter :: wp_viewporter , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: wp_viewport :: wp_viewport { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , wp_viewporter as _ , 1u32 , & super :: wp_viewport :: wp_viewport_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } # [ doc = "crop and scale interface to a wl_surface\n\nAn additional interface to a wl_surface object, which allows the\nclient to specify the cropping and scaling of the surface\ncontents.\n\nThis interface works with two concepts: the source rectangle (src_x,\nsrc_y, src_width, src_height), and the destination size (dst_width,\ndst_height). The contents of the source rectangle are scaled to the\ndestination size, and content outside the source rectangle is ignored.\nThis state is double-buffered, and is applied on the next\nwl_surface.commit.\n\nThe two parts of crop and scale state are independent: the source\nrectangle, and the destination size. Initially both are unset, that\nis, no scaling is applied. The whole of the current wl_buffer is\nused as the source, and the surface size is as defined in\nwl_surface.attach.\n\nIf the destination size is set, it causes the surface size to become\ndst_width, dst_height. The source (rectangle) is scaled to exactly\nthis size. This overrides whatever the attached wl_buffer size is,\nunless the wl_buffer is NULL. If the wl_buffer is NULL, the surface\nhas no content and therefore no size. Otherwise, the size is always\nat least 1x1 in surface local coordinates.\n\nIf the source rectangle is set, it defines what area of the wl_buffer is\ntaken as the source. If the source rectangle is set and the destination\nsize is not set, then src_width and src_height must be integers, and the\nsurface size becomes the source rectangle size. This results in cropping\nwithout scaling. If src_width or src_height are not integers and\ndestination size is not set, the bad_size protocol error is raised when\nthe surface state is applied.\n\nThe coordinate transformations from buffer pixel coordinates up to\nthe surface-local coordinates happen in the following order:\n1. buffer_transform (wl_surface.set_buffer_transform)\n2. buffer_scale (wl_surface.set_buffer_scale)\n3. crop and scale (wp_viewport.set*)\nThis means, that the source rectangle coordinates of crop and scale\nare given in the coordinates after the buffer transform and scale,\ni.e. in the coordinates that would be the surface-local coordinates\nif the crop and scale was not applied.\n\nIf src_x or src_y are negative, the bad_value protocol error is raised.\nOtherwise, if the source rectangle is partially or completely outside of\nthe non-NULL wl_buffer, then the out_of_buffer protocol error is raised\nwhen the surface state is applied. A NULL wl_buffer does not raise the\nout_of_buffer error.\n\nThe x, y arguments of wl_surface.attach are applied as normal to\nthe surface. They indicate how many pixels to remove from the\nsurface size from the left and the top. In other words, they are\nstill in the surface-local coordinate system, just like dst_width\nand dst_height are.\n\nIf the wl_surface associated with the wp_viewport is destroyed,\nall wp_viewport requests except 'destroy' raise the protocol error\nno_surface.\n\nIf the wp_viewport object is destroyed, the crop and scale\nstate is removed from the wl_surface. The change will be applied\non the next wl_surface.commit." ] pub mod wp_viewport { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum wp_viewport { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "negative or zero values in width or height" ] bad_value = 0 , # [ doc = "destination size is not integer" ] bad_size = 1 , # [ doc = "source rectangle extends outside of the content area" ] out_of_buffer = 2 , # [ doc = "the wl_surface was destroyed" ] no_surface = 3 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 0 => Some ( error :: bad_value ) , 1 => Some ( error :: bad_size ) , 2 => Some ( error :: out_of_buffer ) , 3 => Some ( error :: no_surface ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut wp_viewport_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_source\0" as * const u8 as * const c_char , signature : b"ffff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_destination\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut wp_viewport_interface : wl_interface = wl_interface { name : b"wp_viewport\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & wp_viewport_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait wp_viewport_listener { } pub unsafe fn wp_viewport_set_user_data ( wp_viewport : * mut super :: wp_viewport :: wp_viewport , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , wp_viewport as _ , user_data ) ; } pub unsafe fn wp_viewport_get_user_data ( wp_viewport : * mut super :: wp_viewport :: wp_viewport ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , wp_viewport as _ ) ; } pub unsafe fn wp_viewport_get_version ( wp_viewport : * mut super :: wp_viewport :: wp_viewport ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , wp_viewport as _ ) ; } pub unsafe fn wp_viewport_add_listener ( wp_viewport : * mut super :: wp_viewport :: wp_viewport , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , wp_viewport as _ , listener as _ , data as _ ) ; } pub unsafe fn wp_viewport_add_rust_listener ( wp_viewport : * mut super :: wp_viewport :: wp_viewport , listener : & dyn wp_viewport_listener ) -> bool { let to = ( listener as * const dyn wp_viewport_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return wp_viewport_add_listener ( wp_viewport as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "remove scaling and cropping from the surface\n\nThe associated wl_surface's crop and scale state is removed.\nThe change is applied on the next wl_surface.commit." ] pub unsafe fn wp_viewport_destroy ( wp_viewport : * mut super :: wp_viewport :: wp_viewport ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_viewport as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , wp_viewport as _ ) ; } # [ doc = "set the source rectangle for cropping\n\nSet the source rectangle of the associated wl_surface. See\nwp_viewport for the description, and relation to the wl_buffer\nsize.\n\nIf all of x, y, width and height are -1.0, the source rectangle is\nunset instead. Any other set of values where width or height are zero\nor negative, or x or y are negative, raise the bad_value protocol\nerror.\n\nThe crop and scale state is double-buffered state, and will be\napplied on the next wl_surface.commit." ] pub unsafe fn wp_viewport_set_source ( wp_viewport : * mut super :: wp_viewport :: wp_viewport , x : wl_fixed_t , y : wl_fixed_t , width : wl_fixed_t , height : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_viewport as _ , 1u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the surface size for scaling\n\nSet the destination size of the associated wl_surface. See\nwp_viewport for the description, and relation to the wl_buffer\nsize.\n\nIf width is -1 and height is -1, the destination size is unset\ninstead. Any other pair of values for width and height that\ncontains zero or negative values raises the bad_value protocol\nerror.\n\nThe crop and scale state is double-buffered state, and will be\napplied on the next wl_surface.commit." ] pub unsafe fn wp_viewport_set_destination ( wp_viewport : * mut super :: wp_viewport :: wp_viewport , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , wp_viewport as _ , 2u32 , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod text_input_unstable_v3 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "text input\n\nThe zwp_text_input_v3 interface represents text input and input methods\nassociated with a seat. It provides enter/leave events to follow the\ntext input focus for a seat.\n\nRequests are used to enable/disable the text-input object and set\nstate information like surrounding and selected text or the content type.\nThe information about the entered text is sent to the text-input object\nvia the preedit_string and commit_string events.\n\nText is valid UTF-8 encoded, indices and lengths are in bytes. Indices\nmust not point to middle bytes inside a code point: they must either\npoint to the first byte of a code point or to the end of the buffer.\nLengths must be measured between two valid indices.\n\nFocus moving throughout surfaces will result in the emission of\nzwp_text_input_v3.enter and zwp_text_input_v3.leave events. The focused\nsurface must commit zwp_text_input_v3.enable and\nzwp_text_input_v3.disable requests as the keyboard focus moves across\neditable and non-editable elements of the UI. Those two requests are not\nexpected to be paired with each other, the compositor must be able to\nhandle consecutive series of the same request.\n\nState is sent by the state requests (set_surrounding_text,\nset_content_type and set_cursor_rectangle) and a commit request. After an\nenter event or disable request all state information is invalidated and\nneeds to be resent by the client." ] pub mod zwp_text_input_v3 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_text_input_v3 { } # [ doc = "text change reason\n\nReason for the change of surrounding text or cursor posision." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum change_cause { # [ doc = "input method caused the change" ] input_method = 0 , # [ doc = "something else than the input method caused the change" ] other = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl change_cause { pub fn from_raw ( n : u32 ) -> Option < change_cause > { match n { 0 => Some ( change_cause :: input_method ) , 1 => Some ( change_cause :: other ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { # [ doc = "content hint\n\nContent hint is a bitmask to allow to modify the behavior of the text\ninput." ] pub struct content_hint : u32 { # [ doc = "no special behavior" ] const none = 0 ; # [ doc = "suggest word completions" ] const completion = 1 ; # [ doc = "suggest word corrections" ] const spellcheck = 2 ; # [ doc = "switch to uppercase letters at the start of a sentence" ] const auto_capitalization = 4 ; # [ doc = "prefer lowercase letters" ] const lowercase = 8 ; # [ doc = "prefer uppercase letters" ] const uppercase = 16 ; # [ doc = "prefer casing for titles and headings (can be language dependent)" ] const titlecase = 32 ; # [ doc = "characters should be hidden" ] const hidden_text = 64 ; # [ doc = "typed text should not be stored" ] const sensitive_data = 128 ; # [ doc = "just Latin characters should be entered" ] const latin = 256 ; # [ doc = "the text input is multiline" ] const multiline = 512 ; } } impl content_hint { pub fn from_raw ( n : u32 ) -> Option < content_hint > { Some ( content_hint :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = "content purpose\n\nThe content purpose allows to specify the primary purpose of a text\ninput.\n\nThis allows an input method to show special purpose input panels with\nextra characters or to disallow some characters." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum content_purpose { # [ doc = "default input, allowing all characters" ] normal = 0 , # [ doc = "allow only alphabetic characters" ] alpha = 1 , # [ doc = "allow only digits" ] digits = 2 , # [ doc = "input a number (including decimal separator and sign)" ] number = 3 , # [ doc = "input a phone number" ] phone = 4 , # [ doc = "input an URL" ] url = 5 , # [ doc = "input an email address" ] email = 6 , # [ doc = "input a name of a person" ] name = 7 , # [ doc = "input a password (combine with sensitive_data hint)" ] password = 8 , # [ doc = "input is a numeric password (combine with sensitive_data hint)" ] pin = 9 , # [ doc = "input a date" ] date = 10 , # [ doc = "input a time" ] time = 11 , # [ doc = "input a date and time" ] datetime = 12 , # [ doc = "input for a terminal" ] terminal = 13 , # [ doc ( hidden ) ] __nonexhaustive , } impl content_purpose { pub fn from_raw ( n : u32 ) -> Option < content_purpose > { match n { 0 => Some ( content_purpose :: normal ) , 1 => Some ( content_purpose :: alpha ) , 2 => Some ( content_purpose :: digits ) , 3 => Some ( content_purpose :: number ) , 4 => Some ( content_purpose :: phone ) , 5 => Some ( content_purpose :: url ) , 6 => Some ( content_purpose :: email ) , 7 => Some ( content_purpose :: name ) , 8 => Some ( content_purpose :: password ) , 9 => Some ( content_purpose :: pin ) , 10 => Some ( content_purpose :: date ) , 11 => Some ( content_purpose :: time ) , 12 => Some ( content_purpose :: datetime ) , 13 => Some ( content_purpose :: terminal ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_v3_requests : [ wl_message ; 8 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"enable\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"disable\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_surrounding_text\0" as * const u8 as * const c_char , signature : b"sii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_text_change_cause\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_content_type\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_cursor_rectangle\0" as * const u8 as * const c_char , signature : b"iiii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; static mut zwp_text_input_v3_events_enter_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; static mut zwp_text_input_v3_events_leave_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_v3_events : [ wl_message ; 6 ] = [ wl_message { name : b"enter\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v3_events_enter_types as * const _ } , } , wl_message { name : b"leave\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_v3_events_leave_types as * const _ } , } , wl_message { name : b"preedit_string\0" as * const u8 as * const c_char , signature : b"?sii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_string\0" as * const u8 as * const c_char , signature : b"?s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"delete_surrounding_text\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_text_input_v3_interface : wl_interface = wl_interface { name : b"zwp_text_input_v3\0" as * const u8 as * const c_char , version : 1 , request_count : 8 , requests : unsafe { & zwp_text_input_v3_requests as * const _ } , event_count : 6 , events : unsafe { & zwp_text_input_v3_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_text_input_v3_listener { # [ doc = "enter event\n\nNotification that this seat's text-input focus is on a certain surface.\n\nIf client has created multiple text input objects, compositor must send\nthis event to all of them.\n\nWhen the seat has the keyboard capability the text-input focus follows\nthe keyboard focus. This event sets the current surface for the\ntext-input object." ] fn enter ( & mut self , object : * mut zwp_text_input_v3 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "leave event\n\nNotification that this seat's text-input focus is no longer on a\ncertain surface. The client should reset any preedit string previously\nset.\n\nThe leave notification clears the current surface. It is sent before\nthe enter notification for the new focus. After leave event, compositor\nmust ignore requests from any text input instances until next enter\nevent.\n\nWhen the seat has the keyboard capability the text-input focus follows\nthe keyboard focus." ] fn leave ( & mut self , object : * mut zwp_text_input_v3 , surface : * mut super :: wl_surface :: wl_surface ) { } # [ doc = "pre-edit\n\nNotify when a new composing text (pre-edit) should be set at the\ncurrent cursor position. Any previously set composing text must be\nremoved. Any previously existing selected text must be removed.\n\nThe argument text contains the pre-edit string buffer.\n\nThe parameters cursor_begin and cursor_end are counted in bytes\nrelative to the beginning of the submitted text buffer. Cursor should\nbe hidden when both are equal to -1.\n\nThey could be represented by the client as a line if both values are\nthe same, or as a text highlight otherwise.\n\nValues set with this event are double-buffered. They must be applied\nand reset to initial on the next zwp_text_input_v3.done event.\n\nThe initial value of text is an empty string, and cursor_begin,\ncursor_end and cursor_hidden are all 0." ] fn preedit_string ( & mut self , object : * mut zwp_text_input_v3 , text : Option < * mut c_char > , cursor_begin : i32 , cursor_end : i32 ) { } # [ doc = "text commit\n\nNotify when text should be inserted into the editor widget. The text to\ncommit could be either just a single character after a key press or the\nresult of some composing (pre-edit).\n\nValues set with this event are double-buffered. They must be applied\nand reset to initial on the next zwp_text_input_v3.done event.\n\nThe initial value of text is an empty string." ] fn commit_string ( & mut self , object : * mut zwp_text_input_v3 , text : Option < * mut c_char > ) { } # [ doc = "delete surrounding text\n\nNotify when the text around the current cursor position should be\ndeleted.\n\nBefore_length and after_length are the number of bytes before and after\nthe current cursor index (excluding the selection) to delete.\n\nIf a preedit text is present, in effect before_length is counted from\nthe beginning of it, and after_length from its end (see done event\nsequence).\n\nValues set with this event are double-buffered. They must be applied\nand reset to initial on the next zwp_text_input_v3.done event.\n\nThe initial values of both before_length and after_length are 0." ] fn delete_surrounding_text ( & mut self , object : * mut zwp_text_input_v3 , before_length : u32 , after_length : u32 ) { } # [ doc = "apply changes\n\nInstruct the application to apply changes to state requested by the\npreedit_string, commit_string and delete_surrounding_text events. The\nstate relating to these events is double-buffered, and each one\nmodifies the pending state. This event replaces the current state with\nthe pending state.\n\nThe application must proceed by evaluating the changes in the following\norder:\n\n1. Replace existing preedit string with the cursor.\n2. Delete requested surrounding text.\n3. Insert commit string with the cursor at its end.\n4. Calculate surrounding text to send.\n5. Insert new preedit text in cursor position.\n6. Place cursor inside preedit text.\n\nThe serial number reflects the last state of the zwp_text_input_v3\nobject known to the compositor. The value of the serial argument must\nbe equal to the number of commit requests already issued on that object.\nWhen the client receives a done event with a serial different than the\nnumber of past commit requests, it must proceed as normal, except it\nshould not change the current state of the zwp_text_input_v3 object." ] fn done ( & mut self , object : * mut zwp_text_input_v3 , serial : u32 ) { } } pub unsafe fn zwp_text_input_v3_set_user_data ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_text_input_v3 as _ , user_data ) ; } pub unsafe fn zwp_text_input_v3_get_user_data ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_text_input_v3 as _ ) ; } pub unsafe fn zwp_text_input_v3_get_version ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_text_input_v3 as _ ) ; } pub unsafe fn zwp_text_input_v3_add_listener ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_text_input_v3 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_text_input_v3_add_rust_listener ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , listener : & dyn zwp_text_input_v3_listener ) -> bool { let to = ( listener as * const dyn zwp_text_input_v3_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_text_input_v3_add_listener ( zwp_text_input_v3 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "Destroy the wp_text_input\n\nDestroy the wp_text_input object. Also disables all surfaces enabled\nthrough this wp_text_input object." ] pub unsafe fn zwp_text_input_v3_destroy ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_text_input_v3 as _ ) ; } # [ doc = "Request text input to be enabled\n\nRequests text input on the surface previously obtained from the enter\nevent.\n\nThis request must be issued every time the active text input changes\nto a new one, including within the current surface. Use\nzwp_text_input_v3.disable when there is no longer any input focus on\nthe current surface.\n\nClients must not enable more than one text input on the single seat\nand should disable the current text input before enabling the new one.\nAt most one instance of text input may be in enabled state per instance,\nRequests to enable the another text input when some text input is active\nmust be ignored by compositor.\n\nThis request resets all state associated with previous enable, disable,\nset_surrounding_text, set_text_change_cause, set_content_type, and\nset_cursor_rectangle requests, as well as the state associated with\npreedit_string, commit_string, and delete_surrounding_text events.\n\nThe set_surrounding_text, set_content_type and set_cursor_rectangle\nrequests must follow if the text input supports the necessary\nfunctionality.\n\nState set with this request is double-buffered. It will get applied on\nthe next zwp_text_input_v3.commit request, and stay valid until the\nnext committed enable or disable request.\n\nThe changes must be applied by the compositor after issuing a\nzwp_text_input_v3.commit request." ] pub unsafe fn zwp_text_input_v3_enable ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "Disable text input on a surface\n\nExplicitly disable text input on the current surface (typically when\nthere is no focus on any text entry inside the surface).\n\nState set with this request is double-buffered. It will get applied on\nthe next zwp_text_input_v3.commit request." ] pub unsafe fn zwp_text_input_v3_disable ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 2u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "sets the surrounding text\n\nSets the surrounding plain text around the input, excluding the preedit\ntext.\n\nThe client should notify the compositor of any changes in any of the\nvalues carried with this request, including changes caused by handling\nincoming text-input events as well as changes caused by other\nmechanisms like keyboard typing.\n\nIf the client is unaware of the text around the cursor, it should not\nissue this request, to signify lack of support to the compositor.\n\nText is UTF-8 encoded, and should include the cursor position, the\ncomplete selection and additional characters before and after them.\nThere is a maximum length of wayland messages, so text can not be\nlonger than 4000 bytes.\n\nCursor is the byte offset of the cursor within text buffer.\n\nAnchor is the byte offset of the selection anchor within text buffer.\nIf there is no selected text, anchor is the same as cursor.\n\nIf any preedit text is present, it is replaced with a cursor for the\npurpose of this event.\n\nValues set with this request are double-buffered. They will get applied\non the next zwp_text_input_v3.commit request, and stay valid until the\nnext committed enable or disable request.\n\nThe initial state for affected fields is empty, meaning that the text\ninput does not support sending surrounding text. If the empty values\nget applied, subsequent attempts to change them may have no effect." ] pub unsafe fn zwp_text_input_v3_set_surrounding_text ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , text : * const c_char , cursor : i32 , anchor : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 3u32 , text , cursor , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "indicates the cause of surrounding text change\n\nTells the compositor why the text surrounding the cursor changed.\n\nWhenever the client detects an external change in text, cursor, or\nanchor posision, it must issue this request to the compositor. This\nrequest is intended to give the input method a chance to update the\npreedit text in an appropriate way, e.g. by removing it when the user\nstarts typing with a keyboard.\n\ncause describes the source of the change.\n\nThe value set with this request is double-buffered. It must be applied\nand reset to initial at the next zwp_text_input_v3.commit request.\n\nThe initial value of cause is input_method." ] pub unsafe fn zwp_text_input_v3_set_text_change_cause ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , cause : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 4u32 , cause , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set content purpose and hint\n\nSets the content purpose and content hint. While the purpose is the\nbasic purpose of an input field, the hint flags allow to modify some of\nthe behavior.\n\nValues set with this request are double-buffered. They will get applied\non the next zwp_text_input_v3.commit request.\nSubsequent attempts to update them may have no effect. The values\nremain valid until the next committed enable or disable request.\n\nThe initial value for hint is none, and the initial value for purpose\nis normal." ] pub unsafe fn zwp_text_input_v3_set_content_type ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , hint : u32 , purpose : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 5u32 , hint , purpose , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set cursor position\n\nMarks an area around the cursor as a x, y, width, height rectangle in\nsurface local coordinates.\n\nAllows the compositor to put a window with word suggestions near the\ncursor, without obstructing the text being input.\n\nIf the client is unaware of the position of edited text, it should not\nissue this request, to signify lack of support to the compositor.\n\nValues set with this request are double-buffered. They will get applied\non the next zwp_text_input_v3.commit request, and stay valid until the\nnext committed enable or disable request.\n\nThe initial values describing a cursor rectangle are empty. That means\nthe text input does not support describing the cursor area. If the\nempty values get applied, subsequent attempts to change them may have\nno effect." ] pub unsafe fn zwp_text_input_v3_set_cursor_rectangle ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 , x : i32 , y : i32 , width : i32 , height : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 6u32 , x , y , width , height , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "commit state\n\nAtomically applies state changes recently sent to the compositor.\n\nThe commit request establishes and updates the state of the client, and\nmust be issued after any changes to apply them.\n\nText input state (enabled status, content purpose, content hint,\nsurrounding text and change cause, cursor rectangle) is conceptually\ndouble-buffered within the context of a text input, i.e. between a\ncommitted enable request and the following committed enable or disable\nrequest.\n\nProtocol requests modify the pending state, as opposed to the current\nstate in use by the input method. A commit request atomically applies\nall pending state, replacing the current state. After commit, the new\npending state is as documented for each related request.\n\nRequests are applied in the order of arrival.\n\nNeither current nor pending state are modified unless noted otherwise.\n\nThe compositor must count the number of commit requests coming from\neach zwp_text_input_v3 object and use the count as the serial in done\nevents." ] pub unsafe fn zwp_text_input_v3_commit ( zwp_text_input_v3 : * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_v3 as _ , 7u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "text input manager\n\nA factory for text-input objects. This object is a global singleton." ] pub mod zwp_text_input_manager_v3 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_text_input_manager_v3 { } static mut zwp_text_input_manager_v3_requests_get_text_input_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_text_input_v3 :: zwp_text_input_v3_interface as * const wl_interface } , unsafe { & super :: wl_seat :: wl_seat_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_text_input_manager_v3_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"get_text_input\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_text_input_manager_v3_requests_get_text_input_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_text_input_manager_v3_interface : wl_interface = wl_interface { name : b"zwp_text_input_manager_v3\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_text_input_manager_v3_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_text_input_manager_v3_listener { } pub unsafe fn zwp_text_input_manager_v3_set_user_data ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_text_input_manager_v3 as _ , user_data ) ; } pub unsafe fn zwp_text_input_manager_v3_get_user_data ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_text_input_manager_v3 as _ ) ; } pub unsafe fn zwp_text_input_manager_v3_get_version ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_text_input_manager_v3 as _ ) ; } pub unsafe fn zwp_text_input_manager_v3_add_listener ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_text_input_manager_v3 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_text_input_manager_v3_add_rust_listener ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 , listener : & dyn zwp_text_input_manager_v3_listener ) -> bool { let to = ( listener as * const dyn zwp_text_input_manager_v3_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_text_input_manager_v3_add_listener ( zwp_text_input_manager_v3 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "Destroy the wp_text_input_manager\n\nDestroy the wp_text_input_manager object." ] pub unsafe fn zwp_text_input_manager_v3_destroy ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_text_input_manager_v3 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_text_input_manager_v3 as _ ) ; } # [ doc = "create a new text input object\n\nCreates a new text-input object for a given seat." ] pub unsafe fn zwp_text_input_manager_v3_get_text_input ( zwp_text_input_manager_v3 : * mut super :: zwp_text_input_manager_v3 :: zwp_text_input_manager_v3 , seat : * mut super :: wl_seat :: wl_seat ) -> * mut super :: zwp_text_input_v3 :: zwp_text_input_v3 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_text_input_manager_v3 as _ , 1u32 , & super :: zwp_text_input_v3 :: zwp_text_input_v3_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , seat ) ; return r as _ ; } } } pub mod pointer_constraints_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "constrain the movement of a pointer\n\nThe global interface exposing pointer constraining functionality. It\nexposes two requests: lock_pointer for locking the pointer to its\nposition, and confine_pointer for locking the pointer to a region.\n\nThe lock_pointer and confine_pointer requests create the objects\nwp_locked_pointer and wp_confined_pointer respectively, and the client can\nuse these objects to interact with the lock.\n\nFor any surface, only one lock or confinement may be active across all\nwl_pointer objects of the same seat. If a lock or confinement is requested\nwhen another lock or confinement is active or requested on the same surface\nand with any of the wl_pointer objects of the same seat, an\n'already_constrained' error will be raised." ] pub mod zwp_pointer_constraints_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_pointer_constraints_v1 { } # [ doc = "wp_pointer_constraints error values\n\nThese errors can be emitted in response to wp_pointer_constraints\nrequests." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum error { # [ doc = "pointer constraint already requested on that surface" ] already_constrained = 1 , # [ doc ( hidden ) ] __nonexhaustive , } impl error { pub fn from_raw ( n : u32 ) -> Option < error > { match n { 1 => Some ( error :: already_constrained ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "constraint lifetime\n\nThese values represent different lifetime semantics. They are passed\nas arguments to the factory requests to specify how the constraint\nlifetimes should be managed." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum lifetime { # [ doc = "the pointer constraint is defunct once deactivated\n\nA oneshot pointer constraint will never reactivate once it has been\ndeactivated. See the corresponding deactivation event\n(wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for\ndetails." ] oneshot = 1 , # [ doc = "the pointer constraint may reactivate\n\nA persistent pointer constraint may again reactivate once it has\nbeen deactivated. See the corresponding deactivation event\n(wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for\ndetails." ] persistent = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl lifetime { pub fn from_raw ( n : u32 ) -> Option < lifetime > { match n { 1 => Some ( lifetime :: oneshot ) , 2 => Some ( lifetime :: persistent ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_pointer_constraints_v1_requests_lock_pointer_types : [ * const wl_interface ; 5 ] = [ unsafe { & super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut zwp_pointer_constraints_v1_requests_confine_pointer_types : [ * const wl_interface ; 5 ] = [ unsafe { & super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , unsafe { & super :: wl_pointer :: wl_pointer_interface as * const wl_interface } , unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_pointer_constraints_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"lock_pointer\0" as * const u8 as * const c_char , signature : b"noo?ou\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_constraints_v1_requests_lock_pointer_types as * const _ } , } , wl_message { name : b"confine_pointer\0" as * const u8 as * const c_char , signature : b"noo?ou\0" as * const u8 as * const c_char , types : unsafe { & zwp_pointer_constraints_v1_requests_confine_pointer_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_pointer_constraints_v1_interface : wl_interface = wl_interface { name : b"zwp_pointer_constraints_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & zwp_pointer_constraints_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_pointer_constraints_v1_listener { } pub unsafe fn zwp_pointer_constraints_v1_set_user_data ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_pointer_constraints_v1 as _ , user_data ) ; } pub unsafe fn zwp_pointer_constraints_v1_get_user_data ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_pointer_constraints_v1 as _ ) ; } pub unsafe fn zwp_pointer_constraints_v1_get_version ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_pointer_constraints_v1 as _ ) ; } pub unsafe fn zwp_pointer_constraints_v1_add_listener ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_pointer_constraints_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_pointer_constraints_v1_add_rust_listener ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 , listener : & dyn zwp_pointer_constraints_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_pointer_constraints_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_pointer_constraints_v1_add_listener ( zwp_pointer_constraints_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the pointer constraints manager object\n\nUsed by the client to notify the server that it will no longer use this\npointer constraints object." ] pub unsafe fn zwp_pointer_constraints_v1_destroy ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_pointer_constraints_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_pointer_constraints_v1 as _ ) ; } # [ doc = "lock pointer to a position\n\nThe lock_pointer request lets the client request to disable movements of\nthe virtual pointer (i.e. the cursor), effectively locking the pointer\nto a position. This request may not take effect immediately; in the\nfuture, when the compositor deems implementation-specific constraints\nare satisfied, the pointer lock will be activated and the compositor\nsends a locked event.\n\nThe protocol provides no guarantee that the constraints are ever\nsatisfied, and does not require the compositor to send an error if the\nconstraints cannot ever be satisfied. It is thus possible to request a\nlock that will never activate.\n\nThere may not be another pointer constraint of any kind requested or\nactive on the surface for any of the wl_pointer objects of the seat of\nthe passed pointer when requesting a lock. If there is, an error will be\nraised. See general pointer lock documentation for more details.\n\nThe intersection of the region passed with this request and the input\nregion of the surface is used to determine where the pointer must be\nin order for the lock to activate. It is up to the compositor whether to\nwarp the pointer or require some kind of user interaction for the lock\nto activate. If the region is null the surface input region is used.\n\nA surface may receive pointer focus without the lock being activated.\n\nThe request creates a new object wp_locked_pointer which is used to\ninteract with the lock as well as receive updates about its state. See\nthe the description of wp_locked_pointer for further information.\n\nNote that while a pointer is locked, the wl_pointer objects of the\ncorresponding seat will not emit any wl_pointer.motion events, but\nrelative motion events will still be emitted via wp_relative_pointer\nobjects of the same seat. wl_pointer.axis and wl_pointer.button events\nare unaffected." ] pub unsafe fn zwp_pointer_constraints_v1_lock_pointer ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 , surface : * mut super :: wl_surface :: wl_surface , pointer : * mut super :: wl_pointer :: wl_pointer , region : * mut super :: wl_region :: wl_region , lifetime : u32 ) -> * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_pointer_constraints_v1 as _ , 1u32 , & super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface , pointer , region , lifetime ) ; return r as _ ; } # [ doc = "confine pointer to a region\n\nThe confine_pointer request lets the client request to confine the\npointer cursor to a given region. This request may not take effect\nimmediately; in the future, when the compositor deems implementation-\nspecific constraints are satisfied, the pointer confinement will be\nactivated and the compositor sends a confined event.\n\nThe intersection of the region passed with this request and the input\nregion of the surface is used to determine where the pointer must be\nin order for the confinement to activate. It is up to the compositor\nwhether to warp the pointer or require some kind of user interaction for\nthe confinement to activate. If the region is null the surface input\nregion is used.\n\nThe request will create a new object wp_confined_pointer which is used\nto interact with the confinement as well as receive updates about its\nstate. See the the description of wp_confined_pointer for further\ninformation." ] pub unsafe fn zwp_pointer_constraints_v1_confine_pointer ( zwp_pointer_constraints_v1 : * mut super :: zwp_pointer_constraints_v1 :: zwp_pointer_constraints_v1 , surface : * mut super :: wl_surface :: wl_surface , pointer : * mut super :: wl_pointer :: wl_pointer , region : * mut super :: wl_region :: wl_region , lifetime : u32 ) -> * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_pointer_constraints_v1 as _ , 2u32 , & super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface , pointer , region , lifetime ) ; return r as _ ; } } # [ doc = "receive relative pointer motion events\n\nThe wp_locked_pointer interface represents a locked pointer state.\n\nWhile the lock of this object is active, the wl_pointer objects of the\nassociated seat will not emit any wl_pointer.motion events.\n\nThis object will send the event 'locked' when the lock is activated.\nWhenever the lock is activated, it is guaranteed that the locked surface\nwill already have received pointer focus and that the pointer will be\nwithin the region passed to the request creating this object.\n\nTo unlock the pointer, send the destroy request. This will also destroy\nthe wp_locked_pointer object.\n\nIf the compositor decides to unlock the pointer the unlocked event is\nsent. See wp_locked_pointer.unlock for details.\n\nWhen unlocking, the compositor may warp the cursor position to the set\ncursor position hint. If it does, it will not result in any relative\nmotion events emitted via wp_relative_pointer.\n\nIf the surface the lock was requested on is destroyed and the lock is not\nyet activated, the wp_locked_pointer object is now defunct and must be\ndestroyed." ] pub mod zwp_locked_pointer_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_locked_pointer_v1 { } static mut zwp_locked_pointer_v1_requests_set_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_locked_pointer_v1_requests : [ wl_message ; 3 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_cursor_position_hint\0" as * const u8 as * const c_char , signature : b"ff\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_region\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & zwp_locked_pointer_v1_requests_set_region_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_locked_pointer_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"locked\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unlocked\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_locked_pointer_v1_interface : wl_interface = wl_interface { name : b"zwp_locked_pointer_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 3 , requests : unsafe { & zwp_locked_pointer_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_locked_pointer_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_locked_pointer_v1_listener { # [ doc = "lock activation event\n\nNotification that the pointer lock of the seat's pointer is activated." ] fn locked ( & mut self , object : * mut zwp_locked_pointer_v1 , ) { } # [ doc = "lock deactivation event\n\nNotification that the pointer lock of the seat's pointer is no longer\nactive. If this is a oneshot pointer lock (see\nwp_pointer_constraints.lifetime) this object is now defunct and should\nbe destroyed. If this is a persistent pointer lock (see\nwp_pointer_constraints.lifetime) this pointer lock may again\nreactivate in the future." ] fn unlocked ( & mut self , object : * mut zwp_locked_pointer_v1 , ) { } } pub unsafe fn zwp_locked_pointer_v1_set_user_data ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_locked_pointer_v1 as _ , user_data ) ; } pub unsafe fn zwp_locked_pointer_v1_get_user_data ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_locked_pointer_v1 as _ ) ; } pub unsafe fn zwp_locked_pointer_v1_get_version ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_locked_pointer_v1 as _ ) ; } pub unsafe fn zwp_locked_pointer_v1_add_listener ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_locked_pointer_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_locked_pointer_v1_add_rust_listener ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 , listener : & dyn zwp_locked_pointer_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_locked_pointer_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_locked_pointer_v1_add_listener ( zwp_locked_pointer_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the locked pointer object\n\nDestroy the locked pointer object. If applicable, the compositor will\nunlock the pointer." ] pub unsafe fn zwp_locked_pointer_v1_destroy ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_locked_pointer_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_locked_pointer_v1 as _ ) ; } # [ doc = "set the pointer cursor position hint\n\nSet the cursor position hint relative to the top left corner of the\nsurface.\n\nIf the client is drawing its own cursor, it should update the position\nhint to the position of its own cursor. A compositor may use this\ninformation to warp the pointer upon unlock in order to avoid pointer\njumps.\n\nThe cursor position hint is double buffered. The new hint will only take\neffect when the associated surface gets it pending state applied. See\nwl_surface.commit for details." ] pub unsafe fn zwp_locked_pointer_v1_set_cursor_position_hint ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 , surface_x : wl_fixed_t , surface_y : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_locked_pointer_v1 as _ , 1u32 , surface_x , surface_y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set a new lock region\n\nSet a new region used to lock the pointer.\n\nThe new lock region is double-buffered. The new lock region will\nonly take effect when the associated surface gets its pending state\napplied. See wl_surface.commit for details.\n\nFor details about the lock region, see wp_locked_pointer." ] pub unsafe fn zwp_locked_pointer_v1_set_region ( zwp_locked_pointer_v1 : * mut super :: zwp_locked_pointer_v1 :: zwp_locked_pointer_v1 , region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_locked_pointer_v1 as _ , 2u32 , region , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "confined pointer object\n\nThe wp_confined_pointer interface represents a confined pointer state.\n\nThis object will send the event 'confined' when the confinement is\nactivated. Whenever the confinement is activated, it is guaranteed that\nthe surface the pointer is confined to will already have received pointer\nfocus and that the pointer will be within the region passed to the request\ncreating this object. It is up to the compositor to decide whether this\nrequires some user interaction and if the pointer will warp to within the\npassed region if outside.\n\nTo unconfine the pointer, send the destroy request. This will also destroy\nthe wp_confined_pointer object.\n\nIf the compositor decides to unconfine the pointer the unconfined event is\nsent. The wp_confined_pointer object is at this point defunct and should\nbe destroyed." ] pub mod zwp_confined_pointer_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_confined_pointer_v1 { } static mut zwp_confined_pointer_v1_requests_set_region_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_region :: wl_region_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_confined_pointer_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"set_region\0" as * const u8 as * const c_char , signature : b"?o\0" as * const u8 as * const c_char , types : unsafe { & zwp_confined_pointer_v1_requests_set_region_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_confined_pointer_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"confined\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"unconfined\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_confined_pointer_v1_interface : wl_interface = wl_interface { name : b"zwp_confined_pointer_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_confined_pointer_v1_requests as * const _ } , event_count : 2 , events : unsafe { & zwp_confined_pointer_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_confined_pointer_v1_listener { # [ doc = "pointer confined\n\nNotification that the pointer confinement of the seat's pointer is\nactivated." ] fn confined ( & mut self , object : * mut zwp_confined_pointer_v1 , ) { } # [ doc = "pointer unconfined\n\nNotification that the pointer confinement of the seat's pointer is no\nlonger active. If this is a oneshot pointer confinement (see\nwp_pointer_constraints.lifetime) this object is now defunct and should\nbe destroyed. If this is a persistent pointer confinement (see\nwp_pointer_constraints.lifetime) this pointer confinement may again\nreactivate in the future." ] fn unconfined ( & mut self , object : * mut zwp_confined_pointer_v1 , ) { } } pub unsafe fn zwp_confined_pointer_v1_set_user_data ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_confined_pointer_v1 as _ , user_data ) ; } pub unsafe fn zwp_confined_pointer_v1_get_user_data ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_confined_pointer_v1 as _ ) ; } pub unsafe fn zwp_confined_pointer_v1_get_version ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_confined_pointer_v1 as _ ) ; } pub unsafe fn zwp_confined_pointer_v1_add_listener ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_confined_pointer_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_confined_pointer_v1_add_rust_listener ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 , listener : & dyn zwp_confined_pointer_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_confined_pointer_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_confined_pointer_v1_add_listener ( zwp_confined_pointer_v1 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "destroy the confined pointer object\n\nDestroy the confined pointer object. If applicable, the compositor will\nunconfine the pointer." ] pub unsafe fn zwp_confined_pointer_v1_destroy ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_confined_pointer_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_confined_pointer_v1 as _ ) ; } # [ doc = "set a new confine region\n\nSet a new region used to confine the pointer.\n\nThe new confine region is double-buffered. The new confine region will\nonly take effect when the associated surface gets its pending state\napplied. See wl_surface.commit for details.\n\nIf the confinement is active when the new confinement region is applied\nand the pointer ends up outside of newly applied region, the pointer may\nwarped to a position within the new confinement region. If warped, a\nwl_pointer.motion event will be emitted, but no\nwp_relative_pointer.relative_motion event.\n\nThe compositor may also, instead of using the new region, unconfine the\npointer.\n\nFor details about the confine region, see wp_confined_pointer." ] pub unsafe fn zwp_confined_pointer_v1_set_region ( zwp_confined_pointer_v1 : * mut super :: zwp_confined_pointer_v1 :: zwp_confined_pointer_v1 , region : * mut super :: wl_region :: wl_region ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_confined_pointer_v1 as _ , 1u32 , region , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod input_method_unstable_v1 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "input method context\n\nCorresponds to a text input on the input method side. An input method context\nis created on text input activation on the input method side. It allows\nreceiving information about the text input from the application via events.\nInput method contexts do not keep state after deactivation and should be\ndestroyed after deactivation is handled.\n\nText is generally UTF-8 encoded, indices and lengths are in bytes.\n\nSerials are used to synchronize the state between the text input and\nan input method. New serials are sent by the text input in the\ncommit_state request and are used by the input method to indicate\nthe known text input state in events like preedit_string, commit_string,\nand keysym. The text input can then ignore events from the input method\nwhich are based on an outdated state (for example after a reset).\n\nWarning! The protocol described in this file is experimental and\nbackward incompatible changes may be made. Backward compatible changes\nmay be added together with the corresponding interface version bump.\nBackward incompatible changes are done by bumping the version number in\nthe protocol and interface names and resetting the interface version.\nOnce the protocol is to be declared stable, the 'z' prefix and the\nversion number in the protocol and interface names are removed and the\ninterface version number is reset." ] pub mod zwp_input_method_context_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_input_method_context_v1 { } static mut zwp_input_method_context_v1_requests_grab_keyboard_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: wl_keyboard :: wl_keyboard_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_method_context_v1_requests : [ wl_message ; 14 ] = [ wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_string\0" as * const u8 as * const c_char , signature : b"us\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_string\0" as * const u8 as * const c_char , signature : b"uss\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_styling\0" as * const u8 as * const c_char , signature : b"uuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preedit_cursor\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"delete_surrounding_text\0" as * const u8 as * const c_char , signature : b"iu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"cursor_position\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifiers_map\0" as * const u8 as * const c_char , signature : b"a\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"keysym\0" as * const u8 as * const c_char , signature : b"uuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"grab_keyboard\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_method_context_v1_requests_grab_keyboard_types as * const _ } , } , wl_message { name : b"key\0" as * const u8 as * const c_char , signature : b"uuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"modifiers\0" as * const u8 as * const c_char , signature : b"uuuuu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"language\0" as * const u8 as * const c_char , signature : b"us\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"text_direction\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_method_context_v1_events : [ wl_message ; 6 ] = [ wl_message { name : b"surrounding_text\0" as * const u8 as * const c_char , signature : b"suu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"reset\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"content_type\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"invoke_action\0" as * const u8 as * const c_char , signature : b"uu\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"commit_state\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preferred_language\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_input_method_context_v1_interface : wl_interface = wl_interface { name : b"zwp_input_method_context_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 14 , requests : unsafe { & zwp_input_method_context_v1_requests as * const _ } , event_count : 6 , events : unsafe { & zwp_input_method_context_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_input_method_context_v1_listener { # [ doc = "surrounding text event\n\nThe plain surrounding text around the input position. Cursor is the\nposition in bytes within the surrounding text relative to the beginning\nof the text. Anchor is the position in bytes of the selection anchor\nwithin the surrounding text relative to the beginning of the text. If\nthere is no selected text then anchor is the same as cursor." ] fn surrounding_text ( & mut self , object : * mut zwp_input_method_context_v1 , text : * mut c_char , cursor : u32 , anchor : u32 ) { } # [ doc = "" ] fn reset ( & mut self , object : * mut zwp_input_method_context_v1 , ) { } # [ doc = "" ] fn content_type ( & mut self , object : * mut zwp_input_method_context_v1 , hint : u32 , purpose : u32 ) { } # [ doc = "" ] fn invoke_action ( & mut self , object : * mut zwp_input_method_context_v1 , button : u32 , index : u32 ) { } # [ doc = "" ] fn commit_state ( & mut self , object : * mut zwp_input_method_context_v1 , serial : u32 ) { } # [ doc = "" ] fn preferred_language ( & mut self , object : * mut zwp_input_method_context_v1 , language : * mut c_char ) { } } pub unsafe fn zwp_input_method_context_v1_set_user_data ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_input_method_context_v1 as _ , user_data ) ; } pub unsafe fn zwp_input_method_context_v1_get_user_data ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_input_method_context_v1 as _ ) ; } pub unsafe fn zwp_input_method_context_v1_get_version ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_input_method_context_v1 as _ ) ; } pub unsafe fn zwp_input_method_context_v1_add_listener ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_input_method_context_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_input_method_context_v1_add_rust_listener ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , listener : & dyn zwp_input_method_context_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_input_method_context_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_input_method_context_v1_add_listener ( zwp_input_method_context_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_input_method_context_v1_destroy ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 0u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_input_method_context_v1 as _ ) ; } # [ doc = "commit string\n\nSend the commit string text for insertion to the application.\n\nThe text to commit could be either just a single character after a key\npress or the result of some composing (pre-edit). It could be also an\nempty text when some text should be removed (see\ndelete_surrounding_text) or when the input cursor should be moved (see\ncursor_position).\n\nAny previously set composing text will be removed." ] pub unsafe fn zwp_input_method_context_v1_commit_string ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , text : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 1u32 , serial , text , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "pre-edit string\n\nSend the pre-edit string text to the application text input.\n\nThe commit text can be used to replace the pre-edit text on reset (for\nexample on unfocus).\n\nPreviously sent preedit_style and preedit_cursor requests are also\nprocessed by the text_input." ] pub unsafe fn zwp_input_method_context_v1_preedit_string ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , text : * const c_char , commit : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 2u32 , serial , text , commit , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "pre-edit styling\n\nSet the styling information on composing text. The style is applied for\nlength in bytes from index relative to the beginning of\nthe composing text (as byte offset). Multiple styles can\nbe applied to a composing text.\n\nThis request should be sent before sending a preedit_string request." ] pub unsafe fn zwp_input_method_context_v1_preedit_styling ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , index : u32 , length : u32 , style : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 3u32 , index , length , style , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "pre-edit cursor\n\nSet the cursor position inside the composing text (as byte offset)\nrelative to the start of the composing text.\n\nWhen index is negative no cursor should be displayed.\n\nThis request should be sent before sending a preedit_string request." ] pub unsafe fn zwp_input_method_context_v1_preedit_cursor ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , index : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 4u32 , index , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "delete text\n\nRemove the surrounding text.\n\nThis request will be handled on the text_input side directly following\na commit_string request." ] pub unsafe fn zwp_input_method_context_v1_delete_surrounding_text ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , index : i32 , length : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 5u32 , index , length , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set cursor to a new position\n\nSet the cursor and anchor to a new position. Index is the new cursor\nposition in bytes (when >= 0 this is relative to the end of the inserted text,\notherwise it is relative to the beginning of the inserted text). Anchor is\nthe new anchor position in bytes (when >= 0 this is relative to the end of the\ninserted text, otherwise it is relative to the beginning of the inserted\ntext). When there should be no selected text, anchor should be the same\nas index.\n\nThis request will be handled on the text_input side directly following\na commit_string request." ] pub unsafe fn zwp_input_method_context_v1_cursor_position ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , index : i32 , anchor : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 6u32 , index , anchor , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zwp_input_method_context_v1_modifiers_map ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , map : * mut wl_array ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 7u32 , map , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "keysym\n\nNotify when a key event was sent. Key events should not be used for\nnormal text input operations, which should be done with commit_string,\ndelete_surrounding_text, etc. The key event follows the wl_keyboard key\nevent convention. Sym is an XKB keysym, state is a wl_keyboard key_state." ] pub unsafe fn zwp_input_method_context_v1_keysym ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , time : u32 , sym : u32 , state : u32 , modifiers : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 8u32 , serial , time , sym , state , modifiers , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "grab hardware keyboard\n\nAllow an input method to receive hardware keyboard input and process\nkey events to generate text events (with pre-edit) over the wire. This\nallows input methods which compose multiple key events for inputting\ntext like it is done for CJK languages." ] pub unsafe fn zwp_input_method_context_v1_grab_keyboard ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 ) -> * mut super :: wl_keyboard :: wl_keyboard { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_input_method_context_v1 as _ , 9u32 , & super :: wl_keyboard :: wl_keyboard_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } # [ doc = "forward key event\n\nForward a wl_keyboard::key event to the client that was not processed\nby the input method itself. Should be used when filtering key events\nwith grab_keyboard. The arguments should be the ones from the\nwl_keyboard::key event.\n\nFor generating custom key events use the keysym request instead." ] pub unsafe fn zwp_input_method_context_v1_key ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , time : u32 , key : u32 , state : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 10u32 , serial , time , key , state , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "forward modifiers event\n\nForward a wl_keyboard::modifiers event to the client that was not\nprocessed by the input method itself. Should be used when filtering\nkey events with grab_keyboard. The arguments should be the ones\nfrom the wl_keyboard::modifiers event." ] pub unsafe fn zwp_input_method_context_v1_modifiers ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , mods_depressed : u32 , mods_latched : u32 , mods_locked : u32 , group : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 11u32 , serial , mods_depressed , mods_latched , mods_locked , group , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zwp_input_method_context_v1_language ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , language : * const c_char ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 12u32 , serial , language , std :: ptr :: null :: < c_void > ( ) ) ; } pub unsafe fn zwp_input_method_context_v1_text_direction ( zwp_input_method_context_v1 : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 , serial : u32 , direction : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_method_context_v1 as _ , 13u32 , serial , direction , std :: ptr :: null :: < c_void > ( ) ) ; } } # [ doc = "input method\n\nAn input method object is responsible for composing text in response to\ninput from hardware or virtual keyboards. There is one input method\nobject per seat. On activate there is a new input method context object\ncreated which allows the input method to communicate with the text input." ] pub mod zwp_input_method_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_input_method_v1 { } static mut zwp_input_method_v1_events_activate_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1_interface as * const wl_interface } , ] ; static mut zwp_input_method_v1_events_deactivate_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_method_v1_events : [ wl_message ; 2 ] = [ wl_message { name : b"activate\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_method_v1_events_activate_types as * const _ } , } , wl_message { name : b"deactivate\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_method_v1_events_deactivate_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_input_method_v1_interface : wl_interface = wl_interface { name : b"zwp_input_method_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 2 , events : unsafe { & zwp_input_method_v1_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_input_method_v1_listener { # [ doc = "activate event\n\nA text input was activated. Creates an input method context object\nwhich allows communication with the text input." ] fn activate ( & mut self , object : * mut zwp_input_method_v1 , id : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 ) { } # [ doc = "deactivate event\n\nThe text input corresponding to the context argument was deactivated.\nThe input method context should be destroyed after deactivation is\nhandled." ] fn deactivate ( & mut self , object : * mut zwp_input_method_v1 , context : * mut super :: zwp_input_method_context_v1 :: zwp_input_method_context_v1 ) { } } pub unsafe fn zwp_input_method_v1_set_user_data ( zwp_input_method_v1 : * mut super :: zwp_input_method_v1 :: zwp_input_method_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_input_method_v1 as _ , user_data ) ; } pub unsafe fn zwp_input_method_v1_get_user_data ( zwp_input_method_v1 : * mut super :: zwp_input_method_v1 :: zwp_input_method_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_input_method_v1 as _ ) ; } pub unsafe fn zwp_input_method_v1_get_version ( zwp_input_method_v1 : * mut super :: zwp_input_method_v1 :: zwp_input_method_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_input_method_v1 as _ ) ; } pub unsafe fn zwp_input_method_v1_add_listener ( zwp_input_method_v1 : * mut super :: zwp_input_method_v1 :: zwp_input_method_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_input_method_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_input_method_v1_add_rust_listener ( zwp_input_method_v1 : * mut super :: zwp_input_method_v1 :: zwp_input_method_v1 , listener : & dyn zwp_input_method_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_input_method_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_input_method_v1_add_listener ( zwp_input_method_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_input_method_v1_destroy ( zwp_input_method_v1 : * mut super :: zwp_input_method_v1 :: zwp_input_method_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_input_method_v1 as _ ) ; } } # [ doc = "interface for implementing keyboards\n\nOnly one client can bind this interface at a time." ] pub mod zwp_input_panel_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_input_panel_v1 { } static mut zwp_input_panel_v1_requests_get_input_panel_surface_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1_interface as * const wl_interface } , unsafe { & super :: wl_surface :: wl_surface_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_panel_v1_requests : [ wl_message ; 1 ] = [ wl_message { name : b"get_input_panel_surface\0" as * const u8 as * const c_char , signature : b"no\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_panel_v1_requests_get_input_panel_surface_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_input_panel_v1_interface : wl_interface = wl_interface { name : b"zwp_input_panel_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & zwp_input_panel_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_input_panel_v1_listener { } pub unsafe fn zwp_input_panel_v1_set_user_data ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_input_panel_v1 as _ , user_data ) ; } pub unsafe fn zwp_input_panel_v1_get_user_data ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_input_panel_v1 as _ ) ; } pub unsafe fn zwp_input_panel_v1_get_version ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_input_panel_v1 as _ ) ; } pub unsafe fn zwp_input_panel_v1_add_listener ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_input_panel_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_input_panel_v1_add_rust_listener ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 , listener : & dyn zwp_input_panel_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_input_panel_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_input_panel_v1_add_listener ( zwp_input_panel_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_input_panel_v1_destroy ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_input_panel_v1 as _ ) ; } pub unsafe fn zwp_input_panel_v1_get_input_panel_surface ( zwp_input_panel_v1 : * mut super :: zwp_input_panel_v1 :: zwp_input_panel_v1 , surface : * mut super :: wl_surface :: wl_surface ) -> * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , zwp_input_panel_v1 as _ , 0u32 , & super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1_interface as * const _ , std :: ptr :: null :: < c_void > ( ) , surface ) ; return r as _ ; } } pub mod zwp_input_panel_surface_v1 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum zwp_input_panel_surface_v1 { } # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum position { center_bottom = 0 , # [ doc ( hidden ) ] __nonexhaustive , } impl position { pub fn from_raw ( n : u32 ) -> Option < position > { match n { 0 => Some ( position :: center_bottom ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut zwp_input_panel_surface_v1_requests_set_toplevel_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: wl_output :: wl_output_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut zwp_input_panel_surface_v1_requests : [ wl_message ; 2 ] = [ wl_message { name : b"set_toplevel\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & zwp_input_panel_surface_v1_requests_set_toplevel_types as * const _ } , } , wl_message { name : b"set_overlay_panel\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut zwp_input_panel_surface_v1_interface : wl_interface = wl_interface { name : b"zwp_input_panel_surface_v1\0" as * const u8 as * const c_char , version : 1 , request_count : 2 , requests : unsafe { & zwp_input_panel_surface_v1_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait zwp_input_panel_surface_v1_listener { } pub unsafe fn zwp_input_panel_surface_v1_set_user_data ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , zwp_input_panel_surface_v1 as _ , user_data ) ; } pub unsafe fn zwp_input_panel_surface_v1_get_user_data ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , zwp_input_panel_surface_v1 as _ ) ; } pub unsafe fn zwp_input_panel_surface_v1_get_version ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , zwp_input_panel_surface_v1 as _ ) ; } pub unsafe fn zwp_input_panel_surface_v1_add_listener ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , zwp_input_panel_surface_v1 as _ , listener as _ , data as _ ) ; } pub unsafe fn zwp_input_panel_surface_v1_add_rust_listener ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 , listener : & dyn zwp_input_panel_surface_v1_listener ) -> bool { let to = ( listener as * const dyn zwp_input_panel_surface_v1_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return zwp_input_panel_surface_v1_add_listener ( zwp_input_panel_surface_v1 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn zwp_input_panel_surface_v1_destroy ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , zwp_input_panel_surface_v1 as _ ) ; } # [ doc = "set the surface type as a keyboard\n\nSet the input_panel_surface type to keyboard.\n\nA keyboard surface is only shown when a text input is active." ] pub unsafe fn zwp_input_panel_surface_v1_set_toplevel ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 , output : * mut super :: wl_output :: wl_output , position : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_panel_surface_v1 as _ , 0u32 , output , position , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the surface type as an overlay panel\n\nSet the input_panel_surface to be an overlay panel.\n\nThis is shown near the input cursor above the application window when\na text input is active." ] pub unsafe fn zwp_input_panel_surface_v1_set_overlay_panel ( zwp_input_panel_surface_v1 : * mut super :: zwp_input_panel_surface_v1 :: zwp_input_panel_surface_v1 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , zwp_input_panel_surface_v1 as _ , 1u32 , std :: ptr :: null :: < c_void > ( ) ) ; } } } pub mod kde_output_device_v2 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; # [ doc = "output configuration representation\n\nAn output device describes a display device available to the compositor.\noutput_device is similar to wl_output, but focuses on output\nconfiguration management.\n\nA client can query all global output_device objects to enlist all\navailable display devices, even those that may currently not be\nrepresented by the compositor as a wl_output.\n\nThe client sends configuration changes to the server through the\noutputconfiguration interface, and the server applies the configuration\nchanges to the hardware and signals changes to the output devices\naccordingly.\n\nThis object is published as global during start up for every available\ndisplay devices, or when one later becomes available, for example by\nbeing hotplugged via a physical connector." ] pub mod kde_output_device_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum kde_output_device_v2 { } # [ doc = "subpixel geometry information\n\nThis enumeration describes how the physical pixels on an output are\nlaid out." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum subpixel { unknown = 0 , none = 1 , horizontal_rgb = 2 , horizontal_bgr = 3 , vertical_rgb = 4 , vertical_bgr = 5 , # [ doc ( hidden ) ] __nonexhaustive , } impl subpixel { pub fn from_raw ( n : u32 ) -> Option < subpixel > { match n { 0 => Some ( subpixel :: unknown ) , 1 => Some ( subpixel :: none ) , 2 => Some ( subpixel :: horizontal_rgb ) , 3 => Some ( subpixel :: horizontal_bgr ) , 4 => Some ( subpixel :: vertical_rgb ) , 5 => Some ( subpixel :: vertical_bgr ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "transform from framebuffer to output\n\nThis describes the transform, that a compositor will apply to a\nsurface to compensate for the rotation or mirroring of an\noutput device.\n\nThe flipped values correspond to an initial flip around a\nvertical axis followed by rotation.\n\nThe purpose is mainly to allow clients to render accordingly and\ntell the compositor, so that for fullscreen surfaces, the\ncompositor is still able to scan out directly client surfaces." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum transform { normal = 0 , _90 = 1 , _180 = 2 , _270 = 3 , flipped = 4 , flipped_90 = 5 , flipped_180 = 6 , flipped_270 = 7 , # [ doc ( hidden ) ] __nonexhaustive , } impl transform { pub fn from_raw ( n : u32 ) -> Option < transform > { match n { 0 => Some ( transform :: normal ) , 1 => Some ( transform :: _90 ) , 2 => Some ( transform :: _180 ) , 3 => Some ( transform :: _270 ) , 4 => Some ( transform :: flipped ) , 5 => Some ( transform :: flipped_90 ) , 6 => Some ( transform :: flipped_180 ) , 7 => Some ( transform :: flipped_270 ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } bitflags ! { # [ doc = "describes capabilities of the outputdevice\n\nDescribes what capabilities this device has." ] pub struct capability : u32 { # [ doc = "if this output_device can use overscan" ] const overscan = 1 ; # [ doc = "if this outputdevice supports variable refresh rate" ] const vrr = 2 ; # [ doc = "if setting the rgb range is possible" ] const rgb_range = 4 ; } } impl capability { pub fn from_raw ( n : u32 ) -> Option < capability > { Some ( capability :: from_bits_truncate ( n ) ) } pub fn to_raw ( & self ) -> u32 { self . bits ( ) } } # [ doc = "describes vrr policy\n\nDescribes when the compositor may employ variable refresh rate" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum vrr_policy { never = 0 , always = 1 , automatic = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl vrr_policy { pub fn from_raw ( n : u32 ) -> Option < vrr_policy > { match n { 0 => Some ( vrr_policy :: never ) , 1 => Some ( vrr_policy :: always ) , 2 => Some ( vrr_policy :: automatic ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "describes RGB range policy\n\nWhether full or limited color range should be used" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum rgb_range { automatic = 0 , full = 1 , limited = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl rgb_range { pub fn from_raw ( n : u32 ) -> Option < rgb_range > { match n { 0 => Some ( rgb_range :: automatic ) , 1 => Some ( rgb_range :: full ) , 2 => Some ( rgb_range :: limited ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut kde_output_device_v2_events_current_mode_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2_interface as * const wl_interface } , ] ; static mut kde_output_device_v2_events_mode_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut kde_output_device_v2_events : [ wl_message ; 14 ] = [ wl_message { name : b"geometry\0" as * const u8 as * const c_char , signature : b"iiiiissi\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"current_mode\0" as * const u8 as * const c_char , signature : b"o\0" as * const u8 as * const c_char , types : unsafe { & kde_output_device_v2_events_current_mode_types as * const _ } , } , wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & kde_output_device_v2_events_mode_types as * const _ } , } , wl_message { name : b"done\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"scale\0" as * const u8 as * const c_char , signature : b"f\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"edid\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"enabled\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"uuid\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"serial_number\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"eisa_id\0" as * const u8 as * const c_char , signature : b"s\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"capabilities\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"overscan\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"vrr_policy\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"rgb_range\0" as * const u8 as * const c_char , signature : b"u\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut kde_output_device_v2_interface : wl_interface = wl_interface { name : b"kde_output_device_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 14 , events : unsafe { & kde_output_device_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait kde_output_device_v2_listener { # [ doc = "geometric properties of the output\n\nThe geometry event describes geometric properties of the output.\nThe event is sent when binding to the output object and whenever\nany of the properties change." ] fn geometry ( & mut self , object : * mut kde_output_device_v2 , x : i32 , y : i32 , physical_width : i32 , physical_height : i32 , subpixel : i32 , make : * mut c_char , model : * mut c_char , transform : i32 ) { } # [ doc = "current mode\n\nThis event describes the mode currently in use for this head. It is only\nsent if the output is enabled." ] fn current_mode ( & mut self , object : * mut kde_output_device_v2 , mode : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 ) { } # [ doc = "advertise available output modes and current one\n\nThe mode event describes an available mode for the output.\n\nWhen the client binds to the output_device object, the server sends this\nevent once for every available mode the output_device can be operated by.\n\nThere will always be at least one event sent out on initial binding,\nwhich represents the current mode.\n\nLater if an output changes, its mode event is sent again for the\neventual added modes and lastly the current mode. In other words, the\ncurrent mode is always represented by the latest event sent with the current\nflag set.\n\nThe size of a mode is given in physical hardware units of the output device.\nThis is not necessarily the same as the output size in the global compositor\nspace. For instance, the output may be scaled, as described in\nkde_output_device_v2.scale, or transformed, as described in\nkde_output_device_v2.transform." ] fn mode ( & mut self , object : * mut kde_output_device_v2 , mode : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 ) { } # [ doc = "sent all information about output\n\nThis event is sent after all other properties have been\nsent on binding to the output object as well as after any\nother output property change have been applied later on.\nThis allows to see changes to the output properties as atomic,\neven if multiple events successively announce them." ] fn done ( & mut self , object : * mut kde_output_device_v2 , ) { } # [ doc = "output scaling properties\n\nThis event contains scaling geometry information\nthat is not in the geometry event. It may be sent after\nbinding the output object or if the output scale changes\nlater. If it is not sent, the client should assume a\nscale of 1.\n\nA scale larger than 1 means that the compositor will\nautomatically scale surface buffers by this amount\nwhen rendering. This is used for high resolution\ndisplays where applications rendering at the native\nresolution would be too small to be legible.\n\nIt is intended that scaling aware clients track the\ncurrent output of a surface, and if it is on a scaled\noutput it should use wl_surface.set_buffer_scale with\nthe scale of the output. That way the compositor can\navoid scaling the surface, and the client can supply\na higher detail image." ] fn scale ( & mut self , object : * mut kde_output_device_v2 , factor : wl_fixed_t ) { } # [ doc = "advertise EDID data for the output\n\nThe edid event encapsulates the EDID data for the outputdevice.\n\nThe event is sent when binding to the output object. The EDID\ndata may be empty, in which case this event is sent anyway.\nIf the EDID information is empty, you can fall back to the name\net al. properties of the outputdevice." ] fn edid ( & mut self , object : * mut kde_output_device_v2 , raw : * mut c_char ) { } # [ doc = "output is enabled or disabled\n\nThe enabled event notifies whether this output is currently\nenabled and used for displaying content by the server.\nThe event is sent when binding to the output object and\nwhenever later on an output changes its state by becoming\nenabled or disabled." ] fn enabled ( & mut self , object : * mut kde_output_device_v2 , enabled : i32 ) { } # [ doc = "A unique id for this outputdevice\n\nThe uuid can be used to identify the output. It's controlled by\nthe server entirely. The server should make sure the uuid is\npersistent across restarts. An empty uuid is considered invalid." ] fn uuid ( & mut self , object : * mut kde_output_device_v2 , uuid : * mut c_char ) { } # [ doc = "Serial Number\n\nSerial ID of the monitor, sent on startup before the first done event." ] fn serial_number ( & mut self , object : * mut kde_output_device_v2 , serialNumber : * mut c_char ) { } # [ doc = "EISA ID\n\nEISA ID of the monitor, sent on startup before the first done event." ] fn eisa_id ( & mut self , object : * mut kde_output_device_v2 , eisaId : * mut c_char ) { } # [ doc = "capability flags\n\nWhat capabilities this device has, sent on startup before the first\ndone event." ] fn capabilities ( & mut self , object : * mut kde_output_device_v2 , flags : capability ) { } # [ doc = "overscan\n\nOverscan value of the monitor in percent, sent on startup before the\nfirst done event." ] fn overscan ( & mut self , object : * mut kde_output_device_v2 , overscan : u32 ) { } # [ doc = "Variable Refresh Rate Policy\n\nWhat policy the compositor will employ regarding its use of variable\nrefresh rate." ] fn vrr_policy ( & mut self , object : * mut kde_output_device_v2 , vrr_policy : vrr_policy ) { } # [ doc = "RGB range\n\nWhat rgb range the compositor is using for this output" ] fn rgb_range ( & mut self , object : * mut kde_output_device_v2 , rgb_range : rgb_range ) { } } pub unsafe fn kde_output_device_v2_set_user_data ( kde_output_device_v2 : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , kde_output_device_v2 as _ , user_data ) ; } pub unsafe fn kde_output_device_v2_get_user_data ( kde_output_device_v2 : * mut super :: kde_output_device_v2 :: kde_output_device_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , kde_output_device_v2 as _ ) ; } pub unsafe fn kde_output_device_v2_get_version ( kde_output_device_v2 : * mut super :: kde_output_device_v2 :: kde_output_device_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , kde_output_device_v2 as _ ) ; } pub unsafe fn kde_output_device_v2_add_listener ( kde_output_device_v2 : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , kde_output_device_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn kde_output_device_v2_add_rust_listener ( kde_output_device_v2 : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , listener : & dyn kde_output_device_v2_listener ) -> bool { let to = ( listener as * const dyn kde_output_device_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return kde_output_device_v2_add_listener ( kde_output_device_v2 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn kde_output_device_v2_destroy ( kde_output_device_v2 : * mut super :: kde_output_device_v2 :: kde_output_device_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , kde_output_device_v2 as _ ) ; } } # [ doc = "output mode\n\nThis object describes an output mode.\n\nSome heads don't support output modes, in which case modes won't be\nadvertised.\n\nProperties sent via this interface are applied atomically via the\nkde_output_device.done event. No guarantees are made regarding the order\nin which properties are sent." ] pub mod kde_output_device_mode_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum kde_output_device_mode_v2 { } # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut kde_output_device_mode_v2_events : [ wl_message ; 4 ] = [ wl_message { name : b"size\0" as * const u8 as * const c_char , signature : b"ii\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"refresh\0" as * const u8 as * const c_char , signature : b"i\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"preferred\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"removed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut kde_output_device_mode_v2_interface : wl_interface = wl_interface { name : b"kde_output_device_mode_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 0 , requests : NULLPTR as * const wl_message , event_count : 4 , events : unsafe { & kde_output_device_mode_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait kde_output_device_mode_v2_listener { # [ doc = "mode size\n\nThis event describes the mode size. The size is given in physical\nhardware units of the output device. This is not necessarily the same as\nthe output size in the global compositor space. For instance, the output\nmay be scaled or transformed." ] fn size ( & mut self , object : * mut kde_output_device_mode_v2 , width : i32 , height : i32 ) { } # [ doc = "mode refresh rate\n\nThis event describes the mode's fixed vertical refresh rate. It is only\nsent if the mode has a fixed refresh rate." ] fn refresh ( & mut self , object : * mut kde_output_device_mode_v2 , refresh : i32 ) { } # [ doc = "mode is preferred\n\nThis event advertises this mode as preferred." ] fn preferred ( & mut self , object : * mut kde_output_device_mode_v2 , ) { } # [ doc = "the mode has been destroyed\n\nThe compositor will destroy the object immediately after sending this\nevent, so it will become invalid and the client should release any\nresources associated with it." ] fn removed ( & mut self , object : * mut kde_output_device_mode_v2 , ) { } } pub unsafe fn kde_output_device_mode_v2_set_user_data ( kde_output_device_mode_v2 : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , kde_output_device_mode_v2 as _ , user_data ) ; } pub unsafe fn kde_output_device_mode_v2_get_user_data ( kde_output_device_mode_v2 : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , kde_output_device_mode_v2 as _ ) ; } pub unsafe fn kde_output_device_mode_v2_get_version ( kde_output_device_mode_v2 : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , kde_output_device_mode_v2 as _ ) ; } pub unsafe fn kde_output_device_mode_v2_add_listener ( kde_output_device_mode_v2 : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , kde_output_device_mode_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn kde_output_device_mode_v2_add_rust_listener ( kde_output_device_mode_v2 : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 , listener : & dyn kde_output_device_mode_v2_listener ) -> bool { let to = ( listener as * const dyn kde_output_device_mode_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return kde_output_device_mode_v2_add_listener ( kde_output_device_mode_v2 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn kde_output_device_mode_v2_destroy ( kde_output_device_mode_v2 : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , kde_output_device_mode_v2 as _ ) ; } } } pub mod kde_output_management_v2 { use super :: wayland :: * ; use super :: xdg_shell :: * ; use super :: org_kde_kwin_outputdevice :: * ; use super :: kde_output_device_v2 :: * ; # [ doc = "configuration of server outputs through clients\n\nThis interface enables clients to set properties of output devices for screen\nconfiguration purposes via the server. To this end output devices are referenced\nby global kde_output_device_v2 objects.\n\noutputmanagement (wl_global)\n--------------------------\nrequest:\n* create_configuration -> outputconfiguration (wl_resource)\n\noutputconfiguration (wl_resource)\n--------------------------\nrequests:\n* enable(outputdevice, bool)\n* mode(outputdevice, mode)\n* transformation(outputdevice, flag)\n* position(outputdevice, x, y)\n* apply\n\nevents:\n* applied\n* failed\n\nThe server registers one outputmanagement object as a global object. In order\nto configure outputs a client requests create_configuration, which provides a\nresource referencing an outputconfiguration for one-time configuration. That\nway the server knows which requests belong together and can group them by that.\n\nOn the outputconfiguration object the client calls for each output whether the\noutput should be enabled, which mode should be set (by referencing the mode from\nthe list of announced modes) and the output's global position. Once all outputs\nare configured that way, the client calls apply.\nAt that point and not earlier the server should try to apply the configuration.\nIf this succeeds the server emits the applied signal, otherwise the failed\nsignal, such that the configuring client is noticed about the success of its\nconfiguration request.\n\nThrough this design the interface enables atomic output configuration changes if\ninternally supported by the server." ] pub mod kde_output_management_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum kde_output_management_v2 { } static mut kde_output_management_v2_requests_create_configuration_types : [ * const wl_interface ; 1 ] = [ unsafe { & super :: kde_output_configuration_v2 :: kde_output_configuration_v2_interface as * const wl_interface } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut kde_output_management_v2_requests : [ wl_message ; 1 ] = [ wl_message { name : b"create_configuration\0" as * const u8 as * const c_char , signature : b"n\0" as * const u8 as * const c_char , types : unsafe { & kde_output_management_v2_requests_create_configuration_types as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut kde_output_management_v2_interface : wl_interface = wl_interface { name : b"kde_output_management_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 1 , requests : unsafe { & kde_output_management_v2_requests as * const _ } , event_count : 0 , events : NULLPTR as * const wl_message , } ; # [ doc = r" An interface for handling events." ] pub trait kde_output_management_v2_listener { } pub unsafe fn kde_output_management_v2_set_user_data ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , kde_output_management_v2 as _ , user_data ) ; } pub unsafe fn kde_output_management_v2_get_user_data ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , kde_output_management_v2 as _ ) ; } pub unsafe fn kde_output_management_v2_get_version ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , kde_output_management_v2 as _ ) ; } pub unsafe fn kde_output_management_v2_add_listener ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , kde_output_management_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn kde_output_management_v2_add_rust_listener ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 , listener : & dyn kde_output_management_v2_listener ) -> bool { let to = ( listener as * const dyn kde_output_management_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return kde_output_management_v2_add_listener ( kde_output_management_v2 as _ , fp as _ , op as _ ) == 0 ; } pub unsafe fn kde_output_management_v2_destroy ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , kde_output_management_v2 as _ ) ; } # [ doc = "provide outputconfiguration object for configuring outputs\n\nRequest an outputconfiguration object through which the client can configure\noutput devices." ] pub unsafe fn kde_output_management_v2_create_configuration ( kde_output_management_v2 : * mut super :: kde_output_management_v2 :: kde_output_management_v2 ) -> * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 { let r = ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal_constructor , kde_output_management_v2 as _ , 0u32 , & super :: kde_output_configuration_v2 :: kde_output_configuration_v2_interface as * const _ , std :: ptr :: null :: < c_void > ( ) ) ; return r as _ ; } } # [ doc = "configure single output devices\n\noutputconfiguration is a client-specific resource that can be used to ask\nthe server to apply changes to available output devices.\n\nThe client receives a list of output devices from the registry. When it wants\nto apply new settings, it creates a configuration object from the\noutputmanagement global, writes changes through this object's enable, scale,\ntransform and mode calls. It then asks the server to apply these settings in\nan atomic fashion, for example through Linux' DRM interface.\n\nThe server signals back whether the new settings have applied successfully\nor failed to apply. outputdevice objects are updated after the changes have been\napplied to the hardware and before the server side sends the applied event." ] pub mod kde_output_configuration_v2 { use std :: os :: raw :: { c_char , c_void , c_int } ; use super :: super :: { types_null , NULLPTR } ; use super :: super :: super :: sys :: common :: { wl_interface , wl_array , wl_argument , wl_message , wl_fixed_t } ; use super :: super :: super :: sys :: client :: * ; pub enum kde_output_configuration_v2 { } # [ doc = "describes vrr policy\n\nDescribes when the compositor may employ variable refresh rate" ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum vrr_policy { never = 0 , always = 1 , automatic = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl vrr_policy { pub fn from_raw ( n : u32 ) -> Option < vrr_policy > { match n { 0 => Some ( vrr_policy :: never ) , 1 => Some ( vrr_policy :: always ) , 2 => Some ( vrr_policy :: automatic ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } # [ doc = "describes RGB range policy\n\nWhether this output should use full or limited rgb." ] # [ repr ( u32 ) ] # [ derive ( Copy , Clone , Debug , PartialEq ) ] pub enum rgb_range { automatic = 0 , full = 1 , limited = 2 , # [ doc ( hidden ) ] __nonexhaustive , } impl rgb_range { pub fn from_raw ( n : u32 ) -> Option < rgb_range > { match n { 0 => Some ( rgb_range :: automatic ) , 1 => Some ( rgb_range :: full ) , 2 => Some ( rgb_range :: limited ) , _ => Option :: None } } pub fn to_raw ( & self ) -> u32 { * self as u32 } } static mut kde_output_configuration_v2_requests_enable_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut kde_output_configuration_v2_requests_mode_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , unsafe { & super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2_interface as * const wl_interface } , ] ; static mut kde_output_configuration_v2_requests_transform_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut kde_output_configuration_v2_requests_position_types : [ * const wl_interface ; 3 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , NULLPTR as * const wl_interface , ] ; static mut kde_output_configuration_v2_requests_scale_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut kde_output_configuration_v2_requests_overscan_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut kde_output_configuration_v2_requests_set_vrr_policy_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; static mut kde_output_configuration_v2_requests_set_rgb_range_types : [ * const wl_interface ; 2 ] = [ unsafe { & super :: kde_output_device_v2 :: kde_output_device_v2_interface as * const wl_interface } , NULLPTR as * const wl_interface , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut kde_output_configuration_v2_requests : [ wl_message ; 10 ] = [ wl_message { name : b"enable\0" as * const u8 as * const c_char , signature : b"oi\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_enable_types as * const _ } , } , wl_message { name : b"mode\0" as * const u8 as * const c_char , signature : b"oo\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_mode_types as * const _ } , } , wl_message { name : b"transform\0" as * const u8 as * const c_char , signature : b"oi\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_transform_types as * const _ } , } , wl_message { name : b"position\0" as * const u8 as * const c_char , signature : b"oii\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_position_types as * const _ } , } , wl_message { name : b"scale\0" as * const u8 as * const c_char , signature : b"of\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_scale_types as * const _ } , } , wl_message { name : b"apply\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"destroy\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"overscan\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_overscan_types as * const _ } , } , wl_message { name : b"set_vrr_policy\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_set_vrr_policy_types as * const _ } , } , wl_message { name : b"set_rgb_range\0" as * const u8 as * const c_char , signature : b"ou\0" as * const u8 as * const c_char , types : unsafe { & kde_output_configuration_v2_requests_set_rgb_range_types as * const _ } , } , ] ; # [ doc = r" C-representation of the messages of this interface, for interop" ] pub static mut kde_output_configuration_v2_events : [ wl_message ; 2 ] = [ wl_message { name : b"applied\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , wl_message { name : b"failed\0" as * const u8 as * const c_char , signature : b"\0" as * const u8 as * const c_char , types : unsafe { & types_null as * const _ } , } , ] ; # [ doc = r" C representation of this interface, for interop" ] pub static mut kde_output_configuration_v2_interface : wl_interface = wl_interface { name : b"kde_output_configuration_v2\0" as * const u8 as * const c_char , version : 1 , request_count : 10 , requests : unsafe { & kde_output_configuration_v2_requests as * const _ } , event_count : 2 , events : unsafe { & kde_output_configuration_v2_events as * const _ } , } ; # [ doc = r" An interface for handling events." ] pub trait kde_output_configuration_v2_listener { # [ doc = "configuration changes have been applied\n\nSent after the server has successfully applied the changes.\n." ] fn applied ( & mut self , object : * mut kde_output_configuration_v2 , ) { } # [ doc = "configuration changes failed to apply\n\nSent if the server rejects the changes or failed to apply them." ] fn failed ( & mut self , object : * mut kde_output_configuration_v2 , ) { } } pub unsafe fn kde_output_configuration_v2_set_user_data ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , user_data : * mut c_void ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_set_user_data , kde_output_configuration_v2 as _ , user_data ) ; } pub unsafe fn kde_output_configuration_v2_get_user_data ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 ) -> * mut c_void { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_user_data , kde_output_configuration_v2 as _ ) ; } pub unsafe fn kde_output_configuration_v2_get_version ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 ) -> u32 { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_get_version , kde_output_configuration_v2 as _ ) ; } pub unsafe fn kde_output_configuration_v2_add_listener ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , listener : * mut c_void , data : * mut c_void ) -> c_int { return ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_add_listener , kde_output_configuration_v2 as _ , listener as _ , data as _ ) ; } pub unsafe fn kde_output_configuration_v2_add_rust_listener ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , listener : & dyn kde_output_configuration_v2_listener ) -> bool { let to = ( listener as * const dyn kde_output_configuration_v2_listener ) . to_raw_parts ( ) ; let op = to . 0 ; let fp = std :: mem :: transmute :: < _ , * mut c_void > ( std :: mem :: transmute :: < _ , usize > ( to . 1 ) + ( 3 * std :: mem :: size_of :: < usize > ( ) ) ) ; return kde_output_configuration_v2_add_listener ( kde_output_configuration_v2 as _ , fp as _ , op as _ ) == 0 ; } # [ doc = "enable or disable an output\n\nMark the output as enabled or disabled." ] pub unsafe fn kde_output_configuration_v2_enable ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , enable : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 0u32 , outputdevice , enable , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "switch output-device to mode\n\nSets the mode for a given output." ] pub unsafe fn kde_output_configuration_v2_mode ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , mode : * mut super :: kde_output_device_mode_v2 :: kde_output_device_mode_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 1u32 , outputdevice , mode , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "transform output-device\n\nSets the transformation for a given output." ] pub unsafe fn kde_output_configuration_v2_transform ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , transform : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 2u32 , outputdevice , transform , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "position output in global space\n\nSets the position for this output device. (x,y) describe the top-left corner\nof the output in global space, whereby the origin (0,0) of the global space\nhas to be aligned with the top-left corner of the most left and in case this\ndoes not define a single one the top output.\n\nThere may be no gaps or overlaps between outputs, i.e. the outputs are\nstacked horizontally, vertically, or both on each other." ] pub unsafe fn kde_output_configuration_v2_position ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , x : i32 , y : i32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 3u32 , outputdevice , x , y , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set scaling factor of this output\n\nSets the scaling factor for this output device." ] pub unsafe fn kde_output_configuration_v2_scale ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , scale : wl_fixed_t ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 4u32 , outputdevice , scale , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "apply configuration changes to all output devices\n\nAsks the server to apply property changes requested through this outputconfiguration\nobject to all outputs on the server side." ] pub unsafe fn kde_output_configuration_v2_apply ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 5u32 , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "release the outputconfiguration object" ] pub unsafe fn kde_output_configuration_v2_destroy ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 6u32 , std :: ptr :: null :: < c_void > ( ) ) ; ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_destroy , kde_output_configuration_v2 as _ ) ; } # [ doc = "set overscan value\n\nSet the overscan value of this output device with a value in percent." ] pub unsafe fn kde_output_configuration_v2_overscan ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , overscan : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 7u32 , outputdevice , overscan , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "set the VRR policy\n\nSet what policy the compositor should employ regarding its use of\nvariable refresh rate." ] pub unsafe fn kde_output_configuration_v2_set_vrr_policy ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , policy : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 8u32 , outputdevice , policy , std :: ptr :: null :: < c_void > ( ) ) ; } # [ doc = "RGB range\n\nWhether full or limited color range should be used" ] pub unsafe fn kde_output_configuration_v2_set_rgb_range ( kde_output_configuration_v2 : * mut super :: kde_output_configuration_v2 :: kde_output_configuration_v2 , outputdevice : * mut super :: kde_output_device_v2 :: kde_output_device_v2 , rgb_range : u32 ) { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE , wl_proxy_marshal , kde_output_configuration_v2 as _ , 9u32 , outputdevice , rgb_range , std :: ptr :: null :: < c_void > ( ) ) ; } } } [INFO] [stdout] | ~~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> /opt/rustwide/target/debug/build/wayland-raw-protocol-bindings-cb634f59c146b0af/out/client.rs:1:1949 [INFO] [stdout] | [INFO] [stdout] 1 | ... { & super :: zkde_screencast_stream_unstable_v1 :: zkde_screencast_stream_unstable_v1_interface as * const wl_interface } , unsafe { ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: `#[warn(static_mut_refs)]` on by default [INFO] [stdout] help: use `&raw const` instead to create a raw pointer [INFO] [stdout] | [WARN] too much data in the log, truncating it