mirror of
https://codeberg.org/waydeer/layer-shika.git
synced 2025-11-17 23:14:23 +00:00
refactor: move to src
This commit is contained in:
parent
4e38b6ff58
commit
cc6e82b914
70 changed files with 89 additions and 36 deletions
17
Cargo.lock
generated
17
Cargo.lock
generated
|
|
@ -1855,11 +1855,7 @@ dependencies = [
|
|||
name = "layer-shika"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"layer-shika-adapters",
|
||||
"layer-shika-domain",
|
||||
"log",
|
||||
"spin_on",
|
||||
"thiserror 2.0.17",
|
||||
"layer-shika-composition",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1879,6 +1875,17 @@ dependencies = [
|
|||
"wayland-protocols",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "layer-shika-composition"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"layer-shika-adapters",
|
||||
"layer-shika-domain",
|
||||
"log",
|
||||
"spin_on",
|
||||
"thiserror 2.0.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "layer-shika-domain"
|
||||
version = "0.1.0"
|
||||
|
|
|
|||
25
Cargo.toml
25
Cargo.toml
|
|
@ -1,6 +1,24 @@
|
|||
[package]
|
||||
name = "layer-shika"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = "AGPL-3.0-or-later"
|
||||
repository = "https://codeberg.org/waydeer/layer-shika"
|
||||
rust-version = "1.85"
|
||||
keywords = ["layer-shell", "wayland", "slint", "femtovg", "smithay"]
|
||||
categories = ["gui"]
|
||||
description = "A layer shell library for Wayland with Slint UI integration"
|
||||
readme = "README.md"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
layer-shika-composition = { version = "0.1.0", path = "src/composition" }
|
||||
|
||||
[workspace]
|
||||
resolver = "2"
|
||||
members = ["domain", "adapters", "composition"]
|
||||
members = ["src/domain", "src/adapters", "src/composition"]
|
||||
|
||||
[workspace.package]
|
||||
version = "0.1.0"
|
||||
|
|
@ -32,8 +50,9 @@ thiserror = "2.0.17"
|
|||
wayland-client = "0.31.11"
|
||||
wayland-protocols = { version = "0.32.9", features = ["client", "staging"] }
|
||||
|
||||
layer-shika-domain = { version = "0.1.0", path = "domain" }
|
||||
layer-shika-adapters = { version = "0.1.0", path = "adapters" }
|
||||
layer-shika-domain = { version = "0.1.0", path = "src/domain" }
|
||||
layer-shika-adapters = { version = "0.1.0", path = "src/adapters" }
|
||||
layer-shika-composition = { version = "0.1.0", path = "src/composition" }
|
||||
|
||||
[workspace.lints.clippy]
|
||||
all = { level = "deny", priority = -1 }
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
pub mod egl;
|
||||
pub mod femtovg;
|
||||
pub mod slint_integration;
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
pub mod config;
|
||||
pub mod connection;
|
||||
pub mod event_handling;
|
||||
pub mod globals;
|
||||
pub mod managed_proxies;
|
||||
pub mod shell_adapter;
|
||||
pub mod surfaces;
|
||||
|
|
@ -1,11 +1,20 @@
|
|||
#![allow(clippy::pub_use)]
|
||||
|
||||
pub mod errors;
|
||||
pub mod rendering;
|
||||
pub mod wayland;
|
||||
pub(crate) mod rendering;
|
||||
pub(crate) mod wayland;
|
||||
|
||||
pub use rendering::femtovg::popup_window::PopupWindow;
|
||||
|
||||
pub use wayland::{
|
||||
config::WaylandWindowConfig,
|
||||
shell_adapter::WaylandWindowingSystem,
|
||||
surfaces::{
|
||||
popup_manager::{PopupId, PopupManager},
|
||||
surface_state::WindowState,
|
||||
},
|
||||
};
|
||||
|
||||
pub mod platform {
|
||||
pub use slint;
|
||||
pub use slint_interpreter;
|
||||
3
src/adapters/src/rendering/mod.rs
Normal file
3
src/adapters/src/rendering/mod.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
pub(crate) mod egl;
|
||||
pub(crate) mod femtovg;
|
||||
pub(crate) mod slint_integration;
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
use layer_shika_domain::prelude::{
|
||||
AnchorEdges, KeyboardInteractivity as DomainKeyboardInteractivity, Layer, Margins,
|
||||
WindowConfig as DomainWindowConfig,
|
||||
};
|
||||
use slint_interpreter::{ComponentDefinition, CompilationResult};
|
||||
use layer_shika_domain::config::WindowConfig as DomainWindowConfig;
|
||||
use layer_shika_domain::value_objects::anchor::AnchorEdges;
|
||||
use layer_shika_domain::value_objects::keyboard_interactivity::KeyboardInteractivity as DomainKeyboardInteractivity;
|
||||
use layer_shika_domain::value_objects::layer::Layer;
|
||||
use layer_shika_domain::value_objects::margins::Margins;
|
||||
use slint_interpreter::{CompilationResult, ComponentDefinition};
|
||||
use smithay_client_toolkit::reexports::protocols_wlr::layer_shell::v1::client::{
|
||||
zwlr_layer_shell_v1::{self},
|
||||
zwlr_layer_surface_v1::{Anchor, KeyboardInteractivity as WaylandKeyboardInteractivity},
|
||||
7
src/adapters/src/wayland/mod.rs
Normal file
7
src/adapters/src/wayland/mod.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
pub(crate) mod config;
|
||||
pub(crate) mod connection;
|
||||
pub(crate) mod event_handling;
|
||||
pub(crate) mod globals;
|
||||
pub(crate) mod managed_proxies;
|
||||
pub(crate) mod shell_adapter;
|
||||
pub(crate) mod surfaces;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "layer-shika"
|
||||
name = "layer-shika-composition"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#![allow(clippy::pub_use)]
|
||||
|
||||
pub mod builder;
|
||||
pub mod system;
|
||||
mod builder;
|
||||
mod system;
|
||||
|
||||
use layer_shika_adapters::errors::LayerShikaError;
|
||||
use layer_shika_domain::errors::DomainError;
|
||||
|
|
@ -12,7 +12,12 @@ pub use layer_shika_adapters::PopupWindow;
|
|||
pub use layer_shika_adapters::platform::{slint, slint_interpreter};
|
||||
pub use layer_shika_domain::value_objects::anchor::AnchorEdges;
|
||||
pub use layer_shika_domain::value_objects::keyboard_interactivity::KeyboardInteractivity;
|
||||
pub use layer_shika_domain::value_objects::layer::Layer;
|
||||
pub use layer_shika_domain::value_objects::popup_positioning_mode::PopupPositioningMode;
|
||||
pub use layer_shika_domain::value_objects::popup_request::{
|
||||
PopupAt, PopupHandle, PopupRequest, PopupSize,
|
||||
};
|
||||
pub use system::{EventLoopHandle, RuntimeState, WindowingSystem};
|
||||
|
||||
pub mod calloop {
|
||||
pub use layer_shika_adapters::platform::calloop::{
|
||||
|
|
@ -8,13 +8,8 @@ use layer_shika_adapters::platform::slint::{ComponentHandle, SharedString};
|
|||
use layer_shika_adapters::platform::slint_interpreter::{
|
||||
CompilationResult, ComponentDefinition, ComponentInstance, Value,
|
||||
};
|
||||
use layer_shika_adapters::wayland::{
|
||||
config::WaylandWindowConfig,
|
||||
shell_adapter::WaylandWindowingSystem,
|
||||
surfaces::{
|
||||
popup_manager::{PopupId, PopupManager},
|
||||
surface_state::WindowState,
|
||||
},
|
||||
use layer_shika_adapters::{
|
||||
PopupId, PopupManager, WaylandWindowConfig, WaylandWindowingSystem, WindowState,
|
||||
};
|
||||
use layer_shika_domain::config::WindowConfig;
|
||||
use layer_shika_domain::errors::DomainError;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
pub mod config;
|
||||
pub mod dimensions;
|
||||
pub mod entities;
|
||||
pub(crate) mod entities;
|
||||
pub mod errors;
|
||||
pub mod ports;
|
||||
pub mod prelude;
|
||||
17
src/lib.rs
Normal file
17
src/lib.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#![allow(clippy::pub_use)]
|
||||
|
||||
mod composition {
|
||||
pub use layer_shika_composition::*;
|
||||
}
|
||||
|
||||
pub use composition::{
|
||||
AnchorEdges, Error, EventLoopHandle, KeyboardInteractivity, Layer, LayerShika, PopupAt,
|
||||
PopupHandle, PopupPositioningMode, PopupRequest, PopupSize, PopupWindow, Result, RuntimeState,
|
||||
WindowingSystem,
|
||||
};
|
||||
|
||||
pub use composition::{slint, slint_interpreter};
|
||||
|
||||
pub mod calloop {
|
||||
pub use layer_shika_composition::calloop::*;
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue