Skip to content

Commit

Permalink
Use crates.io release for winit
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Feb 15, 2024
1 parent c76a9eb commit 9e3ad0e
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 129 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,4 @@ web-time = "0.2"
wgpu = "0.19"
winapi = "0.3"
window_clipboard = "0.4.1"
winit = { git = "https://github.com/iced-rs/winit.git", rev = "b91e39ece2c0d378c3b80da7f3ab50e17bb798a5" }
winit = "0.29"
21 changes: 0 additions & 21 deletions core/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 0 additions & 9 deletions examples/url_handler/Cargo.toml

This file was deleted.

70 changes: 0 additions & 70 deletions examples/url_handler/src/main.rs

This file was deleted.

2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ pub mod font {

pub mod event {
//! Handle events of a user interface.
pub use crate::core::event::{Event, MacOS, PlatformSpecific, Status};
pub use crate::core::event::{Event, Status};
pub use iced_futures::event::{listen, listen_raw, listen_with};
}

Expand Down
11 changes: 0 additions & 11 deletions winit/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,17 +349,6 @@ async fn run_instance<A, E, C>(
window.request_redraw();
redraw_pending = true;
}
event::Event::PlatformSpecific(event::PlatformSpecific::MacOS(
event::MacOS::ReceivedUrl(url),
)) => {
use crate::core::event;

events.push(Event::PlatformSpecific(
event::PlatformSpecific::MacOS(event::MacOS::ReceivedUrl(
url,
)),
));
}
event::Event::UserEvent(message) => {
messages.push(message);
}
Expand Down
16 changes: 0 additions & 16 deletions winit/src/multi_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,22 +459,6 @@ async fn run_instance<A, E, C>(
window.raw.request_redraw();
}
}
event::Event::PlatformSpecific(
event::PlatformSpecific::MacOS(
event::MacOS::ReceivedUrl(url),
),
) => {
use crate::core::event;

events.push((
None,
event::Event::PlatformSpecific(
event::PlatformSpecific::MacOS(
event::MacOS::ReceivedUrl(url),
),
),
));
}
event::Event::UserEvent(message) => {
messages.push(message);
}
Expand Down

0 comments on commit 9e3ad0e

Please sign in to comment.