Expand description
Window layout driver for reovim.
Linux equivalent: window compositor mechanism in drivers/video/
§Architecture
This crate defines trait contracts for a Hyprland-inspired nested compositor window management system. Each layer is a self-contained mini-compositor with three zones (Tiled, Float, Overlay).
RootCompositor (manages layers)
│
├── Layer 1 ("main", z=100)
│ └── WindowLayerCompositor
│ ├── Tiled Zone (binary split tree)
│ ├── Float Zone (free positioning)
│ └── Overlay Zone (popups, menus)
│
└── Layer 2 ("term", z=200)
└── WindowLayerCompositor
└── ...§Mechanism vs Policy
- This crate (Mechanism): Defines WHAT can be done via traits
- server/modules/layout/ (Policy): Implements HOW things behave
Structs§
- Buffer
Id - Unique identifier for a buffer.
- ColIndex
- Column index within a line (0-indexed, counting chars).
- Composite
Result - Result of compositing all layers.
- Floating
Window - Floating window state.
- Layer
- A Layer is a self-contained mini-compositor.
- Layer
Config - Layer creation parameters.
- LayerId
- Unique identifier for a layer.
- Line
Index - Line index within a buffer (0-indexed).
- Overlay
Constraints - Constraints for overlay positioning.
- Overlay
Window - Overlay window state.
- Position
- Position in a buffer (line and column).
- Rect
- Rectangle with position and size.
- Size
- Size in screen units (width and height).
- View
- A View is a window’s perspective into a buffer.
- Window
Id - Unique window identifier.
- Window
Placement - Positioned window ready for rendering.
- ZOrder
- Z-order value for window stacking.
Enums§
- Anchor
- Anchor point for positioning overlays.
- Compositor
Key - Typed key for compositor lookup.
- Direction
- Navigation direction for focus movement.
- Split
Direction - Split direction for window layout.
- Window
Error - Error type for compositor operations.
- Zone
- Zone within a layer (each layer has three zones).
Constants§
- CLICK_
THROUGH_ THRESHOLD - Opacity threshold below which mouse clicks pass through to the layer below.
- MIN_
WINDOW_ HEIGHT - MIN_
WINDOW_ WIDTH - Minimum window dimensions in cells.
Traits§
- Floating
Layer - Floating layer manages freely-positioned windows.
- Overlay
Layer - Overlay layer manages pop-ups and temporary UI elements.
- Root
Compositor - Root compositor manages multiple layers.
- Tiled
Layer - Tiled layer manages vim-style split windows.
- View
Manager ViewManagerowns all per-window view state.- Window
Layer Compositor - Window layer compositor manages windows within a single layer.
Type Aliases§
- Compositor
Registry - Registry for compositors, keyed by purpose.
- Navigate
Direction - Type alias for backward compatibility.