diff options
author | 2024-06-20 01:23:01 +0200 | |
---|---|---|
committer | 2024-06-20 01:23:01 +0200 | |
commit | 714d4503154a6224c26f2eed6e399c73d57b4bf8 (patch) | |
tree | 9456eb2d40f2761c29dfa51f370efe11dc22f5e5 /winit/src/proxy.rs | |
parent | 19db068bbbebcda1756720525da247f35bd3a5e0 (diff) | |
parent | c5f4bebeda8d6ef10efade7933a5ee58f06b62d1 (diff) | |
download | iced-714d4503154a6224c26f2eed6e399c73d57b4bf8.tar.gz iced-714d4503154a6224c26f2eed6e399c73d57b4bf8.tar.bz2 iced-714d4503154a6224c26f2eed6e399c73d57b4bf8.zip |
Merge pull request #2469 from iced-rs/unify-shell-runtimes
`Daemon` API and Shell Runtime Unification
Diffstat (limited to 'winit/src/proxy.rs')
-rw-r--r-- | winit/src/proxy.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/winit/src/proxy.rs b/winit/src/proxy.rs index 0ab61375..d8ad8b3f 100644 --- a/winit/src/proxy.rs +++ b/winit/src/proxy.rs @@ -81,8 +81,19 @@ impl<T: 'static> Proxy<T> { where T: std::fmt::Debug, { + self.send_action(Action::Output(value)); + } + + /// Sends an action to the event loop. + /// + /// Note: This skips the backpressure mechanism with an unbounded + /// channel. Use sparingly! + pub fn send_action(&mut self, action: Action<T>) + where + T: std::fmt::Debug, + { self.raw - .send_event(Action::Output(value)) + .send_event(action) .expect("Send message to event loop"); } |