Skip to content

Ariadne: (clipboard-set TEXT), (fullscreen ON), and fullscreen: true on image: and video: - #1064

Merged
transfix merged 1 commit into
masterfrom
feat/ariadne-clipboard-fullscreen
Nov 9, 2026
Merged

transfix merged 1 commit into
masterfrom
feat/ariadne-clipboard-fullscreen

Conversation

@transfix

@transfix transfix commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Two host verbs for nicotina, (clipboard-set TEXT) ("Copy link") and (fullscreen ON), plus fullscreen: true on image: and video: (a picture or video shown alone, filling the window). Builds on #1063 (merged): the fullscreen picture is a focusable item group.

(clipboard-set TEXT) returns #t or #f. It is bound only where the backend has a clipboard (Capabilities::clipboard), so (has? "clipboard-set") answers. The backends:

  • ImGui: cvc::gl::clipboard::set (SDL's, the platform's).
  • arigl-web: navigator.clipboard, within the click's user activation. The action runs a frame after the click, and the activation lasts well past that.
  • FTXUI: an OSC 52 escape, written after the drain that ran it. FtxuiBackend::take_clipboard() returns it headless. ari.html answers OSC 52 with navigator.clipboard.
  • tvision: TClipboard.

(fullscreen ON) / (fullscreen) makes the window cover the screen, or says whether it does. AriRuntime installs the window's handler: natively the VTK/SDL window (SetFullScreen, borderless at the desktop's mode); in a browser, requestFullscreen on the canvas. A terminal returns #f. Token ui.fullscreen.

fullscreen: true works on an image: (a click opens it, or Enter where Tab reaches it) and on a video: (a Full screen button). It shows the picture alone in place of the whole document, fitted to the view. The Backend API adds begin_fullscreen_view / end_fullscreen_view.

  • ImGui draws a borderless black window over the viewport and makes the OS window fullscreen too. FTXUI draws a layer over the whole terminal.
  • Esc, Exit full screen, or a click on the picture closes it. So does the window leaving fullscreen, which is how a browser's own Esc (never delivered to the page) is caught.
  • A video keeps its player and position. Its frames are decoded for the view's box while it shows: Player::set_frame_box, in cvcMedia's FFmpeg player and in the browser player.
  • <bind>.fullscreen reads 1 or 0, and writing it drives the view.
  • Token image.fullscreen (Capabilities::fullscreen_view). The view does not open on the tvision desktop, which owns its screen.

Docs: ARIADNE.md §5.13 (Fullscreen), §5.11, the new §10.7, and the §5.7 token table.

Tests:

  • ariadne_ftxui_test: AFullscreenPictureFillsTheTerminalUntilEsc, ClipboardSetIsAnOsc52Escape.
  • ariadne_media_test: MediaPlayer.AFullscreenVideoIsShownAloneAndComesBack (the button, the frame box, the state key, Esc, and the window leaving fullscreen).
  • New cvcgl_imgui_fullscreen: a tap opens the view, Esc closes it, and the window's handler is asked both ways.
  • Locally (Windows, FTXUI on) the Ariadne suites and all cvcgl_imgui_* tests pass, and the lean arigl wasm compiles. The browser fullscreen and clipboard paths have not been tried in a browser yet.

@transfix
transfix force-pushed the feat/ariadne-clipboard-fullscreen branch from e2163fa to 2508a35 Compare November 8, 2026 19:20
…on image: and video:

Two host verbs the core binds from the backend, for a "Copy link" and a full screen view:
- (clipboard-set TEXT) -> #t/#f, bound where Capabilities::clipboard, so
  (has? "clipboard-set") says whether there is a clipboard. ImGui: cvc::gl::clipboard::set
  (SDL's, the platform's, navigator.clipboard in arigl-web). FTXUI: an OSC 52 escape,
  written after the drain that ran it (FtxuiBackend::take_clipboard headless); ari.html
  answers it with navigator.clipboard. tvision: TClipboard.
- (fullscreen ON) / (fullscreen): the window covers the screen, or says whether it does.
  AriRuntime installs the window's: the VTK / SDL window natively, requestFullscreen on the
  canvas in a browser. #f in a terminal. Token ui.fullscreen.

fullscreen: true on an image: (a click, or Enter where Tab reaches it) or a video: (a Full
screen button) shows the picture alone in place of the whole document, fitted to the view:
Backend::begin/end_fullscreen_view. ImGui draws a borderless black window over the viewport
and makes the window fullscreen too; FTXUI a layer over the terminal. Esc, Exit full
screen, a click on the picture or the window leaving fullscreen (a browser's own Esc)
closes it. A video keeps its player, decoding for the view's box while it shows
(Player::set_frame_box, in cvcMedia's FFmpeg player and the browser's), and
<bind>.fullscreen reads and drives it. Token image.fullscreen.

ARIADNE.md §5.13 and §10.7; ariadne_ftxui_test (OSC 52, the terminal view),
ariadne_media_test (a video's view and its keys) and cvcgl_imgui_fullscreen check it.
@transfix
transfix force-pushed the feat/ariadne-clipboard-fullscreen branch from 2508a35 to ec7d219 Compare November 8, 2026 23:55
@transfix
transfix enabled auto-merge (squash) November 8, 2026 23:56
@transfix
transfix merged commit 62ab507 into master Nov 9, 2026
16 of 30 checks passed
@transfix
transfix deleted the feat/ariadne-clipboard-fullscreen branch November 9, 2026 01:14
transfix added a commit that referenced this pull request Nov 9, 2026
Two conflicts, both from master's backend verbs (#1064):

- ariadne.cpp: (clipboard-set TEXT) and (fullscreen ON) call the
  backend, whose window and clipboard are the host thread's. Stage 1b
  builds a program's env in finish_context and the name probe by the
  group's kind, so the verbs go through install_backend_verbs:
  host_proxied in an `any` group (each call runs on the pump_all
  caller's thread, as install_providers binds a host_proxied
  provider), as they are elsewhere. has? sees them in either.
- AriRuntime.cpp: the scene prefix's thread-affine declaration and
  the fullscreen handler, both kept.

AriadneIsolatedDocs.TheBackendsVerbsRunOnTheFramesThread checks it
(the program runs on workers, every backend call on the frame's
thread, has? true), is required in the sanitizer jobs, and the
threading doc's provider table lists the verbs. The headless scene
world master added steps in drain_end, after the pump, and subscribes
to nothing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant