|
| 1 | +# Rust GDK 4 X11 bindings |
| 2 | + |
| 3 | +The project website is [here](https://gtk-rs.org/). |
| 4 | + |
| 5 | +Rust bindings of [GDK 4's X11 backend](https://docs.gtk.org/gdk4-x11/), |
| 6 | +part of [gtk4-rs](https://github.com/gtk-rs/gtk4-rs/). |
| 7 | + |
| 8 | +GDK is an intermediate layer that isolates GTK from the details of the windowing system. |
| 9 | +GDK X11 contains functions specific to the X11 backend. |
| 10 | + |
| 11 | +## Minimum supported Rust version |
| 12 | + |
| 13 | +Currently, the minimum supported Rust version is `1.80`. |
| 14 | + |
| 15 | +## Documentation |
| 16 | + |
| 17 | +- The Rust API [Stable](https://gtk-rs.org/gtk4-rs/stable/latest/docs/gdk4_x11)/[Development](https://gtk-rs.org/gtk4-rs/git/docs/gdk4_x11/) |
| 18 | +- [The C API](https://docs.gtk.org/gdk4-x11/) |
| 19 | +- [GTK Installation instructions](https://www.gtk.org/docs/installations/) |
| 20 | + |
| 21 | +## Using |
| 22 | + |
| 23 | +We recommend using [crates from crates.io](https://crates.io/keywords/gtk-rs), |
| 24 | +as [demonstrated here](https://gtk-rs.org/gtk4-rs/stable/latest/docs/gtk4/index.html#library-versions). |
| 25 | + |
| 26 | +If you want to track the bleeding edge, use the git dependency instead: |
| 27 | + |
| 28 | +```toml |
| 29 | +[dependencies] |
| 30 | +gdk-wayland = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gdk4-wayland" } |
| 31 | +``` |
| 32 | + |
| 33 | +Avoid mixing versioned and git crates like this: |
| 34 | + |
| 35 | +```toml |
| 36 | +# This will not compile |
| 37 | +[dependencies] |
| 38 | +gdk-x11 = {version = "0.1", package = "gdk4-x11"} |
| 39 | +gdk-wayland = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gdk4-wayland" } |
| 40 | +``` |
| 41 | + |
| 42 | +### Features |
| 43 | + |
| 44 | +| Feature | Description | |
| 45 | +| --- | ----------- | |
| 46 | +| `v4_16` | Enable the new APIs part of GTK 4.16 | |
| 47 | +| `v4_10` | Enable the new APIs part of GTK 4.10 | |
| 48 | +| `v4_4` | Enable the new APIs part of GTK 4.4 | |
| 49 | +| `egl` | Integration with the [khronos-egl](https://crates.io/crates/khronos-egl) crate | |
| 50 | +| `xlib` | Integration with the [x11](https://crates.io/crates/x11) crate | |
| 51 | + |
| 52 | +### See Also |
| 53 | + |
| 54 | +- [glib](https://crates.io/crates/glib) |
| 55 | +- [gio](https://crates.io/crates/gio) |
| 56 | +- [gsk4](https://crates.io/crates/gsk4) |
| 57 | +- [gdk4](https://crates.io/crates/gdk4) |
| 58 | +- [gtk4](https://crates.io/crates/gtk4) |
| 59 | + |
| 60 | +## License |
| 61 | + |
| 62 | +The Rust bindings of __gdk4-x11__ are available under the MIT License, please refer to it. |
0 commit comments