summaryrefslogtreecommitdiffstats
path: root/runtime/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-06-27 19:41:03 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-06-27 19:41:03 +0200
commit5ae726e02c4d6c9889ef7335d9bc80ef1992e34f (patch)
treee1f3c2b81eee55d9a1426e847dfbb25d523d7885 /runtime/src
parent93673836cd2932351b25dea6ca46ae50d0e35ace (diff)
downloadiced-5ae726e02c4d6c9889ef7335d9bc80ef1992e34f.tar.gz
iced-5ae726e02c4d6c9889ef7335d9bc80ef1992e34f.tar.bz2
iced-5ae726e02c4d6c9889ef7335d9bc80ef1992e34f.zip
Move `Screenshot` inside `window` module
Diffstat (limited to 'runtime/src')
-rw-r--r--runtime/src/lib.rs2
-rw-r--r--runtime/src/window.rs4
-rw-r--r--runtime/src/window/action.rs2
-rw-r--r--runtime/src/window/screenshot.rs (renamed from runtime/src/screenshot.rs)1
4 files changed, 5 insertions, 4 deletions
diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs
index 32ed14d8..50abf7b2 100644
--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -60,7 +60,6 @@ mod debug;
#[cfg(not(feature = "debug"))]
#[path = "debug/null.rs"]
mod debug;
-mod screenshot;
pub use iced_core as core;
pub use iced_futures as futures;
@@ -69,5 +68,4 @@ pub use command::Command;
pub use debug::Debug;
pub use font::Font;
pub use program::Program;
-pub use screenshot::{CropError, Screenshot};
pub use user_interface::UserInterface;
diff --git a/runtime/src/window.rs b/runtime/src/window.rs
index 9b66cb0e..e448edef 100644
--- a/runtime/src/window.rs
+++ b/runtime/src/window.rs
@@ -1,13 +1,15 @@
//! Build window-based GUI applications.
mod action;
+pub mod screenshot;
+
pub use action::Action;
+pub use screenshot::Screenshot;
use crate::command::{self, Command};
use crate::core::time::Instant;
use crate::core::window::{Event, Icon, Level, Mode, UserAttention};
use crate::futures::subscription::{self, Subscription};
-use crate::screenshot::Screenshot;
/// Subscribes to the frames of the window of the running application.
///
diff --git a/runtime/src/window/action.rs b/runtime/src/window/action.rs
index cb430681..09be1810 100644
--- a/runtime/src/window/action.rs
+++ b/runtime/src/window/action.rs
@@ -1,7 +1,7 @@
use crate::core::window::{Icon, Level, Mode, UserAttention};
use crate::futures::MaybeSend;
+use crate::window::Screenshot;
-use crate::screenshot::Screenshot;
use std::fmt;
/// An operation to be performed on some window.
diff --git a/runtime/src/screenshot.rs b/runtime/src/window/screenshot.rs
index b88f2c20..c84286b6 100644
--- a/runtime/src/screenshot.rs
+++ b/runtime/src/window/screenshot.rs
@@ -1,3 +1,4 @@
+//! Take screenshots of a window.
use crate::core::{Rectangle, Size};
use std::fmt::{Debug, Formatter};