17 unstable releases (7 breaking)

0.8.0 Sep 22, 2023
0.6.1 Mar 27, 2023
0.5.0 Oct 23, 2022
0.4.1 Jun 12, 2022
0.2.0 Nov 4, 2020

#281 in GUI

Download history 1221/week @ 2023-12-13 1231/week @ 2023-12-20 1202/week @ 2023-12-27 1576/week @ 2024-01-03 1521/week @ 2024-01-10 1755/week @ 2024-01-17 1412/week @ 2024-01-24 1554/week @ 2024-01-31 1271/week @ 2024-02-07 1651/week @ 2024-02-14 1987/week @ 2024-02-21 1786/week @ 2024-02-28 1941/week @ 2024-03-06 1884/week @ 2024-03-13 2077/week @ 2024-03-20 1711/week @ 2024-03-27

7,827 downloads per month
Used in 6 crates

MIT license

54KB
630 lines

maintenance-status: passively-maintained (as of 2023-08-03) dependabot status

Build

gtk-layer-shell: Crate docs.rs dependency status

gtk-layer-shell

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.

Usage

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

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.

Maintenance status

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.

Contributing

Pull requests are very welcome but please keep the maintenance status in mind.

License

MIT

Dependencies

~17MB
~403K SLoC