diff options
author | 2023-09-07 02:45:15 +0200 | |
---|---|---|
committer | 2023-09-07 02:45:15 +0200 | |
commit | 08a031cbe5913c249efa7fc82556d5d95f981c4c (patch) | |
tree | 8b8db2279c04393a8b8e39ed0a74b922c91c8dea /examples/screenshot | |
parent | a56b25b9096d47ada3c4349f5b91110dfaa92bf6 (diff) | |
download | iced-08a031cbe5913c249efa7fc82556d5d95f981c4c.tar.gz iced-08a031cbe5913c249efa7fc82556d5d95f981c4c.tar.bz2 iced-08a031cbe5913c249efa7fc82556d5d95f981c4c.zip |
Introduce `keyboard::on_key_press` and `on_key_release`
Also rename `subscription::events*` to `event::listen*`.
Diffstat (limited to 'examples/screenshot')
-rw-r--r-- | examples/screenshot/src/main.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/screenshot/src/main.rs b/examples/screenshot/src/main.rs index 83824535..54446724 100644 --- a/examples/screenshot/src/main.rs +++ b/examples/screenshot/src/main.rs @@ -4,9 +4,8 @@ use iced::theme::{Button, Container}; use iced::widget::{button, column, container, image, row, text, text_input}; use iced::window::screenshot::{self, Screenshot}; use iced::{ - event, executor, keyboard, subscription, Alignment, Application, Command, - ContentFit, Element, Event, Length, Rectangle, Renderer, Subscription, - Theme, + event, executor, keyboard, Alignment, Application, Command, ContentFit, + Element, Event, Length, Rectangle, Renderer, Subscription, Theme, }; use ::image as img; @@ -254,7 +253,7 @@ impl Application for Example { } fn subscription(&self) -> Subscription<Self::Message> { - subscription::events_with(|event, status| { + event::listen_with(|event, status| { if let event::Status::Captured = status { return None; } |