sss_capture_ui
sss_capture_ui is the library that powers the sss-select binary — and sss_cli’s interactive overlay. It’s a Cargo crate you can depend on directly if you want to embed a region selector, window picker, or annotation canvas into your own Rust GUI.
The crate is built on winit + egui + wgpu (Sergio’s forks adding wlr-layer-shell support on Wayland) and re-exports the underlying sss_capture types so consumers don’t need two dependencies.
At a glance
Selector/SelectorBuilder— main entry point. Spawn an overlay window, take a single selection, return anOutcome.UiConfig— toolbar layout, color palette, chrome colors, keybinds.ToolPalette/Tool/Shape/Style— annotation primitives.OcrPipeline— async pipeline trait you can plug your own OCR backend into.PostAction— whether the user hit “copy”, “save”, or chose a sub-action.
When to use it
- You’re building a screenshot app and want the same overlay as
sss. - You want the annotation canvas in your own UI without the capture stack.
- You want a custom OCR engine plugged into the same overlay.
The binary sss-select is a thin wrapper around Selector::new(...).run(). Read its source as the canonical “hello world.”
Next steps
- Getting started — minimal
Cargo.toml, smallest selector. - API — public surface, types, callback contracts.
- Integration — driving the overlay from another Rust GUI / Tauri / a daemon.
- Examples — real consumer code from the workspace.
pages
In this section
Getting started
Add sss_capture_ui to a Rust project and spawn a selector in under 20 lines.
API
Public surface of sss_capture_ui: Selector, UiConfig, ToolPalette, Outcome.
Integration
Driving the selector from another GUI, an async runtime, or a daemon.
Examples
Real consumer code from the workspace and beyond.