summaryrefslogtreecommitdiffstats
path: root/native/src/event.rs
diff options
context:
space:
mode:
authorLibravatar Richard <richardsoncusto@gmail.com>2021-06-09 15:00:01 -0300
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-06-25 14:14:03 +0200
commit96a462d2f2cb608ad14c93cc55896108a2dccb2b (patch)
treecc87dea4b01aa89170f672668a051fb78cb9528a /native/src/event.rs
parent9ae22b58d843d9a39212028478598c19a49bc2e6 (diff)
downloadiced-96a462d2f2cb608ad14c93cc55896108a2dccb2b.tar.gz
iced-96a462d2f2cb608ad14c93cc55896108a2dccb2b.tar.bz2
iced-96a462d2f2cb608ad14c93cc55896108a2dccb2b.zip
Use new enum variant and new winit repo
Diffstat (limited to 'native/src/event.rs')
-rw-r--r--native/src/event.rs25
1 files changed, 21 insertions, 4 deletions
diff --git a/native/src/event.rs b/native/src/event.rs
index 59c5c0cb..1c26b5f2 100644
--- a/native/src/event.rs
+++ b/native/src/event.rs
@@ -23,10 +23,27 @@ pub enum Event {
/// A touch event
Touch(touch::Event),
-
- // TODO: System(system::Event)?
- /// A url was received.
- UrlReceived(String),
+
+ /// A platform specific event
+ PlatformSpecific(PlatformSpecific),
+}
+
+/// A platform specific event
+#[derive(Debug, Clone, PartialEq)]
+pub enum PlatformSpecific {
+ /// A MacOS specific event
+ MacOS(MacOS),
+}
+
+/// Describes an event specific to MacOS
+#[derive(Debug, Clone, PartialEq)]
+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.