7 releases (breaking)
| 0.5.0 | Oct 30, 2025 |
|---|---|
| 0.4.0 | Aug 31, 2025 |
| 0.3.0 | Jul 15, 2024 |
| 0.2.0 | Apr 4, 2024 |
| 0.0.2 | Apr 12, 2023 |
#1564 in GUI
12,311 downloads per month
Used in 28 crates
(via gtk4-layer-shell)
12KB
80 lines
gtk4-layer-shell-sys
These are the unsafe FFI bindings for gtk4-layer-shell. You likely want to use that crate instead. It allows building desktop shell components such as panels, notifications and wallpapers with GTK4. It can be used to anchor your windows to a corner or edge of the output, or stretch them across the entire output. To do that, it uses the Layer Shell Wayland protocol. A list of supported compositors can be found here.
Dependencies
You need to have gtk4 and gtk4-layer-shell (the C library) installed on your system. gtk4-layer-shell version 1.1.0 or higher is needed to use gtk4-session-lock. If you want to use gtk4-layer-shell and gtk4-session-lock together in a project, make sure to use the same .so file of gtk4-layer-shell for both.
If your distribution does not provide a current enough version of gtk4-layer-shell, you can build it from source. If you did that, you might also have to set the following two environment variables:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export LD_LIBRARY_PATH=/usr/local/lib
Generating the bindings
Generating the bindings yourself is not necessary to be able to use them. You can just use the version published on crates.io. If you want to do it anyways, you can find a description here.
Maintenance status
This crate is just an unsafe wrapper for the C library so the bindings are feature complete and not actively worked on. The C library is actively developed and I keep the bindings up-to-date with it. If you encounter any problems, feel free to open a PR.
Contributing
Pull requests are very welcome but please keep the maintenance status in mind.
License
Dependencies
~2.7–4.5MB
~98K SLoC