diff --git a/CHANGELOG.md b/CHANGELOG.md index 161c45c..ea6d5a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `Source::for_each_*` now invoke the callback with the current contents of of the source before attaching the callback. New functions beginning with `for_each_subsequent_` have been added with the original behavior. +- `CushyWindowBuilder` has been renamed to `StandaloneWindowBuilder` and + `MakeWidget::build_virtual_window` has been renamed to + `build_standalone_window`. ### Fixed diff --git a/src/widget.rs b/src/widget.rs index cd1a475..01a91d2 100644 --- a/src/widget.rs +++ b/src/widget.rs @@ -46,8 +46,8 @@ use crate::widgets::{ }; use crate::window::sealed::WindowCommand; use crate::window::{ - CushyWindowBuilder, DeviceId, KeyEvent, Rgb8, RunningWindow, ThemeMode, VirtualRecorderBuilder, - Window, WindowBehavior, WindowHandle, WindowLocal, + DeviceId, KeyEvent, Rgb8, RunningWindow, StandaloneWindowBuilder, ThemeMode, + VirtualRecorderBuilder, Window, WindowBehavior, WindowHandle, WindowLocal, }; use crate::ConstraintLimit; @@ -919,10 +919,13 @@ pub trait MakeWidget: Sized { Window::new(self.make_widget()) } - /// Returns a builder for a [`VirtualWindow`](crate::window::VirtualWindow) - /// or a [`CushyWindow`](crate::window::CushyWindow). - fn build_virtual_window(self) -> CushyWindowBuilder { - CushyWindowBuilder::new(self) + /// Returns a builder for a standalone window. + /// + /// A standalone window can be either a + /// [`VirtualWindow`](crate::window::VirtualWindow) or a + /// [`CushyWindow`](crate::window::CushyWindow). + fn build_standalone_window(self) -> StandaloneWindowBuilder { + StandaloneWindowBuilder::new(self) } /// Returns a builder for a [`VirtualRecorder`](crate::window::VirtualRecorder) diff --git a/src/window.rs b/src/window.rs index a996d88..1db267f 100644 --- a/src/window.rs +++ b/src/window.rs @@ -2570,8 +2570,8 @@ impl PlatformWindowImplementation for &mut VirtualState { } } -/// A builder for a [`VirtualWindow`] or a [`CushyWindow`]. -pub struct CushyWindowBuilder { +/// A builder that creates either a [`VirtualWindow`] or a [`CushyWindow`]. +pub struct StandaloneWindowBuilder { widget: WidgetInstance, multisample_count: NonZeroU32, initial_size: Size, @@ -2580,7 +2580,7 @@ pub struct CushyWindowBuilder { zoom: Dynamic, } -impl CushyWindowBuilder { +impl StandaloneWindowBuilder { /// Returns a new builder for a standalone window that contains `contents`. #[must_use] pub fn new(contents: impl MakeWidget) -> Self { @@ -3375,7 +3375,7 @@ where ))?; let window = contents - .build_virtual_window() + .build_standalone_window() .size(size) .scale(scale) .transparent()