#unsafe-bindings #gtk #wayland #unsafe #gtk-layer-shell #ffi #bindings-generator

sys gtk-layer-shell-sys

Unsave gir-generated FFI bindings for gtk-layer-shell

14 releases (7 breaking)

0.7.0 Sep 3, 2023
0.6.0 Mar 1, 2023
0.5.1 Jan 14, 2023
0.5.0 Oct 23, 2022
0.2.0 Nov 4, 2020

#845 in GUI

Download history 1255/week @ 2023-12-14 1204/week @ 2023-12-21 1262/week @ 2023-12-28 1631/week @ 2024-01-04 1618/week @ 2024-01-11 1701/week @ 2024-01-18 1396/week @ 2024-01-25 1564/week @ 2024-02-01 1287/week @ 2024-02-08 1738/week @ 2024-02-15 1993/week @ 2024-02-22 1747/week @ 2024-02-29 2005/week @ 2024-03-07 1920/week @ 2024-03-14 2060/week @ 2024-03-21 1829/week @ 2024-03-28

8,021 downloads per month
Used in 7 crates (via gtk-layer-shell)

MIT license

13KB
104 lines

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

Build

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

gtk-layer-shell-sys

These are the unsafe FFI bindings for gtk-layer-shell. They were automatically generated from its .gir file. This crate is GTK3 only. Use gtk4-layer-shell if you need to use it with GTK4.

Usage

These are the unsafe bindings. You most likely want to use the safe wrapper. If you are sure you want the unsafe bindings, you can use the features to select the version of gtk-layer-shell. Default currently is v0_6.

Generating the bindings

Generating the bindings yourself is not necessary to be able to use it. If you want to do it anyways, here are the steps you can follow to generate the bindings yourself.

You need to have Rust, and Gtk3 installed. Clone the repository AND the submodule "gir".

git clone --recurse-submodules -j8 https://github.com/pentamassiv/gtk-layer-shell-gir.git
cd ./gtk-layer-shell-gir

Then you need to install gir.

cd gir
cargo install --path .
cd ..

If you regenerate the binding, because you have a new version of the GtkLayerShell gir file, copy it into the gir files folder. Now you can generate, build and test the bindings.

cd gtk-layer-shell-sys
gir -o .       # Regenerate the bindings
cargo build    # Build the created bindings
cargo test     # Test the created bindings
cd ..

There should not have been any errors. You should now continue and generate the safe wrapper. If you want to learn more about gir, have a look at its repo or its book.

Maintenance status

This crate is just an unsafe 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

~3.5MB
~70K SLoC