Is there a generic window creation library where "write once run everywhere"?

Your probably not going to find a graphics crate that meets all your requirements other than gtk-rs. Pretty much every other GUI crate in Rust lacks a lot of important features like accessibility support for people with disabilities (and there are very, very few crates that even support keyboard input/widget focus events to add that in yourself). gtk-rs lacks accessibility features at least on Windows (and probably Mac) but that's primarily GTK's fault and not the fault of gtk-rs.
Winit is not a UI library. It will create a window for you, but you cannot create menus or draw UI widgets in either an immediate-mode or retained-mode setup without either (1) manually implementing the drawing code yourself or (2) passing that off to another library -- and I don't know many immediate-mode crates that do that for you without also coming with window handling themselves.

1 Like

I thought you code that manually with the libraries?

I see thanks mate :slight_smile:

I'm not really sure what your asking. Usually, its up to the GUI library your using to implement accessibility support, unless the underlying library (e.g.: the win32 API) implements accessibility for you via a first-party technology (e.g.: UI automation). Sadly, accessibility is a very minor thing and many don't pay attention to it. I've wanted to write GUI apps in Rust for a while now but, since I'm blind and need to use a screen reader, and the majority of "recommended" UI libraries don't implement even widget focus events, I have to settle for one of the following:

  1. Using the raw system APIs
  2. Using something like QT or WX (which is just... Yuck)
  3. Implementing the support into the GUI library myself
  4. Settle for far less-well-known UI libraries

Though I'd be happy to help UI libraries with accessibility, there are already excellent guides on using technologies like UI automation for that task. (It might need COM on windows, for example, though.) Perhaps I'll look into it for libraries like Iced. One thing they'll need before I can do that though is focus events.

2 Likes

Ah I see I get what you are saying now.

Sorry to hear about that.

Yeah I could look into that later. Thanks for that mate.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.