diff --git a/api/cpp/platform.rs b/api/cpp/platform.rs index c6a4787cd..f7b6c9839 100644 --- a/api/cpp/platform.rs +++ b/api/cpp/platform.rs @@ -8,7 +8,7 @@ use i_slint_core::platform::{Platform, PlatformError}; use i_slint_core::renderer::Renderer; use i_slint_core::software_renderer::{RepaintBufferType, SoftwareRenderer}; use i_slint_core::window::ffi::WindowAdapterRcOpaque; -use i_slint_core::window::{WindowAdapter, WindowAdapterSealed}; +use i_slint_core::window::{WindowAdapter, WindowAdapterInternal}; use raw_window_handle::{RawDisplayHandle, RawWindowHandle}; use std::rc::Rc; @@ -54,7 +54,7 @@ impl WindowAdapter for CppWindowAdapter { } } -impl WindowAdapterSealed for CppWindowAdapter { +impl WindowAdapterInternal for CppWindowAdapter { fn show(&self) -> Result<(), PlatformError> { unsafe { (self.show)(self.user_data) }; Ok(()) diff --git a/internal/backends/qt/qt_window.rs b/internal/backends/qt/qt_window.rs index 5ef4981f3..d89665ac7 100644 --- a/internal/backends/qt/qt_window.rs +++ b/internal/backends/qt/qt_window.rs @@ -22,7 +22,7 @@ use i_slint_core::lengths::{ LogicalLength, LogicalPoint, LogicalRect, LogicalSize, LogicalVector, PhysicalPx, ScaleFactor, }; use i_slint_core::platform::{PlatformError, WindowEvent}; -use i_slint_core::window::{WindowAdapter, WindowAdapterSealed, WindowInner}; +use i_slint_core::window::{WindowAdapter, WindowAdapterInternal, WindowInner}; use i_slint_core::{ImageInner, Property, SharedString}; use items::{ImageFit, TextHorizontalAlignment, TextVerticalAlignment}; @@ -1563,7 +1563,7 @@ impl WindowAdapter for QtWindow { } } -impl WindowAdapterSealed for QtWindow { +impl WindowAdapterInternal for QtWindow { fn show(&self) -> Result<(), PlatformError> { let component_rc = WindowInner::from_pub(&self.window).component(); let component = ComponentRc::borrow_pin(&component_rc); diff --git a/internal/backends/testing/lib.rs b/internal/backends/testing/lib.rs index df7140c5d..d6f8848a9 100644 --- a/internal/backends/testing/lib.rs +++ b/internal/backends/testing/lib.rs @@ -8,7 +8,7 @@ use i_slint_core::graphics::euclid::{Point2D, Size2D}; use i_slint_core::graphics::FontRequest; use i_slint_core::lengths::{LogicalLength, LogicalPoint, LogicalRect, LogicalSize, ScaleFactor}; use i_slint_core::renderer::{Renderer, RendererSealed}; -use i_slint_core::window::WindowAdapterSealed; +use i_slint_core::window::WindowAdapterInternal; use i_slint_core::window::{InputMethodRequest, WindowAdapter}; use std::cell::RefCell; @@ -60,7 +60,7 @@ pub struct TestingWindow { pub ime_requests: RefCell>, } -impl WindowAdapterSealed for TestingWindow { +impl WindowAdapterInternal for TestingWindow { fn show(&self) -> Result<(), PlatformError> { self.shown.set(true); Ok(()) diff --git a/internal/backends/winit/winitwindowadapter.rs b/internal/backends/winit/winitwindowadapter.rs index 10c48f40e..5731fbf04 100644 --- a/internal/backends/winit/winitwindowadapter.rs +++ b/internal/backends/winit/winitwindowadapter.rs @@ -25,7 +25,7 @@ use corelib::items::MouseCursor; use corelib::layout::Orientation; use corelib::lengths::{LogicalLength, LogicalSize}; use corelib::platform::{PlatformError, WindowEvent}; -use corelib::window::{WindowAdapter, WindowAdapterSealed, WindowInner}; +use corelib::window::{WindowAdapter, WindowAdapterInternal, WindowInner}; use corelib::Property; use corelib::{graphics::*, Coord}; use i_slint_core as corelib; @@ -310,7 +310,7 @@ impl WindowAdapter for WinitWindowAdapter { } } -impl WindowAdapterSealed for WinitWindowAdapter { +impl WindowAdapterInternal for WinitWindowAdapter { fn request_redraw(&self) { self.pending_redraw.set(true); self.with_window_handle(&mut |window| window.request_redraw()) diff --git a/internal/core/api.rs b/internal/core/api.rs index 292a674e4..f6df56800 100644 --- a/internal/core/api.rs +++ b/internal/core/api.rs @@ -352,7 +352,7 @@ impl Window { /// fn size(&self) -> PhysicalSize { unimplemented!() } /// fn renderer(&self) -> &dyn Renderer { unimplemented!() } /// } - /// # impl i_slint_core::window::WindowAdapterSealed for MyWindowAdapter { + /// # impl i_slint_core::window::WindowAdapterInternal for MyWindowAdapter { /// # } /// /// fn create_window_adapter() -> Rc { diff --git a/internal/core/item_rendering.rs b/internal/core/item_rendering.rs index 96dcac23f..6dbf5b627 100644 --- a/internal/core/item_rendering.rs +++ b/internal/core/item_rendering.rs @@ -139,7 +139,7 @@ impl ItemCache { /// Function that must be called when a component is destroyed. /// - /// Usually can be called from [`crate::window::WindowAdapterSealed::unregister_component`] + /// Usually can be called from [`crate::window::WindowAdapterInternal::unregister_component`] pub fn component_destroyed(&self, component: crate::component::ComponentRef) { let component_ptr: *const _ = crate::component::ComponentRef::as_ptr(component).cast().as_ptr(); diff --git a/internal/core/software_renderer.rs b/internal/core/software_renderer.rs index 2a2140b4d..0eebe21fb 100644 --- a/internal/core/software_renderer.rs +++ b/internal/core/software_renderer.rs @@ -2012,7 +2012,7 @@ impl MinimalSoftwareWindow { } } -impl crate::window::WindowAdapterSealed for MinimalSoftwareWindow { +impl crate::window::WindowAdapterInternal for MinimalSoftwareWindow { fn request_redraw(&self) { self.needs_redraw.set(true); } diff --git a/internal/core/window.rs b/internal/core/window.rs index 9cacfab10..40c35593d 100644 --- a/internal/core/window.rs +++ b/internal/core/window.rs @@ -57,7 +57,7 @@ fn input_as_key_event(input: KeyInputEvent, modifiers: KeyboardModifiers) -> Key /// yourself, but you should use the provided window adapter. Use /// [`MinimalSoftwareWindow`](crate::software_renderer::MinimalSoftwareWindow) when /// implementing your own [`platform`](crate::platform). -pub trait WindowAdapter: WindowAdapterSealed { +pub trait WindowAdapter: WindowAdapterInternal { /// Returns the window API. fn window(&self) -> &Window; @@ -109,7 +109,7 @@ pub trait WindowAdapter: WindowAdapterSealed { // `#[doc(hidden)] fn internal(&self, InternalToken) -> Option<&WindowAdapterInternal> {None}` // TODO: add events for window receiving and loosing focus #[doc(hidden)] -pub trait WindowAdapterSealed { +pub trait WindowAdapterInternal { /// Registers the window with the windowing system. // TODO: make public, consider renaming to set_visible with a bool fn show(&self) -> Result<(), PlatformError> { @@ -193,7 +193,7 @@ pub trait WindowAdapterSealed { } } -/// This is the parameter from [`WindowAdapterSealed::input_method_request()`] which lets the editable text input field +/// This is the parameter from [`WindowAdapterInternal::input_method_request()`] which lets the editable text input field /// communicate with the platform about input methods. #[derive(Debug, Clone)] #[non_exhaustive] diff --git a/tests/screenshots/testing.rs b/tests/screenshots/testing.rs index 7092930ee..7c399d0f2 100644 --- a/tests/screenshots/testing.rs +++ b/tests/screenshots/testing.rs @@ -16,7 +16,7 @@ use i_slint_core::{ platform::PlatformError, renderer::RendererSealed, software_renderer::{LineBufferProvider, MinimalSoftwareWindow}, - window::WindowAdapterSealed, + window::WindowAdapterInternal, }; pub struct SwrTestingBackend {