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

unmaintained sys gtk-layer-shell-sys

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

16 releases

0.7.2 Dec 9, 2024
0.7.1 Jul 10, 2024
0.7.0 Sep 3, 2023
0.6.0 Mar 1, 2023
0.2.0 Nov 4, 2020

#69 in #unsafe-bindings

Download history 2492/week @ 2024-08-26 2668/week @ 2024-09-02 2822/week @ 2024-09-09 3139/week @ 2024-09-16 2773/week @ 2024-09-23 2666/week @ 2024-09-30 3359/week @ 2024-10-07 3515/week @ 2024-10-14 3109/week @ 2024-10-21 3318/week @ 2024-10-28 3114/week @ 2024-11-04 3007/week @ 2024-11-11 2853/week @ 2024-11-18 2658/week @ 2024-11-25 2591/week @ 2024-12-02 2731/week @ 2024-12-09

11,260 downloads per month
Used in 9 crates (via gtk-layer-shell)

MIT license

14KB
110 lines

maintenance-status: obsolete dependabot status

Build

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

This project is UNMAINTAINED. Please use GTK4 and take a look at gtk4-layer-shell instead!

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, Gtk3 and gtk-layer-shell installed installed. Clone the repository AND the submodules "gir" and "gir-files".

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

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 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