From 44a2cff3b309f181848b535857b80e2e4e7891e1 Mon Sep 17 00:00:00 2001 From: "Anna (navi) Figueiredo Gomes" Date: Mon, 9 Oct 2023 22:05:05 +0100 Subject: ext-action-binder-v1: implement new protocol and add a new command to trigger actions. Signed-off-by: Anna (navi) Figueiredo Gomes --- protocols/ext-action-binder-v1.xml | 148 +++++++++++++++++++++++++++++++++++++ protocols/meson.build | 1 + 2 files changed, 149 insertions(+) create mode 100644 protocols/ext-action-binder-v1.xml (limited to 'protocols') diff --git a/protocols/ext-action-binder-v1.xml b/protocols/ext-action-binder-v1.xml new file mode 100644 index 00000000..a32c4638 --- /dev/null +++ b/protocols/ext-action-binder-v1.xml @@ -0,0 +1,148 @@ + + + + Copyright © 2015-2017 Quentin “Sardem FF7” Glidic, 2023 Anna "navi" Figueiredo Gomes + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that copyright notice and this permission + notice appear in supporting documentation, and that the name of + the copyright holders not be used in advertising or publicity + pertaining to distribution of the software without specific, + written prior permission. The copyright holders make no + representations about the suitability of this software for any + purpose. It is provided "as is" without express or implied + warranty. + + THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY + SPECIAL, 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 interface is designed to allow any application to bind + an action. + + An action is an arbitrary couple of a namespace and a name describing the + wanted behaviour. These two strings are not meant to be user-visible. + Some namespaces are well-known and shared by applications while each + application can have its own namespaces for internal actions. + It is possible to have the same action in several namespaces, e.g. to + allow application-specific bindings in addition to global actions. + + It is left to the compositor to determine which client will get events. + The choice can be based on policy, heuristic, user configuration, or any + other mechanism that may be relevant. + Here are some examples of dispatching choice: all applications, last + focused, user-defined preference order, latest fullscreened application. + + This interface is exposed as global + + + + + The client no longer wants to receive events for any action. + + + + + + + + + + + + + The client no longer wants to receive events for this binding. + + + + + + Sets the namespace:name of the binding. This a kind of action. + + + + + + + + This description may be used by the compositor to render a ui for bindings. + + + + + + + The trigger is a suggestion to the compositor, and the action should not rely + to being set to that specific trigger. + The client does not know which trigger was actually set, but when a binding is + bound, it recieves from the compositor a human readable string describing the trigger, + if any, so it could show it in a ui. + + + + + + + Bind an action to the object. this is a one-time request. + After calling bind, either the "bound" or "rejected" event is sent. + Subsequent calls to bind should be ignored. + If no action has been set for the binding, the error "invalid_action" is raised. + + + + + + + + + + After the compositor processes a bind request, if the action was + bound to this binding, it calls this event to notify the client of the result. + + + + + + + After the compositor processes a bind request, if the binding was + rejected, it calls this event to notify the client of the result. + This event may be sent after a binding was bound, should the compositor + want to remove the binding. + After this event, the binding is destroyed and can't be used anymore. + + + + + + Depending on the user configuration, an action can be either one-off or + sustained. The client must handle all the three event types and either make + sense of them or ignore them properly. + + + + + + + + + This event is sent when actions are triggered. + If a binding would trigger both triggered and started events, the + started event must be sent first. + + + + + diff --git a/protocols/meson.build b/protocols/meson.build index 81edb584..3143fd0f 100644 --- a/protocols/meson.build +++ b/protocols/meson.build @@ -14,6 +14,7 @@ protocols = [ wl_protocol_dir / 'unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml', wl_protocol_dir / 'staging/content-type/content-type-v1.xml', wl_protocol_dir / 'staging/cursor-shape/cursor-shape-v1.xml', + 'ext-action-binder-v1.xml', 'wlr-layer-shell-unstable-v1.xml', 'idle.xml', 'wlr-output-power-management-unstable-v1.xml', -- cgit v1.2.3