diff --git a/Cargo.toml b/Cargo.toml index edaaf1436c..2b8d09345d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -86,7 +86,6 @@ members = [ "examples/todos", "examples/tooltip", "examples/tour", - "examples/url_handler", "examples/websocket", ] diff --git a/examples/url_handler/Cargo.toml b/examples/url_handler/Cargo.toml deleted file mode 100644 index 63c7ec2783..0000000000 --- a/examples/url_handler/Cargo.toml +++ /dev/null @@ -1,10 +0,0 @@ -[package] -name = "url_handler" -version = "0.1.0" -authors = ["Héctor Ramón Jiménez "] -edition = "2021" -publish = false - -[dependencies] -iced = { path = "../.." } -iced_native = { path = "../../native" } diff --git a/examples/url_handler/src/main.rs b/examples/url_handler/src/main.rs deleted file mode 100644 index 3257b5190a..0000000000 --- a/examples/url_handler/src/main.rs +++ /dev/null @@ -1,71 +0,0 @@ -use iced::executor; -use iced::widget::{container, text}; -use iced::{ - Application, Command, Element, Length, Settings, Subscription, Theme, -}; -use iced_native::{ - event::{MacOS, PlatformSpecific}, - Event, -}; - -pub fn main() -> iced::Result { - App::run(Settings::default()) -} - -#[derive(Debug, Default)] -struct App { - url: Option, -} - -#[derive(Debug, Clone)] -enum Message { - EventOccurred(iced_native::Event), -} - -impl Application for App { - type Message = Message; - type Theme = Theme; - type Executor = executor::Default; - type Flags = (); - - fn new(_flags: ()) -> (App, Command) { - (App::default(), Command::none()) - } - - fn title(&self) -> String { - String::from("Url - Iced") - } - - fn update(&mut self, message: Message) -> Command { - match message { - Message::EventOccurred(event) => { - if let Event::PlatformSpecific(PlatformSpecific::MacOS( - MacOS::ReceivedUrl(url), - )) = event - { - self.url = Some(url); - } - } - }; - - Command::none() - } - - fn subscription(&self) -> Subscription { - iced_native::subscription::events().map(Message::EventOccurred) - } - - fn view(&self) -> Element { - let content = match &self.url { - Some(url) => text(url), - None => text("No URL received yet!"), - }; - - container(content.size(48)) - .width(Length::Fill) - .height(Length::Fill) - .center_x() - .center_y() - .into() - } -} diff --git a/glutin/Cargo.toml b/glutin/Cargo.toml index 730ee6f748..0d83c1d7fe 100644 --- a/glutin/Cargo.toml +++ b/glutin/Cargo.toml @@ -19,8 +19,6 @@ version = "0.4" [dependencies.glutin] version = "0.29" -git = "https://github.com/iced-rs/glutin" -rev = "da8d291486b4c9bec12487a46c119c4b1d386abf" [dependencies.iced_native] version = "0.6" diff --git a/glutin/src/application.rs b/glutin/src/application.rs index f474cbba04..b897afb021 100644 --- a/glutin/src/application.rs +++ b/glutin/src/application.rs @@ -318,16 +318,6 @@ async fn run_instance( context.window().request_redraw(); } - event::Event::PlatformSpecific(event::PlatformSpecific::MacOS( - event::MacOS::ReceivedUrl(url), - )) => { - use iced_native::event; - events.push(iced_native::Event::PlatformSpecific( - event::PlatformSpecific::MacOS(event::MacOS::ReceivedUrl( - url, - )), - )); - } event::Event::UserEvent(message) => { messages.push(message); } diff --git a/native/src/event.rs b/native/src/event.rs index bcfaf891bc..fab5978a64 100644 --- a/native/src/event.rs +++ b/native/src/event.rs @@ -23,27 +23,6 @@ pub enum Event { /// A touch event Touch(touch::Event), - - /// A platform specific event - PlatformSpecific(PlatformSpecific), -} - -/// A platform specific event -#[derive(Debug, Clone, PartialEq, Eq)] -pub enum PlatformSpecific { - /// A MacOS specific event - MacOS(MacOS), -} - -/// Describes an event specific to MacOS -#[derive(Debug, Clone, PartialEq, Eq)] -pub enum MacOS { - /// Triggered when the app receives an URL from the system - /// - /// _**Note:** For this event to be triggered, the executable needs to be properly [bundled]!_ - /// - /// [bundled]: https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW19 - ReceivedUrl(String), } /// The status of an [`Event`] after being processed. diff --git a/winit/Cargo.toml b/winit/Cargo.toml index 1133adb1d0..1c5119ed17 100644 --- a/winit/Cargo.toml +++ b/winit/Cargo.toml @@ -22,8 +22,6 @@ thiserror = "1.0" [dependencies.winit] version = "0.27" -git = "https://github.com/iced-rs/winit.git" -rev = "940457522e9fb9f5dac228b0ecfafe0138b4048c" [dependencies.iced_native] version = "0.6" diff --git a/winit/src/application.rs b/winit/src/application.rs index 1706d2e9a2..1661f913c7 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -382,17 +382,6 @@ async fn run_instance( window.request_redraw(); } - event::Event::PlatformSpecific(event::PlatformSpecific::MacOS( - event::MacOS::ReceivedUrl(url), - )) => { - use iced_native::event; - - events.push(iced_native::Event::PlatformSpecific( - event::PlatformSpecific::MacOS(event::MacOS::ReceivedUrl( - url, - )), - )); - } event::Event::UserEvent(message) => { messages.push(message); }