scrybe_widgets/lib.rs
1// Copyright 2026 Mathews Tom
2// Licensed under the Apache License, Version 2.0 (the "License");
3// you may not use this file except in compliance with the License.
4// You may obtain a copy of the License at
5// https://www.apache.org/licenses/LICENSE-2.0
6
7//! The native macOS surfaces a running recording is shown on.
8//!
9//! The floating panel, the global hotkey, and the arithmetic a
10//! status-bar indicator draws from. They exist as a crate of their own
11//! for a reason that is not organisational:
12//!
13//! - they were `mod` items private to the `scrybe` binary, which
14//! declares no `[lib]`, so no other crate could reach them at all;
15//! - and `scrybe-desktop/src-tauri` sets `unsafe_code = "forbid"`,
16//! which a local `#![allow]` cannot override. The panel is seven
17//! `msg_send!` blocks under exactly such an allow, legal only because
18//! the root workspace chose `deny`. So the `AppKit` code can never be
19//! inlined into the desktop host, whatever happens to the
20//! command-line binary's target list.
21//!
22//! Adding a `[lib]` to `scrybe-cli` was considered and rejected: it
23//! publishes to crates.io as `scrybe`, so every newly-`pub` module here
24//! would become a `SemVer` commitment on a package whose purpose is a
25//! command-line tool, and it would make one frontend depend on a
26//! sibling frontend, which nothing in this workspace does.
27//!
28//! Nothing here depends on the service layer. A widget is handed a
29//! [`ShellView`] and hands back a stop request; whichever frontend owns
30//! the recording is what turns one into the other.
31
32#[cfg(target_os = "macos")]
33pub mod floating_panel;
34pub mod hotkey;
35pub mod status;
36mod view;
37
38pub use view::{ShellState, ShellView};