diff options
| author | 2024-02-22 09:19:51 +0100 | |
|---|---|---|
| committer | 2024-02-22 09:19:51 +0100 | |
| commit | d6454b5d0ca4c3812d1614805de1094638153df1 (patch) | |
| tree | 18418ebe4c69ae1d3cb9668aed9069338cf70270 /runtime/src/window/action.rs | |
| parent | 59885e9a363dd73b3a3e8dd125decf0e34130c59 (diff) | |
| download | iced-d6454b5d0ca4c3812d1614805de1094638153df1.tar.gz iced-d6454b5d0ca4c3812d1614805de1094638153df1.tar.bz2 iced-d6454b5d0ca4c3812d1614805de1094638153df1.zip | |
Rename `fetch_location` to `fetch_position`
Diffstat (limited to 'runtime/src/window/action.rs')
| -rw-r--r-- | runtime/src/window/action.rs | 16 | 
1 files changed, 8 insertions, 8 deletions
| diff --git a/runtime/src/window/action.rs b/runtime/src/window/action.rs index 39eb1008..e44ff5a6 100644 --- a/runtime/src/window/action.rs +++ b/runtime/src/window/action.rs @@ -38,12 +38,12 @@ pub enum Action<T> {      FetchMinimized(Id, Box<dyn FnOnce(Option<bool>) -> T + 'static>),      /// Set the window to minimized or back      Minimize(Id, bool), +    /// Fetch the current logical coordinates of the window. +    FetchPosition(Id, Box<dyn FnOnce(Option<Point>) -> T + 'static>),      /// Move the window to the given logical coordinates.      ///      /// Unsupported on Wayland.      Move(Id, Point), -    /// Fetch the current logical coordinates of the window. -    FetchLocation(Id, Box<dyn FnOnce(Option<Point>) -> T + 'static>),      /// Change the [`Mode`] of the window.      ChangeMode(Id, Mode),      /// Fetch the current [`Mode`] of the window. @@ -136,10 +136,10 @@ impl<T> Action<T> {                  Action::FetchMinimized(id, Box::new(move |s| f(o(s))))              }              Self::Minimize(id, minimized) => Action::Minimize(id, minimized), -            Self::Move(id, position) => Action::Move(id, position), -            Self::FetchLocation(id, o) => { -                Action::FetchLocation(id, Box::new(move |s| f(o(s)))) +            Self::FetchPosition(id, o) => { +                Action::FetchPosition(id, Box::new(move |s| f(o(s))))              } +            Self::Move(id, position) => Action::Move(id, position),              Self::ChangeMode(id, mode) => Action::ChangeMode(id, mode),              Self::FetchMode(id, o) => {                  Action::FetchMode(id, Box::new(move |s| f(o(s)))) @@ -191,12 +191,12 @@ impl<T> fmt::Debug for Action<T> {              Self::Minimize(id, minimized) => {                  write!(f, "Action::Minimize({id:?}, {minimized}")              } +            Self::FetchPosition(id, _) => { +                write!(f, "Action::FetchPosition({id:?})") +            }              Self::Move(id, position) => {                  write!(f, "Action::Move({id:?}, {position})")              } -            Self::FetchLocation(id, _) => { -                write!(f, "Action::FetchLocation({id:?})") -            }              Self::ChangeMode(id, mode) => {                  write!(f, "Action::SetMode({id:?}, {mode:?})")              } | 
