aboutsummaryrefslogtreecommitdiff
path: root/protocol/wlr-screencopy-unstable-v1.xml
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-06-19 19:07:29 +0100
committeremersion <contact@emersion.fr>2018-06-30 22:17:59 +0100
commit73755ad348657fdf8d9e0f9a48ee13a2ab947e35 (patch)
tree92eea1b7076e38a38792b7ff222bd9a51975c823 /protocol/wlr-screencopy-unstable-v1.xml
parent02dfa9101ec7fd8328ed329d2f2faa815b1ad61c (diff)
screencopy-v1: add basic implementation
Diffstat (limited to 'protocol/wlr-screencopy-unstable-v1.xml')
-rw-r--r--protocol/wlr-screencopy-unstable-v1.xml122
1 files changed, 122 insertions, 0 deletions
diff --git a/protocol/wlr-screencopy-unstable-v1.xml b/protocol/wlr-screencopy-unstable-v1.xml
new file mode 100644
index 00000000..6bd5a75f
--- /dev/null
+++ b/protocol/wlr-screencopy-unstable-v1.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<protocol name="wlr_screencopy_unstable_v1">
+ <copyright>
+ Copyright © 2018 Simon Ser
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice (including the next
+ paragraph) shall be included in all copies or substantial portions of the
+ Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+ </copyright>
+
+ <description summary="screen content capturing on client buffers">
+ This protocol allows clients to ask the compositor to copy part of the
+ screen content to a client buffer.
+ </description>
+
+ <interface name="zwlr_screencopy_manager_v1" version="1">
+ <description summary="manager to inform clients and begin capturing">
+ This object is a manager which offers requests to start capturing from a
+ source.
+ </description>
+
+ <request name="capture_output">
+ <description summary="start capturing">
+ Request to start capturing from the given output.
+ </description>
+ <arg name="frame" type="new_id" interface="zwlr_screencopy_frame_v1"/>
+ <arg name="output" type="object" interface="wl_output"/>
+ </request>
+
+ <request name="destroy" type="destructor">
+ <description summary="destroy the manager">
+ All objects created by the manager will still remain valid, until their
+ appropriate destroy request has been called.
+ </description>
+ </request>
+ </interface>
+
+ <interface name="zwlr_screencopy_frame_v1" version="1">
+ <description summary="a frame ready for copy">
+ This object represents a frame which is ready to have its resources
+ fetched and used.
+ </description>
+
+ <enum name="flags" bitfield="true">
+ <entry name="y_invert" value="1" summary="contents are y-inverted"/>
+ </enum>
+
+ <event name="buffer">
+ <description summary="buffer information">
+ Provides information about the frame's buffer. This event is sent once
+ as soon as the frame is created.
+
+ The client should then create a buffer with the provided width and
+ height, and send a copy request. It can optionally create a buffer with
+ the preferred format and stride.
+ </description>
+ <arg name="width" type="uint" summary="buffer width"/>
+ <arg name="height" type="uint" summary="buffer height"/>
+ <arg name="flags" type="uint" enum="flags" summary="buffer flags"/>
+ <arg name="format" type="uint" summary="preferred DRM_FORMAT"/>
+ <arg name="stride" type="uint" summary="preferred stride"/>
+ </event>
+
+ <request name="copy">
+ <description summary="copy the frame">
+ Copy the frame to the supplied buffer. The buffer must have a the
+ correct size, see zwlr_screencopy_frame_v1.buffer. The buffer needs to
+ have a supported format.
+
+ If the frame is successfully copied, a ready event is sent. Otherwise,
+ an abort event is sent.
+ </description>
+ <arg name="buffer" type="object" interface="wl_buffer"/>
+ </request>
+
+ <enum name="error">
+ <entry name="already_used" value="0"
+ summary="the object has already been used to copy a wl_buffer"/>
+ <entry name="invalid_format" value="1" summary="format not supported"/>
+ <entry name="invalid_dimensions" value="2"
+ summary="invalid width or height"/>
+ </enum>
+
+ <event name="ready">
+ <description summary="indicates frame is available for reading">
+ Called as soon as the frame is copied, indicating it is available
+ for reading.
+
+ Upon receiving this event, the client should destroy the object.
+ </description>
+ </event>
+
+ <event name="failed">
+ <description summary="frame copy failed">
+ This event indicates that the attempted frame copy has failed.
+
+ Upon receiving this event, the client should destroy the object.
+ </description>
+ </event>
+
+ <request name="destroy" type="destructor">
+ <description summary="delete this object, used or not">
+ Destroys the frame.
+ </description>
+ </request>
+ </interface>
+</protocol>