diff options
| -rw-r--r-- | runtime/src/command/action.rs | 8 | ||||
| -rw-r--r-- | winit/src/application.rs | 4 | ||||
| -rw-r--r-- | winit/src/multi_window.rs | 3 | 
3 files changed, 10 insertions, 5 deletions
diff --git a/runtime/src/command/action.rs b/runtime/src/command/action.rs index d119141b..4592df5d 100644 --- a/runtime/src/command/action.rs +++ b/runtime/src/command/action.rs @@ -45,8 +45,8 @@ pub enum Action<T> {          tagger: Box<dyn Fn(Result<(), font::Error>) -> T>,      }, -    /// Pass PlatformSpecific action, for some special platform -    PlatformSpecific(Box<dyn Any>) +    /// A custom action supported by a specific runtime. +    Custom(Box<dyn Any>),  }  impl<T> Action<T> { @@ -76,7 +76,7 @@ impl<T> Action<T> {                  bytes,                  tagger: Box::new(move |result| f(tagger(result))),              }, -            Self::PlatformSpecific(special) => Action::PlatformSpecific(special) +            Self::Custom(custom) => Action::Custom(custom),          }      }  } @@ -95,7 +95,7 @@ impl<T> fmt::Debug for Action<T> {              Self::System(action) => write!(f, "Action::System({action:?})"),              Self::Widget(_action) => write!(f, "Action::Widget"),              Self::LoadFont { .. } => write!(f, "Action::LoadFont"), -            Self::PlatformSpecific(_) => write!(f, "Action::PlatformSpecific") +            Self::Custom(_) => write!(f, "Action::Custom"),          }      }  } diff --git a/winit/src/application.rs b/winit/src/application.rs index e44b3ca5..24c98d46 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -861,7 +861,9 @@ pub fn run_command<A, C, E>(                      .send_event(tagger(Ok(())))                      .expect("Send message to event loop");              } -            command::Action::PlatformSpecific(_) => unimplemented!(), +            command::Action::Custom(_) => { +                log::warn!("Unsupported custom action in `iced_winit` shell"); +            }          }      }  } diff --git a/winit/src/multi_window.rs b/winit/src/multi_window.rs index 1c45ce37..662adf5b 100644 --- a/winit/src/multi_window.rs +++ b/winit/src/multi_window.rs @@ -1127,6 +1127,9 @@ fn run_command<A, C, E>(                      .send_event(tagger(Ok(())))                      .expect("Send message to event loop");              } +            command::Action::Custom(_) => { +                log::warn!("Unsupported custom action in `iced_winit` shell"); +            }          }      }  }  | 
