### Rust Ecosystem Links Source: https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/lib Provides links to essential Rust resources, including the official Rust website, The Book, Standard Library API Reference, Rust by Example, and the Cargo Guide. ```rust Rust Resources: - Rust website: https://www.rust-lang.org/ - The Book: https://doc.rust-lang.org/book/ - Standard Library API Reference: https://doc.rust-lang.org/std/ - Rust by Example: https://doc.rust-lang.org/rust-by-example/ - The Cargo Guide: https://doc.rust-lang.org/cargo/guide/ - Clippy Documentation: https://doc.rust-lang.org/nightly/clippy ``` -------------------------------- ### Rust Ecosystem Links Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/manual Provides links to essential Rust resources, including the official Rust website, The Book, Standard Library API Reference, Rust by Example, the Cargo Guide, and Clippy documentation. ```rust Rust Resources: - Rust website: https://www.rust-lang.org/ - The Book: https://doc.rust-lang.org/book/ - Standard Library API Reference: https://doc.rust-lang.org/std/ - Rust by Example: https://doc.rust-lang.org/rust-by-example/ - Cargo Guide: https://doc.rust-lang.org/cargo/guide/ - Clippy Documentation: https://doc.rust-lang.org/nightly/clippy ``` -------------------------------- ### Rust Ecosystem Links Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/lib Provides links to essential Rust resources, including the official Rust website, The Book, Standard Library API Reference, Rust by Example, The Cargo Guide, and Clippy Documentation. ```rust Rust Website: https://www.rust-lang.org/ The Book: https://doc.rust-lang.org/book/ Standard Library API Reference: https://doc.rust-lang.org/std/ Rust by Example: https://doc.rust-lang.org/rust-by-example/ The Cargo Guide: https://doc.rust-lang.org/cargo/guide/ Clippy Documentation: https://doc.rust-lang.org/nightly/clippy ``` -------------------------------- ### Rust Ecosystem Links Source: https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/auto/mod Provides links to essential Rust documentation and resources, including the official Rust website, The Book, Standard Library API Reference, Rust by Example, The Cargo Guide, and Clippy Documentation. ```Rust Rust Resources: - Rust website: https://www.rust-lang.org/ - The Book: https://doc.rust-lang.org/book/ - Standard Library API Reference: https://doc.rust-lang.org/std/ - Rust by Example: https://doc.rust-lang.org/rust-by-example/ - The Cargo Guide: https://doc.rust-lang.org/cargo/guide/ - Clippy Documentation: https://doc.rust-lang.org/nightly/clippy ``` -------------------------------- ### Related Rust Documentation Links Source: https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/manual Provides links to essential Rust programming resources, including the official Rust website, The Book, Standard Library API Reference, Rust by Example, and the Cargo Guide. These are valuable for learning and using Rust. ```rust Rust Resources: - Rust website: https://www.rust-lang.org/ - The Book: https://doc.rust-lang.org/book/ - Standard Library API Reference: https://doc.rust-lang.org/std/ - Rust by Example: https://doc.rust-lang.org/rust-by-example/ - The Cargo Guide: https://doc.rust-lang.org/cargo/guide/ - Clippy Documentation: https://doc.rust-lang.org/nightly/clippy ``` -------------------------------- ### Rust Ecosystem Links Source: https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/auto/functions Provides links to key resources within the Rust ecosystem, including the official Rust website, The Book, Standard Library API Reference, Rust by Example, and the Cargo Guide. ```rust Rust Website: https://www.rust-lang.org/ The Book: https://doc.rust-lang.org/book/ Standard Library API Reference: https://doc.rust-lang.org/std/ Rust by Example: https://doc.rust-lang.org/rust-by-example/ The Cargo Guide: https://doc.rust-lang.org/cargo/guide/ Clippy Documentation: https://doc.rust-lang.org/nightly/clippy ``` -------------------------------- ### Rust Ecosystem Links Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/auto/functions Provides links to essential Rust resources, including the official Rust website, The Book, Standard Library API Reference, Rust by Example, The Cargo Guide, and Clippy Documentation. These resources are valuable for learning and using Rust effectively. ```rust Rust Resources: - Rust website: https://www.rust-lang.org/ - The Book: https://doc.rust-lang.org/book/ - Standard Library API Reference: https://doc.rust-lang.org/std/ - Rust by Example: https://doc.rust-lang.org/rust-by-example/ - The Cargo Guide: https://doc.rust-lang.org/cargo/guide/ - Clippy Documentation: https://doc.rust-lang.org/nightly/clippy ``` -------------------------------- ### Rust Ecosystem Links Source: https://docs.rs/gtk4-layer-shell/-sys/0.3.0/x86_64-unknown-linux-gnu/gtk4_layer_shell_sys/type Provides links to essential resources within the Rust ecosystem, including the official Rust website, documentation for The Book, Standard Library API Reference, Rust by Example, and the Cargo Guide. ```rust Rust Website: https://www.rust-lang.org/ The Book: https://doc.rust-lang.org/book/ Standard Library API Reference: https://doc.rust-lang.org/std/ Rust by Example: https://doc.rust-lang.org/rust-by-example/ The Cargo Guide: https://doc.rust-lang.org/cargo/guide/ Clippy Documentation: https://doc.rust-lang.org/nightly/clippy ``` -------------------------------- ### Rustdoc Help and Navigation Source: https://docs.rs/gtk4-layer-shell/-sys/0.3.0/help Provides information on how to navigate and use the rustdoc documentation, including keyboard shortcuts for searching and expanding/collapsing sections. It also details search tricks for more precise results. ```Rust ## Keyboard Shortcuts `?` Show this help dialog `S` / `/` Focus the search field `↑` Move up in search results `↓` Move down in search results `←` / `→` Switch result tab (when results focused) `⏎` Go to active search result `+` Expand all sections `-` Collapse all sections ## Search Tricks For a full list of all search features, take a look [here](https://doc.rust-lang.org/nightly/rustdoc/read-documentation/search.html). Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given item kind. Accepted kinds are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`. Search functions by type signature (e.g., `vec -> usize` or `-> vec` or `String, enum:Cow -> bool`) You can look for items with an exact name by putting double quotes around your request: `"string"` Look for functions that accept or return [slices](https://doc.rust-lang.org/nightly/std/primitive.slice.html) and [arrays](https://doc.rust-lang.org/nightly/std/primitive.array.html) by writing square brackets (e.g., `-> [u8]` or `[] -> Option`) Look for items inside another one by searching for a path: `vec::Vec` ``` -------------------------------- ### gtk4-layer-shell Crate Overview Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/manual Provides an overview of the gtk4-layer-shell crate, including version, license, source code links, and dependencies. It also lists supported platforms and documentation completeness. ```rust crate: gtk4-layer-shell version: 0.5.0 license: MIT repository: https://github.com/pentamassiv/gtk4-layer-shell-gir/tree/main/gtk4-layer-shell doc_coverage: 88.1% platforms: - i686-pc-windows-msvc - i686-unknown-linux-gnu - x86_64-apple-darwin - x86_64-pc-windows-msvc - x86_64-unknown-linux-gnu dependencies: - bitflags ^2.0 - gdk4 ^0.9 - glib ^0.20 - glib-sys ^0.20 - gtk4 ^0.9 - gtk4-layer-shell-sys ^0.3 - libc ^0.2 - gio ^0.20 (dev) - libadwaita ^0.7 (dev) - relm4 ^0.9 (dev) ``` -------------------------------- ### gtk4-layer-shell Crate Overview Source: https://docs.rs/gtk4-layer-shell/index Provides a high-level overview of the gtk4-layer-shell crate, including its version, license, source code links, and dependencies. It also lists supported platforms and feature flags. ```rust Crate: gtk4-layer-shell 0.5.0 License: MIT Source: https://github.com/pentamassiv/gtk4-layer-shell-gir/tree/main/gtk4-layer-shell Crates.io: https://crates.io/crates/gtk4-layer-shell Documentation Coverage: 88.1% Supported Platforms: i686-pc-windows-msvc, i686-unknown-linux-gnu, x86_64-apple-darwin, x86_64-pc-windows-msvc, x86_64-unknown-linux-gnu Dependencies: - bitflags ^2.0 - gdk4 ^0.9 - glib ^0.20 - glib-sys ^0.20 - gtk4 ^0.9 - gtk4-layer-shell-sys ^0.3 - libc ^0.2 - gio ^0.20 (dev) - libadwaita ^0.7 (dev) - relm4 ^0.9 (dev) ``` -------------------------------- ### Get Layer Surface Monitor Source: https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/lib Retrieves the monitor associated with a layer surface. This function returns an Option which can be None if the monitor is not available. It also provides a note on how to get the actual monitor using gdk_display_get_monitor_at_window(). ```rust fn monitor(&self) -> Option { [crate::auto::functions::monitor](https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/auto/functions.rs.html#168-173)(self) } ``` -------------------------------- ### gtk4-layer-shell Crate Overview Source: https://docs.rs/gtk4-layer-shell/latest/index Provides a high-level overview of the gtk4-layer-shell crate, including its version, license, source code links, and dependencies. It also lists supported platforms and feature flags. ```rust Crate: gtk4-layer-shell 0.5.0 License: MIT Source: https://github.com/pentamassiv/gtk4-layer-shell-gir/tree/main/gtk4-layer-shell Crates.io: https://crates.io/crates/gtk4-layer-shell Documentation Coverage: 88.1% Supported Platforms: i686-pc-windows-msvc, i686-unknown-linux-gnu, x86_64-apple-darwin, x86_64-pc-windows-msvc, x86_64-unknown-linux-gnu Dependencies: - bitflags ^2.0 - gdk4 ^0.9 - glib ^0.20 - glib-sys ^0.20 - gtk4 ^0.9 - gtk4-layer-shell-sys ^0.3 - libc ^0.2 - gio ^0.20 (dev) - libadwaita ^0.7 (dev) - relm4 ^0.9 (dev) ``` -------------------------------- ### Get Protocol Version Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/auto/functions Retrieves the current version of the layer shell protocol. This function requires the main thread to be initialized. ```rust pub fn protocol_version() -> u32 { assert_initialized_main_thread(); unsafe { ffi::gtk_layer_get_protocol_version() } } ``` -------------------------------- ### Get Layer Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/lib Retrieves the current layer of a layer surface. This indicates which layer the surface is placed on (e.g., background, top). ```rust fn layer(&self) -> Option { [crate::auto::functions::layer](https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/auto/functions.rs.html#95-100)(self) } ``` -------------------------------- ### gtk4-layer-shell Crate Overview Source: https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/manual Provides an overview of the gtk4-layer-shell crate, including its version, license, source code links, and dependencies. It also indicates the percentage of documented code. ```rust Crate: gtk4-layer-shell Version: 0.5.0 License: MIT Documentation Coverage: 88.1% Dependencies: - bitflags ^2.0 - gdk4 ^0.9 - glib ^0.20 - glib-sys ^0.20 - gtk4 ^0.9 - gtk4-layer-shell-sys ^0.3 - libc ^0.2 Dev Dependencies: - gio ^0.20 - libadwaita ^0.7 - relm4 ^0.9 ``` -------------------------------- ### Get Margin Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/lib Retrieves the size of the margin for a given edge of the layer surface. This is used to reserve space around the layer surface. ```rust fn get_margin(&self, edge: Edge) -> i32 { [crate::auto::functions::get_margin](https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/auto/functions.rs.html#105-110)(self, edge) } ``` -------------------------------- ### gtk4-layer-shell-sys Crate Overview Source: https://docs.rs/gtk4-layer-shell/-sys/0.3.0/gtk4_layer_shell_sys/all Provides an overview of the gtk4-layer-shell-sys crate, including its version, license, dependencies, and documentation status. It also lists supported platforms and feature flags. ```rust crate: gtk4-layer-shell-sys version: 0.3.0 license: MIT dependencies: - gdk4-sys ^0.9 - glib-sys ^0.20 - gtk4-sys ^0.9 - libc ^0.2 - shell-words ^1.0.0 (dev) - tempfile ^3 (dev) - system-deps ^7 (build) platforms: - i686-pc-windows-msvc - i686-unknown-linux-gnu - x86_64-apple-darwin - x86_64-pc-windows-msvc - x86_64-unknown-linux-gnu documented: 0% ``` -------------------------------- ### Get Exclusive Zone Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/lib Retrieves the exclusive zone information for a layer surface. This value indicates the space reserved by the layer surface. ```rust fn exclusive_zone(&self) -> i32 { [crate::auto::functions::exclusive_zone](https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/auto/functions.rs.html#65-70)(self) } ``` -------------------------------- ### gtk4-layer-shell Crate Overview Source: https://docs.rs/gtk4-layer-shell/latest/gtk4_layer_shell/index Provides an overview of the gtk4-layer-shell crate, including its version, documentation status, source links, and dependencies. It also lists supported platforms and feature flags. ```rust Crate gtk4_layer_shell 0.5.0 Documentation Status: 88.1% documented Dependencies: - bitflags ^2.0 - gdk4 ^0.9 - glib ^0.20 - glib-sys ^0.20 - gtk4 ^0.9 - gtk4-layer-shell-sys ^0.3 - libc ^0.2 Development Dependencies: - gio ^0.20 - libadwaita ^0.7 - relm4 ^0.9 Supported Platforms: - i686-pc-windows-msvc - i686-unknown-linux-gnu - x86_64-apple-darwin - x86_64-pc-windows-msvc - x86_64-unknown-linux-gnu Feature Flags: Available feature flags can be browsed on docs.rs. ``` -------------------------------- ### gtk4-layer-shell Crate Overview Source: https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/lib Provides an overview of the gtk4-layer-shell crate, including its version, license, source code links, and dependencies. It also indicates the percentage of documented code. ```rust Crate: gtk4-layer-shell Version: 0.5.0 License: MIT Dependencies: - bitflags ^2.0 - gdk4 ^0.9 - glib ^0.20 - glib-sys ^0.20 - gtk4 ^0.9 - gtk4-layer-shell-sys ^0.3 - libc ^0.2 - gio ^0.20 (dev) - libadwaita ^0.7 (dev) - relm4 ^0.9 (dev) Documentation Coverage: 88.1% ``` -------------------------------- ### Get Margin Size Source: https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/lib Retrieves the size of the margin for a given edge of a layer surface. This function is part of the GTK4 Layer Shell library. ```rust fn get_margin(&self, edge: Edge) -> i32 { [crate::auto::functions::get_margin](https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/auto/functions.rs.html#109-114)(self, edge) } ``` -------------------------------- ### Get Keyboard Mode Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/lib Retrieves the current keyboard interactivity mode for a layer surface. This determines how the layer surface interacts with the virtual keyboard. ```rust fn keyboard_mode(&self) -> KeyboardMode { [crate::auto::functions::keyboard_mode](https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/auto/functions.rs.html#80-85)(self) } ``` -------------------------------- ### gtk4-layer-shell Library Entry Point Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/auto/enums This snippet refers to the main library file (lib.rs) for the gtk4-layer-shell crate. It serves as the entry point for the library's functionality. ```rust // lib.rs - Entry point for the gtk4-layer-shell crate // Contains the main module and potentially re-exports of important items. ``` -------------------------------- ### Get Exclusive Zone Source: https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/lib Retrieves the exclusive zone value for a layer surface. This function is part of the GTK4 Layer Shell library and returns an i32. ```rust fn exclusive_zone(&self) -> i32 { [crate::auto::functions::exclusive_zone](https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/auto/functions.rs.html#65-70)(self) } ``` -------------------------------- ### gtk4-layer-shell Crate Overview Source: https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/auto/mod Provides an overview of the gtk4-layer-shell crate, including its version, license, source code links, and dependencies. It also indicates the percentage of documented code. ```Rust Crate: gtk4-layer-shell Version: 0.5.0 License: MIT Dependencies: - bitflags ^2.0 - gdk4 ^0.9 - glib ^0.20 - glib-sys ^0.20 - gtk4 ^0.9 - gtk4-layer-shell-sys ^0.3 - libc ^0.2 - gio ^0.20 (dev) - libadwaita ^0.7 (dev) - relm4 ^0.9 (dev) Documentation Coverage: 88.1% ``` -------------------------------- ### Get Layer Information Source: https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/lib Retrieves the current layer for a layer surface. This function is part of the GTK4 Layer Shell library and returns an Option. ```rust fn layer(&self) -> Option { [crate::auto::functions::layer](https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/auto/functions.rs.html#95-100)(self) } ``` -------------------------------- ### Get Exclusive Zone of a GTK Window Source: https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/auto/functions Retrieves the exclusive zone of a given GTK window. The exclusive zone can be set manually or automatically by the system. ```rust pub fn exclusive_zone(window: &impl IsA) -> i32 { assert_initialized_main_thread!(); unsafe { ffi::gtk_layer_get_exclusive_zone(window.as_ref().to_glib_none().0) } } ``` -------------------------------- ### gtk4-layer-shell Crate Overview Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/lib Provides an overview of the gtk4-layer-shell crate, including its version, license, source code links, and dependencies. It also lists the supported platforms and documentation coverage. ```rust Crate: gtk4-layer-shell Version: 0.5.0 License: MIT Source: https://github.com/pentamassiv/gtk4-layer-shell-gir/tree/main/gtk4-layer-shell Dependencies: - bitflags ^2.0 - gdk4 ^0.9 - glib ^0.20 - glib-sys ^0.20 - gtk4 ^0.9 - gtk4-layer-shell-sys ^0.3 - libc ^0.2 - gio ^0.20 (dev) - libadwaita ^0.7 (dev) - relm4 ^0.9 (dev) Documentation Coverage: 88.1% Supported Platforms: - i686-pc-windows-msvc - i686-unknown-linux-gnu - x86_64-apple-darwin - x86_64-pc-windows-msvc - x86_64-unknown-linux-gnu ``` -------------------------------- ### Get GTK Layer Shell Major Version Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/auto/functions Returns the major version number of the GTK Layer Shell library. This is useful for compatibility checks. ```rust pub fn major_version() -> u32 { assert_initialized_main_thread!(); unsafe { ffi::gtk_layer_get_major_version() } } ``` -------------------------------- ### gtk4-layer-shell-sys Crate Overview Source: https://docs.rs/gtk4-layer-shell/-sys/0.3.0/gtk4_layer_shell_sys/index This section provides a high-level overview of the gtk4-layer-shell-sys crate, including its version, links to its documentation, source code, and related crates. It also lists the crate's dependencies and available feature flags. ```rust Crate gtk4_layer_shell_sys 0.3.0 Dependencies: * gdk4-sys ^0.9 * glib-sys ^0.20 * gtk4-sys ^0.9 * libc ^0.2 * shell-words ^1.0.0 (dev) * tempfile ^3 (dev) * system-deps ^7 (build) Platform Support: * i686-pc-windows-msvc * i686-unknown-linux-gnu * x86_64-apple-darwin * x86_64-pc-windows-msvc * x86_64-unknown-linux-gnu Feature flags: Browse available feature flags. ``` -------------------------------- ### Get Window Margin Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/auto/functions Retrieves the margin size for a specific edge of a GTK layer surface window. This function requires the GTK application to be initialized. ```rust pub fn margin(window: &impl IsA, edge: Edge) -> i32 { assert_initialized_main_thread!(); unsafe { ffi::gtk_layer_get_margin(window.as_ref().to_glib_none().0, edge.into_glib()) } } ``` -------------------------------- ### Get Layer Surface Margin Source: https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/lib Retrieves the margin of a layer surface for a specific edge. This function takes an Edge enum as input and returns the margin as an i32. ```rust fn margin(&self, edge: Edge) -> i32 { [crate::auto::functions::margin](https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/auto/functions.rs.html#125-130)(self, edge) } ``` -------------------------------- ### gtk4-layer-shell Crate Overview Source: https://docs.rs/gtk4-layer-shell/latest/gtk4_layer_shell Provides an overview of the gtk4-layer-shell Rust crate, including its version, documentation status, dependencies, and available platforms. It also links to the source code and related resources. ```rust Crate gtk4_layer_shell 0.5.0 Documentation Status: 88.1% documented Dependencies: - bitflags ^2.0 - gdk4 ^0.9 - glib ^0.20 - glib-sys ^0.20 - gtk4 ^0.9 - gtk4-layer-shell-sys ^0.3 - libc ^0.2 Development Dependencies: - gio ^0.20 - libadwaita ^0.7 - relm4 ^0.9 Platform Support: i686-pc-windows-msvc i686-unknown-linux-gnu x86_64-apple-darwin x86_64-pc-windows-msvc x86_64-unknown-linux-gnu Feature Flags: Available via docs.rs ``` -------------------------------- ### Get Layer Shell Protocol Version Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/auto/functions Retrieves the version of the zwlr_layer_shell_v1 protocol supported by the compositor. This function might block for a Wayland roundtrip on its first invocation. ```APIDOC /// May block for a Wayland roundtrip the first time it's called. /// # Returns /// version of the zwlr_layer_shell_v1 protocol supported by the /// compositor or 0 if the protocol is not supported. ``` -------------------------------- ### Rust Ecosystem Links Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/auto/mod Provides links to essential Rust resources, including the official website, documentation, and community tools. ```rust Rust Resources: - Rust website: https://www.rust-lang.org/ - The Book: https://doc.rust-lang.org/book/ - Standard Library API Reference: https://doc.rust-lang.org/std/ - Rust by Example: https://doc.rust-lang.org/rust-by-example/ - The Cargo Guide: https://doc.rust-lang.org/cargo/guide/ - Clippy Documentation: https://doc.rust-lang.org/nightly/clippy ``` -------------------------------- ### Get Layer Surface Layer Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/auto/functions Retrieves the current layer of a layer surface. This function takes a GTK window as input and returns the associated layer type. ```rust pub fn layer(window: &impl IsA) -> Option { assert_initialized_main_thread!(); unsafe { from_glib(ffi::gtk_layer_get_layer(window.as_ref().to_glib_none().0)) } } ``` -------------------------------- ### gtk4-layer-shell Crate Overview Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/auto/mod Provides an overview of the gtk4-layer-shell crate, including its version, license, dependencies, and documentation status. It also lists supported platforms and feature flags. ```rust Crate: gtk4-layer-shell Version: 0.5.0 License: MIT Documentation: 88.1% complete Dependencies: - bitflags ^2.0 - gdk4 ^0.9 - glib ^0.20 - glib-sys ^0.20 - gtk4 ^0.9 - gtk4-layer-shell-sys ^0.3 - libc ^0.2 - gio ^0.20 (dev) - libadwaita ^0.7 (dev) - relm4 ^0.9 (dev) Supported Platforms: - i686-pc-windows-msvc - i686-unknown-linux-gnu - x86_64-apple-darwin - x86_64-pc-windows-msvc - x86_64-unknown-linux-gnu ``` -------------------------------- ### Get Margin for Edge Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/lib Retrieves the margin for a specific edge of a layer surface. This function is part of the gtk4-layer-shell crate and interacts with GTK4 layer shell functionalities. ```rust fn margin(&self, edge: Edge) -> i32 { [crate::auto::functions::margin](https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/auto/functions.rs.html#125-130)(self, edge) } ``` -------------------------------- ### GTK4 Layer Shell Sys API Documentation Source: https://docs.rs/gtk4-layer-shell/-sys/%5E0 This section provides detailed API documentation for the gtk4-layer-shell-sys library. It covers functions for initializing and managing layer surfaces, setting various properties like anchors, exclusive zones, keyboard modes, layers, margins, and monitors. It also includes utility functions for checking support and retrieving version information. ```APIDOC gtk_layer_auto_exclusive_zone_enable(window: gpointer) Enables the auto exclusive zone for the given window. gtk_layer_auto_exclusive_zone_is_enabled(window: gpointer) -> gboolean Checks if the auto exclusive zone is enabled for the given window. gtk_layer_get_anchor(window: gpointer, edge: LayerShellEdge) -> LayerAttributeState Gets the anchor state for a specific edge of the layer surface. Parameters: window: The GTK window. edge: The edge of the layer surface (e.g., LAYER_SHELL_EDGE_TOP). Returns: The current anchor state. gtk_layer_get_exclusive_zone(window: gpointer) -> gint Gets the exclusive zone value for the given window. gtk_layer_get_keyboard_mode(window: gpointer) -> LayerShellKeyboardMode Gets the keyboard mode for the layer surface. gtk_layer_get_layer(window: gpointer) -> LayerShellLayer Gets the layer for the layer surface. gtk_layer_get_major_version() -> guint Gets the major version of the library. gtk_layer_get_margin(window: gpointer, edge: LayerShellEdge) -> gint Gets the margin for a specific edge of the layer surface. Parameters: window: The GTK window. edge: The edge of the layer surface. Returns: The margin value. gtk_layer_get_micro_version() -> guint Gets the micro version of the library. gtk_layer_get_minor_version() -> guint Gets the minor version of the library. gtk_layer_get_monitor(window: gpointer) -> gpointer Gets the monitor associated with the layer surface. gtk_layer_get_namespace(window: gpointer) -> Option Gets the namespace associated with the layer surface. gtk_layer_get_protocol_version() -> guint Gets the protocol version supported by the library. gtk_layer_get_zwlr_layer_surface_v1(window: gpointer) -> gpointer Gets the zwlr_layer_surface_v1 for the layer surface. gtk_layer_init_for_window(window: gpointer) Initializes the layer shell for the given GTK window. gtk_layer_is_layer_window(window: gpointer) -> gboolean Checks if the given window is a layer window. gtk_layer_is_supported() -> gboolean Checks if the layer shell protocol is supported by the system. gtk_layer_set_anchor(window: gpointer, edge: LayerShellEdge, anchor_state: LayerAttributeState) Sets the anchor state for a specific edge of the layer surface. Parameters: window: The GTK window. edge: The edge of the layer surface. anchor_state: The desired anchor state. gtk_layer_set_exclusive_zone(window: gpointer, zone: gint) Sets the exclusive zone for the layer surface. gtk_layer_set_keyboard_mode(window: gpointer, mode: LayerShellKeyboardMode) Sets the keyboard mode for the layer surface. gtk_layer_set_layer(window: gpointer, layer: LayerShellLayer) Sets the layer for the layer surface. gtk_layer_set_margin(window: gpointer, edge: LayerShellEdge, margin: gint) Sets the margin for a specific edge of the layer surface. Parameters: window: The GTK window. edge: The edge of the layer surface. margin: The desired margin value. gtk_layer_set_monitor(window: gpointer, monitor: gpointer) Sets the monitor for the layer surface. gtk_layer_set_namespace(window: gpointer, name_space: Option) Sets the namespace for the layer surface. ``` -------------------------------- ### Get ZwlrLayerSurfaceV1 from GTK Window Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/manual Retrieves the underlying zwlr_layer_surface_v1 Wayland object associated with a GTK window. This function is essential for interacting with Wayland layer surfaces. ```rust use gtk4_layer_shell::zwlr_layer_surface_v1; use gtk::Window; // Assuming 'window' is a valid gtk::Window instance // let window: Window = ...; // let layer_surface = zwlr_layer_surface_v1(&window); // println!("Layer surface pointer: {:?}", layer_surface); ``` -------------------------------- ### gtk4-layer-shell Manual Implementation Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/auto/enums This snippet points to the manual implementation file (manual.rs) for the gtk4-layer-shell crate. This file likely contains manually written bindings or more detailed explanations. ```rust // manual.rs - Manual implementations and documentation for gtk4-layer-shell ``` -------------------------------- ### gtk4-layer-shell Source Files Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/manual Lists the main source files within the gtk4-layer-shell crate, including auto-generated enums, functions, and the main module file, as well as the library's entry point and manual documentation. ```rust Source Files: - gtk4_layer_shell/auto/enums.rs - gtk4_layer_shell/auto/functions.rs - gtk4_layer_shell/auto/mod.rs - gtk4_layer_shell/lib.rs - gtk4_layer_shell/manual.rs ``` -------------------------------- ### GTK Layer Shell API Documentation Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/auto/functions Provides API details for GTK Layer Shell functions, including how to get window margins and library version information. ```APIDOC /// ## `window` /// A layer surface. /// ## `edge` /// the margin edge to get /// /// # Returns /// /// the size of the margin for the given edge. #[doc(alias = "gtk_layer_get_margin")] #[doc(alias = "get_margin")] pub fn margin(window: &impl IsA, edge: Edge) -> i32 // Parameters: // - window: A GTK window implementing the IsA trait. // - edge: The specific edge for which to retrieve the margin (e.g., TOP, BOTTOM, LEFT, RIGHT). // Returns: // - The size of the margin for the specified edge as an i32. /// # Returns /// /// the micro/patch version number of the GTK Layer Shell library #[doc(alias = "gtk_layer_get_micro_version")] #[doc(alias = "get_micro_version")] pub fn micro_version() -> u32 // Returns: // - The micro/patch version of the GTK Layer Shell library as a u32. ``` -------------------------------- ### GTK4 Layer Shell API Documentation Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/auto/functions Provides API documentation for the GTK4 Layer Shell library, including functions for setting window layers and margins. ```APIDOC set_layer: Sets the layer for a given window. Parameters: window: A reference to a GTK Window that implements the IsA trait. layer: The Layer enum value specifying the layer for the surface. Default Layer: Layer::Top Usage: set_layer(window, Layer::Top); set_margin: Sets the margin for a specific edge of a window. This affects the surface's distance from the edge and its exclusive zone size. Parameters: window: A reference to a GTK Window that implements the IsA trait. edge: The Edge enum value specifying which edge to set the margin for. margin_size: An i32 value representing the margin size in pixels. Default Margin: 0 for all edges. Usage: set_margin(window, Edge::Left, 10); set_margin(window, Edge::Right, 10); set_margin(window, Edge::Top, 5); set_margin(window, Edge::Bottom, 5); ``` -------------------------------- ### Get GTK Layer Shell Micro Version Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/auto/functions Returns the micro/patch version number of the GTK Layer Shell library. This function requires the GTK application to be initialized. ```rust pub fn micro_version() -> u32 { assert_initialized_main_thread!(); unsafe { ffi::gtk_layer_get_micro_version() } } ``` -------------------------------- ### Rustdoc Keyboard Shortcuts Source: https://docs.rs/gtk4-layer-shell/latest/help This section details the keyboard shortcuts available for navigating the rustdoc documentation. These shortcuts enhance user experience by allowing quick access to search, navigation, and expansion/collapse features. ```APIDOC `?`: Show this help dialog `S` / `/`: Focus the search field `↑`: Move up in search results `↓`: Move down in search results `←` / `→`: Switch result tab (when results focused) `⏎`: Go to active search result `+`: Expand all sections `-`: Collapse all sections ``` -------------------------------- ### Get Keyboard Interactivity Mode Source: https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/lib Retrieves the current keyboard interactivity mode for a layer surface. This function is part of the GTK4 Layer Shell library and returns a KeyboardMode enum. ```rust fn keyboard_mode(&self) -> KeyboardMode { [crate::auto::functions::keyboard_mode](https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/auto/functions.rs.html#80-85)(self) } ``` -------------------------------- ### GTK Layer Shell API Documentation Source: https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/auto/functions Provides API documentation for GTK Layer Shell functions, including getting the exclusive zone and keyboard interactivity mode of a window. ```APIDOC /// ## `window` /// A layer surface. /// /// # Returns /// /// the window's exclusive zone(which may have been set manually or automatically) #[doc(alias = "gtk_layer_get_exclusive_zone")] #[doc(alias = "get_exclusive_zone")] pub fn exclusive_zone(window: &impl IsA) -> i32 /// ## `window` /// A layer surface. /// /// # Returns /// /// current keyboard interactivity mode for `window`. #[doc(alias = "gtk_layer_get_keyboard_mode")] #[doc(alias = "get_keyboard_mode")] ``` -------------------------------- ### Rustdoc Keyboard Shortcuts Source: https://docs.rs/gtk4-layer-shell/0.5.0/help This section details the keyboard shortcuts available within the rustdoc documentation interface for efficient navigation and searching. ```APIDOC Rustdoc Keyboard Shortcuts: `?`: Show this help dialog `S` / `/`: Focus the search field `↑`: Move up in search results `↓`: Move down in search results `←` / `→`: Switch result tab (when results focused) `⏎`: Go to active search result `+`: Expand all sections `-`: Collapse all sections ``` -------------------------------- ### GTK4 Layer Shell: Get Exclusive Zone Source: https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/lib Retrieves the current exclusive zone value for a layer surface. This value indicates how the window is managed within the exclusive zone system. ```rust fn get_exclusive_zone(&self) -> i32 { [crate::auto::functions::get_exclusive_zone](https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/auto/functions.rs.html#60-65)(self) } ``` -------------------------------- ### GTK Layer Shell API Functions Source: https://docs.rs/gtk4-layer-shell/-sys/0.3.0/src/gtk4_layer_shell_sys/lib This section provides documentation for various functions related to GTK Layer Shell functionality. These functions allow for initialization, setting properties like anchors and layers, and retrieving information about the layer shell and its associated window. ```APIDOC APIDOC: gtk_layer_get_exclusive_zone(window: *mut gtk::GtkWindow) -> c_int Retrieves the exclusive zone value for a given GTK window. Parameters: window: A pointer to the GtkWindow. Returns: An integer representing the exclusive zone. gtk_layer_get_keyboard_mode(window: *mut gtk::GtkWindow) -> GtkLayerShellKeyboardMode Retrieves the keyboard mode for a given GTK window. Parameters: window: A pointer to the GtkWindow. Returns: The GtkLayerShellKeyboardMode enum value. gtk_layer_get_layer(window: *mut gtk::GtkWindow) -> GtkLayerShellLayer Retrieves the layer for a given GTK window. Parameters: window: A pointer to the GtkWindow. Returns: The GtkLayerShellLayer enum value. gtk_layer_get_major_version() -> c_uint Retrieves the major version of the GTK Layer Shell protocol. Returns: An unsigned integer representing the major version. gtk_layer_get_margin(window: *mut gtk::GtkWindow, edge: GtkLayerShellEdge) -> c_int Retrieves the margin for a specific edge of a GTK window. Parameters: window: A pointer to the GtkWindow. edge: The GtkLayerShellEdge to get the margin for. Returns: An integer representing the margin size. gtk_layer_get_micro_version() -> c_uint Retrieves the micro version of the GTK Layer Shell protocol. Returns: An unsigned integer representing the micro version. gtk_layer_get_minor_version() -> c_uint Retrieves the minor version of the GTK Layer Shell protocol. Returns: An unsigned integer representing the minor version. gtk_layer_get_monitor(window: *mut gtk::GtkWindow) -> *mut gdk::GdkMonitor Retrieves the GdkMonitor associated with a GTK window. Parameters: window: A pointer to the GtkWindow. Returns: A pointer to the GdkMonitor. gtk_layer_get_namespace(window: *mut gtk::GtkWindow) -> *const c_char Retrieves the namespace for a given GTK window. Parameters: window: A pointer to the GtkWindow. Returns: A C-style string representing the namespace. gtk_layer_get_protocol_version() -> c_uint Retrieves the current protocol version of the GTK Layer Shell. Returns: An unsigned integer representing the protocol version. gtk_layer_get_zwlr_layer_surface_v1(window: *mut gtk::GtkWindow) -> *mut zwlr_layer_surface_v1 Retrieves the zwlr_layer_surface_v1 object for a given GTK window. Parameters: window: A pointer to the GtkWindow. Returns: A pointer to the zwlr_layer_surface_v1 object. gtk_layer_init_for_window(window: *mut gtk::GtkWindow) Initializes the layer shell for a given GTK window. Parameters: window: A pointer to the GtkWindow. gtk_layer_is_layer_window(window: *mut gtk::GtkWindow) -> gboolean Checks if a given GTK window is a layer window. Parameters: window: A pointer to the GtkWindow. Returns: A gboolean indicating whether the window is a layer window. gtk_layer_is_supported() -> gboolean Checks if the layer shell protocol is supported. Returns: A gboolean indicating whether the protocol is supported. gtk_layer_set_anchor(window: *mut gtk::GtkWindow, edge: GtkLayerShellEdge, anchor_to_edge: gboolean) Sets the anchor for a specific edge of a GTK window. Parameters: window: A pointer to the GtkWindow. edge: The GtkLayerShellEdge to set the anchor for. anchor_to_edge: A gboolean indicating whether to anchor to the edge. ``` -------------------------------- ### Get GTK Layer Shell Major Version Source: https://docs.rs/gtk4-layer-shell/latest/src/gtk4_layer_shell/auto/functions Retrieves the major version number of the GTK Layer Shell library. This function ensures the library is initialized before accessing the version information. ```rust pub fn major_version() -> u32 { assert_initialized_main_thread(); unsafe { ffi::gtk_layer_get_major_version() } } ``` -------------------------------- ### gtk4-layer-shell Crate Information Source: https://docs.rs/gtk4-layer-shell/0.5.0/src/gtk4_layer_shell/auto/functions Provides an overview of the gtk4-layer-shell crate, including its version, license, source code links, and dependencies. It also indicates the percentage of the crate that is documented. ```rust crate: gtk4-layer-shell version: 0.5.0 license: MIT dependencies: - bitflags ^2.0 - gdk4 ^0.9 - glib ^0.20 - glib-sys ^0.20 - gtk4 ^0.9 - gtk4-layer-shell-sys ^0.3 - libc ^0.2 - gio ^0.20 (dev) - libadwaita ^0.7 (dev) - relm4 ^0.9 (dev) Documentation coverage: 88.1% ``` -------------------------------- ### gtk4-layer-shell-sys Crate Overview Source: https://docs.rs/gtk4-layer-shell/-sys/0.3.0/x86_64-unknown-linux-gnu/gtk4_layer_shell_sys/index This section provides a high-level overview of the gtk4-layer-shell-sys crate, including its version, links to its documentation, source code, and related crates. It also lists the crate's dependencies and available feature flags. ```rust Crate gtk4_layer_shell_sys 0.3.0 Dependencies: * gdk4-sys ^0.9 * glib-sys ^0.20 * gtk4-sys ^0.9 * libc ^0.2 * shell-words ^1.0.0 (dev) * tempfile ^3 (dev) * system-deps ^7 (build) Platform Support: * i686-pc-windows-msvc * i686-unknown-linux-gnu * x86_64-apple-darwin * x86_64-pc-windows-msvc * x86_64-unknown-linux-gnu Feature flags: Browse available feature flags. ```