From dc62d2240f63b96b063bb398de85834a2b148200 Mon Sep 17 00:00:00 2001 From: kossLAN Date: Sun, 7 Jun 2026 13:37:22 -0400 Subject: [PATCH] all: import split crates directly --- build/wire.rs | 2 +- src/acceptor.rs | 3 +- src/animation.rs | 6 ++- src/async_engine.rs | 1 - src/backend.rs | 3 +- src/backends/dummy.rs | 3 +- src/backends/headless.rs | 6 ++- src/backends/metal.rs | 3 +- src/backends/metal/allocator.rs | 6 ++- src/backends/metal/input.rs | 6 +-- src/backends/metal/present.rs | 8 ++-- src/backends/metal/video/discovery.rs | 8 ++-- src/backends/metal/video/model.rs | 3 +- src/backends/x.rs | 8 ++-- src/bugs.rs | 1 - src/cli.rs | 6 ++- src/cli/color.rs | 3 +- src/cli/config.rs | 3 +- src/cli/randr.rs | 5 ++- src/cli/screenshot.rs | 6 ++- src/cli/seat_test.rs | 2 +- src/cli/tree.rs | 3 +- src/client.rs | 9 ++-- src/client/tasks.rs | 3 +- src/compositor.rs | 38 +++++++++++------ src/config/handler.rs | 33 ++++++++------- src/config/handler/dispatch.rs | 2 +- src/config/handler/theme.rs | 2 +- src/copy_device.rs | 9 ++-- src/copy_device/execute.rs | 3 +- src/copy_device/registry.rs | 9 ++-- src/cpu_worker.rs | 1 - src/criteria.rs | 2 - src/criteria/clm.rs | 36 ++++++++-------- src/criteria/clm/clm_matchers.rs | 4 +- src/criteria/clm/clm_matchers/clmm_id.rs | 3 +- .../clm/clm_matchers/clmm_is_xwayland.rs | 4 +- src/criteria/clm/clm_matchers/clmm_pid.rs | 6 +-- .../clm/clm_matchers/clmm_sandboxed.rs | 4 +- src/criteria/clm/clm_matchers/clmm_string.rs | 6 +-- src/criteria/clm/clm_matchers/clmm_uid.rs | 6 +-- src/criteria/tlm.rs | 16 ++++---- src/criteria/tlm/tlm_matchers.rs | 4 +- src/criteria/tlm/tlm_matchers/tlmm_client.rs | 14 ++++--- .../tlm/tlm_matchers/tlmm_content_type.rs | 6 +-- .../tlm/tlm_matchers/tlmm_floating.rs | 2 +- .../tlm/tlm_matchers/tlmm_fullscreen.rs | 2 +- .../tlm/tlm_matchers/tlmm_just_mapped.rs | 2 +- src/criteria/tlm/tlm_matchers/tlmm_kind.rs | 6 +-- .../tlm/tlm_matchers/tlmm_seat_focus.rs | 6 +-- src/criteria/tlm/tlm_matchers/tlmm_string.rs | 6 +-- src/criteria/tlm/tlm_matchers/tlmm_urgent.rs | 2 +- src/criteria/tlm/tlm_matchers/tlmm_visible.rs | 2 +- src/cursor.rs | 16 +++++--- src/cursor_user.rs | 7 ++-- src/damage.rs | 15 ++++--- src/dbus.rs | 6 ++- src/dbus/holder.rs | 6 ++- src/edid.rs | 1 - src/ei/ei_acceptor.rs | 3 +- src/ei/ei_client.rs | 3 +- src/ei/ei_client/ei_tasks.rs | 3 +- src/ei/ei_ifs/ei_device.rs | 7 ++-- src/ei/ei_ifs/ei_keyboard.rs | 2 +- src/ei/ei_ifs/ei_pointer.rs | 2 +- src/ei/ei_ifs/ei_pointer_absolute.rs | 2 +- src/ei/ei_ifs/ei_scroll.rs | 2 +- src/ei/ei_ifs/ei_seat.rs | 4 +- src/ei/ei_ifs/ei_touchscreen.rs | 2 +- src/eventfd_cache.rs | 1 - src/fixed.rs | 1 - src/forker/io.rs | 3 +- src/forker/proxy.rs | 3 +- src/forker/worker.rs | 6 ++- src/gfx_api.rs | 19 +++++---- src/gfx_apis.rs | 12 ++++-- src/gfx_apis/gl.rs | 3 +- src/gfx_apis/gl/renderer/context.rs | 6 ++- src/gfx_apis/gl/renderer/framebuffer.rs | 6 ++- src/gfx_apis/gl/renderer/texture.rs | 3 +- src/gfx_apis/vulkan.rs | 18 +++++--- src/gfx_apis/vulkan/allocator.rs | 3 +- src/gfx_apis/vulkan/device.rs | 3 +- src/gfx_apis/vulkan/image.rs | 6 ++- src/gfx_apis/vulkan/renderer.rs | 15 ++++--- src/gfx_apis/vulkan/renderer/color.rs | 3 +- src/gfx_apis/vulkan/renderer/paint_region.rs | 3 +- src/gfx_apis/vulkan/shm_image.rs | 6 ++- src/gfx_apis/vulkan/staging.rs | 3 +- src/gfx_apis/vulkan/transfer.rs | 17 ++++---- src/icons.rs | 11 ++--- src/ifs/data_transfer.rs | 2 +- src/ifs/data_transfer/wl_data_device.rs | 7 ++-- src/ifs/data_transfer/wl_data_offer.rs | 2 +- src/ifs/ext_idle_notification_v1.rs | 3 +- .../ext_image_copy_capture_frame_v1.rs | 3 +- .../ext_image_copy_capture_session_v1.rs | 3 +- src/ifs/head_management.rs | 2 +- ...jay_head_ext_compositor_space_scaler_v1.rs | 2 +- src/ifs/jay_compositor.rs | 3 +- src/ifs/jay_damage_tracking.rs | 3 +- src/ifs/jay_input.rs | 2 +- src/ifs/jay_randr.rs | 2 +- src/ifs/jay_screencast.rs | 2 +- src/ifs/jay_seat_events.rs | 2 +- src/ifs/jay_tree_query.rs | 3 +- src/ifs/wl_buffer.rs | 3 +- src/ifs/wl_output.rs | 5 ++- src/ifs/wl_region.rs | 3 +- src/ifs/wl_seat.rs | 24 ++++++----- src/ifs/wl_seat/event_handling.rs | 8 ++-- src/ifs/wl_seat/gesture_owner.rs | 3 +- src/ifs/wl_seat/pointer_owner.rs | 8 ++-- src/ifs/wl_seat/tablet/pad.rs | 5 ++- src/ifs/wl_seat/tablet/tool.rs | 8 ++-- src/ifs/wl_seat/tablet/tool_owner.rs | 2 +- .../wl_seat/tablet/zwp_tablet_pad_ring_v2.rs | 2 +- src/ifs/wl_seat/tablet/zwp_tablet_tool_v2.rs | 2 +- src/ifs/wl_seat/text_input.rs | 2 +- src/ifs/wl_seat/text_input/simple_im.rs | 2 +- .../zwp_input_method_keyboard_grab_v2.rs | 2 +- .../wl_seat/text_input/zwp_input_method_v2.rs | 2 +- .../wl_seat/text_input/zwp_text_input_v3.rs | 3 +- src/ifs/wl_seat/touch_owner.rs | 2 +- src/ifs/wl_seat/wl_keyboard.rs | 2 +- src/ifs/wl_seat/wl_pointer.rs | 2 +- src/ifs/wl_seat/wl_touch.rs | 2 +- src/ifs/wl_seat/zwp_pointer_constraints_v1.rs | 5 ++- .../wl_seat/zwp_pointer_gesture_pinch_v1.rs | 2 +- .../wl_seat/zwp_pointer_gesture_swipe_v1.rs | 2 +- src/ifs/wl_seat/zwp_relative_pointer_v1.rs | 2 +- .../zwp_virtual_keyboard_manager_v1.rs | 2 +- src/ifs/wl_seat/zwp_virtual_keyboard_v1.rs | 3 +- src/ifs/wl_surface.rs | 11 ++--- src/ifs/wl_surface/commit_timeline.rs | 8 ++-- src/ifs/wl_surface/cursor.rs | 7 ++-- src/ifs/wl_surface/dnd_icon.rs | 3 +- .../wl_surface/ext_session_lock_surface_v1.rs | 5 ++- src/ifs/wl_surface/tray.rs | 3 +- src/ifs/wl_surface/tray/jay_tray_item_v1.rs | 3 +- src/ifs/wl_surface/wp_fractional_scale_v1.rs | 2 +- src/ifs/wl_surface/x_surface/xwindow.rs | 5 ++- src/ifs/wl_surface/xdg_surface.rs | 3 +- src/ifs/wl_surface/xdg_surface/xdg_popup.rs | 5 ++- .../wl_surface/xdg_surface/xdg_toplevel.rs | 14 ++++--- src/ifs/wl_surface/zwlr_layer_surface_v1.rs | 3 +- .../wl_surface/zwp_input_popup_surface_v2.rs | 3 +- .../zwlr_output_configuration_head.rs | 4 +- .../wlr_output_manager/zwlr_output_head_v1.rs | 10 ++--- src/ifs/xdg_positioner.rs | 3 +- src/ifs/xdg_toplevel_drag_v1.rs | 3 +- ...xx_foreign_toplevel_geometry_tracker_v1.rs | 3 +- src/ifs/zwlr_screencopy_frame_v1.rs | 3 +- src/ifs/zwlr_screencopy_manager_v1.rs | 3 +- src/ifs/zwlr_virtual_pointer_v1.rs | 2 +- src/io_uring.rs | 1 - src/it.rs | 6 ++- src/it/test_backend.rs | 8 ++-- src/it/test_client.rs | 3 +- src/it/test_gfx_api.rs | 9 ++-- src/it/test_ifs/test_pointer_warp.rs | 2 +- src/it/test_ifs/test_region.rs | 3 +- src/it/test_ifs/test_shm_buffer.rs | 3 +- .../test_single_pixel_buffer_manager.rs | 3 +- src/it/test_ifs/test_viewport.rs | 2 +- src/it/test_logger.rs | 3 +- src/it/test_transport.rs | 3 +- src/it/test_utils/test_surface_ext.rs | 3 +- src/it/testrun.rs | 2 +- src/it/tests/t0003_multi_window.rs | 3 +- src/it/tests/t0006_region.rs | 3 +- src/it/tests/t0007_subsurface.rs | 3 +- src/it/tests/t0012_subsurface_focus.rs | 3 +- src/it/tests/t0020_surface_offset.rs | 3 +- src/it/tests/t0031_syncobj.rs | 3 +- src/it/tests/t0033_float_size_memoization.rs | 3 +- src/it/tests/t0038_subsurface_parent_state.rs | 3 +- src/it/tests/t0039_alpha_modifier.rs | 3 +- src/it/tests/t0040_virtual_keyboard.rs | 2 +- src/it/tests/t0046_buffer_release.rs | 3 +- src/it/tests/t0047_surface_damage.rs | 5 ++- src/it/tests/t0048_frame_callback.rs | 2 +- src/it/tests/t0049_surface_damage_backend.rs | 4 +- src/it/tests/t0050_fifo.rs | 3 +- src/it/tests/t0051_pointer_warp.rs | 2 +- .../t0054_subsurface_already_attached.rs | 3 +- src/kbvm.rs | 2 +- src/keyboard.rs | 4 -- src/logger.rs | 1 - src/main.rs | 20 --------- src/pango.rs | 1 - src/pipewire/pw_con.rs | 6 ++- src/pipewire/pw_ifs/pw_client_node.rs | 3 +- src/portal.rs | 16 +++++--- .../ptl_remote_desktop/remote_desktop_gui.rs | 3 +- src/portal/ptl_screencast/screencast_gui.rs | 3 +- src/portal/ptl_text.rs | 12 +++--- src/portal/ptr_gui.rs | 10 +++-- src/pr_caps.rs | 1 - src/rect.rs | 1 - src/renderer.rs | 10 +++-- src/renderer/renderer_base.rs | 8 ++-- src/scale.rs | 1 - src/screenshoter.rs | 2 +- src/sighand.rs | 1 - src/state.rs | 41 ++++++++++++------- src/state/animations.rs | 3 +- src/state/connectors.rs | 7 ++-- src/state/render_context.rs | 2 +- src/state/rendering.rs | 16 ++++---- src/state/settings.rs | 6 ++- src/state/tree_ops.rs | 3 +- src/state/xwayland.rs | 3 +- src/tagged_acceptor.rs | 3 +- src/tasks/const_clock.rs | 3 +- src/text.rs | 26 ++++++------ src/theme.rs | 1 - src/time.rs | 1 - src/tools/tool_client.rs | 12 ++++-- src/tree.rs | 8 ++-- src/tree/container.rs | 7 ++-- src/tree/container/drag_destination.rs | 3 +- src/tree/container/layout.rs | 2 +- src/tree/container/tasks.rs | 2 +- src/tree/display.rs | 5 ++- src/tree/float.rs | 5 ++- src/tree/output.rs | 10 +++-- src/tree/output/policy.rs | 2 +- src/tree/output/render_data.rs | 3 +- src/tree/placeholder.rs | 7 ++-- src/tree/tab_bar.rs | 4 +- src/tree/toplevel.rs | 5 ++- src/tree/workspace.rs | 5 ++- src/udmabuf.rs | 1 - src/utils/clone3.rs | 3 +- src/video/drm.rs | 3 +- src/video/drm/wait_for_syncobj.rs | 6 ++- src/virtual_output.rs | 9 ++-- src/vulkan_core.rs | 3 +- src/vulkan_core/device.rs | 3 +- src/wheel.rs | 1 - src/wl_usr.rs | 9 ++-- src/wl_usr/usr_ifs/usr_wp_viewport.rs | 2 +- src/xcon.rs | 3 +- src/xwayland.rs | 3 +- src/xwayland/xwm.rs | 6 ++- src/xwayland/xwm/transfer.rs | 3 +- 247 files changed, 737 insertions(+), 550 deletions(-) delete mode 100644 src/async_engine.rs delete mode 100644 src/bugs.rs delete mode 100644 src/cpu_worker.rs delete mode 100644 src/edid.rs delete mode 100644 src/eventfd_cache.rs delete mode 100644 src/fixed.rs delete mode 100644 src/io_uring.rs delete mode 100644 src/keyboard.rs delete mode 100644 src/logger.rs delete mode 100644 src/pango.rs delete mode 100644 src/pr_caps.rs delete mode 100644 src/rect.rs delete mode 100644 src/scale.rs delete mode 100644 src/sighand.rs delete mode 100644 src/theme.rs delete mode 100644 src/time.rs delete mode 100644 src/udmabuf.rs delete mode 100644 src/wheel.rs diff --git a/build/wire.rs b/build/wire.rs index b33f4ad9..139fe8d2 100644 --- a/build/wire.rs +++ b/build/wire.rs @@ -443,7 +443,7 @@ pub fn main() -> Result<()> { writeln!(f, "use std::rc::Rc;")?; writeln!(f, "use uapi::OwnedFd;")?; writeln!(f, "use bstr::BStr;")?; - writeln!(f, "use crate::fixed::Fixed;")?; + writeln!(f, "use jay_units::fixed::Fixed;")?; writeln!(f, "use crate::client::{{EventFormatter, RequestParser}};")?; writeln!(f, "use crate::object::{{ObjectId, Interface}};")?; writeln!( diff --git a/src/acceptor.rs b/src/acceptor.rs index 324d31a1..4bd6dd2e 100644 --- a/src/acceptor.rs +++ b/src/acceptor.rs @@ -1,6 +1,7 @@ +use jay_async_engine::SpawnedFuture; use { crate::{ - async_engine::SpawnedFuture, + client::ClientMetadata, state::State, utils::{ diff --git a/src/animation.rs b/src/animation.rs index 3d6136fa..b4e29a02 100644 --- a/src/animation.rs +++ b/src/animation.rs @@ -1,11 +1,13 @@ +use jay_theme::Color; +use jay_geometry::Rect; use { crate::{ cmm::{cmm_description::ColorDescription, cmm_render_intent::RenderIntent}, gfx_api::{GfxTexture, SampleRect}, ifs::wl_surface::{SurfaceBuffer, WlSurface}, - rect::Rect, + state::State, - theme::Color, + tree::{LatchListener, NodeId, OutputNode}, utils::{clonecell::CloneCell, event_listener::EventListener}, }, diff --git a/src/async_engine.rs b/src/async_engine.rs deleted file mode 100644 index 740b31b3..00000000 --- a/src/async_engine.rs +++ /dev/null @@ -1 +0,0 @@ -pub use jay_async_engine::*; diff --git a/src/backend.rs b/src/backend.rs index f497dded..e83ecad5 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -1,6 +1,7 @@ +use jay_async_engine::SpawnedFuture; use { crate::{ - async_engine::SpawnedFuture, + backend::transaction::{ BackendConnectorTransaction, BackendConnectorTransactionError, BackendConnectorTransactionType, BackendConnectorTransactionTypeDyn, diff --git a/src/backends/dummy.rs b/src/backends/dummy.rs index 1ac3be15..07499141 100644 --- a/src/backends/dummy.rs +++ b/src/backends/dummy.rs @@ -1,6 +1,7 @@ +use jay_async_engine::SpawnedFuture; use { crate::{ - async_engine::SpawnedFuture, + backend::{ self, Backend, BackendConnectorState, BackendConnectorStateSerial, Connector, ConnectorEvent, ConnectorId, ConnectorKernelId, DrmDeviceId, diff --git a/src/backends/headless.rs b/src/backends/headless.rs index 74134481..a0450031 100644 --- a/src/backends/headless.rs +++ b/src/backends/headless.rs @@ -1,12 +1,14 @@ +use jay_io_uring::IoUringError; +use jay_async_engine::SpawnedFuture; use { crate::{ - async_engine::SpawnedFuture, + backend::{Backend, BackendDrmDevice, BackendEvent, DrmDeviceId, DrmEvent}, backends::headless::HeadlessBackendError::{ CreateDrm, GetDrmNodes, MonitorFdFailed, MonitorFdReadable, NoDrmNodes, OpenDrmNode, }, gfx_api::{GfxApi, GfxContext}, - io_uring::IoUringError, + state::State, udev::{Udev, UdevDevice, UdevError, UdevMonitor}, utils::{ diff --git a/src/backends/metal.rs b/src/backends/metal.rs index 6dbf5c8f..6a97e546 100644 --- a/src/backends/metal.rs +++ b/src/backends/metal.rs @@ -5,9 +5,10 @@ mod present; mod transaction; mod video; +use jay_async_engine::SpawnedFuture; use { crate::{ - async_engine::SpawnedFuture, + backend::{ Backend, ButtonState, InputDevice, InputDeviceAccelProfile, InputDeviceCapability, InputDeviceClickMethod, InputDeviceGroupId, InputDeviceId, InputEvent, KeyState, Leds, diff --git a/src/backends/metal/allocator.rs b/src/backends/metal/allocator.rs index 956de322..b0d19b41 100644 --- a/src/backends/metal/allocator.rs +++ b/src/backends/metal/allocator.rs @@ -1,3 +1,5 @@ +use jay_udmabuf::{Udmabuf, UdmabufError}; +use jay_geometry::{DamageQueue, Rect, Region}; use { crate::{ allocator::BufferObject, @@ -14,8 +16,8 @@ use { AcquireSync, FdSync, GfxBlendBuffer, GfxError, GfxFormat, GfxFramebuffer, GfxTexture, GfxWriteModifier, ReleaseSync, needs_render_usage, }, - rect::{DamageQueue, Rect, Region}, - udmabuf::{Udmabuf, UdmabufError}, + + utils::{errorfmt::ErrorFmt, rc_eq::rc_eq}, video::{ LINEAR_MODIFIER, Modifier, diff --git a/src/backends/metal/input.rs b/src/backends/metal/input.rs index eea033e1..a298ac52 100644 --- a/src/backends/metal/input.rs +++ b/src/backends/metal/input.rs @@ -1,13 +1,13 @@ +use jay_units::fixed::Fixed; use { crate::{ backend::{ - AxisSource, ButtonState, InputEvent, KeyState, PadButtonState, ScrollAxis, - SwitchEvent, TabletRingEventSource, TabletStripEventSource, TabletTool2dChange, + AxisSource, ButtonState, InputEvent, KeyState, PadButtonState, ScrollAxis, SwitchEvent, + TabletRingEventSource, TabletStripEventSource, TabletTool2dChange, TabletToolCapability, TabletToolChanges, TabletToolId, TabletToolInit, TabletToolPositionChange, TabletToolType, TabletToolWheelChange, ToolButtonState, }, backends::metal::MetalBackend, - fixed::Fixed, libinput::{ consts::{ LIBINPUT_BUTTON_STATE_PRESSED, LIBINPUT_BUTTON_STATE_RELEASED, diff --git a/src/backends/metal/present.rs b/src/backends/metal/present.rs index 88024bfb..2ccf2d87 100644 --- a/src/backends/metal/present.rs +++ b/src/backends/metal/present.rs @@ -1,3 +1,5 @@ +use jay_time::Time; +use jay_geometry::Region; use { crate::{ backend::{BackendDrmDevice, Connector}, @@ -13,9 +15,9 @@ use { SyncFile, create_render_pass, }, ifs::wl_output::BlendSpace, - rect::Region, - time::Time, - tracy::FrameName, + + + jay_tracy::FrameName, tree::OutputNode, utils::{errorfmt::ErrorFmt, oserror::OsError}, video::{ diff --git a/src/backends/metal/video/discovery.rs b/src/backends/metal/video/discovery.rs index 58a9a152..659e1454 100644 --- a/src/backends/metal/video/discovery.rs +++ b/src/backends/metal/video/discovery.rs @@ -1,3 +1,5 @@ +use jay_edid::{CtaDataBlock, Descriptor, EdidExtension}; +use jay_async_engine::Phase; use { super::{ ConnectorDisplayData, ConnectorFutures, FrontState, MetalConnector, MetalCrtc, @@ -5,7 +7,7 @@ use { properties::{DefaultValue, collect_properties, create_default_properties}, }, crate::{ - async_engine::Phase, + backend::{ BackendColorSpace, BackendConnectorState, BackendEotfs, BackendLuminance, ConnectorKernelId, Mode, OutputId, @@ -16,7 +18,7 @@ use { transaction::{DrmConnectorState, DrmCrtcState, DrmPlaneState}, }, cmm::cmm_primaries::Primaries, - edid::{CtaDataBlock, Descriptor, EdidExtension}, + format::XRGB8888, utils::{ binary_search_map::BinarySearchMap, bitflags::BitflagsExt, clonecell::CloneCell, @@ -186,7 +188,7 @@ pub(super) fn create_connector_display_data( break 'fetch_edid; } }; - let edid = match crate::edid::parse(&blob) { + let edid = match jay_edid::parse(&blob) { Ok(e) => e, Err(e) => { log::error!( diff --git a/src/backends/metal/video/model.rs b/src/backends/metal/video/model.rs index c220b8cb..90299602 100644 --- a/src/backends/metal/video/model.rs +++ b/src/backends/metal/video/model.rs @@ -1,7 +1,8 @@ +use jay_async_engine::SpawnedFuture; use { super::{copy_device::CopyDeviceHolder, lease::MetalLeaseData, properties::DefaultProperty}, crate::{ - async_engine::SpawnedFuture, + backend::{ BackendConnectorState, BackendLuminance, ConnectorEvent, ConnectorId, ConnectorKernelId, DrmDeviceId, DrmEvent, Mode, OutputId, diff --git a/src/backends/x.rs b/src/backends/x.rs index 7309cf2c..9cd85547 100644 --- a/src/backends/x.rs +++ b/src/backends/x.rs @@ -1,7 +1,10 @@ +use jay_time::Time; +use jay_async_engine::{Phase, SpawnedFuture}; +use jay_units::fixed::Fixed; use { crate::{ allocator::BufferObject, - async_engine::{Phase, SpawnedFuture}, + backend::{ AXIS_120, AxisSource, Backend, BackendConnectorState, BackendDrmDevice, BackendEvent, ButtonState, Connector, ConnectorEvent, ConnectorId, ConnectorKernelId, DrmDeviceId, @@ -15,13 +18,12 @@ use { }, }, cmm::cmm_primaries::Primaries, - fixed::Fixed, format::{Format, XRGB8888}, gfx_api::{ AcquireSync, GfxApi, GfxContext, GfxError, GfxFramebuffer, GfxTexture, ReleaseSync, }, state::State, - time::Time, + utils::{ clonecell::CloneCell, copyhashmap::CopyHashMap, errorfmt::ErrorFmt, numcell::NumCell, queue::AsyncQueue, syncqueue::SyncQueue, diff --git a/src/bugs.rs b/src/bugs.rs deleted file mode 100644 index eaf76784..00000000 --- a/src/bugs.rs +++ /dev/null @@ -1 +0,0 @@ -pub use jay_bugs::*; diff --git a/src/cli.rs b/src/cli.rs index d5bc6566..f641c157 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -22,6 +22,8 @@ mod unlock; mod version; mod xwayland; +use jay_pr_caps::drop_all_pr_caps; +use jay_logger::LogLevel; use { crate::{ cli::{ @@ -31,9 +33,9 @@ use { xwayland::XwaylandArgs, }, compositor::start_compositor, - logger::LogLevel, + portal, - pr_caps::drop_all_pr_caps, + }, clap::{Args, Parser, Subcommand, ValueEnum, ValueHint}, clap_complete::Shell, diff --git a/src/cli/color.rs b/src/cli/color.rs index 24136ecc..df60b29d 100644 --- a/src/cli/color.rs +++ b/src/cli/color.rs @@ -1,5 +1,6 @@ use { - crate::{theme::Color, utils::errorfmt::ErrorFmt}, + crate::utils::errorfmt::ErrorFmt, + jay_theme::Color, std::ops::Range, }; diff --git a/src/cli/config.rs b/src/cli/config.rs index b5de8def..64522a5f 100644 --- a/src/cli/config.rs +++ b/src/cli/config.rs @@ -1,8 +1,9 @@ +use jay_logger::Logger; use { crate::{ cli::{GlobalArgs, json::jsonl}, compositor::config_dir, - logger::Logger, + utils::errorfmt::ErrorFmt, }, clap::{Args, Subcommand}, diff --git a/src/cli/randr.rs b/src/cli/randr.rs index d77591ae..ba56ff74 100644 --- a/src/cli/randr.rs +++ b/src/cli/randr.rs @@ -1,3 +1,5 @@ +use std::time::Duration; +use jay_units::scale::Scale; use { crate::{ backend::{BackendColorSpace, BackendEotfs}, @@ -11,7 +13,6 @@ use { cmm::cmm_primaries::Primaries, format::{Format, XRGB8888}, ifs::wl_output::BlendSpace, - scale::Scale, tools::tool_client::{Handle, ToolClient, with_tool_client}, tree::Transform, utils::{errorfmt::ErrorFmt, ordered_float::F64, static_text::StaticText}, @@ -29,7 +30,7 @@ use { fmt::{self, Display, Formatter}, rc::Rc, str::FromStr, - time::Duration, + }, thiserror::Error, }; diff --git a/src/cli/screenshot.rs b/src/cli/screenshot.rs index 7ffd5f63..c9d84469 100644 --- a/src/cli/screenshot.rs +++ b/src/cli/screenshot.rs @@ -1,12 +1,14 @@ +use jay_udmabuf::{Udmabuf, UdmabufError}; +use jay_eventfd_cache::EventfdCache; use { crate::{ allocator::{Allocator, AllocatorError, BufferUsage, MappedBuffer}, cli::{GlobalArgs, ScreenshotArgs, ScreenshotFormat}, - eventfd_cache::EventfdCache, + format::XRGB8888, gfx_apis, tools::tool_client::{Handle, ToolClient, with_tool_client}, - udmabuf::{Udmabuf, UdmabufError}, + utils::{errorfmt::ErrorFmt, queue::AsyncQueue, windows::WindowsExt}, video::{ dmabuf::{DmaBuf, DmaBufIds, DmaBufPlane, PlaneVec}, diff --git a/src/cli/seat_test.rs b/src/cli/seat_test.rs index c5b382b8..ca81c2a2 100644 --- a/src/cli/seat_test.rs +++ b/src/cli/seat_test.rs @@ -1,10 +1,10 @@ +use jay_units::fixed::Fixed; use { crate::{ cli::{ GlobalArgs, SeatTestArgs, json::{JsonAxisData, JsonSeatEvent, jsonl}, }, - fixed::Fixed, ifs::wl_seat::wl_pointer::{ CONTINUOUS, FINGER, HORIZONTAL_SCROLL, PendingScroll, VERTICAL_SCROLL, WHEEL, }, diff --git a/src/cli/tree.rs b/src/cli/tree.rs index 333ba0da..175e74cd 100644 --- a/src/cli/tree.rs +++ b/src/cli/tree.rs @@ -1,3 +1,4 @@ +use jay_geometry::Rect; use { crate::{ cli::{ @@ -10,7 +11,7 @@ use { TREE_TY_LOCK_SURFACE, TREE_TY_OUTPUT, TREE_TY_PLACEHOLDER, TREE_TY_WORKSPACE, TREE_TY_X_WINDOW, TREE_TY_XDG_POPUP, TREE_TY_XDG_TOPLEVEL, }, - rect::Rect, + tools::tool_client::{Handle, ToolClient, with_tool_client}, wire::{JayCompositorId, JayTreeQueryId, jay_client_query, jay_compositor, jay_tree_query}, }, diff --git a/src/client.rs b/src/client.rs index ce825b0d..93cf4699 100644 --- a/src/client.rs +++ b/src/client.rs @@ -1,11 +1,9 @@ +use jay_async_engine::SpawnedFuture; use { crate::{ - async_engine::SpawnedFuture, + client::{error::LookupError, objects::Objects}, - criteria::{ - CritDestroyListener, CritMatcherId, - clm::{CL_CHANGED_DESTROYED, CL_CHANGED_NEW, ClMatcherChange}, - }, + criteria::clm::{CL_CHANGED_DESTROYED, CL_CHANGED_NEW, ClMatcherChange}, ifs::{ wl_display::WlDisplay, wl_registry::WlRegistry, @@ -28,6 +26,7 @@ use { wire::WlRegistryId, }, ahash::AHashMap, + jay_criteria::{CritDestroyListener, CritMatcherId}, std::{ cell::{Cell, RefCell}, collections::VecDeque, diff --git a/src/client/tasks.rs b/src/client/tasks.rs index fe51a9ea..5bbed202 100644 --- a/src/client/tasks.rs +++ b/src/client/tasks.rs @@ -1,6 +1,7 @@ +use jay_async_engine::Phase; use { crate::{ - async_engine::Phase, + client::{Client, ClientError}, utils::{ buffd::{BufFdOut, MsgParser, WlBufFdIn, WlMessage}, diff --git a/src/compositor.rs b/src/compositor.rs index c270687b..b2979886 100644 --- a/src/compositor.rs +++ b/src/compositor.rs @@ -1,9 +1,20 @@ +use jay_wheel::{Wheel, WheelError}; +use std::time::Duration; +use jay_sighand::{self as sighand, SighandError}; +use jay_pr_caps::{PrCapsThread, pr_caps}; +use jay_logger::Logger; +use jay_io_uring::{IoUring, IoUringError}; +use jay_eventfd_cache::EventfdCache; +use jay_cpu_worker::{CpuWorker, CpuWorkerError}; +use jay_async_engine::{AsyncEngine, Phase, SpawnedFuture}; +use jay_keyboard::KbvmContext; #[cfg(feature = "it")] use crate::it::test_backend::TestBackend; +use jay_units::scale::Scale; use { crate::{ acceptor::{Acceptor, AcceptorError}, - async_engine::{AsyncEngine, Phase, SpawnedFuture}, + backend::{Backend, Connector}, backends::{ dummy::{DummyBackend, DummyOutput}, @@ -15,9 +26,8 @@ use { cmm::{cmm_manager::ColorManager, cmm_primaries::Primaries}, config::ConfigProxy, copy_device::CopyDeviceRegistry, - cpu_worker::{CpuWorker, CpuWorkerError}, + criteria::{ - CritMatcherIds, clm::{ClMatcherManager, handle_cl_changes, handle_cl_leaf_events}, tlm::{ TlMatcherManager, handle_tl_changes, handle_tl_just_mapped, handle_tl_leaf_events, @@ -26,7 +36,7 @@ use { damage::{DamageVisualizer, visualize_damage}, dbus::Dbus, ei::ei_client::EiClients, - eventfd_cache::EventfdCache, + forker, format::XRGB8888, gfx_api::GfxApi, @@ -45,18 +55,16 @@ use { wlr_output_manager::wlr_output_manager_done, workspace_manager::workspace_manager_done, }, - io_uring::{IoUring, IoUringError}, - kbvm::KbvmContext, + leaks, - logger::Logger, + output_schedule::create_output_schedule, portal::{self, PortalStartup}, - pr_caps::{PrCapsThread, pr_caps}, - scale::Scale, - sighand::{self, SighandError}, + + state::{ConnectorData, IdleState, ScreenlockState, State, XWaylandState}, tasks::{self, handle_const_40hz_latch, idle}, - tracy::enable_profiler, + jay_tracy::enable_profiler, tree::{ DisplayNode, NodeIds, OutputNode, TearingMode, Transform, VrrMode, WorkspaceDisplayOrder, WorkspaceNode, container_layout, container_render_positions, @@ -82,11 +90,12 @@ use { }, version::VERSION, video::drm::wait_for_syncobj::WaitForSyncobj, - wheel::{Wheel, WheelError}, + }, ahash::AHashSet, forker::ForkerProxy, jay_config::protocol::DEFAULT_SEAT_NAME, + jay_criteria::CritMatcherIds, std::{ cell::{Cell, RefCell}, env, @@ -94,7 +103,7 @@ use { ops::Deref, rc::Rc, sync::Arc, - time::Duration, + }, thiserror::Error, uapi::c, @@ -236,6 +245,7 @@ fn start_compositor2( render_ctx_ever_initialized: Cell::new(false), cursors: Default::default(), wheel, + clients: Clients::new(), globals: Globals::new(), connector_ids: Default::default(), @@ -355,6 +365,7 @@ fn start_compositor2( ei_clients: EiClients::new(), slow_ei_clients: Default::default(), cpu_worker, + ui_drag_enabled: Cell::new(true), ui_drag_threshold_squared: Cell::new(10), animations: Default::default(), @@ -395,6 +406,7 @@ fn start_compositor2( copy_device_registry: Rc::new(CopyDeviceRegistry::new(&ring, &engine, &eventfd_cache)), supports_presentation_feedback: Default::default(), eventfd_cache, + lazy_event_sources: Default::default(), post_layout_event_sources: Default::default(), bo_drop_queue: Rc::new(ObjectDropQueue::new(&ring)), diff --git a/src/config/handler.rs b/src/config/handler.rs index d50d54b4..3ce8faaf 100644 --- a/src/config/handler.rs +++ b/src/config/handler.rs @@ -1,6 +1,13 @@ +use std::time::{Duration, SystemTime}; +use jay_theme::{ThemeColor, ThemeSized}; +use jay_config::theme::{BarPosition, colors::Colorable, sized::Resizable}; +use jay_io_uring::TaskResultExt; +use jay_async_engine::SpawnedFuture; +use jay_keyboard::{KbvmError, KbvmMap}; +use jay_units::scale::Scale; use { crate::{ - async_engine::SpawnedFuture, + backend::{ self, BackendColorSpace, BackendEotfs, ConnectorId, DrmDeviceId, InputDeviceAccelProfile, InputDeviceCapability, InputDeviceClickMethod, InputDeviceId, @@ -10,7 +17,6 @@ use { cmm::cmm_eotf::Eotf, compositor::{MAX_EXTENTS, WAYLAND_DISPLAY}, criteria::{ - CritLiteralOrRegex, CritMgrExt, CritTarget, CritUpstreamNode, clm::ClmLeafMatcher, tlm::{TlmLeafMatcher, TlmUpstreamNode}, }, @@ -20,13 +26,11 @@ use { wl_seat::{SeatId, WlSeatGlobal}, wp_content_type_v1::ContentTypeExt, }, - io_uring::TaskResultExt, - kbvm::{KbvmError, KbvmMap}, + output_schedule::map_cursor_hz, - scale::Scale, state::{ConnectorData, DeviceHandlerData, DrmDevData, OutputData, State}, tagged_acceptor::TaggedAcceptorError, - theme::{ThemeColor, ThemeSized}, + tree::{ ContainerSplit, OutputNode, TearingMode, TileState, ToplevelData, ToplevelIdentifier, ToplevelNode, VrrMode, WorkspaceNode, toplevel_create_split, toplevel_parent_container, @@ -42,11 +46,6 @@ use { }, }, jay_config::{ - protocol::{ - ClientCriterionPayload, ClientCriterionStringField, ClientMessage, ConfigHandler, - GenericCriterionPayload, PollableId, Response, ServerMessage, Unref, - WindowCriterionPayload, WindowCriterionStringField, WireMode, WorkspaceSource, - }, Axis, Direction, Workspace, client::{Client as ConfigClient, ClientMatcher}, input::{ @@ -62,7 +61,12 @@ use { }, keyboard::{Group, Keymap, mods::Modifiers, syms::KeySym}, logging::LogLevel as ConfigLogLevel, - theme::{BarPosition, colors::Colorable, sized::Resizable}, + protocol::{ + ClientCriterionPayload, ClientCriterionStringField, ClientMessage, ConfigHandler, + GenericCriterionPayload, PollableId, Response, ServerMessage, Unref, + WindowCriterionPayload, WindowCriterionStringField, WireMode, WorkspaceSource, + }, + timer::Timer as JayTimer, video::{ BlendSpace as ConfigBlendSpace, ColorSpace, Connector, DrmDevice, Eotf as ConfigEotf, @@ -73,6 +77,7 @@ use { workspace::WorkspaceDisplayOrder, xwayland::XScalingMode, }, + jay_criteria::{CritLiteralOrRegex, CritMgrExt, CritTarget, CritUpstreamNode}, kbvm::Keycode, log::Level, regex::Regex, @@ -82,7 +87,7 @@ use { hash::Hash, ops::Deref, rc::{Rc, Weak}, - time::{Duration, SystemTime}, + }, thiserror::Error, uapi::{OwnedFd, c, fcntl_dupfd_cloexec}, @@ -209,7 +214,6 @@ impl ConfigProxyHandler { self.window_matcher_leafs.clear(); self.window_matchers.clear(); - } pub fn send(&self, msg: &ServerMessage) { @@ -310,7 +314,6 @@ impl ConfigProxyHandler { } None } - } #[derive(Debug, Error)] diff --git a/src/config/handler/dispatch.rs b/src/config/handler/dispatch.rs index 97936039..20f46b33 100644 --- a/src/config/handler/dispatch.rs +++ b/src/config/handler/dispatch.rs @@ -729,7 +729,7 @@ impl ConfigProxyHandler { // Removed feature; kept for binary protocol compatibility. } ClientMessage::SetTabTitleAlign { align } => { - use crate::theme::TabTitleAlign; + use jay_theme::TabTitleAlign; let val = match align { 1 => TabTitleAlign::Center, 2 => TabTitleAlign::End, diff --git a/src/config/handler/theme.rs b/src/config/handler/theme.rs index ba56307d..50d7a6e6 100644 --- a/src/config/handler/theme.rs +++ b/src/config/handler/theme.rs @@ -55,7 +55,7 @@ impl ConfigProxyHandler { } pub(super) fn handle_set_corner_radius(&self, radius: f32) { - use crate::theme::CornerRadius; + use jay_theme::CornerRadius; let radius = radius.max(0.0).min(1000.0); self.state .theme diff --git a/src/copy_device.rs b/src/copy_device.rs index 3f34a533..cce9c3c3 100644 --- a/src/copy_device.rs +++ b/src/copy_device.rs @@ -1,10 +1,13 @@ +use jay_io_uring::IoUring; +use jay_eventfd_cache::EventfdCache; +use jay_async_engine::{AsyncEngine, SpawnedFuture}; use { crate::{ - async_engine::{AsyncEngine, SpawnedFuture}, - eventfd_cache::EventfdCache, + + format::{FORMATS, Format}, gfx_api::FdSync, - io_uring::IoUring, + utils::{ clonecell::CloneCell, errorfmt::ErrorFmt, diff --git a/src/copy_device/execute.rs b/src/copy_device/execute.rs index 7f1544e7..2211940c 100644 --- a/src/copy_device/execute.rs +++ b/src/copy_device/execute.rs @@ -1,8 +1,9 @@ +use jay_geometry::{Rect, Region}; use { super::{CopyDeviceCopy, CopyDeviceCopyType, CopyDeviceError, Pending}, crate::{ gfx_api::FdSync, - rect::{Rect, Region}, + vulkan_core::sync::VulkanDeviceSyncExt, }, arrayvec::ArrayVec, diff --git a/src/copy_device/registry.rs b/src/copy_device/registry.rs index c2518a68..43bb9761 100644 --- a/src/copy_device/registry.rs +++ b/src/copy_device/registry.rs @@ -1,9 +1,12 @@ +use jay_io_uring::IoUring; +use jay_eventfd_cache::EventfdCache; +use jay_async_engine::AsyncEngine; use { super::PhysicalCopyDevice, crate::{ - async_engine::AsyncEngine, - eventfd_cache::EventfdCache, - io_uring::IoUring, + + + utils::{copyhashmap::CopyHashMap, errorfmt::ErrorFmt}, }, std::rc::Rc, diff --git a/src/cpu_worker.rs b/src/cpu_worker.rs deleted file mode 100644 index e28586b1..00000000 --- a/src/cpu_worker.rs +++ /dev/null @@ -1 +0,0 @@ -pub use jay_cpu_worker::*; diff --git a/src/criteria.rs b/src/criteria.rs index 2405bacb..4d67b849 100644 --- a/src/criteria.rs +++ b/src/criteria.rs @@ -1,4 +1,2 @@ pub mod clm; pub mod tlm; - -pub use jay_criteria::*; diff --git a/src/criteria/clm.rs b/src/criteria/clm.rs index a042d3f7..1081debe 100644 --- a/src/criteria/clm.rs +++ b/src/criteria/clm.rs @@ -3,29 +3,29 @@ pub mod clm_matchers; use { crate::{ client::{Client, ClientId}, - criteria::{ - CritDestroyListener, CritLiteralOrRegex, CritMatcherId, CritMatcherIds, CritMgrExt, - CritUpstreamNode, FixedRootMatcher, RootMatcherMap, - clm::clm_matchers::{ - clmm_id::ClmMatchId, - clmm_is_xwayland::ClmMatchIsXwayland, - clmm_pid::ClmMatchPid, - clmm_sandboxed::ClmMatchSandboxed, - clmm_string::{ - ClmMatchComm, ClmMatchExe, ClmMatchSandboxAppId, ClmMatchSandboxEngine, - ClmMatchSandboxInstanceId, ClmMatchTag, - }, - clmm_uid::ClmMatchUid, + criteria::clm::clm_matchers::{ + clmm_id::ClmMatchId, + clmm_is_xwayland::ClmMatchIsXwayland, + clmm_pid::ClmMatchPid, + clmm_sandboxed::ClmMatchSandboxed, + clmm_string::{ + ClmMatchComm, ClmMatchExe, ClmMatchSandboxAppId, ClmMatchSandboxEngine, + ClmMatchSandboxInstanceId, ClmMatchTag, }, - crit_graph::{ - CritMgr, CritRoot, CritRootFixed, CritTarget, CritTargetOwner, WeakCritTargetOwner, - }, - crit_leaf::{CritLeafEvent, CritLeafMatcher}, - crit_matchers::critm_constant::CritMatchConstant, + clmm_uid::ClmMatchUid, }, state::State, utils::{copyhashmap::CopyHashMap, hash_map_ext::HashMapExt, queue::AsyncQueue}, }, + jay_criteria::{ + CritDestroyListener, CritLiteralOrRegex, CritMatcherId, CritMatcherIds, CritMgrExt, + CritUpstreamNode, FixedRootMatcher, RootMatcherMap, + crit_graph::{ + CritMgr, CritRoot, CritRootFixed, CritTarget, CritTargetOwner, WeakCritTargetOwner, + }, + crit_leaf::{CritLeafEvent, CritLeafMatcher}, + crit_matchers::critm_constant::CritMatchConstant, + }, linearize::static_map, std::{ marker::PhantomData, diff --git a/src/criteria/clm/clm_matchers.rs b/src/criteria/clm/clm_matchers.rs index 793d9a14..1013ec59 100644 --- a/src/criteria/clm/clm_matchers.rs +++ b/src/criteria/clm/clm_matchers.rs @@ -1,6 +1,6 @@ macro_rules! fixed_root_criterion { ($ty:ty, $field:ident) => { - impl crate::criteria::crit_graph::CritFixedRootCriterionBase + impl jay_criteria::crit_graph::CritFixedRootCriterionBase for $ty { fn constant(&self) -> bool { @@ -10,7 +10,7 @@ macro_rules! fixed_root_criterion { fn not<'a>( &self, mgr: &'a crate::criteria::clm::ClMatcherManager, - ) -> &'a crate::criteria::FixedRootMatcher { + ) -> &'a jay_criteria::FixedRootMatcher { &mgr.$field } } diff --git a/src/criteria/clm/clm_matchers/clmm_id.rs b/src/criteria/clm/clm_matchers/clmm_id.rs index f8eece41..12742126 100644 --- a/src/criteria/clm/clm_matchers/clmm_id.rs +++ b/src/criteria/clm/clm_matchers/clmm_id.rs @@ -1,8 +1,9 @@ use { crate::{ client::{Client, ClientId}, - criteria::{RootMatcherMap, clm::RootMatchers, crit_graph::CritRootCriterion}, + criteria::clm::RootMatchers, }, + jay_criteria::{RootMatcherMap, crit_graph::CritRootCriterion}, }; pub struct ClmMatchId(pub ClientId); diff --git a/src/criteria/clm/clm_matchers/clmm_is_xwayland.rs b/src/criteria/clm/clm_matchers/clmm_is_xwayland.rs index d8201b65..9360d974 100644 --- a/src/criteria/clm/clm_matchers/clmm_is_xwayland.rs +++ b/src/criteria/clm/clm_matchers/clmm_is_xwayland.rs @@ -1,6 +1,4 @@ -use { - crate::{client::Client, criteria::crit_graph::CritFixedRootCriterion}, -}; +use {crate::client::Client, jay_criteria::crit_graph::CritFixedRootCriterion}; pub struct ClmMatchIsXwayland(pub bool); diff --git a/src/criteria/clm/clm_matchers/clmm_pid.rs b/src/criteria/clm/clm_matchers/clmm_pid.rs index 74ef299c..bd89c248 100644 --- a/src/criteria/clm/clm_matchers/clmm_pid.rs +++ b/src/criteria/clm/clm_matchers/clmm_pid.rs @@ -1,8 +1,6 @@ use { - crate::{ - client::Client, - criteria::{RootMatcherMap, clm::RootMatchers, crit_graph::CritRootCriterion}, - }, + crate::{client::Client, criteria::clm::RootMatchers}, + jay_criteria::{RootMatcherMap, crit_graph::CritRootCriterion}, uapi::c, }; diff --git a/src/criteria/clm/clm_matchers/clmm_sandboxed.rs b/src/criteria/clm/clm_matchers/clmm_sandboxed.rs index 1f84e16d..a32623cf 100644 --- a/src/criteria/clm/clm_matchers/clmm_sandboxed.rs +++ b/src/criteria/clm/clm_matchers/clmm_sandboxed.rs @@ -1,6 +1,4 @@ -use { - crate::{client::Client, criteria::crit_graph::CritFixedRootCriterion}, -}; +use {crate::client::Client, jay_criteria::crit_graph::CritFixedRootCriterion}; pub struct ClmMatchSandboxed(pub bool); diff --git a/src/criteria/clm/clm_matchers/clmm_string.rs b/src/criteria/clm/clm_matchers/clmm_string.rs index 367bdf0a..7ca368d1 100644 --- a/src/criteria/clm/clm_matchers/clmm_string.rs +++ b/src/criteria/clm/clm_matchers/clmm_string.rs @@ -1,11 +1,9 @@ use { crate::{ client::{Client, ClientMetadata}, - criteria::{ - clm::{ClmRootMatcherMap, RootMatchers}, - crit_matchers::critm_string::{CritMatchString, StringAccess}, - }, + criteria::clm::{ClmRootMatcherMap, RootMatchers}, }, + jay_criteria::crit_matchers::critm_string::{CritMatchString, StringAccess}, std::marker::PhantomData, }; diff --git a/src/criteria/clm/clm_matchers/clmm_uid.rs b/src/criteria/clm/clm_matchers/clmm_uid.rs index b68d8bf0..63f8cbf3 100644 --- a/src/criteria/clm/clm_matchers/clmm_uid.rs +++ b/src/criteria/clm/clm_matchers/clmm_uid.rs @@ -1,8 +1,6 @@ use { - crate::{ - client::Client, - criteria::{RootMatcherMap, clm::RootMatchers, crit_graph::CritRootCriterion}, - }, + crate::{client::Client, criteria::clm::RootMatchers}, + jay_criteria::{RootMatcherMap, crit_graph::CritRootCriterion}, uapi::c, }; diff --git a/src/criteria/tlm.rs b/src/criteria/tlm.rs index b7a61170..d474e920 100644 --- a/src/criteria/tlm.rs +++ b/src/criteria/tlm.rs @@ -3,14 +3,7 @@ pub mod tlm_matchers; use { crate::{ criteria::{ - CritDestroyListener, CritLiteralOrRegex, CritMatcherId, CritMatcherIds, CritMgrExt, - CritUpstreamNode, FixedRootMatcher, RootMatcherMap, clm::ClmUpstreamNode, - crit_graph::{ - CritMgr, CritRoot, CritRootFixed, CritTarget, CritTargetOwner, WeakCritTargetOwner, - }, - crit_leaf::{CritLeafEvent, CritLeafMatcher}, - crit_matchers::critm_constant::CritMatchConstant, tlm::tlm_matchers::{ tlmm_client::TlmMatchClient, tlmm_content_type::TlmMatchContentType, @@ -33,6 +26,15 @@ use { utils::{copyhashmap::CopyHashMap, hash_map_ext::HashMapExt, queue::AsyncQueue}, }, jay_config::window::{ContentType, WindowType}, + jay_criteria::{ + CritDestroyListener, CritLiteralOrRegex, CritMatcherId, CritMatcherIds, CritMgrExt, + CritUpstreamNode, FixedRootMatcher, RootMatcherMap, + crit_graph::{ + CritMgr, CritRoot, CritRootFixed, CritTarget, CritTargetOwner, WeakCritTargetOwner, + }, + crit_leaf::{CritLeafEvent, CritLeafMatcher}, + crit_matchers::critm_constant::CritMatchConstant, + }, linearize::static_map, std::{ marker::PhantomData, diff --git a/src/criteria/tlm/tlm_matchers.rs b/src/criteria/tlm/tlm_matchers.rs index ccf42900..6b833abf 100644 --- a/src/criteria/tlm/tlm_matchers.rs +++ b/src/criteria/tlm/tlm_matchers.rs @@ -1,6 +1,6 @@ macro_rules! fixed_root_criterion { ($ty:ty, $field:ident) => { - impl crate::criteria::crit_graph::CritFixedRootCriterionBase + impl jay_criteria::crit_graph::CritFixedRootCriterionBase for $ty { fn constant(&self) -> bool { @@ -10,7 +10,7 @@ macro_rules! fixed_root_criterion { fn not<'a>( &self, mgr: &'a crate::criteria::tlm::TlMatcherManager, - ) -> &'a crate::criteria::FixedRootMatcher { + ) -> &'a jay_criteria::FixedRootMatcher { &mgr.$field } } diff --git a/src/criteria/tlm/tlm_matchers/tlmm_client.rs b/src/criteria/tlm/tlm_matchers/tlmm_client.rs index c6db5163..564106c1 100644 --- a/src/criteria/tlm/tlm_matchers/tlmm_client.rs +++ b/src/criteria/tlm/tlm_matchers/tlmm_client.rs @@ -2,18 +2,20 @@ use { crate::{ client::Client, criteria::{ - CritMatcherId, CritUpstreamNode, clm::ClmUpstreamNode, - crit_graph::{ - CritDownstream, CritDownstreamData, CritMgr, CritUpstreamData, - CritUpstreamNodeBase, CritUpstreamNodeData, - }, - crit_per_target_data::{CritDestroyListenerBase, CritPerTargetData}, tlm::TlMatcherManager, }, state::State, tree::{ToplevelData, ToplevelNodeBase}, }, + jay_criteria::{ + CritMatcherId, CritUpstreamNode, + crit_graph::{ + CritDownstream, CritDownstreamData, CritMgr, CritUpstreamData, CritUpstreamNodeBase, + CritUpstreamNodeData, + }, + crit_per_target_data::{CritDestroyListenerBase, CritPerTargetData}, + }, std::{rc::Rc, slice}, }; diff --git a/src/criteria/tlm/tlm_matchers/tlmm_content_type.rs b/src/criteria/tlm/tlm_matchers/tlmm_content_type.rs index a7878b6d..08b9b2c7 100644 --- a/src/criteria/tlm/tlm_matchers/tlmm_content_type.rs +++ b/src/criteria/tlm/tlm_matchers/tlmm_content_type.rs @@ -1,14 +1,12 @@ use { crate::{ - criteria::{ - crit_graph::CritRootCriterion, - tlm::{RootMatchers, TlmRootMatcherMap}, - }, + criteria::tlm::{RootMatchers, TlmRootMatcherMap}, ifs::wp_content_type_v1::ContentTypeExt, tree::ToplevelData, utils::bitflags::BitflagsExt, }, jay_config::window::ContentType, + jay_criteria::crit_graph::CritRootCriterion, }; pub struct TlmMatchContentType { diff --git a/src/criteria/tlm/tlm_matchers/tlmm_floating.rs b/src/criteria/tlm/tlm_matchers/tlmm_floating.rs index 8cb2dc5e..5d70f0df 100644 --- a/src/criteria/tlm/tlm_matchers/tlmm_floating.rs +++ b/src/criteria/tlm/tlm_matchers/tlmm_floating.rs @@ -1,4 +1,4 @@ -use crate::{criteria::crit_graph::CritFixedRootCriterion, tree::ToplevelData}; +use {crate::tree::ToplevelData, jay_criteria::crit_graph::CritFixedRootCriterion}; pub struct TlmMatchFloating(pub bool); diff --git a/src/criteria/tlm/tlm_matchers/tlmm_fullscreen.rs b/src/criteria/tlm/tlm_matchers/tlmm_fullscreen.rs index 5ed21689..ad0aa22d 100644 --- a/src/criteria/tlm/tlm_matchers/tlmm_fullscreen.rs +++ b/src/criteria/tlm/tlm_matchers/tlmm_fullscreen.rs @@ -1,4 +1,4 @@ -use crate::{criteria::crit_graph::CritFixedRootCriterion, tree::ToplevelData}; +use {crate::tree::ToplevelData, jay_criteria::crit_graph::CritFixedRootCriterion}; pub struct TlmMatchFullscreen(pub bool); diff --git a/src/criteria/tlm/tlm_matchers/tlmm_just_mapped.rs b/src/criteria/tlm/tlm_matchers/tlmm_just_mapped.rs index e21b5675..87b0a363 100644 --- a/src/criteria/tlm/tlm_matchers/tlmm_just_mapped.rs +++ b/src/criteria/tlm/tlm_matchers/tlmm_just_mapped.rs @@ -1,4 +1,4 @@ -use crate::{criteria::crit_graph::CritFixedRootCriterion, tree::ToplevelData}; +use {crate::tree::ToplevelData, jay_criteria::crit_graph::CritFixedRootCriterion}; pub struct TlmMatchJustMapped(pub bool); diff --git a/src/criteria/tlm/tlm_matchers/tlmm_kind.rs b/src/criteria/tlm/tlm_matchers/tlmm_kind.rs index 8c332877..4c045d8c 100644 --- a/src/criteria/tlm/tlm_matchers/tlmm_kind.rs +++ b/src/criteria/tlm/tlm_matchers/tlmm_kind.rs @@ -1,13 +1,11 @@ use { crate::{ - criteria::{ - crit_graph::CritRootCriterion, - tlm::{RootMatchers, TlmRootMatcherMap}, - }, + criteria::tlm::{RootMatchers, TlmRootMatcherMap}, tree::ToplevelData, utils::bitflags::BitflagsExt, }, jay_config::window::WindowType, + jay_criteria::crit_graph::CritRootCriterion, }; pub struct TlmMatchKind { diff --git a/src/criteria/tlm/tlm_matchers/tlmm_seat_focus.rs b/src/criteria/tlm/tlm_matchers/tlmm_seat_focus.rs index 34e75562..b97aa7b2 100644 --- a/src/criteria/tlm/tlm_matchers/tlmm_seat_focus.rs +++ b/src/criteria/tlm/tlm_matchers/tlmm_seat_focus.rs @@ -1,11 +1,9 @@ use crate::{ - criteria::{ - crit_graph::CritRootCriterion, - tlm::{RootMatchers, TlmRootMatcherMap}, - }, + criteria::tlm::{RootMatchers, TlmRootMatcherMap}, ifs::wl_seat::SeatId, tree::ToplevelData, }; +use jay_criteria::crit_graph::CritRootCriterion; pub struct TlmMatchSeatFocus { id: SeatId, diff --git a/src/criteria/tlm/tlm_matchers/tlmm_string.rs b/src/criteria/tlm/tlm_matchers/tlmm_string.rs index 62413481..7256eb2f 100644 --- a/src/criteria/tlm/tlm_matchers/tlmm_string.rs +++ b/src/criteria/tlm/tlm_matchers/tlmm_string.rs @@ -1,10 +1,8 @@ use crate::{ - criteria::{ - crit_matchers::critm_string::{CritMatchString, StringAccess}, - tlm::{RootMatchers, TlmRootMatcherMap}, - }, + criteria::tlm::{RootMatchers, TlmRootMatcherMap}, tree::{ToplevelData, ToplevelType}, }; +use jay_criteria::crit_matchers::critm_string::{CritMatchString, StringAccess}; pub type TlmMatchString = CritMatchString; diff --git a/src/criteria/tlm/tlm_matchers/tlmm_urgent.rs b/src/criteria/tlm/tlm_matchers/tlmm_urgent.rs index 157135ad..266d797c 100644 --- a/src/criteria/tlm/tlm_matchers/tlmm_urgent.rs +++ b/src/criteria/tlm/tlm_matchers/tlmm_urgent.rs @@ -1,4 +1,4 @@ -use crate::{criteria::crit_graph::CritFixedRootCriterion, tree::ToplevelData}; +use {crate::tree::ToplevelData, jay_criteria::crit_graph::CritFixedRootCriterion}; pub struct TlmMatchUrgent(pub bool); diff --git a/src/criteria/tlm/tlm_matchers/tlmm_visible.rs b/src/criteria/tlm/tlm_matchers/tlmm_visible.rs index 1bdea414..d4412c59 100644 --- a/src/criteria/tlm/tlm_matchers/tlmm_visible.rs +++ b/src/criteria/tlm/tlm_matchers/tlmm_visible.rs @@ -1,4 +1,4 @@ -use crate::{criteria::crit_graph::CritFixedRootCriterion, tree::ToplevelData}; +use {crate::tree::ToplevelData, jay_criteria::crit_graph::CritFixedRootCriterion}; pub struct TlmMatchVisible(pub bool); diff --git a/src/cursor.rs b/src/cursor.rs index 82ef8188..d1b53fdf 100644 --- a/src/cursor.rs +++ b/src/cursor.rs @@ -1,15 +1,19 @@ +use jay_time::Time; +use std::time::Duration; +use jay_geometry::Rect; +use jay_async_engine::AsyncEngine; +use jay_units::fixed::Fixed; +use jay_units::scale::Scale; use { crate::{ - async_engine::AsyncEngine, + cmm::cmm_render_intent::RenderIntent, - fixed::Fixed, format::ARGB8888, gfx_api::{AcquireSync, AlphaMode, GfxContext, GfxError, GfxTexture, ReleaseSync}, - rect::Rect, + renderer::Renderer, - scale::Scale, state::State, - time::Time, + tree::OutputNode, utils::{errorfmt::ErrorFmt, numcell::NumCell, smallmap::SmallMapMut}, }, @@ -29,7 +33,7 @@ use { rc::Rc, slice, str, sync::LazyLock, - time::Duration, + }, thiserror::Error, uapi::Bytes, diff --git a/src/cursor_user.rs b/src/cursor_user.rs index 6d911048..dc3df528 100644 --- a/src/cursor_user.rs +++ b/src/cursor_user.rs @@ -1,11 +1,12 @@ +use jay_geometry::Rect; +use jay_units::fixed::Fixed; +use jay_units::scale::Scale; use { crate::{ backend::HardwareCursorUpdate, cursor::{Cursor, DEFAULT_CURSOR_SIZE, KnownCursor}, - fixed::Fixed, gfx_api::{AcquireSync, ReleaseSync}, - rect::Rect, - scale::Scale, + state::State, tree::OutputNode, utils::{ diff --git a/src/damage.rs b/src/damage.rs index aa69e192..7940ef69 100644 --- a/src/damage.rs +++ b/src/damage.rs @@ -1,13 +1,18 @@ +use jay_time::Time; +use std::time::Duration; +use jay_theme::Color; +use jay_geometry::{Rect, Region}; +use jay_async_engine::AsyncEngine; use { crate::{ - async_engine::AsyncEngine, + cmm::{cmm_manager::ColorManager, cmm_render_intent::RenderIntent}, ifs::wl_output::WlOutputGlobal, - rect::{Rect, Region}, + renderer::renderer_base::RendererBase, state::State, - theme::Color, - time::Time, + + utils::{asyncevent::AsyncEvent, errorfmt::ErrorFmt, timer::TimerFd}, }, isnt::std_1::primitive::IsntSliceExt, @@ -15,7 +20,7 @@ use { cell::{Cell, RefCell}, collections::VecDeque, rc::Rc, - time::Duration, + }, uapi::c::CLOCK_MONOTONIC, }; diff --git a/src/dbus.rs b/src/dbus.rs index 5d979b9b..6b125c0b 100644 --- a/src/dbus.rs +++ b/src/dbus.rs @@ -1,8 +1,10 @@ pub use jay_dbus_core::*; +use jay_io_uring::IoUring; +use jay_async_engine::{AsyncEngine, SpawnedFuture}; use { crate::{ - async_engine::{AsyncEngine, SpawnedFuture}, - io_uring::IoUring, + + utils::{ bufio::BufIo, clonecell::CloneCell, diff --git a/src/dbus/holder.rs b/src/dbus/holder.rs index aa0ce1ba..828176f6 100644 --- a/src/dbus/holder.rs +++ b/src/dbus/holder.rs @@ -1,8 +1,10 @@ +use jay_io_uring::IoUring; +use jay_async_engine::AsyncEngine; use { crate::{ - async_engine::AsyncEngine, + dbus::{DbusError, DbusHolder, DbusSocket, auth::handle_auth}, - io_uring::IoUring, + utils::{ bufio::BufIo, errorfmt::ErrorFmt, numcell::NumCell, oserror::OsErrorExt2, run_toplevel::RunToplevel, diff --git a/src/edid.rs b/src/edid.rs deleted file mode 100644 index e6b91739..00000000 --- a/src/edid.rs +++ /dev/null @@ -1 +0,0 @@ -pub use jay_edid::*; diff --git a/src/ei/ei_acceptor.rs b/src/ei/ei_acceptor.rs index 51d037b9..771d04b4 100644 --- a/src/ei/ei_acceptor.rs +++ b/src/ei/ei_acceptor.rs @@ -1,6 +1,7 @@ +use jay_async_engine::SpawnedFuture; use { crate::{ - async_engine::SpawnedFuture, + state::State, utils::{ errorfmt::ErrorFmt, diff --git a/src/ei/ei_client.rs b/src/ei/ei_client.rs index c5c1d85c..76eeb00b 100644 --- a/src/ei/ei_client.rs +++ b/src/ei/ei_client.rs @@ -1,7 +1,8 @@ pub use crate::ei::ei_client::ei_error::{EiClientError, EiParserError}; +use jay_async_engine::SpawnedFuture; use { crate::{ - async_engine::SpawnedFuture, + client::ClientId, ei::{ EiContext, EiInterfaceVersion, diff --git a/src/ei/ei_client/ei_tasks.rs b/src/ei/ei_client/ei_tasks.rs index 3e28b729..61bf076e 100644 --- a/src/ei/ei_client/ei_tasks.rs +++ b/src/ei/ei_client/ei_tasks.rs @@ -1,6 +1,7 @@ +use jay_async_engine::Phase; use { crate::{ - async_engine::Phase, + ei::{ ei_client::{EiClient, ei_error::EiClientError}, ei_object::EiObjectId, diff --git a/src/ei/ei_ifs/ei_device.rs b/src/ei/ei_ifs/ei_device.rs index 37ff2b45..16114f62 100644 --- a/src/ei/ei_ifs/ei_device.rs +++ b/src/ei/ei_ifs/ei_device.rs @@ -1,3 +1,6 @@ +use jay_geometry::Rect; +use jay_units::fixed::Fixed; +use jay_units::scale::Scale; use { crate::{ backend::{ButtonState, KeyState, ScrollAxis}, @@ -6,11 +9,9 @@ use { ei_ifs::{ei_seat::EiSeat, ei_touchscreen::TouchChange}, ei_object::{EiObject, EiVersion}, }, - fixed::Fixed, ifs::wl_seat::{CursorPositionType, PX_PER_SCROLL}, leaks::Tracker, - rect::Rect, - scale::Scale, + utils::{copyhashmap::CopyHashMap, syncqueue::SyncQueue}, wire_ei::{ EiDeviceId, diff --git a/src/ei/ei_ifs/ei_keyboard.rs b/src/ei/ei_ifs/ei_keyboard.rs index 271f3ed8..d8d92396 100644 --- a/src/ei/ei_ifs/ei_keyboard.rs +++ b/src/ei/ei_ifs/ei_keyboard.rs @@ -1,3 +1,4 @@ +use jay_keyboard::KeyboardState; use { crate::{ backend::KeyState, @@ -6,7 +7,6 @@ use { ei_ifs::ei_device::{EiDevice, EiDeviceInterface}, ei_object::{EiObject, EiVersion}, }, - keyboard::KeyboardState, leaks::Tracker, wire_ei::{ EiKeyboardId, diff --git a/src/ei/ei_ifs/ei_pointer.rs b/src/ei/ei_ifs/ei_pointer.rs index 99eee09e..f8dc14c2 100644 --- a/src/ei/ei_ifs/ei_pointer.rs +++ b/src/ei/ei_ifs/ei_pointer.rs @@ -1,3 +1,4 @@ +use jay_units::fixed::Fixed; use { crate::{ ei::{ @@ -5,7 +6,6 @@ use { ei_ifs::ei_device::{EiDevice, EiDeviceInterface}, ei_object::{EiObject, EiVersion}, }, - fixed::Fixed, leaks::Tracker, wire_ei::{ EiPointerId, diff --git a/src/ei/ei_ifs/ei_pointer_absolute.rs b/src/ei/ei_ifs/ei_pointer_absolute.rs index e07e6b83..51fb779e 100644 --- a/src/ei/ei_ifs/ei_pointer_absolute.rs +++ b/src/ei/ei_ifs/ei_pointer_absolute.rs @@ -1,3 +1,4 @@ +use jay_units::fixed::Fixed; use { crate::{ ei::{ @@ -5,7 +6,6 @@ use { ei_ifs::ei_device::{EiDevice, EiDeviceInterface}, ei_object::{EiObject, EiVersion}, }, - fixed::Fixed, leaks::Tracker, wire_ei::{ EiPointerAbsoluteId, diff --git a/src/ei/ei_ifs/ei_scroll.rs b/src/ei/ei_ifs/ei_scroll.rs index aa0efdd1..fcd0dd65 100644 --- a/src/ei/ei_ifs/ei_scroll.rs +++ b/src/ei/ei_ifs/ei_scroll.rs @@ -1,3 +1,4 @@ +use jay_units::fixed::Fixed; use { crate::{ ei::{ @@ -5,7 +6,6 @@ use { ei_ifs::ei_device::{EiDevice, EiDeviceInterface}, ei_object::{EiObject, EiVersion}, }, - fixed::Fixed, ifs::wl_seat::wl_pointer::{HORIZONTAL_SCROLL, VERTICAL_SCROLL}, leaks::Tracker, wire_ei::{ diff --git a/src/ei/ei_ifs/ei_seat.rs b/src/ei/ei_ifs/ei_seat.rs index 89a3f84d..b8a7ebdf 100644 --- a/src/ei/ei_ifs/ei_seat.rs +++ b/src/ei/ei_ifs/ei_seat.rs @@ -1,3 +1,5 @@ +use jay_units::fixed::Fixed; +use jay_keyboard::{DynKeyboardState, KeyboardState, KeyboardStateId}; use { crate::{ backend::{ButtonState, KeyState}, @@ -15,12 +17,10 @@ use { }, ei_object::{EiInterface, EiObject, EiVersion}, }, - fixed::Fixed, ifs::wl_seat::{ PhysicalKeyboardId, WlSeatGlobal, wl_pointer::{HORIZONTAL_SCROLL, PendingScroll, VERTICAL_SCROLL}, }, - keyboard::{DynKeyboardState, KeyboardState, KeyboardStateId}, leaks::Tracker, tree::Node, utils::{array, bitflags::BitflagsExt, clonecell::CloneCell}, diff --git a/src/ei/ei_ifs/ei_touchscreen.rs b/src/ei/ei_ifs/ei_touchscreen.rs index 3b9a63a5..2a527c6e 100644 --- a/src/ei/ei_ifs/ei_touchscreen.rs +++ b/src/ei/ei_ifs/ei_touchscreen.rs @@ -1,3 +1,4 @@ +use jay_units::fixed::Fixed; use { crate::{ ei::{ @@ -5,7 +6,6 @@ use { ei_ifs::ei_device::{EiDevice, EiDeviceInterface}, ei_object::{EiObject, EiVersion}, }, - fixed::Fixed, leaks::Tracker, utils::clonecell::UnsafeCellCloneSafe, wire_ei::{ diff --git a/src/eventfd_cache.rs b/src/eventfd_cache.rs deleted file mode 100644 index 4eee87e1..00000000 --- a/src/eventfd_cache.rs +++ /dev/null @@ -1 +0,0 @@ -pub use jay_eventfd_cache::*; diff --git a/src/fixed.rs b/src/fixed.rs deleted file mode 100644 index dc201edd..00000000 --- a/src/fixed.rs +++ /dev/null @@ -1 +0,0 @@ -pub use jay_units::fixed::*; diff --git a/src/forker/io.rs b/src/forker/io.rs index f006f786..03b7cc2c 100644 --- a/src/forker/io.rs +++ b/src/forker/io.rs @@ -1,3 +1,4 @@ +use jay_io_uring::IoUring; use { bincode::Options, serde::{Serialize, de::DeserializeOwned}, @@ -7,7 +8,7 @@ use { use { crate::{ forker::{ForkerError, protocol::bincode_ops}, - io_uring::IoUring, + utils::{ buf::DynamicBuf, buffd::{BufFdIn, BufFdOut}, diff --git a/src/forker/proxy.rs b/src/forker/proxy.rs index 270df0f4..26632c01 100644 --- a/src/forker/proxy.rs +++ b/src/forker/proxy.rs @@ -1,6 +1,7 @@ +use jay_async_engine::SpawnedFuture; use { crate::{ - async_engine::SpawnedFuture, + compositor::LIBEI_SOCKET, forker::{ ForkerError, diff --git a/src/forker/worker.rs b/src/forker/worker.rs index 584df6a0..6d226a74 100644 --- a/src/forker/worker.rs +++ b/src/forker/worker.rs @@ -1,12 +1,14 @@ +use jay_io_uring::IoUring; +use jay_async_engine::{AsyncEngine, SpawnedFuture}; use { crate::{ - async_engine::{AsyncEngine, SpawnedFuture}, + compositor::{DISPLAY, WAYLAND_DISPLAY}, forker::{ io::{IoIn, IoOut}, protocol::{ForkerMessage, ServerMessage, bincode_ops}, }, - io_uring::IoUring, + utils::{ clone3::{Forked, fork_with_pidfd}, copyhashmap::CopyHashMap, diff --git a/src/gfx_api.rs b/src/gfx_api.rs index 08354af8..a7898377 100644 --- a/src/gfx_api.rs +++ b/src/gfx_api.rs @@ -1,3 +1,10 @@ +use jay_theme::Color; +use jay_io_uring::{IoUring, IoUringError}; +use jay_geometry::{Rect, Region}; +use jay_eventfd_cache::Eventfd; +use jay_cpu_worker::CpuWorker; +use jay_units::fixed::Fixed; +use jay_units::scale::Scale; use { crate::{ allocator::Allocator, @@ -5,18 +12,16 @@ use { cmm_description::{ColorDescription, LinearColorDescription}, cmm_render_intent::RenderIntent, }, - cpu_worker::CpuWorker, + cursor::Cursor, damage::DamageVisualizer, - eventfd_cache::Eventfd, - fixed::Fixed, + format::Format, - io_uring::{IoUring, IoUringError}, - rect::{Rect, Region}, + + renderer::{Renderer, renderer_base::RendererBase}, - scale::Scale, state::State, - theme::Color, + tree::{Node, OutputNode, Transform}, utils::{ clonecell::UnsafeCellCloneSafe, errorfmt::ErrorFmt, oserror::OsErrorExt, diff --git a/src/gfx_apis.rs b/src/gfx_apis.rs index bb9b48a9..d03c46f2 100644 --- a/src/gfx_apis.rs +++ b/src/gfx_apis.rs @@ -1,11 +1,15 @@ pub use vulkan::create_vulkan_allocator; +use jay_pr_caps::PrCapsThread; +use jay_io_uring::IoUring; +use jay_eventfd_cache::EventfdCache; +use jay_async_engine::AsyncEngine; use { crate::{ - async_engine::AsyncEngine, - eventfd_cache::EventfdCache, + + gfx_api::{GfxApi, GfxContext, GfxError}, - io_uring::IoUring, - pr_caps::PrCapsThread, + + utils::errorfmt::ErrorFmt, video::drm::Drm, }, diff --git a/src/gfx_apis/gl.rs b/src/gfx_apis/gl.rs index dc43a79c..ee8c4cee 100644 --- a/src/gfx_apis/gl.rs +++ b/src/gfx_apis/gl.rs @@ -18,6 +18,7 @@ macro_rules! egl_transparent { }; } +use jay_theme::Color; use { crate::{ cmm::cmm_eotf::Eotf, @@ -38,7 +39,7 @@ use { GL_TRIANGLE_STRIP, GL_TRIANGLES, }, }, - theme::Color, + utils::{errorfmt::ErrorFmt, rc_eq::rc_eq, vecstorage::VecStorage}, video::{ dmabuf::DMA_BUF_SYNC_READ, diff --git a/src/gfx_apis/gl/renderer/context.rs b/src/gfx_apis/gl/renderer/context.rs index 00bfe9c2..6aaf9279 100644 --- a/src/gfx_apis/gl/renderer/context.rs +++ b/src/gfx_apis/gl/renderer/context.rs @@ -1,7 +1,9 @@ +use jay_geometry::Rect; +use jay_cpu_worker::CpuWorker; use { crate::{ allocator::Allocator, - cpu_worker::CpuWorker, + format::{Format, XRGB8888}, gfx_api::{ AsyncShmGfxTexture, BufferResvUser, GfxApi, GfxBlendBuffer, GfxContext, GfxError, @@ -17,7 +19,7 @@ use { }, renderer::{framebuffer::Framebuffer, image::Image}, }, - rect::Rect, + video::{ dmabuf::DmaBuf, drm::{Drm, syncobj::SyncobjCtx}, diff --git a/src/gfx_apis/gl/renderer/framebuffer.rs b/src/gfx_apis/gl/renderer/framebuffer.rs index 57d12729..c8b9c4fc 100644 --- a/src/gfx_apis/gl/renderer/framebuffer.rs +++ b/src/gfx_apis/gl/renderer/framebuffer.rs @@ -1,3 +1,5 @@ +use jay_theme::Color; +use jay_geometry::Region; use { crate::{ cmm::{ @@ -21,8 +23,8 @@ use { run_ops, sys::{GL_ONE, GL_ONE_MINUS_SRC_ALPHA}, }, - rect::Region, - theme::Color, + + }, std::{ cell::Cell, diff --git a/src/gfx_apis/gl/renderer/texture.rs b/src/gfx_apis/gl/renderer/texture.rs index b1170329..1f34b85a 100644 --- a/src/gfx_apis/gl/renderer/texture.rs +++ b/src/gfx_apis/gl/renderer/texture.rs @@ -1,3 +1,4 @@ +use jay_geometry::Region; use { crate::{ format::Format, @@ -14,7 +15,7 @@ use { GL_UNPACK_ROW_LENGTH_EXT, GLint, }, }, - rect::Region, + video::dmabuf::DmaBuf, }, std::{ diff --git a/src/gfx_apis/vulkan.rs b/src/gfx_apis/vulkan.rs index 47e1af43..b03c507b 100644 --- a/src/gfx_apis/vulkan.rs +++ b/src/gfx_apis/vulkan.rs @@ -21,12 +21,18 @@ mod shm_image; mod staging; mod transfer; +use jay_pr_caps::PrCapsThread; +use jay_io_uring::IoUring; +use jay_geometry::Rect; +use jay_eventfd_cache::EventfdCache; +use jay_cpu_worker::{CpuWorker, jobs::read_write::ReadWriteJobError}; +use jay_async_engine::AsyncEngine; use { crate::{ allocator::{Allocator, AllocatorError}, - async_engine::AsyncEngine, - cpu_worker::{CpuWorker, jobs::read_write::ReadWriteJobError}, - eventfd_cache::EventfdCache, + + + format::Format, gfx_api::{ AsyncShmGfxTexture, GfxApi, GfxBlendBuffer, GfxBuffer, GfxContext, GfxError, GfxFormat, @@ -37,9 +43,9 @@ use { device::VulkanDevice, image::VulkanImageMemory, instance::VulkanInstance, renderer::VulkanRenderer, }, - io_uring::IoUring, - pr_caps::PrCapsThread, - rect::Rect, + + + utils::{errorfmt::ErrorFmt, oserror::OsError}, video::{ dmabuf::DmaBuf, diff --git a/src/gfx_apis/vulkan/allocator.rs b/src/gfx_apis/vulkan/allocator.rs index 0cdffd0c..9352160a 100644 --- a/src/gfx_apis/vulkan/allocator.rs +++ b/src/gfx_apis/vulkan/allocator.rs @@ -1,6 +1,7 @@ +use jay_cpu_worker::{AsyncCpuWork, CpuJob, CpuWork, CpuWorker}; use { crate::{ - cpu_worker::{AsyncCpuWork, CpuJob, CpuWork, CpuWorker}, + gfx_apis::vulkan::{VulkanError, device::VulkanDevice, renderer::VulkanRenderer}, utils::{numcell::NumCell, page_size::page_size, ptr_ext::MutPtrExt}, vulkan_core::gpu_alloc_ash::{self, AshMemoryDevice}, diff --git a/src/gfx_apis/vulkan/device.rs b/src/gfx_apis/vulkan/device.rs index b6b9c412..82cd6238 100644 --- a/src/gfx_apis/vulkan/device.rs +++ b/src/gfx_apis/vulkan/device.rs @@ -1,7 +1,8 @@ +use jay_eventfd_cache::EventfdCache; use { crate::{ allocator::BufferObject, - eventfd_cache::EventfdCache, + format::XRGB8888, gfx_apis::vulkan::{ VulkanError, diff --git a/src/gfx_apis/vulkan/image.rs b/src/gfx_apis/vulkan/image.rs index d023838b..8d46da76 100644 --- a/src/gfx_apis/vulkan/image.rs +++ b/src/gfx_apis/vulkan/image.rs @@ -1,3 +1,5 @@ +use jay_theme::Color; +use jay_geometry::Region; use { crate::{ cmm::cmm_description::{ColorDescription, LinearColorDescription}, @@ -13,8 +15,8 @@ use { format::VulkanModifierLimits, renderer::VulkanRenderer, shm_image::VulkanShmImage, transfer::TransferType, }, - rect::Region, - theme::Color, + + utils::oserror::OsErrorExt2, video::dmabuf::{DmaBuf, PlaneVec}, }, diff --git a/src/gfx_apis/vulkan/renderer.rs b/src/gfx_apis/vulkan/renderer.rs index 9f89d3d1..b67e72a3 100644 --- a/src/gfx_apis/vulkan/renderer.rs +++ b/src/gfx_apis/vulkan/renderer.rs @@ -4,6 +4,11 @@ mod pipeline_cache; mod pipelines; mod paint_region; +use jay_theme::Color; +use jay_io_uring::IoUring; +use jay_geometry::{Rect, Region}; +use jay_cpu_worker::PendingJob; +use jay_async_engine::{AsyncEngine, SpawnedFuture}; use { color::{ColorTransforms, EotfArgsCache}, op::{ @@ -13,12 +18,12 @@ use { paint_region::{PaintRegion, Point, constrain_to_fb}, pipeline_cache::{FillPipelines, OutPipelineKey, TexPipelines}, crate::{ - async_engine::{AsyncEngine, SpawnedFuture}, + cmm::{ cmm_description::{ColorDescription, LinearColorDescription}, cmm_render_intent::RenderIntent, }, - cpu_worker::PendingJob, + gfx_api::{ AcquireSync, BufferResv, BufferResvUser, FdSync, GfxApiOpt, GfxBlendBuffer, GfxFormat, GfxTexture, GfxWriteModifier, ReleaseSync, @@ -48,9 +53,9 @@ use { VulkanShader, }, }, - io_uring::IoUring, - rect::{Rect, Region}, - theme::Color, + + + utils::{ copyhashmap::CopyHashMap, errorfmt::ErrorFmt, numcell::NumCell, oserror::OsErrorExt2, stack::Stack, diff --git a/src/gfx_apis/vulkan/renderer/color.rs b/src/gfx_apis/vulkan/renderer/color.rs index fef90f2a..9fe7f832 100644 --- a/src/gfx_apis/vulkan/renderer/color.rs +++ b/src/gfx_apis/vulkan/renderer/color.rs @@ -1,3 +1,4 @@ +use jay_theme::Color; use { crate::{ cmm::{ @@ -11,7 +12,7 @@ use { buffer_cache::GenericBufferWriter, shaders::{ColorManagementData, EotfArgs, InvEotfArgs}, }, - theme::Color, + utils::ordered_float::F32, }, ahash::AHashMap, diff --git a/src/gfx_apis/vulkan/renderer/paint_region.rs b/src/gfx_apis/vulkan/renderer/paint_region.rs index 9f3cf42d..0bd8820b 100644 --- a/src/gfx_apis/vulkan/renderer/paint_region.rs +++ b/src/gfx_apis/vulkan/renderer/paint_region.rs @@ -1,7 +1,8 @@ use { - crate::{gfx_apis::vulkan::image::VulkanImage, rect::Rect}, + crate::gfx_apis::vulkan::image::VulkanImage, ash::vk::{Extent2D, Offset2D, Rect2D}, jay_algorithms::rect::Tag, + jay_geometry::Rect, }; pub(super) type Point = [[f32; 2]; 4]; diff --git a/src/gfx_apis/vulkan/shm_image.rs b/src/gfx_apis/vulkan/shm_image.rs index 0d816fef..fa421b90 100644 --- a/src/gfx_apis/vulkan/shm_image.rs +++ b/src/gfx_apis/vulkan/shm_image.rs @@ -1,6 +1,8 @@ +use jay_geometry::Rect; +use jay_cpu_worker::CpuWorker; use { crate::{ - cpu_worker::CpuWorker, + format::Format, gfx_api::FdSync, gfx_apis::vulkan::{ @@ -12,7 +14,7 @@ use { staging::VulkanStagingBuffer, transfer::{TransferType, VulkanShmImageAsyncData}, }, - rect::Rect, + utils::errorfmt::ErrorFmt, vulkan_core::sync::VulkanDeviceSyncExt, }, diff --git a/src/gfx_apis/vulkan/staging.rs b/src/gfx_apis/vulkan/staging.rs index 9b342ffc..dc2bd3df 100644 --- a/src/gfx_apis/vulkan/staging.rs +++ b/src/gfx_apis/vulkan/staging.rs @@ -1,6 +1,7 @@ +use jay_cpu_worker::CpuWorker; use { crate::{ - cpu_worker::CpuWorker, + gfx_api::GfxStagingBuffer, gfx_apis::vulkan::{ VulkanError, diff --git a/src/gfx_apis/vulkan/transfer.rs b/src/gfx_apis/vulkan/transfer.rs index e108bb5a..3d371b4e 100644 --- a/src/gfx_apis/vulkan/transfer.rs +++ b/src/gfx_apis/vulkan/transfer.rs @@ -1,12 +1,13 @@ +use jay_geometry::{Rect, Region}; +use jay_cpu_worker::{ + CpuJob, CpuWork, CpuWorker, + jobs::{ + img_copy::ImgCopyWork, + read_write::{ReadWriteJobError, ReadWriteWork}, + }, +}; use { crate::{ - cpu_worker::{ - CpuJob, CpuWork, CpuWorker, - jobs::{ - img_copy::ImgCopyWork, - read_write::{ReadWriteJobError, ReadWriteWork}, - }, - }, gfx_api::{ AsyncShmGfxTextureCallback, FdSync, PendingShmTransfer, ShmMemory, ShmMemoryBacking, }, @@ -19,7 +20,7 @@ use { shm_image::VulkanShmImage, staging::{VulkanStagingBuffer, VulkanStagingShell}, }, - rect::{Rect, Region}, + utils::{clonecell::CloneCell, errorfmt::ErrorFmt}, vulkan_core::sync::VulkanDeviceSyncExt, }, diff --git a/src/icons.rs b/src/icons.rs index 624e45d8..0ec56137 100644 --- a/src/icons.rs +++ b/src/icons.rs @@ -1,14 +1,15 @@ #![allow(clippy::excessive_precision)] #![allow(dead_code)] +use jay_theme::Theme; +use jay_units::scale::Scale; use { crate::{ cmm::cmm_eotf::Eotf, format::ARGB8888, gfx_api::{GfxContext, GfxError, GfxTexture}, - scale::Scale, state::State, - theme::Theme, + utils::{copyhashmap::CopyHashMap, windows::WindowsExt}, }, ahash::AHashSet, @@ -100,7 +101,7 @@ pub fn create_icons( } let size = size as u32; - let create_pins = |color: crate::theme::Color| { + let create_pins = |color: jay_theme::Color| { let create_pin = |color: Color| { let mut paint = Paint::default(); paint.set_color(color); @@ -222,7 +223,7 @@ impl PathBuilderExt for PathBuilder { } } -fn calculate_accents(srgb: crate::theme::Color) -> [Color; 2] { +fn calculate_accents(srgb: jay_theme::Color) -> [Color; 2] { let [l, a, b, alpha] = srgb_to_lab(srgb); let l2 = if l < 0.65 { 0.9 } else { l - 0.4 }; let l1 = (l2 + l) / 2.0; @@ -232,7 +233,7 @@ fn calculate_accents(srgb: crate::theme::Color) -> [Color; 2] { ] } -fn srgb_to_lab(srgb: crate::theme::Color) -> [f32; 4] { +fn srgb_to_lab(srgb: jay_theme::Color) -> [f32; 4] { let [mut r, mut g, mut b, alpha] = srgb.to_array(Eotf::Gamma22); if alpha < 1.0 { r /= alpha; diff --git a/src/ifs/data_transfer.rs b/src/ifs/data_transfer.rs index 8337498b..3ef84d0c 100644 --- a/src/ifs/data_transfer.rs +++ b/src/ifs/data_transfer.rs @@ -1,7 +1,7 @@ +use jay_units::fixed::Fixed; use { crate::{ client::{Client, ClientError, ClientId}, - fixed::Fixed, ifs::{data_transfer::x_data_device::XTransferDevice, wl_seat::WlSeatGlobal}, utils::{ bitflags::BitflagsExt, cell_ext::CellExt, clonecell::CloneCell, numcell::NumCell, diff --git a/src/ifs/data_transfer/wl_data_device.rs b/src/ifs/data_transfer/wl_data_device.rs index be3c30a8..f42bfb3d 100644 --- a/src/ifs/data_transfer/wl_data_device.rs +++ b/src/ifs/data_transfer/wl_data_device.rs @@ -1,11 +1,12 @@ +use jay_units::fixed::Fixed; use { crate::{ client::{Client, ClientError, ClientId}, - fixed::Fixed, ifs::{ data_transfer::{ - DeviceData, TransferVtable, IterableTransferVtable, OfferData, Role, break_device_loops, - destroy_data_device, wl_data_offer::WlDataOffer, wl_data_source::WlDataSource, + DeviceData, IterableTransferVtable, OfferData, Role, TransferVtable, + break_device_loops, destroy_data_device, wl_data_offer::WlDataOffer, + wl_data_source::WlDataSource, }, wl_seat::{WlSeatError, WlSeatGlobal}, wl_surface::WlSurfaceError, diff --git a/src/ifs/data_transfer/wl_data_offer.rs b/src/ifs/data_transfer/wl_data_offer.rs index d4436b99..6f835c4b 100644 --- a/src/ifs/data_transfer/wl_data_offer.rs +++ b/src/ifs/data_transfer/wl_data_offer.rs @@ -1,7 +1,7 @@ +use jay_units::fixed::Fixed; use { crate::{ client::{Client, ClientError, ClientId}, - fixed::Fixed, ifs::{ data_transfer::{ DataOffer, DataOfferId, DynDataOffer, OFFER_STATE_ACCEPTED, OFFER_STATE_DROPPED, diff --git a/src/ifs/ext_idle_notification_v1.rs b/src/ifs/ext_idle_notification_v1.rs index f0e74085..5773a980 100644 --- a/src/ifs/ext_idle_notification_v1.rs +++ b/src/ifs/ext_idle_notification_v1.rs @@ -1,6 +1,7 @@ +use jay_async_engine::SpawnedFuture; use { crate::{ - async_engine::SpawnedFuture, + client::{Client, ClientError}, ifs::wl_seat::WlSeatGlobal, leaks::Tracker, diff --git a/src/ifs/ext_image_copy/ext_image_copy_capture_frame_v1.rs b/src/ifs/ext_image_copy/ext_image_copy_capture_frame_v1.rs index 48fa9038..c90d539c 100644 --- a/src/ifs/ext_image_copy/ext_image_copy_capture_frame_v1.rs +++ b/src/ifs/ext_image_copy/ext_image_copy_capture_frame_v1.rs @@ -1,3 +1,4 @@ +use jay_geometry::Region; use { crate::{ client::{Client, ClientError}, @@ -13,7 +14,7 @@ use { }, leaks::Tracker, object::Object, - rect::Region, + tree::{self, Node, OutputNode}, utils::{cell_ext::CellExt, errorfmt::ErrorFmt}, wire::{ExtImageCopyCaptureFrameV1Id, ext_image_copy_capture_frame_v1::*}, diff --git a/src/ifs/ext_image_copy/ext_image_copy_capture_session_v1.rs b/src/ifs/ext_image_copy/ext_image_copy_capture_session_v1.rs index 286e9850..5cec57f4 100644 --- a/src/ifs/ext_image_copy/ext_image_copy_capture_session_v1.rs +++ b/src/ifs/ext_image_copy/ext_image_copy_capture_session_v1.rs @@ -1,3 +1,4 @@ +use jay_time::Time; use { crate::{ client::{Client, ClientError}, @@ -16,7 +17,7 @@ use { }, leaks::Tracker, object::{Object, Version}, - time::Time, + tree::{LatchListener, OutputNode, PresentationListener}, utils::{cell_ext::CellExt, clonecell::CloneCell, event_listener::EventListener}, video::Modifier, diff --git a/src/ifs/head_management.rs b/src/ifs/head_management.rs index 5df25618..fd3ca458 100644 --- a/src/ifs/head_management.rs +++ b/src/ifs/head_management.rs @@ -1,3 +1,4 @@ +use jay_units::scale::Scale; use { crate::{ backend::{ @@ -14,7 +15,6 @@ use { }, wl_output::{BlendSpace, PersistentOutputState}, }, - scale::Scale, state::{OutputData, State}, tree::{OutputNode, TearingMode, Transform, VrrMode}, utils::{copyhashmap::CopyHashMap, hash_map_ext::HashMapExt, rc_eq::RcEq}, diff --git a/src/ifs/head_management/jay_head_ext/jay_head_ext_compositor_space_scaler_v1.rs b/src/ifs/head_management/jay_head_ext/jay_head_ext_compositor_space_scaler_v1.rs index 099c04ad..1a537836 100644 --- a/src/ifs/head_management/jay_head_ext/jay_head_ext_compositor_space_scaler_v1.rs +++ b/src/ifs/head_management/jay_head_ext/jay_head_ext_compositor_space_scaler_v1.rs @@ -1,8 +1,8 @@ +use jay_units::scale::Scale; use { crate::{ compositor::{MAX_SCALE, MIN_SCALE}, ifs::head_management::{HeadOp, HeadState}, - scale::Scale, wire::{ jay_head_ext_compositor_space_scaler_v1::{ JayHeadExtCompositorSpaceScalerV1RequestHandler, Range, SetScale, diff --git a/src/ifs/jay_compositor.rs b/src/ifs/jay_compositor.rs index f2dac3d4..2daba0a9 100644 --- a/src/ifs/jay_compositor.rs +++ b/src/ifs/jay_compositor.rs @@ -1,3 +1,4 @@ +use jay_logger::LogLevel; use { crate::{ backend::transaction::BackendConnectorTransactionError, @@ -26,7 +27,7 @@ use { wl_surface::jay_sync_file_surface::JaySyncFileSurface, }, leaks::Tracker, - logger::LogLevel, + object::{Object, Version}, screenshoter::take_screenshot, tree::ToplevelIdentifier, diff --git a/src/ifs/jay_damage_tracking.rs b/src/ifs/jay_damage_tracking.rs index 386e580e..1679fccc 100644 --- a/src/ifs/jay_damage_tracking.rs +++ b/src/ifs/jay_damage_tracking.rs @@ -1,3 +1,4 @@ +use jay_theme::Color; use { crate::{ client::{Client, ClientError}, @@ -6,7 +7,7 @@ use { globals::{Global, GlobalName}, leaks::Tracker, object::{Object, Version}, - theme::Color, + wire::{ JayCompositorId, jay_damage_tracking::{ diff --git a/src/ifs/jay_input.rs b/src/ifs/jay_input.rs index 18c5ccce..63eb04d4 100644 --- a/src/ifs/jay_input.rs +++ b/src/ifs/jay_input.rs @@ -1,3 +1,4 @@ +use jay_keyboard::{KbvmError, KbvmMap}; use { crate::{ backend::{ @@ -6,7 +7,6 @@ use { client::{Client, ClientError}, clientmem::{ClientMem, ClientMemError, client_mem_client}, ifs::wl_seat::WlSeatGlobal, - kbvm::{KbvmError, KbvmMap}, leaks::Tracker, libinput::consts::{ AccelProfile, ConfigClickMethod, LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE, diff --git a/src/ifs/jay_randr.rs b/src/ifs/jay_randr.rs index 21632dbf..f0d7dff6 100644 --- a/src/ifs/jay_randr.rs +++ b/src/ifs/jay_randr.rs @@ -1,3 +1,4 @@ +use jay_units::scale::Scale; use { crate::{ backend::{self, BackendColorSpace, BackendEotfs}, @@ -8,7 +9,6 @@ use { ifs::wl_output, leaks::Tracker, object::{Object, Version}, - scale::Scale, state::{ConnectorData, DrmDevData, OutputData, State}, tree::{OutputNode, TearingMode, Transform, VrrMode}, utils::errorfmt::ErrorFmt, diff --git a/src/ifs/jay_screencast.rs b/src/ifs/jay_screencast.rs index 9ec24eb1..07ac9e71 100644 --- a/src/ifs/jay_screencast.rs +++ b/src/ifs/jay_screencast.rs @@ -1,3 +1,4 @@ +use jay_units::scale::Scale; use { crate::{ allocator::{AllocatorError, BO_USE_LINEAR, BO_USE_RENDERING, BufferObject}, @@ -10,7 +11,6 @@ use { ifs::{jay_output::JayOutput, jay_toplevel::JayToplevel, wl_buffer::WlBufferStorage}, leaks::Tracker, object::{Object, Version}, - scale::Scale, state::State, tree::{ LatchListener, OutputNode, ToplevelNode, Transform, WorkspaceNode, WorkspaceNodeId, diff --git a/src/ifs/jay_seat_events.rs b/src/ifs/jay_seat_events.rs index 8757608b..dc03cc06 100644 --- a/src/ifs/jay_seat_events.rs +++ b/src/ifs/jay_seat_events.rs @@ -1,8 +1,8 @@ +use jay_units::fixed::Fixed; use { crate::{ backend::{ButtonState, InputDeviceId, KeyState, ScrollAxis}, client::Client, - fixed::Fixed, ifs::wl_seat::{ SeatId, tablet::{ diff --git a/src/ifs/jay_tree_query.rs b/src/ifs/jay_tree_query.rs index 45c90fa7..784c16e2 100644 --- a/src/ifs/jay_tree_query.rs +++ b/src/ifs/jay_tree_query.rs @@ -1,3 +1,4 @@ +use jay_geometry::Rect; use { crate::{ client::{Client, ClientError}, @@ -13,7 +14,7 @@ use { }, leaks::Tracker, object::{Object, Version}, - rect::Rect, + tree::{ self, ContainerNode, DisplayNode, FloatNode, Node, NodeVisitor, OutputNode, PlaceholderNode, ToplevelData, ToplevelIdentifier, ToplevelNodeBase, ToplevelType, diff --git a/src/ifs/wl_buffer.rs b/src/ifs/wl_buffer.rs index 1fff5db3..cf29694b 100644 --- a/src/ifs/wl_buffer.rs +++ b/src/ifs/wl_buffer.rs @@ -1,3 +1,4 @@ +use jay_geometry::{Rect, Region}; use { crate::{ client::{Client, ClientError}, @@ -7,7 +8,7 @@ use { ifs::wl_surface::WlSurface, leaks::Tracker, object::{Object, Version}, - rect::{Rect, Region}, + utils::{errorfmt::ErrorFmt, event_listener::EventListener, page_size::page_size}, video::{ LINEAR_MODIFIER, diff --git a/src/ifs/wl_output.rs b/src/ifs/wl_output.rs index e45b2ce8..6655d876 100644 --- a/src/ifs/wl_output.rs +++ b/src/ifs/wl_output.rs @@ -1,5 +1,6 @@ mod removed_output; +use jay_geometry::Rect; use { crate::{ backend::{self, BackendColorSpace, BackendEotfs, BackendLuminance}, @@ -19,7 +20,7 @@ use { }, leaks::Tracker, object::{Object, Version}, - rect::Rect, + state::{ConnectorData, State}, tree::{OutputNode, TearingMode, Transform, VrrMode, calculate_logical_size}, utils::{ @@ -148,7 +149,7 @@ impl BlendSpace { pub struct PersistentOutputState { pub transform: Cell, - pub scale: Cell, + pub scale: Cell, pub pos: Cell<(i32, i32)>, pub vrr_mode: Cell, pub vrr_cursor_hz: Cell>, diff --git a/src/ifs/wl_region.rs b/src/ifs/wl_region.rs index d65c1761..27f91c5f 100644 --- a/src/ifs/wl_region.rs +++ b/src/ifs/wl_region.rs @@ -1,9 +1,10 @@ +use jay_geometry::{Rect, Region, RegionBuilder}; use { crate::{ client::{Client, ClientError}, leaks::Tracker, object::{Object, Version}, - rect::{Rect, Region, RegionBuilder}, + wire::{WlRegionId, wl_region::*}, }, std::{cell::RefCell, rc::Rc}, diff --git a/src/ifs/wl_seat.rs b/src/ifs/wl_seat.rs index bbf03945..ee692e4f 100644 --- a/src/ifs/wl_seat.rs +++ b/src/ifs/wl_seat.rs @@ -1,5 +1,5 @@ -mod event_handling; mod device_handler; +mod event_handling; pub mod ext_transient_seat_manager_v1; pub mod ext_transient_seat_v1; mod focus; @@ -12,10 +12,10 @@ mod selection; pub mod tablet; pub mod text_input; mod touch_owner; +mod window_management; pub mod wl_keyboard; pub mod wl_pointer; pub mod wl_touch; -mod window_management; pub mod wp_pointer_warp_v1; pub mod zwp_pointer_constraints_v1; pub mod zwp_pointer_gesture_hold_v1; @@ -27,19 +27,24 @@ pub mod zwp_relative_pointer_v1; pub mod zwp_virtual_keyboard_manager_v1; pub mod zwp_virtual_keyboard_v1; +use jay_geometry::Rect; +use jay_async_engine::SpawnedFuture; +use jay_keyboard::{ + DynKeyboardState, KbvmMap, KbvmMapId, KbvmState, KeyboardState, KeyboardStateId, KeymapFd, + LedsListener, +}; +use jay_units::fixed::Fixed; use { crate::{ - async_engine::SpawnedFuture, + backend::{ ButtonState, InputDeviceAccelProfile, InputDeviceClickMethod, Leds, TransformMatrix, }, client::{Client, ClientError, ClientId}, cursor_user::{CursorUser, CursorUserGroup, CursorUserOwner}, ei::ei_ifs::ei_seat::EiSeat, - fixed::Fixed, globals::{Global, GlobalName}, ifs::{ - ext_idle_notification_v1::ExtIdleNotificationV1, data_transfer::{ self, DynDataSource, TransferError, data_control::{DataControlDeviceId, DynDataControlDevice}, @@ -48,6 +53,7 @@ use { x_data_device::{XTransferDevice, XTransferDeviceId}, zwp_primary_selection_device_v1::ZwpPrimarySelectionDeviceV1, }, + ext_idle_notification_v1::ExtIdleNotificationV1, wl_output::WlOutputGlobal, wl_seat::{ event_handling::FocusHistoryData, @@ -77,11 +83,10 @@ use { }, xdg_toplevel_drag_v1::XdgToplevelDragV1, }, - kbvm::{KbvmMap, KbvmMapId, KbvmState, PhysicalKeyboardState}, - keyboard::{DynKeyboardState, KeyboardState, KeyboardStateId, KeymapFd, LedsListener}, + kbvm::PhysicalKeyboardState, leaks::Tracker, object::{Object, Version}, - rect::Rect, + state::{DeviceHandlerData, State}, tree::{ FoundNode, Node, NodeId, NodeLocation, OutputNode, ToplevelNode, WorkspaceNode, @@ -125,11 +130,11 @@ use { }; pub use { event_handling::NodeSeatState, + pointer_owner::{ToplevelSelector, WorkspaceSelector}, position_hint::{ CursorPositionType, PositionHintRequest, handle_position_hint_requests, handle_warp_mouse_to_focus, }, - pointer_owner::{ToplevelSelector, WorkspaceSelector}, seat_object::WlSeatError, }; @@ -1091,7 +1096,6 @@ pub struct WlSeat { tracker: Tracker, } - pub fn collect_kb_foci2(node: Rc, seats: &mut SmallVec<[Rc; 3]>) { node.node_visit(&mut generic_node_visitor(|node| { node.node_seat_state().for_each_kb_focus(|s| seats.push(s)); diff --git a/src/ifs/wl_seat/event_handling.rs b/src/ifs/wl_seat/event_handling.rs index cef66089..8dd2edd5 100644 --- a/src/ifs/wl_seat/event_handling.rs +++ b/src/ifs/wl_seat/event_handling.rs @@ -1,3 +1,6 @@ +use jay_geometry::Rect; +use jay_keyboard::{KbvmState, KeyboardState}; +use jay_units::fixed::Fixed; use { crate::{ backend::{ @@ -7,7 +10,6 @@ use { client::ClientId, config::InvokedShortcut, ei::ei_ifs::ei_seat::EiSeat, - fixed::Fixed, ifs::{ data_transfer::{ offer_source_to_regular_client, @@ -35,10 +37,8 @@ use { }, wl_surface::{WlSurface, xdg_surface::xdg_popup::XdgPopup}, }, - kbvm::KbvmState, - keyboard::KeyboardState, object::Version, - rect::Rect, + state::DeviceHandlerData, tree::{Direction, Node, ToplevelNode}, utils::{ diff --git a/src/ifs/wl_seat/gesture_owner.rs b/src/ifs/wl_seat/gesture_owner.rs index 2340f0bb..fb66a28c 100644 --- a/src/ifs/wl_seat/gesture_owner.rs +++ b/src/ifs/wl_seat/gesture_owner.rs @@ -1,5 +1,6 @@ +use jay_units::fixed::Fixed; use { - crate::{fixed::Fixed, ifs::wl_seat::WlSeatGlobal, tree::Node, utils::clonecell::CloneCell}, + crate::{ifs::wl_seat::WlSeatGlobal, tree::Node, utils::clonecell::CloneCell}, std::rc::Rc, }; diff --git a/src/ifs/wl_seat/pointer_owner.rs b/src/ifs/wl_seat/pointer_owner.rs index d0ce8532..6acadc8a 100644 --- a/src/ifs/wl_seat/pointer_owner.rs +++ b/src/ifs/wl_seat/pointer_owner.rs @@ -1,8 +1,10 @@ +use jay_time::Time; +use jay_geometry::Rect; +use jay_units::fixed::Fixed; use { crate::{ backend::{AXIS_120, AxisSource, ButtonState, ScrollAxis}, cursor::KnownCursor, - fixed::Fixed, ifs::{ data_transfer, data_transfer::wl_data_source::WlDataSource, @@ -17,8 +19,8 @@ use { }, xdg_toplevel_drag_v1::XdgToplevelDragV1, }, - rect::Rect, - time::Time, + + tree::{ ContainerNode, ContainerSplit, ContainingNode, FindTreeUsecase, FoundNode, Node, PlaceholderNode, TddType, ToplevelNode, WorkspaceDragDestination, WorkspaceNode, diff --git a/src/ifs/wl_seat/tablet/pad.rs b/src/ifs/wl_seat/tablet/pad.rs index 34c1cc91..96952bce 100644 --- a/src/ifs/wl_seat/tablet/pad.rs +++ b/src/ifs/wl_seat/tablet/pad.rs @@ -1,7 +1,8 @@ +use jay_time::usec_to_msec; +use jay_units::fixed::Fixed; use { crate::{ backend::InputDeviceId, - fixed::Fixed, ifs::{ wl_seat::{ WlSeatGlobal, @@ -14,7 +15,7 @@ use { }, wl_surface::WlSurface, }, - time::usec_to_msec, + utils::{clonecell::CloneCell, hash_map_ext::HashMapExt}, }, std::{cell::Cell, rc::Rc}, diff --git a/src/ifs/wl_seat/tablet/tool.rs b/src/ifs/wl_seat/tablet/tool.rs index bd6c598d..d955eb3b 100644 --- a/src/ifs/wl_seat/tablet/tool.rs +++ b/src/ifs/wl_seat/tablet/tool.rs @@ -1,7 +1,9 @@ +use jay_time::usec_to_msec; +use jay_geometry::Rect; +use jay_units::fixed::Fixed; use { crate::{ cursor::KnownCursor, - fixed::Fixed, ifs::{ wl_seat::{ WlSeatGlobal, @@ -13,8 +15,8 @@ use { }, wl_surface::WlSurface, }, - rect::Rect, - time::usec_to_msec, + + utils::{clonecell::CloneCell, hash_map_ext::HashMapExt}, }, std::{cell::Cell, rc::Rc}, diff --git a/src/ifs/wl_seat/tablet/tool_owner.rs b/src/ifs/wl_seat/tablet/tool_owner.rs index 351e7e4f..213e9810 100644 --- a/src/ifs/wl_seat/tablet/tool_owner.rs +++ b/src/ifs/wl_seat/tablet/tool_owner.rs @@ -1,6 +1,6 @@ +use jay_units::fixed::Fixed; use { crate::{ - fixed::Fixed, ifs::wl_seat::tablet::{TabletTool, TabletToolChanges, ToolButtonState}, tree::{FindTreeUsecase, FoundNode, Node}, utils::{clonecell::CloneCell, smallmap::SmallMap}, diff --git a/src/ifs/wl_seat/tablet/zwp_tablet_pad_ring_v2.rs b/src/ifs/wl_seat/tablet/zwp_tablet_pad_ring_v2.rs index 4cf2f4ad..cafc0747 100644 --- a/src/ifs/wl_seat/tablet/zwp_tablet_pad_ring_v2.rs +++ b/src/ifs/wl_seat/tablet/zwp_tablet_pad_ring_v2.rs @@ -1,7 +1,7 @@ +use jay_units::fixed::Fixed; use { crate::{ client::{Client, ClientError}, - fixed::Fixed, ifs::wl_seat::tablet::{ TabletPadRing, TabletRingEventSource, zwp_tablet_seat_v2::ZwpTabletSeatV2, }, diff --git a/src/ifs/wl_seat/tablet/zwp_tablet_tool_v2.rs b/src/ifs/wl_seat/tablet/zwp_tablet_tool_v2.rs index a39a4905..220cccdd 100644 --- a/src/ifs/wl_seat/tablet/zwp_tablet_tool_v2.rs +++ b/src/ifs/wl_seat/tablet/zwp_tablet_tool_v2.rs @@ -1,8 +1,8 @@ +use jay_units::fixed::Fixed; use { crate::{ client::{Client, ClientError}, cursor::Cursor, - fixed::Fixed, ifs::{ wl_seat::tablet::{ TabletToolCapability, TabletToolOpt, TabletToolType, ToolButtonState, diff --git a/src/ifs/wl_seat/text_input.rs b/src/ifs/wl_seat/text_input.rs index 51cea1d3..e2886dc4 100644 --- a/src/ifs/wl_seat/text_input.rs +++ b/src/ifs/wl_seat/text_input.rs @@ -1,3 +1,4 @@ +use jay_keyboard::KeyboardState; use { crate::{ backend::KeyState, @@ -8,7 +9,6 @@ use { }, wl_surface::{WlSurface, zwp_input_popup_surface_v2::ZwpInputPopupSurfaceV2}, }, - keyboard::KeyboardState, utils::smallmap::SmallMap, wire::ZwpInputPopupSurfaceV2Id, }, diff --git a/src/ifs/wl_seat/text_input/simple_im.rs b/src/ifs/wl_seat/text_input/simple_im.rs index 917e3312..6f9c3deb 100644 --- a/src/ifs/wl_seat/text_input/simple_im.rs +++ b/src/ifs/wl_seat/text_input/simple_im.rs @@ -1,3 +1,4 @@ +use jay_keyboard::KeyboardState; use { crate::{ backend::KeyState, @@ -10,7 +11,6 @@ use { }, wl_surface::zwp_input_popup_surface_v2::ZwpInputPopupSurfaceV2, }, - keyboard::KeyboardState, utils::{clonecell::CloneCell, smallmap::SmallMap}, wire::ZwpInputPopupSurfaceV2Id, }, diff --git a/src/ifs/wl_seat/text_input/zwp_input_method_keyboard_grab_v2.rs b/src/ifs/wl_seat/text_input/zwp_input_method_keyboard_grab_v2.rs index 718f63cc..c4253169 100644 --- a/src/ifs/wl_seat/text_input/zwp_input_method_keyboard_grab_v2.rs +++ b/src/ifs/wl_seat/text_input/zwp_input_method_keyboard_grab_v2.rs @@ -1,3 +1,4 @@ +use jay_keyboard::{KeyboardState, KeyboardStateId}; use { crate::{ backend::KeyState, @@ -6,7 +7,6 @@ use { text_input::{InputMethodKeyboardGrab, zwp_input_method_v2::ZwpInputMethodV2}, wl_keyboard, }, - keyboard::{KeyboardState, KeyboardStateId}, leaks::Tracker, object::{Object, Version}, utils::errorfmt::ErrorFmt, diff --git a/src/ifs/wl_seat/text_input/zwp_input_method_v2.rs b/src/ifs/wl_seat/text_input/zwp_input_method_v2.rs index 35c4467a..8ce4b416 100644 --- a/src/ifs/wl_seat/text_input/zwp_input_method_v2.rs +++ b/src/ifs/wl_seat/text_input/zwp_input_method_v2.rs @@ -1,3 +1,4 @@ +use jay_keyboard::KeyboardStateId; use { crate::{ client::{Client, ClientError}, @@ -13,7 +14,6 @@ use { ZwpInputPopupSurfaceV2, ZwpInputPopupSurfaceV2Error, }, }, - keyboard::KeyboardStateId, leaks::Tracker, object::{Object, Version}, utils::{clonecell::CloneCell, numcell::NumCell, smallmap::SmallMap}, diff --git a/src/ifs/wl_seat/text_input/zwp_text_input_v3.rs b/src/ifs/wl_seat/text_input/zwp_text_input_v3.rs index f831ac33..54310e8c 100644 --- a/src/ifs/wl_seat/text_input/zwp_text_input_v3.rs +++ b/src/ifs/wl_seat/text_input/zwp_text_input_v3.rs @@ -1,3 +1,4 @@ +use jay_geometry::Rect; use { crate::{ client::{Client, ClientError}, @@ -13,7 +14,7 @@ use { }, leaks::Tracker, object::{Object, Version}, - rect::Rect, + utils::{clonecell::CloneCell, numcell::NumCell}, wire::{ZwpTextInputV3Id, zwp_text_input_v3::*}, }, diff --git a/src/ifs/wl_seat/touch_owner.rs b/src/ifs/wl_seat/touch_owner.rs index 11756d2f..d461dc28 100644 --- a/src/ifs/wl_seat/touch_owner.rs +++ b/src/ifs/wl_seat/touch_owner.rs @@ -1,6 +1,6 @@ +use jay_units::fixed::Fixed; use { crate::{ - fixed::Fixed, ifs::wl_seat::WlSeatGlobal, tree::Node, utils::{clonecell::CloneCell, smallmap::SmallMap}, diff --git a/src/ifs/wl_seat/wl_keyboard.rs b/src/ifs/wl_seat/wl_keyboard.rs index e598f30b..af036da3 100644 --- a/src/ifs/wl_seat/wl_keyboard.rs +++ b/src/ifs/wl_seat/wl_keyboard.rs @@ -1,9 +1,9 @@ +use jay_keyboard::{KeyboardError, KeyboardState, KeyboardStateId}; use { crate::{ backend::KeyState, client::{Client, ClientError}, ifs::wl_seat::WlSeat, - keyboard::{KeyboardError, KeyboardState, KeyboardStateId}, leaks::Tracker, object::{Object, Version}, utils::{errorfmt::ErrorFmt, vecset::VecSet}, diff --git a/src/ifs/wl_seat/wl_pointer.rs b/src/ifs/wl_seat/wl_pointer.rs index dbeed04e..1366e4c8 100644 --- a/src/ifs/wl_seat/wl_pointer.rs +++ b/src/ifs/wl_seat/wl_pointer.rs @@ -1,8 +1,8 @@ +use jay_units::fixed::Fixed; use { crate::{ client::ClientError, cursor::Cursor, - fixed::Fixed, ifs::{wl_seat::WlSeat, wl_surface::WlSurfaceError}, leaks::Tracker, object::{Object, Version}, diff --git a/src/ifs/wl_seat/wl_touch.rs b/src/ifs/wl_seat/wl_touch.rs index e423571f..5585eb0c 100644 --- a/src/ifs/wl_seat/wl_touch.rs +++ b/src/ifs/wl_seat/wl_touch.rs @@ -1,7 +1,7 @@ +use jay_units::fixed::Fixed; use { crate::{ client::ClientError, - fixed::Fixed, ifs::wl_seat::WlSeat, leaks::Tracker, object::{Object, Version}, diff --git a/src/ifs/wl_seat/zwp_pointer_constraints_v1.rs b/src/ifs/wl_seat/zwp_pointer_constraints_v1.rs index 3d2ed4fc..4370fcc7 100644 --- a/src/ifs/wl_seat/zwp_pointer_constraints_v1.rs +++ b/src/ifs/wl_seat/zwp_pointer_constraints_v1.rs @@ -1,7 +1,8 @@ +use jay_geometry::{Rect, Region}; +use jay_units::fixed::Fixed; use { crate::{ client::{Client, ClientError}, - fixed::Fixed, globals::{Global, GlobalName}, ifs::{ wl_seat::{ @@ -12,7 +13,7 @@ use { }, leaks::Tracker, object::{Object, Version}, - rect::{Rect, Region}, + utils::clonecell::CloneCell, wire::{ WlPointerId, WlRegionId, WlSurfaceId, ZwpPointerConstraintsV1Id, diff --git a/src/ifs/wl_seat/zwp_pointer_gesture_pinch_v1.rs b/src/ifs/wl_seat/zwp_pointer_gesture_pinch_v1.rs index b758ea48..acf90ca8 100644 --- a/src/ifs/wl_seat/zwp_pointer_gesture_pinch_v1.rs +++ b/src/ifs/wl_seat/zwp_pointer_gesture_pinch_v1.rs @@ -1,7 +1,7 @@ +use jay_units::fixed::Fixed; use { crate::{ client::{Client, ClientError}, - fixed::Fixed, ifs::{wl_seat::WlSeatGlobal, wl_surface::WlSurface}, leaks::Tracker, object::{Object, Version}, diff --git a/src/ifs/wl_seat/zwp_pointer_gesture_swipe_v1.rs b/src/ifs/wl_seat/zwp_pointer_gesture_swipe_v1.rs index e8a0f5dc..2f15b6a1 100644 --- a/src/ifs/wl_seat/zwp_pointer_gesture_swipe_v1.rs +++ b/src/ifs/wl_seat/zwp_pointer_gesture_swipe_v1.rs @@ -1,7 +1,7 @@ +use jay_units::fixed::Fixed; use { crate::{ client::{Client, ClientError}, - fixed::Fixed, ifs::{wl_seat::WlSeatGlobal, wl_surface::WlSurface}, leaks::Tracker, object::{Object, Version}, diff --git a/src/ifs/wl_seat/zwp_relative_pointer_v1.rs b/src/ifs/wl_seat/zwp_relative_pointer_v1.rs index 228291e0..8a20e5eb 100644 --- a/src/ifs/wl_seat/zwp_relative_pointer_v1.rs +++ b/src/ifs/wl_seat/zwp_relative_pointer_v1.rs @@ -1,7 +1,7 @@ +use jay_units::fixed::Fixed; use { crate::{ client::{Client, ClientError}, - fixed::Fixed, ifs::wl_seat::WlSeat, leaks::Tracker, object::{Object, Version}, diff --git a/src/ifs/wl_seat/zwp_virtual_keyboard_manager_v1.rs b/src/ifs/wl_seat/zwp_virtual_keyboard_manager_v1.rs index 921485b7..6c13b4ea 100644 --- a/src/ifs/wl_seat/zwp_virtual_keyboard_manager_v1.rs +++ b/src/ifs/wl_seat/zwp_virtual_keyboard_manager_v1.rs @@ -1,9 +1,9 @@ +use jay_keyboard::KeyboardState; use { crate::{ client::{Client, ClientError}, globals::{Global, GlobalName}, ifs::wl_seat::zwp_virtual_keyboard_v1::ZwpVirtualKeyboardV1, - keyboard::KeyboardState, leaks::Tracker, object::{Object, Version}, wire::{ZwpVirtualKeyboardManagerV1Id, zwp_virtual_keyboard_manager_v1::*}, diff --git a/src/ifs/wl_seat/zwp_virtual_keyboard_v1.rs b/src/ifs/wl_seat/zwp_virtual_keyboard_v1.rs index af194118..25317284 100644 --- a/src/ifs/wl_seat/zwp_virtual_keyboard_v1.rs +++ b/src/ifs/wl_seat/zwp_virtual_keyboard_v1.rs @@ -1,3 +1,4 @@ +use jay_keyboard::{KbvmError, KeyboardState}; use { crate::{ backend::KeyState, @@ -10,8 +11,6 @@ use { }, wl_surface::WlSurface, }, - kbvm::KbvmError, - keyboard::KeyboardState, leaks::Tracker, object::{Object, Version}, wire::{ZwpVirtualKeyboardV1Id, zwp_virtual_keyboard_v1::*}, diff --git a/src/ifs/wl_surface.rs b/src/ifs/wl_surface.rs index 195f1e8c..ca375c39 100644 --- a/src/ifs/wl_surface.rs +++ b/src/ifs/wl_surface.rs @@ -28,6 +28,10 @@ mod request; pub use presentation::SyncobjRelease; +use jay_io_uring::IoUringError; +use jay_geometry::{DamageQueue, Rect, Region}; +use jay_keyboard::KeyboardState; +use jay_units::fixed::Fixed; use presentation::{FrameRequest, SurfaceRelease}; use { @@ -38,7 +42,6 @@ use { cursor_user::{CursorUser, CursorUserId}, damage::DamageMatrix, drm_feedback::DrmFeedback, - fixed::Fixed, gfx_api::{ AlphaMode, AsyncShmGfxTexture, BufferResv, BufferResvUser, FdSync, GfxError, GfxStagingBuffer, ReleaseSync, SampleRect, SyncFile, @@ -81,11 +84,10 @@ use { wp_presentation_feedback::PresentationFeedback, zwp_linux_dmabuf_feedback_v1::ZwpLinuxDmabufFeedbackV1, }, - io_uring::IoUringError, - keyboard::KeyboardState, + leaks::Tracker, object::{Object, Version}, - rect::{DamageQueue, Rect, Region}, + renderer::Renderer, state::State, tree::{ @@ -1016,7 +1018,6 @@ impl WlSurface { const MAX_DAMAGE: usize = 32; - impl WlSurface { fn apply_state(self: &Rc, pending: &mut PendingState) -> Result<(), WlSurfaceError> { for (_, pending) in &mut pending.subsurfaces { diff --git a/src/ifs/wl_surface/commit_timeline.rs b/src/ifs/wl_surface/commit_timeline.rs index 93372993..0bb0091d 100644 --- a/src/ifs/wl_surface/commit_timeline.rs +++ b/src/ifs/wl_surface/commit_timeline.rs @@ -1,15 +1,15 @@ +use jay_async_engine::{AsyncEngine, SpawnedFuture}; +use jay_io_uring::{ + IoUring, IoUringError, PendingPoll, PendingTimeout, PollCallback, TimeoutCallback, +}; use { crate::{ - async_engine::{AsyncEngine, SpawnedFuture}, client::Client, gfx_api::{AsyncShmGfxTextureCallback, GfxError, PendingShmTransfer, STAGING_UPLOAD}, ifs::{ wl_buffer::WlBufferStorage, wl_surface::{PendingState, WlSurface, WlSurfaceError}, }, - io_uring::{ - IoUring, IoUringError, PendingPoll, PendingTimeout, PollCallback, TimeoutCallback, - }, tree::BeforeLatchResult, utils::{ clonecell::CloneCell, diff --git a/src/ifs/wl_surface/cursor.rs b/src/ifs/wl_surface/cursor.rs index fabcea95..7800f31b 100644 --- a/src/ifs/wl_surface/cursor.rs +++ b/src/ifs/wl_surface/cursor.rs @@ -1,13 +1,14 @@ +use jay_geometry::Rect; +use jay_units::fixed::Fixed; +use jay_units::scale::Scale; use { crate::{ cursor::Cursor, cursor_user::CursorUser, - fixed::Fixed, ifs::wl_surface::WlSurface, leaks::Tracker, - rect::Rect, + renderer::Renderer, - scale::Scale, tree::{Node, NodeLocation, NodeVisitorBase, OutputNode}, }, std::{cell::Cell, rc::Rc}, diff --git a/src/ifs/wl_surface/dnd_icon.rs b/src/ifs/wl_surface/dnd_icon.rs index ef1bc180..876a86c4 100644 --- a/src/ifs/wl_surface/dnd_icon.rs +++ b/src/ifs/wl_surface/dnd_icon.rs @@ -1,7 +1,8 @@ +use jay_geometry::Rect; use { crate::{ ifs::{wl_seat::WlSeatGlobal, wl_surface::WlSurface}, - rect::Rect, + renderer::Renderer, }, std::rc::Rc, diff --git a/src/ifs/wl_surface/ext_session_lock_surface_v1.rs b/src/ifs/wl_surface/ext_session_lock_surface_v1.rs index f0931675..40723cdf 100644 --- a/src/ifs/wl_surface/ext_session_lock_surface_v1.rs +++ b/src/ifs/wl_surface/ext_session_lock_surface_v1.rs @@ -1,7 +1,8 @@ +use jay_geometry::Rect; +use jay_units::fixed::Fixed; use { crate::{ client::{Client, ClientError}, - fixed::Fixed, ifs::{ wl_output::OutputGlobalOpt, wl_seat::{NodeSeatState, WlSeatGlobal}, @@ -9,7 +10,7 @@ use { }, leaks::Tracker, object::{Object, Version}, - rect::Rect, + tree::{ FindTreeResult, FindTreeUsecase, FoundNode, Node, NodeId, NodeLayerLink, NodeLocation, NodeVisitor, OutputNode, diff --git a/src/ifs/wl_surface/tray.rs b/src/ifs/wl_surface/tray.rs index 9ec856c4..47d88671 100644 --- a/src/ifs/wl_surface/tray.rs +++ b/src/ifs/wl_surface/tray.rs @@ -1,3 +1,4 @@ +use jay_geometry::Rect; use { crate::{ client::{Client, ClientError, ClientId}, @@ -9,7 +10,7 @@ use { xdg_surface::xdg_popup::{XdgPopup, XdgPopupParent}, }, }, - rect::Rect, + tree::{ FindTreeResult, FindTreeUsecase, FoundNode, Node, NodeId, NodeLayerLink, NodeLocation, NodeVisitor, OutputNode, StackedNode, diff --git a/src/ifs/wl_surface/tray/jay_tray_item_v1.rs b/src/ifs/wl_surface/tray/jay_tray_item_v1.rs index 88b5731f..704ec056 100644 --- a/src/ifs/wl_surface/tray/jay_tray_item_v1.rs +++ b/src/ifs/wl_surface/tray/jay_tray_item_v1.rs @@ -1,3 +1,4 @@ +use jay_theme::BarPosition; use { crate::{ ifs::{ @@ -15,7 +16,7 @@ use { }, leaks::Tracker, object::{Object, Version}, - theme::BarPosition, + tree::NodeVisitor, utils::copyhashmap::CopyHashMap, wire::{JayTrayItemV1Id, XdgPopupId, jay_tray_item_v1::*}, diff --git a/src/ifs/wl_surface/wp_fractional_scale_v1.rs b/src/ifs/wl_surface/wp_fractional_scale_v1.rs index 47fadbe5..b9aba204 100644 --- a/src/ifs/wl_surface/wp_fractional_scale_v1.rs +++ b/src/ifs/wl_surface/wp_fractional_scale_v1.rs @@ -1,10 +1,10 @@ +use jay_units::scale::Scale; use { crate::{ client::{Client, ClientError}, ifs::wl_surface::WlSurface, leaks::Tracker, object::{Object, Version}, - scale::Scale, utils::cell_ext::CellExt, wire::{WpFractionalScaleV1Id, wp_fractional_scale_v1::*}, }, diff --git a/src/ifs/wl_surface/x_surface/xwindow.rs b/src/ifs/wl_surface/x_surface/xwindow.rs index 80ea8b1b..2bba3fd6 100644 --- a/src/ifs/wl_surface/x_surface/xwindow.rs +++ b/src/ifs/wl_surface/x_surface/xwindow.rs @@ -1,14 +1,15 @@ +use jay_geometry::Rect; +use jay_units::fixed::Fixed; use { crate::{ animation::RetainedToplevel, client::Client, cursor::KnownCursor, - fixed::Fixed, ifs::{ wl_seat::{NodeSeatState, WlSeatGlobal, tablet::TabletTool}, wl_surface::{WlSurface, WlSurfaceError, x_surface::XSurface}, }, - rect::Rect, + renderer::Renderer, state::State, tree::{ diff --git a/src/ifs/wl_surface/xdg_surface.rs b/src/ifs/wl_surface/xdg_surface.rs index ad87c951..946bce7b 100644 --- a/src/ifs/wl_surface/xdg_surface.rs +++ b/src/ifs/wl_surface/xdg_surface.rs @@ -1,6 +1,7 @@ pub mod xdg_popup; pub mod xdg_toplevel; +use jay_geometry::Rect; use { crate::{ client::ClientError, @@ -17,7 +18,7 @@ use { }, leaks::Tracker, object::Object, - rect::Rect, + state::State, tree::{ FindTreeResult, FoundNode, Node, NodeLayerLink, NodeLocation, OutputNode, StackedNode, diff --git a/src/ifs/wl_surface/xdg_surface/xdg_popup.rs b/src/ifs/wl_surface/xdg_surface/xdg_popup.rs index 14b131fe..afb39591 100644 --- a/src/ifs/wl_surface/xdg_surface/xdg_popup.rs +++ b/src/ifs/wl_surface/xdg_surface/xdg_popup.rs @@ -1,10 +1,11 @@ pub mod jay_popup_ext_v1; +use jay_geometry::Rect; +use jay_units::fixed::Fixed; use { crate::{ client::{Client, ClientError}, cursor::KnownCursor, - fixed::Fixed, ifs::{ wl_seat::{NodeSeatState, SeatId, WlSeatGlobal, tablet::TabletTool}, wl_surface::{ @@ -20,7 +21,7 @@ use { }, leaks::Tracker, object::Object, - rect::Rect, + renderer::Renderer, tree::{ Direction, FindTreeResult, FindTreeUsecase, FoundNode, Node, NodeId, NodeLayerLink, diff --git a/src/ifs/wl_surface/xdg_surface/xdg_toplevel.rs b/src/ifs/wl_surface/xdg_surface/xdg_toplevel.rs index 6a7f395f..fa71f0dd 100644 --- a/src/ifs/wl_surface/xdg_surface/xdg_toplevel.rs +++ b/src/ifs/wl_surface/xdg_surface/xdg_toplevel.rs @@ -1,13 +1,15 @@ pub mod xdg_dialog_v1; +use jay_geometry::Rect; +use jay_bugs::Bugs; +use jay_units::fixed::Fixed; use { crate::{ animation::RetainedToplevel, - bugs, - bugs::Bugs, + + client::{Client, ClientError}, cursor::KnownCursor, - fixed::Fixed, ifs::{ ext_foreign_toplevel_list_v1::ExtForeignToplevelListV1, wl_seat::{NodeSeatState, WlSeatGlobal, tablet::TabletTool}, @@ -22,7 +24,7 @@ use { }, leaks::Tracker, object::{Object, Version}, - rect::Rect, + renderer::Renderer, state::State, tree::{ @@ -168,7 +170,7 @@ impl XdgToplevel { children: RefCell::new(Default::default()), states: NumCell::new(states), decoration: Cell::new(Decoration::Server), - bugs: Cell::new(&bugs::NONE), + bugs: Cell::new(&jay_bugs::NONE), min_width: Cell::new(None), min_height: Cell::new(None), max_width: Cell::new(None), @@ -304,7 +306,7 @@ impl XdgToplevelRequestHandler for XdgToplevel { fn set_app_id(&self, req: SetAppId, _slf: &Rc) -> Result<(), Self::Error> { self.toplevel_data.set_app_id(req.app_id); - self.bugs.set(bugs::get(req.app_id)); + self.bugs.set(jay_bugs::get(req.app_id)); Ok(()) } diff --git a/src/ifs/wl_surface/zwlr_layer_surface_v1.rs b/src/ifs/wl_surface/zwlr_layer_surface_v1.rs index ad8e40e8..0316f23a 100644 --- a/src/ifs/wl_surface/zwlr_layer_surface_v1.rs +++ b/src/ifs/wl_surface/zwlr_layer_surface_v1.rs @@ -1,3 +1,4 @@ +use jay_geometry::Rect; use { crate::{ client::{Client, ClientError}, @@ -12,7 +13,7 @@ use { }, leaks::Tracker, object::Object, - rect::Rect, + renderer::Renderer, tree::{ Direction, FindTreeResult, FindTreeUsecase, FoundNode, Node, NodeId, NodeLayerLink, diff --git a/src/ifs/wl_surface/zwp_input_popup_surface_v2.rs b/src/ifs/wl_surface/zwp_input_popup_surface_v2.rs index 3550b94d..690d6fab 100644 --- a/src/ifs/wl_surface/zwp_input_popup_surface_v2.rs +++ b/src/ifs/wl_surface/zwp_input_popup_surface_v2.rs @@ -1,3 +1,4 @@ +use jay_geometry::Rect; use { crate::{ client::{Client, ClientError}, @@ -7,7 +8,7 @@ use { }, leaks::Tracker, object::{Object, Version}, - rect::Rect, + state::State, tree::NodeLayerLink, wire::{WlSurfaceId, ZwpInputPopupSurfaceV2Id, zwp_input_popup_surface_v2::*}, diff --git a/src/ifs/wlr_output_manager/zwlr_output_configuration_head.rs b/src/ifs/wlr_output_manager/zwlr_output_configuration_head.rs index 8034861b..5d5457bc 100644 --- a/src/ifs/wlr_output_manager/zwlr_output_configuration_head.rs +++ b/src/ifs/wlr_output_manager/zwlr_output_configuration_head.rs @@ -1,14 +1,14 @@ +use jay_units::fixed::Fixed; +use jay_units::scale::Scale; use { crate::{ backend::Mode, client::{Client, ClientError}, - fixed::Fixed, ifs::wlr_output_manager::zwlr_output_head_v1::{ ADAPTIVE_SYNC_STATE_DISABLED, ADAPTIVE_SYNC_STATE_ENABLED, WlrOutputHeadId, }, leaks::Tracker, object::{Object, Version}, - scale::Scale, tree::{Transform, VrrMode}, wire::{ZwlrOutputConfigurationHeadV1Id, zwlr_output_configuration_head_v1::*}, }, diff --git a/src/ifs/wlr_output_manager/zwlr_output_head_v1.rs b/src/ifs/wlr_output_manager/zwlr_output_head_v1.rs index 5e51a558..ffc254d2 100644 --- a/src/ifs/wlr_output_manager/zwlr_output_head_v1.rs +++ b/src/ifs/wlr_output_manager/zwlr_output_head_v1.rs @@ -1,19 +1,19 @@ +use jay_units::fixed::Fixed; +use jay_units::scale::Scale as UnitScale; use { crate::{ backend::{self, ConnectorId}, client::{Client, ClientError}, - fixed::Fixed, ifs::wlr_output_manager::{ zwlr_output_manager_v1::{WlrOutputManagerId, ZwlrOutputManagerV1}, zwlr_output_mode_v1::ZwlrOutputModeV1, }, leaks::Tracker, object::{Object, Version}, - scale, state::OutputData, tree::{self, VrrMode}, utils::copyhashmap::CopyHashMap, - wire::{ZwlrOutputHeadV1Id, zwlr_output_head_v1::*}, + wire::{zwlr_output_head_v1::*, ZwlrOutputHeadV1Id}, }, std::rc::Rc, thiserror::Error, @@ -116,7 +116,7 @@ impl ZwlrOutputHeadV1 { }); } - pub fn send_scale(&self, scale: scale::Scale) { + pub fn send_scale(&self, scale: UnitScale) { let scale = Fixed::from_f64(scale.to_f64()); self.client.event(Scale { self_id: self.id, @@ -208,7 +208,7 @@ impl ZwlrOutputHeadV1 { self.manager.schedule_done(); } - pub fn handle_new_scale(&self, scale: scale::Scale) { + pub fn handle_new_scale(&self, scale: UnitScale) { self.send_scale(scale); self.manager.schedule_done(); } diff --git a/src/ifs/xdg_positioner.rs b/src/ifs/xdg_positioner.rs index 3b0d02cf..0254e012 100644 --- a/src/ifs/xdg_positioner.rs +++ b/src/ifs/xdg_positioner.rs @@ -1,10 +1,11 @@ +use jay_geometry::Rect; use { crate::{ client::{Client, ClientError}, ifs::xdg_wm_base::XdgWmBase, leaks::Tracker, object::Object, - rect::Rect, + wire::{XdgPositionerId, xdg_positioner::*}, }, std::{cell::RefCell, rc::Rc}, diff --git a/src/ifs/xdg_toplevel_drag_v1.rs b/src/ifs/xdg_toplevel_drag_v1.rs index 94af7da8..c31e21e6 100644 --- a/src/ifs/xdg_toplevel_drag_v1.rs +++ b/src/ifs/xdg_toplevel_drag_v1.rs @@ -1,3 +1,4 @@ +use jay_geometry::Rect; use { crate::{ client::{Client, ClientError}, @@ -7,7 +8,7 @@ use { }, leaks::Tracker, object::{Object, Version}, - rect::Rect, + renderer::Renderer, tree::{Node, ToplevelNode}, utils::clonecell::CloneCell, diff --git a/src/ifs/xx_foreign_toplevel_geometry_tracker_v1.rs b/src/ifs/xx_foreign_toplevel_geometry_tracker_v1.rs index d3977902..6a2d8e16 100644 --- a/src/ifs/xx_foreign_toplevel_geometry_tracker_v1.rs +++ b/src/ifs/xx_foreign_toplevel_geometry_tracker_v1.rs @@ -1,9 +1,10 @@ +use jay_geometry::Rect; use { crate::{ client::{Client, ClientError}, leaks::Tracker, object::{Object, Version}, - rect::Rect, + state::State, tree::ToplevelOpt, wire::{XxForeignToplevelGeometryTrackerV1Id, xx_foreign_toplevel_geometry_tracker_v1::*}, diff --git a/src/ifs/zwlr_screencopy_frame_v1.rs b/src/ifs/zwlr_screencopy_frame_v1.rs index 7509dce9..fd1f4b23 100644 --- a/src/ifs/zwlr_screencopy_frame_v1.rs +++ b/src/ifs/zwlr_screencopy_frame_v1.rs @@ -1,3 +1,4 @@ +use jay_geometry::Rect; use { crate::{ client::{Client, ClientError}, @@ -9,7 +10,7 @@ use { }, leaks::Tracker, object::{Object, Version}, - rect::Rect, + utils::errorfmt::ErrorFmt, wire::{WlBufferId, ZwlrScreencopyFrameV1Id, zwlr_screencopy_frame_v1::*}, }, diff --git a/src/ifs/zwlr_screencopy_manager_v1.rs b/src/ifs/zwlr_screencopy_manager_v1.rs index 6254a0c7..77dbed24 100644 --- a/src/ifs/zwlr_screencopy_manager_v1.rs +++ b/src/ifs/zwlr_screencopy_manager_v1.rs @@ -1,3 +1,4 @@ +use jay_geometry::Rect; use { crate::{ client::{Client, ClientError}, @@ -5,7 +6,7 @@ use { ifs::zwlr_screencopy_frame_v1::ZwlrScreencopyFrameV1, leaks::Tracker, object::{Object, Version}, - rect::Rect, + wire::{ WlOutputId, ZwlrScreencopyFrameV1Id, ZwlrScreencopyManagerV1Id, zwlr_screencopy_manager_v1::*, diff --git a/src/ifs/zwlr_virtual_pointer_v1.rs b/src/ifs/zwlr_virtual_pointer_v1.rs index 4c63ae8e..b5c84f03 100644 --- a/src/ifs/zwlr_virtual_pointer_v1.rs +++ b/src/ifs/zwlr_virtual_pointer_v1.rs @@ -1,8 +1,8 @@ +use jay_units::fixed::Fixed; use { crate::{ backend::{AxisSource as BackendAxisSource, ButtonState, ScrollAxis}, client::{Client, ClientError}, - fixed::Fixed, ifs::{ wl_output::OutputGlobalOpt, wl_seat::{ diff --git a/src/io_uring.rs b/src/io_uring.rs deleted file mode 100644 index c18791a6..00000000 --- a/src/io_uring.rs +++ /dev/null @@ -1 +0,0 @@ -pub use jay_io_uring::*; diff --git a/src/it.rs b/src/it.rs index 7e08fc5c..c3b4d8e9 100644 --- a/src/it.rs +++ b/src/it.rs @@ -1,6 +1,8 @@ +use std::time::SystemTime; +use jay_async_engine::Phase; use { crate::{ - async_engine::Phase, + it::{ test_backend::TestBackend, test_config::{TestConfig, with_test_config}, @@ -17,7 +19,7 @@ use { parking_lot::Mutex, std::{ any::Any, cell::Cell, collections::VecDeque, future::pending, pin::Pin, rc::Rc, sync::Arc, - time::SystemTime, + }, uapi::c, }; diff --git a/src/it/test_backend.rs b/src/it/test_backend.rs index dffcc1e7..93711111 100644 --- a/src/it/test_backend.rs +++ b/src/it/test_backend.rs @@ -1,7 +1,10 @@ +use jay_udmabuf::Udmabuf; +use jay_async_engine::SpawnedFuture; +use jay_units::fixed::Fixed; use { crate::{ allocator::{Allocator, AllocatorError}, - async_engine::SpawnedFuture, + backend::{ AxisSource, Backend, BackendConnectorState, BackendEvent, ButtonState, Connector, ConnectorEvent, ConnectorId, ConnectorKernelId, DrmDeviceId, InputDevice, @@ -16,7 +19,6 @@ use { cmm::cmm_primaries::Primaries, compositor::TestFuture, drm_feedback::DrmFeedback, - fixed::Fixed, format::XRGB8888, gfx_api::GfxError, gfx_apis::create_vulkan_allocator, @@ -24,7 +26,7 @@ use { test_error::TestResult, test_gfx_api::TestGfxCtx, test_utils::test_expected_event::TEEH, }, state::State, - udmabuf::Udmabuf, + utils::{ clonecell::CloneCell, copyhashmap::CopyHashMap, diff --git a/src/it/test_client.rs b/src/it/test_client.rs index 5252bda4..88b2c218 100644 --- a/src/it/test_client.rs +++ b/src/it/test_client.rs @@ -1,3 +1,4 @@ +use jay_theme::Color; use { crate::{ cli::{ScreenshotFormat, screenshot::buf_to_bytes}, @@ -20,7 +21,7 @@ use { test_utils::{test_surface_ext::TestSurfaceExt, test_window::TestWindow}, testrun::TestRun, }, - theme::Color, + }, std::{cell::Cell, rc::Rc}, }; diff --git a/src/it/test_gfx_api.rs b/src/it/test_gfx_api.rs index 532eedd6..05cef23e 100644 --- a/src/it/test_gfx_api.rs +++ b/src/it/test_gfx_api.rs @@ -1,8 +1,11 @@ +use jay_theme::Color; +use jay_geometry::{Rect, Region}; +use jay_cpu_worker::CpuWorker; use { crate::{ allocator::{Allocator, AllocatorError, BufferObject, BufferUsage}, cmm::cmm_description::{ColorDescription, LinearColorDescription}, - cpu_worker::CpuWorker, + format::{ARGB8888, Format, XRGB8888}, gfx_api::{ AcquireSync, AsyncShmGfxTexture, AsyncShmGfxTextureCallback, CopyTexture, FdSync, @@ -11,8 +14,8 @@ use { GfxTexture, GfxWriteModifier, PendingShmTransfer, ReleaseSync, ResetStatus, ShmGfxTexture, ShmMemory, }, - rect::{Rect, Region}, - theme::Color, + + video::{LINEAR_MODIFIER, dmabuf::DmaBuf, drm::syncobj::SyncobjCtx}, }, ahash::AHashMap, diff --git a/src/it/test_ifs/test_pointer_warp.rs b/src/it/test_ifs/test_pointer_warp.rs index 35b9f3e9..e274577c 100644 --- a/src/it/test_ifs/test_pointer_warp.rs +++ b/src/it/test_ifs/test_pointer_warp.rs @@ -1,6 +1,6 @@ +use jay_units::fixed::Fixed; use { crate::{ - fixed::Fixed, it::{ test_error::TestResult, test_ifs::{test_pointer::TestPointer, test_surface::TestSurface}, diff --git a/src/it/test_ifs/test_region.rs b/src/it/test_ifs/test_region.rs index c2a0aec2..13ead662 100644 --- a/src/it/test_ifs/test_region.rs +++ b/src/it/test_ifs/test_region.rs @@ -1,8 +1,9 @@ +use jay_geometry::{Rect, RegionBuilder}; use { crate::{ ifs::wl_region::WlRegion, it::{test_error::TestError, test_object::TestObject, test_transport::TestTransport}, - rect::{Rect, RegionBuilder}, + wire::{WlRegionId, wl_region::*}, }, std::{ diff --git a/src/it/test_ifs/test_shm_buffer.rs b/src/it/test_ifs/test_shm_buffer.rs index 7a2c7fee..1eb1549a 100644 --- a/src/it/test_ifs/test_shm_buffer.rs +++ b/src/it/test_ifs/test_shm_buffer.rs @@ -1,7 +1,8 @@ +use jay_theme::Color; use { crate::{ it::{test_ifs::test_buffer::TestBuffer, test_mem::TestMem}, - theme::Color, + utils::windows::WindowsExt, }, std::{ diff --git a/src/it/test_ifs/test_single_pixel_buffer_manager.rs b/src/it/test_ifs/test_single_pixel_buffer_manager.rs index 33afb24d..783da3f1 100644 --- a/src/it/test_ifs/test_single_pixel_buffer_manager.rs +++ b/src/it/test_ifs/test_single_pixel_buffer_manager.rs @@ -1,3 +1,4 @@ +use jay_theme::Color; use { crate::{ cmm::cmm_eotf::Eotf, @@ -5,7 +6,7 @@ use { test_error::TestResult, test_ifs::test_buffer::TestBuffer, test_object::TestObject, test_transport::TestTransport, }, - theme::Color, + wire::{WpSinglePixelBufferManagerV1Id, wp_single_pixel_buffer_manager_v1::*}, }, std::{cell::Cell, rc::Rc}, diff --git a/src/it/test_ifs/test_viewport.rs b/src/it/test_ifs/test_viewport.rs index e08266de..2555671d 100644 --- a/src/it/test_ifs/test_viewport.rs +++ b/src/it/test_ifs/test_viewport.rs @@ -1,6 +1,6 @@ +use jay_units::fixed::Fixed; use { crate::{ - fixed::Fixed, it::{test_error::TestError, test_object::TestObject, test_transport::TestTransport}, wire::{WpViewportId, wp_viewport::*}, }, diff --git a/src/it/test_logger.rs b/src/it/test_logger.rs index af287bdb..709986f1 100644 --- a/src/it/test_logger.rs +++ b/src/it/test_logger.rs @@ -1,3 +1,4 @@ +use std::time::SystemTime; use { crate::utils::clonecell::CloneCell, log::{Level, LevelFilter, Log, Metadata, Record}, @@ -6,7 +7,7 @@ use { io::Write, rc::Rc, sync::atomic::{AtomicUsize, Ordering}, - time::SystemTime, + }, uapi::{Fd, OwnedFd}, }; diff --git a/src/it/test_transport.rs b/src/it/test_transport.rs index c83ffad0..7c716c05 100644 --- a/src/it/test_transport.rs +++ b/src/it/test_transport.rs @@ -1,6 +1,7 @@ +use jay_async_engine::SpawnedFuture; use { crate::{ - async_engine::SpawnedFuture, + client::{Client, ClientId, EventFormatter}, it::{ test_error::{StdError, TestError}, diff --git a/src/it/test_utils/test_surface_ext.rs b/src/it/test_utils/test_surface_ext.rs index 85b1d660..7a6e34cd 100644 --- a/src/it/test_utils/test_surface_ext.rs +++ b/src/it/test_utils/test_surface_ext.rs @@ -1,3 +1,4 @@ +use jay_theme::Color; use { crate::{ it::{ @@ -7,7 +8,7 @@ use { test_surface::TestSurface, test_viewport::TestViewport, }, }, - theme::Color, + }, std::{cell::Cell, ops::Deref, rc::Rc}, }; diff --git a/src/it/testrun.rs b/src/it/testrun.rs index 0045a7bf..c6a8da83 100644 --- a/src/it/testrun.rs +++ b/src/it/testrun.rs @@ -1,7 +1,7 @@ +use jay_units::fixed::Fixed; use { crate::{ client::{ClientId, RequestParser}, - fixed::Fixed, ifs::wl_seat::WlSeatGlobal, it::{ test_backend::{TestBackend, TestBackendKb, TestBackendMouse, TestConnector}, diff --git a/src/it/tests/t0003_multi_window.rs b/src/it/tests/t0003_multi_window.rs index db726f90..a4bf7b3c 100644 --- a/src/it/tests/t0003_multi_window.rs +++ b/src/it/tests/t0003_multi_window.rs @@ -1,7 +1,8 @@ +use jay_geometry::Rect; use { crate::{ it::{test_error::TestError, testrun::TestRun}, - rect::Rect, + tree::Node, }, std::rc::Rc, diff --git a/src/it/tests/t0006_region.rs b/src/it/tests/t0006_region.rs index 9aaa57ea..12d77b03 100644 --- a/src/it/tests/t0006_region.rs +++ b/src/it/tests/t0006_region.rs @@ -1,7 +1,8 @@ +use jay_geometry::Rect; use { crate::{ it::{test_error::TestError, testrun::TestRun}, - rect::Rect, + }, std::rc::Rc, }; diff --git a/src/it/tests/t0007_subsurface.rs b/src/it/tests/t0007_subsurface.rs index ea75622f..28ecdd9e 100644 --- a/src/it/tests/t0007_subsurface.rs +++ b/src/it/tests/t0007_subsurface.rs @@ -1,7 +1,8 @@ +use jay_theme::Color; use { crate::{ it::{test_error::TestError, testrun::TestRun}, - theme::Color, + }, std::rc::Rc, }; diff --git a/src/it/tests/t0012_subsurface_focus.rs b/src/it/tests/t0012_subsurface_focus.rs index 7fc2ccab..df2865ef 100644 --- a/src/it/tests/t0012_subsurface_focus.rs +++ b/src/it/tests/t0012_subsurface_focus.rs @@ -1,3 +1,4 @@ +use jay_theme::Color; use { crate::{ ifs::wl_seat::BTN_LEFT, @@ -5,7 +6,7 @@ use { test_error::{TestErrorExt, TestResult}, testrun::TestRun, }, - theme::Color, + }, std::rc::Rc, }; diff --git a/src/it/tests/t0020_surface_offset.rs b/src/it/tests/t0020_surface_offset.rs index b7cc9d4a..6d86a19c 100644 --- a/src/it/tests/t0020_surface_offset.rs +++ b/src/it/tests/t0020_surface_offset.rs @@ -1,3 +1,4 @@ +use jay_theme::Color; use { crate::{ it::{ @@ -9,7 +10,7 @@ use { }, testrun::TestRun, }, - theme::Color, + }, std::rc::Rc, }; diff --git a/src/it/tests/t0031_syncobj.rs b/src/it/tests/t0031_syncobj.rs index a4bac2a9..f716d478 100644 --- a/src/it/tests/t0031_syncobj.rs +++ b/src/it/tests/t0031_syncobj.rs @@ -1,7 +1,8 @@ +use jay_theme::Color; use { crate::{ it::{test_error::TestResult, testrun::TestRun}, - theme::Color, + utils::errorfmt::ErrorFmt, video::drm::{DrmError, syncobj::SyncobjPoint, wait_for_syncobj::SyncobjWaiter}, }, diff --git a/src/it/tests/t0033_float_size_memoization.rs b/src/it/tests/t0033_float_size_memoization.rs index 0c8c0b89..96056775 100644 --- a/src/it/tests/t0033_float_size_memoization.rs +++ b/src/it/tests/t0033_float_size_memoization.rs @@ -1,7 +1,8 @@ +use jay_geometry::Rect; use { crate::{ it::{test_error::TestResult, testrun::TestRun}, - rect::Rect, + }, std::rc::Rc, }; diff --git a/src/it/tests/t0038_subsurface_parent_state.rs b/src/it/tests/t0038_subsurface_parent_state.rs index b43910eb..bff8dc89 100644 --- a/src/it/tests/t0038_subsurface_parent_state.rs +++ b/src/it/tests/t0038_subsurface_parent_state.rs @@ -1,7 +1,8 @@ +use jay_theme::Color; use { crate::{ it::{test_error::TestResult, testrun::TestRun}, - theme::Color, + }, std::rc::Rc, }; diff --git a/src/it/tests/t0039_alpha_modifier.rs b/src/it/tests/t0039_alpha_modifier.rs index 0a90bc60..6f8e3a02 100644 --- a/src/it/tests/t0039_alpha_modifier.rs +++ b/src/it/tests/t0039_alpha_modifier.rs @@ -1,7 +1,8 @@ +use jay_theme::Color; use { crate::{ it::{test_error::TestResult, testrun::TestRun}, - theme::Color, + }, std::rc::Rc, }; diff --git a/src/it/tests/t0040_virtual_keyboard.rs b/src/it/tests/t0040_virtual_keyboard.rs index bcb0db4b..4fb67262 100644 --- a/src/it/tests/t0040_virtual_keyboard.rs +++ b/src/it/tests/t0040_virtual_keyboard.rs @@ -1,9 +1,9 @@ +use jay_keyboard::KbvmContext; use { crate::{ backend::KeyState, clientmem::ClientMem, it::{test_error::TestResult, testrun::TestRun}, - kbvm::KbvmContext, }, bstr::ByteSlice, std::rc::Rc, diff --git a/src/it/tests/t0046_buffer_release.rs b/src/it/tests/t0046_buffer_release.rs index 908bc0d6..344df52a 100644 --- a/src/it/tests/t0046_buffer_release.rs +++ b/src/it/tests/t0046_buffer_release.rs @@ -1,7 +1,8 @@ +use jay_theme::Color; use { crate::{ it::{test_error::TestResult, testrun::TestRun}, - theme::Color, + wire::WlBufferId, }, std::rc::Rc, diff --git a/src/it/tests/t0047_surface_damage.rs b/src/it/tests/t0047_surface_damage.rs index c2d0d6dd..f577f907 100644 --- a/src/it/tests/t0047_surface_damage.rs +++ b/src/it/tests/t0047_surface_damage.rs @@ -1,7 +1,8 @@ +use jay_geometry::Rect; use { crate::{ it::{test_error::TestResult, testrun::TestRun}, - rect::Rect, + }, std::rc::Rc, }; @@ -23,7 +24,7 @@ async fn test(run: Rc) -> TestResult { let surface = client.comp.create_surface().await?; let buffer = client .spbm - .create_buffer(crate::theme::Color::from_srgb(255, 0, 0))?; + .create_buffer(jay_theme::Color::from_srgb(255, 0, 0))?; surface.attach(buffer.id)?; surface.commit()?; // Initial commit to attach buffer client.sync().await; diff --git a/src/it/tests/t0048_frame_callback.rs b/src/it/tests/t0048_frame_callback.rs index fd11ce90..081cd69f 100644 --- a/src/it/tests/t0048_frame_callback.rs +++ b/src/it/tests/t0048_frame_callback.rs @@ -58,7 +58,7 @@ async fn test(run: Rc) -> TestResult { let invisible_surface = client.comp.create_surface().await?; let buffer = client .spbm - .create_buffer(crate::theme::Color::from_srgb(255, 0, 0))?; + .create_buffer(jay_theme::Color::from_srgb(255, 0, 0))?; invisible_surface.attach(buffer.id)?; let callback_invisible = invisible_surface.frame()?; diff --git a/src/it/tests/t0049_surface_damage_backend.rs b/src/it/tests/t0049_surface_damage_backend.rs index d25d3a13..6bc33b3a 100644 --- a/src/it/tests/t0049_surface_damage_backend.rs +++ b/src/it/tests/t0049_surface_damage_backend.rs @@ -21,7 +21,7 @@ async fn test(run: Rc) -> TestResult { let window = client.create_window().await?; let buffer = client .spbm - .create_buffer(crate::theme::Color::from_srgb(0, 255, 0))?; + .create_buffer(jay_theme::Color::from_srgb(0, 255, 0))?; window.surface.attach(buffer.id)?; window.map().await?; client.sync().await; @@ -59,7 +59,7 @@ async fn test(run: Rc) -> TestResult { let invisible_surface = client.comp.create_surface().await?; let invisible_buffer = client .spbm - .create_buffer(crate::theme::Color::from_srgb(255, 255, 0))?; + .create_buffer(jay_theme::Color::from_srgb(255, 255, 0))?; invisible_surface.attach(invisible_buffer.id)?; invisible_surface.commit()?; // Initial commit to attach buffer client.sync().await; diff --git a/src/it/tests/t0050_fifo.rs b/src/it/tests/t0050_fifo.rs index dd011138..183d9777 100644 --- a/src/it/tests/t0050_fifo.rs +++ b/src/it/tests/t0050_fifo.rs @@ -1,10 +1,11 @@ +use jay_theme::Color; use { crate::{ it::{ test_error::{TestError, TestResult}, testrun::TestRun, }, - theme::Color, + }, std::rc::Rc, }; diff --git a/src/it/tests/t0051_pointer_warp.rs b/src/it/tests/t0051_pointer_warp.rs index 2741c7df..36adb7ed 100644 --- a/src/it/tests/t0051_pointer_warp.rs +++ b/src/it/tests/t0051_pointer_warp.rs @@ -1,6 +1,6 @@ +use jay_units::fixed::Fixed; use { crate::{ - fixed::Fixed, it::{test_error::TestResult, testrun::TestRun}, tree::Node, }, diff --git a/src/it/tests/t0054_subsurface_already_attached.rs b/src/it/tests/t0054_subsurface_already_attached.rs index a60cde94..ad58c75f 100644 --- a/src/it/tests/t0054_subsurface_already_attached.rs +++ b/src/it/tests/t0054_subsurface_already_attached.rs @@ -1,7 +1,8 @@ +use jay_theme::Color; use { crate::{ it::{test_error::TestError, testrun::TestRun}, - theme::Color, + tree::Node, }, std::rc::Rc, diff --git a/src/kbvm.rs b/src/kbvm.rs index cbb7c6d8..e5e4cfb1 100644 --- a/src/kbvm.rs +++ b/src/kbvm.rs @@ -1,4 +1,4 @@ -pub use jay_keyboard::{KbvmContext, KbvmError, KbvmMap, KbvmMapId, KbvmState}; +use jay_keyboard::KbvmState; use { crate::{ diff --git a/src/keyboard.rs b/src/keyboard.rs deleted file mode 100644 index 90f59904..00000000 --- a/src/keyboard.rs +++ /dev/null @@ -1,4 +0,0 @@ -pub use jay_keyboard::{ - DynKeyboardState, KeyboardError, KeyboardState, KeyboardStateId, KeyboardStateIds, KeymapFd, - LedsListener, -}; diff --git a/src/logger.rs b/src/logger.rs deleted file mode 100644 index 52e3bb65..00000000 --- a/src/logger.rs +++ /dev/null @@ -1 +0,0 @@ -pub use jay_logger::*; diff --git a/src/main.rs b/src/main.rs index 89a8ce7f..fe938d39 100644 --- a/src/main.rs +++ b/src/main.rs @@ -47,15 +47,11 @@ mod leaks; #[macro_use] extern crate jay_tracy; -use jay_tracy as tracy; - mod acceptor; mod allocator; mod animation; -mod async_engine; mod backend; mod backends; -mod bugs; mod cli; mod client; mod clientmem; @@ -63,17 +59,13 @@ mod cmm; mod compositor; mod config; mod copy_device; -mod cpu_worker; mod criteria; mod cursor; mod cursor_user; mod damage; mod dbus; mod drm_feedback; -mod edid; mod ei; -mod eventfd_cache; -mod fixed; mod forker; mod format; mod gfx_api; @@ -81,42 +73,30 @@ mod gfx_apis; mod globals; mod icons; mod ifs; -mod io_uring; #[cfg(feature = "it")] mod it; mod kbvm; -mod keyboard; mod libinput; -mod logger; mod logind; mod object; mod output_schedule; -mod pango; mod pipewire; mod portal; -mod pr_caps; -mod rect; mod renderer; -mod scale; mod screenshoter; -mod sighand; mod state; mod tagged_acceptor; mod tasks; mod text; -mod theme; -mod time; mod tools; mod tree; mod udev; -mod udmabuf; mod user_session; mod utils; mod version; mod video; mod virtual_output; mod vulkan_core; -mod wheel; mod wire; mod wire_dbus; mod wire_ei; diff --git a/src/pango.rs b/src/pango.rs deleted file mode 100644 index 521c4b03..00000000 --- a/src/pango.rs +++ /dev/null @@ -1 +0,0 @@ -pub use jay_pango::*; diff --git a/src/pipewire/pw_con.rs b/src/pipewire/pw_con.rs index b994acd3..afdfd8e6 100644 --- a/src/pipewire/pw_con.rs +++ b/src/pipewire/pw_con.rs @@ -1,7 +1,9 @@ +use jay_io_uring::{IoUring, IoUringError}; +use jay_async_engine::{AsyncEngine, SpawnedFuture}; use { crate::{ - async_engine::{AsyncEngine, SpawnedFuture}, - io_uring::{IoUring, IoUringError}, + + pipewire::{ pw_formatter::{PwFormatter, format}, pw_ifs::{ diff --git a/src/pipewire/pw_ifs/pw_client_node.rs b/src/pipewire/pw_ifs/pw_client_node.rs index 9b42c31f..d896a88b 100644 --- a/src/pipewire/pw_ifs/pw_client_node.rs +++ b/src/pipewire/pw_ifs/pw_client_node.rs @@ -1,8 +1,9 @@ #![allow(non_upper_case_globals)] +use jay_async_engine::SpawnedFuture; use { crate::{ - async_engine::SpawnedFuture, + format::{Format, pipewire_format, pw_formats}, pipewire::{ pw_con::PwCon, diff --git a/src/portal.rs b/src/portal.rs index 1b02f148..b9bf65e9 100644 --- a/src/portal.rs +++ b/src/portal.rs @@ -6,19 +6,24 @@ mod ptl_session; mod ptl_text; mod ptr_gui; +use jay_wheel::Wheel; +use jay_logger::{LogLevel, Logger}; +use jay_io_uring::IoUring; +use jay_eventfd_cache::EventfdCache; +use jay_async_engine::AsyncEngine; use { crate::{ - async_engine::AsyncEngine, + cli::GlobalArgs, cmm::cmm_manager::ColorManager, dbus::{ BUS_DEST, BUS_PATH, DBUS_NAME_FLAG_DO_NOT_QUEUE, DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER, Dbus, DbusSocket, }, - eventfd_cache::EventfdCache, + forker::ForkerError, - io_uring::IoUring, - logger::{LogLevel, Logger}, + + pipewire::pw_con::{PwCon, PwConHolder, PwConOwner}, portal::{ ptl_display::{PortalDisplay, PortalDisplayId, watch_displays}, @@ -41,7 +46,7 @@ use { }, version::VERSION, video::dmabuf::DmaBufIds, - wheel::Wheel, + wire_dbus::org, }, std::{ @@ -249,6 +254,7 @@ async fn run_async( eventfd_cache, eng, wheel, + displays: Default::default(), dbus, sessions: Default::default(), diff --git a/src/portal/ptl_remote_desktop/remote_desktop_gui.rs b/src/portal/ptl_remote_desktop/remote_desktop_gui.rs index f9b52189..f3f51fe9 100644 --- a/src/portal/ptl_remote_desktop/remote_desktop_gui.rs +++ b/src/portal/ptl_remote_desktop/remote_desktop_gui.rs @@ -1,3 +1,4 @@ +use jay_theme::Color; use { crate::{ globals::GlobalName, @@ -10,7 +11,7 @@ use { OverlayWindowOwner, }, }, - theme::Color, + utils::{copyhashmap::CopyHashMap, hash_map_ext::HashMapExt}, }, std::rc::Rc, diff --git a/src/portal/ptl_screencast/screencast_gui.rs b/src/portal/ptl_screencast/screencast_gui.rs index d792f233..1d7f5835 100644 --- a/src/portal/ptl_screencast/screencast_gui.rs +++ b/src/portal/ptl_screencast/screencast_gui.rs @@ -1,3 +1,4 @@ +use jay_theme::Color; use { crate::{ globals::GlobalName, @@ -13,7 +14,7 @@ use { OverlayWindowOwner, }, }, - theme::Color, + utils::{copyhashmap::CopyHashMap, hash_map_ext::HashMapExt}, wl_usr::usr_ifs::{ usr_jay_select_toplevel::UsrJaySelectToplevelOwner, diff --git a/src/portal/ptl_text.rs b/src/portal/ptl_text.rs index 188112ba..305c3ed1 100644 --- a/src/portal/ptl_text.rs +++ b/src/portal/ptl_text.rs @@ -1,14 +1,14 @@ +use jay_theme::Color; +use jay_geometry::Rect; +use jay_pango::{ + CairoContext, CairoImageSurface, PangoCairoContext, PangoFontDescription, PangoLayout, + consts::{CAIRO_FORMAT_ARGB32, CAIRO_OPERATOR_SOURCE}, +}; use { crate::{ cmm::cmm_eotf::Eotf, format::ARGB8888, gfx_api::{GfxContext, GfxTexture}, - pango::{ - CairoContext, CairoImageSurface, PangoCairoContext, PangoFontDescription, PangoLayout, - consts::{CAIRO_FORMAT_ARGB32, CAIRO_OPERATOR_SOURCE}, - }, - rect::Rect, - theme::Color, }, std::{ops::Neg, rc::Rc, sync::Arc}, }; diff --git a/src/portal/ptr_gui.rs b/src/portal/ptr_gui.rs index 1484a583..06851bd0 100644 --- a/src/portal/ptr_gui.rs +++ b/src/portal/ptr_gui.rs @@ -1,10 +1,13 @@ +use jay_theme::Color; +use jay_async_engine::{Phase, SpawnedFuture}; +use jay_units::fixed::Fixed; +use jay_units::scale::Scale; use { crate::{ allocator::{BO_USE_RENDERING, BufferObject, BufferUsage}, - async_engine::{Phase, SpawnedFuture}, + cmm::{cmm_manager::ColorManager, cmm_render_intent::RenderIntent}, cursor::KnownCursor, - fixed::Fixed, format::ARGB8888, gfx_api::{ AcquireSync, AlphaMode, GfxContext, GfxFramebuffer, GfxTexture, ReleaseSync, @@ -17,8 +20,7 @@ use { ptl_text::{self, TextMeasurement}, }, renderer::renderer_base::RendererBase, - scale::Scale, - theme::Color, + utils::{ asyncevent::AsyncEvent, clonecell::CloneCell, copyhashmap::CopyHashMap, errorfmt::ErrorFmt, hash_map_ext::HashMapExt, rc_eq::rc_eq, diff --git a/src/pr_caps.rs b/src/pr_caps.rs deleted file mode 100644 index b80102fd..00000000 --- a/src/pr_caps.rs +++ /dev/null @@ -1 +0,0 @@ -pub use jay_pr_caps::*; diff --git a/src/rect.rs b/src/rect.rs deleted file mode 100644 index a986b7ac..00000000 --- a/src/rect.rs +++ /dev/null @@ -1 +0,0 @@ -pub use jay_geometry::*; diff --git a/src/renderer.rs b/src/renderer.rs index b80e3f18..73dfb0c9 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -1,3 +1,6 @@ +use jay_theme::{Color, CornerRadius}; +use jay_geometry::Rect; +use jay_units::scale::Scale; use { crate::{ animation::{ @@ -12,11 +15,10 @@ use { xdg_surface::{XdgSurface, xdg_toplevel::XdgToplevel}, zwlr_layer_surface_v1::ZwlrLayerSurfaceV1, }, - rect::Rect, + renderer::renderer_base::RendererBase, - scale::Scale, state::State, - theme::{Color, CornerRadius}, + tree::{ ContainerNode, DisplayNode, FloatNode, Node, OutputNode, PlaceholderNode, ToplevelData, ToplevelNode, ToplevelNodeBase, WorkspaceNode, tab_bar::TabBar, @@ -358,7 +360,7 @@ impl Renderer<'_> { if let Some(tex) = tex_ref.as_ref() && let Some(texture) = tex.texture() { - use crate::theme::TabTitleAlign; + use jay_theme::TabTitleAlign; let (tw, _th) = texture.size(); let tex_width = (tw as f64 / render_scale.to_f64()).round() as i32; let tab_inner = ew - 2 * (text_padding + border_width); diff --git a/src/renderer/renderer_base.rs b/src/renderer/renderer_base.rs index eebe8789..a0c66003 100644 --- a/src/renderer/renderer_base.rs +++ b/src/renderer/renderer_base.rs @@ -1,3 +1,6 @@ +use jay_theme::{Color, CornerRadius}; +use jay_geometry::Rect; +use jay_units::scale::Scale; use { crate::{ cmm::{ @@ -8,9 +11,8 @@ use { AcquireSync, AlphaMode, BufferResv, CopyTexture, FillRect, FramebufferRect, GfxApiOpt, GfxTexture, ReleaseSync, RoundedCopyTexture, RoundedFillRect, SampleRect, }, - rect::Rect, - scale::Scale, - theme::{Color, CornerRadius}, + + tree::Transform, }, std::rc::Rc, diff --git a/src/scale.rs b/src/scale.rs deleted file mode 100644 index 542d5f77..00000000 --- a/src/scale.rs +++ /dev/null @@ -1 +0,0 @@ -pub use jay_units::scale::*; diff --git a/src/screenshoter.rs b/src/screenshoter.rs index 5477f980..b381a94a 100644 --- a/src/screenshoter.rs +++ b/src/screenshoter.rs @@ -1,9 +1,9 @@ +use jay_units::scale::Scale; use { crate::{ allocator::{AllocatorError, BO_USE_RENDERING, BufferObject, BufferUsage}, format::XRGB8888, gfx_api::{AcquireSync, GfxError, ReleaseSync, needs_render_usage}, - scale::Scale, state::State, tree::Transform, }, diff --git a/src/sighand.rs b/src/sighand.rs deleted file mode 100644 index 47d33d33..00000000 --- a/src/sighand.rs +++ /dev/null @@ -1 +0,0 @@ -pub use jay_sighand::*; diff --git a/src/state.rs b/src/state.rs index cd8abb42..d46a4b16 100644 --- a/src/state.rs +++ b/src/state.rs @@ -12,12 +12,26 @@ pub use connectors::{ConnectorData, DrmDevData, OutputData}; pub use idle::IdleState; pub use xwayland::XWaylandState; +use jay_wheel::Wheel; +use jay_udmabuf::UdmabufHolder; +use jay_time::Time; +use std::time::SystemTime; +use jay_theme::Theme; +use jay_keyboard::{KeyboardStateIds, KbvmContext, KbvmMap, LedsListener}; +use jay_pr_caps::PrCapsThread; +use jay_logger::Logger; +use jay_io_uring::IoUring; +use jay_geometry::Rect; +use jay_eventfd_cache::EventfdCache; +use jay_cpu_worker::CpuWorker; +use jay_async_engine::{AsyncEngine, SpawnedFuture}; +use jay_units::scale::Scale; use { crate::{ acceptor::Acceptor, allocator::BufferObject, animation::{AnimationCurve, AnimationState, AnimationStyle}, - async_engine::{AsyncEngine, SpawnedFuture}, + backend::{ Backend, BackendConnectorStateSerials, BackendEvent, ConnectorId, ConnectorIds, DrmDeviceId, DrmDeviceIds, HardwareCursorUpdate, InputDevice, InputDeviceGroupIds, @@ -31,7 +45,7 @@ use { compositor::LIBEI_SOCKET, config::ConfigProxy, copy_device::CopyDeviceRegistry, - cpu_worker::CpuWorker, + criteria::{clm::ClMatcherManager, tlm::TlMatcherManager}, cursor::{Cursor, ServerCursors}, cursor_user::{CursorUserGroup, CursorUserGroupId, CursorUserGroupIds, CursorUserIds}, @@ -42,7 +56,7 @@ use { ei_acceptor::EiAcceptor, ei_client::{EiClient, EiClients}, }, - eventfd_cache::EventfdCache, + forker::ForkerProxy, gfx_api::{GfxApi, GfxContext}, globals::{Globals, GlobalsError, RemovableWaylandGlobal, WaylandGlobal}, @@ -75,23 +89,20 @@ use { zwlr_foreign_toplevel_manager_v1::ZwlrForeignToplevelManagerV1, zwp_linux_dmabuf_feedback_v1::ZwpLinuxDmabufFeedbackV1, }, - io_uring::IoUring, - kbvm::{KbvmContext, KbvmMap}, - keyboard::{KeyboardStateIds, LedsListener}, + leaks::Tracker, - logger::Logger, - pr_caps::PrCapsThread, - rect::Rect, - scale::Scale, + + + tagged_acceptor::TaggedAcceptors, - theme::Theme, - time::Time, + + tree::{ ContainerNode, DisplayNode, FloatNode, FoundNode, LatchListener, NodeIds, OutputNode, PlaceholderNode, TearingMode, ToplevelIdentifier, ToplevelNode, VrrMode, WorkspaceDisplayOrder, WorkspaceNode, WorkspaceNodeId, }, - udmabuf::UdmabufHolder, + utils::{ asyncevent::AsyncEvent, clonecell::CloneCell, @@ -109,7 +120,7 @@ use { }, video::{dmabuf::DmaBufIds, drm::wait_for_syncobj::WaitForSyncobj}, virtual_output::VirtualOutputs, - wheel::Wheel, + wire::{ ExtForeignToplevelListV1Id, JayHeadManagerSessionV1Id, JayRenderCtxId, JaySeatEventsId, JayWorkspaceWatcherId, ZwlrForeignToplevelManagerV1Id, ZwpLinuxDmabufFeedbackV1Id, @@ -123,7 +134,7 @@ use { ops::DerefMut, rc::{Rc, Weak}, sync::Arc, - time::SystemTime, + }, uapi::c, }; diff --git a/src/state/animations.rs b/src/state/animations.rs index 39e712bb..e049c174 100644 --- a/src/state/animations.rs +++ b/src/state/animations.rs @@ -1,3 +1,4 @@ +use jay_geometry::Rect; use { crate::{ animation::{ @@ -10,7 +11,7 @@ use { }, spawn_in_start_rect, }, - rect::Rect, + tree::NodeId, }, std::rc::Rc, diff --git a/src/state/connectors.rs b/src/state/connectors.rs index 930a2f2d..cc49ebe8 100644 --- a/src/state/connectors.rs +++ b/src/state/connectors.rs @@ -1,3 +1,4 @@ +use jay_geometry::Rect; use { crate::{ backend::{ @@ -13,7 +14,7 @@ use { wp_drm_lease_connector_v1::WpDrmLeaseConnectorV1, wp_drm_lease_device_v1::WpDrmLeaseDeviceV1Global, }, - rect::Rect, + tree::OutputNode, utils::{ asyncevent::AsyncEvent, bindings::Bindings, copyhashmap::CopyHashMap, @@ -31,7 +32,7 @@ use super::State; pub struct ConnectorData { pub id: ConnectorId, pub connector: Rc, - pub handler: Cell>>, + pub handler: Cell>>, pub connected: Cell, pub name: Rc, pub description: RefCell, @@ -55,7 +56,7 @@ pub struct OutputData { pub struct DrmDevData { pub dev: Rc, - pub handler: Cell>>, + pub handler: Cell>>, pub connectors: CopyHashMap>, pub syspath: Option, pub devnode: Option, diff --git a/src/state/render_context.rs b/src/state/render_context.rs index 043c9621..048aa8b0 100644 --- a/src/state/render_context.rs +++ b/src/state/render_context.rs @@ -1,10 +1,10 @@ +use jay_units::scale::Scale; use { crate::{ cursor::ServerCursors, drm_feedback::DrmFeedback, gfx_api::{GfxApi, GfxContext, GfxError}, gfx_apis::create_gfx_context, - scale::Scale, tree::{ ContainerNode, FloatNode, Node, NodeVisitorBase, OutputNode, PlaceholderNode, WorkspaceNode, diff --git a/src/state/rendering.rs b/src/state/rendering.rs index ca118d30..5d87ef7b 100644 --- a/src/state/rendering.rs +++ b/src/state/rendering.rs @@ -1,19 +1,20 @@ +use jay_theme::Color; +use jay_geometry::{Rect, Region}; +use jay_units::fixed::Fixed; +use jay_units::scale::Scale; use { crate::{ clientmem::ClientMemOffset, cmm::{cmm_description::ColorDescription, cmm_render_intent::RenderIntent}, - fixed::Fixed, format::Format, gfx_api::{ - AcquireSync, AlphaMode, BufferResv, FdSync, GfxBlendBuffer, GfxError, - GfxFramebuffer, GfxTexture, PendingShmTransfer, ReleaseSync, STAGING_DOWNLOAD, - SampleRect, + AcquireSync, AlphaMode, BufferResv, FdSync, GfxBlendBuffer, GfxError, GfxFramebuffer, + GfxTexture, PendingShmTransfer, ReleaseSync, STAGING_DOWNLOAD, SampleRect, }, ifs::zwlr_screencopy_frame_v1::ZwlrScreencopyFrameV1, - rect::{Rect, Region}, + renderer::Renderer, - scale::Scale, - theme::Color, + tree::{OutputNode, Transform}, }, std::rc::Rc, @@ -196,7 +197,6 @@ impl State { .map_err(ShmScreencopyError::ReadPixels)?; Ok(pending) } - } #[derive(Debug, Error)] diff --git a/src/state/settings.rs b/src/state/settings.rs index 736dafd1..817cae0a 100644 --- a/src/state/settings.rs +++ b/src/state/settings.rs @@ -1,9 +1,11 @@ +use jay_theme::{BarPosition, Color, ThemeColor, ThemeSized}; +use jay_logger::LogLevel; use { crate::{ config::ConfigProxy, ifs::wl_output::{BlendSpace, OutputId, PersistentOutputState}, - logger::LogLevel, - theme::{BarPosition, Color, ThemeColor, ThemeSized}, + + tree::{ContainerNode, FloatNode, Node, NodeVisitorBase, OutputNode, WorkspaceDisplayOrder}, }, std::{cell::Cell, rc::Rc, sync::Arc}, diff --git a/src/state/tree_ops.rs b/src/state/tree_ops.rs index 5e0ed85e..2c3872d5 100644 --- a/src/state/tree_ops.rs +++ b/src/state/tree_ops.rs @@ -1,7 +1,8 @@ +use jay_geometry::Rect; use { crate::{ ifs::wl_seat::WlSeatGlobal, - rect::Rect, + tree::{ ContainerNode, ContainerSplit, Direction, FindTreeUsecase, FloatNode, FoundNode, Node, OutputNode, TileState, ToplevelData, ToplevelNode, ToplevelNodeBase, WorkspaceNode, diff --git a/src/state/xwayland.rs b/src/state/xwayland.rs index 7b53f553..f28b6da4 100644 --- a/src/state/xwayland.rs +++ b/src/state/xwayland.rs @@ -1,6 +1,7 @@ +use jay_async_engine::SpawnedFuture; use { crate::{ - async_engine::SpawnedFuture, + client::Client, ifs::{ data_transfer::x_data_device::XTransferDeviceIds, diff --git a/src/tagged_acceptor.rs b/src/tagged_acceptor.rs index 9133f29a..1064ff59 100644 --- a/src/tagged_acceptor.rs +++ b/src/tagged_acceptor.rs @@ -1,6 +1,7 @@ +use jay_async_engine::SpawnedFuture; use { crate::{ - async_engine::SpawnedFuture, + client::ClientMetadata, state::State, utils::{ diff --git a/src/tasks/const_clock.rs b/src/tasks/const_clock.rs index 082b66ec..a8263228 100644 --- a/src/tasks/const_clock.rs +++ b/src/tasks/const_clock.rs @@ -1,6 +1,7 @@ +use jay_io_uring::IoUring; use { crate::{ - io_uring::IoUring, + utils::{ asyncevent::AsyncEvent, errorfmt::ErrorFmt, event_listener::EventSource, timer::TimerFd, }, diff --git a/src/text.rs b/src/text.rs index 3efd5c3d..39027b98 100644 --- a/src/text.rs +++ b/src/text.rs @@ -1,24 +1,26 @@ +use jay_udmabuf::UdmabufHolder; +use jay_theme::Color; +use jay_geometry::{Rect, Region}; +use jay_cpu_worker::{AsyncCpuWork, CpuJob, CpuWork, CpuWorker, PendingJob}; +use jay_pango::{ + CairoContext, CairoImageSurface, PangoCairoContext, PangoError, PangoFontDescription, + PangoLayout, cairo_size, + consts::{ + CAIRO_FORMAT_ARGB32, CAIRO_OPERATOR_SOURCE, CairoFormat, PANGO_ELLIPSIZE_END, PANGO_SCALE, + }, +}; use { crate::{ cmm::cmm_eotf::Eotf, - cpu_worker::{AsyncCpuWork, CpuJob, CpuWork, CpuWorker, PendingJob}, + format::{ARGB8888, Format}, gfx_api::{ AsyncShmGfxTexture, AsyncShmGfxTextureCallback, GfxBuffer, GfxContext, GfxError, GfxStagingBuffer, GfxTexture, PendingShmTransfer, STAGING_UPLOAD, }, - pango::{ - CairoContext, CairoImageSurface, PangoCairoContext, PangoError, PangoFontDescription, - PangoLayout, cairo_size, - consts::{ - CAIRO_FORMAT_ARGB32, CAIRO_OPERATOR_SOURCE, CairoFormat, PANGO_ELLIPSIZE_END, - PANGO_SCALE, - }, - }, - rect::{Rect, Region}, state::State, - theme::Color, - udmabuf::UdmabufHolder, + + utils::{ clonecell::CloneCell, double_buffered::DoubleBuffered, diff --git a/src/theme.rs b/src/theme.rs deleted file mode 100644 index 48b30b6b..00000000 --- a/src/theme.rs +++ /dev/null @@ -1 +0,0 @@ -pub use jay_theme::*; diff --git a/src/time.rs b/src/time.rs deleted file mode 100644 index 8ababab1..00000000 --- a/src/time.rs +++ /dev/null @@ -1 +0,0 @@ -pub use jay_time::*; diff --git a/src/tools/tool_client.rs b/src/tools/tool_client.rs index e0b72aaf..cf6d57a6 100644 --- a/src/tools/tool_client.rs +++ b/src/tools/tool_client.rs @@ -1,10 +1,14 @@ +use jay_wheel::{Wheel, WheelError}; +use jay_logger::{LogLevel, Logger}; +use jay_io_uring::{IoUring, IoUringError}; +use jay_async_engine::{AsyncEngine, SpawnedFuture}; use { crate::{ - async_engine::{AsyncEngine, SpawnedFuture}, + client::{EventFormatter, RequestParser}, compositor::WAYLAND_DISPLAY, - io_uring::{IoUring, IoUringError}, - logger::{LogLevel, Logger}, + + object::{ObjectId, WL_DISPLAY_ID}, utils::{ asyncevent::AsyncEvent, @@ -19,7 +23,7 @@ use { oserror::{OsError, OsErrorExt2}, xrd::xrd, }, - wheel::{Wheel, WheelError}, + wire::{ JayCompositor, JayCompositorId, JayDamageTracking, JayDamageTrackingId, JayToplevelId, JayWorkspaceId, WlCallbackId, WlRegistryId, WlSeatId, jay_compositor, diff --git a/src/tree.rs b/src/tree.rs index 0c93db69..75860c6a 100644 --- a/src/tree.rs +++ b/src/tree.rs @@ -1,8 +1,11 @@ +pub use jay_tree_types::*; +use jay_geometry::Rect; +use jay_keyboard::KeyboardState; +use jay_units::fixed::Fixed; use { crate::{ backend::{ButtonState, KeyState}, client::{Client, ClientId}, - fixed::Fixed, ifs::{ wl_seat::{ Dnd, NodeSeatState, WlSeatGlobal, @@ -18,14 +21,11 @@ use { zwlr_layer_surface_v1::ZwlrLayerSurfaceV1, }, }, - keyboard::KeyboardState, - rect::Rect, renderer::Renderer, utils::{linkedlist::NodeRef, numcell::NumCell}, }, std::{fmt::Display, rc::Rc}, }; -pub use jay_tree_types::*; pub use { container::*, containing::*, display::*, float::*, output::*, placeholder::*, stacked::*, toplevel::*, walker::*, workspace::*, diff --git a/src/tree/container.rs b/src/tree/container.rs index 85b1e065..6712ec01 100644 --- a/src/tree/container.rs +++ b/src/tree/container.rs @@ -5,19 +5,19 @@ mod tasks; pub use drag_destination::default_tile_drag_destination; pub use tasks::{container_layout, container_render_positions, container_tab_render_textures}; +use jay_geometry::Rect; +use jay_units::fixed::Fixed; use { - drag_destination::direction_to_split, crate::{ backend::ButtonState, cursor::KnownCursor, cursor_user::CursorUser, - fixed::Fixed, ifs::wl_seat::{ BTN_LEFT, NodeSeatState, SeatId, WlSeatGlobal, collect_kb_foci, collect_kb_foci2, tablet::{TabletTool, TabletToolChanges, TabletToolId}, wl_pointer::PendingScroll, }, - rect::Rect, + renderer::Renderer, state::State, tree::{ @@ -41,6 +41,7 @@ use { }, }, ahash::AHashMap, + drag_destination::direction_to_split, jay_config::Axis, smallvec::SmallVec, std::{ diff --git a/src/tree/container/drag_destination.rs b/src/tree/container/drag_destination.rs index 81b9f197..dca8135c 100644 --- a/src/tree/container/drag_destination.rs +++ b/src/tree/container/drag_destination.rs @@ -1,7 +1,8 @@ +use jay_geometry::Rect; use { super::ContainerSplit, crate::{ - rect::Rect, + tree::{Direction, NodeId, TddType, TileDragDestination, ToplevelNode}, }, std::{mem, rc::Rc}, diff --git a/src/tree/container/layout.rs b/src/tree/container/layout.rs index e04f2366..0ff32e07 100644 --- a/src/tree/container/layout.rs +++ b/src/tree/container/layout.rs @@ -1,6 +1,6 @@ use { super::{ContainerChild, ContainerNode, ContainerSplit}, - crate::rect::Rect, + jay_geometry::Rect, std::{ops::Sub, rc::Rc}, }; diff --git a/src/tree/container/tasks.rs b/src/tree/container/tasks.rs index 977e47f0..779a2238 100644 --- a/src/tree/container/tasks.rs +++ b/src/tree/container/tasks.rs @@ -1,6 +1,6 @@ +use jay_units::scale::Scale; use { crate::{ - scale::Scale, state::State, text::TextTexture, tree::tab_bar::TabBar, diff --git a/src/tree/display.rs b/src/tree/display.rs index 26b31a88..aa00c448 100644 --- a/src/tree/display.rs +++ b/src/tree/display.rs @@ -1,10 +1,11 @@ +use jay_geometry::Rect; +use jay_units::fixed::Fixed; use { crate::{ backend::ConnectorId, cursor::KnownCursor, - fixed::Fixed, ifs::wl_seat::{NodeSeatState, WlSeatGlobal, tablet::TabletTool}, - rect::Rect, + renderer::Renderer, state::State, tree::{ diff --git a/src/tree/float.rs b/src/tree/float.rs index a57c2b91..4b7705d8 100644 --- a/src/tree/float.rs +++ b/src/tree/float.rs @@ -1,14 +1,15 @@ +use jay_geometry::Rect; +use jay_units::fixed::Fixed; use { crate::{ backend::ButtonState, cursor::KnownCursor, cursor_user::CursorUser, - fixed::Fixed, ifs::wl_seat::{ BTN_LEFT, BTN_RIGHT, NodeSeatState, SeatId, WlSeatGlobal, tablet::{TabletTool, TabletToolChanges, TabletToolId}, }, - rect::Rect, + renderer::Renderer, state::State, tree::{ diff --git a/src/tree/output.rs b/src/tree/output.rs index 92f53502..48dd792c 100644 --- a/src/tree/output.rs +++ b/src/tree/output.rs @@ -12,6 +12,10 @@ pub use { render_data::{OutputRenderData, OutputStatus, OutputTitle, OutputWorkspaceRenderData}, }; +use jay_theme::BarPosition; +use jay_geometry::Rect; +use jay_units::fixed::Fixed; +use jay_units::scale::Scale; use { crate::{ backend::{ @@ -20,7 +24,6 @@ use { }, client::ClientId, cursor::KnownCursor, - fixed::Fixed, ifs::{ ext_image_copy::ext_image_copy_capture_session_v1::ExtImageCopyCaptureSessionV1, jay_output::JayOutput, @@ -49,12 +52,11 @@ use { zwlr_screencopy_frame_v1::ZwlrScreencopyFrameV1, }, output_schedule::OutputSchedule, - rect::Rect, + renderer::Renderer, - scale::Scale, state::State, text::TextTexture, - theme::BarPosition, + tree::{ Direction, FindTreeResult, FindTreeUsecase, FoundNode, Node, NodeId, NodeLayerLink, NodeLocation, PinnedNode, StackedNode, TddType, TileDragDestination, Transform, diff --git a/src/tree/output/policy.rs b/src/tree/output/policy.rs index 80118c48..341879c1 100644 --- a/src/tree/output/policy.rs +++ b/src/tree/output/policy.rs @@ -6,7 +6,7 @@ use { pub fn calculate_logical_size( mode: (i32, i32), transform: Transform, - scale: crate::scale::Scale, + scale: jay_units::scale::Scale, ) -> (i32, i32) { let (mut width, mut height) = transform.maybe_swap(mode); if scale != 1 { diff --git a/src/tree/output/render_data.rs b/src/tree/output/render_data.rs index 17da0c37..4077e31d 100644 --- a/src/tree/output/render_data.rs +++ b/src/tree/output/render_data.rs @@ -1,5 +1,6 @@ use { - crate::{gfx_api::GfxTexture, rect::Rect, text::TextTexture, tree::WorkspaceNode}, + crate::{gfx_api::GfxTexture, text::TextTexture, tree::WorkspaceNode}, + jay_geometry::Rect, std::rc::Rc, }; diff --git a/src/tree/placeholder.rs b/src/tree/placeholder.rs index 264cce3d..92351974 100644 --- a/src/tree/placeholder.rs +++ b/src/tree/placeholder.rs @@ -1,12 +1,13 @@ +use jay_geometry::Rect; +use jay_units::fixed::Fixed; +use jay_units::scale::Scale; use { crate::{ client::Client, cursor::KnownCursor, - fixed::Fixed, ifs::wl_seat::{NodeSeatState, WlSeatGlobal}, - rect::Rect, + renderer::Renderer, - scale::Scale, state::State, text::TextTexture, tree::{ diff --git a/src/tree/tab_bar.rs b/src/tree/tab_bar.rs index 4dd1f485..01ee95bd 100644 --- a/src/tree/tab_bar.rs +++ b/src/tree/tab_bar.rs @@ -1,5 +1,7 @@ +use jay_units::scale::Scale; +use jay_theme::Color; use { - crate::{scale::Scale, state::State, text::TextTexture, theme::Color, tree::NodeId}, + crate::{state::State, text::TextTexture, tree::NodeId}, std::{ cell::{Cell, RefCell}, rc::Rc, diff --git a/src/tree/toplevel.rs b/src/tree/toplevel.rs index a2bc36f0..9b42c0d5 100644 --- a/src/tree/toplevel.rs +++ b/src/tree/toplevel.rs @@ -1,3 +1,4 @@ +use jay_geometry::Rect; use { crate::{ animation::{ @@ -9,7 +10,6 @@ use { }, client::{Client, ClientId}, criteria::{ - CritDestroyListener, CritMatcherId, tlm::{ TL_CHANGED_APP_ID, TL_CHANGED_CONTENT_TY, TL_CHANGED_DESTROYED, TL_CHANGED_FLOATING, TL_CHANGED_FULLSCREEN, TL_CHANGED_NEW, TL_CHANGED_TITLE, @@ -32,7 +32,7 @@ use { zwlr_foreign_toplevel_handle_v1::ZwlrForeignToplevelHandleV1, zwlr_foreign_toplevel_manager_v1::ZwlrForeignToplevelManagerV1, }, - rect::Rect, + state::State, tree::{ ContainerNode, ContainerSplit, ContainingNode, Direction, FloatNode, Node, NodeId, @@ -49,6 +49,7 @@ use { }, }, jay_config::{window, window::WindowType}, + jay_criteria::{CritDestroyListener, CritMatcherId}, std::{ borrow::Borrow, cell::{Cell, OnceCell, RefCell}, diff --git a/src/tree/workspace.rs b/src/tree/workspace.rs index 5e31efe6..77ca575e 100644 --- a/src/tree/workspace.rs +++ b/src/tree/workspace.rs @@ -1,8 +1,9 @@ +use jay_geometry::Rect; +use jay_units::fixed::Fixed; use { crate::{ client::ClientId, cursor::KnownCursor, - fixed::Fixed, ifs::{ jay_workspace::JayWorkspace, wl_output::OutputId, @@ -15,7 +16,7 @@ use { ext_workspace_manager_v1::WorkspaceManagerId, }, }, - rect::Rect, + renderer::Renderer, state::State, text::TextTexture, diff --git a/src/udmabuf.rs b/src/udmabuf.rs deleted file mode 100644 index e588fd9b..00000000 --- a/src/udmabuf.rs +++ /dev/null @@ -1 +0,0 @@ -pub use jay_udmabuf::*; diff --git a/src/utils/clone3.rs b/src/utils/clone3.rs index 08397694..778a6285 100644 --- a/src/utils/clone3.rs +++ b/src/utils/clone3.rs @@ -1,7 +1,8 @@ +use jay_pr_caps::drop_all_pr_caps; use { crate::{ forker::ForkerError, - pr_caps::drop_all_pr_caps, + utils::{errorfmt::ErrorFmt, oserror::OsErrorExt2, process_name::set_process_name}, }, run_on_drop::on_drop, diff --git a/src/video/drm.rs b/src/video/drm.rs index ee39ad29..5fa8a25c 100644 --- a/src/video/drm.rs +++ b/src/video/drm.rs @@ -2,11 +2,12 @@ pub mod syncobj; mod sys; pub mod wait_for_syncobj; +use jay_io_uring::{IoUring, IoUringError}; use { crate::{ backend, format::Format, - io_uring::{IoUring, IoUringError}, + utils::{ buf::Buf, errorfmt::ErrorFmt, diff --git a/src/video/drm/wait_for_syncobj.rs b/src/video/drm/wait_for_syncobj.rs index f13ed366..900bc3bc 100644 --- a/src/video/drm/wait_for_syncobj.rs +++ b/src/video/drm/wait_for_syncobj.rs @@ -1,7 +1,9 @@ +use jay_io_uring::IoUring; +use jay_async_engine::{AsyncEngine, SpawnedFuture}; use { crate::{ - async_engine::{AsyncEngine, SpawnedFuture}, - io_uring::IoUring, + + utils::{ asyncevent::AsyncEvent, buf::Buf, clonecell::CloneCell, copyhashmap::CopyHashMap, hash_map_ext::HashMapExt, numcell::NumCell, oserror::OsErrorExt2, stack::Stack, diff --git a/src/virtual_output.rs b/src/virtual_output.rs index 7ffc81da..b9e1f937 100644 --- a/src/virtual_output.rs +++ b/src/virtual_output.rs @@ -1,7 +1,10 @@ +use std::time::Duration; +use jay_geometry::Region; +use jay_async_engine::{Phase, SpawnedFuture}; use { crate::{ allocator::{AllocatorError, BO_USE_RENDERING, BufferObject, BufferUsage}, - async_engine::{Phase, SpawnedFuture}, + backend::{ BackendConnectorState, Connector, ConnectorEvent, ConnectorId, ConnectorKernelId, DrmDeviceId, HardwareCursor, HardwareCursorUpdate, Mode, MonitorInfo, OutputId, @@ -23,7 +26,7 @@ use { KIND_HW_CLOCK, KIND_HW_COMPLETION, KIND_VSYNC, KIND_ZERO_COPY, }, }, - rect::Region, + state::State, tasks::handle_connector, tree::OutputNode, @@ -43,7 +46,7 @@ use { fmt::{Debug, Formatter}, mem, rc::Rc, - time::Duration, + }, thiserror::Error, uapi::c, diff --git a/src/vulkan_core.rs b/src/vulkan_core.rs index 108f0b51..f249da4a 100644 --- a/src/vulkan_core.rs +++ b/src/vulkan_core.rs @@ -1,5 +1,5 @@ use { - crate::{eventfd_cache::EventfdError, video::drm::DrmError}, + crate::video::drm::DrmError, ahash::{AHashMap, AHashSet}, ash::{ Entry, Instance, LoadingError, @@ -16,6 +16,7 @@ use { api_version_patch, api_version_variant, }, }, + jay_eventfd_cache::EventfdError, isnt::std_1::collections::IsntHashMapExt, log::Level, run_on_drop::on_drop, diff --git a/src/vulkan_core/device.rs b/src/vulkan_core/device.rs index 83a4c73f..664a50a8 100644 --- a/src/vulkan_core/device.rs +++ b/src/vulkan_core/device.rs @@ -1,6 +1,7 @@ +use jay_eventfd_cache::EventfdCache; use { crate::{ - eventfd_cache::EventfdCache, video::drm::syncobj::SyncobjCtx, + video::drm::syncobj::SyncobjCtx, vulkan_core::VulkanCoreInstance, }, ash::{ diff --git a/src/wheel.rs b/src/wheel.rs deleted file mode 100644 index eb67bf95..00000000 --- a/src/wheel.rs +++ /dev/null @@ -1 +0,0 @@ -pub use jay_wheel::*; diff --git a/src/wl_usr.rs b/src/wl_usr.rs index 06249a4a..398caf80 100644 --- a/src/wl_usr.rs +++ b/src/wl_usr.rs @@ -1,11 +1,14 @@ pub mod usr_ifs; pub mod usr_object; +use jay_wheel::Wheel; +use jay_io_uring::{IoUring, IoUringError}; +use jay_async_engine::{AsyncEngine, SpawnedFuture}; use { crate::{ - async_engine::{AsyncEngine, SpawnedFuture}, + client::{EventFormatter, MIN_SERVER_ID, RequestParser}, - io_uring::{IoUring, IoUringError}, + object::{Interface, ObjectId, Version, WL_DISPLAY_ID}, utils::{ asyncevent::AsyncEvent, @@ -21,7 +24,7 @@ use { oserror::{OsError, OsErrorExt2}, }, video::dmabuf::DmaBufIds, - wheel::Wheel, + wire::wl_display, wl_usr::{ usr_ifs::{ diff --git a/src/wl_usr/usr_ifs/usr_wp_viewport.rs b/src/wl_usr/usr_ifs/usr_wp_viewport.rs index b336b4a1..a018932d 100644 --- a/src/wl_usr/usr_ifs/usr_wp_viewport.rs +++ b/src/wl_usr/usr_ifs/usr_wp_viewport.rs @@ -1,6 +1,6 @@ +use jay_units::fixed::Fixed; use { crate::{ - fixed::Fixed, object::Version, wire::{WpViewportId, wp_viewport::*}, wl_usr::{UsrCon, usr_object::UsrObject}, diff --git a/src/xcon.rs b/src/xcon.rs index 764f25dc..394f7cb7 100644 --- a/src/xcon.rs +++ b/src/xcon.rs @@ -1,9 +1,10 @@ pub use jay_xcon::{ consts, xauthority, Formatter, Message, Parser, Request, SendEvent, XEvent, XconError, }; +use jay_async_engine::{Phase, SpawnedFuture}; use { crate::{ - async_engine::{Phase, SpawnedFuture}, + compositor::DISPLAY, state::State, utils::{ diff --git a/src/xwayland.rs b/src/xwayland.rs index 66dd1b60..0b39aa2a 100644 --- a/src/xwayland.rs +++ b/src/xwayland.rs @@ -1,6 +1,7 @@ mod xsocket; mod xwm; +use jay_io_uring::IoUringError; use { crate::{ client::{ClientError, ClientMetadata}, @@ -11,7 +12,7 @@ use { wl_seat::SeatId, wl_surface::x_surface::xwindow::{Xwindow, XwindowData}, }, - io_uring::IoUringError, + state::State, user_session::import_environment, utils::{ diff --git a/src/xwayland/xwm.rs b/src/xwayland/xwm.rs index cfd31f4b..4f3098b2 100644 --- a/src/xwayland/xwm.rs +++ b/src/xwayland/xwm.rs @@ -4,11 +4,13 @@ mod selection; mod properties; mod transfer; +use jay_geometry::Rect; +use jay_async_engine::SpawnedFuture; use selection::SelectionData; use { crate::{ - async_engine::SpawnedFuture, + client::Client, ifs::{ data_transfer::{ @@ -25,7 +27,7 @@ use { x_surface::xwindow::{Xwindow, XwindowData}, }, }, - rect::Rect, + state::State, tree::{Node, ToplevelNode}, utils::{ diff --git a/src/xwayland/xwm/transfer.rs b/src/xwayland/xwm/transfer.rs index c090b12c..d80e7749 100644 --- a/src/xwayland/xwm/transfer.rs +++ b/src/xwayland/xwm/transfer.rs @@ -1,7 +1,8 @@ +use jay_io_uring::{IoUring, IoUringError}; use { super::XwmShared, crate::{ - io_uring::{IoUring, IoUringError}, + state::State, utils::{buf::Buf, errorfmt::ErrorFmt, oserror::OsError}, wire_xcon::{ChangeProperty, SelectionNotify},