summaryrefslogtreecommitdiffstats
path: root/examples/screenshot/src/main.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2023-09-07 03:10:57 +0200
committerLibravatar GitHub <noreply@github.com>2023-09-07 03:10:57 +0200
commitc8fed143eb14d790da0592c5e24c741f6fda101e (patch)
treecf7f002d1ac7e2a8c036f1d420238d69ab45407b /examples/screenshot/src/main.rs
parenta56b25b9096d47ada3c4349f5b91110dfaa92bf6 (diff)
parentd21f0698b505d699c44e9414f902dbeca9474e39 (diff)
downloadiced-c8fed143eb14d790da0592c5e24c741f6fda101e.tar.gz
iced-c8fed143eb14d790da0592c5e24c741f6fda101e.tar.bz2
iced-c8fed143eb14d790da0592c5e24c741f6fda101e.zip
Merge pull request #2073 from iced-rs/event-helpers
Add `keyboard` subscriptions and rename `subscription::events` to `event::listen`
Diffstat (limited to 'examples/screenshot/src/main.rs')
-rw-r--r--examples/screenshot/src/main.rs7
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;
}