summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-22 07:09:51 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-22 07:09:51 +0100
commit5137d655e6bbd29581fc1469d0385515113f2999 (patch)
tree46a3ff77014d7e7bd2047ce7c6e7dfe9b3a596cd /src/lib.rs
parent4f2f40c68b4647f281d34034beb159a41422aa06 (diff)
downloadiced-5137d655e6bbd29581fc1469d0385515113f2999.tar.gz
iced-5137d655e6bbd29581fc1469d0385515113f2999.tar.bz2
iced-5137d655e6bbd29581fc1469d0385515113f2999.zip
Allow custom renderers in `Program` and `Application`
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 0e9566e2..171109e7 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -372,15 +372,16 @@ pub type Result = std::result::Result<(), Error>;
/// ]
/// }
/// ```
-pub fn run<State, Message, Theme>(
+pub fn run<State, Message, Theme, Renderer>(
title: impl program::Title<State> + 'static,
update: impl program::Update<State, Message> + 'static,
- view: impl for<'a> program::View<'a, State, Message, Theme> + 'static,
+ view: impl for<'a> program::View<'a, State, Message, Theme, Renderer> + 'static,
) -> Result
where
State: Default + 'static,
Message: std::fmt::Debug + Send + 'static,
Theme: Default + program::DefaultStyle + 'static,
+ Renderer: graphics::compositor::Renderer + core::text::Renderer + 'static,
{
program(title, update, view).run()
}