From d08032d6850d28063c0715aa54b1c18e0d0b966d Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Thu, 15 Apr 2021 00:28:39 +0200 Subject: river-options: rework, bump to v2 Options are now all global but may be overridden per-output. If an output local value is requested but none has been set, the global value is provided instead. This makes for much better ergonomics when configuring layout related options in particular. --- protocol/river-options-unstable-v1.xml | 162 ------------------------- protocol/river-options-v2.xml | 209 +++++++++++++++++++++++++++++++++ 2 files changed, 209 insertions(+), 162 deletions(-) delete mode 100644 protocol/river-options-unstable-v1.xml create mode 100644 protocol/river-options-v2.xml (limited to 'protocol') diff --git a/protocol/river-options-unstable-v1.xml b/protocol/river-options-unstable-v1.xml deleted file mode 100644 index 9e393ba..0000000 --- a/protocol/river-options-unstable-v1.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - Copyright 2020 The River Developers - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - - - - This protocol allows clients to access a typed key-value store of - options. These options are identified by string keys and are scoped - either globally or per-output. This protocol does not define any - semantic meaning of the options, that is left up to compositors. - - Compositors are free to set options themselves at any time, though - the type of any given option is immutable once set. - - Options may never be unset once set. - - - - - This request indicates that the client will not use the manager object - any more. Objects that have been created through this instance are - not affected. - - - - - - If the output argument is non-null, the option is local to the given - output. Otherwise it is considered global. - - - - - - - - - - On binding this object, one of the events will immediately be sent by - the server to inform the client of the current state of the option. New - events will be sent as the state changes. - - - - - This request indicates that the client will not use the - zriver_option_handle_v1 any more and that it may be safely destroyed. - - - - - - The option with this key has never been set, so the first set_*_value - request received from any client will determine its type. - - This can only ever be sent as the first event after binding this - interface as options cannot be unset once set. - - - - - - This indicates to the client that the option is of type int as well - as the current value of the option. Once set the type of the option - can never change. - - - - - - - This indicates to the client that the option is of type uint as well - as the current value of the option. Once set the type of the option - can never change. - - - - - - - This indicates to the client that the option is of type fixed as - well as the current value of the option. Once set the type of the option - can never change. - - - - - - - This indicates to the client that the option is of type string as - well as the current value of the option. Once set the type of the option - can never change. - - - - - - - If the option is either unset or set to a value of type int, this - request asks the compositor to set the value of the option as well - as the type if previously unset. The compositor is not required to - honor this request. - - If the option is already set and is not of type int, this request does nothing. - - - - - - - If the option is either unset or set to a value of type uint, this - request asks the compositor to set the value of the option as well - as the type if previously unset. The compositor is not required to - honor this request. - - If the option is already set and is not of type uint, this request - does nothing. - - - - - - - If the option is either unset or set to a value of type fixed, this - request asks the compositor to set the value of the option as well - as the type if previously unset. The compositor is not required to - honor this request. - - If the option is already set and is not of type fixed, this request - does nothing. - - - - - - - If the option is either unset or set to a value of type string, - this request asks the compositor to set the value of the option as - well as the type if previously unset. The compositor is not required - to honor this request. - - If the option is already set and is not of type string, this request - does nothing. - - - - - diff --git a/protocol/river-options-v2.xml b/protocol/river-options-v2.xml new file mode 100644 index 0000000..cb9f1d0 --- /dev/null +++ b/protocol/river-options-v2.xml @@ -0,0 +1,209 @@ + + + + Copyright 2020-2021 The River Developers + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + + + This protocol allows clients to access a typed key-value store of + options. These options are global but may be overridden using a handle + scoped to a wl_output. If no output scoped value has been set, then the + global value is provided to this handle. + + This protocol does not define any semantic meaning of the options, + that is left up to compositors. + + Compositors are free to set or declare options themselves at any time, + though the type of any given option is immutable once set. + + Options are never removed once declared. + + Warning! The protocol described in this file is currently in the + testing phase. Backward compatible changes may be added together with + the corresponding interface version bump. Backward incompatible changes + can only be done by creating a new major version of the extension. + + + + + This interface allows clients to declare new options and create + river_option_v2 handle objects in order to retrieve the current + value or set a new one. + + + + + This request indicates that the client will not use the manager object + any more. Objects that have been created through this instance are + not affected. + + + + + + The option is created in the global scope and is initialized with the + provided value. This request is ignored if the option already exists. + + + + + + + + The option is created in the global scope and is initialized with the + provided value. This request is ignored if the option already exists. + + + + + + + + The option is created in the global scope and is initialized with the + provided value. This request is ignored if the option already exists. + + + + + + + + The option is created in the global scope and is initialized with the + provided value. This request is ignored if the option already exists. + + + + + + + + If the output argument is non-null, the option is local to the given + output. Otherwise it is considered global. + + + + + + + + + This causes the value of the option for the given output to fall + back to the global value. + + + + + + + + + On binding this object, one of the events will immediately be sent by + the server to inform the client of the current state of the option, + including its type. Making one of the 4 set requests before receiving + this first event would be a bug as the client would not yet know the + type of the option. New events will be sent as the state changes. + + + + + This request indicates that the client will not use the + river_option_handle_v2 any more and that it may be safely destroyed. + + + + + + + + + + + No option with the the given name has ever been declared. All requests + on this object aside from the destroy request are a protocol error and + no further events will be sent. + + + + + + This indicates to the client that the option is of type int as well + as the current value of the option. Once set the type of the option + can never change. + + + + + + + This indicates to the client that the option is of type uint as well + as the current value of the option. Once set the type of the option + can never change. + + + + + + + This indicates to the client that the option is of type string as well + as the current value of the option. Once set the type of the option + can never change. + + + + + + + This indicates to the client that the option is of type fixed as well + as the current value of the option. Once set the type of the option + can never change. + + + + + + + If the option is of type int, set the value of the option. + Otherwise, this request is a protocol error. + + + + + + + If the option is of type uint, set the value of the option. + Otherwise, this request is a protocol error. + + + + + + + If the option is of type string, set the value of the option. + Otherwise, this request is a protocol error. + + + + + + + If the option is of type fixed, set the value of the option. + Otherwise, this request is a protocol error. + + + + + -- cgit v1.2.3