mirror of
https://codeberg.org/waydeer/layer-shika.git
synced 2025-12-23 09:15:55 +00:00
refactor: remove legacy unused code
This commit is contained in:
parent
198376534c
commit
30c3100ca2
7 changed files with 1 additions and 105 deletions
|
|
@ -7,7 +7,7 @@ pub(crate) mod wayland;
|
|||
pub use rendering::femtovg::popup_window::PopupWindow;
|
||||
|
||||
pub use wayland::config::WaylandWindowConfig;
|
||||
pub use wayland::facade::{PopupManagerFacade, ShellContextFacade, WindowingSystemFacade};
|
||||
pub use wayland::facade::WindowingSystemFacade;
|
||||
pub use wayland::shell_adapter::WaylandWindowingSystem;
|
||||
pub use wayland::surfaces::app_state::AppState;
|
||||
pub use wayland::surfaces::popup_manager::PopupManager;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,6 @@
|
|||
use crate::errors::Result;
|
||||
use crate::wayland::shell_adapter::WaylandWindowingSystem;
|
||||
use crate::wayland::surfaces::popup_manager::PopupManager;
|
||||
use crate::wayland::surfaces::surface_state::WindowState;
|
||||
use layer_shika_domain::errors::DomainError;
|
||||
use layer_shika_domain::ports::windowing::ShellContextPort;
|
||||
use slint_interpreter::ComponentInstance;
|
||||
use std::rc::Rc;
|
||||
use std::result::Result as StdResult;
|
||||
|
||||
pub struct WindowingSystemFacade {
|
||||
inner: WaylandWindowingSystem,
|
||||
|
|
@ -33,53 +27,3 @@ impl WindowingSystemFacade {
|
|||
self.inner.run()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ShellContextFacade<'a> {
|
||||
window_state: &'a mut WindowState,
|
||||
}
|
||||
|
||||
impl<'a> ShellContextFacade<'a> {
|
||||
pub fn new(window_state: &'a mut WindowState) -> Self {
|
||||
Self { window_state }
|
||||
}
|
||||
|
||||
pub fn popup_manager(&self) -> Option<Rc<PopupManager>> {
|
||||
self.window_state.popup_manager()
|
||||
}
|
||||
|
||||
pub fn component_instance(&self) -> &ComponentInstance {
|
||||
self.window_state.component_instance()
|
||||
}
|
||||
|
||||
pub fn window_state(&self) -> &WindowState {
|
||||
self.window_state
|
||||
}
|
||||
|
||||
pub fn window_state_mut(&mut self) -> &mut WindowState {
|
||||
self.window_state
|
||||
}
|
||||
}
|
||||
|
||||
impl ShellContextPort for ShellContextFacade<'_> {
|
||||
fn render_frame_if_dirty(&mut self) -> StdResult<(), DomainError> {
|
||||
self.window_state
|
||||
.render_frame_if_dirty()
|
||||
.map_err(|e| DomainError::Adapter {
|
||||
source: Box::new(e),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PopupManagerFacade {
|
||||
inner: Rc<PopupManager>,
|
||||
}
|
||||
|
||||
impl PopupManagerFacade {
|
||||
pub fn new(inner: Rc<PopupManager>) -> Self {
|
||||
Self { inner }
|
||||
}
|
||||
|
||||
pub fn inner(&self) -> &Rc<PopupManager> {
|
||||
&self.inner
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct UiComponentHandle(usize);
|
||||
|
||||
impl UiComponentHandle {
|
||||
#[must_use]
|
||||
pub const fn new(id: usize) -> Self {
|
||||
Self(id)
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub const fn id(&self) -> usize {
|
||||
self.0
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1 @@
|
|||
pub mod component;
|
||||
pub mod output_registry;
|
||||
pub mod surface;
|
||||
pub mod window;
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct SurfaceHandle(usize);
|
||||
|
||||
impl SurfaceHandle {
|
||||
#[must_use]
|
||||
pub const fn new(id: usize) -> Self {
|
||||
Self(id)
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub const fn id(&self) -> usize {
|
||||
self.0
|
||||
}
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct WindowHandle(usize);
|
||||
|
||||
impl WindowHandle {
|
||||
#[must_use]
|
||||
pub const fn new(id: usize) -> Self {
|
||||
Self(id)
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub const fn id(&self) -> usize {
|
||||
self.0
|
||||
}
|
||||
}
|
||||
|
|
@ -4,10 +4,7 @@ pub use crate::config::WindowConfig;
|
|||
pub use crate::dimensions::{
|
||||
LogicalPosition, LogicalSize, PhysicalPosition, PhysicalSize, ScaleFactor,
|
||||
};
|
||||
pub use crate::entities::component::UiComponentHandle;
|
||||
pub use crate::entities::output_registry::OutputRegistry;
|
||||
pub use crate::entities::surface::SurfaceHandle;
|
||||
pub use crate::entities::window::WindowHandle;
|
||||
pub use crate::errors::{DomainError, Result};
|
||||
pub use crate::surface_dimensions::SurfaceDimensions;
|
||||
pub use crate::value_objects::anchor::AnchorEdges;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue