summaryrefslogtreecommitdiffstats
path: root/examples/events
diff options
context:
space:
mode:
authorLibravatar Bingus <shankern@protonmail.com>2023-07-12 12:23:18 -0700
committerLibravatar Bingus <shankern@protonmail.com>2023-07-12 12:23:18 -0700
commit633f405f3f78bc7f82d2b2061491b0e011137451 (patch)
tree5ebfc1f45d216a5c14a90492563599e6969eab4d /examples/events
parent41836dd80d0534608e7aedfbf2319c540a23de1a (diff)
parent21bd51426d900e271206f314e0c915dd41065521 (diff)
downloadiced-633f405f3f78bc7f82d2b2061491b0e011137451.tar.gz
iced-633f405f3f78bc7f82d2b2061491b0e011137451.tar.bz2
iced-633f405f3f78bc7f82d2b2061491b0e011137451.zip
Merge remote-tracking branch 'origin/master' into feat/multi-window-support
# Conflicts: # Cargo.toml # core/src/window/icon.rs # core/src/window/id.rs # core/src/window/position.rs # core/src/window/settings.rs # examples/integration/src/main.rs # examples/integration_opengl/src/main.rs # glutin/src/application.rs # native/src/subscription.rs # native/src/window.rs # runtime/src/window/action.rs # src/lib.rs # src/window.rs # winit/Cargo.toml # winit/src/application.rs # winit/src/icon.rs # winit/src/settings.rs # winit/src/window.rs
Diffstat (limited to 'examples/events')
-rw-r--r--examples/events/Cargo.toml1
-rw-r--r--examples/events/src/main.rs9
2 files changed, 5 insertions, 5 deletions
diff --git a/examples/events/Cargo.toml b/examples/events/Cargo.toml
index 8c56e471..15ffc0af 100644
--- a/examples/events/Cargo.toml
+++ b/examples/events/Cargo.toml
@@ -7,4 +7,3 @@ publish = false
[dependencies]
iced = { path = "../..", features = ["debug"] }
-iced_native = { path = "../../native" }
diff --git a/examples/events/src/main.rs b/examples/events/src/main.rs
index b57010c7..70659f52 100644
--- a/examples/events/src/main.rs
+++ b/examples/events/src/main.rs
@@ -1,12 +1,13 @@
use iced::alignment;
use iced::executor;
+use iced::subscription;
use iced::widget::{button, checkbox, container, text, Column};
use iced::window;
+use iced::Event;
use iced::{
Alignment, Application, Command, Element, Length, Settings, Subscription,
Theme,
};
-use iced_native::Event;
pub fn main() -> iced::Result {
Events::run(Settings {
@@ -17,13 +18,13 @@ pub fn main() -> iced::Result {
#[derive(Debug, Default)]
struct Events {
- last: Vec<iced_native::Event>,
+ last: Vec<Event>,
enabled: bool,
}
#[derive(Debug, Clone)]
enum Message {
- EventOccurred(iced_native::Event),
+ EventOccurred(Event),
Toggled(bool),
Exit(window::Id),
}
@@ -70,7 +71,7 @@ impl Application for Events {
}
fn subscription(&self) -> Subscription<Message> {
- iced_native::subscription::events().map(Message::EventOccurred)
+ subscription::events().map(Message::EventOccurred)
}
fn view(&self) -> Element<Message> {