#gtk #gui #actix #actor

woab

Widgets on Actors Bridge - a GUI microframework for combining GTK with Actix

7 releases (breaking)

0.6.0 Jul 9, 2021
0.5.0 May 19, 2021
0.4.0 Apr 15, 2021
0.3.0 Apr 8, 2021
0.1.0 Sep 2, 2020

#75 in GUI

32 downloads per month

MIT license

71KB
780 lines

Build Status Latest Version Rust Documentation - Latest Version Rust Documentation - Nightly

WoAB

WoAB (Widgets on Actors Bridge) is a GUI microframework for combining the widgets toolkit GTK with the actors framework Actix. It helps with:

  • Running the actors inside the GTK thread, allowing message handlers to interact with the widgets directly.
  • Routing GTK signals through the asynchronous runtime, so that the code handling them can proceed naturally to interact with the actors.
  • Mapping widgets and signals from Glade XML files to user types.

Refer to the docs for more explanation on how to use WoAB, and to the examples for a short demonstration.

Pitfalls

  • When starting Actix actors from outside Tokio/Actix, woab::block_on must be used. This is a limitation of Actix that needs to be respected.
  • dialog.run() must not be used - use woab::run_dialog instead.
  • If an actor is created inside a gtk::Application::connect_activate, its started method will run after the activate signal is done. This can be a problem for methods like set_application that can segfault if they are called outside the activate signal. A solution could be to either do the startup inside connect_activate or use woab::route_signal to route the application's activate signal to the actor and do the startup in the actor's signal handler.

License

Licensed under MIT license (LICENSE or http://opensource.org/licenses/MIT))

Dependencies

~21MB
~467K SLoC