logo
Expand description

An idiomatic GUI library inspired by Elm and based on gtk4-rs.

Version: nightly. Visit the stable docs here.

Docs of related crates: relm4 | relm4-macros | relm4-components | gtk4-rs | gtk-rs-core | libadwaita-rs | libpanel-rs

This document was built at Thursday September 29, 03:35 UTC.

GitHub | Website | Book | Blog

Re-exports

pub use self::component::ComponentParts;
pub use self::component::OnDestroy;
pub use self::shared_state::SharedState;
pub use self::worker::Worker;
pub use self::worker::WorkerController;
pub use self::worker::WorkerHandle;
pub use gtk;
pub use adw;
pub use panel;
pub use once_cell;
pub use tokio;

Modules

Action utility.
Components are smaller mostly independent parts of your application.
Utility to help drawing on a gtk::DrawingArea in a Relm4 application. Create a DrawHandler, initialize it, and get its context when handling a message (that could be sent from the draw signal).
Defines traits and data types to generate widgets from collections efficiently.
Commonly-imported traits and types.
Shared state that can be accessed by many components.
Cancellation mechanism used by Relm4.
Utility traits for working with GTK widgets.
A simpler version of components that does work in the background.

Macros

A macro to create menus.
Create a new type that implements ActionGroupName.
Create a new type that implements ActionName with state and target type.
Create a new type that implements ActionName without state or target type.
sendDeprecated
A short macro for conveniently sending messages.
The view! macro allows you to construct your UI easily and cleanly.

Structs

A component that is ready for docking and launch.
Contains senders to send and receive messages from a Component.
Controls the component from afar.
An owned permission to join on a task (await its termination).
A type that can be used in static variables to pass messages to components.
A Relm4 receiver receives messages from a component or worker.
An app that runs the main application.
A Relm4 sender sends messages to a component or worker.
Listens to shutdown signals and constructs shutdown futures.

Statics

Defines the maximum number of background threads to spawn for handling blocking tasks.
Defines how many threads that Relm4 should use for background tasks.

Traits

Additional methods for gtk::builders::ApplicationBuilder
Elm-style variant of a Component with view updates separated from input updates
Shared behavior of component controller types.
Type of children inside a container.
Widget types which can have widgets attached to them.
Widget types which allow iteration over their children.
Additional methods for gtk::ListBox.
Widget types that allow removal of all their children.
Widget types which can have widgets removed from them.
Widget types which allow to set or unset their child.
Additional methods for gtk::Widget
Elm-style variant of a Component with view updates separated from input updates
Get a reference to a widget.

Functions

Create an unbounded channel to send messages between different parts of you application.
Returns the global gtk::Application that’s used internally by RelmApp.
Sets a custom global stylesheet.
Sets a custom global stylesheet from a file.
Spawns a Send-able future to the shared component runtime.
Spawns a blocking task in a background thread pool.
Spawns a thread-local future on GLib’s executor, for non-Send futures.

Attribute Macros

Macro that implements relm4::Component and generates the corresponding struct.