ferroui_base/platform/system_navigation_manager_impl.rs
1use crate::interactivity::RoutedEventArgs;
2use crate::reactive::IDisposable;
3use std::rc::Rc;
4
5/// The system navigation of a platform: tells when the user asks to go back
6/// (a hardware or system back button, a back gesture).
7pub trait ISystemNavigationManagerImpl {
8 /// Occurs when a back navigation has been requested. The handler
9 /// receives the event arguments of the request; marking them as handled
10 /// tells the platform that the request has been dealt with.
11 ///
12 /// The arguments are shared so that a handler can pass them on to a
13 /// routed event raised through the dispatcher.
14 ///
15 /// Disposing the returned value removes the handler.
16 fn back_requested(&self, handler: Rc<dyn Fn(&Rc<RoutedEventArgs>)>) -> Rc<dyn IDisposable>;
17}