Files
feresaria/protocols/ferese-window-capture-v1.xml
T
Samuel Onoja ab11269246 Add workspace screen sharing (#64)
Add workspace selection to the screen-sharing picker with pinned capture, privacy filtering and bounded capture resources. Refresh captured tab labels when title or app-ID metadata changes.
2026-10-25 13:59:34 +01:00

96 lines
5.1 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<protocol name="ferese_window_capture_v1">
<description summary="private native portal window capture">
Captures only a managed toplevel's surface tree, independently of its
workspace, occlusion, animations and output transform. The compositor
advertises this interface only to its native portal executable. Capture
requires session opt-in and fails while locked. Window IDs are compositor
lifetime IDs and never resolve to replacement windows.
</description>
<interface name="ferese_window_capture_manager_v1" version="3">
<request name="destroy" type="destructor"/>
<request name="capture_window">
<description summary="snapshot a managed window">
The two unsigned words encode a 64-bit window ID (high word first).
A version 1 wlr screencopy frame announces a bounded SHM ARGB8888
snapshot. It fails if the target has closed, capture is unavailable,
or the outstanding snapshot budget is exhausted. Resize after the
buffer announcement does not change this frame's dimensions.
Overlay cursor is zero for hidden and one for embedded.
</description>
<arg name="window_hi" type="uint"/>
<arg name="window_lo" type="uint"/>
<arg name="overlay_cursor" type="uint"/>
<arg name="frame" type="new_id" interface="zwlr_screencopy_frame_v1"/>
</request>
<event name="busy">
<description summary="temporary capture resource contention">
Sent before this frame's failed event if the bounded snapshot pool is
occupied. Retry a later frame; this does not revoke the window source.
</description>
<arg name="frame" type="object" interface="zwlr_screencopy_frame_v1"/>
</event>
<event name="geometry">
<description summary="logical dimensions of the announced snapshot">
Sent before the frame's buffer event. These dimensions describe this
captured frame, even if the window resizes before it is copied.
</description>
<arg name="frame" type="object" interface="zwlr_screencopy_frame_v1"/>
<arg name="width" type="uint"/>
<arg name="height" type="uint"/>
</event>
<request name="create_source" since="2">
<description summary="create a persistent window capture source">
Creates a source for ext-image-copy-capture-v1. Unlike a snapshot,
a session waits for content damage and negotiates reusable buffers.
Invalid, closed or protected windows produce a stopped session.
</description>
<arg name="window_hi" type="uint"/>
<arg name="window_lo" type="uint"/>
<arg name="source" type="new_id" interface="ext_image_capture_source_v1"/>
</request>
<request name="refresh_source" since="2">
<description summary="request an initial image after a consumer resumes">
Invalidates the last delivered image for this source's sessions, so
a resumed PipeWire consumer receives an initial image even when the
source is unchanged. Outstanding buffers keep their ownership and GPU
synchronization; this request never cancels a capture in flight.
Subsequent frames continue to wait for source damage.
</description>
<arg name="source" type="object" interface="ext_image_capture_source_v1"/>
</request>
<event name="source_geometry" since="2">
<description summary="logical dimensions of the capture source">
The current logical window size, sent when the source is created.
Subsequent pixel-size changes are announced by the capture session.
</description>
<arg name="source" type="object" interface="ext_image_capture_source_v1"/>
<arg name="width" type="uint"/>
<arg name="height" type="uint"/>
</event>
<request name="create_workspace_source" since="3">
<description summary="capture a workspace independently of the active desktop">
The ID is a compositor-lifetime workspace ID, not its mutable index.
Captures the workspace viewport, including its windows and wallpaper,
excluding desktop layers, overview and protected content. The source is
pinned to its initial output configuration. Removing the workspace or
changing that configuration stops the session. No workspace is activated
and no client is resized by this request. Uses ext-image-copy-capture-v1.
</description>
<arg name="workspace_hi" type="uint"/>
<arg name="workspace_lo" type="uint"/>
<arg name="source" type="new_id" interface="ext_image_capture_source_v1"/>
</request>
<request name="set_source_active" since="3">
<description summary="suspend capture work while a consumer is paused">
Active is zero for paused and one for active. Outstanding frames retain
their buffer ownership. Pausing stops workspace composition and hidden
application callbacks; resuming is followed by refresh_source so an
initial image is delivered. This does not change desktop visibility.
</description>
<arg name="source" type="object" interface="ext_image_capture_source_v1"/>
<arg name="active" type="uint"/>
</request>
</interface>
</protocol>