wayland-protocols-0.29.5/.cargo_vcs_info.json0000644000000001570000000000100146150ustar { "git": { "sha1": "8f4127a21d65cf10189ff0e3b78983e9686dd288" }, "path_in_vcs": "wayland-protocols" }wayland-protocols-0.29.5/Cargo.toml0000644000000026320000000000100126130ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2018" name = "wayland-protocols" version = "0.29.5" authors = ["Victor Berger "] build = "build.rs" description = "Generated API for the officials wayland protocol extensions" documentation = "https://smithay.github.io/wayland-rs/wayland_protocols/" readme = "README.md" keywords = [ "wayland", "client", "server", "protocol", "extension", ] categories = [ "gui", "api-bindings", ] license = "MIT" repository = "https://github.com/smithay/wayland-rs" [package.metadata.docs.rs] all-features = true [dependencies.bitflags] version = "1.0" [dependencies.wayland-client] version = "0.29.5" optional = true [dependencies.wayland-commons] version = "0.29.5" [dependencies.wayland-server] version = "0.29.5" optional = true [build-dependencies.wayland-scanner] version = "0.29.5" [features] client = ["wayland-client"] server = ["wayland-server"] staging_protocols = [] unstable_protocols = [] wayland-protocols-0.29.5/Cargo.toml.orig000064400000000000000000000017711046102023000162770ustar 00000000000000[package] name = "wayland-protocols" version = "0.29.5" documentation = "https://smithay.github.io/wayland-rs/wayland_protocols/" repository = "https://github.com/smithay/wayland-rs" authors = ["Victor Berger "] license = "MIT" keywords = ["wayland", "client", "server", "protocol", "extension"] description = "Generated API for the officials wayland protocol extensions" build = "build.rs" categories = ["gui", "api-bindings"] edition = "2018" readme = "README.md" [dependencies] wayland-commons = { version = "0.29.5", path = "../wayland-commons" } wayland-client = { version = "0.29.5", path = "../wayland-client", optional = true } wayland-server = { version = "0.29.5", path = "../wayland-server", optional = true } bitflags = "1.0" [build-dependencies] wayland-scanner = { version = "0.29.5", path = "../wayland-scanner" } [features] client = ["wayland-client"] server = ["wayland-server"] staging_protocols = [] unstable_protocols = [] [package.metadata.docs.rs] all-features = true wayland-protocols-0.29.5/LICENSE.txt000064400000000000000000000020401046102023000152210ustar 00000000000000Copyright (c) 2015 Victor Berger 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 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.wayland-protocols-0.29.5/README.md000064400000000000000000000032601046102023000146620ustar 00000000000000[![crates.io](https://img.shields.io/crates/v/wayland-protocols.svg)](https://crates.io/crates/wayland-protocols) [![docs.rs](https://docs.rs/wayland-protocols/badge.svg)](https://docs.rs/wayland-protocols) [![Continuous Integration](https://github.com/Smithay/wayland-rs/workflows/Continuous%20Integration/badge.svg)](https://github.com/Smithay/wayland-rs/actions?query=workflow%3A%22Continuous+Integration%22) [![codecov](https://codecov.io/gh/Smithay/wayland-rs/branch/master/graph/badge.svg)](https://codecov.io/gh/Smithay/wayland-rs) # wayland-protocols This crate provides Wayland object definitions for many of the Wayland protocol extensions available. It is meant to be used in addition to `wayland-client` or `wayland-server`. This crate provides bindings for the following protocols extensions: - The standard ["wayland-protocols"](https://gitlab.freedesktop.org/wayland/wayland-protocols) extensions - The ["wlr-protocols"](https://github.com/swaywm/wlr-protocols) extensions from wlroots - A few other misc protocols: - `gtk_primary_selection` The provided objects are controlled by cargo features: - the `client` and `server` cargo features respectively enable the generation of client-side and server-side objects - the `staging_protocols` enable the generation of protocols in the staging process and will soon become stable. - the `unstable_protocols` enable the generation of not-yet-stabilized protocols If you wish for other protocols to be integrated, please open an issue on Github. Only protocols that are meant to be stabilized and largely used are in scope of this crate. If you wish to generate bindings for your own internal protocol, you can directly use `wayland-scanner`.wayland-protocols-0.29.5/build.rs000064400000000000000000000144371046102023000150600ustar 00000000000000extern crate wayland_scanner; use std::env::var; use std::path::Path; use wayland_scanner::*; #[rustfmt::skip] type StableProtocol<'a> = (&'a str, &'a [(&'a str, &'a str)]); type VersionedProtocol<'a> = (&'a str, &'a [(&'a str, &'a [(&'a str, &'a str)])]); // ^ ^ ^ ^ ^ ^ // | | | | | | // Name | | | | Name of event to specify as // Versions | | | destructor // Version | | // | Interface the event is belongs to // | // Events to specify as destructors static STABLE_PROTOCOLS: &[StableProtocol] = &[("presentation-time", &[]), ("viewporter", &[]), ("xdg-shell", &[])]; static STAGING_PROTOCOLS: &[VersionedProtocol] = &[("xdg-activation", &[("v1", &[])])]; static UNSTABLE_PROTOCOLS: &[VersionedProtocol] = &[ ("fullscreen-shell", &[("v1", &[])]), ("idle-inhibit", &[("v1", &[])]), ("input-method", &[("v1", &[])]), ("input-timestamps", &[("v1", &[])]), ("keyboard-shortcuts-inhibit", &[("v1", &[])]), ("linux-dmabuf", &[("v1", &[])]), ( "linux-explicit-synchronization", &[( "v1", &[ ("zwp_linux_buffer_release_v1", "fenced_release"), ("zwp_linux_buffer_release_v1", "immediate_release"), ], )], ), ("pointer-constraints", &[("v1", &[])]), ("pointer-gestures", &[("v1", &[])]), ("primary-selection", &[("v1", &[])]), ("relative-pointer", &[("v1", &[])]), ("tablet", &[("v1", &[]), ("v2", &[])]), ("text-input", &[("v1", &[]), ("v3", &[])]), ("xdg-decoration", &[("v1", &[])]), ("xdg-foreign", &[("v1", &[]), ("v2", &[])]), ("xdg-output", &[("v1", &[])]), ("xdg-shell", &[("v5", &[]), ("v6", &[])]), ("xwayland-keyboard-grab", &[("v1", &[])]), ]; static WLR_UNSTABLE_PROTOCOLS: &[VersionedProtocol] = &[ ("wlr-data-control", &[("v1", &[])]), ("wlr-export-dmabuf", &[("v1", &[])]), ("wlr-foreign-toplevel-management", &[("v1", &[])]), ("wlr-gamma-control", &[("v1", &[])]), ("wlr-input-inhibitor", &[("v1", &[])]), ("wlr-layer-shell", &[("v1", &[])]), ("wlr-output-management", &[("v1", &[])]), ("wlr-output-power-management", &[("v1", &[])]), ("wlr-screencopy", &[("v1", &[])]), ("wlr-virtual-pointer", &[("v1", &[])]), ]; static MISC_PROTOCOLS: &[StableProtocol] = &[ ("gtk-primary-selection", &[]), ("input-method-unstable-v2", &[]), ("server-decoration", &[]), ]; fn generate_protocol( name: &str, protocol_file: &Path, out_dir: &Path, client: bool, server: bool, dest_events: &[(&str, &str)], ) { println!("cargo:rerun-if-changed={}", protocol_file.display()); if client { generate_code_with_destructor_events( &protocol_file, out_dir.join(&format!("{}_client_api.rs", name)), Side::Client, dest_events, ); } if server { generate_code_with_destructor_events( &protocol_file, out_dir.join(&format!("{}_server_api.rs", name)), Side::Server, dest_events, ); } } fn main() { println!("cargo:rerun-if-changed-env=CARGO_FEATURE_CLIENT"); println!("cargo:rerun-if-changed-env=CARGO_FEATURE_SERVER"); println!("cargo:rerun-if-changed-env=CARGO_FEATURE_UNSTABLE_PROTOCOLS"); let out_dir_str = var("OUT_DIR").unwrap(); let out_dir = Path::new(&out_dir_str); let client = var("CARGO_FEATURE_CLIENT").ok().is_some(); let server = var("CARGO_FEATURE_SERVER").ok().is_some(); for &(name, dest_events) in STABLE_PROTOCOLS { let file = format!("{name}/{name}.xml", name = name); generate_protocol( name, &Path::new("./protocols/stable").join(&file), out_dir, client, server, dest_events, ); } if var("CARGO_FEATURE_STAGING_PROTOCOLS").ok().is_some() { for &(name, versions) in STAGING_PROTOCOLS { for &(version, dest_events) in versions { let file = format!("{name}/{name}-{version}.xml", name = name, version = version); generate_protocol( &format!("{name}-{version}", name = name, version = version), &Path::new("./protocols/staging").join(&file), out_dir, client, server, dest_events, ); } } } for &(name, dest_events) in MISC_PROTOCOLS { let file = format!("{name}.xml", name = name); generate_protocol( name, &Path::new("./misc").join(&file), out_dir, client, server, dest_events, ); } if var("CARGO_FEATURE_UNSTABLE_PROTOCOLS").ok().is_some() { for &(name, versions) in UNSTABLE_PROTOCOLS { for &(version, dest_events) in versions { let file = format!("{name}/{name}-unstable-{version}.xml", name = name, version = version); generate_protocol( &format!("{name}-{version}", name = name, version = version), &Path::new("./protocols/unstable").join(file), out_dir, client, server, dest_events, ); } } for &(name, versions) in WLR_UNSTABLE_PROTOCOLS { for &(version, dest_events) in versions { let file = format!("{name}-unstable-{version}.xml", name = name, version = version); generate_protocol( &format!("{name}-{version}", name = name, version = version), &Path::new("./wlr-protocols/unstable").join(file), out_dir, client, server, dest_events, ); } } } } wayland-protocols-0.29.5/misc/gtk-primary-selection.xml000064400000000000000000000237111046102023000213140ustar 00000000000000 Copyright © 2015, 2016 Red Hat 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. This protocol provides the ability to have a primary selection device to match that of the X server. This primary selection is a shortcut to the common clipboard selection, where text just needs to be selected in order to allow copying it elsewhere. The de facto way to perform this action is the middle mouse button, although it is not limited to this one. Clients wishing to honor primary selection should create a primary selection source and set it as the selection through wp_primary_selection_device.set_selection whenever the text selection changes. In order to minimize calls in pointer-driven text selection, it should happen only once after the operation finished. Similarly, a NULL source should be set when text is unselected. wp_primary_selection_offer objects are first announced through the wp_primary_selection_device.data_offer event. Immediately after this event, the primary data offer will emit wp_primary_selection_offer.offer events to let know of the mime types being offered. When the primary selection changes, the client with the keyboard focus will receive wp_primary_selection_device.selection events. Only the client with the keyboard focus will receive such events with a non-NULL wp_primary_selection_offer. Across keyboard focus changes, previously focused clients will receive wp_primary_selection_device.events with a NULL wp_primary_selection_offer. In order to request the primary selection data, the client must pass a recent serial pertaining to the press event that is triggering the operation, if the compositor deems the serial valid and recent, the wp_primary_selection_source.send event will happen in the other end to let the transfer begin. The client owning the primary selection should write the requested data, and close the file descriptor immediately. If the primary selection owner client disappeared during the transfer, the client reading the data will receive a wp_primary_selection_device.selection event with a NULL wp_primary_selection_offer, the client should take this as a hint to finish the reads related to the no longer existing offer. The primary selection owner should be checking for errors during writes, merely cancelling the ongoing transfer if any happened. The primary selection device manager is a singleton global object that provides access to the primary selection. It allows to create wp_primary_selection_source objects, as well as retrieving the per-seat wp_primary_selection_device objects. Create a new primary selection source. Create a new data device for a given seat. Destroy the primary selection device manager. Replaces the current selection. The previous owner of the primary selection will receive a wp_primary_selection_source.cancelled event. To unset the selection, set the source to NULL. Introduces a new wp_primary_selection_offer object that may be used to receive the current primary selection. Immediately following this event, the new wp_primary_selection_offer object will send wp_primary_selection_offer.offer events to describe the offered mime types. The wp_primary_selection_device.selection event is sent to notify the client of a new primary selection. This event is sent after the wp_primary_selection.data_offer event introducing this object, and after the offer has announced its mimetypes through wp_primary_selection_offer.offer. The data_offer is valid until a new offer or NULL is received or until the client loses keyboard focus. The client must destroy the previous selection data_offer, if any, upon receiving this event. Destroy the primary selection device. A wp_primary_selection_offer represents an offer to transfer the contents of the primary selection clipboard to the client. Similar to wl_data_offer, the offer also describes the mime types that the source will transferthat the data can be converted to and provides the mechanisms for transferring the data directly to the client. To transfer the contents of the primary selection clipboard, the client issues this request and indicates the mime type that it wants to receive. The transfer happens through the passed file descriptor (typically created with the pipe system call). The source client writes the data in the mime type representation requested and then closes the file descriptor. The receiving client reads from the read end of the pipe until EOF and closes its end, at which point the transfer is complete. Destroy the primary selection offer. Sent immediately after creating announcing the wp_primary_selection_offer through wp_primary_selection_device.data_offer. One event is sent per offered mime type. The source side of a wp_primary_selection_offer, it provides a way to describe the offered data and respond to requests to transfer the requested contents of the primary selection clipboard. This request adds a mime type to the set of mime types advertised to targets. Can be called several times to offer multiple types. Destroy the primary selection source. Request for the current primary selection contents from the client. Send the specified mime type over the passed file descriptor, then close it. This primary selection source is no longer valid. The client should clean up and destroy this primary selection source. wayland-protocols-0.29.5/misc/input-method-unstable-v2.xml000064400000000000000000000513731046102023000216450ustar 00000000000000 Copyright © 2008-2011 Kristian Høgsberg Copyright © 2010-2011 Intel Corporation Copyright © 2012-2013 Collabora, Ltd. Copyright © 2012, 2013 Intel Corporation Copyright © 2015, 2016 Jan Arne Petersen Copyright © 2017, 2018 Red Hat, Inc. Copyright © 2018 Purism SPC 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. This protocol allows applications to act as input methods for compositors. An input method context is used to manage the state of the input method. Text strings are UTF-8 encoded, their indices and lengths are in bytes. This document adheres to the RFC 2119 when using words like "must", "should", "may", etc. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. An input method object allows for clients to compose text. The objects connects the client to a text input in an application, and lets the client to serve as an input method for a seat. The zwp_input_method_v2 object can occupy two distinct states: active and inactive. In the active state, the object is associated to and communicates with a text input. In the inactive state, there is no associated text input, and the only communication is with the compositor. Initially, the input method is in the inactive state. Requests issued in the inactive state must be accepted by the compositor. Because of the serial mechanism, and the state reset on activate event, they will not have any effect on the state of the next text input. There must be no more than one input method object per seat. Notification that a text input focused on this seat requested the input method to be activated. This event serves the purpose of providing the compositor with an active input method. This event resets all state associated with previous enable, disable, surrounding_text, text_change_cause, and content_type events, as well as the state associated with set_preedit_string, commit_string, and delete_surrounding_text requests. In addition, it marks the zwp_input_method_v2 object as active, and makes any existing zwp_input_popup_surface_v2 objects visible. The surrounding_text, and content_type events must follow before the next done event if the text input supports the respective functionality. State set with this event is double-buffered. It will get applied on the next zwp_input_method_v2.done event, and stay valid until changed. Notification that no focused text input currently needs an active input method on this seat. This event marks the zwp_input_method_v2 object as inactive. The compositor must make all existing zwp_input_popup_surface_v2 objects invisible until the next activate event. State set with this event is double-buffered. It will get applied on the next zwp_input_method_v2.done event, and stay valid until changed. Updates the surrounding plain text around the cursor, excluding the preedit text. If any preedit text is present, it is replaced with the cursor for the purpose of this event. The argument text is a buffer containing the preedit string, and must include the cursor position, and the complete selection. It should contain additional characters before and after these. There is a maximum length of wayland messages, so text can not be longer than 4000 bytes. cursor is the byte offset of the cursor within the text buffer. anchor is the byte offset of the selection anchor within the text buffer. If there is no selected text, anchor must be the same as cursor. If this event does not arrive before the first done event, the input method may assume that the text input does not support this functionality and ignore following surrounding_text events. Values set with this event are double-buffered. They will get applied and set to initial values on the next zwp_input_method_v2.done event. The initial state for affected fields is empty, meaning that the text input does not support sending surrounding text. If the empty values get applied, subsequent attempts to change them may have no effect. Tells the input method why the text surrounding the cursor changed. Whenever the client detects an external change in text, cursor, or anchor position, it must issue this request to the compositor. This request is intended to give the input method a chance to update the preedit text in an appropriate way, e.g. by removing it when the user starts typing with a keyboard. cause describes the source of the change. The value set with this event is double-buffered. It will get applied and set to its initial value on the next zwp_input_method_v2.done event. The initial value of cause is input_method. Indicates the content type and hint for the current zwp_input_method_v2 instance. Values set with this event are double-buffered. They will get applied on the next zwp_input_method_v2.done event. The initial value for hint is none, and the initial value for purpose is normal. Atomically applies state changes recently sent to the client. The done event establishes and updates the state of the client, and must be issued after any changes to apply them. Text input state (content purpose, content hint, surrounding text, and change cause) is conceptually double-buffered within an input method context. Events modify the pending state, as opposed to the current state in use by the input method. A done event atomically applies all pending state, replacing the current state. After done, the new pending state is as documented for each related request. Events must be applied in the order of arrival. Neither current nor pending state are modified unless noted otherwise. Send the commit string text for insertion to the application. Inserts a string at current cursor position (see commit event sequence). The string to commit could be either just a single character after a key press or the result of some composing. The argument text is a buffer containing the string to insert. There is a maximum length of wayland messages, so text can not be longer than 4000 bytes. Values set with this event are double-buffered. They must be applied and reset to initial on the next zwp_text_input_v3.commit request. The initial value of text is an empty string. Send the pre-edit string text to the application text input. Place a new composing text (pre-edit) at the current cursor position. Any previously set composing text must be removed. Any previously existing selected text must be removed. The cursor is moved to a new position within the preedit string. The argument text is a buffer containing the preedit string. There is a maximum length of wayland messages, so text can not be longer than 4000 bytes. The arguments cursor_begin and cursor_end are counted in bytes relative to the beginning of the submitted string buffer. Cursor should be hidden by the text input when both are equal to -1. cursor_begin indicates the beginning of the cursor. cursor_end indicates the end of the cursor. It may be equal or different than cursor_begin. Values set with this event are double-buffered. They must be applied on the next zwp_input_method_v2.commit event. The initial value of text is an empty string. The initial value of cursor_begin, and cursor_end are both 0. Remove the surrounding text. before_length and after_length are the number of bytes before and after the current cursor index (excluding the preedit text) to delete. If any preedit text is present, it is replaced with the cursor for the purpose of this event. In effect before_length is counted from the beginning of preedit text, and after_length from its end (see commit event sequence). Values set with this event are double-buffered. They must be applied and reset to initial on the next zwp_input_method_v2.commit request. The initial values of both before_length and after_length are 0. Apply state changes from commit_string, set_preedit_string and delete_surrounding_text requests. The state relating to these events is double-buffered, and each one modifies the pending state. This request replaces the current state with the pending state. The connected text input is expected to proceed by evaluating the changes in the following order: 1. Replace existing preedit string with the cursor. 2. Delete requested surrounding text. 3. Insert commit string with the cursor at its end. 4. Calculate surrounding text to send. 5. Insert new preedit text in cursor position. 6. Place cursor inside preedit text. The serial number reflects the last state of the zwp_input_method_v2 object known to the client. The value of the serial argument must be equal to the number of done events already issued by that object. When the compositor receives a commit request with a serial different than the number of past done events, it must proceed as normal, except it should not change the current state of the zwp_input_method_v2 object. Creates a new zwp_input_popup_surface_v2 object wrapping a given surface. The surface gets assigned the "input_popup" role. If the surface already has an assigned role, the compositor must issue a protocol error. Allow an input method to receive hardware keyboard input and process key events to generate text events (with pre-edit) over the wire. This allows input methods which compose multiple key events for inputting text like it is done for CJK languages. The compositor should send all keyboard events on the seat to the grab holder via the returned wl_keyboard object. Nevertheless, the compositor may decide not to forward any particular event. The compositor must not further process any event after it has been forwarded to the grab holder. Releasing the resulting wl_keyboard object releases the grab. The input method ceased to be available. The compositor must issue this event as the only event on the object if there was another input_method object associated with the same seat at the time of its creation. The compositor must issue this request when the object is no longer useable, e.g. due to seat removal. The input method context becomes inert and should be destroyed after deactivation is handled. Any further requests and events except for the destroy request must be ignored. Destroys the zwp_text_input_v2 object and any associated child objects, i.e. zwp_input_popup_surface_v2 and zwp_input_method_keyboard_grab_v2. This interface marks a surface as a popup for interacting with an input method. The compositor should place it near the active text input area. It must be visible if and only if the input method is in the active state. The client must not destroy the underlying wl_surface while the zwp_input_popup_surface_v2 object exists. Notify about the position of the area of the text input expressed as a rectangle in surface local coordinates. This is a hint to the input method telling it the relative position of the text being entered. The zwp_input_method_keyboard_grab_v2 interface represents an exclusive grab of the wl_keyboard interface associated with the seat. This event provides a file descriptor to the client which can be memory-mapped to provide a keyboard mapping description. A key was pressed or released. The time argument is a timestamp with millisecond granularity, with an undefined base. Notifies clients that the modifier and/or group state has changed, and it should update its local state. Informs the client about the keyboard's repeat rate and delay. This event is sent as soon as the zwp_input_method_keyboard_grab_v2 object has been created, and is guaranteed to be received by the client before any key press event. Negative values for either rate or delay are illegal. A rate of zero will disable any repeating (regardless of the value of delay). This event can be sent later on as well with a new value if necessary, so clients should continue listening for the event past the creation of zwp_input_method_keyboard_grab_v2. The input method manager allows the client to become the input method on a chosen seat. No more than one input method must be associated with any seat at any given time. Request a new input zwp_input_method_v2 object associated with a given seat. Destroys the zwp_input_method_manager_v2 object. The zwp_input_method_v2 objects originating from it remain valid. wayland-protocols-0.29.5/misc/server-decoration.xml000064400000000000000000000120441046102023000205130ustar 00000000000000 This interface allows to coordinate whether the server should create a server-side window decoration around a wl_surface representing a shell surface (wl_shell_surface or similar). By announcing support for this interface the server indicates that it supports server side decorations. Use in conjunction with zxdg_decoration_manager_v1 is undefined. When a client creates a server-side decoration object it indicates that it supports the protocol. The client is supposed to tell the server whether it wants server-side decorations or will provide client-side decorations. If the client does not create a server-side decoration object for a surface the server interprets this as lack of support for this protocol and considers it as client-side decorated. Nevertheless a client-side decorated surface should use this protocol to indicate to the server that it does not want a server-side deco. This event is emitted directly after binding the interface. It contains the default mode for the decoration. When a new server decoration object is created this new object will be in the default mode until the first request_mode is requested. The server may change the default mode at any time. This event is emitted directly after the decoration is created and represents the base decoration policy by the server. E.g. a server which wants all surfaces to be client-side decorated will send Client, a server which wants server-side decoration will send Server. The client can request a different mode through the decoration request. The server will acknowledge this by another event with the same mode. So even if a server prefers server-side decoration it's possible to force a client-side decoration. The server may emit this event at any time. In this case the client can again request a different mode. It's the responsibility of the server to prevent a feedback loop. wayland-protocols-0.29.5/protocols/.editorconfig000064400000000000000000000001101046102023000200730ustar 00000000000000root = true [*.xml] indent_style = space indent_size = 2 tab_width = 8 wayland-protocols-0.29.5/protocols/.gitignore000064400000000000000000000002421046102023000174140ustar 00000000000000Makefile Makefile.in configure config.guess config.log config.status config.sub compile install-sh missing *.pc autom4te.cache aclocal.m4 *.trs *.log test-driver wayland-protocols-0.29.5/protocols/.gitlab-ci.yml000064400000000000000000000024131046102023000200620ustar 00000000000000.templates_sha: &template_sha 290b79e0e78eab67a83766f4e9691be554fc4afd include: - project: 'freedesktop/ci-templates' ref: *template_sha file: '/templates/debian.yml' - project: 'freedesktop/ci-templates' ref: *template_sha file: '/templates/ci-fairy.yml' stages: - review - containers-build - test variables: FDO_UPSTREAM_REPO: wayland/wayland-protocols .debian: variables: FDO_DISTRIBUTION_VERSION: bullseye FDO_DISTRIBUTION_PACKAGES: 'build-essential automake autoconf libtool pkg-config libwayland-dev meson' FDO_DISTRIBUTION_TAG: '2021-03-24.0' check-commit: extends: - .fdo.ci-fairy stage: review script: - ci-fairy check-commits --signed-off-by --junit-xml=results.xml variables: GIT_DEPTH: 100 artifacts: reports: junit: results.xml container_build: extends: - .debian - .fdo.container-build@debian stage: containers-build variables: GIT_STRATEGY: none test-meson: stage: test extends: - .debian - .fdo.distribution-image@debian script: - meson build - ninja -C build - meson test -C build - ninja -C build install test-autotools: stage: test extends: - .debian - .fdo.distribution-image@debian script: - ./autogen.sh - make check wayland-protocols-0.29.5/protocols/COPYING000064400000000000000000000027361046102023000164710ustar 00000000000000Copyright © 2008-2013 Kristian Høgsberg Copyright © 2010-2013 Intel Corporation Copyright © 2013 Rafael Antognolli Copyright © 2013 Jasper St. Pierre Copyright © 2014 Jonas Ådahl Copyright © 2014 Jason Ekstrand Copyright © 2014-2015 Collabora, Ltd. Copyright © 2015 Red Hat Inc. 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. --- The above is the version of the MIT "Expat" License used by X.org: http://cgit.freedesktop.org/xorg/xserver/tree/COPYING wayland-protocols-0.29.5/protocols/GOVERNANCE.md000064400000000000000000000163131046102023000174030ustar 00000000000000# wayland-protocols governance This document governs the maintenance of wayland-protocols and serves to outline the broader process for standardization of protocol extensions in the Wayland ecosystem. ## 1. Membership Membership in wayland-protocols is offered to stakeholders in the Wayland ecosystem who have an interest in participating in protocol extension standardization. ### 1.1. Membership requirements 1. Membership is extended to projects, rather than individuals. 2. Members represent general-purpose projects with a stake in multiple Wayland protocols (e.g. compositors, GUI toolkits, etc), rather than special-purpose applications with a stake in only one or two. 3. Each project must provide one or two named individuals as points-of-contact for that project who can be reached to discuss protocol-related matters. 4. During a vote, if two points-of-contact for the same member disagree, the member's vote is considered blank. ### 1.2. Becoming a member 1. New members who meet the criteria outlined in 1.1 are established by invitation from an existing member. Projects hoping to join should reach out to an existing member asking for this invitation. 2. New members shall write to the wayland-devel mailing list stating their intention of joining and their sponsor. 3. The sponsor shall respond acknowledging their sponsorship of the membership. 4. A 14 day discussion period for comments from wayland-protocols members will be held. 5. At the conclusion of the discussion period, the new membership is established unless their application was NACKed by a 1/2 majority of all existing members. ### 1.3. Ceasing membership 1. A member may step down by writing their intention to do so to the wayland-devel mailing list. 2. A removal vote may be called for by an existing member by posting to the wayland-devel mailing list. This begins a 14 day voting & discussion period. 3. At the conclusion of the voting period, the member is removed if the votes total 2/3rds of all current members. 4. Removed members are not eligible to apply for membership again for a period of 1 year. 5. Following a failed vote, the member who called for the vote cannot call for a re-vote or propose any other removal for 90 days. ## 2. Protocols ### 2.1. Protocol namespaces 1. Namespaces are implemented in practice by prefixing each interface name in a protocol definition (XML) with the namespace name, and an underscore (e.g. "xdg_wm_base"). 2. Protocols in a namespace may optionally use the namespace followed by a dash in the name (e.g. "xdg-shell"). 3. The "xdg" namespace is established for protocols letting clients configure its surfaces as "windows", allowing clients to affect how they are managed. 4. The "wp" namespace is established for protocols generally useful to Wayland implementations (i.e. "plumbing" protocols). 5. The "ext" namespace is established as a general catch-all for protocols that fit into no other namespace. ### 2.2. Protocol inclusion requirements 1. All protocols found in the "xdg" and "wp" namespaces at the time of writing are grandfathered into their respective namespace without further discussion. 2. Protocols in the "xdg" and "wp" namespace are eligible for inclusion only if ACKed by at least 3 members. 3. Protocols in the "xdg" and "wp" namespace are ineligible for inclusion if if NACKed by any member. 4. Protocols in the "xdg" and "wp" namespaces must have at least 3 open-source implementations (either 1 client + 2 servers, or 2 clients + 1 server) to be eligible for inclusion. 5. Protocols in the "ext" namespace are eligible for inclusion only if ACKed by at least one other member. 6. Protocols in the "ext" namespace must have at least one open-source client & one open-source server implementation to be eligible for inclusion. 7. "Open-source" is defined as distributed with an Open Source Initiative approved license. ### 2.3. Introducing new protocols 1. A new protocol may be proposed by submitting a merge request to the wayland-protocols Gitlab repository. 2. Protocol proposal posts must include justification for their inclusion in their namespace per the requirements outlined in section 2.2. 3. An indefinite discussion period for comments from wayland-protocols members will be held, with a minimum duration of 30 days. Protocols which require a certain level of implementation status, ACKs from members, and so on, should use this time to acquire them. 4. When the proposed protocol meets all requirements for inclusion per section 2.2, and the minimum discussion period has elapsed, the sponsoring member may merge their changes in the wayland-protocol repository. 5. Amendments to existing protocols may be proposed by the same process, with no minimum discussion period. 6. Declaring a protocol stable may be proposed by the same process, with the regular 30 day minimum discussion period. ## 3. Protocol adoption documentation ### 3.1. Adoption website 1. This section is informational. 2. A website will be made available for interested parties to browse the implementation status of protocols included in wayland-protocols. 3. A statement from each member of wayland-protocols will be included on the site. 4. Each protocol will be listed along with its approval status from each member. 5. The approval statuses are: 1. NACK, or "negative acknowledgement", meaning that the member is opposed to the protocol in principle. 2. NOPP, or "no opposition", meaning that the member is not opposed to the protocol in principle, but does not provide an implementation. 3. ACK, or "acknowledged", meaning that the member supports the protocol in principle, but does not provide an implementation. 4. IMPL, or "implemented", meaning that the member supports the protocol and provides an implementation. 6. Each member may write a short statement expanding on the rationale for their approval status, which will be included on the site. 7. A supplementary list of implementations will also be provided on the site, which may include implementations supported by non-members. ### 3.2. Changes to the adoption website 1. This section is informational. 2. A new protocol is added to the website by the sponsoring member at the conclusion of the discussion period (section 2.3.3). 3. During the discussion period (section 2.3.3), interested parties may express their approval status on the Gitlab merge request. The default approval status for members who do not participate in the discussion is "NOPP". 4. Members may change their acknowledgement status or support statement at any time after the discussion period (section 2.3.3) has closed by simply merging their update in the wayland-protocols repository. ## 4. Amending this document 1. An amendment to this document may be proposed any member by submitting a merge request on Gitlab. 2. A 30 day discussion period for comments from wayland-protocols members will be held. 3. At the conclusion of the discussion period, an amendment will become effective if it's ACKed by at least 2/3rds of all wayland-protocols members, and NACKed by none. The sponsoring member may merge their change to the wayland-protocols repository at this point. wayland-protocols-0.29.5/protocols/MEMBERS.md000064400000000000000000000011451046102023000170430ustar 00000000000000# wayland-protocols members - EFL/Enlightenment: Mike Blumenkrantz - GTK/Mutter: Jonas Ådahl , Carlos Garnacho - KWin: Eike Hein , David Edmundson - Mir: Christopher James Halse Rogers , Alan Griffiths - Qt: Eskil Abrahamsen Blomfeldt - Weston: Pekka Paalanen , Daniel Stone - wlroots/Sway: Drew DeVault , Simon Ser wayland-protocols-0.29.5/protocols/Makefile.am000064400000000000000000000052101046102023000174600ustar 00000000000000ACLOCAL_AMFLAGS = -I m4 unstable_protocols = \ unstable/pointer-gestures/pointer-gestures-unstable-v1.xml \ unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml \ unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml \ unstable/text-input/text-input-unstable-v1.xml \ unstable/text-input/text-input-unstable-v3.xml \ unstable/input-method/input-method-unstable-v1.xml \ unstable/xdg-shell/xdg-shell-unstable-v5.xml \ unstable/xdg-shell/xdg-shell-unstable-v6.xml \ unstable/relative-pointer/relative-pointer-unstable-v1.xml \ unstable/pointer-constraints/pointer-constraints-unstable-v1.xml \ unstable/tablet/tablet-unstable-v1.xml \ unstable/tablet/tablet-unstable-v2.xml \ unstable/xdg-foreign/xdg-foreign-unstable-v1.xml \ unstable/xdg-foreign/xdg-foreign-unstable-v2.xml \ unstable/idle-inhibit/idle-inhibit-unstable-v1.xml \ unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml \ unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml \ unstable/xdg-output/xdg-output-unstable-v1.xml \ unstable/input-timestamps/input-timestamps-unstable-v1.xml \ unstable/xdg-decoration/xdg-decoration-unstable-v1.xml \ unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml \ unstable/primary-selection/primary-selection-unstable-v1.xml \ $(NULL) stable_protocols = \ stable/presentation-time/presentation-time.xml \ stable/viewporter/viewporter.xml \ stable/xdg-shell/xdg-shell.xml \ $(NULL) staging_protocols = \ staging/xdg-activation/xdg-activation-v1.xml \ $(NULL) misc_documentation = \ staging/xdg-activation/x11-interoperation.rst \ $(NULL) nobase_dist_pkgdata_DATA = \ $(unstable_protocols) \ $(stable_protocols) \ $(staging_protocols) \ $(NULL) dist_noinst_DATA = \ $(sort $(foreach p,$(unstable_protocols),$(dir $p)README)) \ $(sort $(foreach p,$(stable_protocols),$(dir $p)README)) \ $(sort $(foreach p,$(staging_protocols),$(dir $p)README)) \ $(misc_documentation) \ README.md \ GOVERNANCE.md \ MEMBERS.md \ meson.build \ meson_options.txt \ tests/meson.build \ tests/build-cxx.cc.in \ tests/build-pedantic.c.in \ tests/replace.py \ tests/scan.sh \ $(NULL) noarch_pkgconfig_DATA = wayland-protocols.pc dist_check_SCRIPTS = tests/scan.sh TESTS = $(unstable_protocols) $(stable_protocols) $(staging_protocols) TEST_EXTENSIONS = .xml AM_TESTS_ENVIRONMENT = SCANNER='$(wayland_scanner)'; export SCANNER; XML_LOG_COMPILER = $(srcdir)/tests/scan.sh wayland-protocols-0.29.5/protocols/README.md000064400000000000000000000224051046102023000167100ustar 00000000000000# Wayland protocols wayland-protocols contains Wayland protocols that add functionality not available in the Wayland core protocol. Such protocols either add completely new functionality, or extend the functionality of some other protocol either in Wayland core, or some other protocol in wayland-protocols. A protocol in wayland-protocols consists of a directory containing a set of XML files containing the protocol specification, and a README file containing detailed state and a list of maintainers. ## Protocol phases Protocols in general has three phases: the development phase, the testing phase, and the stable phase. In the development phase, a protocol is not officially part of wayland-protocols, but is actively being developed, for example by iterating over it in a [merge request](https://gitlab.freedesktop.org/wayland/wayland-protocols/merge_requests), or planning it in an [issue](https://gitlab.freedesktop.org/wayland/wayland-protocols/issues). During this phase, patches for clients and compositors are written as a test vehicle. Such patches must not be merged in clients and compositors, because the protocol can still change. When a protocol has reached a stage where it is ready for wider adoption, and after the [GOVERNANCE section 2.3](GOVERNANCE.md#2.3-introducing-new-protocols) requirements have been met, it enters the "testing" phase. At this point, the protocol is added to `staging/` directory of wayland-protocols and made part of a release. What this means is that implementation is encouraged in clients and compositors where the functionality it specifies is wanted. Extensions in staging cannot have backward incompatible changes, in that sense they are equal to stable extensions. However, they may be completely replaced with a new major version, or a different protocol extension all together, if design flaws are found in the testing phase. After a staging protocol has been sufficiently tested in the wild and proven adequate, its maintainers and the community at large may declare it "stable", meaning it is unexpected to become superseded by a new major version. ## Deprecation A protocol may be deprecated, if it has been replaced by some other protocol, or declared undesirable for some other reason. No more changes will be made to a deprecated protocol. ## Legacy protocol phases An "unstable" protocol refers to a protocol categorization policy previously used by wayland-protocols, where protocols initially placed in the `unstable/` directory had certain naming conventions were applied, requiring a backward incompatible change to be declared "stable". During this phase, protocol extension interface names were in addition to the major version postfix also prefixed with `z` to distinguish from stable protocols. ## Protocol directory tree structure Depending on which stage a protocol is in, the protocol is placed within the toplevel directory containing the protocols with the same stage. Stable protocols are placed in the `stable/` directory, staging protocols are placed in the `staging/` directory, and deprecated protocols are placed in the `deprecated/` directory. Unstable protocols (see [Legacy protocol phases](#legacy-protocol-phases)) can be found in the `unstable/` directory, but new ones should never be placed here. ## Protocol development procedure To propose a new protocol, create a GitLab merge request adding the relevant files and Makefile.am entry to the repository with the explanation and motivation in the commit message. Protocols are organized in namespaces describing their scope ("wp", "xdg" and "ext"). There are different requirements for each namespace, see [GOVERNANCE section 2](GOVERNANCE.md#2-protocols) for more information. If the new protocol is just an idea, open an issue on the GitLab issue tracker. If the protocol isn't ready for complete review yet and is an RFC, create a merge request and add the "WIP:" prefix in the title. To propose changes to existing protocols, create a GitLab merge request. ## Interface naming convention All protocols should avoid using generic namespaces or no namespaces in the protocol interface names in order to minimize risk that the generated C API collides with other C API. Interface names that may collide with interface names from other protocols should also be avoided. For generic protocols not limited to certain configurations (such as specific desktop environment or operating system) the `wp_` prefix should be used on all interfaces in the protocol. For protocols allowing clients to configure how their windows are managed, the `xdg_` prefix should be used. For operating system specific protocols, the interfaces should be prefixed with both `wp_` and the operating system, for example `wp_linux_`, or `wp_freebsd_`, etc. For more information about namespaces, see [GOVERNANCE section 2.1 ](GOVERNANCE.md#21-protocol-namespaces). Each new protocol XML file must include a major version postfix, starting with `-v1`. The purpose of this postfix is to make it possible to distinguish between backward incompatible major versions of the same protocol. The interfaces in the protocol XML file should as well have the same major version postfix in their names. For example, the protocol `foo-bar` may have a XML file `foo-bar/foo-bar-v1.xml`, consisting of the interface `wp_foo_bar_v1`, corresponding to the major version 1, as well as the newer version `foo-bar/foo-bar-v2.xml` consisting of the interface `wp_foo_bar_v2`, corresponding to the major version 2. ## Include a disclaimer Include the following disclaimer: ``` 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. ``` ## Backward compatible protocol changes A protocol may receive backward compatible additions and changes. This is to be done in the general Wayland way, using `version` and `since` XML element attributes. ## Backward incompatible protocol changes While not preferred, a protocol may at any stage, especially during the testing phase, when it is located in the `staging/` directory, see backward incompatible changes. Assuming a backward incompatible change is needed, the procedure for how to do so is the following: - Make a copy of the XML file with the major version increased by 1. - Increase the major version number in the protocol XML by 1. - Increase the major version number in all of the interfaces in the XML by 1. - Reset the interface version number (interface version attribute) of all the interfaces to 1. - Remove all of the `since` attributes. ## Declaring a protocol stable Once it has been concluded that a protocol been proven adequate in production, and that it is deemed unlikely to receive any backward incompatible changes, it may be declared stable. The procedure of doing this is the following: - Create a new directory in the `stable/` toplevel directory with the same name as the protocol directory in the `staging/` directory. - Copy the final version of the XML that is the version that was decided to be declared stable into the new directory. The target name should be the same name as the protocol directory but with the `.xml` suffix. - Remove the disclaimer about the protocol being in the testing phase. - Update the `README` file in the staging directory and create a new `README` file in the new directory. - Replace the disclaimer in the protocol files left in the staging/ directory with the following: ``` Disclaimer: This protocol extension has been marked stable. This copy is no longer used and only retained for backwards compatibility. The canonical version can be found in the stable/ directory. ``` Note that the major version of the stable protocol extension, as well as all the interface versions and names, must remain unchanged. There are other requirements for declaring a protocol stable, see [GOVERNANCE section 2.3](GOVERNANCE.md#23-introducing-new-protocols). ## Releases Each release of wayland-protocols finalizes the version of the protocols to their state they had at that time. ## Gitlab conventions ### Triaging merge requests New merge requests should be triaged. Doing so requires the one doing the triage to add a set of initial labels: ~"New Protocol" - For a new protocol being added. If it's an amendment to an existing protocol, apply the label of the corresponding protocol instead. If none exist, create it. ~"Needs acks" - If the protocol needs one or more acknowledgements. ~"Needs implementations" - If there are not enough implementations of the protocol. ~"Needs review" - If the protocol is in need of review. ~"In 30 day discussion period" - If the protocol needs a 30 day discussion period. For the meaning and requirement of acknowledgments and available implementations, see the GOVERNANCE.md document. ### Managing merge requests When merge requests get their needed feedback and items, remove the corresponding label that marks it as needing something. For example, if a merge request receives all the required acknowledgments, remove the ~"Needs acks" label, or if 30 days passed since opening, remove any ~"In 30 days discussion period" label. ### Nacking a merge request If the inclusion of a merge request is denied due to one or more Nacks, add the ~Nacked label. wayland-protocols-0.29.5/protocols/autogen.sh000075500000000000000000000003071046102023000174270ustar 00000000000000#!/bin/sh test -n "$srcdir" || srcdir=`dirname "$0"` test -n "$srcdir" || srcdir=. ( cd "$srcdir" && autoreconf --force -v --install ) || exit test -n "$NOCONFIGURE" || "$srcdir/configure" "$@" wayland-protocols-0.29.5/protocols/configure.ac000064400000000000000000000025401046102023000177150ustar 00000000000000AC_PREREQ([2.64]) m4_define([wayland_protocols_major_version], [1]) m4_define([wayland_protocols_minor_version], [21]) m4_define([wayland_protocols_version], [wayland_protocols_major_version.wayland_protocols_minor_version]) AC_INIT([wayland-protocols], [wayland_protocols_version], [https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=unspecified], [wayland-protocols], [http://wayland.freedesktop.org/]) AC_CONFIG_MACRO_DIR([m4]) AC_SUBST([WAYLAND_PROTOCOLS_VERSION], [wayland_protocols_version]) AC_ARG_VAR([wayland_scanner], [The wayland-scanner executable]) AC_PATH_PROG([wayland_scanner], [wayland-scanner]) if test x$wayland_scanner = x; then if test "x$cross_compiling" != "xyes"; then PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner]) wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner` else AC_MSG_WARN([You are cross compiling without wayland-scanner in your path. make check will fail.]) fi fi AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz tar-ustar]) AM_SILENT_RULES([yes]) PKG_NOARCH_INSTALLDIR AC_CONFIG_FILES([ Makefile wayland-protocols.pc wayland-protocols-uninstalled.pc ]) AC_OUTPUT AC_MSG_RESULT([ Version ${WAYLAND_PROTOCOLS_VERSION} Prefix ${prefix} ]) wayland-protocols-0.29.5/protocols/m4/compat.m4000064400000000000000000000012161046102023000174730ustar 00000000000000dnl noarch_pkgconfigdir only available in pkg-config 0.27 and newer dnl http://lists.freedesktop.org/archives/pkg-config/2012-July/000875.html dnl Ubuntu 14.04 provides only pkg-config 0.26 so lacks this function. dnl dnl The Wayland project maintains automated builds for Ubuntu 14.04 in dnl a Launchpad PPA. 14.04 is a Long Term Support distro release, which dnl will reach EOL April 2019, however the Wayland PPA may stop targeting dnl it some time after the next LTS release (April 2016). m4_ifndef([PKG_NOARCH_INSTALLDIR], [AC_DEFUN([PKG_NOARCH_INSTALLDIR], [ noarch_pkgconfigdir='${datadir}'/pkgconfig AC_SUBST([noarch_pkgconfigdir]) ])]) wayland-protocols-0.29.5/protocols/meson.build000064400000000000000000000053301046102023000175710ustar 00000000000000project('wayland-protocols', version: '1.21', meson_version: '>= 0.53.0', license: 'MIT/Expat', ) wayland_protocols_version = meson.project_version() fs = import('fs') dep_scanner = dependency('wayland-scanner', native: true) stable_protocols = [ 'presentation-time', 'viewporter', 'xdg-shell', ] unstable_protocols = { 'fullscreen-shell': ['v1'], 'idle-inhibit': ['v1'], 'input-method': ['v1'], 'input-timestamps': ['v1'], 'keyboard-shortcuts-inhibit': ['v1'], 'linux-dmabuf': ['v1'], 'linux-explicit-synchronization': ['v1'], 'pointer-constraints': ['v1'], 'pointer-gestures': ['v1'], 'primary-selection': ['v1'], 'relative-pointer': ['v1'], 'tablet': ['v1', 'v2'], 'text-input': ['v1', 'v3'], 'xdg-decoration': ['v1'], 'xdg-foreign': ['v1', 'v2'], 'xdg-output': ['v1'], 'xdg-shell': ['v5', 'v6'], 'xwayland-keyboard-grab': ['v1'], } staging_protocols = { 'xdg-activation': ['v1'], } protocol_files = [] foreach name : stable_protocols protocol_files += ['stable/@0@/@0@.xml'.format(name)] endforeach foreach name : staging_protocols.keys() foreach version : staging_protocols.get(name) protocol_files += [ 'staging/@0@/@0@-@1@.xml'.format(name, version) ] endforeach endforeach foreach name : unstable_protocols.keys() foreach version : unstable_protocols.get(name) protocol_files += [ 'unstable/@0@/@0@-unstable-@1@.xml'.format(name, version) ] endforeach endforeach # Check that each protocol has a README foreach protocol_file : protocol_files dir = fs.parent(protocol_file) if not fs.is_file(dir + '/README') error('Missing README in @0@'.format(protocol_file)) endif endforeach foreach protocol_file : protocol_files protocol_install_dir = fs.parent(join_paths( get_option('datadir'), 'wayland-protocols', protocol_file, )) install_data( protocol_file, install_dir: protocol_install_dir, ) endforeach wayland_protocols_srcdir = meson.current_source_dir() pkgconfig_configuration = configuration_data() pkgconfig_configuration.set('prefix', get_option('prefix')) pkgconfig_configuration.set('datarootdir', '${prefix}/@0@'.format(get_option('datadir'))) pkgconfig_configuration.set('abs_top_srcdir', wayland_protocols_srcdir) pkgconfig_configuration.set('PACKAGE', 'wayland-protocols') pkgconfig_configuration.set('WAYLAND_PROTOCOLS_VERSION', wayland_protocols_version) pkg_install_dir = join_paths(get_option('datadir'), 'pkgconfig') configure_file( input: 'wayland-protocols.pc.in', output: 'wayland-protocols.pc', configuration: pkgconfig_configuration, install_dir: pkg_install_dir, ) configure_file( input: 'wayland-protocols-uninstalled.pc.in', output: 'wayland-protocols-uninstalled.pc', configuration: pkgconfig_configuration, ) if get_option('tests') subdir('tests') endif wayland-protocols-0.29.5/protocols/meson_options.txt000064400000000000000000000001431046102023000210610ustar 00000000000000option('tests', type: 'boolean', value: true, description: 'Build the tests') wayland-protocols-0.29.5/protocols/stable/presentation-time/README000064400000000000000000000001321046102023000232230ustar 00000000000000Presentation time protocol Maintainers: Pekka Paalanen wayland-protocols-0.29.5/protocols/stable/presentation-time/presentation-time.xml000064400000000000000000000303011046102023000265350ustar 00000000000000 Copyright © 2013-2014 Collabora, Ltd. 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. The main feature of this interface is accurate presentation timing feedback to ensure smooth video playback while maintaining audio/video synchronization. Some features use the concept of a presentation clock, which is defined in the presentation.clock_id event. A content update for a wl_surface is submitted by a wl_surface.commit request. Request 'feedback' associates with the wl_surface.commit and provides feedback on the content update, particularly the final realized presentation time. When the final realized presentation time is available, e.g. after a framebuffer flip completes, the requested presentation_feedback.presented events are sent. The final presentation time can differ from the compositor's predicted display update time and the update's target time, especially when the compositor misses its target vertical blanking period. These fatal protocol errors may be emitted in response to illegal presentation requests. Informs the server that the client will no longer be using this protocol object. Existing objects created by this object are not affected. Request presentation feedback for the current content submission on the given surface. This creates a new presentation_feedback object, which will deliver the feedback information once. If multiple presentation_feedback objects are created for the same submission, they will all deliver the same information. For details on what information is returned, see the presentation_feedback interface. This event tells the client in which clock domain the compositor interprets the timestamps used by the presentation extension. This clock is called the presentation clock. The compositor sends this event when the client binds to the presentation interface. The presentation clock does not change during the lifetime of the client connection. The clock identifier is platform dependent. On Linux/glibc, the identifier value is one of the clockid_t values accepted by clock_gettime(). clock_gettime() is defined by POSIX.1-2001. Timestamps in this clock domain are expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples, each component being an unsigned 32-bit value. Whole seconds are in tv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo, and the additional fractional part in tv_nsec as nanoseconds. Hence, for valid timestamps tv_nsec must be in [0, 999999999]. Note that clock_id applies only to the presentation clock, and implies nothing about e.g. the timestamps used in the Wayland core protocol input events. Compositors should prefer a clock which does not jump and is not slewed e.g. by NTP. The absolute value of the clock is irrelevant. Precision of one millisecond or better is recommended. Clients must be able to query the current clock value directly, not by asking the compositor. A presentation_feedback object returns an indication that a wl_surface content update has become visible to the user. One object corresponds to one content update submission (wl_surface.commit). There are two possible outcomes: the content update is presented to the user, and a presentation timestamp delivered; or, the user did not see the content update because it was superseded or its surface destroyed, and the content update is discarded. Once a presentation_feedback object has delivered a 'presented' or 'discarded' event it is automatically destroyed. As presentation can be synchronized to only one output at a time, this event tells which output it was. This event is only sent prior to the presented event. As clients may bind to the same global wl_output multiple times, this event is sent for each bound instance that matches the synchronized output. If a client has not bound to the right wl_output global at all, this event is not sent. These flags provide information about how the presentation of the related content update was done. The intent is to help clients assess the reliability of the feedback and the visual quality with respect to possible tearing and timings. The flags are: VSYNC: The presentation was synchronized to the "vertical retrace" by the display hardware such that tearing does not happen. Relying on user space scheduling is not acceptable for this flag. If presentation is done by a copy to the active frontbuffer, then it must guarantee that tearing cannot happen. HW_CLOCK: The display hardware provided measurements that the hardware driver converted into a presentation timestamp. Sampling a clock in user space is not acceptable for this flag. HW_COMPLETION: The display hardware signalled that it started using the new image content. The opposite of this is e.g. a timer being used to guess when the display hardware has switched to the new image content. ZERO_COPY: The presentation of this update was done zero-copy. This means the buffer from the client was given to display hardware as is, without copying it. Compositing with OpenGL counts as copying, even if textured directly from the client buffer. Possible zero-copy cases include direct scanout of a fullscreen surface and a surface on a hardware overlay. The associated content update was displayed to the user at the indicated time (tv_sec_hi/lo, tv_nsec). For the interpretation of the timestamp, see presentation.clock_id event. The timestamp corresponds to the time when the content update turned into light the first time on the surface's main output. Compositors may approximate this from the framebuffer flip completion events from the system, and the latency of the physical display path if known. This event is preceded by all related sync_output events telling which output's refresh cycle the feedback corresponds to, i.e. the main output for the surface. Compositors are recommended to choose the output containing the largest part of the wl_surface, or keeping the output they previously chose. Having a stable presentation output association helps clients predict future output refreshes (vblank). The 'refresh' argument gives the compositor's prediction of how many nanoseconds after tv_sec, tv_nsec the very next output refresh may occur. This is to further aid clients in predicting future refreshes, i.e., estimating the timestamps targeting the next few vblanks. If such prediction cannot usefully be done, the argument is zero. If the output does not have a constant refresh rate, explicit video mode switches excluded, then the refresh argument must be zero. The 64-bit value combined from seq_hi and seq_lo is the value of the output's vertical retrace counter when the content update was first scanned out to the display. This value must be compatible with the definition of MSC in GLX_OML_sync_control specification. Note, that if the display path has a non-zero latency, the time instant specified by this counter may differ from the timestamp's. If the output does not have a concept of vertical retrace or a refresh cycle, or the output device is self-refreshing without a way to query the refresh count, then the arguments seq_hi and seq_lo must be zero. The content update was never displayed to the user. wayland-protocols-0.29.5/protocols/stable/viewporter/README000064400000000000000000000002371046102023000217700ustar 00000000000000Viewporter: cropping and scaling extension for surface contents Previously known as wl_scaler. Maintainers: Pekka Paalanen wayland-protocols-0.29.5/protocols/stable/viewporter/viewporter.xml000064400000000000000000000205351046102023000240430ustar 00000000000000 Copyright © 2013-2016 Collabora, Ltd. 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. The global interface exposing surface cropping and scaling capabilities is used to instantiate an interface extension for a wl_surface object. This extended interface will then allow cropping and scaling the surface contents, effectively disconnecting the direct relationship between the buffer and the surface size. Informs the server that the client will not be using this protocol object anymore. This does not affect any other objects, wp_viewport objects included. Instantiate an interface extension for the given wl_surface to crop and scale its content. If the given wl_surface already has a wp_viewport object associated, the viewport_exists protocol error is raised. An additional interface to a wl_surface object, which allows the client to specify the cropping and scaling of the surface contents. This interface works with two concepts: the source rectangle (src_x, src_y, src_width, src_height), and the destination size (dst_width, dst_height). The contents of the source rectangle are scaled to the destination size, and content outside the source rectangle is ignored. This state is double-buffered, and is applied on the next wl_surface.commit. The two parts of crop and scale state are independent: the source rectangle, and the destination size. Initially both are unset, that is, no scaling is applied. The whole of the current wl_buffer is used as the source, and the surface size is as defined in wl_surface.attach. If the destination size is set, it causes the surface size to become dst_width, dst_height. The source (rectangle) is scaled to exactly this size. This overrides whatever the attached wl_buffer size is, unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface has no content and therefore no size. Otherwise, the size is always at least 1x1 in surface local coordinates. If the source rectangle is set, it defines what area of the wl_buffer is taken as the source. If the source rectangle is set and the destination size is not set, then src_width and src_height must be integers, and the surface size becomes the source rectangle size. This results in cropping without scaling. If src_width or src_height are not integers and destination size is not set, the bad_size protocol error is raised when the surface state is applied. The coordinate transformations from buffer pixel coordinates up to the surface-local coordinates happen in the following order: 1. buffer_transform (wl_surface.set_buffer_transform) 2. buffer_scale (wl_surface.set_buffer_scale) 3. crop and scale (wp_viewport.set*) This means, that the source rectangle coordinates of crop and scale are given in the coordinates after the buffer transform and scale, i.e. in the coordinates that would be the surface-local coordinates if the crop and scale was not applied. If src_x or src_y are negative, the bad_value protocol error is raised. Otherwise, if the source rectangle is partially or completely outside of the non-NULL wl_buffer, then the out_of_buffer protocol error is raised when the surface state is applied. A NULL wl_buffer does not raise the out_of_buffer error. The x, y arguments of wl_surface.attach are applied as normal to the surface. They indicate how many pixels to remove from the surface size from the left and the top. In other words, they are still in the surface-local coordinate system, just like dst_width and dst_height are. If the wl_surface associated with the wp_viewport is destroyed, all wp_viewport requests except 'destroy' raise the protocol error no_surface. If the wp_viewport object is destroyed, the crop and scale state is removed from the wl_surface. The change will be applied on the next wl_surface.commit. The associated wl_surface's crop and scale state is removed. The change is applied on the next wl_surface.commit. Set the source rectangle of the associated wl_surface. See wp_viewport for the description, and relation to the wl_buffer size. If all of x, y, width and height are -1.0, the source rectangle is unset instead. Any other set of values where width or height are zero or negative, or x or y are negative, raise the bad_value protocol error. The crop and scale state is double-buffered state, and will be applied on the next wl_surface.commit. Set the destination size of the associated wl_surface. See wp_viewport for the description, and relation to the wl_buffer size. If width is -1 and height is -1, the destination size is unset instead. Any other pair of values for width and height that contains zero or negative values raises the bad_value protocol error. The crop and scale state is double-buffered state, and will be applied on the next wl_surface.commit. wayland-protocols-0.29.5/protocols/stable/xdg-shell/README000064400000000000000000000001641046102023000214500ustar 00000000000000xdg shell protocol Maintainers: Jonas Ådahl Mike Blumenkrantz wayland-protocols-0.29.5/protocols/stable/xdg-shell/xdg-shell.xml000064400000000000000000001524541046102023000232130ustar 00000000000000 Copyright © 2008-2013 Kristian Høgsberg Copyright © 2013 Rafael Antognolli Copyright © 2013 Jasper St. Pierre Copyright © 2010-2013 Intel Corporation Copyright © 2015-2017 Samsung Electronics Co., Ltd Copyright © 2015-2017 Red Hat Inc. 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. The xdg_wm_base interface is exposed as a global object enabling clients to turn their wl_surfaces into windows in a desktop environment. It defines the basic functionality needed for clients and the compositor to create windows that can be dragged, resized, maximized, etc, as well as creating transient windows such as popup menus. Destroy this xdg_wm_base object. Destroying a bound xdg_wm_base object while there are surfaces still alive created by this xdg_wm_base object instance is illegal and will result in a protocol error. Create a positioner object. A positioner object is used to position surfaces relative to some parent surface. See the interface description and xdg_surface.get_popup for details. This creates an xdg_surface for the given surface. While xdg_surface itself is not a role, the corresponding surface may only be assigned a role extending xdg_surface, such as xdg_toplevel or xdg_popup. This creates an xdg_surface for the given surface. An xdg_surface is used as basis to define a role to a given surface, such as xdg_toplevel or xdg_popup. It also manages functionality shared between xdg_surface based surface roles. See the documentation of xdg_surface for more details about what an xdg_surface is and how it is used. A client must respond to a ping event with a pong request or the client may be deemed unresponsive. See xdg_wm_base.ping. The ping event asks the client if it's still alive. Pass the serial specified in the event back to the compositor by sending a "pong" request back with the specified serial. See xdg_wm_base.pong. Compositors can use this to determine if the client is still alive. It's unspecified what will happen if the client doesn't respond to the ping request, or in what timeframe. Clients should try to respond in a reasonable amount of time. A compositor is free to ping in any way it wants, but a client must always respond to any xdg_wm_base object it created. The xdg_positioner provides a collection of rules for the placement of a child surface relative to a parent surface. Rules can be defined to ensure the child surface remains within the visible area's borders, and to specify how the child surface changes its position, such as sliding along an axis, or flipping around a rectangle. These positioner-created rules are constrained by the requirement that a child surface must intersect with or be at least partially adjacent to its parent surface. See the various requests for details about possible rules. At the time of the request, the compositor makes a copy of the rules specified by the xdg_positioner. Thus, after the request is complete the xdg_positioner object can be destroyed or reused; further changes to the object will have no effect on previous usages. For an xdg_positioner object to be considered complete, it must have a non-zero size set by set_size, and a non-zero anchor rectangle set by set_anchor_rect. Passing an incomplete xdg_positioner object when positioning a surface raises an error. Notify the compositor that the xdg_positioner will no longer be used. Set the size of the surface that is to be positioned with the positioner object. The size is in surface-local coordinates and corresponds to the window geometry. See xdg_surface.set_window_geometry. If a zero or negative size is set the invalid_input error is raised. Specify the anchor rectangle within the parent surface that the child surface will be placed relative to. The rectangle is relative to the window geometry as defined by xdg_surface.set_window_geometry of the parent surface. When the xdg_positioner object is used to position a child surface, the anchor rectangle may not extend outside the window geometry of the positioned child's parent surface. If a negative size is set the invalid_input error is raised. Defines the anchor point for the anchor rectangle. The specified anchor is used derive an anchor point that the child surface will be positioned relative to. If a corner anchor is set (e.g. 'top_left' or 'bottom_right'), the anchor point will be at the specified corner; otherwise, the derived anchor point will be centered on the specified edge, or in the center of the anchor rectangle if no edge is specified. Defines in what direction a surface should be positioned, relative to the anchor point of the parent surface. If a corner gravity is specified (e.g. 'bottom_right' or 'top_left'), then the child surface will be placed towards the specified gravity; otherwise, the child surface will be centered over the anchor point on any axis that had no gravity specified. The constraint adjustment value define ways the compositor will adjust the position of the surface, if the unadjusted position would result in the surface being partly constrained. Whether a surface is considered 'constrained' is left to the compositor to determine. For example, the surface may be partly outside the compositor's defined 'work area', thus necessitating the child surface's position be adjusted until it is entirely inside the work area. The adjustments can be combined, according to a defined precedence: 1) Flip, 2) Slide, 3) Resize. Don't alter the surface position even if it is constrained on some axis, for example partially outside the edge of an output. Slide the surface along the x axis until it is no longer constrained. First try to slide towards the direction of the gravity on the x axis until either the edge in the opposite direction of the gravity is unconstrained or the edge in the direction of the gravity is constrained. Then try to slide towards the opposite direction of the gravity on the x axis until either the edge in the direction of the gravity is unconstrained or the edge in the opposite direction of the gravity is constrained. Slide the surface along the y axis until it is no longer constrained. First try to slide towards the direction of the gravity on the y axis until either the edge in the opposite direction of the gravity is unconstrained or the edge in the direction of the gravity is constrained. Then try to slide towards the opposite direction of the gravity on the y axis until either the edge in the direction of the gravity is unconstrained or the edge in the opposite direction of the gravity is constrained. Invert the anchor and gravity on the x axis if the surface is constrained on the x axis. For example, if the left edge of the surface is constrained, the gravity is 'left' and the anchor is 'left', change the gravity to 'right' and the anchor to 'right'. If the adjusted position also ends up being constrained, the resulting position of the flip_x adjustment will be the one before the adjustment. Invert the anchor and gravity on the y axis if the surface is constrained on the y axis. For example, if the bottom edge of the surface is constrained, the gravity is 'bottom' and the anchor is 'bottom', change the gravity to 'top' and the anchor to 'top'. The adjusted position is calculated given the original anchor rectangle and offset, but with the new flipped anchor and gravity values. If the adjusted position also ends up being constrained, the resulting position of the flip_y adjustment will be the one before the adjustment. Resize the surface horizontally so that it is completely unconstrained. Resize the surface vertically so that it is completely unconstrained. Specify how the window should be positioned if the originally intended position caused the surface to be constrained, meaning at least partially outside positioning boundaries set by the compositor. The adjustment is set by constructing a bitmask describing the adjustment to be made when the surface is constrained on that axis. If no bit for one axis is set, the compositor will assume that the child surface should not change its position on that axis when constrained. If more than one bit for one axis is set, the order of how adjustments are applied is specified in the corresponding adjustment descriptions. The default adjustment is none. Specify the surface position offset relative to the position of the anchor on the anchor rectangle and the anchor on the surface. For example if the anchor of the anchor rectangle is at (x, y), the surface has the gravity bottom|right, and the offset is (ox, oy), the calculated surface position will be (x + ox, y + oy). The offset position of the surface is the one used for constraint testing. See set_constraint_adjustment. An example use case is placing a popup menu on top of a user interface element, while aligning the user interface element of the parent surface with some user interface element placed somewhere in the popup surface. When set reactive, the surface is reconstrained if the conditions used for constraining changed, e.g. the parent window moved. If the conditions changed and the popup was reconstrained, an xdg_popup.configure event is sent with updated geometry, followed by an xdg_surface.configure event. Set the parent window geometry the compositor should use when positioning the popup. The compositor may use this information to determine the future state the popup should be constrained using. If this doesn't match the dimension of the parent the popup is eventually positioned against, the behavior is undefined. The arguments are given in the surface-local coordinate space. Set the serial of an xdg_surface.configure event this positioner will be used in response to. The compositor may use this information together with set_parent_size to determine what future state the popup should be constrained using. An interface that may be implemented by a wl_surface, for implementations that provide a desktop-style user interface. It provides a base set of functionality required to construct user interface elements requiring management by the compositor, such as toplevel windows, menus, etc. The types of functionality are split into xdg_surface roles. Creating an xdg_surface does not set the role for a wl_surface. In order to map an xdg_surface, the client must create a role-specific object using, e.g., get_toplevel, get_popup. The wl_surface for any given xdg_surface can have at most one role, and may not be assigned any role not based on xdg_surface. A role must be assigned before any other requests are made to the xdg_surface object. The client must call wl_surface.commit on the corresponding wl_surface for the xdg_surface state to take effect. Creating an xdg_surface from a wl_surface which has a buffer attached or committed is a client error, and any attempts by a client to attach or manipulate a buffer prior to the first xdg_surface.configure call must also be treated as errors. After creating a role-specific object and setting it up, the client must perform an initial commit without any buffer attached. The compositor will reply with an xdg_surface.configure event. The client must acknowledge it and is then allowed to attach a buffer to map the surface. Mapping an xdg_surface-based role surface is defined as making it possible for the surface to be shown by the compositor. Note that a mapped surface is not guaranteed to be visible once it is mapped. For an xdg_surface to be mapped by the compositor, the following conditions must be met: (1) the client has assigned an xdg_surface-based role to the surface (2) the client has set and committed the xdg_surface state and the role-dependent state to the surface (3) the client has committed a buffer to the surface A newly-unmapped surface is considered to have met condition (1) out of the 3 required conditions for mapping a surface if its role surface has not been destroyed. Destroy the xdg_surface object. An xdg_surface must only be destroyed after its role object has been destroyed. This creates an xdg_toplevel object for the given xdg_surface and gives the associated wl_surface the xdg_toplevel role. See the documentation of xdg_toplevel for more details about what an xdg_toplevel is and how it is used. This creates an xdg_popup object for the given xdg_surface and gives the associated wl_surface the xdg_popup role. If null is passed as a parent, a parent surface must be specified using some other protocol, before committing the initial state. See the documentation of xdg_popup for more details about what an xdg_popup is and how it is used. The window geometry of a surface is its "visible bounds" from the user's perspective. Client-side decorations often have invisible portions like drop-shadows which should be ignored for the purposes of aligning, placing and constraining windows. The window geometry is double buffered, and will be applied at the time wl_surface.commit of the corresponding wl_surface is called. When maintaining a position, the compositor should treat the (x, y) coordinate of the window geometry as the top left corner of the window. A client changing the (x, y) window geometry coordinate should in general not alter the position of the window. Once the window geometry of the surface is set, it is not possible to unset it, and it will remain the same until set_window_geometry is called again, even if a new subsurface or buffer is attached. If never set, the value is the full bounds of the surface, including any subsurfaces. This updates dynamically on every commit. This unset is meant for extremely simple clients. The arguments are given in the surface-local coordinate space of the wl_surface associated with this xdg_surface. The width and height must be greater than zero. Setting an invalid size will raise an error. When applied, the effective window geometry will be the set window geometry clamped to the bounding rectangle of the combined geometry of the surface of the xdg_surface and the associated subsurfaces. When a configure event is received, if a client commits the surface in response to the configure event, then the client must make an ack_configure request sometime before the commit request, passing along the serial of the configure event. For instance, for toplevel surfaces the compositor might use this information to move a surface to the top left only when the client has drawn itself for the maximized or fullscreen state. If the client receives multiple configure events before it can respond to one, it only has to ack the last configure event. A client is not required to commit immediately after sending an ack_configure request - it may even ack_configure several times before its next surface commit. A client may send multiple ack_configure requests before committing, but only the last request sent before a commit indicates which configure event the client really is responding to. The configure event marks the end of a configure sequence. A configure sequence is a set of one or more events configuring the state of the xdg_surface, including the final xdg_surface.configure event. Where applicable, xdg_surface surface roles will during a configure sequence extend this event as a latched state sent as events before the xdg_surface.configure event. Such events should be considered to make up a set of atomically applied configuration states, where the xdg_surface.configure commits the accumulated state. Clients should arrange their surface for the new states, and then send an ack_configure request with the serial sent in this configure event at some point before committing the new surface. If the client receives multiple configure events before it can respond to one, it is free to discard all but the last event it received. This interface defines an xdg_surface role which allows a surface to, among other things, set window-like properties such as maximize, fullscreen, and minimize, set application-specific metadata like title and id, and well as trigger user interactive operations such as interactive resize and move. Unmapping an xdg_toplevel means that the surface cannot be shown by the compositor until it is explicitly mapped again. All active operations (e.g., move, resize) are canceled and all attributes (e.g. title, state, stacking, ...) are discarded for an xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to the state it had right after xdg_surface.get_toplevel. The client can re-map the toplevel by perfoming a commit without any buffer attached, waiting for a configure event and handling it as usual (see xdg_surface description). Attaching a null buffer to a toplevel unmaps the surface. This request destroys the role surface and unmaps the surface; see "Unmapping" behavior in interface section for details. Set the "parent" of this surface. This surface should be stacked above the parent surface and all other ancestor surfaces. Parent windows should be set on dialogs, toolboxes, or other "auxiliary" surfaces, so that the parent is raised when the dialog is raised. Setting a null parent for a child window removes any parent-child relationship for the child. Setting a null parent for a window which currently has no parent is a no-op. If the parent is unmapped then its children are managed as though the parent of the now-unmapped parent has become the parent of this surface. If no parent exists for the now-unmapped parent then the children are managed as though they have no parent surface. Set a short title for the surface. This string may be used to identify the surface in a task bar, window list, or other user interface elements provided by the compositor. The string must be encoded in UTF-8. Set an application identifier for the surface. The app ID identifies the general class of applications to which the surface belongs. The compositor can use this to group multiple surfaces together, or to determine how to launch a new application. For D-Bus activatable applications, the app ID is used as the D-Bus service name. The compositor shell will try to group application surfaces together by their app ID. As a best practice, it is suggested to select app ID's that match the basename of the application's .desktop file. For example, "org.freedesktop.FooViewer" where the .desktop file is "org.freedesktop.FooViewer.desktop". Like other properties, a set_app_id request can be sent after the xdg_toplevel has been mapped to update the property. See the desktop-entry specification [0] for more details on application identifiers and how they relate to well-known D-Bus names and .desktop files. [0] http://standards.freedesktop.org/desktop-entry-spec/ Clients implementing client-side decorations might want to show a context menu when right-clicking on the decorations, giving the user a menu that they can use to maximize or minimize the window. This request asks the compositor to pop up such a window menu at the given position, relative to the local surface coordinates of the parent surface. There are no guarantees as to what menu items the window menu contains. This request must be used in response to some sort of user action like a button press, key press, or touch down event. Start an interactive, user-driven move of the surface. This request must be used in response to some sort of user action like a button press, key press, or touch down event. The passed serial is used to determine the type of interactive move (touch, pointer, etc). The server may ignore move requests depending on the state of the surface (e.g. fullscreen or maximized), or if the passed serial is no longer valid. If triggered, the surface will lose the focus of the device (wl_pointer, wl_touch, etc) used for the move. It is up to the compositor to visually indicate that the move is taking place, such as updating a pointer cursor, during the move. There is no guarantee that the device focus will return when the move is completed. These values are used to indicate which edge of a surface is being dragged in a resize operation. Start a user-driven, interactive resize of the surface. This request must be used in response to some sort of user action like a button press, key press, or touch down event. The passed serial is used to determine the type of interactive resize (touch, pointer, etc). The server may ignore resize requests depending on the state of the surface (e.g. fullscreen or maximized). If triggered, the client will receive configure events with the "resize" state enum value and the expected sizes. See the "resize" enum value for more details about what is required. The client must also acknowledge configure events using "ack_configure". After the resize is completed, the client will receive another "configure" event without the resize state. If triggered, the surface also will lose the focus of the device (wl_pointer, wl_touch, etc) used for the resize. It is up to the compositor to visually indicate that the resize is taking place, such as updating a pointer cursor, during the resize. There is no guarantee that the device focus will return when the resize is completed. The edges parameter specifies how the surface should be resized, and is one of the values of the resize_edge enum. The compositor may use this information to update the surface position for example when dragging the top left corner. The compositor may also use this information to adapt its behavior, e.g. choose an appropriate cursor image. The different state values used on the surface. This is designed for state values like maximized, fullscreen. It is paired with the configure event to ensure that both the client and the compositor setting the state can be synchronized. States set in this way are double-buffered. They will get applied on the next commit. The surface is maximized. The window geometry specified in the configure event must be obeyed by the client. The client should draw without shadow or other decoration outside of the window geometry. The surface is fullscreen. The window geometry specified in the configure event is a maximum; the client cannot resize beyond it. For a surface to cover the whole fullscreened area, the geometry dimensions must be obeyed by the client. For more details, see xdg_toplevel.set_fullscreen. The surface is being resized. The window geometry specified in the configure event is a maximum; the client cannot resize beyond it. Clients that have aspect ratio or cell sizing configuration can use a smaller size, however. Client window decorations should be painted as if the window is active. Do not assume this means that the window actually has keyboard or pointer focus. The window is currently in a tiled layout and the left edge is considered to be adjacent to another part of the tiling grid. The window is currently in a tiled layout and the right edge is considered to be adjacent to another part of the tiling grid. The window is currently in a tiled layout and the top edge is considered to be adjacent to another part of the tiling grid. The window is currently in a tiled layout and the bottom edge is considered to be adjacent to another part of the tiling grid. Set a maximum size for the window. The client can specify a maximum size so that the compositor does not try to configure the window beyond this size. The width and height arguments are in window geometry coordinates. See xdg_surface.set_window_geometry. Values set in this way are double-buffered. They will get applied on the next commit. The compositor can use this information to allow or disallow different states like maximize or fullscreen and draw accurate animations. Similarly, a tiling window manager may use this information to place and resize client windows in a more effective way. The client should not rely on the compositor to obey the maximum size. The compositor may decide to ignore the values set by the client and request a larger size. If never set, or a value of zero in the request, means that the client has no expected maximum size in the given dimension. As a result, a client wishing to reset the maximum size to an unspecified state can use zero for width and height in the request. Requesting a maximum size to be smaller than the minimum size of a surface is illegal and will result in a protocol error. The width and height must be greater than or equal to zero. Using strictly negative values for width and height will result in a protocol error. Set a minimum size for the window. The client can specify a minimum size so that the compositor does not try to configure the window below this size. The width and height arguments are in window geometry coordinates. See xdg_surface.set_window_geometry. Values set in this way are double-buffered. They will get applied on the next commit. The compositor can use this information to allow or disallow different states like maximize or fullscreen and draw accurate animations. Similarly, a tiling window manager may use this information to place and resize client windows in a more effective way. The client should not rely on the compositor to obey the minimum size. The compositor may decide to ignore the values set by the client and request a smaller size. If never set, or a value of zero in the request, means that the client has no expected minimum size in the given dimension. As a result, a client wishing to reset the minimum size to an unspecified state can use zero for width and height in the request. Requesting a minimum size to be larger than the maximum size of a surface is illegal and will result in a protocol error. The width and height must be greater than or equal to zero. Using strictly negative values for width and height will result in a protocol error. Maximize the surface. After requesting that the surface should be maximized, the compositor will respond by emitting a configure event. Whether this configure actually sets the window maximized is subject to compositor policies. The client must then update its content, drawing in the configured state. The client must also acknowledge the configure when committing the new content (see ack_configure). It is up to the compositor to decide how and where to maximize the surface, for example which output and what region of the screen should be used. If the surface was already maximized, the compositor will still emit a configure event with the "maximized" state. If the surface is in a fullscreen state, this request has no direct effect. It may alter the state the surface is returned to when unmaximized unless overridden by the compositor. Unmaximize the surface. After requesting that the surface should be unmaximized, the compositor will respond by emitting a configure event. Whether this actually un-maximizes the window is subject to compositor policies. If available and applicable, the compositor will include the window geometry dimensions the window had prior to being maximized in the configure event. The client must then update its content, drawing it in the configured state. The client must also acknowledge the configure when committing the new content (see ack_configure). It is up to the compositor to position the surface after it was unmaximized; usually the position the surface had before maximizing, if applicable. If the surface was already not maximized, the compositor will still emit a configure event without the "maximized" state. If the surface is in a fullscreen state, this request has no direct effect. It may alter the state the surface is returned to when unmaximized unless overridden by the compositor. Make the surface fullscreen. After requesting that the surface should be fullscreened, the compositor will respond by emitting a configure event. Whether the client is actually put into a fullscreen state is subject to compositor policies. The client must also acknowledge the configure when committing the new content (see ack_configure). The output passed by the request indicates the client's preference as to which display it should be set fullscreen on. If this value is NULL, it's up to the compositor to choose which display will be used to map this surface. If the surface doesn't cover the whole output, the compositor will position the surface in the center of the output and compensate with with border fill covering the rest of the output. The content of the border fill is undefined, but should be assumed to be in some way that attempts to blend into the surrounding area (e.g. solid black). If the fullscreened surface is not opaque, the compositor must make sure that other screen content not part of the same surface tree (made up of subsurfaces, popups or similarly coupled surfaces) are not visible below the fullscreened surface. Make the surface no longer fullscreen. After requesting that the surface should be unfullscreened, the compositor will respond by emitting a configure event. Whether this actually removes the fullscreen state of the client is subject to compositor policies. Making a surface unfullscreen sets states for the surface based on the following: * the state(s) it may have had before becoming fullscreen * any state(s) decided by the compositor * any state(s) requested by the client while the surface was fullscreen The compositor may include the previous window geometry dimensions in the configure event, if applicable. The client must also acknowledge the configure when committing the new content (see ack_configure). Request that the compositor minimize your surface. There is no way to know if the surface is currently minimized, nor is there any way to unset minimization on this surface. If you are looking to throttle redrawing when minimized, please instead use the wl_surface.frame event for this, as this will also work with live previews on windows in Alt-Tab, Expose or similar compositor features. This configure event asks the client to resize its toplevel surface or to change its state. The configured state should not be applied immediately. See xdg_surface.configure for details. The width and height arguments specify a hint to the window about how its surface should be resized in window geometry coordinates. See set_window_geometry. If the width or height arguments are zero, it means the client should decide its own window dimension. This may happen when the compositor needs to configure the state of the surface but doesn't have any information about any previous or expected dimension. The states listed in the event specify how the width/height arguments should be interpreted, and possibly how it should be drawn. Clients must send an ack_configure in response to this event. See xdg_surface.configure and xdg_surface.ack_configure for details. The close event is sent by the compositor when the user wants the surface to be closed. This should be equivalent to the user clicking the close button in client-side decorations, if your application has any. This is only a request that the user intends to close the window. The client may choose to ignore this request, or show a dialog to ask the user to save their data, etc. A popup surface is a short-lived, temporary surface. It can be used to implement for example menus, popovers, tooltips and other similar user interface concepts. A popup can be made to take an explicit grab. See xdg_popup.grab for details. When the popup is dismissed, a popup_done event will be sent out, and at the same time the surface will be unmapped. See the xdg_popup.popup_done event for details. Explicitly destroying the xdg_popup object will also dismiss the popup and unmap the surface. Clients that want to dismiss the popup when another surface of their own is clicked should dismiss the popup using the destroy request. A newly created xdg_popup will be stacked on top of all previously created xdg_popup surfaces associated with the same xdg_toplevel. The parent of an xdg_popup must be mapped (see the xdg_surface description) before the xdg_popup itself. The client must call wl_surface.commit on the corresponding wl_surface for the xdg_popup state to take effect. This destroys the popup. Explicitly destroying the xdg_popup object will also dismiss the popup, and unmap the surface. If this xdg_popup is not the "topmost" popup, a protocol error will be sent. This request makes the created popup take an explicit grab. An explicit grab will be dismissed when the user dismisses the popup, or when the client destroys the xdg_popup. This can be done by the user clicking outside the surface, using the keyboard, or even locking the screen through closing the lid or a timeout. If the compositor denies the grab, the popup will be immediately dismissed. This request must be used in response to some sort of user action like a button press, key press, or touch down event. The serial number of the event should be passed as 'serial'. The parent of a grabbing popup must either be an xdg_toplevel surface or another xdg_popup with an explicit grab. If the parent is another xdg_popup it means that the popups are nested, with this popup now being the topmost popup. Nested popups must be destroyed in the reverse order they were created in, e.g. the only popup you are allowed to destroy at all times is the topmost one. When compositors choose to dismiss a popup, they may dismiss every nested grabbing popup as well. When a compositor dismisses popups, it will follow the same dismissing order as required from the client. The parent of a grabbing popup must either be another xdg_popup with an active explicit grab, or an xdg_popup or xdg_toplevel, if there are no explicit grabs already taken. If the topmost grabbing popup is destroyed, the grab will be returned to the parent of the popup, if that parent previously had an explicit grab. If the parent is a grabbing popup which has already been dismissed, this popup will be immediately dismissed. If the parent is a popup that did not take an explicit grab, an error will be raised. During a popup grab, the client owning the grab will receive pointer and touch events for all their surfaces as normal (similar to an "owner-events" grab in X11 parlance), while the top most grabbing popup will always have keyboard focus. This event asks the popup surface to configure itself given the configuration. The configured state should not be applied immediately. See xdg_surface.configure for details. The x and y arguments represent the position the popup was placed at given the xdg_positioner rule, relative to the upper left corner of the window geometry of the parent surface. For version 2 or older, the configure event for an xdg_popup is only ever sent once for the initial configuration. Starting with version 3, it may be sent again if the popup is setup with an xdg_positioner with set_reactive requested, or in response to xdg_popup.reposition requests. The popup_done event is sent out when a popup is dismissed by the compositor. The client should destroy the xdg_popup object at this point. Reposition an already-mapped popup. The popup will be placed given the details in the passed xdg_positioner object, and a xdg_popup.repositioned followed by xdg_popup.configure and xdg_surface.configure will be emitted in response. Any parameters set by the previous positioner will be discarded. The passed token will be sent in the corresponding xdg_popup.repositioned event. The new popup position will not take effect until the corresponding configure event is acknowledged by the client. See xdg_popup.repositioned for details. The token itself is opaque, and has no other special meaning. If multiple reposition requests are sent, the compositor may skip all but the last one. If the popup is repositioned in response to a configure event for its parent, the client should send an xdg_positioner.set_parent_configure and possibly an xdg_positioner.set_parent_size request to allow the compositor to properly constrain the popup. If the popup is repositioned together with a parent that is being resized, but not in response to a configure event, the client should send an xdg_positioner.set_parent_size request. The repositioned event is sent as part of a popup configuration sequence, together with xdg_popup.configure and lastly xdg_surface.configure to notify the completion of a reposition request. The repositioned event is to notify about the completion of a xdg_popup.reposition request. The token argument is the token passed in the xdg_popup.reposition request. Immediately after this event is emitted, xdg_popup.configure and xdg_surface.configure will be sent with the updated size and position, as well as a new configure serial. The client should optionally update the content of the popup, but must acknowledge the new popup configuration for the new position to take effect. See xdg_surface.ack_configure for details. wayland-protocols-0.29.5/protocols/staging/xdg-activation/README000064400000000000000000000001141046102023000226570ustar 00000000000000XDG Activation protocol Maintainers: Aleix Pol Gonzalez wayland-protocols-0.29.5/protocols/staging/xdg-activation/x11-interoperation.rst000064400000000000000000000051621046102023000262120ustar 00000000000000Interoperation with X11 ======================= *This document is non-normative.* The former X11 startup-notification standard (https://cgit.freedesktop.org/startup-notification/tree/doc/startup-notification.txt) defines the use of the DESKTOP_STARTUP_ID environment variable to propagate startup sequences ("activation tokens" in this protocol) between launcher and launchee. These startup sequence IDs are defined as a globally unique string with a `[unique]_TIME[timestamp]` format, where the ID as a whole is used for startup notification and the timestamp is used for focus requests and focus stealing prevention. In order to observe mixed usage scenarios where Wayland and X11 clients might be launching each other, it is possible for a compositor to manage a shared pool of activation tokens. Scenario 1. Wayland client spawns X11 client -------------------------------------------- 1. Wayland client requests token. 2. Wayland client spawns X11 client, sets `$DESKTOP_STARTUP_ID` in its environment with the token string. 3. X11 client starts. 4. X11 client sends startup-notification `remove` message with the activation `$DESKTOP_STARTUP_ID` content. 5. Compositor receives startup notification message, matches ID with the common pool. 6. The startup feedback is finished. 7. X11 client requests focus. 8. Compositor applies internal policies to allow/deny focus switch. Scenario 2. X11 client spawns Wayland client -------------------------------------------- 1. X11 client builds a "globally unique" ID 2. X11 client sends startup-notification `new` message with the ID. 3. Compositor receives startup notification message, adds the ID to the common pool. 4. X11 client spawns Wayland client, sets `$DESKTOP_STARTUP_ID` in its environment. 5. Wayland client starts. 6. Wayland client sets the activation token, as received from `$DESKTOP_STARTUP_ID`. 7. Compositor receives the request, matches ID with the common pool 8. The startup feedback is finished. 9. Wayland client requests surface activation. 10. Compositor applies internal policies to allow/deny focus switch. Caveats ------- - For legacy reasons, the usage of `$DESKTOP_STARTUP_ID` (even if as a fallback) should be observed in compositors and clients that are concerned with X11 interoperation. - Depending on the X11 startup-notification implementation in use by the compositor, the usage of the `_TIME[timestamp]` suffix may be mandatory for its correct behavior in the first scenario, the startup-notification reference library is one such implementation. Compositors may work this around by adding a matching suffix to the generated activation tokens. wayland-protocols-0.29.5/protocols/staging/xdg-activation/xdg-activation-v1.xml000064400000000000000000000202301046102023000257670ustar 00000000000000 Copyright © 2020 Aleix Pol Gonzalez <aleixpol@kde.org> Copyright © 2020 Carlos Garnacho <carlosg@gnome.org> 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. The way for a client to pass focus to another toplevel is as follows. The client that intends to activate another toplevel uses the xdg_activation_v1.get_activation_token request to get an activation token. This token is then passed to the client to be activated through a separate band of communication. The client to be activated will then pass the token it received to the xdg_activation_v1.activate request. The compositor can then use this token to decide how to react to the activation request. The token the activating client gets may be ineffective either already at the time it receives it, for example if it was not focused, for focus stealing prevention. The activating client will have no way to discover the validity of the token, and may still forward it to the to be activated client. The created activation token may optionally get information attached to it that can be used by the compositor to identify the application that we intend to activate. This can for example be used to display a visual hint about what application is being started. 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. A global interface used for informing the compositor about applications being activated or started, or for applications to request to be activated. Notify the compositor that the xdg_activation object will no longer be used. The child objects created via this interface are unaffected and should be destroyed separately. Creates an xdg_activation_token_v1 object that will provide the initiating client with a unique token for this activation. This token should be offered to the clients to be activated. Requests surface activation. It's up to the compositor to display this information as desired, for example by placing the surface above the rest. The compositor may know who requested this by checking the activation token and might decide not to follow through with the activation if it's considered unwanted. Compositors can ignore unknown presentation tokens when an invalid token is passed. An object for setting up a token and receiving a token handle that can be passed as an activation token to another client. The object is created using the xdg_activation_v1.get_activation_token request. This object should then be populated with the app_id, surface and serial information and committed. The compositor shall then issue a done event with the token. In case the request's parameters are invalid, the compositor will provide an invalid token. Provides information about the seat and serial event that requested the token. Must be sent before commit. This information is optional. The requesting client can specify an app_id to associate the token being created with it. Must be sent before commit. This information is optional. The requesting client can specify a surface to associate the token being created with it. Must be triggered before commit. This information is optional. Requests an activation token based on the different parameters that have been offered through set_serial, set_surface and set_app_id. The 'done' event contains the unique token of this activation request and notifies that the provider is done. Applications will typically receive the token through the XDG_ACTIVATION_TOKEN environment variable as set by its launcher, and should unset the environment variable right after this request, in order to avoid propagating it to child processes. Applications implementing the D-Bus interface org.freedesktop.Application should get their token under XDG_ACTIVATION_TOKEN on their platform_data. Presentation tokens may be transferred across clients through means not described in this protocol. Notify the compositor that the xdg_activation_token_v1 object will no longer be used. wayland-protocols-0.29.5/protocols/tests/build-cxx.cc.in000064400000000000000000000002731046102023000214050ustar 00000000000000#include "@PROTOCOL_CLIENT_INCLUDE_FILE@" #include "@PROTOCOL_SERVER_INCLUDE_FILE@" /* This is a build-test only */ using namespace std; int main(int argc, char **argv) { return 0; } wayland-protocols-0.29.5/protocols/tests/build-pedantic.c.in000064400000000000000000000002451046102023000222260ustar 00000000000000#include "@PROTOCOL_CLIENT_INCLUDE_FILE@" #include "@PROTOCOL_SERVER_INCLUDE_FILE@" /* This is a build-test only */ int main(int argc, char **argv) { return 0; } wayland-protocols-0.29.5/protocols/tests/meson.build000064400000000000000000000062671046102023000207450ustar 00000000000000prog_scan_sh = find_program('scan.sh') prog_scanner = find_program(dep_scanner.get_pkgconfig_variable('wayland_scanner')) libwayland = [ dependency('wayland-client'), dependency('wayland-server'), ] # Check that each protocol passes through the scanner foreach protocol_file : protocol_files protocol_path = join_paths(wayland_protocols_srcdir, protocol_file) test_name = 'scan-@0@'.format(protocol_file.underscorify()) test(test_name, prog_scan_sh, args: protocol_path, env: [ 'SCANNER=@0@'.format(prog_scanner.path()), ] ) endforeach # Check buildability add_languages('c', 'cpp') replace = find_program('replace.py') foreach protocol_file : protocol_files xml_file = fs.name(protocol_file) xml_components = xml_file.split('.') protocol_base_file_name = xml_components[0] protocol_path = files(join_paths(wayland_protocols_srcdir, protocol_file)) client_header_path = '@0@-client.h'.format(protocol_base_file_name) server_header_path = '@0@-server.h'.format(protocol_base_file_name) code_path = '@0@-code.c'.format(protocol_base_file_name) client_header = custom_target( client_header_path, output: client_header_path, input: protocol_path, command: [ prog_scanner, '--strict', 'client-header', '@INPUT@', '@OUTPUT@', ], install: false, ) server_header = custom_target( server_header_path, output: server_header_path, input: protocol_path, command: [ prog_scanner, '--strict', 'server-header', '@INPUT@', '@OUTPUT@', ], install: false, ) code = custom_target( code_path, output: code_path, input: protocol_path, command: [ prog_scanner, '--strict', 'private-code', '@INPUT@', '@OUTPUT@', ], install: false, ) replace_command = [ replace, '@INPUT@', '@OUTPUT@', 'PROTOCOL_CLIENT_INCLUDE_FILE', client_header.full_path(), 'PROTOCOL_SERVER_INCLUDE_FILE', server_header.full_path(), ] # Check that header can be included by a pedantic C99 compiler test_name = 'test-build-pedantic-@0@'.format(protocol_file.underscorify()) test_name_source = '@0@.c'.format(test_name) test_source = custom_target( test_name_source, input: 'build-pedantic.c.in', output: test_name_source, command: replace_command, ) pedantic_test_executable = executable( test_name, [ test_source, client_header, server_header, code ], link_args: [ '-Wl,--unresolved-symbols=ignore-all', ], dependencies: libwayland, c_args: [ '-std=c99', '-pedantic', '-Wall', '-Werror' ], install: false, ) test(test_name, pedantic_test_executable) # Check that the header if not protocol_file.contains('xdg-foreign-unstable-v1') test_name = 'test-build-cxx-@0@'.format(protocol_file.underscorify()) test_name_source = '@0@.cc'.format(test_name) test_source = custom_target( test_name_source, input: 'build-cxx.cc.in', output: test_name_source, command: replace_command, ) cxx_test_executable = executable( test_name, [ test_source, client_header, server_header, ], link_args: [ '-Wl,--unresolved-symbols=ignore-all' ], cpp_args: [ '-Wall', '-Werror', ], install: false, ) test(test_name, cxx_test_executable) endif endforeach wayland-protocols-0.29.5/protocols/tests/replace.py000075500000000000000000000006341046102023000205630ustar 00000000000000#!/usr/bin/python3 import sys execpath, inpath, outpath, *dict_list = sys.argv dictonary = {} while dict_list: key, value, *rest = dict_list dictonary[key] = value dict_list = rest infile = open(inpath, 'r') outfile = open(outpath, 'w') buf = infile.read() infile.close() for key, value in dictonary.items(): buf = buf.replace('@{}@'.format(key), value) outfile.write(buf) outfile.close() wayland-protocols-0.29.5/protocols/tests/scan.sh000075500000000000000000000004331046102023000200530ustar 00000000000000#!/bin/sh -e if [ "x$SCANNER" = "x" ] ; then echo "No scanner present, test skipped." 1>&2 exit 77 fi $SCANNER client-header --strict $1 /dev/null $SCANNER server-header --strict $1 /dev/null $SCANNER private-code --strict $1 /dev/null $SCANNER public-code --strict $1 /dev/null wayland-protocols-0.29.5/protocols/unstable/fullscreen-shell/README000064400000000000000000000001161046102023000233700ustar 00000000000000Fullscreen shell protocol Maintainers: Jason Ekstrand wayland-protocols-0.29.5/protocols/unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml000064400000000000000000000276721046102023000306600ustar 00000000000000 Copyright © 2016 Yong Bakos Copyright © 2015 Jason Ekstrand Copyright © 2015 Jonas Ådahl 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. Displays a single surface per output. This interface provides a mechanism for a single client to display simple full-screen surfaces. While there technically may be multiple clients bound to this interface, only one of those clients should be shown at a time. To present a surface, the client uses either the present_surface or present_surface_for_mode requests. Presenting a surface takes effect on the next wl_surface.commit. See the individual requests for details about scaling and mode switches. The client can have at most one surface per output at any time. Requesting a surface to be presented on an output that already has a surface replaces the previously presented surface. Presenting a null surface removes its content and effectively disables the output. Exactly what happens when an output is "disabled" is compositor-specific. The same surface may be presented on multiple outputs simultaneously. Once a surface is presented on an output, it stays on that output until either the client removes it or the compositor destroys the output. This way, the client can update the output's contents by simply attaching a new buffer. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. Release the binding from the wl_fullscreen_shell interface. This destroys the server-side object and frees this binding. If the client binds to wl_fullscreen_shell multiple times, it may wish to free some of those bindings. Various capabilities that can be advertised by the compositor. They are advertised one-at-a-time when the wl_fullscreen_shell interface is bound. See the wl_fullscreen_shell.capability event for more details. ARBITRARY_MODES: This is a hint to the client that indicates that the compositor is capable of setting practically any mode on its outputs. If this capability is provided, wl_fullscreen_shell.present_surface_for_mode will almost never fail and clients should feel free to set whatever mode they like. If the compositor does not advertise this, it may still support some modes that are not advertised through wl_global.mode but it is less likely. CURSOR_PLANE: This is a hint to the client that indicates that the compositor can handle a cursor surface from the client without actually compositing. This may be because of a hardware cursor plane or some other mechanism. If the compositor does not advertise this capability then setting wl_pointer.cursor may degrade performance or be ignored entirely. If CURSOR_PLANE is not advertised, it is recommended that the client draw its own cursor and set wl_pointer.cursor(NULL). Advertises a single capability of the compositor. When the wl_fullscreen_shell interface is bound, this event is emitted once for each capability advertised. Valid capabilities are given by the wl_fullscreen_shell.capability enum. If clients want to take advantage of any of these capabilities, they should use a wl_display.sync request immediately after binding to ensure that they receive all the capability events. Hints to indicate to the compositor how to deal with a conflict between the dimensions of the surface and the dimensions of the output. The compositor is free to ignore this parameter. Present a surface on the given output. If the output is null, the compositor will present the surface on whatever display (or displays) it thinks best. In particular, this may replace any or all surfaces currently presented so it should not be used in combination with placing surfaces on specific outputs. The method parameter is a hint to the compositor for how the surface is to be presented. In particular, it tells the compositor how to handle a size mismatch between the presented surface and the output. The compositor is free to ignore this parameter. The "zoom", "zoom_crop", and "stretch" methods imply a scaling operation on the surface. This will override any kind of output scaling, so the buffer_scale property of the surface is effectively ignored. This request gives the surface the role of a fullscreen shell surface. If the surface already has another role, it raises a role protocol error. Presents a surface on the given output for a particular mode. If the current size of the output differs from that of the surface, the compositor will attempt to change the size of the output to match the surface. The result of the mode-switch operation will be returned via the provided wl_fullscreen_shell_mode_feedback object. If the current output mode matches the one requested or if the compositor successfully switches the mode to match the surface, then the mode_successful event will be sent and the output will contain the contents of the given surface. If the compositor cannot match the output size to the surface size, the mode_failed will be sent and the output will contain the contents of the previously presented surface (if any). If another surface is presented on the given output before either of these has a chance to happen, the present_cancelled event will be sent. Due to race conditions and other issues unknown to the client, no mode-switch operation is guaranteed to succeed. However, if the mode is one advertised by wl_output.mode or if the compositor advertises the ARBITRARY_MODES capability, then the client should expect that the mode-switch operation will usually succeed. If the size of the presented surface changes, the resulting output is undefined. The compositor may attempt to change the output mode to compensate. However, there is no guarantee that a suitable mode will be found and the client has no way to be notified of success or failure. The framerate parameter specifies the desired framerate for the output in mHz. The compositor is free to ignore this parameter. A value of 0 indicates that the client has no preference. If the value of wl_output.scale differs from wl_surface.buffer_scale, then the compositor may choose a mode that matches either the buffer size or the surface size. In either case, the surface will fill the output. This request gives the surface the role of a fullscreen shell surface. If the surface already has another role, it raises a role protocol error. These errors can be emitted in response to wl_fullscreen_shell requests. This event indicates that the attempted mode switch operation was successful. A surface of the size requested in the mode switch will fill the output without scaling. Upon receiving this event, the client should destroy the wl_fullscreen_shell_mode_feedback object. This event indicates that the attempted mode switch operation failed. This may be because the requested output mode is not possible or it may mean that the compositor does not want to allow it. Upon receiving this event, the client should destroy the wl_fullscreen_shell_mode_feedback object. This event indicates that the attempted mode switch operation was cancelled. Most likely this is because the client requested a second mode switch before the first one completed. Upon receiving this event, the client should destroy the wl_fullscreen_shell_mode_feedback object. wayland-protocols-0.29.5/protocols/unstable/idle-inhibit/README000064400000000000000000000001271046102023000224640ustar 00000000000000Screensaver inhibition protocol Maintainers: Bryce Harrington wayland-protocols-0.29.5/protocols/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml000064400000000000000000000076611046102023000270400ustar 00000000000000 Copyright © 2015 Samsung Electronics Co., Ltd 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. This interface permits inhibiting the idle behavior such as screen blanking, locking, and screensaving. The client binds the idle manager globally, then creates idle-inhibitor objects for each surface. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. Destroy the inhibit manager. Create a new inhibitor object associated with the given surface. An idle inhibitor prevents the output that the associated surface is visible on from being set to a state where it is not visually usable due to lack of user interaction (e.g. blanked, dimmed, locked, set to power save, etc.) Any screensaver processes are also blocked from displaying. If the surface is destroyed, unmapped, becomes occluded, loses visibility, or otherwise becomes not visually relevant for the user, the idle inhibitor will not be honored by the compositor; if the surface subsequently regains visibility the inhibitor takes effect once again. Likewise, the inhibitor isn't honored if the system was already idled at the time the inhibitor was established, although if the system later de-idles and re-idles the inhibitor will take effect. Remove the inhibitor effect from the associated wl_surface. wayland-protocols-0.29.5/protocols/unstable/input-method/README000064400000000000000000000001121046102023000225320ustar 00000000000000Input method protocol Maintainers: Jan Arne Petersen wayland-protocols-0.29.5/protocols/unstable/input-method/input-method-unstable-v1.xml000064400000000000000000000305211046102023000271570ustar 00000000000000 Copyright © 2012, 2013 Intel Corporation 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. Corresponds to a text input on the input method side. An input method context is created on text input activation on the input method side. It allows receiving information about the text input from the application via events. Input method contexts do not keep state after deactivation and should be destroyed after deactivation is handled. Text is generally UTF-8 encoded, indices and lengths are in bytes. Serials are used to synchronize the state between the text input and an input method. New serials are sent by the text input in the commit_state request and are used by the input method to indicate the known text input state in events like preedit_string, commit_string, and keysym. The text input can then ignore events from the input method which are based on an outdated state (for example after a reset). Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. Send the commit string text for insertion to the application. The text to commit could be either just a single character after a key press or the result of some composing (pre-edit). It could be also an empty text when some text should be removed (see delete_surrounding_text) or when the input cursor should be moved (see cursor_position). Any previously set composing text will be removed. Send the pre-edit string text to the application text input. The commit text can be used to replace the pre-edit text on reset (for example on unfocus). Previously sent preedit_style and preedit_cursor requests are also processed by the text_input. Set the styling information on composing text. The style is applied for length in bytes from index relative to the beginning of the composing text (as byte offset). Multiple styles can be applied to a composing text. This request should be sent before sending a preedit_string request. Set the cursor position inside the composing text (as byte offset) relative to the start of the composing text. When index is negative no cursor should be displayed. This request should be sent before sending a preedit_string request. Remove the surrounding text. This request will be handled on the text_input side directly following a commit_string request. Set the cursor and anchor to a new position. Index is the new cursor position in bytes (when >= 0 this is relative to the end of the inserted text, otherwise it is relative to the beginning of the inserted text). Anchor is the new anchor position in bytes (when >= 0 this is relative to the end of the inserted text, otherwise it is relative to the beginning of the inserted text). When there should be no selected text, anchor should be the same as index. This request will be handled on the text_input side directly following a commit_string request. Notify when a key event was sent. Key events should not be used for normal text input operations, which should be done with commit_string, delete_surrounding_text, etc. The key event follows the wl_keyboard key event convention. Sym is an XKB keysym, state is a wl_keyboard key_state. Allow an input method to receive hardware keyboard input and process key events to generate text events (with pre-edit) over the wire. This allows input methods which compose multiple key events for inputting text like it is done for CJK languages. Forward a wl_keyboard::key event to the client that was not processed by the input method itself. Should be used when filtering key events with grab_keyboard. The arguments should be the ones from the wl_keyboard::key event. For generating custom key events use the keysym request instead. Forward a wl_keyboard::modifiers event to the client that was not processed by the input method itself. Should be used when filtering key events with grab_keyboard. The arguments should be the ones from the wl_keyboard::modifiers event. The plain surrounding text around the input position. Cursor is the position in bytes within the surrounding text relative to the beginning of the text. Anchor is the position in bytes of the selection anchor within the surrounding text relative to the beginning of the text. If there is no selected text then anchor is the same as cursor. An input method object is responsible for composing text in response to input from hardware or virtual keyboards. There is one input method object per seat. On activate there is a new input method context object created which allows the input method to communicate with the text input. A text input was activated. Creates an input method context object which allows communication with the text input. The text input corresponding to the context argument was deactivated. The input method context should be destroyed after deactivation is handled. Only one client can bind this interface at a time. Set the input_panel_surface type to keyboard. A keyboard surface is only shown when a text input is active. Set the input_panel_surface to be an overlay panel. This is shown near the input cursor above the application window when a text input is active. wayland-protocols-0.29.5/protocols/unstable/input-timestamps/README000064400000000000000000000001631046102023000234460ustar 00000000000000High-resolution timestamps for input events. Maintainers: Alexandros Frantzis wayland-protocols-0.29.5/protocols/unstable/input-timestamps/input-timestamps-unstable-v1.xml000064400000000000000000000157311046102023000310010ustar 00000000000000 Copyright © 2017 Collabora, Ltd. 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. This protocol specifies a way for a client to request and receive high-resolution timestamps for input events. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. A global interface used for requesting high-resolution timestamps for input events. Informs the server that the client will no longer be using this protocol object. Existing objects created by this object are not affected. Creates a new input timestamps object that represents a subscription to high-resolution timestamp events for all wl_keyboard events that carry a timestamp. If the associated wl_keyboard object is invalidated, either through client action (e.g. release) or server-side changes, the input timestamps object becomes inert and the client should destroy it by calling zwp_input_timestamps_v1.destroy. Creates a new input timestamps object that represents a subscription to high-resolution timestamp events for all wl_pointer events that carry a timestamp. If the associated wl_pointer object is invalidated, either through client action (e.g. release) or server-side changes, the input timestamps object becomes inert and the client should destroy it by calling zwp_input_timestamps_v1.destroy. Creates a new input timestamps object that represents a subscription to high-resolution timestamp events for all wl_touch events that carry a timestamp. If the associated wl_touch object becomes invalid, either through client action (e.g. release) or server-side changes, the input timestamps object becomes inert and the client should destroy it by calling zwp_input_timestamps_v1.destroy. Provides high-resolution timestamp events for a set of subscribed input events. The set of subscribed input events is determined by the zwp_input_timestamps_manager_v1 request used to create this object. Informs the server that the client will no longer be using this protocol object. After the server processes the request, no more timestamp events will be emitted. The timestamp event is associated with the first subsequent input event carrying a timestamp which belongs to the set of input events this object is subscribed to. The timestamp provided by this event is a high-resolution version of the timestamp argument of the associated input event. The provided timestamp is in the same clock domain and is at least as accurate as the associated input event timestamp. The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples, each component being an unsigned 32-bit value. Whole seconds are in tv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo, and the additional fractional part in tv_nsec as nanoseconds. Hence, for valid timestamps tv_nsec must be in [0, 999999999]. wayland-protocols-0.29.5/protocols/unstable/keyboard-shortcuts-inhibit/README000064400000000000000000000001321046102023000253770ustar 00000000000000Compositor shortcuts inhibit protocol Maintainers: Olivier Fourdan ././@LongLink00006440000000000000000000000162000000000000007772Lustar wayland-protocols-0.29.5/protocols/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xmlwayland-protocols-0.29.5/protocols/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-un000064400000000000000000000147651046102023000323630ustar 00000000000000 Copyright © 2017 Red Hat Inc. 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. This protocol specifies a way for a client to request the compositor to ignore its own keyboard shortcuts for a given seat, so that all key events from that seat get forwarded to a surface. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. A global interface used for inhibiting the compositor keyboard shortcuts. Destroy the keyboard shortcuts inhibitor manager. Create a new keyboard shortcuts inhibitor object associated with the given surface for the given seat. If shortcuts are already inhibited for the specified seat and surface, a protocol error "already_inhibited" is raised by the compositor. A keyboard shortcuts inhibitor instructs the compositor to ignore its own keyboard shortcuts when the associated surface has keyboard focus. As a result, when the surface has keyboard focus on the given seat, it will receive all key events originating from the specified seat, even those which would normally be caught by the compositor for its own shortcuts. The Wayland compositor is however under no obligation to disable all of its shortcuts, and may keep some special key combo for its own use, including but not limited to one allowing the user to forcibly restore normal keyboard events routing in the case of an unwilling client. The compositor may also use the same key combo to reactivate an existing shortcut inhibitor that was previously deactivated on user request. When the compositor restores its own keyboard shortcuts, an "inactive" event is emitted to notify the client that the keyboard shortcuts inhibitor is not effectively active for the surface and seat any more, and the client should not expect to receive all keyboard events. When the keyboard shortcuts inhibitor is inactive, the client has no way to forcibly reactivate the keyboard shortcuts inhibitor. The user can chose to re-enable a previously deactivated keyboard shortcuts inhibitor using any mechanism the compositor may offer, in which case the compositor will send an "active" event to notify the client. If the surface is destroyed, unmapped, or loses the seat's keyboard focus, the keyboard shortcuts inhibitor becomes irrelevant and the compositor will restore its own keyboard shortcuts but no "inactive" event is emitted in this case. Remove the keyboard shortcuts inhibitor from the associated wl_surface. This event indicates that the shortcut inhibitor is active. The compositor sends this event every time compositor shortcuts are inhibited on behalf of the surface. When active, the client may receive input events normally reserved by the compositor (see zwp_keyboard_shortcuts_inhibitor_v1). This occurs typically when the initial request "inhibit_shortcuts" first becomes active or when the user instructs the compositor to re-enable and existing shortcuts inhibitor using any mechanism offered by the compositor. This event indicates that the shortcuts inhibitor is inactive, normal shortcuts processing is restored by the compositor. wayland-protocols-0.29.5/protocols/unstable/linux-dmabuf/README000064400000000000000000000001721046102023000225160ustar 00000000000000Linux DMA-BUF protocol Maintainers: Pekka Paalanen Daniel Stone wayland-protocols-0.29.5/protocols/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml000064400000000000000000000437311046102023000271220ustar 00000000000000 Copyright © 2014, 2015 Collabora, Ltd. 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. Following the interfaces from: https://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import_modifiers.txt and the Linux DRM sub-system's AddFb2 ioctl. This interface offers ways to create generic dmabuf-based wl_buffers. Immediately after a client binds to this interface, the set of supported formats and format modifiers is sent with 'format' and 'modifier' events. The following are required from clients: - Clients must ensure that either all data in the dma-buf is coherent for all subsequent read access or that coherency is correctly handled by the underlying kernel-side dma-buf implementation. - Don't make any more attachments after sending the buffer to the compositor. Making more attachments later increases the risk of the compositor not being able to use (re-import) an existing dmabuf-based wl_buffer. The underlying graphics stack must ensure the following: - The dmabuf file descriptors relayed to the server will stay valid for the whole lifetime of the wl_buffer. This means the server may at any time use those fds to import the dmabuf into any kernel sub-system that might accept it. However, when the underlying graphics stack fails to deliver the promise, because of e.g. a device hot-unplug which raises internal errors, after the wl_buffer has been successfully created the compositor must not raise protocol errors to the client when dmabuf import later fails. To create a wl_buffer from one or more dmabufs, a client creates a zwp_linux_dmabuf_params_v1 object with a zwp_linux_dmabuf_v1.create_params request. All planes required by the intended format are added with the 'add' request. Finally, a 'create' or 'create_immed' request is issued, which has the following outcome depending on the import success. The 'create' request, - on success, triggers a 'created' event which provides the final wl_buffer to the client. - on failure, triggers a 'failed' event to convey that the server cannot use the dmabufs received from the client. For the 'create_immed' request, - on success, the server immediately imports the added dmabufs to create a wl_buffer. No event is sent from the server in this case. - on failure, the server can choose to either: - terminate the client by raising a fatal error. - mark the wl_buffer as failed, and send a 'failed' event to the client. If the client uses a failed wl_buffer as an argument to any request, the behaviour is compositor implementation-defined. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. Objects created through this interface, especially wl_buffers, will remain valid. This temporary object is used to collect multiple dmabuf handles into a single batch to create a wl_buffer. It can only be used once and should be destroyed after a 'created' or 'failed' event has been received. This event advertises one buffer format that the server supports. All the supported formats are advertised once when the client binds to this interface. A roundtrip after binding guarantees that the client has received all supported formats. For the definition of the format codes, see the zwp_linux_buffer_params_v1::create request. Warning: the 'format' event is likely to be deprecated and replaced with the 'modifier' event introduced in zwp_linux_dmabuf_v1 version 3, described below. Please refrain from using the information received from this event. This event advertises the formats that the server supports, along with the modifiers supported for each format. All the supported modifiers for all the supported formats are advertised once when the client binds to this interface. A roundtrip after binding guarantees that the client has received all supported format-modifier pairs. For legacy support, DRM_FORMAT_MOD_INVALID (that is, modifier_hi == 0x00ffffff and modifier_lo == 0xffffffff) is allowed in this event. It indicates that the server can support the format with an implicit modifier. When a plane has DRM_FORMAT_MOD_INVALID as its modifier, it is as if no explicit modifier is specified. The effective modifier will be derived from the dmabuf. A compositor that sends valid modifiers and DRM_FORMAT_MOD_INVALID for a given format supports both explicit modifiers and implicit modifiers. For the definition of the format and modifier codes, see the zwp_linux_buffer_params_v1::create and zwp_linux_buffer_params_v1::add requests. This temporary object is a collection of dmabufs and other parameters that together form a single logical buffer. The temporary object may eventually create one wl_buffer unless cancelled by destroying it before requesting 'create'. Single-planar formats only require one dmabuf, however multi-planar formats may require more than one dmabuf. For all formats, an 'add' request must be called once per plane (even if the underlying dmabuf fd is identical). You must use consecutive plane indices ('plane_idx' argument for 'add') from zero to the number of planes used by the drm_fourcc format code. All planes required by the format must be given exactly once, but can be given in any order. Each plane index can be set only once. Cleans up the temporary data sent to the server for dmabuf-based wl_buffer creation. This request adds one dmabuf to the set in this zwp_linux_buffer_params_v1. The 64-bit unsigned value combined from modifier_hi and modifier_lo is the dmabuf layout modifier. DRM AddFB2 ioctl calls this the fb modifier, which is defined in drm_mode.h of Linux UAPI. This is an opaque token. Drivers use this token to express tiling, compression, etc. driver-specific modifications to the base format defined by the DRM fourcc code. Warning: It should be an error if the format/modifier pair was not advertised with the modifier event. This is not enforced yet because some implementations always accept DRM_FORMAT_MOD_INVALID. Also version 2 of this protocol does not have the modifier event. This request raises the PLANE_IDX error if plane_idx is too large. The error PLANE_SET is raised if attempting to set a plane that was already set. This asks for creation of a wl_buffer from the added dmabuf buffers. The wl_buffer is not created immediately but returned via the 'created' event if the dmabuf sharing succeeds. The sharing may fail at runtime for reasons a client cannot predict, in which case the 'failed' event is triggered. The 'format' argument is a DRM_FORMAT code, as defined by the libdrm's drm_fourcc.h. The Linux kernel's DRM sub-system is the authoritative source on how the format codes should work. The 'flags' is a bitfield of the flags defined in enum "flags". 'y_invert' means the that the image needs to be y-flipped. Flag 'interlaced' means that the frame in the buffer is not progressive as usual, but interlaced. An interlaced buffer as supported here must always contain both top and bottom fields. The top field always begins on the first pixel row. The temporal ordering between the two fields is top field first, unless 'bottom_first' is specified. It is undefined whether 'bottom_first' is ignored if 'interlaced' is not set. This protocol does not convey any information about field rate, duration, or timing, other than the relative ordering between the two fields in one buffer. A compositor may have to estimate the intended field rate from the incoming buffer rate. It is undefined whether the time of receiving wl_surface.commit with a new buffer attached, applying the wl_surface state, wl_surface.frame callback trigger, presentation, or any other point in the compositor cycle is used to measure the frame or field times. There is no support for detecting missed or late frames/fields/buffers either, and there is no support whatsoever for cooperating with interlaced compositor output. The composited image quality resulting from the use of interlaced buffers is explicitly undefined. A compositor may use elaborate hardware features or software to deinterlace and create progressive output frames from a sequence of interlaced input buffers, or it may produce substandard image quality. However, compositors that cannot guarantee reasonable image quality in all cases are recommended to just reject all interlaced buffers. Any argument errors, including non-positive width or height, mismatch between the number of planes and the format, bad format, bad offset or stride, may be indicated by fatal protocol errors: INCOMPLETE, INVALID_FORMAT, INVALID_DIMENSIONS, OUT_OF_BOUNDS. Dmabuf import errors in the server that are not obvious client bugs are returned via the 'failed' event as non-fatal. This allows attempting dmabuf sharing and falling back in the client if it fails. This request can be sent only once in the object's lifetime, after which the only legal request is destroy. This object should be destroyed after issuing a 'create' request. Attempting to use this object after issuing 'create' raises ALREADY_USED protocol error. It is not mandatory to issue 'create'. If a client wants to cancel the buffer creation, it can just destroy this object. This event indicates that the attempted buffer creation was successful. It provides the new wl_buffer referencing the dmabuf(s). Upon receiving this event, the client should destroy the zlinux_dmabuf_params object. This event indicates that the attempted buffer creation has failed. It usually means that one of the dmabuf constraints has not been fulfilled. Upon receiving this event, the client should destroy the zlinux_buffer_params object. This asks for immediate creation of a wl_buffer by importing the added dmabufs. In case of import success, no event is sent from the server, and the wl_buffer is ready to be used by the client. Upon import failure, either of the following may happen, as seen fit by the implementation: - the client is terminated with one of the following fatal protocol errors: - INCOMPLETE, INVALID_FORMAT, INVALID_DIMENSIONS, OUT_OF_BOUNDS, in case of argument errors such as mismatch between the number of planes and the format, bad format, non-positive width or height, or bad offset or stride. - INVALID_WL_BUFFER, in case the cause for failure is unknown or plaform specific. - the server creates an invalid wl_buffer, marks it as failed and sends a 'failed' event to the client. The result of using this invalid wl_buffer as an argument in any request by the client is defined by the compositor implementation. This takes the same arguments as a 'create' request, and obeys the same restrictions. wayland-protocols-0.29.5/protocols/unstable/linux-explicit-synchronization/README000064400000000000000000000002371046102023000263420ustar 00000000000000Linux explicit synchronization (dma-fence) protocol Maintainers: Daniel Stone Alexandros Frantzis ././@LongLink00006440000000000000000000000172000000000000007773Lustar wayland-protocols-0.29.5/protocols/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xmlwayland-protocols-0.29.5/protocols/unstable/linux-explicit-synchronization/linux-explicit-synchroniz000064400000000000000000000271311046102023000325710ustar 00000000000000 Copyright 2016 The Chromium Authors. Copyright 2017 Intel Corporation Copyright 2018 Collabora, Ltd 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. This global is a factory interface, allowing clients to request explicit synchronization for buffers on a per-surface basis. See zwp_linux_surface_synchronization_v1 for more information. This interface is derived from Chromium's zcr_linux_explicit_synchronization_v1. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. Destroy this explicit synchronization factory object. Other objects, including zwp_linux_surface_synchronization_v1 objects created by this factory, shall not be affected by this request. Instantiate an interface extension for the given wl_surface to provide explicit synchronization. If the given wl_surface already has an explicit synchronization object associated, the synchronization_exists protocol error is raised. Graphics APIs, like EGL or Vulkan, that manage the buffer queue and commits of a wl_surface themselves, are likely to be using this extension internally. If a client is using such an API for a wl_surface, it should not directly use this extension on that surface, to avoid raising a synchronization_exists protocol error. This object implements per-surface explicit synchronization. Synchronization refers to co-ordination of pipelined operations performed on buffers. Most GPU clients will schedule an asynchronous operation to render to the buffer, then immediately send the buffer to the compositor to be attached to a surface. In implicit synchronization, ensuring that the rendering operation is complete before the compositor displays the buffer is an implementation detail handled by either the kernel or userspace graphics driver. By contrast, in explicit synchronization, dma_fence objects mark when the asynchronous operations are complete. When submitting a buffer, the client provides an acquire fence which will be waited on before the compositor accesses the buffer. The Wayland server, through a zwp_linux_buffer_release_v1 object, will inform the client with an event which may be accompanied by a release fence, when the compositor will no longer access the buffer contents due to the specific commit that requested the release event. Each surface can be associated with only one object of this interface at any time. In version 1 of this interface, explicit synchronization is only guaranteed to be supported for buffers created with any version of the wp_linux_dmabuf buffer factory. Version 2 additionally guarantees explicit synchronization support for opaque EGL buffers, which is a type of platform specific buffers described in the EGL_WL_bind_wayland_display extension. Compositors are free to support explicit synchronization for additional buffer types. Destroy this explicit synchronization object. Any fence set by this object with set_acquire_fence since the last commit will be discarded by the server. Any fences set by this object before the last commit are not affected. zwp_linux_buffer_release_v1 objects created by this object are not affected by this request. Set the acquire fence that must be signaled before the compositor may sample from the buffer attached with wl_surface.attach. The fence is a dma_fence kernel object. The acquire fence is double-buffered state, and will be applied on the next wl_surface.commit request for the associated surface. Thus, it applies only to the buffer that is attached to the surface at commit time. If the provided fd is not a valid dma_fence fd, then an INVALID_FENCE error is raised. If a fence has already been attached during the same commit cycle, a DUPLICATE_FENCE error is raised. If the associated wl_surface was destroyed, a NO_SURFACE error is raised. If at surface commit time the attached buffer does not support explicit synchronization, an UNSUPPORTED_BUFFER error is raised. If at surface commit time there is no buffer attached, a NO_BUFFER error is raised. Create a listener for the release of the buffer attached by the client with wl_surface.attach. See zwp_linux_buffer_release_v1 documentation for more information. The release object is double-buffered state, and will be associated with the buffer that is attached to the surface at wl_surface.commit time. If a zwp_linux_buffer_release_v1 object has already been requested for the surface in the same commit cycle, a DUPLICATE_RELEASE error is raised. If the associated wl_surface was destroyed, a NO_SURFACE error is raised. If at surface commit time there is no buffer attached, a NO_BUFFER error is raised. This object is instantiated in response to a zwp_linux_surface_synchronization_v1.get_release request. It provides an alternative to wl_buffer.release events, providing a unique release from a single wl_surface.commit request. The release event also supports explicit synchronization, providing a fence FD for the client to synchronize against. Exactly one event, either a fenced_release or an immediate_release, will be emitted for the wl_surface.commit request. The compositor can choose release by release which event it uses. This event does not replace wl_buffer.release events; servers are still required to send those events. Once a buffer release object has delivered a 'fenced_release' or an 'immediate_release' event it is automatically destroyed. Sent when the compositor has finalised its usage of the associated buffer for the relevant commit, providing a dma_fence which will be signaled when all operations by the compositor on that buffer for that commit have finished. Once the fence has signaled, and assuming the associated buffer is not pending release from other wl_surface.commit requests, no additional explicit or implicit synchronization is required to safely reuse or destroy the buffer. This event destroys the zwp_linux_buffer_release_v1 object. Sent when the compositor has finalised its usage of the associated buffer for the relevant commit, and either performed no operations using it, or has a guarantee that all its operations on that buffer for that commit have finished. Once this event is received, and assuming the associated buffer is not pending release from other wl_surface.commit requests, no additional explicit or implicit synchronization is required to safely reuse or destroy the buffer. This event destroys the zwp_linux_buffer_release_v1 object. wayland-protocols-0.29.5/protocols/unstable/pointer-constraints/README000064400000000000000000000001131046102023000241430ustar 00000000000000Pointer constraints protocol Maintainers: Jonas Ådahl wayland-protocols-0.29.5/protocols/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml000064400000000000000000000361331046102023000322040ustar 00000000000000 Copyright © 2014 Jonas Ådahl Copyright © 2015 Red Hat Inc. 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. This protocol specifies a set of interfaces used for adding constraints to the motion of a pointer. Possible constraints include confining pointer motions to a given region, or locking it to its current position. In order to constrain the pointer, a client must first bind the global interface "wp_pointer_constraints" which, if a compositor supports pointer constraints, is exposed by the registry. Using the bound global object, the client uses the request that corresponds to the type of constraint it wants to make. See wp_pointer_constraints for more details. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. The global interface exposing pointer constraining functionality. It exposes two requests: lock_pointer for locking the pointer to its position, and confine_pointer for locking the pointer to a region. The lock_pointer and confine_pointer requests create the objects wp_locked_pointer and wp_confined_pointer respectively, and the client can use these objects to interact with the lock. For any surface, only one lock or confinement may be active across all wl_pointer objects of the same seat. If a lock or confinement is requested when another lock or confinement is active or requested on the same surface and with any of the wl_pointer objects of the same seat, an 'already_constrained' error will be raised. These errors can be emitted in response to wp_pointer_constraints requests. These values represent different lifetime semantics. They are passed as arguments to the factory requests to specify how the constraint lifetimes should be managed. A oneshot pointer constraint will never reactivate once it has been deactivated. See the corresponding deactivation event (wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for details. A persistent pointer constraint may again reactivate once it has been deactivated. See the corresponding deactivation event (wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for details. Used by the client to notify the server that it will no longer use this pointer constraints object. The lock_pointer request lets the client request to disable movements of the virtual pointer (i.e. the cursor), effectively locking the pointer to a position. This request may not take effect immediately; in the future, when the compositor deems implementation-specific constraints are satisfied, the pointer lock will be activated and the compositor sends a locked event. The protocol provides no guarantee that the constraints are ever satisfied, and does not require the compositor to send an error if the constraints cannot ever be satisfied. It is thus possible to request a lock that will never activate. There may not be another pointer constraint of any kind requested or active on the surface for any of the wl_pointer objects of the seat of the passed pointer when requesting a lock. If there is, an error will be raised. See general pointer lock documentation for more details. The intersection of the region passed with this request and the input region of the surface is used to determine where the pointer must be in order for the lock to activate. It is up to the compositor whether to warp the pointer or require some kind of user interaction for the lock to activate. If the region is null the surface input region is used. A surface may receive pointer focus without the lock being activated. The request creates a new object wp_locked_pointer which is used to interact with the lock as well as receive updates about its state. See the the description of wp_locked_pointer for further information. Note that while a pointer is locked, the wl_pointer objects of the corresponding seat will not emit any wl_pointer.motion events, but relative motion events will still be emitted via wp_relative_pointer objects of the same seat. wl_pointer.axis and wl_pointer.button events are unaffected. The confine_pointer request lets the client request to confine the pointer cursor to a given region. This request may not take effect immediately; in the future, when the compositor deems implementation- specific constraints are satisfied, the pointer confinement will be activated and the compositor sends a confined event. The intersection of the region passed with this request and the input region of the surface is used to determine where the pointer must be in order for the confinement to activate. It is up to the compositor whether to warp the pointer or require some kind of user interaction for the confinement to activate. If the region is null the surface input region is used. The request will create a new object wp_confined_pointer which is used to interact with the confinement as well as receive updates about its state. See the the description of wp_confined_pointer for further information. The wp_locked_pointer interface represents a locked pointer state. While the lock of this object is active, the wl_pointer objects of the associated seat will not emit any wl_pointer.motion events. This object will send the event 'locked' when the lock is activated. Whenever the lock is activated, it is guaranteed that the locked surface will already have received pointer focus and that the pointer will be within the region passed to the request creating this object. To unlock the pointer, send the destroy request. This will also destroy the wp_locked_pointer object. If the compositor decides to unlock the pointer the unlocked event is sent. See wp_locked_pointer.unlock for details. When unlocking, the compositor may warp the cursor position to the set cursor position hint. If it does, it will not result in any relative motion events emitted via wp_relative_pointer. If the surface the lock was requested on is destroyed and the lock is not yet activated, the wp_locked_pointer object is now defunct and must be destroyed. Destroy the locked pointer object. If applicable, the compositor will unlock the pointer. Set the cursor position hint relative to the top left corner of the surface. If the client is drawing its own cursor, it should update the position hint to the position of its own cursor. A compositor may use this information to warp the pointer upon unlock in order to avoid pointer jumps. The cursor position hint is double buffered. The new hint will only take effect when the associated surface gets it pending state applied. See wl_surface.commit for details. Set a new region used to lock the pointer. The new lock region is double-buffered. The new lock region will only take effect when the associated surface gets its pending state applied. See wl_surface.commit for details. For details about the lock region, see wp_locked_pointer. Notification that the pointer lock of the seat's pointer is activated. Notification that the pointer lock of the seat's pointer is no longer active. If this is a oneshot pointer lock (see wp_pointer_constraints.lifetime) this object is now defunct and should be destroyed. If this is a persistent pointer lock (see wp_pointer_constraints.lifetime) this pointer lock may again reactivate in the future. The wp_confined_pointer interface represents a confined pointer state. This object will send the event 'confined' when the confinement is activated. Whenever the confinement is activated, it is guaranteed that the surface the pointer is confined to will already have received pointer focus and that the pointer will be within the region passed to the request creating this object. It is up to the compositor to decide whether this requires some user interaction and if the pointer will warp to within the passed region if outside. To unconfine the pointer, send the destroy request. This will also destroy the wp_confined_pointer object. If the compositor decides to unconfine the pointer the unconfined event is sent. The wp_confined_pointer object is at this point defunct and should be destroyed. Destroy the confined pointer object. If applicable, the compositor will unconfine the pointer. Set a new region used to confine the pointer. The new confine region is double-buffered. The new confine region will only take effect when the associated surface gets its pending state applied. See wl_surface.commit for details. If the confinement is active when the new confinement region is applied and the pointer ends up outside of newly applied region, the pointer may warped to a position within the new confinement region. If warped, a wl_pointer.motion event will be emitted, but no wp_relative_pointer.relative_motion event. The compositor may also, instead of using the new region, unconfine the pointer. For details about the confine region, see wp_confined_pointer. Notification that the pointer confinement of the seat's pointer is activated. Notification that the pointer confinement of the seat's pointer is no longer active. If this is a oneshot pointer confinement (see wp_pointer_constraints.lifetime) this object is now defunct and should be destroyed. If this is a persistent pointer confinement (see wp_pointer_constraints.lifetime) this pointer confinement may again reactivate in the future. wayland-protocols-0.29.5/protocols/unstable/pointer-gestures/README000064400000000000000000000001141046102023000234360ustar 00000000000000Pointer gestures protocol Maintainers: Carlos Garnacho wayland-protocols-0.29.5/protocols/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml000064400000000000000000000202511046102023000307620ustar 00000000000000 A global interface to provide semantic touchpad gestures for a given pointer. Two gestures are currently supported: swipe and pinch. All gestures follow a three-stage cycle: begin, update, end and are identified by a unique id. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. Create a swipe gesture object. See the wl_pointer_gesture_swipe interface for details. Create a pinch gesture object. See the wl_pointer_gesture_pinch interface for details. Destroy the pointer gesture object. Swipe and pinch objects created via this gesture object remain valid. A swipe gesture object notifies a client about a multi-finger swipe gesture detected on an indirect input device such as a touchpad. The gesture is usually initiated by multiple fingers moving in the same direction but once initiated the direction may change. The precise conditions of when such a gesture is detected are implementation-dependent. A gesture consists of three stages: begin, update (optional) and end. There cannot be multiple simultaneous pinch or swipe gestures on a same pointer/seat, how compositors prevent these situations is implementation-dependent. A gesture may be cancelled by the compositor or the hardware. Clients should not consider performing permanent or irreversible actions until the end of a gesture has been received. This event is sent when a multi-finger swipe gesture is detected on the device. This event is sent when a multi-finger swipe gesture changes the position of the logical center. The dx and dy coordinates are relative coordinates of the logical center of the gesture compared to the previous event. This event is sent when a multi-finger swipe gesture ceases to be valid. This may happen when one or more fingers are lifted or the gesture is cancelled. When a gesture is cancelled, the client should undo state changes caused by this gesture. What causes a gesture to be cancelled is implementation-dependent. A pinch gesture object notifies a client about a multi-finger pinch gesture detected on an indirect input device such as a touchpad. The gesture is usually initiated by multiple fingers moving towards each other or away from each other, or by two or more fingers rotating around a logical center of gravity. The precise conditions of when such a gesture is detected are implementation-dependent. A gesture consists of three stages: begin, update (optional) and end. There cannot be multiple simultaneous pinch or swipe gestures on a same pointer/seat, how compositors prevent these situations is implementation-dependent. A gesture may be cancelled by the compositor or the hardware. Clients should not consider performing permanent or irreversible actions until the end of a gesture has been received. This event is sent when a multi-finger pinch gesture is detected on the device. This event is sent when a multi-finger pinch gesture changes the position of the logical center, the rotation or the relative scale. The dx and dy coordinates are relative coordinates in the surface coordinate space of the logical center of the gesture. The scale factor is an absolute scale compared to the pointer_gesture_pinch.begin event, e.g. a scale of 2 means the fingers are now twice as far apart as on pointer_gesture_pinch.begin. The rotation is the relative angle in degrees clockwise compared to the previous pointer_gesture_pinch.begin or pointer_gesture_pinch.update event. This event is sent when a multi-finger pinch gesture ceases to be valid. This may happen when one or more fingers are lifted or the gesture is cancelled. When a gesture is cancelled, the client should undo state changes caused by this gesture. What causes a gesture to be cancelled is implementation-dependent. wayland-protocols-0.29.5/protocols/unstable/primary-selection/README000064400000000000000000000001111046102023000235620ustar 00000000000000Primary selection protocol Maintainers: Simon Ser wayland-protocols-0.29.5/protocols/unstable/primary-selection/primary-selection-unstable-v1.xml000064400000000000000000000243451046102023000312500ustar 00000000000000 Copyright © 2015, 2016 Red Hat 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. This protocol provides the ability to have a primary selection device to match that of the X server. This primary selection is a shortcut to the common clipboard selection, where text just needs to be selected in order to allow copying it elsewhere. The de facto way to perform this action is the middle mouse button, although it is not limited to this one. Clients wishing to honor primary selection should create a primary selection source and set it as the selection through wp_primary_selection_device.set_selection whenever the text selection changes. In order to minimize calls in pointer-driven text selection, it should happen only once after the operation finished. Similarly, a NULL source should be set when text is unselected. wp_primary_selection_offer objects are first announced through the wp_primary_selection_device.data_offer event. Immediately after this event, the primary data offer will emit wp_primary_selection_offer.offer events to let know of the mime types being offered. When the primary selection changes, the client with the keyboard focus will receive wp_primary_selection_device.selection events. Only the client with the keyboard focus will receive such events with a non-NULL wp_primary_selection_offer. Across keyboard focus changes, previously focused clients will receive wp_primary_selection_device.events with a NULL wp_primary_selection_offer. In order to request the primary selection data, the client must pass a recent serial pertaining to the press event that is triggering the operation, if the compositor deems the serial valid and recent, the wp_primary_selection_source.send event will happen in the other end to let the transfer begin. The client owning the primary selection should write the requested data, and close the file descriptor immediately. If the primary selection owner client disappeared during the transfer, the client reading the data will receive a wp_primary_selection_device.selection event with a NULL wp_primary_selection_offer, the client should take this as a hint to finish the reads related to the no longer existing offer. The primary selection owner should be checking for errors during writes, merely cancelling the ongoing transfer if any happened. The primary selection device manager is a singleton global object that provides access to the primary selection. It allows to create wp_primary_selection_source objects, as well as retrieving the per-seat wp_primary_selection_device objects. Create a new primary selection source. Create a new data device for a given seat. Destroy the primary selection device manager. Replaces the current selection. The previous owner of the primary selection will receive a wp_primary_selection_source.cancelled event. To unset the selection, set the source to NULL. Introduces a new wp_primary_selection_offer object that may be used to receive the current primary selection. Immediately following this event, the new wp_primary_selection_offer object will send wp_primary_selection_offer.offer events to describe the offered mime types. The wp_primary_selection_device.selection event is sent to notify the client of a new primary selection. This event is sent after the wp_primary_selection.data_offer event introducing this object, and after the offer has announced its mimetypes through wp_primary_selection_offer.offer. The data_offer is valid until a new offer or NULL is received or until the client loses keyboard focus. The client must destroy the previous selection data_offer, if any, upon receiving this event. Destroy the primary selection device. A wp_primary_selection_offer represents an offer to transfer the contents of the primary selection clipboard to the client. Similar to wl_data_offer, the offer also describes the mime types that the data can be converted to and provides the mechanisms for transferring the data directly to the client. To transfer the contents of the primary selection clipboard, the client issues this request and indicates the mime type that it wants to receive. The transfer happens through the passed file descriptor (typically created with the pipe system call). The source client writes the data in the mime type representation requested and then closes the file descriptor. The receiving client reads from the read end of the pipe until EOF and closes its end, at which point the transfer is complete. Destroy the primary selection offer. Sent immediately after creating announcing the wp_primary_selection_offer through wp_primary_selection_device.data_offer. One event is sent per offered mime type. The source side of a wp_primary_selection_offer, it provides a way to describe the offered data and respond to requests to transfer the requested contents of the primary selection clipboard. This request adds a mime type to the set of mime types advertised to targets. Can be called several times to offer multiple types. Destroy the primary selection source. Request for the current primary selection contents from the client. Send the specified mime type over the passed file descriptor, then close it. This primary selection source is no longer valid. The client should clean up and destroy this primary selection source. wayland-protocols-0.29.5/protocols/unstable/relative-pointer/README000064400000000000000000000001101046102023000234040ustar 00000000000000Relative pointer protocol Maintainers: Jonas Ådahl wayland-protocols-0.29.5/protocols/unstable/relative-pointer/relative-pointer-unstable-v1.xml000064400000000000000000000146701046102023000307160ustar 00000000000000 Copyright © 2014 Jonas Ådahl Copyright © 2015 Red Hat Inc. 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. This protocol specifies a set of interfaces used for making clients able to receive relative pointer events not obstructed by barriers (such as the monitor edge or other pointer barriers). To start receiving relative pointer events, a client must first bind the global interface "wp_relative_pointer_manager" which, if a compositor supports relative pointer motion events, is exposed by the registry. After having created the relative pointer manager proxy object, the client uses it to create the actual relative pointer object using the "get_relative_pointer" request given a wl_pointer. The relative pointer motion events will then, when applicable, be transmitted via the proxy of the newly created relative pointer object. See the documentation of the relative pointer interface for more details. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. A global interface used for getting the relative pointer object for a given pointer. Used by the client to notify the server that it will no longer use this relative pointer manager object. Create a relative pointer interface given a wl_pointer object. See the wp_relative_pointer interface for more details. A wp_relative_pointer object is an extension to the wl_pointer interface used for emitting relative pointer events. It shares the same focus as wl_pointer objects of the same seat and will only emit events when it has focus. Relative x/y pointer motion from the pointer of the seat associated with this object. A relative motion is in the same dimension as regular wl_pointer motion events, except they do not represent an absolute position. For example, moving a pointer from (x, y) to (x', y') would have the equivalent relative motion (x' - x, y' - y). If a pointer motion caused the absolute pointer position to be clipped by for example the edge of the monitor, the relative motion is unaffected by the clipping and will represent the unclipped motion. This event also contains non-accelerated motion deltas. The non-accelerated delta is, when applicable, the regular pointer motion delta as it was before having applied motion acceleration and other transformations such as normalization. Note that the non-accelerated delta does not represent 'raw' events as they were read from some device. Pointer motion acceleration is device- and configuration-specific and non-accelerated deltas and accelerated deltas may have the same value on some devices. Relative motions are not coupled to wl_pointer.motion events, and can be sent in combination with such events, but also independently. There may also be scenarios where wl_pointer.motion is sent, but there is no relative motion. The order of an absolute and relative motion event originating from the same physical motion is not guaranteed. If the client needs button events or focus state, it can receive them from a wl_pointer object of the same seat that the wp_relative_pointer object is associated with. wayland-protocols-0.29.5/protocols/unstable/tablet/README000064400000000000000000000001101046102023000213660ustar 00000000000000Tablet protocol Maintainers: Peter Hutterer wayland-protocols-0.29.5/protocols/unstable/tablet/tablet-unstable-v1.xml000064400000000000000000000701641046102023000246620ustar 00000000000000 Copyright 2014 © Stephen "Lyude" Chandler Paul Copyright 2015-2016 © Red Hat, Inc. 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. This description provides a high-level overview of the interplay between the interfaces defined this protocol. For details, see the protocol specification. More than one tablet may exist, and device-specifics matter. Tablets are not represented by a single virtual device like wl_pointer. A client binds to the tablet manager object which is just a proxy object. From that, the client requests wp_tablet_manager.get_tablet_seat(wl_seat) and that returns the actual interface that has all the tablets. With this indirection, we can avoid merging wp_tablet into the actual Wayland protocol, a long-term benefit. The wp_tablet_seat sends a "tablet added" event for each tablet connected. That event is followed by descriptive events about the hardware; currently that includes events for name, vid/pid and a wp_tablet.path event that describes a local path. This path can be used to uniquely identify a tablet or get more information through libwacom. Emulated or nested tablets can skip any of those, e.g. a virtual tablet may not have a vid/pid. The sequence of descriptive events is terminated by a wp_tablet.done event to signal that a client may now finalize any initialization for that tablet. Events from tablets require a tool in proximity. Tools are also managed by the tablet seat; a "tool added" event is sent whenever a tool is new to the compositor. That event is followed by a number of descriptive events about the hardware; currently that includes capabilities, hardware id and serial number, and tool type. Similar to the tablet interface, a wp_tablet_tool.done event is sent to terminate that initial sequence. Any event from a tool happens on the wp_tablet_tool interface. When the tool gets into proximity of the tablet, a proximity_in event is sent on the wp_tablet_tool interface, listing the tablet and the surface. That event is followed by a motion event with the coordinates. After that, it's the usual motion, axis, button, etc. events. The protocol's serialisation means events are grouped by wp_tablet_tool.frame events. Two special events (that don't exist in X) are down and up. They signal "tip touching the surface". For tablets without real proximity detection, the sequence is: proximity_in, motion, down, frame. When the tool leaves proximity, a proximity_out event is sent. If any button is still down, a button release event is sent before this proximity event. These button events are sent in the same frame as the proximity event to signal to the client that the buttons were held when the tool left proximity. If the tool moves out of the surface but stays in proximity (i.e. between windows), compositor-specific grab policies apply. This usually means that the proximity-out is delayed until all buttons are released. Moving a tool physically from one tablet to the other has no real effect on the protocol, since we already have the tool object from the "tool added" event. All the information is already there and the proximity events on both tablets are all a client needs to reconstruct what happened. Some extra axes are normalized, i.e. the client knows the range as specified in the protocol (e.g. [0, 65535]), the granularity however is unknown. The current normalized axes are pressure, distance, and slider. Other extra axes are in physical units as specified in the protocol. The current extra axes with physical units are tilt, rotation and wheel rotation. Since tablets work independently of the pointer controlled by the mouse, the focus handling is independent too and controlled by proximity. The wp_tablet_tool.set_cursor request sets a tool-specific cursor. This cursor surface may be the same as the mouse cursor, and it may be the same across tools but it is possible to be more fine-grained. For example, a client may set different cursors for the pen and eraser. Tools are generally independent of tablets and it is compositor-specific policy when a tool can be removed. Common approaches will likely include some form of removing a tool when all tablets the tool was used on are removed. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. An object that provides access to the graphics tablets available on this system. All tablets are associated with a seat, to get access to the actual tablets, use wp_tablet_manager.get_tablet_seat. Get the wp_tablet_seat object for the given seat. This object provides access to all graphics tablets in this seat. Destroy the wp_tablet_manager object. Objects created from this object are unaffected and should be destroyed separately. An object that provides access to the graphics tablets available on this seat. After binding to this interface, the compositor sends a set of wp_tablet_seat.tablet_added and wp_tablet_seat.tool_added events. Destroy the wp_tablet_seat object. Objects created from this object are unaffected and should be destroyed separately. This event is sent whenever a new tablet becomes available on this seat. This event only provides the object id of the tablet, any static information about the tablet (device name, vid/pid, etc.) is sent through the wp_tablet interface. This event is sent whenever a tool that has not previously been used with a tablet comes into use. This event only provides the object id of the tool; any static information about the tool (capabilities, type, etc.) is sent through the wp_tablet_tool interface. An object that represents a physical tool that has been, or is currently in use with a tablet in this seat. Each wp_tablet_tool object stays valid until the client destroys it; the compositor reuses the wp_tablet_tool object to indicate that the object's respective physical tool has come into proximity of a tablet again. A wp_tablet_tool object's relation to a physical tool depends on the tablet's ability to report serial numbers. If the tablet supports this capability, then the object represents a specific physical tool and can be identified even when used on multiple tablets. A tablet tool has a number of static characteristics, e.g. tool type, hardware_serial and capabilities. These capabilities are sent in an event sequence after the wp_tablet_seat.tool_added event before any actual events from this tool. This initial event sequence is terminated by a wp_tablet_tool.done event. Tablet tool events are grouped by wp_tablet_tool.frame events. Any events received before a wp_tablet_tool.frame event should be considered part of the same hardware state change. Sets the surface of the cursor used for this tool on the given tablet. This request only takes effect if the tool is in proximity of one of the requesting client's surfaces or the surface parameter is the current pointer surface. If there was a previous surface set with this request it is replaced. If surface is NULL, the cursor image is hidden. The parameters hotspot_x and hotspot_y define the position of the pointer surface relative to the pointer location. Its top-left corner is always at (x, y) - (hotspot_x, hotspot_y), where (x, y) are the coordinates of the pointer location, in surface-local coordinates. On surface.attach requests to the pointer surface, hotspot_x and hotspot_y are decremented by the x and y parameters passed to the request. Attach must be confirmed by wl_surface.commit as usual. The hotspot can also be updated by passing the currently set pointer surface to this request with new values for hotspot_x and hotspot_y. The current and pending input regions of the wl_surface are cleared, and wl_surface.set_input_region is ignored until the wl_surface is no longer used as the cursor. When the use as a cursor ends, the current and pending input regions become undefined, and the wl_surface is unmapped. This request gives the surface the role of a cursor. The role assigned by this request is the same as assigned by wl_pointer.set_cursor meaning the same surface can be used both as a wl_pointer cursor and a wp_tablet cursor. If the surface already has another role, it raises a protocol error. The surface may be used on multiple tablets and across multiple seats. This destroys the client's resource for this tool object. Describes the physical type of a tool. The physical type of a tool generally defines its base usage. The mouse tool represents a mouse-shaped tool that is not a relative device but bound to the tablet's surface, providing absolute coordinates. The lens tool is a mouse-shaped tool with an attached lens to provide precision focus. The tool type is the high-level type of the tool and usually decides the interaction expected from this tool. This event is sent in the initial burst of events before the wp_tablet_tool.done event. If the physical tool can be identified by a unique 64-bit serial number, this event notifies the client of this serial number. If multiple tablets are available in the same seat and the tool is uniquely identifiable by the serial number, that tool may move between tablets. Otherwise, if the tool has no serial number and this event is missing, the tool is tied to the tablet it first comes into proximity with. Even if the physical tool is used on multiple tablets, separate wp_tablet_tool objects will be created, one per tablet. This event is sent in the initial burst of events before the wp_tablet_tool.done event. This event notifies the client of a hardware id available on this tool. The hardware id is a device-specific 64-bit id that provides extra information about the tool in use, beyond the wl_tool.type enumeration. The format of the id is specific to tablets made by Wacom Inc. For example, the hardware id of a Wacom Grip Pen (a stylus) is 0x802. This event is sent in the initial burst of events before the wp_tablet_tool.done event. Describes extra capabilities on a tablet. Any tool must provide x and y values, extra axes are device-specific. This event notifies the client of any capabilities of this tool, beyond the main set of x/y axes and tip up/down detection. One event is sent for each extra capability available on this tool. This event is sent in the initial burst of events before the wp_tablet_tool.done event. This event signals the end of the initial burst of descriptive events. A client may consider the static description of the tool to be complete and finalize initialization of the tool. This event is sent when the tool is removed from the system and will send no further events. Should the physical tool come back into proximity later, a new wp_tablet_tool object will be created. It is compositor-dependent when a tool is removed. A compositor may remove a tool on proximity out, tablet removal or any other reason. A compositor may also keep a tool alive until shutdown. If the tool is currently in proximity, a proximity_out event will be sent before the removed event. See wp_tablet_tool.proximity_out for the handling of any buttons logically down. When this event is received, the client must wp_tablet_tool.destroy the object. Notification that this tool is focused on a certain surface. This event can be received when the tool has moved from one surface to another, or when the tool has come back into proximity above the surface. If any button is logically down when the tool comes into proximity, the respective button event is sent after the proximity_in event but within the same frame as the proximity_in event. Notification that this tool has either left proximity, or is no longer focused on a certain surface. When the tablet tool leaves proximity of the tablet, button release events are sent for each button that was held down at the time of leaving proximity. These events are sent before the proximity_out event but within the same wp_tablet.frame. If the tool stays within proximity of the tablet, but the focus changes from one surface to another, a button release event may not be sent until the button is actually released or the tool leaves the proximity of the tablet. Sent whenever the tablet tool comes in contact with the surface of the tablet. If the tool is already in contact with the tablet when entering the input region, the client owning said region will receive a wp_tablet.proximity_in event, followed by a wp_tablet.down event and a wp_tablet.frame event. Note that this event describes logical contact, not physical contact. On some devices, a compositor may not consider a tool in logical contact until a minimum physical pressure threshold is exceeded. Sent whenever the tablet tool stops making contact with the surface of the tablet, or when the tablet tool moves out of the input region and the compositor grab (if any) is dismissed. If the tablet tool moves out of the input region while in contact with the surface of the tablet and the compositor does not have an ongoing grab on the surface, the client owning said region will receive a wp_tablet.up event, followed by a wp_tablet.proximity_out event and a wp_tablet.frame event. If the compositor has an ongoing grab on this device, this event sequence is sent whenever the grab is dismissed in the future. Note that this event describes logical contact, not physical contact. On some devices, a compositor may not consider a tool out of logical contact until physical pressure falls below a specific threshold. Sent whenever a tablet tool moves. Sent whenever the pressure axis on a tool changes. The value of this event is normalized to a value between 0 and 65535. Note that pressure may be nonzero even when a tool is not in logical contact. See the down and up events for more details. Sent whenever the distance axis on a tool changes. The value of this event is normalized to a value between 0 and 65535. Note that distance may be nonzero even when a tool is not in logical contact. See the down and up events for more details. Sent whenever one or both of the tilt axes on a tool change. Each tilt value is in 0.01 of a degree, relative to the z-axis of the tablet. The angle is positive when the top of a tool tilts along the positive x or y axis. Sent whenever the z-rotation axis on the tool changes. The rotation value is in 0.01 of a degree clockwise from the tool's logical neutral position. Sent whenever the slider position on the tool changes. The value is normalized between -65535 and 65535, with 0 as the logical neutral position of the slider. The slider is available on e.g. the Wacom Airbrush tool. Sent whenever the wheel on the tool emits an event. This event contains two values for the same axis change. The degrees value is in 0.01 of a degree in the same orientation as the wl_pointer.vertical_scroll axis. The clicks value is in discrete logical clicks of the mouse wheel. This value may be zero if the movement of the wheel was less than one logical click. Clients should choose either value and avoid mixing degrees and clicks. The compositor may accumulate values smaller than a logical click and emulate click events when a certain threshold is met. Thus, wl_tablet_tool.wheel events with non-zero clicks values may have different degrees values. Describes the physical state of a button that produced the button event. Sent whenever a button on the tool is pressed or released. If a button is held down when the tool moves in or out of proximity, button events are generated by the compositor. See wp_tablet_tool.proximity_in and wp_tablet_tool.proximity_out for details. Marks the end of a series of axis and/or button updates from the tablet. The Wayland protocol requires axis updates to be sent sequentially, however all events within a frame should be considered one hardware event. The wp_tablet interface represents one graphics tablet device. The tablet interface itself does not generate events; all events are generated by wp_tablet_tool objects when in proximity above a tablet. A tablet has a number of static characteristics, e.g. device name and pid/vid. These capabilities are sent in an event sequence after the wp_tablet_seat.tablet_added event. This initial event sequence is terminated by a wp_tablet.done event. This destroys the client's resource for this tablet object. This event is sent in the initial burst of events before the wp_tablet.done event. This event is sent in the initial burst of events before the wp_tablet.done event. A system-specific device path that indicates which device is behind this wp_tablet. This information may be used to gather additional information about the device, e.g. through libwacom. A device may have more than one device path. If so, multiple wp_tablet.path events are sent. A device may be emulated and not have a device path, and in that case this event will not be sent. The format of the path is unspecified, it may be a device node, a sysfs path, or some other identifier. It is up to the client to identify the string provided. This event is sent in the initial burst of events before the wp_tablet.done event. This event is sent immediately to signal the end of the initial burst of descriptive events. A client may consider the static description of the tablet to be complete and finalize initialization of the tablet. Sent when the tablet has been removed from the system. When a tablet is removed, some tools may be removed. When this event is received, the client must wp_tablet.destroy the object. wayland-protocols-0.29.5/protocols/unstable/tablet/tablet-unstable-v2.xml000064400000000000000000001447731046102023000246730ustar 00000000000000 Copyright 2014 © Stephen "Lyude" Chandler Paul Copyright 2015-2016 © Red Hat, Inc. 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. This description provides a high-level overview of the interplay between the interfaces defined this protocol. For details, see the protocol specification. More than one tablet may exist, and device-specifics matter. Tablets are not represented by a single virtual device like wl_pointer. A client binds to the tablet manager object which is just a proxy object. From that, the client requests wp_tablet_manager.get_tablet_seat(wl_seat) and that returns the actual interface that has all the tablets. With this indirection, we can avoid merging wp_tablet into the actual Wayland protocol, a long-term benefit. The wp_tablet_seat sends a "tablet added" event for each tablet connected. That event is followed by descriptive events about the hardware; currently that includes events for name, vid/pid and a wp_tablet.path event that describes a local path. This path can be used to uniquely identify a tablet or get more information through libwacom. Emulated or nested tablets can skip any of those, e.g. a virtual tablet may not have a vid/pid. The sequence of descriptive events is terminated by a wp_tablet.done event to signal that a client may now finalize any initialization for that tablet. Events from tablets require a tool in proximity. Tools are also managed by the tablet seat; a "tool added" event is sent whenever a tool is new to the compositor. That event is followed by a number of descriptive events about the hardware; currently that includes capabilities, hardware id and serial number, and tool type. Similar to the tablet interface, a wp_tablet_tool.done event is sent to terminate that initial sequence. Any event from a tool happens on the wp_tablet_tool interface. When the tool gets into proximity of the tablet, a proximity_in event is sent on the wp_tablet_tool interface, listing the tablet and the surface. That event is followed by a motion event with the coordinates. After that, it's the usual motion, axis, button, etc. events. The protocol's serialisation means events are grouped by wp_tablet_tool.frame events. Two special events (that don't exist in X) are down and up. They signal "tip touching the surface". For tablets without real proximity detection, the sequence is: proximity_in, motion, down, frame. When the tool leaves proximity, a proximity_out event is sent. If any button is still down, a button release event is sent before this proximity event. These button events are sent in the same frame as the proximity event to signal to the client that the buttons were held when the tool left proximity. If the tool moves out of the surface but stays in proximity (i.e. between windows), compositor-specific grab policies apply. This usually means that the proximity-out is delayed until all buttons are released. Moving a tool physically from one tablet to the other has no real effect on the protocol, since we already have the tool object from the "tool added" event. All the information is already there and the proximity events on both tablets are all a client needs to reconstruct what happened. Some extra axes are normalized, i.e. the client knows the range as specified in the protocol (e.g. [0, 65535]), the granularity however is unknown. The current normalized axes are pressure, distance, and slider. Other extra axes are in physical units as specified in the protocol. The current extra axes with physical units are tilt, rotation and wheel rotation. Since tablets work independently of the pointer controlled by the mouse, the focus handling is independent too and controlled by proximity. The wp_tablet_tool.set_cursor request sets a tool-specific cursor. This cursor surface may be the same as the mouse cursor, and it may be the same across tools but it is possible to be more fine-grained. For example, a client may set different cursors for the pen and eraser. Tools are generally independent of tablets and it is compositor-specific policy when a tool can be removed. Common approaches will likely include some form of removing a tool when all tablets the tool was used on are removed. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. An object that provides access to the graphics tablets available on this system. All tablets are associated with a seat, to get access to the actual tablets, use wp_tablet_manager.get_tablet_seat. Get the wp_tablet_seat object for the given seat. This object provides access to all graphics tablets in this seat. Destroy the wp_tablet_manager object. Objects created from this object are unaffected and should be destroyed separately. An object that provides access to the graphics tablets available on this seat. After binding to this interface, the compositor sends a set of wp_tablet_seat.tablet_added and wp_tablet_seat.tool_added events. Destroy the wp_tablet_seat object. Objects created from this object are unaffected and should be destroyed separately. This event is sent whenever a new tablet becomes available on this seat. This event only provides the object id of the tablet, any static information about the tablet (device name, vid/pid, etc.) is sent through the wp_tablet interface. This event is sent whenever a tool that has not previously been used with a tablet comes into use. This event only provides the object id of the tool; any static information about the tool (capabilities, type, etc.) is sent through the wp_tablet_tool interface. This event is sent whenever a new pad is known to the system. Typically, pads are physically attached to tablets and a pad_added event is sent immediately after the wp_tablet_seat.tablet_added. However, some standalone pad devices logically attach to tablets at runtime, and the client must wait for wp_tablet_pad.enter to know the tablet a pad is attached to. This event only provides the object id of the pad. All further features (buttons, strips, rings) are sent through the wp_tablet_pad interface. An object that represents a physical tool that has been, or is currently in use with a tablet in this seat. Each wp_tablet_tool object stays valid until the client destroys it; the compositor reuses the wp_tablet_tool object to indicate that the object's respective physical tool has come into proximity of a tablet again. A wp_tablet_tool object's relation to a physical tool depends on the tablet's ability to report serial numbers. If the tablet supports this capability, then the object represents a specific physical tool and can be identified even when used on multiple tablets. A tablet tool has a number of static characteristics, e.g. tool type, hardware_serial and capabilities. These capabilities are sent in an event sequence after the wp_tablet_seat.tool_added event before any actual events from this tool. This initial event sequence is terminated by a wp_tablet_tool.done event. Tablet tool events are grouped by wp_tablet_tool.frame events. Any events received before a wp_tablet_tool.frame event should be considered part of the same hardware state change. Sets the surface of the cursor used for this tool on the given tablet. This request only takes effect if the tool is in proximity of one of the requesting client's surfaces or the surface parameter is the current pointer surface. If there was a previous surface set with this request it is replaced. If surface is NULL, the cursor image is hidden. The parameters hotspot_x and hotspot_y define the position of the pointer surface relative to the pointer location. Its top-left corner is always at (x, y) - (hotspot_x, hotspot_y), where (x, y) are the coordinates of the pointer location, in surface-local coordinates. On surface.attach requests to the pointer surface, hotspot_x and hotspot_y are decremented by the x and y parameters passed to the request. Attach must be confirmed by wl_surface.commit as usual. The hotspot can also be updated by passing the currently set pointer surface to this request with new values for hotspot_x and hotspot_y. The current and pending input regions of the wl_surface are cleared, and wl_surface.set_input_region is ignored until the wl_surface is no longer used as the cursor. When the use as a cursor ends, the current and pending input regions become undefined, and the wl_surface is unmapped. This request gives the surface the role of a wp_tablet_tool cursor. A surface may only ever be used as the cursor surface for one wp_tablet_tool. If the surface already has another role or has previously been used as cursor surface for a different tool, a protocol error is raised. This destroys the client's resource for this tool object. Describes the physical type of a tool. The physical type of a tool generally defines its base usage. The mouse tool represents a mouse-shaped tool that is not a relative device but bound to the tablet's surface, providing absolute coordinates. The lens tool is a mouse-shaped tool with an attached lens to provide precision focus. The tool type is the high-level type of the tool and usually decides the interaction expected from this tool. This event is sent in the initial burst of events before the wp_tablet_tool.done event. If the physical tool can be identified by a unique 64-bit serial number, this event notifies the client of this serial number. If multiple tablets are available in the same seat and the tool is uniquely identifiable by the serial number, that tool may move between tablets. Otherwise, if the tool has no serial number and this event is missing, the tool is tied to the tablet it first comes into proximity with. Even if the physical tool is used on multiple tablets, separate wp_tablet_tool objects will be created, one per tablet. This event is sent in the initial burst of events before the wp_tablet_tool.done event. This event notifies the client of a hardware id available on this tool. The hardware id is a device-specific 64-bit id that provides extra information about the tool in use, beyond the wl_tool.type enumeration. The format of the id is specific to tablets made by Wacom Inc. For example, the hardware id of a Wacom Grip Pen (a stylus) is 0x802. This event is sent in the initial burst of events before the wp_tablet_tool.done event. Describes extra capabilities on a tablet. Any tool must provide x and y values, extra axes are device-specific. This event notifies the client of any capabilities of this tool, beyond the main set of x/y axes and tip up/down detection. One event is sent for each extra capability available on this tool. This event is sent in the initial burst of events before the wp_tablet_tool.done event. This event signals the end of the initial burst of descriptive events. A client may consider the static description of the tool to be complete and finalize initialization of the tool. This event is sent when the tool is removed from the system and will send no further events. Should the physical tool come back into proximity later, a new wp_tablet_tool object will be created. It is compositor-dependent when a tool is removed. A compositor may remove a tool on proximity out, tablet removal or any other reason. A compositor may also keep a tool alive until shutdown. If the tool is currently in proximity, a proximity_out event will be sent before the removed event. See wp_tablet_tool.proximity_out for the handling of any buttons logically down. When this event is received, the client must wp_tablet_tool.destroy the object. Notification that this tool is focused on a certain surface. This event can be received when the tool has moved from one surface to another, or when the tool has come back into proximity above the surface. If any button is logically down when the tool comes into proximity, the respective button event is sent after the proximity_in event but within the same frame as the proximity_in event. Notification that this tool has either left proximity, or is no longer focused on a certain surface. When the tablet tool leaves proximity of the tablet, button release events are sent for each button that was held down at the time of leaving proximity. These events are sent before the proximity_out event but within the same wp_tablet.frame. If the tool stays within proximity of the tablet, but the focus changes from one surface to another, a button release event may not be sent until the button is actually released or the tool leaves the proximity of the tablet. Sent whenever the tablet tool comes in contact with the surface of the tablet. If the tool is already in contact with the tablet when entering the input region, the client owning said region will receive a wp_tablet.proximity_in event, followed by a wp_tablet.down event and a wp_tablet.frame event. Note that this event describes logical contact, not physical contact. On some devices, a compositor may not consider a tool in logical contact until a minimum physical pressure threshold is exceeded. Sent whenever the tablet tool stops making contact with the surface of the tablet, or when the tablet tool moves out of the input region and the compositor grab (if any) is dismissed. If the tablet tool moves out of the input region while in contact with the surface of the tablet and the compositor does not have an ongoing grab on the surface, the client owning said region will receive a wp_tablet.up event, followed by a wp_tablet.proximity_out event and a wp_tablet.frame event. If the compositor has an ongoing grab on this device, this event sequence is sent whenever the grab is dismissed in the future. Note that this event describes logical contact, not physical contact. On some devices, a compositor may not consider a tool out of logical contact until physical pressure falls below a specific threshold. Sent whenever a tablet tool moves. Sent whenever the pressure axis on a tool changes. The value of this event is normalized to a value between 0 and 65535. Note that pressure may be nonzero even when a tool is not in logical contact. See the down and up events for more details. Sent whenever the distance axis on a tool changes. The value of this event is normalized to a value between 0 and 65535. Note that distance may be nonzero even when a tool is not in logical contact. See the down and up events for more details. Sent whenever one or both of the tilt axes on a tool change. Each tilt value is in degrees, relative to the z-axis of the tablet. The angle is positive when the top of a tool tilts along the positive x or y axis. Sent whenever the z-rotation axis on the tool changes. The rotation value is in degrees clockwise from the tool's logical neutral position. Sent whenever the slider position on the tool changes. The value is normalized between -65535 and 65535, with 0 as the logical neutral position of the slider. The slider is available on e.g. the Wacom Airbrush tool. Sent whenever the wheel on the tool emits an event. This event contains two values for the same axis change. The degrees value is in the same orientation as the wl_pointer.vertical_scroll axis. The clicks value is in discrete logical clicks of the mouse wheel. This value may be zero if the movement of the wheel was less than one logical click. Clients should choose either value and avoid mixing degrees and clicks. The compositor may accumulate values smaller than a logical click and emulate click events when a certain threshold is met. Thus, wl_tablet_tool.wheel events with non-zero clicks values may have different degrees values. Describes the physical state of a button that produced the button event. Sent whenever a button on the tool is pressed or released. If a button is held down when the tool moves in or out of proximity, button events are generated by the compositor. See wp_tablet_tool.proximity_in and wp_tablet_tool.proximity_out for details. Marks the end of a series of axis and/or button updates from the tablet. The Wayland protocol requires axis updates to be sent sequentially, however all events within a frame should be considered one hardware event. The wp_tablet interface represents one graphics tablet device. The tablet interface itself does not generate events; all events are generated by wp_tablet_tool objects when in proximity above a tablet. A tablet has a number of static characteristics, e.g. device name and pid/vid. These capabilities are sent in an event sequence after the wp_tablet_seat.tablet_added event. This initial event sequence is terminated by a wp_tablet.done event. This destroys the client's resource for this tablet object. This event is sent in the initial burst of events before the wp_tablet.done event. This event is sent in the initial burst of events before the wp_tablet.done event. A system-specific device path that indicates which device is behind this wp_tablet. This information may be used to gather additional information about the device, e.g. through libwacom. A device may have more than one device path. If so, multiple wp_tablet.path events are sent. A device may be emulated and not have a device path, and in that case this event will not be sent. The format of the path is unspecified, it may be a device node, a sysfs path, or some other identifier. It is up to the client to identify the string provided. This event is sent in the initial burst of events before the wp_tablet.done event. This event is sent immediately to signal the end of the initial burst of descriptive events. A client may consider the static description of the tablet to be complete and finalize initialization of the tablet. Sent when the tablet has been removed from the system. When a tablet is removed, some tools may be removed. When this event is received, the client must wp_tablet.destroy the object. A circular interaction area, such as the touch ring on the Wacom Intuos Pro series tablets. Events on a ring are logically grouped by the wl_tablet_pad_ring.frame event. Request that the compositor use the provided feedback string associated with this ring. This request should be issued immediately after a wp_tablet_pad_group.mode_switch event from the corresponding group is received, or whenever the ring is mapped to a different action. See wp_tablet_pad_group.mode_switch for more details. Clients are encouraged to provide context-aware descriptions for the actions associated with the ring; compositors may use this information to offer visual feedback about the button layout (eg. on-screen displays). The provided string 'description' is a UTF-8 encoded string to be associated with this ring, and is considered user-visible; general internationalization rules apply. The serial argument will be that of the last wp_tablet_pad_group.mode_switch event received for the group of this ring. Requests providing other serials than the most recent one will be ignored. This destroys the client's resource for this ring object. Describes the source types for ring events. This indicates to the client how a ring event was physically generated; a client may adjust the user interface accordingly. For example, events from a "finger" source may trigger kinetic scrolling. Source information for ring events. This event does not occur on its own. It is sent before a wp_tablet_pad_ring.frame event and carries the source information for all events within that frame. The source specifies how this event was generated. If the source is wp_tablet_pad_ring.source.finger, a wp_tablet_pad_ring.stop event will be sent when the user lifts the finger off the device. This event is optional. If the source is unknown for an interaction, no event is sent. Sent whenever the angle on a ring changes. The angle is provided in degrees clockwise from the logical north of the ring in the pad's current rotation. Stop notification for ring events. For some wp_tablet_pad_ring.source types, a wp_tablet_pad_ring.stop event is sent to notify a client that the interaction with the ring has terminated. This enables the client to implement kinetic scrolling. See the wp_tablet_pad_ring.source documentation for information on when this event may be generated. Any wp_tablet_pad_ring.angle events with the same source after this event should be considered as the start of a new interaction. Indicates the end of a set of ring events that logically belong together. A client is expected to accumulate the data in all events within the frame before proceeding. All wp_tablet_pad_ring events before a wp_tablet_pad_ring.frame event belong logically together. For example, on termination of a finger interaction on a ring the compositor will send a wp_tablet_pad_ring.source event, a wp_tablet_pad_ring.stop event and a wp_tablet_pad_ring.frame event. A wp_tablet_pad_ring.frame event is sent for every logical event group, even if the group only contains a single wp_tablet_pad_ring event. Specifically, a client may get a sequence: angle, frame, angle, frame, etc. A linear interaction area, such as the strips found in Wacom Cintiq models. Events on a strip are logically grouped by the wl_tablet_pad_strip.frame event. Requests the compositor to use the provided feedback string associated with this strip. This request should be issued immediately after a wp_tablet_pad_group.mode_switch event from the corresponding group is received, or whenever the strip is mapped to a different action. See wp_tablet_pad_group.mode_switch for more details. Clients are encouraged to provide context-aware descriptions for the actions associated with the strip, and compositors may use this information to offer visual feedback about the button layout (eg. on-screen displays). The provided string 'description' is a UTF-8 encoded string to be associated with this ring, and is considered user-visible; general internationalization rules apply. The serial argument will be that of the last wp_tablet_pad_group.mode_switch event received for the group of this strip. Requests providing other serials than the most recent one will be ignored. This destroys the client's resource for this strip object. Describes the source types for strip events. This indicates to the client how a strip event was physically generated; a client may adjust the user interface accordingly. For example, events from a "finger" source may trigger kinetic scrolling. Source information for strip events. This event does not occur on its own. It is sent before a wp_tablet_pad_strip.frame event and carries the source information for all events within that frame. The source specifies how this event was generated. If the source is wp_tablet_pad_strip.source.finger, a wp_tablet_pad_strip.stop event will be sent when the user lifts their finger off the device. This event is optional. If the source is unknown for an interaction, no event is sent. Sent whenever the position on a strip changes. The position is normalized to a range of [0, 65535], the 0-value represents the top-most and/or left-most position of the strip in the pad's current rotation. Stop notification for strip events. For some wp_tablet_pad_strip.source types, a wp_tablet_pad_strip.stop event is sent to notify a client that the interaction with the strip has terminated. This enables the client to implement kinetic scrolling. See the wp_tablet_pad_strip.source documentation for information on when this event may be generated. Any wp_tablet_pad_strip.position events with the same source after this event should be considered as the start of a new interaction. Indicates the end of a set of events that represent one logical hardware strip event. A client is expected to accumulate the data in all events within the frame before proceeding. All wp_tablet_pad_strip events before a wp_tablet_pad_strip.frame event belong logically together. For example, on termination of a finger interaction on a strip the compositor will send a wp_tablet_pad_strip.source event, a wp_tablet_pad_strip.stop event and a wp_tablet_pad_strip.frame event. A wp_tablet_pad_strip.frame event is sent for every logical event group, even if the group only contains a single wp_tablet_pad_strip event. Specifically, a client may get a sequence: position, frame, position, frame, etc. A pad group describes a distinct (sub)set of buttons, rings and strips present in the tablet. The criteria of this grouping is usually positional, eg. if a tablet has buttons on the left and right side, 2 groups will be presented. The physical arrangement of groups is undisclosed and may change on the fly. Pad groups will announce their features during pad initialization. Between the corresponding wp_tablet_pad.group event and wp_tablet_pad_group.done, the pad group will announce the buttons, rings and strips contained in it, plus the number of supported modes. Modes are a mechanism to allow multiple groups of actions for every element in the pad group. The number of groups and available modes in each is persistent across device plugs. The current mode is user-switchable, it will be announced through the wp_tablet_pad_group.mode_switch event both whenever it is switched, and after wp_tablet_pad.enter. The current mode logically applies to all elements in the pad group, although it is at clients' discretion whether to actually perform different actions, and/or issue the respective .set_feedback requests to notify the compositor. See the wp_tablet_pad_group.mode_switch event for more details. Destroy the wp_tablet_pad_group object. Objects created from this object are unaffected and should be destroyed separately. Sent on wp_tablet_pad_group initialization to announce the available buttons in the group. Button indices start at 0, a button may only be in one group at a time. This event is first sent in the initial burst of events before the wp_tablet_pad_group.done event. Some buttons are reserved by the compositor. These buttons may not be assigned to any wp_tablet_pad_group. Compositors may broadcast this event in the case of changes to the mapping of these reserved buttons. If the compositor happens to reserve all buttons in a group, this event will be sent with an empty array. Sent on wp_tablet_pad_group initialization to announce available rings. One event is sent for each ring available on this pad group. This event is sent in the initial burst of events before the wp_tablet_pad_group.done event. Sent on wp_tablet_pad initialization to announce available strips. One event is sent for each strip available on this pad group. This event is sent in the initial burst of events before the wp_tablet_pad_group.done event. Sent on wp_tablet_pad_group initialization to announce that the pad group may switch between modes. A client may use a mode to store a specific configuration for buttons, rings and strips and use the wl_tablet_pad_group.mode_switch event to toggle between these configurations. Mode indices start at 0. Switching modes is compositor-dependent. See the wp_tablet_pad_group.mode_switch event for more details. This event is sent in the initial burst of events before the wp_tablet_pad_group.done event. This event is only sent when more than more than one mode is available. This event is sent immediately to signal the end of the initial burst of descriptive events. A client may consider the static description of the tablet to be complete and finalize initialization of the tablet group. Notification that the mode was switched. A mode applies to all buttons, rings and strips in a group simultaneously, but a client is not required to assign different actions for each mode. For example, a client may have mode-specific button mappings but map the ring to vertical scrolling in all modes. Mode indices start at 0. Switching modes is compositor-dependent. The compositor may provide visual cues to the client about the mode, e.g. by toggling LEDs on the tablet device. Mode-switching may be software-controlled or controlled by one or more physical buttons. For example, on a Wacom Intuos Pro, the button inside the ring may be assigned to switch between modes. The compositor will also send this event after wp_tablet_pad.enter on each group in order to notify of the current mode. Groups that only feature one mode will use mode=0 when emitting this event. If a button action in the new mode differs from the action in the previous mode, the client should immediately issue a wp_tablet_pad.set_feedback request for each changed button. If a ring or strip action in the new mode differs from the action in the previous mode, the client should immediately issue a wp_tablet_ring.set_feedback or wp_tablet_strip.set_feedback request for each changed ring or strip. A pad device is a set of buttons, rings and strips usually physically present on the tablet device itself. Some exceptions exist where the pad device is physically detached, e.g. the Wacom ExpressKey Remote. Pad devices have no axes that control the cursor and are generally auxiliary devices to the tool devices used on the tablet surface. A pad device has a number of static characteristics, e.g. the number of rings. These capabilities are sent in an event sequence after the wp_tablet_seat.pad_added event before any actual events from this pad. This initial event sequence is terminated by a wp_tablet_pad.done event. All pad features (buttons, rings and strips) are logically divided into groups and all pads have at least one group. The available groups are notified through the wp_tablet_pad.group event; the compositor will emit one event per group before emitting wp_tablet_pad.done. Groups may have multiple modes. Modes allow clients to map multiple actions to a single pad feature. Only one mode can be active per group, although different groups may have different active modes. Requests the compositor to use the provided feedback string associated with this button. This request should be issued immediately after a wp_tablet_pad_group.mode_switch event from the corresponding group is received, or whenever a button is mapped to a different action. See wp_tablet_pad_group.mode_switch for more details. Clients are encouraged to provide context-aware descriptions for the actions associated with each button, and compositors may use this information to offer visual feedback on the button layout (e.g. on-screen displays). Button indices start at 0. Setting the feedback string on a button that is reserved by the compositor (i.e. not belonging to any wp_tablet_pad_group) does not generate an error but the compositor is free to ignore the request. The provided string 'description' is a UTF-8 encoded string to be associated with this ring, and is considered user-visible; general internationalization rules apply. The serial argument will be that of the last wp_tablet_pad_group.mode_switch event received for the group of this button. Requests providing other serials than the most recent one will be ignored. Destroy the wp_tablet_pad object. Objects created from this object are unaffected and should be destroyed separately. Sent on wp_tablet_pad initialization to announce available groups. One event is sent for each pad group available. This event is sent in the initial burst of events before the wp_tablet_pad.done event. At least one group will be announced. A system-specific device path that indicates which device is behind this wp_tablet_pad. This information may be used to gather additional information about the device, e.g. through libwacom. The format of the path is unspecified, it may be a device node, a sysfs path, or some other identifier. It is up to the client to identify the string provided. This event is sent in the initial burst of events before the wp_tablet_pad.done event. Sent on wp_tablet_pad initialization to announce the available buttons. This event is sent in the initial burst of events before the wp_tablet_pad.done event. This event is only sent when at least one button is available. This event signals the end of the initial burst of descriptive events. A client may consider the static description of the pad to be complete and finalize initialization of the pad. Describes the physical state of a button that caused the button event. Sent whenever the physical state of a button changes. Notification that this pad is focused on the specified surface. Notification that this pad is no longer focused on the specified surface. Sent when the pad has been removed from the system. When a tablet is removed its pad(s) will be removed too. When this event is received, the client must destroy all rings, strips and groups that were offered by this pad, and issue wp_tablet_pad.destroy the pad itself. wayland-protocols-0.29.5/protocols/unstable/text-input/README000064400000000000000000000001101046102023000222340ustar 00000000000000Text input protocol Maintainers: Jan Arne Petersen wayland-protocols-0.29.5/protocols/unstable/text-input/text-input-unstable-v1.xml000064400000000000000000000377001046102023000263750ustar 00000000000000 Copyright © 2012, 2013 Intel Corporation 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. An object used for text input. Adds support for text input and input methods to applications. A text_input object is created from a wl_text_input_manager and corresponds typically to a text entry in an application. Requests are used to activate/deactivate the text_input object and set state information like surrounding and selected text or the content type. The information about entered text is sent to the text_input object via the pre-edit and commit events. Using this interface removes the need for applications to directly process hardware key events and compose text out of them. Text is generally UTF-8 encoded, indices and lengths are in bytes. Serials are used to synchronize the state between the text input and an input method. New serials are sent by the text input in the commit_state request and are used by the input method to indicate the known text input state in events like preedit_string, commit_string, and keysym. The text input can then ignore events from the input method which are based on an outdated state (for example after a reset). Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. Requests the text_input object to be activated (typically when the text entry gets focus). The seat argument is a wl_seat which maintains the focus for this activation. The surface argument is a wl_surface assigned to the text_input object and tracked for focus lost. The enter event is emitted on successful activation. Requests the text_input object to be deactivated (typically when the text entry lost focus). The seat argument is a wl_seat which was used for activation. Requests input panels (virtual keyboard) to show. Requests input panels (virtual keyboard) to hide. Should be called by an editor widget when the input state should be reset, for example after the text was changed outside of the normal input method flow. Sets the plain surrounding text around the input position. Text is UTF-8 encoded. Cursor is the byte offset within the surrounding text. Anchor is the byte offset of the selection anchor within the surrounding text. If there is no selected text anchor, then it is the same as cursor. Content hint is a bitmask to allow to modify the behavior of the text input. The content purpose allows to specify the primary purpose of a text input. This allows an input method to show special purpose input panels with extra characters or to disallow some characters. Sets the content purpose and content hint. While the purpose is the basic purpose of an input field, the hint flags allow to modify some of the behavior. When no content type is explicitly set, a normal content purpose with default hints (auto completion, auto correction, auto capitalization) should be assumed. Sets a specific language. This allows for example a virtual keyboard to show a language specific layout. The "language" argument is an RFC-3066 format language tag. It could be used for example in a word processor to indicate the language of the currently edited document or in an instant message application which tracks languages of contacts. Notify the text_input object when it received focus. Typically in response to an activate request. Notify the text_input object when it lost focus. Either in response to a deactivate request or when the assigned surface lost focus or was destroyed. Transfer an array of 0-terminated modifier names. The position in the array is the index of the modifier as used in the modifiers bitmask in the keysym event. Notify when the visibility state of the input panel changed. Notify when a new composing text (pre-edit) should be set around the current cursor position. Any previously set composing text should be removed. The commit text can be used to replace the preedit text on reset (for example on unfocus). The text input should also handle all preedit_style and preedit_cursor events occurring directly before preedit_string. Sets styling information on composing text. The style is applied for length bytes from index relative to the beginning of the composing text (as byte offset). Multiple styles can be applied to a composing text by sending multiple preedit_styling events. This event is handled as part of a following preedit_string event. Sets the cursor position inside the composing text (as byte offset) relative to the start of the composing text. When index is a negative number no cursor is shown. This event is handled as part of a following preedit_string event. Notify when text should be inserted into the editor widget. The text to commit could be either just a single character after a key press or the result of some composing (pre-edit). It could also be an empty text when some text should be removed (see delete_surrounding_text) or when the input cursor should be moved (see cursor_position). Any previously set composing text should be removed. Notify when the cursor or anchor position should be modified. This event should be handled as part of a following commit_string event. Notify when the text around the current cursor position should be deleted. Index is relative to the current cursor (in bytes). Length is the length of deleted text (in bytes). This event should be handled as part of a following commit_string event. Notify when a key event was sent. Key events should not be used for normal text input operations, which should be done with commit_string, delete_surrounding_text, etc. The key event follows the wl_keyboard key event convention. Sym is an XKB keysym, state a wl_keyboard key_state. Modifiers are a mask for effective modifiers (where the modifier indices are set by the modifiers_map event) Sets the language of the input text. The "language" argument is an RFC-3066 format language tag. Sets the text direction of input text. It is mainly needed for showing an input cursor on the correct side of the editor when there is no input done yet and making sure neutral direction text is laid out properly. A factory for text_input objects. This object is a global singleton. Creates a new text_input object. wayland-protocols-0.29.5/protocols/unstable/text-input/text-input-unstable-v3.xml000064400000000000000000000513101046102023000263700ustar 00000000000000 Copyright © 2012, 2013 Intel Corporation Copyright © 2015, 2016 Jan Arne Petersen Copyright © 2017, 2018 Red Hat, Inc. Copyright © 2018 Purism SPC 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 protocol allows compositors to act as input methods and to send text to applications. A text input object is used to manage state of what are typically text entry fields in the application. This document adheres to the RFC 2119 when using words like "must", "should", "may", etc. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. The zwp_text_input_v3 interface represents text input and input methods associated with a seat. It provides enter/leave events to follow the text input focus for a seat. Requests are used to enable/disable the text-input object and set state information like surrounding and selected text or the content type. The information about the entered text is sent to the text-input object via the preedit_string and commit_string events. Text is valid UTF-8 encoded, indices and lengths are in bytes. Indices must not point to middle bytes inside a code point: they must either point to the first byte of a code point or to the end of the buffer. Lengths must be measured between two valid indices. Focus moving throughout surfaces will result in the emission of zwp_text_input_v3.enter and zwp_text_input_v3.leave events. The focused surface must commit zwp_text_input_v3.enable and zwp_text_input_v3.disable requests as the keyboard focus moves across editable and non-editable elements of the UI. Those two requests are not expected to be paired with each other, the compositor must be able to handle consecutive series of the same request. State is sent by the state requests (set_surrounding_text, set_content_type and set_cursor_rectangle) and a commit request. After an enter event or disable request all state information is invalidated and needs to be resent by the client. Destroy the wp_text_input object. Also disables all surfaces enabled through this wp_text_input object. Requests text input on the surface previously obtained from the enter event. This request must be issued every time the active text input changes to a new one, including within the current surface. Use zwp_text_input_v3.disable when there is no longer any input focus on the current surface. Clients must not enable more than one text input on the single seat and should disable the current text input before enabling the new one. At most one instance of text input may be in enabled state per instance, Requests to enable the another text input when some text input is active must be ignored by compositor. This request resets all state associated with previous enable, disable, set_surrounding_text, set_text_change_cause, set_content_type, and set_cursor_rectangle requests, as well as the state associated with preedit_string, commit_string, and delete_surrounding_text events. The set_surrounding_text, set_content_type and set_cursor_rectangle requests must follow if the text input supports the necessary functionality. State set with this request is double-buffered. It will get applied on the next zwp_text_input_v3.commit request, and stay valid until the next committed enable or disable request. The changes must be applied by the compositor after issuing a zwp_text_input_v3.commit request. Explicitly disable text input on the current surface (typically when there is no focus on any text entry inside the surface). State set with this request is double-buffered. It will get applied on the next zwp_text_input_v3.commit request. Sets the surrounding plain text around the input, excluding the preedit text. The client should notify the compositor of any changes in any of the values carried with this request, including changes caused by handling incoming text-input events as well as changes caused by other mechanisms like keyboard typing. If the client is unaware of the text around the cursor, it should not issue this request, to signify lack of support to the compositor. Text is UTF-8 encoded, and should include the cursor position, the complete selection and additional characters before and after them. There is a maximum length of wayland messages, so text can not be longer than 4000 bytes. Cursor is the byte offset of the cursor within text buffer. Anchor is the byte offset of the selection anchor within text buffer. If there is no selected text, anchor is the same as cursor. If any preedit text is present, it is replaced with a cursor for the purpose of this event. Values set with this request are double-buffered. They will get applied on the next zwp_text_input_v3.commit request, and stay valid until the next committed enable or disable request. The initial state for affected fields is empty, meaning that the text input does not support sending surrounding text. If the empty values get applied, subsequent attempts to change them may have no effect. Reason for the change of surrounding text or cursor posision. Tells the compositor why the text surrounding the cursor changed. Whenever the client detects an external change in text, cursor, or anchor posision, it must issue this request to the compositor. This request is intended to give the input method a chance to update the preedit text in an appropriate way, e.g. by removing it when the user starts typing with a keyboard. cause describes the source of the change. The value set with this request is double-buffered. It must be applied and reset to initial at the next zwp_text_input_v3.commit request. The initial value of cause is input_method. Content hint is a bitmask to allow to modify the behavior of the text input. The content purpose allows to specify the primary purpose of a text input. This allows an input method to show special purpose input panels with extra characters or to disallow some characters. Sets the content purpose and content hint. While the purpose is the basic purpose of an input field, the hint flags allow to modify some of the behavior. Values set with this request are double-buffered. They will get applied on the next zwp_text_input_v3.commit request. Subsequent attempts to update them may have no effect. The values remain valid until the next committed enable or disable request. The initial value for hint is none, and the initial value for purpose is normal. Marks an area around the cursor as a x, y, width, height rectangle in surface local coordinates. Allows the compositor to put a window with word suggestions near the cursor, without obstructing the text being input. If the client is unaware of the position of edited text, it should not issue this request, to signify lack of support to the compositor. Values set with this request are double-buffered. They will get applied on the next zwp_text_input_v3.commit request, and stay valid until the next committed enable or disable request. The initial values describing a cursor rectangle are empty. That means the text input does not support describing the cursor area. If the empty values get applied, subsequent attempts to change them may have no effect. Atomically applies state changes recently sent to the compositor. The commit request establishes and updates the state of the client, and must be issued after any changes to apply them. Text input state (enabled status, content purpose, content hint, surrounding text and change cause, cursor rectangle) is conceptually double-buffered within the context of a text input, i.e. between a committed enable request and the following committed enable or disable request. Protocol requests modify the pending state, as opposed to the current state in use by the input method. A commit request atomically applies all pending state, replacing the current state. After commit, the new pending state is as documented for each related request. Requests are applied in the order of arrival. Neither current nor pending state are modified unless noted otherwise. The compositor must count the number of commit requests coming from each zwp_text_input_v3 object and use the count as the serial in done events. Notification that this seat's text-input focus is on a certain surface. If client has created multiple text input objects, compositor must send this event to all of them. When the seat has the keyboard capability the text-input focus follows the keyboard focus. This event sets the current surface for the text-input object. Notification that this seat's text-input focus is no longer on a certain surface. The client should reset any preedit string previously set. The leave notification clears the current surface. It is sent before the enter notification for the new focus. After leave event, compositor must ignore requests from any text input instances until next enter event. When the seat has the keyboard capability the text-input focus follows the keyboard focus. Notify when a new composing text (pre-edit) should be set at the current cursor position. Any previously set composing text must be removed. Any previously existing selected text must be removed. The argument text contains the pre-edit string buffer. The parameters cursor_begin and cursor_end are counted in bytes relative to the beginning of the submitted text buffer. Cursor should be hidden when both are equal to -1. They could be represented by the client as a line if both values are the same, or as a text highlight otherwise. Values set with this event are double-buffered. They must be applied and reset to initial on the next zwp_text_input_v3.done event. The initial value of text is an empty string, and cursor_begin, cursor_end and cursor_hidden are all 0. Notify when text should be inserted into the editor widget. The text to commit could be either just a single character after a key press or the result of some composing (pre-edit). Values set with this event are double-buffered. They must be applied and reset to initial on the next zwp_text_input_v3.done event. The initial value of text is an empty string. Notify when the text around the current cursor position should be deleted. Before_length and after_length are the number of bytes before and after the current cursor index (excluding the selection) to delete. If a preedit text is present, in effect before_length is counted from the beginning of it, and after_length from its end (see done event sequence). Values set with this event are double-buffered. They must be applied and reset to initial on the next zwp_text_input_v3.done event. The initial values of both before_length and after_length are 0. Instruct the application to apply changes to state requested by the preedit_string, commit_string and delete_surrounding_text events. The state relating to these events is double-buffered, and each one modifies the pending state. This event replaces the current state with the pending state. The application must proceed by evaluating the changes in the following order: 1. Replace existing preedit string with the cursor. 2. Delete requested surrounding text. 3. Insert commit string with the cursor at its end. 4. Calculate surrounding text to send. 5. Insert new preedit text in cursor position. 6. Place cursor inside preedit text. The serial number reflects the last state of the zwp_text_input_v3 object known to the compositor. The value of the serial argument must be equal to the number of commit requests already issued on that object. When the client receives a done event with a serial different than the number of past commit requests, it must proceed as normal, except it should not change the current state of the zwp_text_input_v3 object. A factory for text-input objects. This object is a global singleton. Destroy the wp_text_input_manager object. Creates a new text-input object for a given seat. wayland-protocols-0.29.5/protocols/unstable/xdg-decoration/README000064400000000000000000000001061046102023000230270ustar 00000000000000xdg_decoration protocol Maintainers: Simon Ser wayland-protocols-0.29.5/protocols/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml000064400000000000000000000156611046102023000277530ustar 00000000000000 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. This interface allows a compositor to announce support for server-side decorations. A window decoration is a set of window controls as deemed appropriate by the party managing them, such as user interface components used to move, resize and change a window's state. A client can use this protocol to request being decorated by a supporting compositor. If compositor and client do not negotiate the use of a server-side decoration using this protocol, clients continue to self-decorate as they see fit. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. Destroy the decoration manager. This doesn't destroy objects created with the manager. Create a new decoration object associated with the given toplevel. Creating an xdg_toplevel_decoration from an xdg_toplevel which has a buffer attached or committed is a client error, and any attempts by a client to attach or manipulate a buffer prior to the first xdg_toplevel_decoration.configure event must also be treated as errors. The decoration object allows the compositor to toggle server-side window decorations for a toplevel surface. The client can request to switch to another mode. The xdg_toplevel_decoration object must be destroyed before its xdg_toplevel. Switch back to a mode without any server-side decorations at the next commit. These values describe window decoration modes. Set the toplevel surface decoration mode. This informs the compositor that the client prefers the provided decoration mode. After requesting a decoration mode, the compositor will respond by emitting an xdg_surface.configure event. The client should then update its content, drawing it without decorations if the received mode is server-side decorations. The client must also acknowledge the configure when committing the new content (see xdg_surface.ack_configure). The compositor can decide not to use the client's mode and enforce a different mode instead. Clients whose decoration mode depend on the xdg_toplevel state may send a set_mode request in response to an xdg_surface.configure event and wait for the next xdg_surface.configure event to prevent unwanted state. Such clients are responsible for preventing configure loops and must make sure not to send multiple successive set_mode requests with the same decoration mode. Unset the toplevel surface decoration mode. This informs the compositor that the client doesn't prefer a particular decoration mode. This request has the same semantics as set_mode. The configure event asks the client to change its decoration mode. The configured state should not be applied immediately. Clients must send an ack_configure in response to this event. See xdg_surface.configure and xdg_surface.ack_configure for details. A configure event can be sent at any time. The specified mode must be obeyed by the client. wayland-protocols-0.29.5/protocols/unstable/xdg-foreign/README000064400000000000000000000001031046102023000223260ustar 00000000000000xdg foreign protocol Maintainers: Jonas Ådahl wayland-protocols-0.29.5/protocols/unstable/xdg-foreign/xdg-foreign-unstable-v1.xml000064400000000000000000000202761046102023000265550ustar 00000000000000 Copyright © 2015-2016 Red Hat Inc. 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. This protocol specifies a way for making it possible to reference a surface of a different client. With such a reference, a client can, by using the interfaces provided by this protocol, manipulate the relationship between its own surfaces and the surface of some other client. For example, stack some of its own surface above the other clients surface. In order for a client A to get a reference of a surface of client B, client B must first export its surface using xdg_exporter.export. Upon doing this, client B will receive a handle (a unique string) that it may share with client A in some way (for example D-Bus). After client A has received the handle from client B, it may use xdg_importer.import to create a reference to the surface client B just exported. See the corresponding requests for details. A possible use case for this is out-of-process dialogs. For example when a sandboxed client without file system access needs the user to select a file on the file system, given sandbox environment support, it can export its surface, passing the exported surface handle to an unsandboxed process that can show a file browser dialog and stack it above the sandboxed client's surface. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. A global interface used for exporting surfaces that can later be imported using xdg_importer. Notify the compositor that the xdg_exporter object will no longer be used. The export request exports the passed surface so that it can later be imported via xdg_importer. When called, a new xdg_exported object will be created and xdg_exported.handle will be sent immediately. See the corresponding interface and event for details. A surface may be exported multiple times, and each exported handle may be used to create an xdg_imported multiple times. Only xdg_surface surfaces may be exported. A global interface used for importing surfaces exported by xdg_exporter. With this interface, a client can create a reference to a surface of another client. Notify the compositor that the xdg_importer object will no longer be used. The import request imports a surface from any client given a handle retrieved by exporting said surface using xdg_exporter.export. When called, a new xdg_imported object will be created. This new object represents the imported surface, and the importing client can manipulate its relationship using it. See xdg_imported for details. An xdg_exported object represents an exported reference to a surface. The exported surface may be referenced as long as the xdg_exported object not destroyed. Destroying the xdg_exported invalidates any relationship the importer may have established using xdg_imported. Revoke the previously exported surface. This invalidates any relationship the importer may have set up using the xdg_imported created given the handle sent via xdg_exported.handle. The handle event contains the unique handle of this exported surface reference. It may be shared with any client, which then can use it to import the surface by calling xdg_importer.import. A handle may be used to import the surface multiple times. An xdg_imported object represents an imported reference to surface exported by some client. A client can use this interface to manipulate relationships between its own surfaces and the imported surface. Notify the compositor that it will no longer use the xdg_imported object. Any relationship that may have been set up will at this point be invalidated. Set the imported surface as the parent of some surface of the client. The passed surface must be a toplevel xdg_surface. Calling this function sets up a surface to surface relation with the same stacking and positioning semantics as xdg_surface.set_parent. The imported surface handle has been destroyed and any relationship set up has been invalidated. This may happen for various reasons, for example if the exported surface or the exported surface handle has been destroyed, if the handle used for importing was invalid. wayland-protocols-0.29.5/protocols/unstable/xdg-foreign/xdg-foreign-unstable-v2.xml000064400000000000000000000217661046102023000265630ustar 00000000000000 Copyright © 2015-2016 Red Hat Inc. 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. This protocol specifies a way for making it possible to reference a surface of a different client. With such a reference, a client can, by using the interfaces provided by this protocol, manipulate the relationship between its own surfaces and the surface of some other client. For example, stack some of its own surface above the other clients surface. In order for a client A to get a reference of a surface of client B, client B must first export its surface using xdg_exporter.export_toplevel. Upon doing this, client B will receive a handle (a unique string) that it may share with client A in some way (for example D-Bus). After client A has received the handle from client B, it may use xdg_importer.import_toplevel to create a reference to the surface client B just exported. See the corresponding requests for details. A possible use case for this is out-of-process dialogs. For example when a sandboxed client without file system access needs the user to select a file on the file system, given sandbox environment support, it can export its surface, passing the exported surface handle to an unsandboxed process that can show a file browser dialog and stack it above the sandboxed client's surface. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. A global interface used for exporting surfaces that can later be imported using xdg_importer. Notify the compositor that the xdg_exporter object will no longer be used. These errors can be emitted in response to invalid xdg_exporter requests. The export_toplevel request exports the passed surface so that it can later be imported via xdg_importer. When called, a new xdg_exported object will be created and xdg_exported.handle will be sent immediately. See the corresponding interface and event for details. A surface may be exported multiple times, and each exported handle may be used to create an xdg_imported multiple times. Only xdg_toplevel equivalent surfaces may be exported, otherwise an invalid_surface protocol error is sent. A global interface used for importing surfaces exported by xdg_exporter. With this interface, a client can create a reference to a surface of another client. Notify the compositor that the xdg_importer object will no longer be used. The import_toplevel request imports a surface from any client given a handle retrieved by exporting said surface using xdg_exporter.export_toplevel. When called, a new xdg_imported object will be created. This new object represents the imported surface, and the importing client can manipulate its relationship using it. See xdg_imported for details. An xdg_exported object represents an exported reference to a surface. The exported surface may be referenced as long as the xdg_exported object not destroyed. Destroying the xdg_exported invalidates any relationship the importer may have established using xdg_imported. Revoke the previously exported surface. This invalidates any relationship the importer may have set up using the xdg_imported created given the handle sent via xdg_exported.handle. The handle event contains the unique handle of this exported surface reference. It may be shared with any client, which then can use it to import the surface by calling xdg_importer.import_toplevel. A handle may be used to import the surface multiple times. An xdg_imported object represents an imported reference to surface exported by some client. A client can use this interface to manipulate relationships between its own surfaces and the imported surface. These errors can be emitted in response to invalid xdg_imported requests. Notify the compositor that it will no longer use the xdg_imported object. Any relationship that may have been set up will at this point be invalidated. Set the imported surface as the parent of some surface of the client. The passed surface must be an xdg_toplevel equivalent, otherwise an invalid_surface protocol error is sent. Calling this function sets up a surface to surface relation with the same stacking and positioning semantics as xdg_toplevel.set_parent. The imported surface handle has been destroyed and any relationship set up has been invalidated. This may happen for various reasons, for example if the exported surface or the exported surface handle has been destroyed, if the handle used for importing was invalid. wayland-protocols-0.29.5/protocols/unstable/xdg-output/README000064400000000000000000000001101046102023000222330ustar 00000000000000xdg_output protocol Maintainers: Olivier Fourdan wayland-protocols-0.29.5/protocols/unstable/xdg-output/xdg-output-unstable-v1.xml000064400000000000000000000225121046102023000263660ustar 00000000000000 Copyright © 2017 Red Hat Inc. 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. This protocol aims at describing outputs in a way which is more in line with the concept of an output on desktop oriented systems. Some information are more specific to the concept of an output for a desktop oriented system and may not make sense in other applications, such as IVI systems for example. Typically, the global compositor space on a desktop system is made of a contiguous or overlapping set of rectangular regions. Some of the information provided in this protocol might be identical to their counterparts already available from wl_output, in which case the information provided by this protocol should be preferred to their equivalent in wl_output. The goal is to move the desktop specific concepts (such as output location within the global compositor space, the connector name and types, etc.) out of the core wl_output protocol. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. A global factory interface for xdg_output objects. Using this request a client can tell the server that it is not going to use the xdg_output_manager object anymore. Any objects already created through this instance are not affected. This creates a new xdg_output object for the given wl_output. An xdg_output describes part of the compositor geometry. This typically corresponds to a monitor that displays part of the compositor space. For objects version 3 onwards, after all xdg_output properties have been sent (when the object is created and when properties are updated), a wl_output.done event is sent. This allows changes to the output properties to be seen as atomic, even if they happen via multiple events. Using this request a client can tell the server that it is not going to use the xdg_output object anymore. The position event describes the location of the wl_output within the global compositor space. The logical_position event is sent after creating an xdg_output (see xdg_output_manager.get_xdg_output) and whenever the location of the output changes within the global compositor space. The logical_size event describes the size of the output in the global compositor space. For example, a surface without any buffer scale, transformation nor rotation set, with the size matching the logical_size will have the same size as the corresponding output when displayed. Most regular Wayland clients should not pay attention to the logical size and would rather rely on xdg_shell interfaces. Some clients such as Xwayland, however, need this to configure their surfaces in the global compositor space as the compositor may apply a different scale from what is advertised by the output scaling property (to achieve fractional scaling, for example). For example, for a wl_output mode 3840×2160 and a scale factor 2: - A compositor not scaling the surface buffers will advertise a logical size of 3840×2160, - A compositor automatically scaling the surface buffers will advertise a logical size of 1920×1080, - A compositor using a fractional scale of 1.5 will advertise a logical size to 2560×1620. For example, for a wl_output mode 1920×1080 and a 90 degree rotation, the compositor will advertise a logical size of 1080x1920. The logical_size event is sent after creating an xdg_output (see xdg_output_manager.get_xdg_output) and whenever the logical size of the output changes, either as a result of a change in the applied scale or because of a change in the corresponding output mode(see wl_output.mode) or transform (see wl_output.transform). This event is sent after all other properties of an xdg_output have been sent. This allows changes to the xdg_output properties to be seen as atomic, even if they happen via multiple events. For objects version 3 onwards, this event is deprecated. Compositors are not required to send it anymore and must send wl_output.done instead. Many compositors will assign names to their outputs, show them to the user, allow them to be configured by name, etc. The client may wish to know this name as well to offer the user similar behaviors. The naming convention is compositor defined, but limited to alphanumeric characters and dashes (-). Each name is unique among all wl_output globals, but if a wl_output global is destroyed the same name may be reused later. The names will also remain consistent across sessions with the same hardware and software configuration. Examples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc. However, do not assume that the name is a reflection of an underlying DRM connector, X11 connection, etc. The name event is sent after creating an xdg_output (see xdg_output_manager.get_xdg_output). This event is only sent once per xdg_output, and the name does not change over the lifetime of the wl_output global. Many compositors can produce human-readable descriptions of their outputs. The client may wish to know this description as well, to communicate the user for various purposes. The description is a UTF-8 string with no convention defined for its contents. Examples might include 'Foocorp 11" Display' or 'Virtual X11 output via :1'. The description event is sent after creating an xdg_output (see xdg_output_manager.get_xdg_output) and whenever the description changes. The description is optional, and may not be sent at all. For objects of version 2 and lower, this event is only sent once per xdg_output, and the description does not change over the lifetime of the wl_output global. wayland-protocols-0.29.5/protocols/unstable/xdg-shell/README000064400000000000000000000001131046102023000220050ustar 00000000000000xdg shell protocol Maintainers: Jasper St. Pierre wayland-protocols-0.29.5/protocols/unstable/xdg-shell/xdg-shell-unstable-v5.xml000064400000000000000000000653571046102023000257260ustar 00000000000000 Copyright © 2008-2013 Kristian Høgsberg Copyright © 2013 Rafael Antognolli Copyright © 2013 Jasper St. Pierre Copyright © 2010-2013 Intel Corporation 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. xdg_shell allows clients to turn a wl_surface into a "real window" which can be dragged, resized, stacked, and moved around by the user. Everything about this interface is suited towards traditional desktop environments. The 'current' member of this enum gives the version of the protocol. Implementations can compare this to the version they implement using static_assert to ensure the protocol and implementation versions match. Destroy this xdg_shell object. Destroying a bound xdg_shell object while there are surfaces still alive created by this xdg_shell object instance is illegal and will result in a protocol error. Negotiate the unstable version of the interface. This mechanism is in place to ensure client and server agree on the unstable versions of the protocol that they speak or exit cleanly if they don't agree. This request will go away once the xdg-shell protocol is stable. This creates an xdg_surface for the given surface and gives it the xdg_surface role. A wl_surface can only be given an xdg_surface role once. If get_xdg_surface is called with a wl_surface that already has an active xdg_surface associated with it, or if it had any other role, an error is raised. See the documentation of xdg_surface for more details about what an xdg_surface is and how it is used. This creates an xdg_popup for the given surface and gives it the xdg_popup role. A wl_surface can only be given an xdg_popup role once. If get_xdg_popup is called with a wl_surface that already has an active xdg_popup associated with it, or if it had any other role, an error is raised. This request must be used in response to some sort of user action like a button press, key press, or touch down event. See the documentation of xdg_popup for more details about what an xdg_popup is and how it is used. The ping event asks the client if it's still alive. Pass the serial specified in the event back to the compositor by sending a "pong" request back with the specified serial. Compositors can use this to determine if the client is still alive. It's unspecified what will happen if the client doesn't respond to the ping request, or in what timeframe. Clients should try to respond in a reasonable amount of time. A compositor is free to ping in any way it wants, but a client must always respond to any xdg_shell object it created. A client must respond to a ping event with a pong request or the client may be deemed unresponsive. An interface that may be implemented by a wl_surface, for implementations that provide a desktop-style user interface. It provides requests to treat surfaces like windows, allowing to set properties like maximized, fullscreen, minimized, and to move and resize them, and associate metadata like title and app id. The client must call wl_surface.commit on the corresponding wl_surface for the xdg_surface state to take effect. Prior to committing the new state, it can set up initial configuration, such as maximizing or setting a window geometry. Even without attaching a buffer the compositor must respond to initial committed configuration, for instance sending a configure event with expected window geometry if the client maximized its surface during initialization. For a surface to be mapped by the compositor the client must have committed both an xdg_surface state and a buffer. Unmap and destroy the window. The window will be effectively hidden from the user's point of view, and all state like maximization, fullscreen, and so on, will be lost. Set the "parent" of this surface. This window should be stacked above a parent. The parent surface must be mapped as long as this surface is mapped. Parent windows should be set on dialogs, toolboxes, or other "auxiliary" surfaces, so that the parent is raised when the dialog is raised. Set a short title for the surface. This string may be used to identify the surface in a task bar, window list, or other user interface elements provided by the compositor. The string must be encoded in UTF-8. Set an application identifier for the surface. The app ID identifies the general class of applications to which the surface belongs. The compositor can use this to group multiple surfaces together, or to determine how to launch a new application. For D-Bus activatable applications, the app ID is used as the D-Bus service name. The compositor shell will try to group application surfaces together by their app ID. As a best practice, it is suggested to select app ID's that match the basename of the application's .desktop file. For example, "org.freedesktop.FooViewer" where the .desktop file is "org.freedesktop.FooViewer.desktop". See the desktop-entry specification [0] for more details on application identifiers and how they relate to well-known D-Bus names and .desktop files. [0] http://standards.freedesktop.org/desktop-entry-spec/ Clients implementing client-side decorations might want to show a context menu when right-clicking on the decorations, giving the user a menu that they can use to maximize or minimize the window. This request asks the compositor to pop up such a window menu at the given position, relative to the local surface coordinates of the parent surface. There are no guarantees as to what menu items the window menu contains. This request must be used in response to some sort of user action like a button press, key press, or touch down event. Start an interactive, user-driven move of the surface. This request must be used in response to some sort of user action like a button press, key press, or touch down event. The passed serial is used to determine the type of interactive move (touch, pointer, etc). The server may ignore move requests depending on the state of the surface (e.g. fullscreen or maximized), or if the passed serial is no longer valid. If triggered, the surface will lose the focus of the device (wl_pointer, wl_touch, etc) used for the move. It is up to the compositor to visually indicate that the move is taking place, such as updating a pointer cursor, during the move. There is no guarantee that the device focus will return when the move is completed. These values are used to indicate which edge of a surface is being dragged in a resize operation. Start a user-driven, interactive resize of the surface. This request must be used in response to some sort of user action like a button press, key press, or touch down event. The passed serial is used to determine the type of interactive resize (touch, pointer, etc). The server may ignore resize requests depending on the state of the surface (e.g. fullscreen or maximized). If triggered, the client will receive configure events with the "resize" state enum value and the expected sizes. See the "resize" enum value for more details about what is required. The client must also acknowledge configure events using "ack_configure". After the resize is completed, the client will receive another "configure" event without the resize state. If triggered, the surface also will lose the focus of the device (wl_pointer, wl_touch, etc) used for the resize. It is up to the compositor to visually indicate that the resize is taking place, such as updating a pointer cursor, during the resize. There is no guarantee that the device focus will return when the resize is completed. The edges parameter specifies how the surface should be resized, and is one of the values of the resize_edge enum. The compositor may use this information to update the surface position for example when dragging the top left corner. The compositor may also use this information to adapt its behavior, e.g. choose an appropriate cursor image. The different state values used on the surface. This is designed for state values like maximized, fullscreen. It is paired with the configure event to ensure that both the client and the compositor setting the state can be synchronized. States set in this way are double-buffered. They will get applied on the next commit. Desktop environments may extend this enum by taking up a range of values and documenting the range they chose in this description. They are not required to document the values for the range that they chose. Ideally, any good extensions from a desktop environment should make its way into standardization into this enum. The current reserved ranges are: 0x0000 - 0x0FFF: xdg-shell core values, documented below. 0x1000 - 0x1FFF: GNOME 0x2000 - 0x2FFF: EFL The surface is maximized. The window geometry specified in the configure event must be obeyed by the client. The surface is fullscreen. The window geometry specified in the configure event must be obeyed by the client. The surface is being resized. The window geometry specified in the configure event is a maximum; the client cannot resize beyond it. Clients that have aspect ratio or cell sizing configuration can use a smaller size, however. Client window decorations should be painted as if the window is active. Do not assume this means that the window actually has keyboard or pointer focus. The configure event asks the client to resize its surface or to change its state. The width and height arguments specify a hint to the window about how its surface should be resized in window geometry coordinates. See set_window_geometry. If the width or height arguments are zero, it means the client should decide its own window dimension. This may happen when the compositor need to configure the state of the surface but doesn't have any information about any previous or expected dimension. The states listed in the event specify how the width/height arguments should be interpreted, and possibly how it should be drawn. Clients should arrange their surface for the new size and states, and then send a ack_configure request with the serial sent in this configure event at some point before committing the new surface. If the client receives multiple configure events before it can respond to one, it is free to discard all but the last event it received. When a configure event is received, if a client commits the surface in response to the configure event, then the client must make an ack_configure request sometime before the commit request, passing along the serial of the configure event. For instance, the compositor might use this information to move a surface to the top left only when the client has drawn itself for the maximized or fullscreen state. If the client receives multiple configure events before it can respond to one, it only has to ack the last configure event. A client is not required to commit immediately after sending an ack_configure request - it may even ack_configure several times before its next surface commit. The compositor expects that the most recently received ack_configure request at the time of a commit indicates which configure event the client is responding to. The window geometry of a window is its "visible bounds" from the user's perspective. Client-side decorations often have invisible portions like drop-shadows which should be ignored for the purposes of aligning, placing and constraining windows. The window geometry is double buffered, and will be applied at the time wl_surface.commit of the corresponding wl_surface is called. Once the window geometry of the surface is set once, it is not possible to unset it, and it will remain the same until set_window_geometry is called again, even if a new subsurface or buffer is attached. If never set, the value is the full bounds of the surface, including any subsurfaces. This updates dynamically on every commit. This unset mode is meant for extremely simple clients. If responding to a configure event, the window geometry in here must respect the sizing negotiations specified by the states in the configure event. The arguments are given in the surface local coordinate space of the wl_surface associated with this xdg_surface. The width and height must be greater than zero. Maximize the surface. After requesting that the surface should be maximized, the compositor will respond by emitting a configure event with the "maximized" state and the required window geometry. The client should then update its content, drawing it in a maximized state, i.e. without shadow or other decoration outside of the window geometry. The client must also acknowledge the configure when committing the new content (see ack_configure). It is up to the compositor to decide how and where to maximize the surface, for example which output and what region of the screen should be used. If the surface was already maximized, the compositor will still emit a configure event with the "maximized" state. Unmaximize the surface. After requesting that the surface should be unmaximized, the compositor will respond by emitting a configure event without the "maximized" state. If available, the compositor will include the window geometry dimensions the window had prior to being maximized in the configure request. The client must then update its content, drawing it in a regular state, i.e. potentially with shadow, etc. The client must also acknowledge the configure when committing the new content (see ack_configure). It is up to the compositor to position the surface after it was unmaximized; usually the position the surface had before maximizing, if applicable. If the surface was already not maximized, the compositor will still emit a configure event without the "maximized" state. Make the surface fullscreen. You can specify an output that you would prefer to be fullscreen. If this value is NULL, it's up to the compositor to choose which display will be used to map this surface. If the surface doesn't cover the whole output, the compositor will position the surface in the center of the output and compensate with black borders filling the rest of the output. Request that the compositor minimize your surface. There is no way to know if the surface is currently minimized, nor is there any way to unset minimization on this surface. If you are looking to throttle redrawing when minimized, please instead use the wl_surface.frame event for this, as this will also work with live previews on windows in Alt-Tab, Expose or similar compositor features. The close event is sent by the compositor when the user wants the surface to be closed. This should be equivalent to the user clicking the close button in client-side decorations, if your application has any... This is only a request that the user intends to close your window. The client may choose to ignore this request, or show a dialog to ask the user to save their data... A popup surface is a short-lived, temporary surface that can be used to implement menus. It takes an explicit grab on the surface that will be dismissed when the user dismisses the popup. This can be done by the user clicking outside the surface, using the keyboard, or even locking the screen through closing the lid or a timeout. When the popup is dismissed, a popup_done event will be sent out, and at the same time the surface will be unmapped. The xdg_popup object is now inert and cannot be reactivated, so clients should destroy it. Explicitly destroying the xdg_popup object will also dismiss the popup and unmap the surface. Clients will receive events for all their surfaces during this grab (which is an "owner-events" grab in X11 parlance). This is done so that users can navigate through submenus and other "nested" popup windows without having to dismiss the topmost popup. Clients that want to dismiss the popup when another surface of their own is clicked should dismiss the popup using the destroy request. The parent surface must have either an xdg_surface or xdg_popup role. Specifying an xdg_popup for the parent means that the popups are nested, with this popup now being the topmost popup. Nested popups must be destroyed in the reverse order they were created in, e.g. the only popup you are allowed to destroy at all times is the topmost one. If there is an existing popup when creating a new popup, the parent must be the current topmost popup. A parent surface must be mapped before the new popup is mapped. When compositors choose to dismiss a popup, they will likely dismiss every nested popup as well. When a compositor dismisses popups, it will follow the same dismissing order as required from the client. The x and y arguments passed when creating the popup object specify where the top left of the popup should be placed, relative to the local surface coordinates of the parent surface. See xdg_shell.get_xdg_popup. The client must call wl_surface.commit on the corresponding wl_surface for the xdg_popup state to take effect. For a surface to be mapped by the compositor the client must have committed both the xdg_popup state and a buffer. This destroys the popup. Explicitly destroying the xdg_popup object will also dismiss the popup, and unmap the surface. If this xdg_popup is not the "topmost" popup, a protocol error will be sent. The popup_done event is sent out when a popup is dismissed by the compositor. The client should destroy the xdg_popup object at this point. wayland-protocols-0.29.5/protocols/unstable/xdg-shell/xdg-shell-unstable-v6.xml000064400000000000000000001303161046102023000257130ustar 00000000000000 Copyright © 2008-2013 Kristian Høgsberg Copyright © 2013 Rafael Antognolli Copyright © 2013 Jasper St. Pierre Copyright © 2010-2013 Intel Corporation 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. xdg_shell allows clients to turn a wl_surface into a "real window" which can be dragged, resized, stacked, and moved around by the user. Everything about this interface is suited towards traditional desktop environments. Destroy this xdg_shell object. Destroying a bound xdg_shell object while there are surfaces still alive created by this xdg_shell object instance is illegal and will result in a protocol error. Create a positioner object. A positioner object is used to position surfaces relative to some parent surface. See the interface description and xdg_surface.get_popup for details. This creates an xdg_surface for the given surface. While xdg_surface itself is not a role, the corresponding surface may only be assigned a role extending xdg_surface, such as xdg_toplevel or xdg_popup. This creates an xdg_surface for the given surface. An xdg_surface is used as basis to define a role to a given surface, such as xdg_toplevel or xdg_popup. It also manages functionality shared between xdg_surface based surface roles. See the documentation of xdg_surface for more details about what an xdg_surface is and how it is used. A client must respond to a ping event with a pong request or the client may be deemed unresponsive. See xdg_shell.ping. The ping event asks the client if it's still alive. Pass the serial specified in the event back to the compositor by sending a "pong" request back with the specified serial. See xdg_shell.ping. Compositors can use this to determine if the client is still alive. It's unspecified what will happen if the client doesn't respond to the ping request, or in what timeframe. Clients should try to respond in a reasonable amount of time. A compositor is free to ping in any way it wants, but a client must always respond to any xdg_shell object it created. The xdg_positioner provides a collection of rules for the placement of a child surface relative to a parent surface. Rules can be defined to ensure the child surface remains within the visible area's borders, and to specify how the child surface changes its position, such as sliding along an axis, or flipping around a rectangle. These positioner-created rules are constrained by the requirement that a child surface must intersect with or be at least partially adjacent to its parent surface. See the various requests for details about possible rules. At the time of the request, the compositor makes a copy of the rules specified by the xdg_positioner. Thus, after the request is complete the xdg_positioner object can be destroyed or reused; further changes to the object will have no effect on previous usages. For an xdg_positioner object to be considered complete, it must have a non-zero size set by set_size, and a non-zero anchor rectangle set by set_anchor_rect. Passing an incomplete xdg_positioner object when positioning a surface raises an error. Notify the compositor that the xdg_positioner will no longer be used. Set the size of the surface that is to be positioned with the positioner object. The size is in surface-local coordinates and corresponds to the window geometry. See xdg_surface.set_window_geometry. If a zero or negative size is set the invalid_input error is raised. Specify the anchor rectangle within the parent surface that the child surface will be placed relative to. The rectangle is relative to the window geometry as defined by xdg_surface.set_window_geometry of the parent surface. The rectangle must be at least 1x1 large. When the xdg_positioner object is used to position a child surface, the anchor rectangle may not extend outside the window geometry of the positioned child's parent surface. If a zero or negative size is set the invalid_input error is raised. Defines a set of edges for the anchor rectangle. These are used to derive an anchor point that the child surface will be positioned relative to. If two orthogonal edges are specified (e.g. 'top' and 'left'), then the anchor point will be the intersection of the edges (e.g. the top left position of the rectangle); otherwise, the derived anchor point will be centered on the specified edge, or in the center of the anchor rectangle if no edge is specified. If two parallel anchor edges are specified (e.g. 'left' and 'right'), the invalid_input error is raised. Defines in what direction a surface should be positioned, relative to the anchor point of the parent surface. If two orthogonal gravities are specified (e.g. 'bottom' and 'right'), then the child surface will be placed in the specified direction; otherwise, the child surface will be centered over the anchor point on any axis that had no gravity specified. If two parallel gravities are specified (e.g. 'left' and 'right'), the invalid_input error is raised. The constraint adjustment value define ways the compositor will adjust the position of the surface, if the unadjusted position would result in the surface being partly constrained. Whether a surface is considered 'constrained' is left to the compositor to determine. For example, the surface may be partly outside the compositor's defined 'work area', thus necessitating the child surface's position be adjusted until it is entirely inside the work area. The adjustments can be combined, according to a defined precedence: 1) Flip, 2) Slide, 3) Resize. Don't alter the surface position even if it is constrained on some axis, for example partially outside the edge of a monitor. Slide the surface along the x axis until it is no longer constrained. First try to slide towards the direction of the gravity on the x axis until either the edge in the opposite direction of the gravity is unconstrained or the edge in the direction of the gravity is constrained. Then try to slide towards the opposite direction of the gravity on the x axis until either the edge in the direction of the gravity is unconstrained or the edge in the opposite direction of the gravity is constrained. Slide the surface along the y axis until it is no longer constrained. First try to slide towards the direction of the gravity on the y axis until either the edge in the opposite direction of the gravity is unconstrained or the edge in the direction of the gravity is constrained. Then try to slide towards the opposite direction of the gravity on the y axis until either the edge in the direction of the gravity is unconstrained or the edge in the opposite direction of the gravity is constrained. Invert the anchor and gravity on the x axis if the surface is constrained on the x axis. For example, if the left edge of the surface is constrained, the gravity is 'left' and the anchor is 'left', change the gravity to 'right' and the anchor to 'right'. If the adjusted position also ends up being constrained, the resulting position of the flip_x adjustment will be the one before the adjustment. Invert the anchor and gravity on the y axis if the surface is constrained on the y axis. For example, if the bottom edge of the surface is constrained, the gravity is 'bottom' and the anchor is 'bottom', change the gravity to 'top' and the anchor to 'top'. If the adjusted position also ends up being constrained, the resulting position of the flip_y adjustment will be the one before the adjustment. Resize the surface horizontally so that it is completely unconstrained. Resize the surface vertically so that it is completely unconstrained. Specify how the window should be positioned if the originally intended position caused the surface to be constrained, meaning at least partially outside positioning boundaries set by the compositor. The adjustment is set by constructing a bitmask describing the adjustment to be made when the surface is constrained on that axis. If no bit for one axis is set, the compositor will assume that the child surface should not change its position on that axis when constrained. If more than one bit for one axis is set, the order of how adjustments are applied is specified in the corresponding adjustment descriptions. The default adjustment is none. Specify the surface position offset relative to the position of the anchor on the anchor rectangle and the anchor on the surface. For example if the anchor of the anchor rectangle is at (x, y), the surface has the gravity bottom|right, and the offset is (ox, oy), the calculated surface position will be (x + ox, y + oy). The offset position of the surface is the one used for constraint testing. See set_constraint_adjustment. An example use case is placing a popup menu on top of a user interface element, while aligning the user interface element of the parent surface with some user interface element placed somewhere in the popup surface. An interface that may be implemented by a wl_surface, for implementations that provide a desktop-style user interface. It provides a base set of functionality required to construct user interface elements requiring management by the compositor, such as toplevel windows, menus, etc. The types of functionality are split into xdg_surface roles. Creating an xdg_surface does not set the role for a wl_surface. In order to map an xdg_surface, the client must create a role-specific object using, e.g., get_toplevel, get_popup. The wl_surface for any given xdg_surface can have at most one role, and may not be assigned any role not based on xdg_surface. A role must be assigned before any other requests are made to the xdg_surface object. The client must call wl_surface.commit on the corresponding wl_surface for the xdg_surface state to take effect. Creating an xdg_surface from a wl_surface which has a buffer attached or committed is a client error, and any attempts by a client to attach or manipulate a buffer prior to the first xdg_surface.configure call must also be treated as errors. For a surface to be mapped by the compositor, the following conditions must be met: (1) the client has assigned an xdg_surface based role to the surface, (2) the client has set and committed the xdg_surface state and the role dependent state to the surface and (3) the client has committed a buffer to the surface. Destroy the xdg_surface object. An xdg_surface must only be destroyed after its role object has been destroyed. This creates an xdg_toplevel object for the given xdg_surface and gives the associated wl_surface the xdg_toplevel role. See the documentation of xdg_toplevel for more details about what an xdg_toplevel is and how it is used. This creates an xdg_popup object for the given xdg_surface and gives the associated wl_surface the xdg_popup role. See the documentation of xdg_popup for more details about what an xdg_popup is and how it is used. The window geometry of a surface is its "visible bounds" from the user's perspective. Client-side decorations often have invisible portions like drop-shadows which should be ignored for the purposes of aligning, placing and constraining windows. The window geometry is double buffered, and will be applied at the time wl_surface.commit of the corresponding wl_surface is called. Once the window geometry of the surface is set, it is not possible to unset it, and it will remain the same until set_window_geometry is called again, even if a new subsurface or buffer is attached. If never set, the value is the full bounds of the surface, including any subsurfaces. This updates dynamically on every commit. This unset is meant for extremely simple clients. The arguments are given in the surface-local coordinate space of the wl_surface associated with this xdg_surface. The width and height must be greater than zero. Setting an invalid size will raise an error. When applied, the effective window geometry will be the set window geometry clamped to the bounding rectangle of the combined geometry of the surface of the xdg_surface and the associated subsurfaces. When a configure event is received, if a client commits the surface in response to the configure event, then the client must make an ack_configure request sometime before the commit request, passing along the serial of the configure event. For instance, for toplevel surfaces the compositor might use this information to move a surface to the top left only when the client has drawn itself for the maximized or fullscreen state. If the client receives multiple configure events before it can respond to one, it only has to ack the last configure event. A client is not required to commit immediately after sending an ack_configure request - it may even ack_configure several times before its next surface commit. A client may send multiple ack_configure requests before committing, but only the last request sent before a commit indicates which configure event the client really is responding to. The configure event marks the end of a configure sequence. A configure sequence is a set of one or more events configuring the state of the xdg_surface, including the final xdg_surface.configure event. Where applicable, xdg_surface surface roles will during a configure sequence extend this event as a latched state sent as events before the xdg_surface.configure event. Such events should be considered to make up a set of atomically applied configuration states, where the xdg_surface.configure commits the accumulated state. Clients should arrange their surface for the new states, and then send an ack_configure request with the serial sent in this configure event at some point before committing the new surface. If the client receives multiple configure events before it can respond to one, it is free to discard all but the last event it received. This interface defines an xdg_surface role which allows a surface to, among other things, set window-like properties such as maximize, fullscreen, and minimize, set application-specific metadata like title and id, and well as trigger user interactive operations such as interactive resize and move. Unmap and destroy the window. The window will be effectively hidden from the user's point of view, and all state like maximization, fullscreen, and so on, will be lost. Set the "parent" of this surface. This window should be stacked above a parent. The parent surface must be mapped as long as this surface is mapped. Parent windows should be set on dialogs, toolboxes, or other "auxiliary" surfaces, so that the parent is raised when the dialog is raised. Set a short title for the surface. This string may be used to identify the surface in a task bar, window list, or other user interface elements provided by the compositor. The string must be encoded in UTF-8. Set an application identifier for the surface. The app ID identifies the general class of applications to which the surface belongs. The compositor can use this to group multiple surfaces together, or to determine how to launch a new application. For D-Bus activatable applications, the app ID is used as the D-Bus service name. The compositor shell will try to group application surfaces together by their app ID. As a best practice, it is suggested to select app ID's that match the basename of the application's .desktop file. For example, "org.freedesktop.FooViewer" where the .desktop file is "org.freedesktop.FooViewer.desktop". See the desktop-entry specification [0] for more details on application identifiers and how they relate to well-known D-Bus names and .desktop files. [0] http://standards.freedesktop.org/desktop-entry-spec/ Clients implementing client-side decorations might want to show a context menu when right-clicking on the decorations, giving the user a menu that they can use to maximize or minimize the window. This request asks the compositor to pop up such a window menu at the given position, relative to the local surface coordinates of the parent surface. There are no guarantees as to what menu items the window menu contains. This request must be used in response to some sort of user action like a button press, key press, or touch down event. Start an interactive, user-driven move of the surface. This request must be used in response to some sort of user action like a button press, key press, or touch down event. The passed serial is used to determine the type of interactive move (touch, pointer, etc). The server may ignore move requests depending on the state of the surface (e.g. fullscreen or maximized), or if the passed serial is no longer valid. If triggered, the surface will lose the focus of the device (wl_pointer, wl_touch, etc) used for the move. It is up to the compositor to visually indicate that the move is taking place, such as updating a pointer cursor, during the move. There is no guarantee that the device focus will return when the move is completed. These values are used to indicate which edge of a surface is being dragged in a resize operation. Start a user-driven, interactive resize of the surface. This request must be used in response to some sort of user action like a button press, key press, or touch down event. The passed serial is used to determine the type of interactive resize (touch, pointer, etc). The server may ignore resize requests depending on the state of the surface (e.g. fullscreen or maximized). If triggered, the client will receive configure events with the "resize" state enum value and the expected sizes. See the "resize" enum value for more details about what is required. The client must also acknowledge configure events using "ack_configure". After the resize is completed, the client will receive another "configure" event without the resize state. If triggered, the surface also will lose the focus of the device (wl_pointer, wl_touch, etc) used for the resize. It is up to the compositor to visually indicate that the resize is taking place, such as updating a pointer cursor, during the resize. There is no guarantee that the device focus will return when the resize is completed. The edges parameter specifies how the surface should be resized, and is one of the values of the resize_edge enum. The compositor may use this information to update the surface position for example when dragging the top left corner. The compositor may also use this information to adapt its behavior, e.g. choose an appropriate cursor image. The different state values used on the surface. This is designed for state values like maximized, fullscreen. It is paired with the configure event to ensure that both the client and the compositor setting the state can be synchronized. States set in this way are double-buffered. They will get applied on the next commit. The surface is maximized. The window geometry specified in the configure event must be obeyed by the client. The surface is fullscreen. The window geometry specified in the configure event must be obeyed by the client. The surface is being resized. The window geometry specified in the configure event is a maximum; the client cannot resize beyond it. Clients that have aspect ratio or cell sizing configuration can use a smaller size, however. Client window decorations should be painted as if the window is active. Do not assume this means that the window actually has keyboard or pointer focus. Set a maximum size for the window. The client can specify a maximum size so that the compositor does not try to configure the window beyond this size. The width and height arguments are in window geometry coordinates. See xdg_surface.set_window_geometry. Values set in this way are double-buffered. They will get applied on the next commit. The compositor can use this information to allow or disallow different states like maximize or fullscreen and draw accurate animations. Similarly, a tiling window manager may use this information to place and resize client windows in a more effective way. The client should not rely on the compositor to obey the maximum size. The compositor may decide to ignore the values set by the client and request a larger size. If never set, or a value of zero in the request, means that the client has no expected maximum size in the given dimension. As a result, a client wishing to reset the maximum size to an unspecified state can use zero for width and height in the request. Requesting a maximum size to be smaller than the minimum size of a surface is illegal and will result in a protocol error. The width and height must be greater than or equal to zero. Using strictly negative values for width and height will result in a protocol error. Set a minimum size for the window. The client can specify a minimum size so that the compositor does not try to configure the window below this size. The width and height arguments are in window geometry coordinates. See xdg_surface.set_window_geometry. Values set in this way are double-buffered. They will get applied on the next commit. The compositor can use this information to allow or disallow different states like maximize or fullscreen and draw accurate animations. Similarly, a tiling window manager may use this information to place and resize client windows in a more effective way. The client should not rely on the compositor to obey the minimum size. The compositor may decide to ignore the values set by the client and request a smaller size. If never set, or a value of zero in the request, means that the client has no expected minimum size in the given dimension. As a result, a client wishing to reset the minimum size to an unspecified state can use zero for width and height in the request. Requesting a minimum size to be larger than the maximum size of a surface is illegal and will result in a protocol error. The width and height must be greater than or equal to zero. Using strictly negative values for width and height will result in a protocol error. Maximize the surface. After requesting that the surface should be maximized, the compositor will respond by emitting a configure event with the "maximized" state and the required window geometry. The client should then update its content, drawing it in a maximized state, i.e. without shadow or other decoration outside of the window geometry. The client must also acknowledge the configure when committing the new content (see ack_configure). It is up to the compositor to decide how and where to maximize the surface, for example which output and what region of the screen should be used. If the surface was already maximized, the compositor will still emit a configure event with the "maximized" state. Unmaximize the surface. After requesting that the surface should be unmaximized, the compositor will respond by emitting a configure event without the "maximized" state. If available, the compositor will include the window geometry dimensions the window had prior to being maximized in the configure request. The client must then update its content, drawing it in a regular state, i.e. potentially with shadow, etc. The client must also acknowledge the configure when committing the new content (see ack_configure). It is up to the compositor to position the surface after it was unmaximized; usually the position the surface had before maximizing, if applicable. If the surface was already not maximized, the compositor will still emit a configure event without the "maximized" state. Make the surface fullscreen. You can specify an output that you would prefer to be fullscreen. If this value is NULL, it's up to the compositor to choose which display will be used to map this surface. If the surface doesn't cover the whole output, the compositor will position the surface in the center of the output and compensate with black borders filling the rest of the output. Request that the compositor minimize your surface. There is no way to know if the surface is currently minimized, nor is there any way to unset minimization on this surface. If you are looking to throttle redrawing when minimized, please instead use the wl_surface.frame event for this, as this will also work with live previews on windows in Alt-Tab, Expose or similar compositor features. This configure event asks the client to resize its toplevel surface or to change its state. The configured state should not be applied immediately. See xdg_surface.configure for details. The width and height arguments specify a hint to the window about how its surface should be resized in window geometry coordinates. See set_window_geometry. If the width or height arguments are zero, it means the client should decide its own window dimension. This may happen when the compositor needs to configure the state of the surface but doesn't have any information about any previous or expected dimension. The states listed in the event specify how the width/height arguments should be interpreted, and possibly how it should be drawn. Clients must send an ack_configure in response to this event. See xdg_surface.configure and xdg_surface.ack_configure for details. The close event is sent by the compositor when the user wants the surface to be closed. This should be equivalent to the user clicking the close button in client-side decorations, if your application has any. This is only a request that the user intends to close the window. The client may choose to ignore this request, or show a dialog to ask the user to save their data, etc. A popup surface is a short-lived, temporary surface. It can be used to implement for example menus, popovers, tooltips and other similar user interface concepts. A popup can be made to take an explicit grab. See xdg_popup.grab for details. When the popup is dismissed, a popup_done event will be sent out, and at the same time the surface will be unmapped. See the xdg_popup.popup_done event for details. Explicitly destroying the xdg_popup object will also dismiss the popup and unmap the surface. Clients that want to dismiss the popup when another surface of their own is clicked should dismiss the popup using the destroy request. The parent surface must have either the xdg_toplevel or xdg_popup surface role. A newly created xdg_popup will be stacked on top of all previously created xdg_popup surfaces associated with the same xdg_toplevel. The parent of an xdg_popup must be mapped (see the xdg_surface description) before the xdg_popup itself. The x and y arguments passed when creating the popup object specify where the top left of the popup should be placed, relative to the local surface coordinates of the parent surface. See xdg_surface.get_popup. An xdg_popup must intersect with or be at least partially adjacent to its parent surface. The client must call wl_surface.commit on the corresponding wl_surface for the xdg_popup state to take effect. This destroys the popup. Explicitly destroying the xdg_popup object will also dismiss the popup, and unmap the surface. If this xdg_popup is not the "topmost" popup, a protocol error will be sent. This request makes the created popup take an explicit grab. An explicit grab will be dismissed when the user dismisses the popup, or when the client destroys the xdg_popup. This can be done by the user clicking outside the surface, using the keyboard, or even locking the screen through closing the lid or a timeout. If the compositor denies the grab, the popup will be immediately dismissed. This request must be used in response to some sort of user action like a button press, key press, or touch down event. The serial number of the event should be passed as 'serial'. The parent of a grabbing popup must either be an xdg_toplevel surface or another xdg_popup with an explicit grab. If the parent is another xdg_popup it means that the popups are nested, with this popup now being the topmost popup. Nested popups must be destroyed in the reverse order they were created in, e.g. the only popup you are allowed to destroy at all times is the topmost one. When compositors choose to dismiss a popup, they may dismiss every nested grabbing popup as well. When a compositor dismisses popups, it will follow the same dismissing order as required from the client. The parent of a grabbing popup must either be another xdg_popup with an active explicit grab, or an xdg_popup or xdg_toplevel, if there are no explicit grabs already taken. If the topmost grabbing popup is destroyed, the grab will be returned to the parent of the popup, if that parent previously had an explicit grab. If the parent is a grabbing popup which has already been dismissed, this popup will be immediately dismissed. If the parent is a popup that did not take an explicit grab, an error will be raised. During a popup grab, the client owning the grab will receive pointer and touch events for all their surfaces as normal (similar to an "owner-events" grab in X11 parlance), while the top most grabbing popup will always have keyboard focus. This event asks the popup surface to configure itself given the configuration. The configured state should not be applied immediately. See xdg_surface.configure for details. The x and y arguments represent the position the popup was placed at given the xdg_positioner rule, relative to the upper left corner of the window geometry of the parent surface. The popup_done event is sent out when a popup is dismissed by the compositor. The client should destroy the xdg_popup object at this point. wayland-protocols-0.29.5/protocols/unstable/xwayland-keyboard-grab/README000064400000000000000000000001301046102023000244530ustar 00000000000000Xwayland keyboard grabbing protocol Maintainers: Olivier Fourdan ././@LongLink00006440000000000000000000000152000000000000007771Lustar wayland-protocols-0.29.5/protocols/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xmlwayland-protocols-0.29.5/protocols/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v000064400000000000000000000127411046102023000321450ustar 00000000000000 Copyright © 2017 Red Hat Inc. 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. This protocol is application-specific to meet the needs of the X11 protocol through Xwayland. It provides a way for Xwayland to request all keyboard events to be forwarded to a surface even when the surface does not have keyboard focus. In the X11 protocol, a client may request an "active grab" on the keyboard. On success, all key events are reported only to the grabbing X11 client. For details, see XGrabKeyboard(3). The core Wayland protocol does not have a notion of an active keyboard grab. When running in Xwayland, X11 applications may acquire an active grab inside Xwayland but that cannot be translated to the Wayland compositor who may set the input focus to some other surface. In doing so, it breaks the X11 client assumption that all key events are reported to the grabbing client. This protocol specifies a way for Xwayland to request all keyboard be directed to the given surface. The protocol does not guarantee that the compositor will honor this request and it does not prescribe user interfaces on how to handle the respond. For example, a compositor may inform the user that all key events are now forwarded to the given client surface, or it may ask the user for permission to do so. Compositors are required to restrict access to this application specific protocol to Xwayland alone. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. A global interface used for grabbing the keyboard. Destroy the keyboard grab manager. The grab_keyboard request asks for a grab of the keyboard, forcing the keyboard focus for the given seat upon the given surface. The protocol provides no guarantee that the grab is ever satisfied, and does not require the compositor to send an error if the grab cannot ever be satisfied. It is thus possible to request a keyboard grab that will never be effective. The protocol: * does not guarantee that the grab itself is applied for a surface, the grab request may be silently ignored by the compositor, * does not guarantee that any events are sent to this client even if the grab is applied to a surface, * does not guarantee that events sent to this client are exhaustive, a compositor may filter some events for its own consumption, * does not guarantee that events sent to this client are continuous, a compositor may change and reroute keyboard events while the grab is nominally active. A global interface used for grabbing the keyboard. Destroy the grabbed keyboard object. If applicable, the compositor will ungrab the keyboard. wayland-protocols-0.29.5/protocols/wayland-protocols-uninstalled.pc.in000064400000000000000000000002161046102023000243570ustar 00000000000000pkgdatadir=@abs_top_srcdir@ Name: Wayland Protocols Description: Wayland protocol files (not installed) Version: @WAYLAND_PROTOCOLS_VERSION@ wayland-protocols-0.29.5/protocols/wayland-protocols.pc.in000064400000000000000000000003001046102023000220310ustar 00000000000000prefix=@prefix@ datarootdir=@datarootdir@ pkgdatadir=${pc_sysrootdir}${datarootdir}/@PACKAGE@ Name: Wayland Protocols Description: Wayland protocol files Version: @WAYLAND_PROTOCOLS_VERSION@ wayland-protocols-0.29.5/src/lib.rs000064400000000000000000000021131046102023000153020ustar 00000000000000//! This crate provides bindings to the official wayland protocol extensions //! provided in https://cgit.freedesktop.org/wayland/wayland-protocols //! //! These bindings are built on top of the crates wayland-client and wayland-server. //! //! Each protocol module contains a `client` and a `server` submodules, for each side of the //! protocol. The creation of these modules (and the dependency on the associated crate) is //! controlled by the two cargo features `client` and `server`. //! //! The cargo feature `unstable_protocols` adds an `unstable` module, containing bindings //! to protocols that are not yet considered stable. As such, no stability guarantee is //! given for these protocols. //! //! Some protocols require unstable rust features, the inclusion of them is controlled //! by the cargo feature `nightly`. #![warn(missing_docs)] #[macro_use] extern crate bitflags; #[macro_use] mod protocol_macro; #[cfg(feature = "staging_protocols")] pub mod staging; #[cfg(feature = "unstable_protocols")] pub mod unstable; pub mod misc; pub mod wlr; mod stable; pub use stable::*; wayland-protocols-0.29.5/src/misc.rs000064400000000000000000000123071046102023000154750ustar 00000000000000//! Misc protocols //! //! This module contains protocols that are not clearly packaged by their maintainers, //! often being implementation details of desktop environment, but can be used by external //! tools for interoperability. //! //! Given they are not clearly packaged, the maintainers of this crate cannot guarantee //! anything when it comes to them being up to date or the stability of their interface. //! Pull requests for updating them will be welcomed, but we won't actively check if they //! have received any updates. #![cfg_attr(rustfmt, rustfmt_skip)] pub mod gtk_primary_selection { //! Gtk primary selection protocol //! //! This protocol provides the ability to have a primary selection device to //! match that of the X server. This primary selection is a shortcut to the //! common clipboard selection, where text just needs to be selected in order //! to allow copying it elsewhere. The de facto way to perform this action //! is the middle mouse button, although it is not limited to this one. //! //! Clients wishing to honor primary selection should create a primary //! selection source and set it as the selection through //! `wp_primary_selection_device.set_selection` whenever the text selection //! changes. In order to minimize calls in pointer-driven text selection, //! it should happen only once after the operation finished. Similarly, //! a NULL source should be set when text is unselected. //! //! `wp_primary_selection_offer` objects are first announced through the //! `wp_primary_selection_device.data_offer` event. Immediately after this event, //! the primary data offer will emit `wp_primary_selection_offer.offer` events //! to let know of the mime types being offered. //! //! When the primary selection changes, the client with the keyboard focus //! will receive `wp_primary_selection_device.selection` events. Only the client //! with the keyboard focus will receive such events with a non-NULL //! `wp_primary_selection_offer`. Across keyboard focus changes, previously //! focused clients will receive `wp_primary_selection_device.events` with a //! NULL `wp_primary_selection_offer`. //! //! In order to request the primary selection data, the client must pass //! a recent serial pertaining to the press event that is triggering the //! operation, if the compositor deems the serial valid and recent, the //! `wp_primary_selection_source.send` event will happen in the other end //! to let the transfer begin. The client owning the primary selection //! should write the requested data, and close the file descriptor //! immediately. //! //! If the primary selection owner client disappeared during the transfer, //! the client reading the data will receive a //! `wp_primary_selection_device.selection` event with a NULL //! `wp_primary_selection_offer`, the client should take this as a hint //! to finish the reads related to the no longer existing offer. //! //! The primary selection owner should be checking for errors during //! writes, merely cancelling the ongoing transfer if any happened. wayland_protocol!("gtk-primary-selection", [(wl_seat, wl_seat_interface)], []); } #[cfg(feature = "unstable_protocols")] pub mod zwp_input_method_v2 { //! Input method v2 unstable //! //! This protocol allows applications to act as input methods for compositors. //! //! An input method context is used to manage the state of the input method. //! //! Text strings are UTF-8 encoded, their indices and lengths are in bytes. //! //! This document adheres to the RFC 2119 when using words like "must", //! "should", "may", etc. //! //! Warning! The protocol described in this file is experimental and //! backward incompatible changes may be made. Backward compatible changes //! may be added together with the corresponding interface version bump. //! Backward incompatible changes are done by bumping the version number in //! the protocol and interface names and resetting the interface version. //! Once the protocol is to be declared stable, the 'z' prefix and the //! version number in the protocol and interface names are removed and the //! interface version number is reset. wayland_protocol!( "input-method-unstable-v2", [ (wl_seat, wl_seat_interface), (wl_surface, wl_surface_interface), (wl_output, wl_output_interface), (wl_keyboard, wl_keyboard_interface) ], [(unstable::text_input::v3, zwp_text_input_v3, zwp_text_input_v3_interface)] ); } pub mod server_decoration{ //! KDE server decoration protocol //! //! This interface allows to coordinate whether the server should create //! a server-side window decoration around a wl_surface representing a //! shell surface (wl_shell_surface or similar). By announcing support //! for this interface the server indicates that it supports server //! side decorations. //! //! Use in conjunction with zxdg_decoration_manager_v1 is undefined. wayland_protocol!("server-decoration", [(wl_surface, wl_seat_surface)], []); } wayland-protocols-0.29.5/src/protocol_macro.rs000064400000000000000000000055051046102023000175660ustar 00000000000000macro_rules! wayland_protocol( ( $name: expr, [$(($import: ident, $interface: ident)),*], // Path declaration in prot_name is to allow importing from another class of protocols, such as unstable [$(($($prot_name:ident)::+, $prot_import: ident, $prot_iface: ident)),*] ) => { #[cfg(feature = "client")] pub use self::generated::client; #[cfg(feature = "server")] pub use self::generated::server; mod generated { #![allow(dead_code,non_camel_case_types,unused_unsafe,unused_variables)] #![allow(non_upper_case_globals,non_snake_case,unused_imports)] #![allow(missing_docs, clippy::all)] #[cfg(feature = "client")] pub mod client { //! Client-side API of this protocol pub(crate) use wayland_client::{Main, Attached, Proxy, ProxyMap, AnonymousObject}; pub(crate) use wayland_commons::map::{Object, ObjectMetadata}; pub(crate) use wayland_commons::{Interface, MessageGroup}; pub(crate) use wayland_commons::wire::{Argument, MessageDesc, ArgumentType, Message}; pub(crate) use wayland_commons::smallvec; pub(crate) use wayland_client::protocol::{$($import),*}; pub(crate) use wayland_client::sys; $( pub(crate) use crate::$($prot_name ::)*client::$prot_import; )* include!(concat!(env!("OUT_DIR"), "/", $name, "_client_api.rs")); } #[cfg(feature = "server")] pub mod server { //! Server-side API of this protocol pub(crate) use wayland_server::{Main, AnonymousObject, Resource, ResourceMap}; pub(crate) use wayland_commons::map::{Object, ObjectMetadata}; pub(crate) use wayland_commons::{Interface, MessageGroup}; pub(crate) use wayland_commons::wire::{Argument, MessageDesc, ArgumentType, Message}; pub(crate) use wayland_commons::smallvec; pub(crate) use wayland_server::protocol::{$($import),*}; pub(crate) use wayland_server::sys; $( pub(crate) use crate::$($prot_name ::)*server::$prot_import; )* include!(concat!(env!("OUT_DIR"), "/", $name, "_server_api.rs")); } } } ); #[cfg(any(feature = "staging_protocols", feature = "unstable_protocols"))] macro_rules! wayland_protocol_versioned( ($name: expr, [$($version: ident),*], $std_imports:tt, $prot_imports:tt) => { $( #[allow(missing_docs)] pub mod $version { wayland_protocol!(concat!($name, "-", stringify!($version)), $std_imports, $prot_imports); } )* } ); wayland-protocols-0.29.5/src/stable.rs000064400000000000000000000017451046102023000160200ustar 00000000000000#![cfg_attr(rustfmt, rustfmt_skip)] pub mod presentation_time { //! Presentation time protocol //! //! Allows precise feedback on presentation timing, for example for smooth video playback. wayland_protocol!( "presentation-time", [(wl_surface, wl_surface_interface), (wl_output, wl_output_interface)], [] ); } pub mod xdg_shell { //! XDG Shell protocol //! //! Exposes the `xdg_wm_base` global, which deprecates and replaces `wl_shell`. wayland_protocol!( "xdg-shell", [ (wl_seat, wl_seat_interface), (wl_surface, wl_surface_interface), (wl_output, wl_output_interface) ], [] ); } pub mod viewporter { //! Viewporter protocol //! //! Provides the capability of scaling and cropping surfaces, decorrelating the surface //! dimensions from the size of the buffer. wayland_protocol!("viewporter", [(wl_surface, wl_surface_interface)], []); } wayland-protocols-0.29.5/src/staging.rs000064400000000000000000000037701046102023000162020ustar 00000000000000//! Staging protocols from wayland-protocols //! //! The protocols described this module are in the staging process and will soon be made part of a //! release. Staging protocols are guaranteed to have no backwards incompatible changes introduced. //! //! These protocols are ready for wider adoption and clients and compositors are encouraged to //! implement staging protocol extensions where a protocol's functionality is desired. //! //! Although these protocols should be stable, the protocols may be completely replaced in a new //! major version or with a completely different protocol. #![cfg_attr(rustfmt, rustfmt_skip)] pub mod xdg_activation { //! The way for a client to pass focus to another toplevel is as follows. //! //! The client that intends to activate another toplevel uses the //! xdg_activation_v1.get_activation_token request to get an activation token. //! This token is then passed to the client to be activated through a separate //! band of communication. The client to be activated will then pass the token //! it received to the xdg_activation_v1.activate request. The compositor can //! then use this token to decide how to react to the activation request. //! //! The token the activating client gets may be ineffective either already at //! the time it receives it, for example if it was not focused, for focus //! stealing prevention. The activating client will have no way to discover //! the validity of the token, and may still forward it to the to be activated //! client. //! //! The created activation token may optionally get information attached to it //! that can be used by the compositor to identify the application that we //! intend to activate. This can for example be used to display a visual hint //! about what application is being started. wayland_protocol_versioned!( "xdg-activation", [v1], [(wl_seat, wl_seat_interface), (wl_surface, wl_surface_interface)], [] ); } wayland-protocols-0.29.5/src/unstable.rs000064400000000000000000000372341046102023000163650ustar 00000000000000//! Unstable protocols from wayland-protocols //! //! The protocols described in this module are experimental and //! provide no guarantee of forward support. They may be abandoned //! or never widely implemented. //! //! Backward compatible changes may be added together with the //! corresponding interface version bump. //! //! Backward incompatible changes are done by bumping the version //! number in the protocol and interface names and resetting the //! interface version. Once the protocol is to be declared stable, //! the 'z' prefix and the version number in the protocol and //! interface names are removed and the interface version number is //! reset. #![cfg_attr(rustfmt, rustfmt_skip)] pub mod fullscreen_shell { //! Fullscreen shell protocol wayland_protocol_versioned!( "fullscreen-shell", [v1], [(wl_surface, wl_surface_interface), (wl_output, wl_output_interface)], [] ); } pub mod idle_inhibit { //! Screensaver inhibition protocol wayland_protocol_versioned!("idle-inhibit", [v1], [(wl_surface, wl_surface_interface)], []); } pub mod input_method { //! Input method protocol wayland_protocol_versioned!( "input-method", [v1], [ (wl_surface, wl_surface_interface), (wl_output, wl_output_interface), (wl_keyboard, wl_keyboard_interface) ], [] ); } pub mod input_timestamps { //! Input timestamps protocol wayland_protocol_versioned!( "input-timestamps", [v1], [ (wl_keyboard, wl_keyboard_interface), (wl_pointer, wl_pointer_interface), (wl_touch, wl_touch_interface) ], [] ); } pub mod keyboard_shortcuts_inhibit { //! Protocol for inhibiting the compositor keyboard shortcuts //! //! This protocol specifies a way for a client to request the compositor //! to ignore its own keyboard shortcuts for a given seat, so that all //! key events from that seat get forwarded to a surface. wayland_protocol_versioned!( "keyboard-shortcuts-inhibit", [v1], [(wl_seat, wl_seat_interface), (wl_surface, wl_surface_interface)], [] ); } pub mod linux_dmabuf { //! Linux DMA-BUF protocol wayland_protocol_versioned!("linux-dmabuf", [v1], [(wl_buffer, wl_buffer_interface)], []); } pub mod linux_explicit_synchronization { //! Linux explicit synchronization protocol wayland_protocol_versioned!( "linux-explicit-synchronization", [v1], [(wl_surface, wl_surface_interface)], [] ); } pub mod pointer_constraints { //! protocol for constraining pointer motions //! //! This protocol specifies a set of interfaces used for adding constraints to //! the motion of a pointer. Possible constraints include confining pointer //! motions to a given region, or locking it to its current position. //! //! In order to constrain the pointer, a client must first bind the global //! interface "wp_pointer_constraints" which, if a compositor supports pointer //! constraints, is exposed by the registry. Using the bound global object, the //! client uses the request that corresponds to the type of constraint it wants //! to make. See wp_pointer_constraints for more details. wayland_protocol_versioned!( "pointer-constraints", [v1], [ (wl_surface, wl_surface_interface), (wl_pointer, wl_pointer_interface), (wl_region, wl_region_interface) ], [] ); } pub mod pointer_gestures { //! Pointer gestures protocol wayland_protocol_versioned!( "pointer-gestures", [v1], [(wl_surface, wl_surface_interface), (wl_pointer, wl_pointer_interface)], [] ); } pub mod primary_selection { //! Primary selection protocol wayland_protocol_versioned!("primary-selection", [v1], [(wl_seat, wl_seat_interface)], []); } pub mod relative_pointer { //! protocol for relative pointer motion events //! //! This protocol specifies a set of interfaces used for making clients able to //! receive relative pointer events not obstructed by barriers (such as the //! monitor edge or other pointer barriers). //! //! To start receiving relative pointer events, a client must first bind the //! global interface "wp_relative_pointer_manager" which, if a compositor //! supports relative pointer motion events, is exposed by the registry. After //! having created the relative pointer manager proxy object, the client uses //! it to create the actual relative pointer object using the //! "get_relative_pointer" request given a wl_pointer. The relative pointer //! motion events will then, when applicable, be transmitted via the proxy of //! the newly created relative pointer object. See the documentation of the //! relative pointer interface for more details. wayland_protocol_versioned!("relative-pointer", [v1], [(wl_pointer, wl_pointer_interface)], []); } pub mod tablet { //! Wayland protocol for graphics tablets //! //! This description provides a high-level overview of the interplay between //! the interfaces defined this protocol. For details, see the protocol //! specification. //! //! More than one tablet may exist, and device-specifics matter. Tablets are //! not represented by a single virtual device like wl_pointer. A client //! binds to the tablet manager object which is just a proxy object. From //! that, the client requests wp_tablet_manager.get_tablet_seat(wl_seat) //! and that returns the actual interface that has all the tablets. With //! this indirection, we can avoid merging wp_tablet into the actual Wayland //! protocol, a long-term benefit. //! //! The wp_tablet_seat sends a "tablet added" event for each tablet //! connected. That event is followed by descriptive events about the //! hardware; currently that includes events for name, vid/pid and //! a wp_tablet.path event that describes a local path. This path can be //! used to uniquely identify a tablet or get more information through //! libwacom. Emulated or nested tablets can skip any of those, e.g. a //! virtual tablet may not have a vid/pid. The sequence of descriptive //! events is terminated by a wp_tablet.done event to signal that a client //! may now finalize any initialization for that tablet. //! //! Events from tablets require a tool in proximity. Tools are also managed //! by the tablet seat; a "tool added" event is sent whenever a tool is new //! to the compositor. That event is followed by a number of descriptive //! events about the hardware; currently that includes capabilities, //! hardware id and serial number, and tool type. Similar to the tablet //! interface, a wp_tablet_tool.done event is sent to terminate that initial //! sequence. //! //! Any event from a tool happens on the wp_tablet_tool interface. When the //! tool gets into proximity of the tablet, a proximity_in event is sent on //! the wp_tablet_tool interface, listing the tablet and the surface. That //! event is followed by a motion event with the coordinates. After that, //! it's the usual motion, axis, button, etc. events. The protocol's //! serialisation means events are grouped by wp_tablet_tool.frame events. //! //! Two special events (that don't exist in X) are down and up. They signal //! "tip touching the surface". For tablets without real proximity //! detection, the sequence is: proximity_in, motion, down, frame. //! //! When the tool leaves proximity, a proximity_out event is sent. If any //! button is still down, a button release event is sent before this //! proximity event. These button events are sent in the same frame as the //! proximity event to signal to the client that the buttons were held when //! the tool left proximity. //! //! If the tool moves out of the surface but stays in proximity (i.e. //! between windows), compositor-specific grab policies apply. This usually //! means that the proximity-out is delayed until all buttons are released. //! //! Moving a tool physically from one tablet to the other has no real effect //! on the protocol, since we already have the tool object from the "tool //! added" event. All the information is already there and the proximity //! events on both tablets are all a client needs to reconstruct what //! happened. //! //! Some extra axes are normalized, i.e. the client knows the range as //! specified in the protocol (e.g. [0, 65535]), the granularity however is //! unknown. The current normalized axes are pressure, distance, and slider. //! //! Other extra axes are in physical units as specified in the protocol. //! The current extra axes with physical units are tilt, rotation and //! wheel rotation. //! //! Since tablets work independently of the pointer controlled by the mouse, //! the focus handling is independent too and controlled by proximity. //! The wp_tablet_tool.set_cursor request sets a tool-specific cursor. //! This cursor surface may be the same as the mouse cursor, and it may be //! the same across tools but it is possible to be more fine-grained. For //! example, a client may set different cursors for the pen and eraser. //! //! Tools are generally independent of tablets and it is //! compositor-specific policy when a tool can be removed. Common approaches //! will likely include some form of removing a tool when all tablets the //! tool was used on are removed. wayland_protocol_versioned!( "tablet", [v1, v2], [(wl_seat, wl_seat_interface), (wl_surface, wl_surface_interface)], [] ); } pub mod text_input { //! Text input protocol wayland_protocol_versioned!( "text-input", [v1, v3], [(wl_seat, wl_seat_interface), (wl_surface, wl_surface_interface)], [] ); } pub mod xdg_decoration { //! This interface allows a compositor to announce support for server-side //! decorations. //! A window decoration is a set of window controls as deemed appropriate by //! the party managing them, such as user interface components used to move, //! resize and change a window's state. //! A client can use this protocol to request being decorated by a supporting //! compositor. //! If compositor and client do not negotiate the use of a server-side //! decoration using this protocol, clients continue to self-decorate as they //! see fit. wayland_protocol_versioned!( "xdg-decoration", [v1], [], [(xdg_shell, xdg_toplevel, xdg_toplevel_interface)] ); } pub mod xdg_foreign { //! Protocol for exporting xdg surface handles //! //! This protocol specifies a way for making it possible to reference a surface //! of a different client. With such a reference, a client can, by using the //! interfaces provided by this protocol, manipulate the relationship between //! its own surfaces and the surface of some other client. For example, stack //! some of its own surface above the other clients surface. //! //! In order for a client A to get a reference of a surface of client B, client //! B must first export its surface using xdg_exporter.export. Upon doing this, //! client B will receive a handle (a unique string) that it may share with //! client A in some way (for example D-Bus). After client A has received the //! handle from client B, it may use xdg_importer.import to create a reference //! to the surface client B just exported. See the corresponding requests for //! details. //! //! A possible use case for this is out-of-process dialogs. For example when a //! sandboxed client without file system access needs the user to select a file //! on the file system, given sandbox environment support, it can export its //! surface, passing the exported surface handle to an unsandboxed process that //! can show a file browser dialog and stack it above the sandboxed client's //! surface. wayland_protocol_versioned!("xdg-foreign", [v1, v2], [(wl_surface, wl_surface_interface)], []); } pub mod xdg_output { //! Protocol to describe output regions //! //! This protocol aims at describing outputs in a way which is more in line //! with the concept of an output on desktop oriented systems. //! //! Some information are more specific to the concept of an output for //! a desktop oriented system and may not make sense in other applications, //! such as IVI systems for example. //! //! Typically, the global compositor space on a desktop system is made of //! a contiguous or overlapping set of rectangular regions. //! //! Some of the information provided in this protocol might be identical //! to their counterparts already available from wl_output, in which case //! the information provided by this protocol should be preferred to their //! equivalent in wl_output. The goal is to move the desktop specific //! concepts (such as output location within the global compositor space, //! the connector name and types, etc.) out of the core wl_output protocol. wayland_protocol_versioned!("xdg-output", [v1], [(wl_output, wl_output_interface)], []); } pub mod xdg_shell { //! XDG Shell protocol //! //! These are the old, unstable versions of the now stable XDG Shell protocol. //! //! They remain here for compatibility reasons, allowing you to support older //! clients/server not yet implementing the new protocol. wayland_protocol_versioned!( "xdg-shell", [v5, v6], [ (wl_surface, wl_surface_interface), (wl_output, wl_output_interface), (wl_seat, wl_seat_interface) ], [] ); } pub mod xwayland_keyboard_grab { //! Protocol for grabbing the keyboard from Xwayland //! //! This protocol is application-specific to meet the needs of the X11 //! protocol through Xwayland. It provides a way for Xwayland to request //! all keyboard events to be forwarded to a surface even when the //! surface does not have keyboard focus. //! //! In the X11 protocol, a client may request an "active grab" on the //! keyboard. On success, all key events are reported only to the //! grabbing X11 client. For details, see XGrabKeyboard(3). //! //! The core Wayland protocol does not have a notion of an active //! keyboard grab. When running in Xwayland, X11 applications may //! acquire an active grab inside Xwayland but that cannot be translated //! to the Wayland compositor who may set the input focus to some other //! surface. In doing so, it breaks the X11 client assumption that all //! key events are reported to the grabbing client. //! //! This protocol specifies a way for Xwayland to request all keyboard //! be directed to the given surface. The protocol does not guarantee //! that the compositor will honor this request and it does not //! prescribe user interfaces on how to handle the respond. For example, //! a compositor may inform the user that all key events are now //! forwarded to the given client surface, or it may ask the user for //! permission to do so. //! //! Compositors are required to restrict access to this application //! specific protocol to Xwayland alone. wayland_protocol_versioned!( "xwayland-keyboard-grab", [v1], [(wl_seat, wl_seat_interface), (wl_surface, wl_surface_interface)], [] ); } wayland-protocols-0.29.5/src/wlr.rs000064400000000000000000000112051046102023000153420ustar 00000000000000//! wlr-procotols extension family //! //! This module regroup bindings to the protocol extensions from //! [wlr-protocols](https://github.com/swaywm/wlr-protocols). #![cfg_attr(rustfmt, rustfmt_skip)] #[cfg(feature = "unstable_protocols")] pub mod unstable { //! Unstable protocols from wlr-protocols //! //! The protocols described in this module are experimental and //! backward incompatible changes may be made. Backward compatible //! changes may be added together with the corresponding interface //! version bump. //! //! Backward incompatible changes are done by bumping the version //! number in the protocol and interface names and resetting the //! interface version. Once the protocol is to be declared stable, //! the 'z' prefix and the version number in the protocol and //! interface names are removed and the interface version number is //! reset. pub mod data_control { //! Control data devices, particularly the clipboard. //! //! An interface to control data devices, particularly to manage the current selection and //! take the role of a clipboard manager. wayland_protocol_versioned!("wlr-data-control", [v1], [(wl_seat, wl_seat_interface)], []); } pub mod export_dmabuf { //! A protocol for low overhead screen content capturing //! //! An interface to capture surfaces in an efficient way by exporting DMA-BUFs. wayland_protocol_versioned!( "wlr-export-dmabuf", [v1], [(wl_output, wl_output_interface)], [] ); } pub mod foreign_toplevel { //! List and control opened apps //! //! Use for creating taskbars and docks. wayland_protocol_versioned!( "wlr-foreign-toplevel-management", [v1], [ (wl_seat, wl_seat_interface), (wl_surface, wl_surface_interface), (wl_output, wl_output_interface) ], [] ); } pub mod gamma_control { //! Manage gamma tables of outputs. //! //! This protocol allows a privileged client to set the gamma tables for outputs. wayland_protocol_versioned!( "wlr-gamma-control", [v1], [(wl_output, wl_output_interface)], [] ); } pub mod input_inhibitor { //! Inhibits input events to other clients wayland_protocol_versioned!("wlr-input-inhibitor", [v1], [], []); } pub mod layer_shell { //! Layered shell protocol wayland_protocol_versioned!( "wlr-layer-shell", [v1], [(wl_output, wl_output_interface), (wl_surface, wl_surface_interface)], [(xdg_shell, xdg_popup, xdg_popup_interface)] ); } pub mod output_management { //! Output management protocol //! //! This protocol exposes interfaces to obtain and modify output device configuration. wayland_protocol_versioned!( "wlr-output-management", [v1], [(wl_output, wl_output_interface)], [] ); } pub mod output_power_management { //! Output power management protocol //! //! This protocol allows clients to control power management modes //! of outputs that are currently part of the compositor space. The //! intent is to allow special clients like desktop shells to power //! down outputs when the system is idle. wayland_protocol_versioned!( "wlr-output-power-management", [v1], [(wl_output, wl_output_interface)], [] ); } pub mod screencopy { //! 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. wayland_protocol_versioned!( "wlr-screencopy", [v1], [(wl_buffer, wl_buffer_interface), (wl_output, wl_output_interface), (wl_shm, wl_shm_interface)], [] ); } pub mod virtual_pointer { //! Virtual pointer protocol //! //! This protocol allows clients to emulate a physical pointer device. The //! requests are mostly mirror opposites of those specified in wl_pointer. wayland_protocol_versioned!( "wlr-virtual-pointer", [v1], [(wl_seat, wl_seat_interface), (wl_output, wl_output_interface), (wl_pointer, wl_pointer_interface)], [] ); } } wayland-protocols-0.29.5/wlr-protocols/.build.yml000064400000000000000000000002341046102023000201270ustar 00000000000000image: archlinux packages: - wayland sources: - https://github.com/swaywm/wlr-protocols tasks: - protocols: | cd wlr-protocols ./check.sh wayland-protocols-0.29.5/wlr-protocols/.editorconfig000064400000000000000000000003151046102023000207040ustar 00000000000000root = true [*] end_of_line = lf insert_final_newline = true charset = utf-8 indent_style = tab indent_size = 4 trim_trailing_whitespace = true [*.xml] indent_style = space indent_size = 2 tab_width = 8 wayland-protocols-0.29.5/wlr-protocols/Makefile000064400000000000000000000017561046102023000177010ustar 00000000000000PREFIX=/usr DATADIR=$${datarootdir} DATAROOTDIR=$${prefix}/share unstable_protocols = \ unstable/wlr-export-dmabuf-unstable-v1.xml \ unstable/wlr-gamma-control-unstable-v1.xml \ unstable/wlr-input-inhibitor-unstable-v1.xml \ unstable/wlr-layer-shell-unstable-v1.xml \ unstable/wlr-output-power-management-v1.xml \ unstable/wlr-screencopy-unstable-v1.xml check: ./check.sh clean: rm -f wlr-protocols.pc wlr-protocols.pc: wlr-protocols.pc.in sed \ -e 's:@prefix@:$(PREFIX):g' \ -e 's:@datadir@:$(DATADIR):g' \ -e 's:@datarootdir@:$(DATAROOTDIR):g' \ <$< >$@ install-unstable: $(unstable_protocols) mkdir -p $(DESTDIR)$(PREFIX)/share/wlr-protocols/unstable for protocol in $^ ; \ do \ install -Dm644 $$protocol \ $(DESTDIR)$(PREFIX)/share/wlr-protocols/$$protocol ; \ done install-pc: wlr-protocols.pc mkdir -p $(DESTDIR)$(PREFIX)/share/pkgconfig/ install -Dm644 wlr-protocols.pc \ $(DESTDIR)$(PREFIX)/share/pkgconfig/wlr-protocols.pc install: install-unstable install-pc wayland-protocols-0.29.5/wlr-protocols/README.md000064400000000000000000000006001046102023000175030ustar 00000000000000# wlr-protocols Wayland protocols designed for use in wlroots (and other compositors). ## Submitting changes to existing protocols Please submit a pull request on GitHub. ## Submitting new protocols New protocols should not be submitted to wlr-protocols. Instead, submit them to [wayland-protocols]. [wayland-protocols]: https://gitlab.freedesktop.org/wayland/wayland-protocols wayland-protocols-0.29.5/wlr-protocols/check.sh000075500000000000000000000003711046102023000176450ustar 00000000000000#!/bin/sh -eux for f in $(echo unstable/*.xml) do wayland-scanner -s client-header "$f" /dev/null wayland-scanner -s server-header "$f" /dev/null wayland-scanner -s public-code "$f" /dev/null wayland-scanner -s private-code "$f" /dev/null done wayland-protocols-0.29.5/wlr-protocols/unstable/wlr-data-control-unstable-v1.xml000064400000000000000000000274161046102023000261310ustar 00000000000000 Copyright © 2018 Simon Ser Copyright © 2019 Ivan Molodetskikh 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 protocol allows a privileged client to control data devices. In particular, the client will be able to manage the current selection and take the role of a clipboard manager. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. This interface is a manager that allows creating per-seat data device controls. Create a new data source. Create a data device that can be used to manage a seat's selection. All objects created by the manager will still remain valid, until their appropriate destroy request has been called. This interface allows a client to manage a seat's selection. When the seat is destroyed, this object becomes inert. This request asks the compositor to set the selection to the data from the source on behalf of the client. The given source may not be used in any further set_selection or set_primary_selection requests. Attempting to use a previously used source is a protocol error. To unset the selection, set the source to NULL. Destroys the data device object. The data_offer event introduces a new wlr_data_control_offer object, which will subsequently be used in either the wlr_data_control_device.selection event (for the regular clipboard selections) or the wlr_data_control_device.primary_selection event (for the primary clipboard selections). Immediately following the wlr_data_control_device.data_offer event, the new data_offer object will send out wlr_data_control_offer.offer events to describe the MIME types it offers. The selection event is sent out to notify the client of a new wlr_data_control_offer for the selection for this device. The wlr_data_control_device.data_offer and the wlr_data_control_offer.offer events are sent out immediately before this event to introduce the data offer object. The selection event is sent to a client when a new selection is set. The wlr_data_control_offer is valid until a new wlr_data_control_offer or NULL is received. The client must destroy the previous selection wlr_data_control_offer, if any, upon receiving this event. The first selection event is sent upon binding the wlr_data_control_device object. This data control object is no longer valid and should be destroyed by the client. The primary_selection event is sent out to notify the client of a new wlr_data_control_offer for the primary selection for this device. The wlr_data_control_device.data_offer and the wlr_data_control_offer.offer events are sent out immediately before this event to introduce the data offer object. The primary_selection event is sent to a client when a new primary selection is set. The wlr_data_control_offer is valid until a new wlr_data_control_offer or NULL is received. The client must destroy the previous primary selection wlr_data_control_offer, if any, upon receiving this event. If the compositor supports primary selection, the first primary_selection event is sent upon binding the wlr_data_control_device object. This request asks the compositor to set the primary selection to the data from the source on behalf of the client. The given source may not be used in any further set_selection or set_primary_selection requests. Attempting to use a previously used source is a protocol error. To unset the primary selection, set the source to NULL. The compositor will ignore this request if it does not support primary selection. The wlr_data_control_source object is the source side of a wlr_data_control_offer. It is created by the source client in a data transfer and provides a way to describe the offered data and a way to respond to requests to transfer the data. This request adds a MIME type to the set of MIME types advertised to targets. Can be called several times to offer multiple types. Calling this after wlr_data_control_device.set_selection is a protocol error. Destroys the data source object. Request for data from the client. Send the data as the specified MIME type over the passed file descriptor, then close it. This data source is no longer valid. The data source has been replaced by another data source. The client should clean up and destroy this data source. A wlr_data_control_offer represents a piece of data offered for transfer by another client (the source client). The offer describes the different MIME types that the data can be converted to and provides the mechanism for transferring the data directly from the source client. To transfer the offered data, the client issues this request and indicates the MIME type it wants to receive. The transfer happens through the passed file descriptor (typically created with the pipe system call). The source client writes the data in the MIME type representation requested and then closes the file descriptor. The receiving client reads from the read end of the pipe until EOF and then closes its end, at which point the transfer is complete. This request may happen multiple times for different MIME types. Destroys the data offer object. Sent immediately after creating the wlr_data_control_offer object. One event per offered MIME type. wayland-protocols-0.29.5/wlr-protocols/unstable/wlr-export-dmabuf-unstable-v1.xml000064400000000000000000000217271046102023000263160ustar 00000000000000 Copyright © 2018 Rostislav Pehlivanov 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. An interface to capture surfaces in an efficient way by exporting DMA-BUFs. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. This object is a manager with which to start capturing from sources. Capture the next frame of an entire output. All objects created by the manager will still remain valid, until their appropriate destroy request has been called. This object represents a single DMA-BUF frame. If the capture is successful, the compositor will first send a "frame" event, followed by one or several "object". When the frame is available for readout, the "ready" event is sent. If the capture failed, the "cancel" event is sent. This can happen anytime before the "ready" event. Once either a "ready" or a "cancel" event is received, the client should destroy the frame. Once an "object" event is received, the client is responsible for closing the associated file descriptor. All frames are read-only and may not be written into or altered. Special flags that should be respected by the client. Main event supplying the client with information about the frame. If the capture didn't fail, this event is always emitted first before any other events. This event is followed by a number of "object" as specified by the "num_objects" argument. Event which serves to supply the client with the file descriptors containing the data for each object. After receiving this event, the client must always close the file descriptor as soon as they're done with it and even if the frame fails. This event is sent as soon as the frame is presented, indicating it is available for reading. This event includes the time at which presentation happened at. The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples, each component being an unsigned 32-bit value. Whole seconds are in tv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo, and the additional fractional part in tv_nsec as nanoseconds. Hence, for valid timestamps tv_nsec must be in [0, 999999999]. The seconds part may have an arbitrary offset at start. After receiving this event, the client should destroy this object. Indicates reason for cancelling the frame. If the capture failed or if the frame is no longer valid after the "frame" event has been emitted, this event will be used to inform the client to scrap the frame. If the failure is temporary, the client may capture again the same source. If the failure is permanent, any further attempts to capture the same source will fail again. After receiving this event, the client should destroy this object. Unreferences the frame. This request must be called as soon as its no longer used. It can be called at any time by the client. The client will still have to close any FDs it has been given. wayland-protocols-0.29.5/wlr-protocols/unstable/wlr-foreign-toplevel-management-unstable-v1.xml000064400000000000000000000264221046102023000311310ustar 00000000000000 Copyright © 2018 Ilia Bozhinov 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. The purpose of this protocol is to enable the creation of taskbars and docks by providing them with a list of opened applications and letting them request certain actions on them, like maximizing, etc. After a client binds the zwlr_foreign_toplevel_manager_v1, each opened toplevel window will be sent via the toplevel event This event is emitted whenever a new toplevel window is created. It is emitted for all toplevels, regardless of the app that has created them. All initial details of the toplevel(title, app_id, states, etc.) will be sent immediately after this event via the corresponding events in zwlr_foreign_toplevel_handle_v1. Indicates the client no longer wishes to receive events for new toplevels. However the compositor may emit further toplevel_created events, until the finished event is emitted. The client must not send any more requests after this one. This event indicates that the compositor is done sending events to the zwlr_foreign_toplevel_manager_v1. The server will destroy the object immediately after sending this request, so it will become invalid and the client should free any resources associated with it. A zwlr_foreign_toplevel_handle_v1 object represents an opened toplevel window. Each app may have multiple opened toplevels. Each toplevel has a list of outputs it is visible on, conveyed to the client with the output_enter and output_leave events. This event is emitted whenever the title of the toplevel changes. This event is emitted whenever the app-id of the toplevel changes. This event is emitted whenever the toplevel becomes visible on the given output. A toplevel may be visible on multiple outputs. This event is emitted whenever the toplevel stops being visible on the given output. It is guaranteed that an entered-output event with the same output has been emitted before this event. Requests that the toplevel be maximized. If the maximized state actually changes, this will be indicated by the state event. Requests that the toplevel be unmaximized. If the maximized state actually changes, this will be indicated by the state event. Requests that the toplevel be minimized. If the minimized state actually changes, this will be indicated by the state event. Requests that the toplevel be unminimized. If the minimized state actually changes, this will be indicated by the state event. Request that this toplevel be activated on the given seat. There is no guarantee the toplevel will be actually activated. The different states that a toplevel can have. These have the same meaning as the states with the same names defined in xdg-toplevel This event is emitted immediately after the zlw_foreign_toplevel_handle_v1 is created and each time the toplevel state changes, either because of a compositor action or because of a request in this protocol. This event is sent after all changes in the toplevel state have been sent. This allows changes to the zwlr_foreign_toplevel_handle_v1 properties to be seen as atomic, even if they happen via multiple events. Send a request to the toplevel to close itself. The compositor would typically use a shell-specific method to carry out this request, for example by sending the xdg_toplevel.close event. However, this gives no guarantees the toplevel will actually be destroyed. If and when this happens, the zwlr_foreign_toplevel_handle_v1.closed event will be emitted. The rectangle of the surface specified in this request corresponds to the place where the app using this protocol represents the given toplevel. It can be used by the compositor as a hint for some operations, e.g minimizing. The client is however not required to set this, in which case the compositor is free to decide some default value. If the client specifies more than one rectangle, only the last one is considered. The dimensions are given in surface-local coordinates. Setting width=height=0 removes the already-set rectangle. This event means the toplevel has been destroyed. It is guaranteed there won't be any more events for this zwlr_foreign_toplevel_handle_v1. The toplevel itself becomes inert so any requests will be ignored except the destroy request. Destroys the zwlr_foreign_toplevel_handle_v1 object. This request should be called either when the client does not want to use the toplevel anymore or after the closed event to finalize the destruction of the object. Requests that the toplevel be fullscreened on the given output. If the fullscreen state and/or the outputs the toplevel is visible on actually change, this will be indicated by the state and output_enter/leave events. The output parameter is only a hint to the compositor. Also, if output is NULL, the compositor should decide which output the toplevel will be fullscreened on, if at all. Requests that the toplevel be unfullscreened. If the fullscreen state actually changes, this will be indicated by the state event. This event is emitted whenever the parent of the toplevel changes. No event is emitted when the parent handle is destroyed by the client. wayland-protocols-0.29.5/wlr-protocols/unstable/wlr-gamma-control-unstable-v1.xml000064400000000000000000000126031046102023000262720ustar 00000000000000 Copyright © 2015 Giulio camuffo Copyright © 2018 Simon Ser 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 protocol allows a privileged client to set the gamma tables for outputs. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. This interface is a manager that allows creating per-output gamma controls. Create a gamma control that can be used to adjust gamma tables for the provided output. All objects created by the manager will still remain valid, until their appropriate destroy request has been called. This interface allows a client to adjust gamma tables for a particular output. The client will receive the gamma size, and will then be able to set gamma tables. At any time the compositor can send a failed event indicating that this object is no longer valid. There can only be at most one gamma control object per output, which has exclusive access to this particular output. When the gamma control object is destroyed, the gamma table is restored to its original value. Advertise the size of each gamma ramp. This event is sent immediately when the gamma control object is created. Set the gamma table. The file descriptor can be memory-mapped to provide the raw gamma table, which contains successive gamma ramps for the red, green and blue channels. Each gamma ramp is an array of 16-byte unsigned integers which has the same length as the gamma size. The file descriptor data must have the same length as three times the gamma size. This event indicates that the gamma control is no longer valid. This can happen for a number of reasons, including: - The output doesn't support gamma tables - Setting the gamma tables failed - Another client already has exclusive gamma control for this output - The compositor has transferred gamma control to another client Upon receiving this event, the client should destroy this object. Destroys the gamma control object. If the object is still valid, this restores the original gamma tables. wayland-protocols-0.29.5/wlr-protocols/unstable/wlr-input-inhibitor-unstable-v1.xml000064400000000000000000000062761046102023000266670ustar 00000000000000 Copyright © 2018 Drew DeVault 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. Clients can use this interface to prevent input events from being sent to any surfaces but its own, which is useful for example in lock screen software. It is assumed that access to this interface will be locked down to whitelisted clients by the compositor. Activates the input inhibitor. As long as the inhibitor is active, the compositor will not send input events to other clients. While this resource exists, input to clients other than the owner of the inhibitor resource will not receive input events. Any client which previously had focus will receive a leave event and will not be given focus again. The client that owns this resource will receive all input events normally. The compositor will also disable all of its own input processing (such as keyboard shortcuts) while the inhibitor is active. The compositor may continue to send input events to selected clients, such as an on-screen keyboard (via the input-method protocol). Destroy the inhibitor and allow other clients to receive input. wayland-protocols-0.29.5/wlr-protocols/unstable/wlr-layer-shell-unstable-v1.xml000064400000000000000000000440361046102023000257600ustar 00000000000000 Copyright © 2017 Drew DeVault 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. Clients can use this interface to assign the surface_layer role to wl_surfaces. Such surfaces are assigned to a "layer" of the output and rendered with a defined z-depth respective to each other. They may also be anchored to the edges and corners of a screen and specify input handling semantics. This interface should be suitable for the implementation of many desktop shell components, and a broad number of other applications that interact with the desktop. Create a layer surface for an existing surface. This assigns the role of layer_surface, or raises a protocol error if another role is already assigned. Creating a layer surface from a wl_surface which has a buffer attached or committed is a client error, and any attempts by a client to attach or manipulate a buffer prior to the first layer_surface.configure call must also be treated as errors. After creating a layer_surface object and setting it up, the client must perform an initial commit without any buffer attached. The compositor will reply with a layer_surface.configure event. The client must acknowledge it and is then allowed to attach a buffer to map the surface. You may pass NULL for output to allow the compositor to decide which output to use. Generally this will be the one that the user most recently interacted with. Clients can specify a namespace that defines the purpose of the layer surface. These values indicate which layers a surface can be rendered in. They are ordered by z depth, bottom-most first. Traditional shell surfaces will typically be rendered between the bottom and top layers. Fullscreen shell surfaces are typically rendered at the top layer. Multiple surfaces can share a single layer, and ordering within a single layer is undefined. This request indicates that the client will not use the layer_shell object any more. Objects that have been created through this instance are not affected. An interface that may be implemented by a wl_surface, for surfaces that are designed to be rendered as a layer of a stacked desktop-like environment. Layer surface state (layer, size, anchor, exclusive zone, margin, interactivity) is double-buffered, and will be applied at the time wl_surface.commit of the corresponding wl_surface is called. Attaching a null buffer to a layer surface unmaps it. Unmapping a layer_surface means that the surface cannot be shown by the compositor until it is explicitly mapped again. The layer_surface returns to the state it had right after layer_shell.get_layer_surface. The client can re-map the surface by performing a commit without any buffer attached, waiting for a configure event and handling it as usual. Sets the size of the surface in surface-local coordinates. The compositor will display the surface centered with respect to its anchors. If you pass 0 for either value, the compositor will assign it and inform you of the assignment in the configure event. You must set your anchor to opposite edges in the dimensions you omit; not doing so is a protocol error. Both values are 0 by default. Size is double-buffered, see wl_surface.commit. Requests that the compositor anchor the surface to the specified edges and corners. If two orthogonal edges are specified (e.g. 'top' and 'left'), then the anchor point will be the intersection of the edges (e.g. the top left corner of the output); otherwise the anchor point will be centered on that edge, or in the center if none is specified. Anchor is double-buffered, see wl_surface.commit. Requests that the compositor avoids occluding an area with other surfaces. The compositor's use of this information is implementation-dependent - do not assume that this region will not actually be occluded. A positive value is only meaningful if the surface is anchored to one edge or an edge and both perpendicular edges. If the surface is not anchored, anchored to only two perpendicular edges (a corner), anchored to only two parallel edges or anchored to all edges, a positive value will be treated the same as zero. A positive zone is the distance from the edge in surface-local coordinates to consider exclusive. Surfaces that do not wish to have an exclusive zone may instead specify how they should interact with surfaces that do. If set to zero, the surface indicates that it would like to be moved to avoid occluding surfaces with a positive exclusive zone. If set to -1, the surface indicates that it would not like to be moved to accommodate for other surfaces, and the compositor should extend it all the way to the edges it is anchored to. For example, a panel might set its exclusive zone to 10, so that maximized shell surfaces are not shown on top of it. A notification might set its exclusive zone to 0, so that it is moved to avoid occluding the panel, but shell surfaces are shown underneath it. A wallpaper or lock screen might set their exclusive zone to -1, so that they stretch below or over the panel. The default value is 0. Exclusive zone is double-buffered, see wl_surface.commit. Requests that the surface be placed some distance away from the anchor point on the output, in surface-local coordinates. Setting this value for edges you are not anchored to has no effect. The exclusive zone includes the margin. Margin is double-buffered, see wl_surface.commit. Types of keyboard interaction possible for layer shell surfaces. The rationale for this is twofold: (1) some applications are not interested in keyboard events and not allowing them to be focused can improve the desktop experience; (2) some applications will want to take exclusive keyboard focus. This value indicates that this surface is not interested in keyboard events and the compositor should never assign it the keyboard focus. This is the default value, set for newly created layer shell surfaces. This is useful for e.g. desktop widgets that display information or only have interaction with non-keyboard input devices. Request exclusive keyboard focus if this surface is above the shell surface layer. For the top and overlay layers, the seat will always give exclusive keyboard focus to the top-most layer which has keyboard interactivity set to exclusive. If this layer contains multiple surfaces with keyboard interactivity set to exclusive, the compositor determines the one receiving keyboard events in an implementation- defined manner. In this case, no guarantee is made when this surface will receive keyboard focus (if ever). For the bottom and background layers, the compositor is allowed to use normal focus semantics. This setting is mainly intended for applications that need to ensure they receive all keyboard events, such as a lock screen or a password prompt. This requests the compositor to allow this surface to be focused and unfocused by the user in an implementation-defined manner. The user should be able to unfocus this surface even regardless of the layer it is on. Typically, the compositor will want to use its normal mechanism to manage keyboard focus between layer shell surfaces with this setting and regular toplevels on the desktop layer (e.g. click to focus). Nevertheless, it is possible for a compositor to require a special interaction to focus or unfocus layer shell surfaces (e.g. requiring a click even if focus follows the mouse normally, or providing a keybinding to switch focus between layers). This setting is mainly intended for desktop shell components (e.g. panels) that allow keyboard interaction. Using this option can allow implementing a desktop shell that can be fully usable without the mouse. Set how keyboard events are delivered to this surface. By default, layer shell surfaces do not receive keyboard events; this request can be used to change this. This setting is inherited by child surfaces set by the get_popup request. Layer surfaces receive pointer, touch, and tablet events normally. If you do not want to receive them, set the input region on your surface to an empty region. Keyboard interactivity is double-buffered, see wl_surface.commit. This assigns an xdg_popup's parent to this layer_surface. This popup should have been created via xdg_surface::get_popup with the parent set to NULL, and this request must be invoked before committing the popup's initial state. See the documentation of xdg_popup for more details about what an xdg_popup is and how it is used. When a configure event is received, if a client commits the surface in response to the configure event, then the client must make an ack_configure request sometime before the commit request, passing along the serial of the configure event. If the client receives multiple configure events before it can respond to one, it only has to ack the last configure event. A client is not required to commit immediately after sending an ack_configure request - it may even ack_configure several times before its next surface commit. A client may send multiple ack_configure requests before committing, but only the last request sent before a commit indicates which configure event the client really is responding to. This request destroys the layer surface. The configure event asks the client to resize its surface. Clients should arrange their surface for the new states, and then send an ack_configure request with the serial sent in this configure event at some point before committing the new surface. The client is free to dismiss all but the last configure event it received. The width and height arguments specify the size of the window in surface-local coordinates. The size is a hint, in the sense that the client is free to ignore it if it doesn't resize, pick a smaller size (to satisfy aspect ratio or resize in steps of NxM pixels). If the client picks a smaller size and is anchored to two opposite anchors (e.g. 'top' and 'bottom'), the surface will be centered on this axis. If the width or height arguments are zero, it means the client should decide its own window dimension. The closed event is sent by the compositor when the surface will no longer be shown. The output may have been destroyed or the user may have asked for it to be removed. Further changes to the surface will be ignored. The client should destroy the resource after receiving this event, and create a new surface if they so choose. Change the layer that the surface is rendered on. Layer is double-buffered, see wl_surface.commit. wayland-protocols-0.29.5/wlr-protocols/unstable/wlr-output-management-unstable-v1.xml000064400000000000000000000567721046102023000272230ustar 00000000000000 Copyright © 2019 Purism SPC 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 protocol exposes interfaces to obtain and modify output device configuration. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. This interface is a manager that allows reading and writing the current output device configuration. Output devices that display pixels (e.g. a physical monitor or a virtual output in a window) are represented as heads. Heads cannot be created nor destroyed by the client, but they can be enabled or disabled and their properties can be changed. Each head may have one or more available modes. Whenever a head appears (e.g. a monitor is plugged in), it will be advertised via the head event. Immediately after the output manager is bound, all current heads are advertised. Whenever a head's properties change, the relevant wlr_output_head events will be sent. Not all head properties will be sent: only properties that have changed need to. Whenever a head disappears (e.g. a monitor is unplugged), a wlr_output_head.finished event will be sent. After one or more heads appear, change or disappear, the done event will be sent. It carries a serial which can be used in a create_configuration request to update heads properties. The information obtained from this protocol should only be used for output configuration purposes. This protocol is not designed to be a generic output property advertisement protocol for regular clients. Instead, protocols such as xdg-output should be used. This event introduces a new head. This happens whenever a new head appears (e.g. a monitor is plugged in) or after the output manager is bound. This event is sent after all information has been sent after binding to the output manager object and after any subsequent changes. This applies to child head and mode objects as well. In other words, this event is sent whenever a head or mode is created or destroyed and whenever one of their properties has been changed. Not all state is re-sent each time the current configuration changes: only the actual changes are sent. This allows changes to the output configuration to be seen as atomic, even if they happen via multiple events. A serial is sent to be used in a future create_configuration request. Create a new output configuration object. This allows to update head properties. Indicates the client no longer wishes to receive events for output configuration changes. However the compositor may emit further events, until the finished event is emitted. The client must not send any more requests after this one. This event indicates that the compositor is done sending manager events. The compositor will destroy the object immediately after sending this event, so it will become invalid and the client should release any resources associated with it. A head is an output device. The difference between a wl_output object and a head is that heads are advertised even if they are turned off. A head object only advertises properties and cannot be used directly to change them. A head has some read-only properties: modes, name, description and physical_size. These cannot be changed by clients. Other properties can be updated via a wlr_output_configuration object. Properties sent via this interface are applied atomically via the wlr_output_manager.done event. No guarantees are made regarding the order in which properties are sent. This event describes the head name. The naming convention is compositor defined, but limited to alphanumeric characters and dashes (-). Each name is unique among all wlr_output_head objects, but if a wlr_output_head object is destroyed the same name may be reused later. The names will also remain consistent across sessions with the same hardware and software configuration. Examples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc. However, do not assume that the name is a reflection of an underlying DRM connector, X11 connection, etc. If the compositor implements the xdg-output protocol and this head is enabled, the xdg_output.name event must report the same name. The name event is sent after a wlr_output_head object is created. This event is only sent once per object, and the name does not change over the lifetime of the wlr_output_head object. This event describes a human-readable description of the head. The description is a UTF-8 string with no convention defined for its contents. Examples might include 'Foocorp 11" Display' or 'Virtual X11 output via :1'. However, do not assume that the name is a reflection of the make, model, serial of the underlying DRM connector or the display name of the underlying X11 connection, etc. If the compositor implements xdg-output and this head is enabled, the xdg_output.description must report the same description. The description event is sent after a wlr_output_head object is created. This event is only sent once per object, and the description does not change over the lifetime of the wlr_output_head object. This event describes the physical size of the head. This event is only sent if the head has a physical size (e.g. is not a projector or a virtual device). This event introduces a mode for this head. It is sent once per supported mode. This event describes whether the head is enabled. A disabled head is not mapped to a region of the global compositor space. When a head is disabled, some properties (current_mode, position, transform and scale) are irrelevant. This event describes the mode currently in use for this head. It is only sent if the output is enabled. This events describes the position of the head in the global compositor space. It is only sent if the output is enabled. This event describes the transformation currently applied to the head. It is only sent if the output is enabled. This events describes the scale of the head in the global compositor space. It is only sent if the output is enabled. The compositor will destroy the object immediately after sending this event, so it will become invalid and the client should release any resources associated with it. This event describes the manufacturer of the head. This must report the same make as the wl_output interface does in its geometry event. Together with the model and serial_number events the purpose is to allow clients to recognize heads from previous sessions and for example load head-specific configurations back. It is not guaranteed this event will be ever sent. A reason for that can be that the compositor does not have information about the make of the head or the definition of a make is not sensible in the current setup, for example in a virtual session. Clients can still try to identify the head by available information from other events but should be aware that there is an increased risk of false positives. It is not recommended to display the make string in UI to users. For that the string provided by the description event should be preferred. This event describes the model of the head. This must report the same model as the wl_output interface does in its geometry event. Together with the make and serial_number events the purpose is to allow clients to recognize heads from previous sessions and for example load head-specific configurations back. It is not guaranteed this event will be ever sent. A reason for that can be that the compositor does not have information about the model of the head or the definition of a model is not sensible in the current setup, for example in a virtual session. Clients can still try to identify the head by available information from other events but should be aware that there is an increased risk of false positives. It is not recommended to display the model string in UI to users. For that the string provided by the description event should be preferred. This event describes the serial number of the head. Together with the make and model events the purpose is to allow clients to recognize heads from previous sessions and for example load head- specific configurations back. It is not guaranteed this event will be ever sent. A reason for that can be that the compositor does not have information about the serial number of the head or the definition of a serial number is not sensible in the current setup. Clients can still try to identify the head by available information from other events but should be aware that there is an increased risk of false positives. It is not recommended to display the serial_number string in UI to users. For that the string provided by the description event should be preferred. This object describes an output mode. Some heads don't support output modes, in which case modes won't be advertised. Properties sent via this interface are applied atomically via the wlr_output_manager.done event. No guarantees are made regarding the order in which properties are sent. This event describes the mode size. The size is given in physical hardware units of the output device. This is not necessarily the same as the output size in the global compositor space. For instance, the output may be scaled or transformed. This event describes the mode's fixed vertical refresh rate. It is only sent if the mode has a fixed refresh rate. This event advertises this mode as preferred. The compositor will destroy the object immediately after sending this event, so it will become invalid and the client should release any resources associated with it. This object is used by the client to describe a full output configuration. First, the client needs to setup the output configuration. Each head can be either enabled (and configured) or disabled. It is a protocol error to send two enable_head or disable_head requests with the same head. It is a protocol error to omit a head in a configuration. Then, the client can apply or test the configuration. The compositor will then reply with a succeeded, failed or cancelled event. Finally the client should destroy the configuration object. Enable a head. This request creates a head configuration object that can be used to change the head's properties. Disable a head. Apply the new output configuration. In case the configuration is successfully applied, there is no guarantee that the new output state matches completely the requested configuration. For instance, a compositor might round the scale if it doesn't support fractional scaling. After this request has been sent, the compositor must respond with an succeeded, failed or cancelled event. Sending a request that isn't the destructor is a protocol error. Test the new output configuration. The configuration won't be applied, but will only be validated. Even if the compositor succeeds to test a configuration, applying it may fail. After this request has been sent, the compositor must respond with an succeeded, failed or cancelled event. Sending a request that isn't the destructor is a protocol error. Sent after the compositor has successfully applied the changes or tested them. Upon receiving this event, the client should destroy this object. If the current configuration has changed, events to describe the changes will be sent followed by a wlr_output_manager.done event. Sent if the compositor rejects the changes or failed to apply them. The compositor should revert any changes made by the apply request that triggered this event. Upon receiving this event, the client should destroy this object. Sent if the compositor cancels the configuration because the state of an output changed and the client has outdated information (e.g. after an output has been hotplugged). The client can create a new configuration with a newer serial and try again. Upon receiving this event, the client should destroy this object. Using this request a client can tell the compositor that it is not going to use the configuration object anymore. Any changes to the outputs that have not been applied will be discarded. This request also destroys wlr_output_configuration_head objects created via this object. This object is used by the client to update a single head's configuration. It is a protocol error to set the same property twice. This request sets the head's mode. This request assigns a custom mode to the head. The size is given in physical hardware units of the output device. If set to zero, the refresh rate is unspecified. It is a protocol error to set both a mode and a custom mode. This request sets the head's position in the global compositor space. This request sets the head's transform. This request sets the head's scale. wayland-protocols-0.29.5/wlr-protocols/unstable/wlr-output-power-management-unstable-v1.xml000064400000000000000000000127351046102023000303440ustar 00000000000000 Copyright © 2019 Purism SPC 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. This protocol allows clients to control power management modes of outputs that are currently part of the compositor space. The intent is to allow special clients like desktop shells to power down outputs when the system is idle. To modify outputs not currently part of the compositor space see wlr-output-management. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. This interface is a manager that allows creating per-output power management mode controls. Create an output power management mode control that can be used to adjust the power management mode for a given output. All objects created by the manager will still remain valid, until their appropriate destroy request has been called. This object offers requests to set the power management mode of an output. Set an output's power save mode to the given mode. The mode change is effective immediately. If the output does not support the given mode a failed event is sent. Report the power management mode change of an output. The mode event is sent after an output changed its power management mode. The reason can be a client using set_mode or the compositor deciding to change an output's mode. This event is also sent immediately when the object is created so the client is informed about the current power management mode. This event indicates that the output power management mode control is no longer valid. This can happen for a number of reasons, including: - The output doesn't support power management - Another client already has exclusive power management mode control for this output - The output disappeared Upon receiving this event, the client should destroy this object. Destroys the output power management mode control object. wayland-protocols-0.29.5/wlr-protocols/unstable/wlr-screencopy-unstable-v1.xml000064400000000000000000000236661046102023000257170ustar 00000000000000 Copyright © 2018 Simon Ser Copyright © 2019 Andri Yngvason 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. This protocol allows clients to ask the compositor to copy part of the screen content to a client buffer. Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset. This object is a manager which offers requests to start capturing from a source. Capture the next frame of an entire output. Capture the next frame of an output's region. The region is given in output logical coordinates, see xdg_output.logical_size. The region will be clipped to the output's extents. All objects created by the manager will still remain valid, until their appropriate destroy request has been called. This object represents a single frame. When created, a series of buffer events will be sent, each representing a supported buffer type. The "buffer_done" event is sent afterwards to indicate that all supported buffer types have been enumerated. The client will then be able to send a "copy" request. If the capture is successful, the compositor will send a "flags" followed by a "ready" event. For objects version 2 or lower, wl_shm buffers are always supported, ie. the "buffer" event is guaranteed to be sent. If the capture failed, the "failed" event is sent. This can happen anytime before the "ready" event. Once either a "ready" or a "failed" event is received, the client should destroy the frame. Provides information about wl_shm buffer parameters that need to be used for this frame. This event is sent once after the frame is created if wl_shm buffers are supported. Copy the frame to the supplied buffer. The buffer must have a the correct size, see zwlr_screencopy_frame_v1.buffer and zwlr_screencopy_frame_v1.linux_dmabuf. The buffer needs to have a supported format. If the frame is successfully copied, a "flags" and a "ready" events are sent. Otherwise, a "failed" event is sent. Provides flags about the frame. This event is sent once before the "ready" event. Called as soon as the frame is copied, indicating it is available for reading. This event includes the time at which presentation happened at. The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples, each component being an unsigned 32-bit value. Whole seconds are in tv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo, and the additional fractional part in tv_nsec as nanoseconds. Hence, for valid timestamps tv_nsec must be in [0, 999999999]. The seconds part may have an arbitrary offset at start. After receiving this event, the client should destroy the object. This event indicates that the attempted frame copy has failed. After receiving this event, the client should destroy the object. Destroys the frame. This request can be sent at any time by the client. Same as copy, except it waits until there is damage to copy. This event is sent right before the ready event when copy_with_damage is requested. It may be generated multiple times for each copy_with_damage request. The arguments describe a box around an area that has changed since the last copy request that was derived from the current screencopy manager instance. The union of all regions received between the call to copy_with_damage and a ready event is the total damage since the prior ready event. Provides information about linux-dmabuf buffer parameters that need to be used for this frame. This event is sent once after the frame is created if linux-dmabuf buffers are supported. This event is sent once after all buffer events have been sent. The client should proceed to create a buffer of one of the supported types, and send a "copy" request. wayland-protocols-0.29.5/wlr-protocols/unstable/wlr-virtual-pointer-unstable-v1.xml000064400000000000000000000153571046102023000267070ustar 00000000000000 Copyright © 2019 Josef Gajdusek 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. This protocol allows clients to emulate a physical pointer device. The requests are mostly mirror opposites of those specified in wl_pointer. The pointer has moved by a relative amount to the previous request. Values are in the global compositor space. The pointer has moved in an absolute coordinate frame. Value of x can range from 0 to x_extent, value of y can range from 0 to y_extent. A button was pressed or released. Scroll and other axis requests. Indicates the set of events that logically belong together. Source information for scroll and other axis. Stop notification for scroll and other axes. Discrete step information for scroll and other axes. This event allows the client to extend data normally sent using the axis event with discrete value. This object allows clients to create individual virtual pointer objects. Creates a new virtual pointer. The optional seat is a suggestion to the compositor. Creates a new virtual pointer. The seat and the output arguments are optional. If the seat argument is set, the compositor should assign the input device to the requested seat. If the output argument is set, the compositor should map the input device to the requested output. wayland-protocols-0.29.5/wlr-protocols/wlr-protocols.pc.in000064400000000000000000000002571046102023000220130ustar 00000000000000prefix=@prefix@ datarootdir=@datarootdir@ pkgdatadir=${pc_sysrootdir}@datadir@/wlr-protocols Name: wlroots Wayland protocols Description: Wayland protocol files Version: 1.0