add wlx-common lib, move GeneralConfig into it

This commit is contained in:
Aleksander
2025-11-25 00:21:51 +01:00
parent a6da79bf3d
commit 8485639e00
35 changed files with 601 additions and 566 deletions

View File

@@ -7,25 +7,26 @@ use vulkano::{
command_buffer::CommandBufferUsage,
device::Queue,
format::Format,
image::{sampler::Filter, view::ImageView, Image},
image::{Image, sampler::Filter, view::ImageView},
pipeline::graphics::color_blend::AttachmentBlend,
};
use wgui::gfx::{
WGfx,
cmd::WGfxClearMode,
pass::WGfxPass,
pipeline::{WGfxPipeline, WPipelineCreateInfo},
WGfx,
};
use wlx_capture::{
frame::{self as wlx_frame, DrmFormat, FrameFormat, MouseMeta, Transform, WlxFrame},
WlxCapture,
frame::{self as wlx_frame, DrmFormat, FrameFormat, MouseMeta, Transform, WlxFrame},
};
use wlx_common::config::GeneralConfig;
use crate::{
config::GeneralConfig,
graphics::{
dmabuf::{fourcc_to_vk, WGfxDmabuf},
upload_quad_vertices, Vert2Uv,
Vert2Uv,
dmabuf::{WGfxDmabuf, fourcc_to_vk},
upload_quad_vertices,
},
state::AppState,
windowing::backend::{FrameMeta, RenderResources},

View File

@@ -1,15 +1,13 @@
use std::{f32::consts::PI, sync::Arc};
use glam::{vec3, Affine3A, Quat, Vec3};
use glam::{Affine3A, Quat, Vec3, vec3};
use wlx_capture::frame::Transform;
use wlx_common::windowing::{OverlayWindowState, Positioning};
use crate::{
state::{AppSession, AppState, ScreenMeta},
subsystem::{hid::XkbKeymap, input::KeyboardFocus},
windowing::{
backend::OverlayBackend,
window::{OverlayWindowConfig, OverlayWindowState, Positioning},
},
windowing::{backend::OverlayBackend, window::OverlayWindowConfig},
};
pub mod backend;

View File

@@ -6,12 +6,9 @@ use wlx_capture::{
pipewire::{PipewireCapture, PipewireSelectScreenResult},
wayland::WlxOutput,
};
use wlx_common::config::{PwTokenMap, def_pw_tokens};
use crate::{
config::{PwTokenMap, def_pw_tokens},
config_io,
state::AppState,
};
use crate::{config_io, state::AppState};
use super::{
backend::ScreenBackend,

View File

@@ -5,9 +5,9 @@ use wlx_capture::{
wlr_dmabuf::WlrDmabufCapture,
wlr_screencopy::WlrScreencopyCapture,
};
use wlx_common::{astr_containers::AStrMapExt, config::PwTokenMap};
use crate::{
config::{AStrMapExt, PwTokenMap},
overlays::screen::create_screen_from_backend,
state::{AppState, ScreenMeta},
};

View File

@@ -35,9 +35,9 @@ impl ScreenBackend {
pub fn create_screens_x11pw(app: &mut AppState) -> anyhow::Result<ScreenCreateData> {
use glam::vec2;
use wlx_capture::{pipewire::PipewireCapture, xshm::xshm_get_monitors};
use wlx_common::{astr_containers::AStrMapExt, config::PwTokenMap};
use crate::{
config::{AStrMapExt, PwTokenMap},
overlays::screen::{
create_screen_from_backend,
pw::{load_pw_token_config, save_pw_token_config, select_pw_screen},