Skip to content

Add Jiffshot, a screen capture tool and editor, in apps/jiffshot - #19

Closed
Marc-André Moreau (mamoreau-devolutions) wants to merge 1 commit into
masterfrom
claude/jiffshot-rust
Closed

Marc-André Moreau (mamoreau-devolutions) wants to merge 1 commit into
masterfrom
claude/jiffshot-rust

Conversation

@mamoreau-devolutions

Copy link
Copy Markdown
Contributor

Jiffshot is a screen capture tool and image/video editor for Windows, written entirely in Rust on Rustolonia's code-first API: no AXAML, no C# and no generated adapters. It runs as one program, jiffshot.exe. The tray icon and capture side run on their own thread; the editor and every other window run on Avalonia.

What's in it

  • Capture:
    • Modes: region, window, screen, scrolling, panoramic, freehand, multiple areas, fixed size, menus, Grab Text (Windows OCR) and Step Capture.
    • A frozen selection overlay, one window per monitor.
    • Delays, time-lapse, a daily schedule and presets.
    • The Capture window and the Capture Widget.
  • Recording:
    • An area, a window or a screen.
    • System sound, the microphone or both; the webcam; pointer effects; Screen Draw.
    • A toolbar under the area.
    • Pause and stop keys: Shift+F9/F10, falling back to Ctrl+Shift+ then Ctrl+Alt+ when another app holds them. Every window shows the keys actually in use.
  • Editor:
    • Annotation tools, effects, templates.
    • A capture library.
    • Video trimming and GIF export.

Layout

Path Contents
crates/jiffshot-capture/ Capture primitives, media (recording and playback), the library, settings
crates/jiffshot-doc/ Documents: annotation objects, rendering, undo, effects, file formats
crates/jiffshot-workflow/ The capture side: hotkeys, selection overlay logic, recording, capture panels
app/ jiffshot.exe: the editor's model (app.rs), view models (vm.rs), every window (ui/)

The editor canvas, the selection overlay and Screen Draw are Rustolonia pixel surfaces (#17). The tray icon is a Rustolonia ShellTray.

Building

Plain Cargo against the Rustolonia v12.1.2 release: the first build downloads its prebuilt host and checks it against the pinned checksums. The apps/jiffshot folder builds the same way outside this repository. Its .cargo/config.toml only re-enables host downloads, which the repository's root config turns off.

cd apps/jiffshot
cargo run --release -p jiffshot

The only change outside apps/jiffshot is one line in the root README's layout table.

Testing

  • cargo test --workspace --release in apps/jiffshot: 88 passed.
  • UI self-test (JIFFSHOT_UITEST=DIR with the doc crate's synthetic image):
    • Passes with the v12.1.2 release host.
    • Drives every tool through the canvas, the theme switch, effects, crop, image tools, templates, toolbar and layout switches, Image commands, dialogs, Preferences, toasts, the capture HUD and recording toolbar, the overlay in four modes, Screen Draw and the Capture window.
    • Writes screenshots of each window.
    • Its window detection is timing-sensitive: one run missed the first overlay session's three screenshots. The overlay values were still correct, and the next run captured them.
  • Live, in tray mode with scratch settings:
    • Tray icon and menu, menu commands and switches.
    • The capture hotkey with the live overlay.
    • Recordings started from the Capture window and from --record, stopped with the toolbar and with the fallback key.
    • Handing a file to the running instance, and --quit.
  • Not exercised: a real right-click on the tray icon (a simulated one through Windows 11's hidden-icons flyout started a capture instead; Avalonia's tray code, unchanged from the C# version, only captures on a left-button release); mouse clicks in menus, dialogs and the library; multi-monitor and mixed-DPI setups (the overlay demo covers two screens, one at 150%).

Known gaps

These need Rustolonia additions:

  • Menu access keys: AccessText isn't projected.
  • File drop position: dropped files land in the middle of the canvas.
  • Drag from the tray: dragging a capture out of the tray isn't possible.
  • Overlay timing: there's no "frame rendered" notification; the overlay waits about a frame instead.
  • Capture window title bar: its decoration theme can't be set.

🤖 Generated with Claude Code

Jiffshot is a screen capture tool and image/video editor for Windows,
written entirely in Rust on Rustolonia's code-first API: no AXAML, no C#
and no generated adapters. It runs as one program, jiffshot.exe: the tray
icon and capture side on their own thread, the editor and every other
window on Avalonia.

- Capture: region, window, screen, scrolling, panoramic, freehand,
  multiple areas, fixed size, menus, Grab Text (OCR) and Step Capture,
  from a frozen per-monitor selection overlay; delays, time-lapse,
  schedules and presets; the Capture window and Capture Widget.
- Recording: an area, window or screen with system sound and/or the
  microphone, the webcam, pointer effects and Screen Draw, with a toolbar
  under the area. The pause and stop keys fall back from Shift+F9/F10 when
  another app holds them, and every window shows the keys in use.
- Editor: annotation tools, effects, templates, a capture library, video
  trimming and GIF export.

Layout: crates/jiffshot-capture (capture primitives, media, library),
crates/jiffshot-doc (documents, rendering, file formats),
crates/jiffshot-workflow (the capture side) and app/ (the editor's model in
app.rs, view models in vm.rs, every window in ui/). The editor canvas, the
selection overlay and Screen Draw are Rustolonia pixel surfaces; the tray
icon is a Rustolonia ShellTray. JIFFSHOT_UITEST=DIR drives the UI and
writes screenshots of every window.

It builds with plain Cargo against the Rustolonia v12.1.2 release and its
prebuilt host, and the folder builds the same way outside this repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mamoreau-devolutions

Copy link
Copy Markdown
Contributor Author

closing PR because jiffshot will live in its own repo: https://github.com/Devolutions/jiffshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant