Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Crate relm4

Source
Expand description

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

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

GitHub | Website | Book | Blog

Re-exports§

pub use component::worker::Worker;
pub use component::worker::WorkerController;
pub use component::worker::WorkerHandle;
pub use component::Component;
pub use component::ComponentBuilder;
pub use component::ComponentController;
pub use component::ComponentParts;
pub use component::Controller;
pub use component::MessageBroker;
pub use component::SimpleComponent;
pub use shared_state::Reducer;
pub use shared_state::Reducible;
pub use shared_state::SharedState;
pub use gtk;
pub use relm4_css as css;css
pub use adw;libadwaita
pub use panel;libpanel
pub use once_cell;
pub use tokio;

Modules§

abstractions
A module for convenient abstractions over gtk-rs.
actions
Action utility.
binding
Easy data bindings between objects.
component
Components are smaller mostly independent parts of your application.
factory
Defines traits and data types to generate widgets from collections efficiently.
loading_widgets
Utilities for removing temporary widgets from async factories or components.
prelude
Commonly-imported traits and types.
shared_state
Shared state that can be accessed by many components.
shutdown
Cancellation mechanism used by Relm4.
typed_view
Typed views.

Macros§

menumacros
A macro to create menus.
new_action_group
Create a new type that implements ActionGroupName.
new_stateful_action
Create a new type that implements ActionName with state and target type.
new_stateless_action
Create a new type that implements ActionName without state or target type.
viewmacros
The view! macro allows you to construct your UI easily and cleanly.

Structs§

AsyncComponentSender
Contains senders to send and receive messages from a Component.
AsyncFactorySender
Contains senders to send and receive messages from a Component.
ComponentSender
Contains senders to send and receive messages from a Component.
FactorySender
Contains senders to send and receive messages from a Component.
JoinHandle
An owned permission to join on a task (await its termination).
Receiver
A Relm4 receiver receives messages from a component or worker.
RelmApp
An app that runs the main application.
Sender
A Relm4 sender sends messages to a component or worker.
ShutdownReceiver
Listens to shutdown signals and constructs shutdown futures.

Statics§

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

Traits§

ApplicationBuilderExt
Additional methods for gtk::builders::ApplicationBuilder
ContainerChild
Type of children inside a container.
RelmContainerExt
Widget types which can have widgets attached to them.
RelmIterChildrenExt
Widget types which allow iteration over their children.
RelmListBoxExt
Additional methods for gtk::ListBox.
RelmObjectExt
Trait that extends gtk::prelude::ObjectExt.
RelmRemoveAllExt
Widget types that allow removal of all their children.
RelmRemoveExt
Widget types which can have widgets removed from them.
RelmSetChildExt
Widget types which allow to set or unset their child.
RelmWidgetExt
Trait that extends gtk::prelude::WidgetExt.
WidgetRef
Get a reference to a widget.
WidgetTemplate
A trait that describes a widget template.

Functions§

channel
Create an unbounded channel to send messages between different parts of you application.
main_adw_applicationlibadwaita
Returns the global adw::Application that’s used internally by RelmApp if the libadwaita feature is enabled.
main_application
Returns the global gtk::Application that’s used internally by RelmApp.
set_global_css
Sets a custom global stylesheet.
set_global_css_from_file
Sets a custom global stylesheet from a file.
set_global_css_from_file_with_priority
Sets a custom global stylesheet from a file, with the given priority.
set_global_css_with_priority
Sets a custom global stylesheet, with the given priority.
spawn
Spawns a Send-able future to the shared component runtime.
spawn_blocking
Spawns a blocking task in a background thread pool.
spawn_local
Spawns a thread-local future on GLib’s executor, for non-Send futures.
spawn_local_with_priority
Spawns a thread-local future on GLib’s executor, for non-Send futures.

Attribute Macros§

componentmacros
Macro that implements relm4::Component or relm4::SimpleComponent and generates the corresponding widgets struct.
factorymacros
Macro that implements relm4::factory::FactoryComponent and generates the corresponding widgets struct.
widget_templatemacros
A macro to generate widget templates.