Skip to main content

Module screen_picker

Module screen_picker 

Source
Expand description

<ScreenPicker /> โ€” screen / window source picker for the Recorder surface (M-SCK.4 / AUT-271 + M-SCK.0.1 / AUT-291).

Mirror of crate::system_audio_picker for the visual capture path. Master Start/Stop toggle drives the SCK screen-capture session; the expandable dropdown shows attached displays + visible windows. As of M-SCK.0.1 (M-RECORD-EXPORT), clicking a non- primary row swaps the active SCStream to that source โ€” picker state is the authoritative selection and persists across launches via LocalStorage.

Window IDs are NOT stable across launches (Apple's `CGWindowID`
is per-session). The picker reads `screen.screen_capture.last_source_id`
on mount; if the persisted id doesn't match any current display
or window (`list_screen_displays` + `list_screen_windows`), the
picker silently falls back to `PrimaryDisplay`. Documented gotcha
class in M-SCK.1 (AUT-268).

Structsยง

ScreenPickerBodyProps ๐Ÿ”’
Props for the ScreenPickerBody component.
ScreenPickerProps
Props for the ScreenPicker component.

Functionsยง

ScreenPicker
<ScreenPicker /> โ€” master toggle + expandable display/window list
ScreenPickerBody ๐Ÿ”’
Required Props
make_on_pick ๐Ÿ”’
Closure factory for per-row click. Persists the new source and, if a session is live, tears down + restarts on the new source.
make_on_toggle_enabled ๐Ÿ”’
Closure factory for the master toggle. Extracted so ScreenPicker stays under the clippy::too_many_lines cap.
make_on_toggle_expand ๐Ÿ”’
Closure factory for the expand-dropdown button.
read_last_used ๐Ÿ”’
write_last_used ๐Ÿ”’