Skip to main content

Crate reovim_driver_layout

Crate reovim_driver_layout 

Source
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§

BufferId
Unique identifier for a buffer.
ColIndex
Column index within a line (0-indexed, counting chars).
CompositeResult
Result of compositing all layers.
FloatingWindow
Floating window state.
Layer
A Layer is a self-contained mini-compositor.
LayerConfig
Layer creation parameters.
LayerId
Unique identifier for a layer.
LineIndex
Line index within a buffer (0-indexed).
OverlayConstraints
Constraints for overlay positioning.
OverlayWindow
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.
WindowId
Unique window identifier.
WindowPlacement
Positioned window ready for rendering.
ZOrder
Z-order value for window stacking.

Enums§

Anchor
Anchor point for positioning overlays.
CompositorKey
Typed key for compositor lookup.
Direction
Navigation direction for focus movement.
SplitDirection
Split direction for window layout.
WindowError
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§

FloatingLayer
Floating layer manages freely-positioned windows.
OverlayLayer
Overlay layer manages pop-ups and temporary UI elements.
RootCompositor
Root compositor manages multiple layers.
TiledLayer
Tiled layer manages vim-style split windows.
ViewManager
ViewManager owns all per-window view state.
WindowLayerCompositor
Window layer compositor manages windows within a single layer.

Type Aliases§

CompositorRegistry
Registry for compositors, keyed by purpose.
NavigateDirection
Type alias for backward compatibility.