summaryrefslogtreecommitdiffstats
path: root/runtime/src/window
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-02-07 09:47:15 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-02-07 09:47:15 +0100
commitf18a81451fffa2ead0eb6be72f9a32f5f683a016 (patch)
tree77fde588e636b1b1de78b466b85ac5d203808a56 /runtime/src/window
parent7105992228e58566cfacb6a1d6e10ec60fb05ecf (diff)
downloadiced-f18a81451fffa2ead0eb6be72f9a32f5f683a016.tar.gz
iced-f18a81451fffa2ead0eb6be72f9a32f5f683a016.tar.bz2
iced-f18a81451fffa2ead0eb6be72f9a32f5f683a016.zip
Rename `fetch_native_handle` to `run_with_handle` in `window`
Diffstat (limited to 'runtime/src/window')
-rw-r--r--runtime/src/window/action.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/src/window/action.rs b/runtime/src/window/action.rs
index 763ae1ef..532c1243 100644
--- a/runtime/src/window/action.rs
+++ b/runtime/src/window/action.rs
@@ -99,7 +99,7 @@ pub enum Action<T> {
/// said, it's usually in the same ballpark as on Windows.
ChangeIcon(Id, Icon),
/// Requests access to the windows native handle.
- FetchNativeHandle(Id, Box<dyn FnOnce(&WindowHandle<'_>) -> T + 'static>),
+ RunWithHandle(Id, Box<dyn FnOnce(&WindowHandle<'_>) -> T + 'static>),
/// Screenshot the viewport of the window.
Screenshot(Id, Box<dyn FnOnce(Screenshot) -> T + 'static>),
}
@@ -145,8 +145,8 @@ impl<T> Action<T> {
Action::FetchId(id, Box::new(move |s| f(o(s))))
}
Self::ChangeIcon(id, icon) => Action::ChangeIcon(id, icon),
- Self::FetchNativeHandle(id, o) => {
- Action::FetchNativeHandle(id, Box::new(move |s| f(o(s))))
+ Self::RunWithHandle(id, o) => {
+ Action::RunWithHandle(id, Box::new(move |s| f(o(s))))
}
Self::Screenshot(id, tag) => Action::Screenshot(
id,
@@ -204,8 +204,8 @@ impl<T> fmt::Debug for Action<T> {
Self::ChangeIcon(id, _icon) => {
write!(f, "Action::ChangeIcon({id:?})")
}
- Self::FetchNativeHandle(id, _) => {
- write!(f, "Action::RequestNativeHandle({id:?})")
+ Self::RunWithHandle(id, _) => {
+ write!(f, "Action::RunWithHandle({id:?})")
}
Self::Screenshot(id, _) => write!(f, "Action::Screenshot({id:?})"),
}