Convert Renderer::Theme to generic Widget type

This commit is contained in:
Héctor Ramón Jiménez 2024-01-21 17:56:01 +01:00
parent 545cc909c9
commit 7a50e9e8fb
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
88 changed files with 1219 additions and 1153 deletions

View file

@ -12,6 +12,9 @@ pub trait Program: Sized {
/// The type of __messages__ your [`Program`] will produce.
type Message: std::fmt::Debug + Send;
/// The theme used to draw the [`Program`].
type Theme;
/// Handles a __message__ and updates the state of the [`Program`].
///
/// This is where you define your __update logic__. All the __messages__,
@ -28,5 +31,5 @@ pub trait Program: Sized {
fn view(
&self,
window: window::Id,
) -> Element<'_, Self::Message, Self::Renderer>;
) -> Element<'_, Self::Message, Self::Theme, Self::Renderer>;
}