interface crate, provides Rust bindings to
libui, a wrapper library for native(ish) GUI libraries:
- Win32API on Windows
- Cocoa on Mac OS X
- GTK+ on Linux and elsewhere
This library exposes a Rusty procedural interface to the "Least Common Denominator" of GUI widgets. They are all available on all supported platforms, though some functionality may not perform precisely the same on all platforms. These inconsistencies are marked.
To use the library, add the following to your
"iui" = "0.3"
Most of the functionality of the crate is exposed via the UI RAII guard, which handles all initialization and cleanup for the underlying library.
After initialization, all the functionality used for creating actual UIs is in the
Fine-grained control of the event loop is avilable via the
Be aware the Cocoa (GUI toolkit on Mac OS) requires that the first thread spawned controls
the UI, so do not spin off your UI interactions into an alternative thread. You're likely to
have problems on Mac OS.
For code examples, see the examples directory.
Available user interface controls and related functionality.
Functions and types related to 2D vector graphics.
Menus that appear at the top of windows, and the items that go in them.
Common imports are packaged into this module. It's meant to be glob-imported:
Provides fine-grained control over the user interface event loop, exposing the
A handle to user interface functionality.
The error type returned by functions in this crate which might fail.