summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2021-06-25 14:47:14 +0200
committerLibravatar GitHub <noreply@github.com>2021-06-25 14:47:14 +0200
commit06d0158efbaadc5ae0a6dea22e7a761a3e1c2a8f (patch)
treeacf6d59469d89e46020cb7a27ce217294ed47e9e /native
parentd2c8a3e04b02a1fcf54504bcbd41c488a8bba88a (diff)
parent612585109ffc9a14a507c3c8423c6aa790c35cbf (diff)
downloadiced-06d0158efbaadc5ae0a6dea22e7a761a3e1c2a8f.tar.gz
iced-06d0158efbaadc5ae0a6dea22e7a761a3e1c2a8f.tar.bz2
iced-06d0158efbaadc5ae0a6dea22e7a761a3e1c2a8f.zip
Merge pull request #917 from derezzedex/macos-url
Enable receiving URLs on MacOS
Diffstat (limited to '')
-rw-r--r--native/src/event.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/native/src/event.rs b/native/src/event.rs
index 205bb797..1c26b5f2 100644
--- a/native/src/event.rs
+++ b/native/src/event.rs
@@ -23,6 +23,27 @@ pub enum Event {
/// A touch event
Touch(touch::Event),
+
+ /// 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.