aboutsummaryrefslogtreecommitdiff
path: root/protocol/river-control-unstable-v1.xml
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-06-15 15:07:10 +0200
committerIsaac Freund <ifreund@ifreund.xyz>2020-06-16 18:27:40 +0200
commite7bf1940da80610ca415793b42694fe9bbaf0724 (patch)
tree7c71eb269498eb75acd95d5eecffbada3330ede9 /protocol/river-control-unstable-v1.xml
parent5d9eb6a40a3b7193462ef879e17ce47df54ff48b (diff)
downloadriver-e7bf1940da80610ca415793b42694fe9bbaf0724.tar.gz
river-e7bf1940da80610ca415793b42694fe9bbaf0724.tar.xz
river-control: send output on success, fix issues
Add an output arg to the success event on the callback. This allows for implementing commands that return values, which are planned. Replace the array of null terminated strings with a series of requests each adding a single string to the args array. This is more idiomatic wayland. Add a seat argument to the run_command request to allow for proper multi-seat support in the future. Add missing destructor request.
Diffstat (limited to 'protocol/river-control-unstable-v1.xml')
-rw-r--r--protocol/river-control-unstable-v1.xml45
1 files changed, 35 insertions, 10 deletions
diff --git a/protocol/river-control-unstable-v1.xml b/protocol/river-control-unstable-v1.xml
index d770d7d..838bba5 100644
--- a/protocol/river-control-unstable-v1.xml
+++ b/protocol/river-control-unstable-v1.xml
@@ -19,32 +19,57 @@
<interface name="zriver_control_v1" version="1">
<description summary="run compositor commands">
This interface allows clients to run compositor commands and receive a
- success/failure response with a failure message if needed.
+ success/failure response with output or a failure message respectively.
+
+ Each command is built up in a series of add_argument requests and
+ executed with a run_command request. The first argument is the command
+ to be run.
+
+ A complete list of commands should be made available in the man page of
+ the compositor.
</description>
+ <request name="destroy" type="destructor">
+ <description summary="destroy the river_control object">
+ This request indicates that the client will not use the
+ river_control object any more. Objects that have been created
+ through this instance are not affected.
+ </description>
+ </request>
+
+ <request name="add_argument">
+ <description summary="add an argument to the current command">
+ Arguments are stored by the server in the order they were sent until
+ the run_command request is made.
+ </description>
+ <arg name="argument" type="string" summary="the argument to add"/>
+ </request>
+
<request name="run_command">
- <description summary="run a compositor command">
- A complete list of commands will be found in the man page for the
- compositor.
+ <description summary="run the current command">
+ Execute the command built up using the add_argument request for the
+ given seat.
</description>
- <arg name="command" type="array" summary="the command to run as a series
- of null-terminated strings"/>
+ <arg name="seat" type="object" interface="wl_seat"/>
<arg name="callback" type="new_id" interface="zriver_command_callback_v1"
- summary="callback object to receive success/error events"/>
+ summary="callback object"/>
</request>
</interface>
<interface name="zriver_command_callback_v1" version="1">
<description summary="callback object">
This object is created by the run_command request. Exactly one of the
- success or failure events will be sent.
+ success or failure events will be sent. This object will be destroyed
+ by the compositor after one of the events is sent.
</description>
<event name="success">
<description summary="command successful">
- Send when the command has been successfully received and validated by
- the server and will be carried out.
+ Sent when the command has been successfully received and executed by
+ the compositor. Some commands may produce output, in which case the
+ output argument will be a non-empty string.
</description>
+ <arg name="output" type="string" summary="the output of the command"/>
</event>
<event name="failure">