winit-gtk

Crates.iowinit-gtk
lib.rswinit-gtk
version0.29.1
sourcesrc
created_at2023-09-10 12:38:25.183036
updated_at2023-10-19 04:43:58.695835
descriptionCross-platform window creation library.
homepage
repositoryhttps://github.com/wusyong/winit-gtk
max_upload_size
id968783
size1,589,220
Jason Tsai (pewsheen)

documentation

https://docs.rs/winit-gtk

README

winit-gtk

winit-gtk is winit fork with GTK backend. While we are waiting winit#2430, you can use this crate already by adding cargo patch to your project.

The minor version of winit-gtk should match to the exact winit version. Here is the compatibility table:

winit winit-gtk
0.28.7 0.29
0.28.6 0.28

Usage

GTK can be initialized in any thread, but the context must be in the same thread. winit-gtk makes sure Window and other proxy types can work in multiple thread. But if you want to call GTK methods yourself, it must be called in the same thread where event loop is created. Otherwise, GTK will panic.

winit-gtk will try to keep the same APIs as winit, but there are still some missing features. See tracking issues to know more info. The feature flags are also as same as winit, but x11 and wayland platform modules are replaced with gtk module.

winit-gtk is implemented in the way that can work with winit's control flow variants. It is indeed not the best way to work with GTK's main context IMHO. We are welcome anyone who is interested to help us improve, fix bugs, and fill out missing features.

Commit count: 29

cargo fmt