Crates.io | gtk-layer-shell |
lib.rs | gtk-layer-shell |
version | |
source | src |
created_at | 2020-08-24 03:05:51.263123 |
updated_at | 2024-12-09 12:40:53.916372 |
description | UNMAINTAINED Save gir-generated wrapper for gtk-layer-shell |
homepage | |
repository | https://github.com/pentamassiv/gtk-layer-shell-gir/tree/main/gtk-layer-shell |
max_upload_size | |
id | 279983 |
Cargo.toml error: | TOML parse error at line 20, column 1 | 20 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
This is the safe wrapper for gtk-layer-shell, automatically generated from its .gir file. The unsafe bindings can be found here. This crate is GTK3 only. Use gtk4-layer-shell if you need to use it with GTK4.
Have a look at the simple example to see how the bindings can be used. It works analogous to the original. You can use the features to select the version of gtk-layer-shell. Currently v0_6 is the default.
Generating the wrapper yourself is not necessary to be able to use it. You can just use the version published on crates.io. If you want to do it anyways, you need to start by generating the unsafe bindings. Follow the guide on how to do that and come back here.
Now that you have generated the bindings you will want to generate the safe wrapper.
cd gtk-layer-shell
gir -o .
cargo build
cargo test
There should not have been any errors. To make sure everything you need was created, run the following command.
gir -o . -m not_bound
There should not be any output to this command. Let me know if there is so I can fix it. In order to build the documentation, you have to run
gir -c Gir.toml --doc-target-path docs.md -m doc
cargo install rustdoc-stripper
rustdoc-stripper -s -n
rustdoc-stripper -g -o docs.md
cargo doc
Congratulations, you've done it :-)
If you want to learn more about gir, have a look at its repo or its book.
The Rust bindings for GTK3 are no longer maintained and the repo has been archived. If you are starting a new project, you should use GTK4 and thus gtk4-layer-shell right from the start.
This crate is just a safe wrapper for the C library so it is feature complete and not actively worked on. There are Github Actions keeping the dependencies up-to-date. If you encounter any problems, feel free to open a PR.
Pull requests are very welcome but please keep the maintenance status in mind.