From 7a50e9e8fbb8d37e53a42c1dd5936b97463ead53 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 21 Jan 2024 17:56:01 +0100 Subject: Convert `Renderer::Theme` to generic `Widget` type --- runtime/src/multi_window/program.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'runtime/src/multi_window/program.rs') diff --git a/runtime/src/multi_window/program.rs b/runtime/src/multi_window/program.rs index 591b3e9a..963a09d7 100644 --- a/runtime/src/multi_window/program.rs +++ b/runtime/src/multi_window/program.rs @@ -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>; } -- cgit