wayland-protocols-0.32.6/.cargo_vcs_info.json0000644000000001570000000000100146100ustar { "git": { "sha1": "48b04f19ecf747104533f536ddf626e561346d19" }, "path_in_vcs": "wayland-protocols" }wayland-protocols-0.32.6/CHANGELOG.md000064400000000000000000000066771046102023000152260ustar 00000000000000# CHANGELOG: wayland-protocols ## Unreleased ## 0.32.6 -- 2025-01-31 - Bump wayland-protocols to 1.39 - New staging protocols: * `ext-data-control-v1` * `ext-workspace-v1` - Bump wayland-protocols to 1.40 - `ext-idle-notify-v1` version 2 adds a way to ignore idle inhibitors ## 0.32.5 -- 2024-10-23 - Bump wayland-protocols to 1.38 - New staging protocols: * `fifo-v1` * `commit-timing-v1` * `xdg-system-bell-v1` ## 0.32.4 -- 2024-09-04 ### Additions - Bump wayland-protocols to 1.37 - New staging protocols: * `ext-image-capture-source-v1` * `ext-image-copy-capture-v1` * `xdg-toplevel-icon-v1` ## 0.32.3 -- 2024-05-30 ### Breaking changes - `set_constraint_adjustment`/`SetConstraintAdjustment` now takes a `ConstraintAdjustment` instead of a u32. ### Additions - Bump wayland-protocols to 1.36 - `wp-tablet-v2` is now stable - New staging protocols: - `wp-alpha-modifier-v1` - `xdg-toplevel-drag-v1` - `xdg-dialog-v1` - `linux-drm-syncobj-v1` ## 0.31.2 -- 2024-01-29 - Bump wayland-protocols to 1.33 - `linux-dmabuf-unstable-v1` is now stable - `linux-dmabuf-unstable-v1` version 5 requires protocol error for planes with different modifiers. - A new staging protocol: - `ext-transient-seat-v1` ## 0.31.0 -- 2023-09-02 ### Breaking changes - Bump bitflags to 2.0 - Updated wayland-backend to 0.3 ## 0.30.1 -- 2023-07-13 ### Additions - Bump wayland-protocols to 1.32 - new staging protocols: `foreign_toplevel_list`, `cursor_shape` and `security_context` ## 0.30.0 -- 2022-12-27 ## 0.30.0-beta.15 ### Additions - Bump wayland-protocols to 1.31 - A new staging protocol: - `fractional-scale-v1` ## 0.30.0-beta.14 ### Additions - Bump wayland-protocols to 1.30 - A new staging protocol: - `tearing-control-v1` - Bump wayland-protocols to 1.29 - `xdg-shell` has some new error values, however the version was not bumped: - `xdg_wm_base::Error::Unresponsive` - `xdg_surface::Error::InvalidSize` - `xdg_toplevel::Error::InvalidSize` - `xdg_toplevel::Error::InvalidParent` - A some new staging protocols: - `ext-idle-notify` - `wp-content-type` - `xwayland_shell_v1` ## 0.30.0-beta.9 ### Additions - Bump wayland-protocols to 1.26 - `xdg-shell` is now version 5, introducing wm capabilities. - A new staging protocol, `single-pixel-buffer`. - Events in the following protocols now have properly labeled destructors: - `wp-linux-explicit-synchronization` - `wp-presentation-time` - `wp-drm-lease` - `wp-fullscreen-shell` ## 0.30.0-beta.1 ### Breaking Changes - Complete reorganization of the crate around the `wp`/`xdg`/`ext` categories - Protocols from other origins than the officiel repository are now split into their own crates ## 0.30.0-alpha6 ### Additions - Bump wayland-protocols to 1.25 - A new staging protocol, `ext-session-lock-v1`. ## 0.30.0-alpha3 ### Breaking changes - Update wlr-protocols - `wlr-output-management-unstable-v1` now marks `finished` event as destructor. - `wlr-foreign-toplevel-management-unstable-v1` now marks `finished` event as destructor. ### Additions - Bump wayland-protocols to 1.24 - A new staging protocol, `drm-lease-v1`. - `pointer-gestures-unstable-v1` is now version 3, introducing hold gestures. - `linux-dmabuf-unstable-v1` is now version 4, introducing dmabuf feedback. ## 0.30.0-alpha1 Rework of the crate, as a consequence of the reworks of `wayland-client` and `wayland-server`. wayland-protocols-0.32.6/Cargo.lock0000644000000156170000000000100125720ustar # This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 3 [[package]] name = "bitflags" version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" [[package]] name = "cc" version = "1.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229" dependencies = [ "shlex", ] [[package]] name = "downcast-rs" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "errno" version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", "windows-sys", ] [[package]] name = "libc" version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "linux-raw-sys" version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "memchr" version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "pkg-config" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "proc-macro2" version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] [[package]] name = "quick-xml" version = "0.37.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "165859e9e55f79d67b96c5d96f4e88b6f2695a1972849c15a6a3f5c59fc2c003" dependencies = [ "memchr", ] [[package]] name = "quote" version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] [[package]] name = "rustix" version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ "bitflags", "errno", "libc", "linux-raw-sys", "windows-sys", ] [[package]] name = "shlex" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "unicode-ident" version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" [[package]] name = "wayland-backend" version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7208998eaa3870dad37ec8836979581506e0c5c64c20c9e79e9d2a10d6f47bf" dependencies = [ "cc", "downcast-rs", "rustix", "smallvec", "wayland-sys", ] [[package]] name = "wayland-client" version = "0.31.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2120de3d33638aaef5b9f4472bff75f07c56379cf76ea320bd3a3d65ecaf73f" dependencies = [ "bitflags", "rustix", "wayland-backend", "wayland-scanner", ] [[package]] name = "wayland-protocols" version = "0.32.6" dependencies = [ "bitflags", "wayland-backend", "wayland-client", "wayland-scanner", "wayland-server", ] [[package]] name = "wayland-scanner" version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "896fdafd5d28145fce7958917d69f2fd44469b1d4e861cb5961bcbeebc6d1484" dependencies = [ "proc-macro2", "quick-xml", "quote", ] [[package]] name = "wayland-server" version = "0.31.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fabd7ed68cff8e7657b8a8a1fbe90cb4a3f0c30d90da4bf179a7a23008a4cb" dependencies = [ "bitflags", "downcast-rs", "rustix", "wayland-backend", "wayland-scanner", ] [[package]] name = "wayland-sys" version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbcebb399c77d5aa9fa5db874806ee7b4eba4e73650948e8f93963f128896615" dependencies = [ "pkg-config", ] [[package]] name = "windows-sys" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ "windows-targets", ] [[package]] name = "windows-targets" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", "windows_i686_gnullvm", "windows_i686_msvc", "windows_x86_64_gnu", "windows_x86_64_gnullvm", "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" wayland-protocols-0.32.6/Cargo.toml0000644000000030700000000000100126030ustar # 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 = "2021" rust-version = "1.65" name = "wayland-protocols" version = "0.32.6" authors = ["Elinor Berger "] build = false autolib = false autobins = false autoexamples = false autotests = false autobenches = false description = "Generated API for the officials wayland protocol extensions" documentation = "https://docs.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 rustdoc-args = [ "--cfg", "docsrs", ] [lib] name = "wayland_protocols" path = "src/lib.rs" [dependencies.bitflags] version = "2" [dependencies.wayland-backend] version = "0.3.8" [dependencies.wayland-client] version = "0.31.8" optional = true [dependencies.wayland-scanner] version = "0.31.6" [dependencies.wayland-server] version = "0.31.7" optional = true [features] client = ["wayland-client"] server = ["wayland-server"] staging = [] unstable = [] wayland-protocols-0.32.6/Cargo.toml.orig000064400000000000000000000017341046102023000162710ustar 00000000000000[package] name = "wayland-protocols" version = "0.32.6" documentation = "https://docs.rs/wayland-protocols/" repository = "https://github.com/smithay/wayland-rs" authors = ["Elinor Berger "] license = "MIT" keywords = ["wayland", "client", "server", "protocol", "extension"] description = "Generated API for the officials wayland protocol extensions" categories = ["gui", "api-bindings"] edition = "2021" rust-version = "1.65" readme = "README.md" [dependencies] wayland-scanner = { version = "0.31.6", path = "../wayland-scanner" } wayland-backend = { version = "0.3.8", path = "../wayland-backend" } wayland-client = { version = "0.31.8", path = "../wayland-client", optional = true } wayland-server = { version = "0.31.7", path = "../wayland-server", optional = true } bitflags = "2" [features] client = ["wayland-client"] server = ["wayland-server"] staging = [] unstable = [] [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] wayland-protocols-0.32.6/LICENSE.txt000064400000000000000000000020411046102023000152150ustar 00000000000000Copyright (c) 2015 Elinor 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.32.6/README.md000064400000000000000000000025101046102023000146520ustar 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 the official Wayland protocol extensions. It is meant to be used in addition to `wayland-client` or `wayland-server`. This crate follows the ["wayland-protocols"](https://gitlab.freedesktop.org/wayland/wayland-protocols) extensions repository. 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` enable the generation of protocols in the staging process and will soon become stable. - the `unstable` enable the generation of not-yet-stabilized protocols For other protocols, see also: - [wayland-protocols-wlr](https://crates.io/crates/wayland-protocols-wlr) for the WLR set of protocol extensionswayland-protocols-0.32.6/protocols/.editorconfig000064400000000000000000000001101046102023000200660ustar 00000000000000root = true [*.xml] indent_style = space indent_size = 2 tab_width = 8 wayland-protocols-0.32.6/protocols/.gitlab/merge_request_templates/New protocol.md000064400000000000000000000003121046102023000265570ustar 00000000000000 #### Requirements for merging - [ ] Review - [ ] Implementations - [ ] ACKs from members /label ~"New Protocol" ~"In 30 day discussion period" ~"Needs acks" ~"Needs implementations" ~"Needs review" wayland-protocols-0.32.6/protocols/.gitlab-ci/debian-install.sh000075500000000000000000000006021046102023000225550ustar 00000000000000#!/bin/sh -eux # Note: don't forget to bump FDO_DISTRIBUTION_TAG when editing this file! git clone --branch 1.23.1 --depth=1 https://gitlab.freedesktop.org/wayland/wayland cd wayland/ git show -s HEAD meson build/ -Dtests=false -Ddocumentation=false ninja -j${FDO_CI_CONCURRENT:-4} -C build/ install cd .. rm -rf wayland/ echo "/usr/local/lib" >/etc/ld.so.conf.d/local.conf ldconfig wayland-protocols-0.32.6/protocols/.gitlab-ci.yml000064400000000000000000000032111046102023000200520ustar 00000000000000.templates_sha: &template_sha d11c0dd4c1c9a69c14b4af9b50cdd12b89d24672 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 workflow: rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS when: never - if: $CI_COMMIT_BRANCH .debian: variables: FDO_DISTRIBUTION_VERSION: bookworm FDO_DISTRIBUTION_PACKAGES: 'build-essential pkg-config meson git ca-certificates libffi-dev libexpat1-dev libxml2-dev' FDO_DISTRIBUTION_TAG: '2024-09-05.0' FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} ./.gitlab-ci/debian-install.sh' check-commit: extends: - .fdo.ci-fairy stage: review script: - ci-fairy check-commits --signed-off-by --junit-xml=results.xml variables: GIT_DEPTH: 100 rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' when: always - when: never 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 artifacts: name: wayland-protocols-$CI_COMMIT_SHA when: always paths: - $CI_PROJECT_DIR/build/meson-logs wayland-protocols-0.32.6/protocols/.mailmap000064400000000000000000000003001046102023000170330ustar 00000000000000Faith Ekstrand Faith Ekstrand Faith Ekstrand wayland-protocols-0.32.6/protocols/COPYING000064400000000000000000000027361046102023000164640ustar 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.32.6/protocols/GOVERNANCE.md000064400000000000000000000263031046102023000173760ustar 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. Member projects 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 member project must provide named individuals as point of contact for that project who can be reached to discuss protocol-related matters. 4. During a vote, if any points-of-contact for the same member project disagree, the member project's vote is considered blank. ### 1.2. Becoming a member 1. New member projects 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 project or point of contact, asking for this invitation. 2. Prospective new member projects shall file a merge request tagged `governance` adding themselves to the list in `MEMBERS.md`, noting their sponsor member. 3. A point of contact for the sponsor member 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 member projects. 6. Member projects may vary their point(s) of contact by proposing the addition and/or removal of points of contact in a merge request tagged `governance`, subject to approval as in points 4 and 5 above. ### 1.3. Ceasing membership 1. A member project, or point of contact, may step down by submitting a merge request tagged `governance` removing themselves from `MEMBERS.md`. 2. A removal vote may be called for by an existing member project or point of contact, by filing a merge request tagged `governance`, removing the specific member project or point of contact from `MEMBERS.md`. 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 member projects. 4. Removed members are not eligible to apply for membership again for a period of 1 year. 5. Following a failed vote, the member project 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 their 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.1.1 Experimental protocol namespacing 1. Experimental protocols begin with the "xx" namespace and do not include any relation to namespaces specified in section 2.1. 2. Namespacing of experimental protocols is determined upon promotion. ### 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 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 2 member projects. 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. 8. All protocols are eligible for inclusion only if formally reviewed in-depth by at least one member project. For the purposes of this clause, reviews from the individual protocol author(s) are disregarded. #### 2.2.1 Experimental protocol inclusion requirements 1. Experimental protocols must be valid XML which can be consumed by wayland-scanner. 2. All such protocols must be created with a proposal merge request outlining the need for and purpose of the protocol. 3. All such protocols must be clearly tagged as experimental. ### 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 beginning from the time when the MR was opened. 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 into 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. 7. A member project has the option to invoke the 30 day discussion period for any staging protocol proposal which has been in use without substantive changes for a period of one year. ### 2.4. Development stalemate resolution 1. In the event that a discussion thread reaches a stalemate which cannot be resolved, a tie-breaking vote can be requested by the protocol author or any member project. 2. All member projects are eligible to vote in stalemate tie-breakers. Each project may cast a single vote. 3. Tie-breaker voting periods last no fewer than seven days. 4. Tie-breaker votes must be between two choices. 5. Any member project may elect to extend the voting period by an additional seven days. This option may only be invoked once per member project per tie-breaker and shall not be used without cause. 6. At the end of the voting period, the choice with the most votes is declared the winner, and development proceeds using that idea. 7. In the event of a tie, the protocol author casts the deciding vote. ### 2.5. Representation of non-members 1. A protocol proposed by a non-member inherently begins at a responsibility deficit as compared to one initiated by a member project. 2. To address this, any protocol proposed by a non-member intended for `staging/` or `stable/` may have a sponsor designated from a member project 3. The sponsor should have a strong understanding of the protocol they represent as well as the time required to drive it. 4. The sponsor shall be responsible for representing the protocol and its author in all cases which require membership, e.g., stalemate voting. 5. The member projects shall provide a sponsor for a non-member project upon request. 6. An author may make a one-time request for a different sponsor at any point. ### 2.3.1 Introducing new experimental protocols 1. Experimental protocols are merged into wayland-protocols after a two week review period upon the author's request unless a NACK has been given or a WAIT is in progress. 2. If all NACKs are removed from an experimental protocol, the two week review period is started anew. ### 2.3.2 Experimental protocol removal policy 1. Unmaintained experimental protocols are removed after a three month period of inactivity by its author, as determined by all of the following being true: * No changes have been made to the protocol by the author * No comments have been made to the protocol merge request by the author * No mails have been sent to the mailing list persuant to the protocol by the author 2. A notification of intent to remove shall be given to the author in the protocol merge request, and the protocol shall only be removed following a one week grace period of continued inactivity. ### 2.3.3 Experimental protocol promotion 1. A merged experimental protocol may be promoted to `staging/` upon request if it meets the requirements for landing as a `staging/` protocol. 2. Upon promotion, an experimental protocol is removed from `experimental/`. ## 3. NACKs 1. Expressing a NACK is the sole purview of listed points-of-contact from member projects, as specified in MEMBERS.md. A NACK must be grounded in technical reasoning, and it constitutes the final resort to block protocols which would harm the ecosystem or the project. 2. Any non-point-of-contact mentioning a NACK on a non-governance protocol issue, merge request, or mailing list thread, for any purpose, shall be banned from the project for a period of no fewer than three months. Additional penalties for repeat infractions may be imposed at the discretion of a membership majority. A warning, delivered in private if at all possible, shall be issued instead of a ban for first-time violations of this rule. Any comments violating this rule shall be explicitly marked by member projects to indicate that the NACK is invalid and has no bearing. 3. Any member project mentioning a NACK on a non-governance protocol issue, merge request, or mailing list thread, for any reason that may be considered non-technical, may undergo trial by eligible member projects upon receiving a written accusation of impropriety. This accusation may be public or private, and it may occur by any method of written communication. If this NACK is determined by 2/3 majority of eligible member projects to be used improperly, the offending point-of-contact shall be removed. 4. Eligible member projects during such review periods are those who have opted not to recuse themselves. ## 4. Amending this document 1. An amendment to this document may be proposed by any member project 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 member projects, and NACKed by none. The sponsoring member may merge their change to the wayland-protocols repository at this point. wayland-protocols-0.32.6/protocols/MEMBERS.md000064400000000000000000000015551046102023000170430ustar 00000000000000# wayland-protocols members - GTK/Mutter: Jonas Ådahl (@jadahl), Carlos Garnacho (@carlosg) - KWin: Vlad Zahorodnii (@zzag), David Edmundson (@davidedmundson) - mesa: Daniel Stone (@daniels), Mike Blumenkrantz (@zmike) - Mir: Christopher James Halse Rogers (@RAOF), Alan Griffiths - Qt: Eskil Abrahamsen Blomfeldt (@eskilblomfeldt) - Smithay/Cosmic: Victoria Brekenfeld (@drakulix) - Weston: Pekka Paalanen (@pq), Derek Foreman (@derekf) - wlroots/Sway: Simon Ser (@emersion), Simon Zeni (@bl4ckb0ne) wayland-protocols-0.32.6/protocols/README.md000064400000000000000000000315771046102023000167150ustar 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. wayland-protocols is a standardization body formed of various Wayland compositor and client developers. The governance rules are described in [GOVERNANCE.md] and the current members are listed in [MEMBERS.md]. ## Protocol phases Protocols in general have three phases: the development phase, the testing phase, and the stable phase. In the development phase, a protocol may be added to wayland-protocols as `experimental/`. It is actively being developed, for example by iterating over it in a [merge request] or planning it in an [issue]. Extensions in this phase can have backward incompatible changes. During this phase, patches for clients and compositors are written as a test vehicle. Such patches should be merged with caution 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] requirements have been met, it enters the "testing" phase. At this point, the protocol is added to the `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 altogether, 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 them 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]) 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 `meson.build` 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] 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 "Draft:" prefix in the title. To propose changes to existing protocols, create a GitLab merge request. Please make sure you CC the authors and maintainers of the protocol, who are named in the protocol's README. Please include a `Signed-off-by` line at the end of the commit to certify that you wrote it or otherwise have the right to pass it on as an open-source patch. See the [Developer Certificate of Origin] for a formal definition. ## Protocol development recommendations It is recommended that protocols be small and specific in scope in order to minimize sites of friction. Development discussion should be approached with a fresh, productive mindset and an openness to explore contrary ideas. Development discussions must remain civil and technical in nature at all times. ## 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]. Each new non-experimental 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. ``` ## Use of RFC 2119 keywords Descriptions of all new protocols must use (in lowercase) and adhere to the proper meaning of the keywords described in [RFC 2119]. All protocol descriptions that follow the guidelines in RFC 2119 must incorporate the following text in their toplevel protocol description section: ``` The key words "must", "must not", "required", "shall", "shall not", "should", "should not", "recommended", "may", and "optional" in this document are to be interpreted as described in IETF RFC 2119. ``` Note that not all existing protocol descriptions conform to RFC 2119. Protocol maintainers are encouraged to audit their descriptions, update them as needed to follow RFC 2119 guidelines, and mark them as conformant in the way described in the previous paragraph. ## 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 for experimental protocols A protocol in the experimental phase should expect to see backward incompatible changes at any time. Assuming a backward incompatible change is needed here, the procedure for how to do so is the following: - 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. ## Backward incompatible protocol changes for testing protocols 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. ## Experimental Protocols: Development Recommendations Implementations choosing to support experimental protocols must work to support the latest version of the protocol at all times. It is therefore recommended that developers only opt-in to supporting protocols they have time and resources to actively develop. A runtime option to enable features may also be useful to ensure users do not opt-in to potentially broken behavior. There is no expectation or requirement for stability between experimental protocol versions. It is therefore strongly advised that such consumer projects add build-time compile options to enable such protocols in order to avoid compile errors from protocol version mismatches. ## Promoting a protocol from experimental The author of an experimental protocol can request that it be promoted at any point when it meets the requirements for `staging/`. At such time, the namespace prefix should be determined, and then the protocol should be renamed and merged into the appropriate directory, deleting the `experimental/` entry. ## 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 plus the version and 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]. ## 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 day 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. [GOVERNANCE.md]: GOVERNANCE.md [MEMBERS.md]: MEMBERS.md [merge request]: https://gitlab.freedesktop.org/wayland/wayland-protocols/merge_requests [issue]: https://gitlab.freedesktop.org/wayland/wayland-protocols/issues [GOVERNANCE section 2.3]: GOVERNANCE.md#2.3-introducing-new-protocols [Legacy protocol phases]: #legacy-protocol-phases [GOVERNANCE section 2]: GOVERNANCE.md#2-protocols [Developer Certificate of Origin]: https://developercertificate.org/ [GOVERNANCE section 2.1]: GOVERNANCE.md#21-protocol-namespaces [RFC 2119]: https://www.rfc-editor.org/info/rfc2119 wayland-protocols-0.32.6/protocols/include/wayland-protocols/meson.build000064400000000000000000000006471046102023000246760ustar 00000000000000header_install_dir = get_option('includedir') / 'wayland-protocols' foreach protocol_file : protocol_files header_name = fs.name(protocol_file).replace('.xml', '-enum.h') custom_target( header_name, output: header_name, input: '../..' / protocol_file, command: [ prog_scanner, '--strict', 'enum-header', '@INPUT@', '@OUTPUT@', ], install: true, install_dir: header_install_dir, ) endforeach wayland-protocols-0.32.6/protocols/meson.build000064400000000000000000000102471046102023000175670ustar 00000000000000project('wayland-protocols', version: '1.40', meson_version: '>= 0.58.0', license: 'MIT/Expat', ) wayland_protocols_version = meson.project_version() fs = import('fs') dep_scanner = dependency('wayland-scanner', version: get_option('tests') ? '>=1.23.0' : '>=1.20.0', native: true, fallback: 'wayland' ) prog_scanner = find_program(dep_scanner.get_variable(pkgconfig: 'wayland_scanner', internal: 'wayland_scanner')) stable_protocols = { 'presentation-time': [''], 'viewporter': [''], 'xdg-shell': [''], 'linux-dmabuf': ['v1'], 'tablet': ['v2'], } 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 = { 'commit-timing': ['v1'], 'content-type': ['v1'], 'cursor-shape': ['v1'], 'drm-lease': ['v1'], 'ext-data-control': ['v1'], 'ext-foreign-toplevel-list': ['v1'], 'ext-idle-notify': ['v1'], 'ext-image-capture-source': ['v1'], 'ext-image-copy-capture': ['v1'], 'ext-session-lock': ['v1'], 'ext-transient-seat': ['v1'], 'fifo': ['v1'], 'fractional-scale': ['v1'], 'linux-drm-syncobj': ['v1'], 'security-context': ['v1'], 'single-pixel-buffer': ['v1'], 'tearing-control': ['v1'], 'xdg-activation': ['v1'], 'xdg-dialog': ['v1'], 'xdg-system-bell': ['v1'], 'xdg-toplevel-drag': ['v1'], 'xdg-toplevel-icon': ['v1'], 'xwayland-shell': ['v1'], 'alpha-modifier': ['v1'], 'ext-workspace': ['v1'], } protocol_files = [] foreach name, versions : stable_protocols foreach version : versions if version == '' protocol_files += ['stable/@0@/@0@.xml'.format(name)] else protocol_files += ['stable/@0@/@0@-@1@.xml'.format(name, version)] endif endforeach endforeach foreach name, versions : staging_protocols foreach version : versions protocol_files += [ 'staging/@0@/@0@-@1@.xml'.format(name, version) ] endforeach endforeach foreach name, versions : unstable_protocols foreach version : versions 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 include_dirs = [] if dep_scanner.version().version_compare('>=1.22.90') subdir('include/wayland-protocols') include_dirs = ['include'] endif 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, ) wayland_protocols = declare_dependency( include_directories: include_dirs, variables: { 'pkgdatadir': wayland_protocols_srcdir, }, ) meson.override_dependency('wayland-protocols', wayland_protocols) if get_option('tests') subdir('tests') endif summary({ 'Headers': include_dirs.length() > 0, }, bool_yn: true) wayland-protocols-0.32.6/protocols/meson_options.txt000064400000000000000000000001431046102023000210540ustar 00000000000000option('tests', type: 'boolean', value: true, description: 'Build the tests') wayland-protocols-0.32.6/protocols/stable/linux-dmabuf/README000064400000000000000000000002131046102023000221420ustar 00000000000000Linux DMA-BUF protocol Maintainers: Pekka Paalanen (@pq) Daniel Stone (@daniels) wayland-protocols-0.32.6/protocols/stable/linux-dmabuf/feedback.rst000064400000000000000000000245501046102023000235520ustar 00000000000000.. Copyright 2021 Simon Ser .. contents:: linux-dmabuf feedback introduction ================================== linux-dmabuf feedback allows compositors and clients to negotiate optimal buffer allocation parameters. This document will assume that the compositor is using a rendering API such as OpenGL or Vulkan and KMS as the presentation API: even if linux-dmabuf feedback isn't restricted to this use-case, it's the most common. linux-dmabuf feedback introduces the following concepts: 1. A main device. This is the render device that the compositor is using to perform composition. Compositors should always be able to display a buffer submitted by a client, so this device can be used as a fallback in case none of the more optimized code-paths work. Clients should allocate buffers such that they can be imported and textured from the main device. 2. One or more tranches. Each tranche consists of a target device, allocation flags and a set of format/modifier pairs. A tranche can be seen as a set of formats/modifier pairs that are compatible with the target device. A tranche can have the ``scanout`` flag. It means that the target device is a KMS device, and that buffers allocated with one of the format/modifier pairs in the tranche are eligible for direct scanout. Clients should use the tranches in order to allocate buffers with the most appropriate format/modifier and also to avoid allocating in private device memory when cross-device operations are going to happen. linux-dmabuf feedback implementation notes ========================================== This section contains recommendations for client and compositor implementations. For clients ----------- Clients are expected to either pick a fixed DRM format beforehand, or perform the following steps repeatedly until they find a suitable format. Basic clients may only support static buffer allocation on startup. These clients should do the following: 1. Send a ``get_default_feedback`` request to get global feedback. 2. Select the device indicated by ``main_device`` for allocation. 3. For each tranche: 1. If ``tranche_target_device`` doesn't match the allocation device, ignore the tranche. 2. Accumulate allocation flags from ``tranche_flags``. 3. Accumulate format/modifier pairs received via ``tranche_formats`` in a list. 4. When the ``tranche_done`` event is received, try to allocate the buffer with the accumulated list of modifiers and allocation flags. If that fails, proceed with the next tranche. If that succeeds, stop the loop. 4. Destroy the feedback object. Tranches are ordered by preference: the more optimized tranches come first. As such, clients should use the first tranche that happens to work. Some clients may have already selected the device they want to use beforehand. These clients can ignore the ``main_device`` event, and ignore tranches whose ``tranche_target_device`` doesn't match the selected device. Such clients need to be prepared for the ``wp_linux_buffer_params.create`` request to potentially fail. If the client allocates a buffer without specifying explicit modifiers on a device different from the one indicated by ``main_device``, then the client must force a linear layout. Some clients might support re-negotiating the buffer format/modifier on the fly. These clients should send a ``get_surface_feedback`` request and keep the feedback object alive after the initial allocation. Each time a new set of feedback parameters is received (ended by the ``done`` event), they should perform the same steps as basic clients described above. They should detect when the optimal allocation parameters didn't change (same format/modifier/flags) to avoid needlessly re-allocating their buffers. Some clients might additionally support switching the device used for allocations on the fly. Such clients should send a ``get_surface_feedback`` request. For each tranche, select the device indicated by ``tranche_target_device`` for allocation. Accumulate allocation flags (received via ``tranche_flags``) and format/modifier pairs (received via ``tranche_formats``) as usual. When the ``tranche_done`` event is received, try to allocate the buffer with the accumulated list of modifiers and the allocation flags. Try to import the resulting buffer by sending a ``wp_linux_buffer_params.create`` request (this might fail). Repeat with each tranche until an allocation and import succeeds. Each time a new set of feedback parameters is received, they should perform these steps again. They should detect when the optimal allocation parameters didn't change (same device/format/modifier/flags) to avoid needlessly re-allocating their buffers. For compositors --------------- Basic compositors may only support texturing the DMA-BUFs via a rendering API such as OpenGL or Vulkan. Such compositors can send a single tranche as a reply to both ``get_default_feedback`` and ``get_surface_feedback``. Set the ``main_device`` to the rendering device. Send the tranche with ``tranche_target_device`` set to the rendering device and all of the DRM format/modifier pairs supported by the rendering API. Do not set the ``scanout`` flag in the ``tranche_flags`` event. Some compositors may support direct scan-out for full-screen surfaces. These compositors can re-send the feedback parameters when a surface becomes full-screen or leaves full-screen mode if the client has used the ``get_surface_feedback`` request. The non-full-screen feedback parameters are the same as basic compositors described above. The full-screen feedback parameters have two tranches: one with the format/modifier pairs supported by the KMS plane, with the ``scanout`` flag set in the ``tranche_flags`` event and with ``tranche_target_device`` set to the KMS scan-out device; the other with the rest of the format/modifier pairs (supported for texturing, but not for scan-out), without the ``scanout`` flag set in the ``tranche_flags`` event, and with the ``tranche_target_device`` set to the rendering device. Some compositors may support direct scan-out for all surfaces. These compositors can send two tranches for surfaces that become candidates for direct scan-out, similarly to compositors supporting direct scan-out for fullscreen surfaces. When a surface stops being a candidate for direct scan-out, compositors should re-send the feedback parameters optimized for texturing only. The way candidates for direct scan-out are selected is compositor policy, a possible implementation is to select as many surfaces as there are available hardware planes, starting from surfaces closer to the eye. Some compositors may support multiple devices at the same time. If the compositor supports rendering with a fixed device and direct scan-out on a secondary device, it may send a separate tranche for surfaces displayed on the secondary device that are candidates for direct scan-out. The ``tranche_target_device`` for this tranche will be the secondary device and will not match the ``main_device``. Some compositors may support switching their rendering device at runtime or changing their rendering device depending on the surface. When the rendering device changes for a surface, such compositors may re-send the feedback parameters with a different ``main_device``. However there is a risk that clients don't support switching their device at runtime and continue using the previous device. For this reason, compositors should always have a fallback rendering device that they initially send as ``main_device``, such that these clients use said fallback device. Compositors should not change the ``main_device`` on-the-fly when explicit modifiers are not supported, because there's a risk of importing buffers with an implicit non-linear modifier as a linear buffer, resulting in misinterpreted buffer contents. Compositors should not send feedback parameters if they don't have a fallback path. For instance, compositors shouldn't send a format/modifier supported for direct scan-out but not supported by the rendering API for texturing. Compositors can decide to use multiple tranches to describe the allocation parameters optimized for texturing. For example, if there are formats which have a fast texturing path and formats which have a slower texturing path, the compositor can decide to expose two separate tranches. Compositors can decide to use intermediate tranches to describe code-paths slower than direct scan-out but faster than texturing. For instance, a compositor could insert an intermediate tranche if it's possible to use a mem2mem device to convert buffers to be able to use scan-out. ``dev_t`` encoding ================== The protocol carries ``dev_t`` values on the wire using arrays. A compositor written in C can encode the values as follows: .. code-block:: c struct stat drm_node_stat; struct wl_array dev_array = { .size = sizeof(drm_node_stat.st_rdev), .data = &drm_node_stat.st_rdev, }; A client can decode the values as follows: .. code-block:: c dev_t dev; assert(dev_array->size == sizeof(dev)); memcpy(&dev, dev_array->data, sizeof(dev)); Because two DRM nodes can refer to the same DRM device while having different ``dev_t`` values, clients should use ``drmDevicesEqual`` to compare two devices. ``format_table`` encoding ========================= The ``format_table`` event carries a file descriptor containing a list of format + modifier pairs. The list is an array of pairs which can be accessed with this C structure definition: .. code-block:: c struct dmabuf_format_modifier { uint32_t format; uint32_t pad; /* unused */ uint64_t modifier; }; Integration with other APIs =========================== - libdrm: ``drmGetDeviceFromDevId`` returns a ``drmDevice`` from a device ID. - EGL: the `EGL_EXT_device_drm_render_node`_ extension may be used to query the DRM device render node used by a given EGL display. When unavailable, the older `EGL_EXT_device_drm`_ extension may be used as a fallback. - Vulkan: the `VK_EXT_physical_device_drm`_ extension may be used to query the DRM device used by a given ``VkPhysicalDevice``. .. _EGL_EXT_device_drm: https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_device_drm.txt .. _EGL_EXT_device_drm_render_node: https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_device_drm_render_node.txt .. _VK_EXT_physical_device_drm: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_EXT_physical_device_drm.html wayland-protocols-0.32.6/protocols/stable/linux-dmabuf/linux-dmabuf-v1.xml000064400000000000000000000676221046102023000247440ustar 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. This interface offers ways to create generic dmabuf-based wl_buffers. For more information about dmabuf, see: https://www.kernel.org/doc/html/next/userspace-api/dma-buf-alloc-exchange.html Clients can use the get_surface_feedback request to get dmabuf feedback for a particular surface. If the client wants to retrieve feedback not tied to a surface, they can use the get_default_feedback request. 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. For all DRM formats and unless specified in another protocol extension, pre-multiplied alpha is used for pixel values. Unless specified otherwise in another protocol extension, implicit synchronization is used. In other words, compositors and clients must wait and signal fences implicitly passed via the DMA-BUF's reservation mechanism. 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. Starting version 4, the format event is deprecated and must not be sent by compositors. Instead, use get_default_feedback or get_surface_feedback. 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. Starting version 4, the modifier event is deprecated and must not be sent by compositors. Instead, use get_default_feedback or get_surface_feedback. This request creates a new wp_linux_dmabuf_feedback object not bound to a particular surface. This object will deliver feedback about dmabuf parameters to use if the client doesn't support per-surface feedback (see get_surface_feedback). This request creates a new wp_linux_dmabuf_feedback object for the specified wl_surface. This object will deliver feedback about dmabuf parameters to use for buffers attached to this surface. If the surface is destroyed before the wp_linux_dmabuf_feedback object, the feedback object becomes inert. 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 only be set once; subsequent calls with a plane index which has already been set will result in a plane_set error being generated. 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. Starting from version 4, the invalid_format protocol error is sent if the format + modifier pair was not advertised as supported. Starting from version 5, the invalid_format protocol error is sent if all planes don't use the same modifier. 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 zwp_linux_buffer_params_v1 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 zwp_linux_buffer_params_v1 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 platform 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. This object advertises dmabuf parameters feedback. This includes the preferred devices and the supported formats/modifiers. The parameters are sent once when this object is created and whenever they change. The done event is always sent once after all parameters have been sent. When a single parameter changes, all parameters are re-sent by the compositor. Compositors can re-send the parameters when the current client buffer allocations are sub-optimal. Compositors should not re-send the parameters if re-allocating the buffers would not result in a more optimal configuration. In particular, compositors should avoid sending the exact same parameters multiple times in a row. The tranche_target_device and tranche_formats events are grouped by tranches of preference. For each tranche, a tranche_target_device, one tranche_flags and one or more tranche_formats events are sent, followed by a tranche_done event finishing the list. The tranches are sent in descending order of preference. All formats and modifiers in the same tranche have the same preference. To send parameters, the compositor sends one main_device event, tranches (each consisting of one tranche_target_device event, one tranche_flags event, tranche_formats events and then a tranche_done event), then one done event. Using this request a client can tell the server that it is not going to use the wp_linux_dmabuf_feedback object anymore. This event is sent after all parameters of a wp_linux_dmabuf_feedback object have been sent. This allows changes to the wp_linux_dmabuf_feedback parameters to be seen as atomic, even if they happen via multiple events. This event provides a file descriptor which can be memory-mapped to access the format and modifier table. The table contains a tightly packed array of consecutive format + modifier pairs. Each pair is 16 bytes wide. It contains a format as a 32-bit unsigned integer, followed by 4 bytes of unused padding, and a modifier as a 64-bit unsigned integer. The native endianness is used. The client must map the file descriptor in read-only private mode. Compositors are not allowed to mutate the table file contents once this event has been sent. Instead, compositors must create a new, separate table file and re-send feedback parameters. Compositors are allowed to store duplicate format + modifier pairs in the table. This event advertises the main device that the server prefers to use when direct scan-out to the target device isn't possible. The advertised main device may be different for each wp_linux_dmabuf_feedback object, and may change over time. There is exactly one main device. The compositor must send at least one preference tranche with tranche_target_device equal to main_device. Clients need to create buffers that the main device can import and read from, otherwise creating the dmabuf wl_buffer will fail (see the wp_linux_buffer_params.create and create_immed requests for details). The main device will also likely be kept active by the compositor, so clients can use it instead of waking up another device for power savings. In general the device is a DRM node. The DRM node type (primary vs. render) is unspecified. Clients must not rely on the compositor sending a particular node type. Clients cannot check two devices for equality by comparing the dev_t value. If explicit modifiers are not supported and the client performs buffer allocations on a different device than the main device, then the client must force the buffer to have a linear layout. This event splits tranche_target_device and tranche_formats events in preference tranches. It is sent after a set of tranche_target_device and tranche_formats events; it represents the end of a tranche. The next tranche will have a lower preference. This event advertises the target device that the server prefers to use for a buffer created given this tranche. The advertised target device may be different for each preference tranche, and may change over time. There is exactly one target device per tranche. The target device may be a scan-out device, for example if the compositor prefers to directly scan-out a buffer created given this tranche. The target device may be a rendering device, for example if the compositor prefers to texture from said buffer. The client can use this hint to allocate the buffer in a way that makes it accessible from the target device, ideally directly. The buffer must still be accessible from the main device, either through direct import or through a potentially more expensive fallback path. If the buffer can't be directly imported from the main device then clients must be prepared for the compositor changing the tranche priority or making wl_buffer creation fail (see the wp_linux_buffer_params.create and create_immed requests for details). If the device is a DRM node, the DRM node type (primary vs. render) is unspecified. Clients must not rely on the compositor sending a particular node type. Clients cannot check two devices for equality by comparing the dev_t value. This event is tied to a preference tranche, see the tranche_done event. This event advertises the format + modifier combinations that the compositor supports. It carries an array of indices, each referring to a format + modifier pair in the last received format table (see the format_table event). Each index is a 16-bit unsigned integer in native endianness. For legacy support, DRM_FORMAT_MOD_INVALID is an allowed modifier. It indicates that the server can support the format with an implicit modifier. When a buffer 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. Compositors must not send duplicate format + modifier pairs within the same tranche or across two different tranches with the same target device and flags. This event is tied to a preference tranche, see the tranche_done event. For the definition of the format and modifier codes, see the wp_linux_buffer_params.create request. This event sets tranche-specific flags. The scanout flag is a hint that direct scan-out may be attempted by the compositor on the target device if the client appropriately allocates a buffer. How to allocate a buffer that can be scanned out on the target device is implementation-defined. This event is tied to a preference tranche, see the tranche_done event. wayland-protocols-0.32.6/protocols/stable/presentation-time/README000064400000000000000000000001401046102023000232150ustar 00000000000000Presentation time protocol Maintainers: Pekka Paalanen (@pq) wayland-protocols-0.32.6/protocols/stable/presentation-time/presentation-time.xml000064400000000000000000000311321046102023000265330ustar 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 POSIX platforms, 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 presentation was synchronized to the "vertical retrace" by the display hardware such that tearing does not happen. Relying on software 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. The display hardware provided measurements that the hardware driver converted into a presentation timestamp. Sampling a clock in software is not acceptable for this flag. 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. 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. For version 2 and later, if the output does not have a constant refresh rate, explicit video mode switches excluded, then the refresh argument must be either an appropriate rate picked by the compositor (e.g. fastest rate), or 0 if no such rate exists. For version 1, if the output does not have a constant refresh rate, 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.32.6/protocols/stable/tablet/README000064400000000000000000000001201046102023000210170ustar 00000000000000Tablet protocol Maintainers: Peter Hutterer (@whot) wayland-protocols-0.32.6/protocols/stable/tablet/tablet-v2.xml000064400000000000000000001444161046102023000225020ustar 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. 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. A descriptive name for the tablet device. If the device has no descriptive name, this event is not sent. This event is sent in the initial burst of events before the wp_tablet.done event. The USB vendor and product IDs for the tablet device. If the device has no USB vendor/product ID, this event is not sent. This can happen for virtual devices or non-USB devices, for instance. 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 user 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.32.6/protocols/stable/viewporter/README000064400000000000000000000002451046102023000217620ustar 00000000000000Viewporter: cropping and scaling extension for surface contents Previously known as wl_scaler. Maintainers: Pekka Paalanen (@pq) wayland-protocols-0.32.6/protocols/stable/viewporter/viewporter.xml000064400000000000000000000177051046102023000240430ustar 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, see 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. 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, see 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, see wl_surface.commit. wayland-protocols-0.32.6/protocols/stable/xdg-shell/README000064400000000000000000000002071046102023000214410ustar 00000000000000xdg shell protocol Maintainers: Jonas Ådahl (@jadahl) Mike Blumenkrantz (@zmike) wayland-protocols-0.32.6/protocols/stable/xdg-shell/xdg-shell.xml000064400000000000000000001672411046102023000232060ustar 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 defunct_surfaces 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. It is illegal to create an xdg_surface for a wl_surface which already has an assigned role and this will result in a role error. 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 and xdg_wm_base.error.unresponsive. 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. The “unresponsive” error is provided for compositors that wish to disconnect unresponsive clients. 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 invalid_positioner 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. If the gravity is not in the ‘gravity’ enum, an 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 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 (e.g. by sending the title, app ID, size constraints, parent, etc), the client must perform an initial commit without any buffer attached. The compositor will reply with initial wl_surface state such as wl_surface.preferred_buffer_scale followed by 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, i.e. the client must perform the initial commit again before attaching a buffer. Destroy the xdg_surface object. An xdg_surface must only be destroyed after its role object has been destroyed, otherwise a defunct_role_object error is raised. 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 state, see wl_surface.commit. 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, and may extend outside of the wl_surface itself to mark parts of the subsurface tree as part of the window geometry. 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. The effective geometry will not be recalculated unless a new call to set_window_geometry is done and the new pending surface state is subsequently applied. The width and height of the effective window geometry must be greater than zero. Setting an invalid size will raise an invalid_size error. 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. Acking a configure event that was never sent raises an invalid_serial error. 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. Sending an ack_configure request consumes the serial number sent with the request, as well as serial numbers sent by all configure events sent on this xdg_surface prior to the configure event referenced by the committed serial. It is an error to issue multiple ack_configure requests referencing a serial from the same configure event, or to issue an ack_configure request referencing a serial from a configure event issued before the event identified by the last ack_configure request for the same xdg_surface. Doing so will raise an invalid_serial error. 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. A xdg_toplevel by default is responsible for providing the full intended visual representation of the toplevel, which depending on the window state, may mean things like a title bar, window controls and drop shadow. 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 performing 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 surfaces 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 surface unsets its parent. Setting a null parent for a surface which currently has no parent is a no-op. Only mapped surfaces can have child surfaces. Setting a parent which is not mapped is equivalent to setting a null parent. If a surface becomes unmapped, its children's parent is set to the parent of the now-unmapped surface. If the now-unmapped surface has no parent, its children's parent is unset. If the now-unmapped surface becomes mapped again, its parent-child relationship is not restored. The parent toplevel must not be one of the child toplevel's descendants, and the parent must be different from the child toplevel, otherwise the invalid_parent protocol error 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". 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] https://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, or even if a window menu will be drawn at all. 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. Values not matching a variant of the enum will cause the invalid_resize_edge protocol error. 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, see wl_surface.commit. The surface is maximized. The window geometry specified in the configure event must be obeyed by the client, or the xdg_wm_base.invalid_surface_state error is raised. 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 client should draw without shadow or other decoration outside of the window geometry on the left edge. 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 client should draw without shadow or other decoration outside of the window geometry on the right edge. 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 client should draw without shadow or other decoration outside of the window geometry on the top edge. The window is currently in a tiled layout and the bottom edge is considered to be adjacent to another part of the tiling grid. The client should draw without shadow or other decoration outside of the window geometry on the bottom edge. The surface is currently not ordinarily being repainted; for example because its content is occluded by another window, or its outputs are switched off due to screen locking. 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, see wl_surface.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 an invalid_size error. The width and height must be greater than or equal to zero. Using strictly negative values for width or height will result in a invalid_size 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, see wl_surface.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 an invalid_size 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 invalid_size 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. The configure_bounds event may be sent prior to a xdg_toplevel.configure event to communicate the bounds a window geometry size is recommended to constrain to. The passed width and height are in surface coordinate space. If width and height are 0, it means bounds is unknown and equivalent to as if no configure_bounds event was ever sent for this surface. The bounds can for example correspond to the size of a monitor excluding any panels or other shell components, so that a surface isn't created in a way that it cannot fit. The bounds may change at any point, and in such a case, a new xdg_toplevel.configure_bounds will be sent, followed by xdg_toplevel.configure and xdg_surface.configure. This event advertises the capabilities supported by the compositor. If a capability isn't supported, clients should hide or disable the UI elements that expose this functionality. For instance, if the compositor doesn't advertise support for minimized toplevels, a button triggering the set_minimized request should not be displayed. The compositor will ignore requests it doesn't support. For instance, a compositor which doesn't advertise support for minimized will ignore set_minimized requests. Compositors must send this event once before the first xdg_surface.configure event. When the capabilities change, compositors must send this event again and then send an xdg_surface.configure event. The configured state should not be applied immediately. See xdg_surface.configure for details. The capabilities are sent as an array of 32-bit unsigned integers in native endianness. 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, the xdg_wm_base.not_the_topmost_popup 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. 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.32.6/protocols/staging/alpha-modifier/README000064400000000000000000000001231046102023000226120ustar 00000000000000Alpha modifier protocol Maintainers: Xaver Hugl (@Zamundaaa) wayland-protocols-0.32.6/protocols/staging/alpha-modifier/alpha-modifier-v1.xml000064400000000000000000000111371046102023000256700ustar 00000000000000 Copyright © 2024 Xaver Hugl 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 client to set a factor for the alpha values on a surface, which can be used to offload such operations to the compositor, which can in turn for example offload them to KMS. 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. Destroy the alpha modifier manager. This doesn't destroy objects created with the manager. Create a new alpha modifier surface object associated with the given wl_surface. If there is already such an object associated with the wl_surface, the already_constructed error will be raised. This interface allows the client to set a factor for the alpha values on a surface, which can be used to offload such operations to the compositor. The default factor is UINT32_MAX. This object has to be destroyed before the associated wl_surface. Once the wl_surface is destroyed, all request on this object will raise the no_surface error. This destroys the object, and is equivalent to set_multiplier with a value of UINT32_MAX, with the same double-buffered semantics as set_multiplier. Sets the alpha multiplier for the surface. The alpha multiplier is double-buffered state, see wl_surface.commit for details. This factor is applied in the compositor's blending space, as an additional step after the processing of per-pixel alpha values for the wl_surface. The exact meaning of the factor is thus undefined, unless the blending space is specified in a different extension. This multiplier is applied even if the buffer attached to the wl_surface doesn't have an alpha channel; in that case an alpha value of one is used instead. Zero means completely transparent, UINT32_MAX means completely opaque. wayland-protocols-0.32.6/protocols/staging/commit-timing/README000064400000000000000000000001331046102023000225070ustar 00000000000000Commit Timing Protocol Maintainers: Derek Foreman (@derekf) wayland-protocols-0.32.6/protocols/staging/commit-timing/commit-timing-v1.xml000064400000000000000000000126301046102023000254570ustar 00000000000000 Copyright © 2023 Valve 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. When a compositor latches on to new content updates it will check for any number of requirements of the available content updates (such as fences of all buffers being signalled) to consider the update ready. This protocol provides a method for adding a time constraint to surface content. This constraint indicates to the compositor that a content update should be presented as closely as possible to, but not before, a specified time. This protocol does not change the Wayland property that content updates are applied in the order they are received, even when some content updates contain timestamps and others do not. To provide timestamps, this global factory interface must be used to acquire a wp_commit_timing_v1 object for a surface, which may then be used to provide timestamp information for commits. 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. Informs the server that the client will no longer be using this protocol object. Existing objects created by this object are not affected. Establish a timing controller for a surface. Only one commit timer can be created for a surface, or a commit_timer_exists protocol error will be generated. An object to set a time constraint for a content update on a surface. Provide a timing constraint for a surface content update. A set_timestamp request may be made before a wl_surface.commit to tell the compositor that the content is intended to be presented as closely as possible to, but not before, the specified time. The time is in the domain of the compositor's presentation clock. An invalid_timestamp error will be generated for invalid tv_nsec. If a timestamp already exists on the surface, a timestamp_exists error is generated. Requesting set_timestamp after the commit_timer object's surface is destroyed will generate a "surface_destroyed" error. Informs the server that the client will no longer be using this protocol object. Existing timing constraints are not affected by the destruction. wayland-protocols-0.32.6/protocols/staging/content-type/README000064400000000000000000000002221046102023000223620ustar 00000000000000Content type hint protocol Maintainers: Emmanuel Gil Peyrot (@linkmauve) Xaver Hugl (@Zamundaaa) wayland-protocols-0.32.6/protocols/staging/content-type/content-type-v1.xml000064400000000000000000000131461046102023000252120ustar 00000000000000 Copyright © 2021 Emmanuel Gil Peyrot Copyright © 2022 Xaver Hugl 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 client to describe the kind of content a surface will display, to allow the compositor to optimize its behavior for it. 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. Destroy the content type manager. This doesn't destroy objects created with the manager. Create a new content type object associated with the given surface. Creating a wp_content_type_v1 from a wl_surface which already has one attached is a client error: already_constructed. The content type object allows the compositor to optimize for the kind of content shown on the surface. A compositor may for example use it to set relevant drm properties like "content type". The client may request to switch to another content type at any time. When the associated surface gets destroyed, this object becomes inert and the client should destroy it. Switch back to not specifying the content type of this surface. This is equivalent to setting the content type to none, including double buffering semantics. See set_content_type for details. These values describe the available content types for a surface. The content type none means that either the application has no data about the content type, or that the content doesn't fit into one of the other categories. The content type photo describes content derived from digital still pictures and may be presented with minimal processing. The content type video describes a video or animation and may be presented with more accurate timing to avoid stutter. Where scaling is needed, scaling methods more appropriate for video may be used. The content type game describes a running game. Its content may be presented with reduced latency. Set the surface content type. This informs the compositor that the client believes it is displaying buffers matching this content type. This is purely a hint for the compositor, which can be used to adjust its behavior or hardware settings to fit the presented content best. The content type is double-buffered state, see wl_surface.commit for details. wayland-protocols-0.32.6/protocols/staging/cursor-shape/README000064400000000000000000000001201046102023000223410ustar 00000000000000cursor-shape protocol Maintainers: Simon Ser (@emersion) wayland-protocols-0.32.6/protocols/staging/cursor-shape/cursor-shape-v1.xml000064400000000000000000000202741046102023000251560ustar 00000000000000 Copyright 2018 The Chromium Authors Copyright 2023 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 global offers an alternative, optional way to set cursor images. This new way uses enumerated cursors instead of a wl_surface like wl_pointer.set_cursor does. 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. Destroy the cursor shape manager. Obtain a wp_cursor_shape_device_v1 for a wl_pointer object. When the pointer capability is removed from the wl_seat, the wp_cursor_shape_device_v1 object becomes inert. Obtain a wp_cursor_shape_device_v1 for a zwp_tablet_tool_v2 object. When the zwp_tablet_tool_v2 is removed, the wp_cursor_shape_device_v1 object becomes inert. This interface allows clients to set the cursor shape. This enum describes cursor shapes. The names are taken from the CSS W3C specification: https://w3c.github.io/csswg-drafts/css-ui/#cursor Destroy the cursor shape device. The device cursor shape remains unchanged. Sets the device cursor to the specified shape. The compositor will change the cursor image based on the specified shape. The cursor actually changes only if the input device focus is one of the requesting client's surfaces. If any, the previous cursor image (surface or shape) is replaced. The "shape" argument must be a valid enum entry, otherwise the invalid_shape protocol error is raised. This is similar to the wl_pointer.set_cursor and zwp_tablet_tool_v2.set_cursor requests, but this request accepts a shape instead of contents in the form of a surface. Clients can mix set_cursor and set_shape requests. The serial parameter must match the latest wl_pointer.enter or zwp_tablet_tool_v2.proximity_in serial number sent to the client. Otherwise the request will be ignored. wayland-protocols-0.32.6/protocols/staging/drm-lease/README000064400000000000000000000002531046102023000216060ustar 00000000000000Linux DRM lease Maintainers: Simon Zeni (@bl4ckb0ne) Marius Vlad (@mvlad) Xaver Hugl (@Zamundaaa) wayland-protocols-0.32.6/protocols/staging/drm-lease/drm-lease-v1.xml000064400000000000000000000366401046102023000236560ustar 00000000000000 Copyright © 2018 NXP Copyright © 2019 Status Research & Development GmbH. Copyright © 2021 Xaver Hugl 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 used by Wayland compositors which act as Direct Rendering Manager (DRM) masters to lease DRM resources to Wayland clients. The compositor will advertise one wp_drm_lease_device_v1 global for each DRM node. Some time after a client binds to the wp_drm_lease_device_v1 global, the compositor will send a drm_fd event followed by zero, one or more connector events. After all currently available connectors have been sent, the compositor will send a wp_drm_lease_device_v1.done event. When the list of connectors available for lease changes the compositor will send wp_drm_lease_device_v1.connector events for added connectors and wp_drm_lease_connector_v1.withdrawn events for removed connectors, followed by a wp_drm_lease_device_v1.done event. The compositor will indicate when a device is gone by removing the global via a wl_registry.global_remove event. Upon receiving this event, the client should destroy any matching wp_drm_lease_device_v1 object. To destroy a wp_drm_lease_device_v1 object, the client must first issue a release request. Upon receiving this request, the compositor will immediately send a released event and destroy the object. The client must continue to process and discard drm_fd and connector events until it receives the released event. Upon receiving the released event, the client can safely cleanup any client-side resources. 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. Creates a lease request object. See the documentation for wp_drm_lease_request_v1 for details. Indicates the client no longer wishes to use this object. In response the compositor will immediately send the released event and destroy this object. It can however not guarantee that the client won't receive connector events before the released event. The client must not send any requests after this one, doing so will raise a wl_display error. Existing connectors, lease request and leases will not be affected. The compositor will send this event when the wp_drm_lease_device_v1 global is bound, although there are no guarantees as to how long this takes - the compositor might need to wait until regaining DRM master. The included fd is a non-master DRM file descriptor opened for this device and the compositor must not authenticate it. The purpose of this event is to give the client the ability to query DRM and discover information which may help them pick the appropriate DRM device or select the appropriate connectors therein. The compositor will use this event to advertise connectors available for lease by clients. This object may be passed into a lease request to indicate the client would like to lease that connector, see wp_drm_lease_request_v1.request_connector for details. While the compositor will make a best effort to not send disconnected connectors, no guarantees can be made. The compositor must send the drm_fd event before sending connectors. After the drm_fd event it will send all available connectors but may send additional connectors at any time. The compositor will send this event to indicate that it has sent all currently available connectors after the client binds to the global or when it updates the connector list, for example on hotplug, drm master change or when a leased connector becomes available again. It will similarly send this event to group wp_drm_lease_connector_v1.withdrawn events of connectors of this device. This event is sent in response to the release request and indicates that the compositor is done sending connector events. The compositor will destroy this object immediately after sending the event and it will become invalid. The client should release any resources associated with this device after receiving this event. Represents a DRM connector which is available for lease. These objects are created via wp_drm_lease_device_v1.connector events, and should be passed to lease requests via wp_drm_lease_request_v1.request_connector. Immediately after the wp_drm_lease_connector_v1 object is created the compositor will send a name, a description, a connector_id and a done event. When the description is updated the compositor will send a description event followed by a done event. The compositor sends this event once the connector is created to indicate the name of this connector. This will not change for the duration of the Wayland session, but is not guaranteed to be consistent between sessions. If the compositor supports wl_output version 4 and this connector corresponds to a wl_output, the compositor should use the same name as for the wl_output. The compositor sends this event once the connector is created to provide a human-readable description for this connector, which may be presented to the user. The compositor may send this event multiple times over the lifetime of this object to reflect changes in the description. The compositor sends this event once the connector is created to indicate the DRM object ID which represents the underlying connector that is being offered. Note that the final lease may include additional object IDs, such as CRTCs and planes. This event is sent after all properties of a connector have been sent. This allows changes to the properties to be seen as atomic even if they happen via multiple events. Sent to indicate that the compositor will no longer honor requests for DRM leases which include this connector. The client may still issue a lease request including this connector, but the compositor will send wp_drm_lease_v1.finished without issuing a lease fd. Compositors are encouraged to send this event when they lose access to connector, for example when the connector is hot-unplugged, when the connector gets leased to a client or when the compositor loses DRM master. If a client holds a lease for the connector, the status of the lease remains the same. The client should destroy the object after receiving this event. The client may send this request to indicate that it will not use this connector. Clients are encouraged to send this after receiving the "withdrawn" event so that the server can release the resources associated with this connector offer. Neither existing lease requests nor leases will be affected. A client that wishes to lease DRM resources will attach the list of connectors advertised with wp_drm_lease_device_v1.connector that they wish to lease, then use wp_drm_lease_request_v1.submit to submit the request. Indicates that the client would like to lease the given connector. This is only used as a suggestion, the compositor may choose to include any resources in the lease it issues, or change the set of leased resources at any time. Compositors are however encouraged to include the requested connector and other resources necessary to drive the connected output in the lease. Requesting a connector that was created from a different lease device than this lease request raises the wrong_device error. Requesting a connector twice will raise the duplicate_connector error. Submits the lease request and creates a new wp_drm_lease_v1 object. After calling submit the compositor will immediately destroy this object, issuing any more requests will cause a wl_display error. The compositor doesn't make any guarantees about the events of the lease object, clients cannot expect an immediate response. Not requesting any connectors before submitting the lease request will raise the empty_lease error. A DRM lease object is used to transfer the DRM file descriptor to the client and manage the lifetime of the lease. Some time after the wp_drm_lease_v1 object is created, the compositor will reply with the lease request's result. If the lease request is granted, the compositor will send a lease_fd event. If the lease request is denied, the compositor will send a finished event without a lease_fd event. This event returns a file descriptor suitable for use with DRM-related ioctls. The client should use drmModeGetLease to enumerate the DRM objects which have been leased to them. The compositor guarantees it will not use the leased DRM objects itself until it sends the finished event. If the compositor cannot or will not grant a lease for the requested connectors, it will not send this event, instead sending the finished event. The compositor will send this event at most once during this objects lifetime. The compositor uses this event to either reject a lease request, or if it previously sent a lease_fd, to notify the client that the lease has been revoked. If the client requires a new lease, they should destroy this object and submit a new lease request. The compositor will send no further events for this object after sending the finish event. Compositors should revoke the lease when any of the leased resources become unavailable, namely when a hot-unplug occurs or when the compositor loses DRM master. Compositors may advertise the connector for leasing again, if the resource is available, by sending the connector event through the wp_drm_lease_device_v1 interface. The client should send this to indicate that it no longer wishes to use this lease. The compositor should use drmModeRevokeLease on the appropriate file descriptor, if necessary. Upon destruction, the compositor should advertise the connector for leasing again by sending the connector event through the wp_drm_lease_device_v1 interface. wayland-protocols-0.32.6/protocols/staging/ext-data-control/README000064400000000000000000000001161046102023000231200ustar 00000000000000data-control protocol Maintainers: Neal Gompa (@Conan_Kudo) wayland-protocols-0.32.6/protocols/staging/ext-data-control/ext-data-control-v1.xml000064400000000000000000000273751046102023000265130ustar 00000000000000 Copyright © 2018 Simon Ser Copyright © 2019 Ivan Molodetskikh Copyright © 2024 Neal Gompa 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 currently in the testing phase. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes can only be done by creating a new major version of the extension. This interface 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 triggers the used_source protocol error. To unset the selection, set the source to NULL. Destroys the data device object. The data_offer event introduces a new ext_data_control_offer object, which will subsequently be used in either the ext_data_control_device.selection event (for the regular clipboard selections) or the ext_data_control_device.primary_selection event (for the primary clipboard selections). Immediately following the ext_data_control_device.data_offer event, the new data_offer object will send out ext_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 ext_data_control_offer for the selection for this device. The ext_data_control_device.data_offer and the ext_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 ext_data_control_offer is valid until a new ext_data_control_offer or NULL is received. The client must destroy the previous selection ext_data_control_offer, if any, upon receiving this event. Regardless, the previous selection will be ignored once a new selection ext_data_control_offer is received. The first selection event is sent upon binding the ext_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 ext_data_control_offer for the primary selection for this device. The ext_data_control_device.data_offer and the ext_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 ext_data_control_offer is valid until a new ext_data_control_offer or NULL is received. The client must destroy the previous primary selection ext_data_control_offer, if any, upon receiving this event. Regardless, the previous primary selection will be ignored once a new primary selection ext_data_control_offer is received. If the compositor supports primary selection, the first primary_selection event is sent upon binding the ext_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 triggers the used_source 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 ext_data_control_source object is the source side of a ext_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 ext_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 ext_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 ext_data_control_offer object. One event per offered MIME type. wayland-protocols-0.32.6/protocols/staging/ext-foreign-toplevel-list/README000064400000000000000000000001171046102023000247640ustar 00000000000000Foreign toplevel list protocol Maintainers: i509VCB (@i509VCB) ././@LongLink00006440000000000000000000000146000000000000007774Lustar wayland-protocols-0.32.6/protocols/staging/ext-foreign-toplevel-list/ext-foreign-toplevel-list-v1.xmlwayland-protocols-0.32.6/protocols/staging/ext-foreign-toplevel-list/ext-foreign-toplevel-list-v1.xm000064400000000000000000000234461046102023000320400ustar 00000000000000 Copyright © 2018 Ilia Bozhinov Copyright © 2020 Isaac Freund Copyright © 2022 wb9688 Copyright © 2023 i509VCB 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 provide protocol object handles for toplevels, possibly originating from another client. This protocol is intentionally minimalistic and expects additional functionality (e.g. creating a screencopy source from a toplevel handle, getting information about the state of the toplevel) to be implemented in extension protocols. The compositor may choose to restrict this protocol to a special client launched by the compositor itself or expose it to all clients, this is compositor policy. The key words "must", "must not", "required", "shall", "shall not", "should", "should not", "recommended", "may", and "optional" in this document are to be interpreted as described in IETF RFC 2119. 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 toplevel is defined as a surface with a role similar to xdg_toplevel. XWayland surfaces may be treated like toplevels in this protocol. After a client binds the ext_foreign_toplevel_list_v1, each mapped toplevel window will be sent using the ext_foreign_toplevel_list_v1.toplevel event. Clients which only care about the current state can perform a roundtrip after binding this global. For each instance of ext_foreign_toplevel_list_v1, the compositor must create a new ext_foreign_toplevel_handle_v1 object for each mapped toplevel. If a compositor implementation sends the ext_foreign_toplevel_list_v1.finished event after the global is bound, the compositor must not send any ext_foreign_toplevel_list_v1.toplevel events. 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 properties of the toplevel (identifier, title, app_id) will be sent immediately after this event using the corresponding events for ext_foreign_toplevel_handle_v1. The compositor will use the ext_foreign_toplevel_handle_v1.done event to indicate when all data has been sent. This event indicates that the compositor is done sending events to this object. The client should destroy the object. See ext_foreign_toplevel_list_v1.destroy for more information. The compositor must not send any more toplevel events after this event. This request indicates that the client no longer wishes to receive events for new toplevels. The Wayland protocol is asynchronous, meaning the compositor may send further toplevel events until the stop request is processed. The client should wait for a ext_foreign_toplevel_list_v1.finished event before destroying this object. This request should be called either when the client will no longer use the ext_foreign_toplevel_list_v1 or after the finished event has been received to allow destruction of the object. If a client wishes to destroy this object it should send a ext_foreign_toplevel_list_v1.stop request and wait for a ext_foreign_toplevel_list_v1.finished event, then destroy the handles and then this object. A ext_foreign_toplevel_handle_v1 object represents a mapped toplevel window. A single app may have multiple mapped toplevels. This request should be used when the client will no longer use the handle or after the closed event has been received to allow destruction of the object. When a handle is destroyed, a new handle may not be created by the server until the toplevel is unmapped and then remapped. Destroying a toplevel handle is not recommended unless the client is cleaning up child objects before destroying the ext_foreign_toplevel_list_v1 object, the toplevel was closed or the toplevel handle will not be used in the future. Other protocols which extend the ext_foreign_toplevel_handle_v1 interface should require destructors for extension interfaces be called before allowing the toplevel handle to be destroyed. The server will emit no further events on the ext_foreign_toplevel_handle_v1 after this event. Any requests received aside from the destroy request must be ignored. Upon receiving this event, the client should destroy the handle. Other protocols which extend the ext_foreign_toplevel_handle_v1 interface must also ignore requests other than destructors. This event is sent after all changes in the toplevel state have been sent. This allows changes to the ext_foreign_toplevel_handle_v1 properties to be atomically applied. Other protocols which extend the ext_foreign_toplevel_handle_v1 interface may use this event to also atomically apply any pending state. This event must not be sent after the ext_foreign_toplevel_handle_v1.closed event. The title of the toplevel has changed. The configured state must not be applied immediately. See ext_foreign_toplevel_handle_v1.done for details. The app id of the toplevel has changed. The configured state must not be applied immediately. See ext_foreign_toplevel_handle_v1.done for details. This identifier is used to check if two or more toplevel handles belong to the same toplevel. The identifier is useful for command line tools or privileged clients which may need to reference an exact toplevel across processes or instances of the ext_foreign_toplevel_list_v1 global. The compositor must only send this event when the handle is created. The identifier must be unique per toplevel and it's handles. Two different toplevels must not have the same identifier. The identifier is only valid as long as the toplevel is mapped. If the toplevel is unmapped the identifier must not be reused. An identifier must not be reused by the compositor to ensure there are no races when sharing identifiers between processes. An identifier is a string that contains up to 32 printable ASCII bytes. An identifier must not be an empty string. It is recommended that a compositor includes an opaque generation value in identifiers. How the generation value is used when generating the identifier is implementation dependent. wayland-protocols-0.32.6/protocols/staging/ext-idle-notify/README000064400000000000000000000001171046102023000227550ustar 00000000000000idle_notify protocol Maintainers: Simon Ser (@emersion) wayland-protocols-0.32.6/protocols/staging/ext-idle-notify/ext-idle-notify-v1.xml000064400000000000000000000133711046102023000261720ustar 00000000000000 Copyright © 2015 Martin Gräßlin Copyright © 2022 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 clients to monitor user idle status. After binding to this global, clients can create ext_idle_notification_v1 objects to get notified when the user is idle for a given amount of time. Destroy the manager object. All objects created via this interface remain valid. Create a new idle notification object. The notification object has a minimum timeout duration and is tied to a seat. The client will be notified if the seat is inactive for at least the provided timeout. See ext_idle_notification_v1 for more details. A zero timeout is valid and means the client wants to be notified as soon as possible when the seat is inactive. Create a new idle notification object to track input from the user, such as keyboard and mouse movement. Because this object is meant to track user input alone, it ignores idle inhibitors. The notification object has a minimum timeout duration and is tied to a seat. The client will be notified if the seat is inactive for at least the provided timeout. See ext_idle_notification_v1 for more details. A zero timeout is valid and means the client wants to be notified as soon as possible when the seat is inactive. This interface is used by the compositor to send idle notification events to clients. Initially the notification object is not idle. The notification object becomes idle when no user activity has happened for at least the timeout duration, starting from the creation of the notification object. User activity may include input events or a presence sensor, but is compositor-specific. How this notification responds to idle inhibitors depends on how it was constructed. If constructed from the get_idle_notification request, then if an idle inhibitor is active (e.g. another client has created a zwp_idle_inhibitor_v1 on a visible surface), the compositor must not make the notification object idle. However, if constructed from the get_input_idle_notification request, then idle inhibitors are ignored, and only input from the user, e.g. from a keyboard or mouse, counts as activity. When the notification object becomes idle, an idled event is sent. When user activity starts again, the notification object stops being idle, a resumed event is sent and the timeout is restarted. Destroy the notification object. This event is sent when the notification object becomes idle. It's a compositor protocol error to send this event twice without a resumed event in-between. This event is sent when the notification object stops being idle. It's a compositor protocol error to send this event twice without an idled event in-between. It's a compositor protocol error to send this event prior to any idled event. wayland-protocols-0.32.6/protocols/staging/ext-image-capture-source/README000064400000000000000000000002041046102023000245500ustar 00000000000000Image Capture Source Protocol Maintainers: Andri Yngvason (@andri) Simon Ser (@emersion) wayland-protocols-0.32.6/protocols/staging/ext-image-capture-source/ext-image-capture-source-v1.xml000064400000000000000000000116351046102023000315670ustar 00000000000000 Copyright © 2022 Andri Yngvason Copyright © 2024 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 protocol serves as an intermediary between capturing protocols and potential image capture sources such as outputs and toplevels. This protocol may be extended to support more image capture sources in the future, thereby adding those image capture sources to other protocols that use the image capture source object without having to modify those protocols. 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. The image capture source object is an opaque descriptor for a capturable resource. This resource may be any sort of entity from which an image may be derived. Note, because ext_image_capture_source_v1 objects are created from multiple independent factory interfaces, the ext_image_capture_source_v1 interface is frozen at version 1. Destroys the image capture source. This request may be sent at any time by the client. A manager for creating image capture source objects for wl_output objects. Creates a source object for an output. Images captured from this source will show the same content as the output. Some elements may be omitted, such as cursors and overlays that have been marked as transparent to capturing. Destroys the manager. This request may be sent at any time by the client and objects created by the manager will remain valid after its destruction. A manager for creating image capture source objects for ext_foreign_toplevel_handle_v1 objects. Creates a source object for a foreign toplevel handle. Images captured from this source will show the same content as the toplevel. Destroys the manager. This request may be sent at any time by the client and objects created by the manager will remain valid after its destruction. wayland-protocols-0.32.6/protocols/staging/ext-image-copy-capture/README000064400000000000000000000002021046102023000242200ustar 00000000000000Image Copy Capture protocol Maintainers: Andri Yngvason (@andri) Simon Ser (@emersion) wayland-protocols-0.32.6/protocols/staging/ext-image-copy-capture/ext-image-copy-capture-v1.xml000064400000000000000000000450761046102023000307210ustar 00000000000000 Copyright © 2021-2023 Andri Yngvason Copyright © 2024 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 protocol allows clients to ask the compositor to capture image sources such as outputs and toplevels into user submitted buffers. Warning! The protocol described in this file is currently in the testing phase. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes can only be done by creating a new major version of the extension. This object is a manager which offers requests to start capturing from a source. Create a capturing session for an image capture source. If the paint_cursors option is set, cursors shall be composited onto the captured frame. The cursor must not be composited onto the frame if this flag is not set. If the options bitfield is invalid, the invalid_option protocol error is sent. Create a cursor capturing session for the pointer of an image capture source. Destroy the manager object. Other objects created via this interface are unaffected. This object represents an active image copy capture session. After a capture session is created, buffer constraint events will be emitted from the compositor to tell the client which buffer types and formats are supported for reading from the session. The compositor may re-send buffer constraint events whenever they change. To advertise buffer constraints, the compositor must send in no particular order: zero or more shm_format and dmabuf_format events, zero or one dmabuf_device event, and exactly one buffer_size event. Then the compositor must send a done event. When the client has received all the buffer constraints, it can create a buffer accordingly, attach it to the capture session using the attach_buffer request, set the buffer damage using the damage_buffer request and then send the capture request. Provides the dimensions of the source image in buffer pixel coordinates. The client must attach buffers that match this size. Provides the format that must be used for shared-memory buffers. This event may be emitted multiple times, in which case the client may choose any given format. This event advertises the device buffers must be allocated on for dma-buf buffers. In general the device is a DRM node. The DRM node type (primary vs. render) is unspecified. Clients must not rely on the compositor sending a particular node type. Clients cannot check two devices for equality by comparing the dev_t value. Provides the format that must be used for dma-buf buffers. The client may choose any of the modifiers advertised in the array of 64-bit unsigned integers. This event may be emitted multiple times, in which case the client may choose any given format. This event is sent once when all buffer constraint events have been sent. The compositor must always end a batch of buffer constraint events with this event, regardless of whether it sends the initial constraints or an update. This event indicates that the capture session has stopped and is no longer available. This can happen in a number of cases, e.g. when the underlying source is destroyed, if the user decides to end the image capture, or if an unrecoverable runtime error has occurred. The client should destroy the session after receiving this event. Create a capture frame for this session. At most one frame object can exist for a given session at any time. If a client sends a create_frame request before a previous frame object has been destroyed, the duplicate_frame protocol error is raised. Destroys the session. This request can be sent at any time by the client. This request doesn't affect ext_image_copy_capture_frame_v1 objects created by this object. This object represents an image capture frame. The client should attach a buffer, damage the buffer, and then send a capture request. If the capture is successful, the compositor must send the frame metadata (transform, damage, presentation_time in any order) followed by the ready event. If the capture fails, the compositor must send the failed event. Destroys the frame. This request can be sent at any time by the client. Attach a buffer to the session. The wl_buffer.release request is unused. The new buffer replaces any previously attached buffer. This request must not be sent after capture, or else the already_captured protocol error is raised. Apply damage to the buffer which is to be captured next. This request may be sent multiple times to describe a region. The client indicates the accumulated damage since this wl_buffer was last captured. During capture, the compositor will update the buffer with at least the union of the region passed by the client and the region advertised by ext_image_copy_capture_frame_v1.damage. When a wl_buffer is captured for the first time, or when the client doesn't track damage, the client must damage the whole buffer. This is for optimisation purposes. The compositor may use this information to reduce copying. These coordinates originate from the upper left corner of the buffer. If x or y are strictly negative, or if width or height are negative or zero, the invalid_buffer_damage protocol error is raised. This request must not be sent after capture, or else the already_captured protocol error is raised. Capture a frame. Unless this is the first successful captured frame performed in this session, the compositor may wait an indefinite amount of time for the source content to change before performing the copy. This request may only be sent once, or else the already_captured protocol error is raised. A buffer must be attached before this request is sent, or else the no_buffer protocol error is raised. This event is sent before the ready event and holds the transform that the compositor has applied to the buffer contents. This event is sent before the ready event. It may be generated multiple times to describe a region. The first captured frame in a session will always carry full damage. Subsequent frames' damaged regions describe which parts of the buffer have changed since the last ready event. These coordinates originate in the upper left corner of the buffer. This event indicates the time at which the frame is presented to the output in system monotonic time. This event is sent before the ready event. 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]. Called as soon as the frame is copied, indicating it is available for reading. The buffer may be re-used by the client after this event. After receiving this event, the client must destroy the object. An unspecified runtime error has occurred. The client may retry. The buffer submitted by the client doesn't match the latest session constraints. The client should re-allocate its buffers and retry. The session has stopped. See ext_image_copy_capture_session_v1.stopped. This event indicates that the attempted frame copy has failed. After receiving this event, the client must destroy the object. This object represents a cursor capture session. It extends the base capture session with cursor-specific metadata. Destroys the session. This request can be sent at any time by the client. This request doesn't affect ext_image_copy_capture_frame_v1 objects created by this object. Gets the image copy capture session for this cursor session. The session will produce frames of the cursor image. The compositor may pause the session when the cursor leaves the captured area. This request must not be sent more than once, or else the duplicate_session protocol error is raised. Sent when a cursor enters the captured area. It shall be generated before the "position" and "hotspot" events when and only when a cursor enters the area. The cursor enters the captured area when the cursor image intersects with the captured area. Note, this is different from e.g. wl_pointer.enter. Sent when a cursor leaves the captured area. No "position" or "hotspot" event is generated for the cursor until the cursor enters the captured area again. Cursors outside the image capture source do not get captured and no event will be generated for them. The given position is the position of the cursor's hotspot and it is relative to the main buffer's top left corner in transformed buffer pixel coordinates. The coordinates may be negative or greater than the main buffer size. The hotspot describes the offset between the cursor image and the position of the input device. The given coordinates are the hotspot's offset from the origin in buffer coordinates. Clients should not apply the hotspot immediately: the hotspot becomes effective when the next ext_image_copy_capture_frame_v1.ready event is received. Compositors may delay this event until the client captures a new frame. wayland-protocols-0.32.6/protocols/staging/ext-session-lock/README000064400000000000000000000001271046102023000231440ustar 00000000000000ext session lock protocol Maintainers: Isaac Freund (@ifreund) wayland-protocols-0.32.6/protocols/staging/ext-session-lock/ext-session-lock-v1.xml000064400000000000000000000373101046102023000265450ustar 00000000000000 Copyright 2021 Isaac Freund 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. This protocol allows for a privileged Wayland client to lock the session and display arbitrary graphics while the session is locked. The compositor may choose to restrict this protocol to a special client launched by the compositor itself or expose it to all privileged clients, this is compositor policy. The client is responsible for performing authentication and informing the compositor when the session should be unlocked. If the client dies while the session is locked the session remains locked, possibly permanently depending on compositor policy. The key words "must", "must not", "required", "shall", "shall not", "should", "should not", "recommended", "may", and "optional" in this document are to be interpreted as described in IETF RFC 2119. Warning! The protocol described in this file is currently in the testing phase. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes can only be done by creating a new major version of the extension. This interface is used to request that the session be locked. This informs the compositor that the session lock manager object will no longer be used. Existing objects created through this interface remain valid. This request creates a session lock and asks the compositor to lock the session. The compositor will send either the ext_session_lock_v1.locked or ext_session_lock_v1.finished event on the created object in response to this request. In response to the creation of this object the compositor must send either the locked or finished event. The locked event indicates that the session is locked. This means that the compositor must stop rendering and providing input to normal clients. Instead the compositor must blank all outputs with an opaque color such that their normal content is fully hidden. The only surfaces that should be rendered while the session is locked are the lock surfaces created through this interface and optionally, at the compositor's discretion, special privileged surfaces such as input methods or portions of desktop shell UIs. The locked event must not be sent until a new "locked" frame (either from a session lock surface or the compositor blanking the output) has been presented on all outputs and no security sensitive normal/unlocked content is possibly visible. The finished event should be sent immediately on creation of this object if the compositor decides that the locked event will not be sent. The compositor may wait for the client to create and render session lock surfaces before sending the locked event to avoid displaying intermediate blank frames. However, it must impose a reasonable time limit if waiting and send the locked event as soon as the hard requirements described above can be met if the time limit expires. Clients should immediately create lock surfaces for all outputs on creation of this object to make this possible. This behavior of the locked event is required in order to prevent possible race conditions with clients that wish to suspend the system or similar after locking the session. Without these semantics, clients triggering a suspend after receiving the locked event would race with the first "locked" frame being presented and normal/unlocked frames might be briefly visible as the system is resumed if the suspend operation wins the race. If the client dies while the session is locked, the compositor must not unlock the session in response. It is acceptable for the session to be permanently locked if this happens. The compositor may choose to continue to display the lock surfaces the client had mapped before it died or alternatively fall back to a solid color, this is compositor policy. Compositors may also allow a secure way to recover the session, the details of this are compositor policy. Compositors may allow a new client to create a ext_session_lock_v1 object and take responsibility for unlocking the session, they may even start a new lock client instance automatically. This informs the compositor that the lock object will no longer be used. Existing objects created through this interface remain valid. After this request is made, lock surfaces created through this object should be destroyed by the client as they will no longer be used by the compositor. It is a protocol error to make this request if the locked event was sent, the unlock_and_destroy request must be used instead. This client is now responsible for displaying graphics while the session is locked and deciding when to unlock the session. The locked event must not be sent until a new "locked" frame has been presented on all outputs and no security sensitive normal/unlocked content is possibly visible. If this event is sent, making the destroy request is a protocol error, the lock object must be destroyed using the unlock_and_destroy request. The compositor has decided that the session lock should be destroyed as it will no longer be used by the compositor. Exactly when this event is sent is compositor policy, but it must never be sent more than once for a given session lock object. This might be sent because there is already another ext_session_lock_v1 object held by a client, or the compositor has decided to deny the request to lock the session for some other reason. This might also be sent because the compositor implements some alternative, secure way to authenticate and unlock the session. The finished event should be sent immediately on creation of this object if the compositor decides that the locked event will not be sent. If the locked event is sent on creation of this object the finished event may still be sent at some later time in this object's lifetime. This is compositor policy. Upon receiving this event, the client should make either the destroy request or the unlock_and_destroy request, depending on whether or not the locked event was received on this object. The client is expected to create lock surfaces for all outputs currently present and any new outputs as they are advertised. These won't be displayed by the compositor unless the lock is successful and the locked event is sent. Providing a wl_surface which already has a role or already has a buffer attached or committed is a protocol error, as is attaching/committing a buffer before the first ext_session_lock_surface_v1.configure event. Attempting to create more than one lock surface for a given output is a duplicate_output protocol error. This request indicates that the session should be unlocked, for example because the user has entered their password and it has been verified by the client. This request also informs the compositor that the lock object will no longer be used and should be destroyed. Existing objects created through this interface remain valid. After this request is made, lock surfaces created through this object should be destroyed by the client as they will no longer be used by the compositor. It is a protocol error to make this request if the locked event has not been sent. In that case, the lock object must be destroyed using the destroy request. Note that a correct client that wishes to exit directly after unlocking the session must use the wl_display.sync request to ensure the server receives and processes the unlock_and_destroy request. Otherwise there is no guarantee that the server has unlocked the session due to the asynchronous nature of the Wayland protocol. For example, the server might terminate the client with a protocol error before it processes the unlock_and_destroy request. The client may use lock surfaces to display a screensaver, render a dialog to enter a password and unlock the session, or however else it sees fit. On binding this interface the compositor will immediately send the first configure event. After making the ack_configure request in response to this event the client should attach and commit the first buffer. Committing the surface before acking the first configure is a protocol error. Committing the surface with a null buffer at any time is a protocol error. The compositor is free to handle keyboard/pointer focus for lock surfaces however it chooses. A reasonable way to do this would be to give the first lock surface created keyboard focus and change keyboard focus if the user clicks on other surfaces. This informs the compositor that the lock surface object will no longer be used. It is recommended for a lock client to destroy lock surfaces if their corresponding wl_output global is removed. If a lock surface on an active output is destroyed before the ext_session_lock_v1.unlock_and_destroy event is sent, the compositor must fall back to rendering a solid color. 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. Sending an ack_configure request consumes the configure event referenced by the given serial, as well as all older configure events sent on this object. It is a protocol error to issue multiple ack_configure requests referencing the same configure event or to issue an ack_configure request referencing a configure event older than the last configure event acked for a given lock surface. This event is sent once on binding the interface and may be sent again at the compositor's discretion, for example if output geometry changes. The width and height are in surface-local coordinates and are exact requirements. Failing to match these surface dimensions in the next commit after acking a configure is a protocol error. wayland-protocols-0.32.6/protocols/staging/ext-transient-seat/README000064400000000000000000000001111046102023000234650ustar 00000000000000Transient Seat Maintainers: Andri Yngvason (@andri) wayland-protocols-0.32.6/protocols/staging/ext-transient-seat/ext-transient-seat-v1.xml000064400000000000000000000111001046102023000274120ustar 00000000000000 Copyright © 2020 - 2023 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. The transient seat protocol can be used by privileged clients to create independent seats that will be removed from the compositor when the client destroys its transient seat. This protocol is intended for use with virtual input protocols such as "virtual_keyboard_unstable_v1" or "wlr_virtual_pointer_unstable_v1", both of which allow the user to select a seat. The "wl_seat" global created by this protocol does not generate input events on its own, or have any capabilities except those assigned to it by other protocol extensions, such as the ones mentioned above. For example, a remote desktop server can create a seat with virtual inputs for each remote user by following these steps for each new connection: * Create a transient seat * Wait for the transient seat to be created * Locate a "wl_seat" global with a matching name * Create virtual inputs using the resulting "wl_seat" global The transient seat manager creates short-lived seats. Create a new seat that is removed when the client side transient seat object is destroyed. The actual seat may be removed sooner, in which case the transient seat object shall become inert. Destroy the manager. All objects created by the manager will remain valid until they are destroyed themselves. When the transient seat handle is destroyed, the seat itself will also be destroyed. This event advertises the global name for the wl_seat to be used with wl_registry_bind. It is sent exactly once, immediately after the transient seat is created and the new "wl_seat" global is advertised, if and only if the creation of the transient seat was allowed. The event informs the client that the compositor denied its request to create a transient seat. It is sent exactly once, immediately after the transient seat object is created, if and only if the creation of the transient seat was denied. After receiving this event, the client should destroy the object. When the transient seat object is destroyed by the client, the associated seat created by the compositor is also destroyed. wayland-protocols-0.32.6/protocols/staging/ext-workspace/README000064400000000000000000000001541046102023000225310ustar 00000000000000Workspace protocol Maintainers: Ilia Bozhinov Victoria Brekenfeld wayland-protocols-0.32.6/protocols/staging/ext-workspace/ext-workspace-v1.xml000064400000000000000000000461711046102023000255240ustar 00000000000000 Copyright © 2019 Christopher Billington Copyright © 2020 Ilia Bozhinov Copyright © 2022 Victoria Brekenfeld 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. Workspaces, also called virtual desktops, are groups of surfaces. A compositor with a concept of workspaces may only show some such groups of surfaces (those of 'active' workspaces) at a time. 'Activating' a workspace is a request for the compositor to display that workspace's surfaces as normal, whereas the compositor may hide or otherwise de-emphasise surfaces that are associated only with 'inactive' workspaces. Workspaces are grouped by which sets of outputs they correspond to, and may contain surfaces only from those outputs. In this way, it is possible for each output to have its own set of workspaces, or for all outputs (or any other arbitrary grouping) to share workspaces. Compositors may optionally conceptually arrange each group of workspaces in an N-dimensional grid. The purpose of this protocol is to enable the creation of taskbars and docks by providing them with a list of workspaces and their properties, and allowing them to activate and deactivate workspaces. After a client binds the ext_workspace_manager_v1, each workspace will be sent via the workspace event. This event is emitted whenever a new workspace group has been created. All initial details of the workspace group (outputs) will be sent immediately after this event via the corresponding events in ext_workspace_group_handle_v1 and ext_workspace_handle_v1. This event is emitted whenever a new workspace has been created. All initial details of the workspace (name, coordinates, state) will be sent immediately after this event via the corresponding events in ext_workspace_handle_v1. Workspaces start off unassigned to any workspace group. The client must send this request after it has finished sending other requests. The compositor must process a series of requests preceding a commit request atomically. This allows changes to the workspace properties to be seen as atomic, even if they happen via multiple events, and even if they involve multiple ext_workspace_handle_v1 objects, for example, deactivating one workspace and activating another. This event is sent after all changes in all workspaces and workspace groups have been sent. This allows changes to one or more ext_workspace_group_handle_v1 properties and ext_workspace_handle_v1 properties to be seen as atomic, even if they happen via multiple events. In particular, an output moving from one workspace group to another sends an output_enter event and an output_leave event to the two ext_workspace_group_handle_v1 objects in question. The compositor sends the done event only after updating the output information in both workspace groups. This event indicates that the compositor is done sending events to the ext_workspace_manager_v1. The server will destroy the object immediately after sending this request. Indicates the client no longer wishes to receive events for new workspace groups. However the compositor may emit further workspace events, until the finished event is emitted. The compositor is expected to send the finished event eventually once the stop request has been processed. The client must not send any requests after this one, doing so will raise a wl_display invalid_object error. A ext_workspace_group_handle_v1 object represents a workspace group that is assigned a set of outputs and contains a number of workspaces. The set of outputs assigned to the workspace group is conveyed to the client via output_enter and output_leave events, and its workspaces are conveyed with workspace events. For example, a compositor which has a set of workspaces for each output may advertise a workspace group (and its workspaces) per output, whereas a compositor where a workspace spans all outputs may advertise a single workspace group for all outputs. This event advertises the capabilities supported by the compositor. If a capability isn't supported, clients should hide or disable the UI elements that expose this functionality. For instance, if the compositor doesn't advertise support for creating workspaces, a button triggering the create_workspace request should not be displayed. The compositor will ignore requests it doesn't support. For instance, a compositor which doesn't advertise support for creating workspaces will ignore create_workspace requests. Compositors must send this event once after creation of an ext_workspace_group_handle_v1. When the capabilities change, compositors must send this event again. This event is emitted whenever an output is assigned to the workspace group or a new `wl_output` object is bound by the client, which was already assigned to this workspace_group. This event is emitted whenever an output is removed from the workspace group. This event is emitted whenever a workspace is assigned to this group. A workspace may only ever be assigned to a single group at a single point in time, but can be re-assigned during it's lifetime. This event is emitted whenever a workspace is removed from this group. This event is send when the group associated with the ext_workspace_group_handle_v1 has been removed. After sending this request the compositor will immediately consider the object inert. Any requests will be ignored except the destroy request. It is guaranteed there won't be any more events referencing this ext_workspace_group_handle_v1. The compositor must remove all workspaces belonging to a workspace group via a workspace_leave event before removing the workspace group. Request that the compositor create a new workspace with the given name and assign it to this group. There is no guarantee that the compositor will create a new workspace, or that the created workspace will have the provided name. Destroys the ext_workspace_group_handle_v1 object. This request should be send either when the client does not want to use the workspace group object any more or after the removed event to finalize the destruction of the object. A ext_workspace_handle_v1 object represents a workspace that handles a group of surfaces. Each workspace has: - a name, conveyed to the client with the name event - potentially an id conveyed with the id event - a list of states, conveyed to the client with the state event - and optionally a set of coordinates, conveyed to the client with the coordinates event The client may request that the compositor activate or deactivate the workspace. Each workspace can belong to only a single workspace group. Depepending on the compositor policy, there might be workspaces with the same name in different workspace groups, but these workspaces are still separate (e.g. one of them might be active while the other is not). If this event is emitted, it will be send immediately after the ext_workspace_handle_v1 is created or when an id is assigned to a workspace (at most once during it's lifetime). An id will never change during the lifetime of the `ext_workspace_handle_v1` and is guaranteed to be unique during it's lifetime. Ids are not human-readable and shouldn't be displayed, use `name` for that purpose. Compositors are expected to only send ids for workspaces likely stable across multiple sessions and can be used by clients to store preferences for workspaces. Workspaces without ids should be considered temporary and any data associated with them should be deleted once the respective object is lost. This event is emitted immediately after the ext_workspace_handle_v1 is created and whenever the name of the workspace changes. A name is meant to be human-readable and can be displayed to a user. Unlike the id it is neither stable nor unique. This event is used to organize workspaces into an N-dimensional grid within a workspace group, and if supported, is emitted immediately after the ext_workspace_handle_v1 is created and whenever the coordinates of the workspace change. Compositors may not send this event if they do not conceptually arrange workspaces in this way. If compositors simply number workspaces, without any geometric interpretation, they may send 1D coordinates, which clients should not interpret as implying any geometry. Sending an empty array means that the compositor no longer orders the workspace geometrically. Coordinates have an arbitrary number of dimensions N with an uint32 position along each dimension. By convention if N > 1, the first dimension is X, the second Y, the third Z, and so on. The compositor may chose to utilize these events for a more novel workspace layout convention, however. No guarantee is made about the grid being filled or bounded; there may be a workspace at coordinate 1 and another at coordinate 1000 and none in between. Within a workspace group, however, workspaces must have unique coordinates of equal dimensionality. The different states that a workspace can have. The workspace is not visible in its workspace group, and clients attempting to visualize the compositor workspace state should not display such workspaces. This event is emitted immediately after the ext_workspace_handle_v1 is created and each time the workspace state changes, either because of a compositor action or because of a request in this protocol. Missing states convey the opposite meaning, e.g. an unset active bit means the workspace is currently inactive. This event advertises the capabilities supported by the compositor. If a capability isn't supported, clients should hide or disable the UI elements that expose this functionality. For instance, if the compositor doesn't advertise support for removing workspaces, a button triggering the remove request should not be displayed. The compositor will ignore requests it doesn't support. For instance, a compositor which doesn't advertise support for remove will ignore remove requests. Compositors must send this event once after creation of an ext_workspace_handle_v1 . When the capabilities change, compositors must send this event again. This event is send when the workspace associated with the ext_workspace_handle_v1 has been removed. After sending this request, the compositor will immediately consider the object inert. Any requests will be ignored except the destroy request. It is guaranteed there won't be any more events referencing this ext_workspace_handle_v1. The compositor must only remove a workspaces not currently belonging to any workspace_group. Destroys the ext_workspace_handle_v1 object. This request should be made either when the client does not want to use the workspace object any more or after the remove event to finalize the destruction of the object. Request that this workspace be activated. There is no guarantee the workspace will be actually activated, and behaviour may be compositor-dependent. For example, activating a workspace may or may not deactivate all other workspaces in the same group. Request that this workspace be deactivated. There is no guarantee the workspace will be actually deactivated. Requests that this workspace is assigned to the given workspace group. There is no guarantee the workspace will be assigned. Request that this workspace be removed. There is no guarantee the workspace will be actually removed. wayland-protocols-0.32.6/protocols/staging/fifo/README000064400000000000000000000001221046102023000206530ustar 00000000000000Fifo Protocol Maintainers: Derek Foreman (@derekf) wayland-protocols-0.32.6/protocols/staging/fifo/fifo-v1.xml000064400000000000000000000141741046102023000220000ustar 00000000000000 Copyright © 2023 Valve 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. When a Wayland compositor considers applying a content update, it must ensure all the update's readiness constraints (fences, etc) are met. This protocol provides a way to use the completion of a display refresh cycle as an additional readiness constraint. 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. These fatal protocol errors may be emitted in response to illegal requests. Informs the server that the client will no longer be using this protocol object. Existing objects created by this object are not affected. Establish a fifo object for a surface that may be used to add display refresh constraints to content updates. Only one such object may exist for a surface and attempting to create more than one will result in an already_exists protocol error. If a surface is acted on by multiple software components, general best practice is that only the component performing wl_surface.attach operations should use this protocol. A fifo object for a surface that may be used to add display refresh constraints to content updates. These fatal protocol errors may be emitted in response to illegal requests. When the content update containing the "set_barrier" is applied, it sets a "fifo_barrier" condition on the surface associated with the fifo object. The condition is cleared immediately after the following latching deadline for non-tearing presentation. The compositor may clear the condition early if it must do so to ensure client forward progress assumptions. To wait for this condition to clear, use the "wait_barrier" request. "set_barrier" is double-buffered state, see wl_surface.commit. Requesting set_barrier after the fifo object's surface is destroyed will generate a "surface_destroyed" error. Indicate that this content update is not ready while a "fifo_barrier" condition is present on the surface. This means that when the content update containing "set_barrier" was made active at a latching deadline, it will be active for at least one refresh cycle. A content update which is allowed to tear might become active after a latching deadline if no content update became active at the deadline. The constraint must be ignored if the surface is a subsurface in synchronized mode. If the surface is not being updated by the compositor (off-screen, occluded) the compositor may ignore the constraint. Clients must use an additional mechanism such as frame callbacks or timestamps to ensure throttling occurs under all conditions. "wait_barrier" is double-buffered state, see wl_surface.commit. Requesting "wait_barrier" after the fifo object's surface is destroyed will generate a "surface_destroyed" error. Informs the server that the client will no longer be using this protocol object. Surface state changes previously made by this protocol are unaffected by this object's destruction. wayland-protocols-0.32.6/protocols/staging/fractional-scale/README000064400000000000000000000001271046102023000231440ustar 00000000000000wp fractional scale protocol Maintainers: Kenny Levinsen (@kennylevinsen) wayland-protocols-0.32.6/protocols/staging/fractional-scale/fractional-scale-v1.xml000064400000000000000000000110341046102023000265400ustar 00000000000000 Copyright © 2022 Kenny Levinsen 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 a compositor to suggest for surfaces to render at fractional scales. A client can submit scaled content by utilizing wp_viewport. This is done by creating a wp_viewport object for the surface and setting the destination rectangle to the surface size before the scale factor is applied. The buffer size is calculated by multiplying the surface size by the intended scale. The wl_surface buffer scale should remain set to 1. If a surface has a surface-local size of 100 px by 50 px and wishes to submit buffers with a scale of 1.5, then a buffer of 150px by 75 px should be used and the wp_viewport destination rectangle should be 100 px by 50 px. For toplevel surfaces, the size is rounded halfway away from zero. The rounding algorithm for subsurface position and size is not defined. A global interface for requesting surfaces to use fractional scales. Informs the server that the client will not be using this protocol object anymore. This does not affect any other objects, wp_fractional_scale_v1 objects included. Create an add-on object for the the wl_surface to let the compositor request fractional scales. If the given wl_surface already has a wp_fractional_scale_v1 object associated, the fractional_scale_exists protocol error is raised. An additional interface to a wl_surface object which allows the compositor to inform the client of the preferred scale. Destroy the fractional scale object. When this object is destroyed, preferred_scale events will no longer be sent. Notification of a new preferred scale for this surface that the compositor suggests that the client should use. The sent scale is the numerator of a fraction with a denominator of 120. wayland-protocols-0.32.6/protocols/staging/linux-drm-syncobj/README000064400000000000000000000001251046102023000233170ustar 00000000000000Linux DRM syncobj protocol Maintainers: Simon Ser (@emersion) wayland-protocols-0.32.6/protocols/staging/linux-drm-syncobj/linux-drm-syncobj-v1.xml000064400000000000000000000305571046102023000271050ustar 00000000000000 Copyright 2016 The Chromium Authors. Copyright 2017 Intel Corporation Copyright 2018 Collabora, Ltd Copyright 2021 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 protocol allows clients to request explicit synchronization for buffers. It is tied to the Linux DRM synchronization object framework. 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. With 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, with explicit synchronization, DRM synchronization object timeline points mark when the asynchronous operations are complete. When submitting a buffer, the client provides a timeline point which will be waited on before the compositor accesses the buffer, and another timeline point that the compositor will signal when it no longer needs to access the buffer contents for the purposes of the surface commit. Linux DRM synchronization objects are documented at: https://dri.freedesktop.org/docs/drm/gpu/drm-mm.html#drm-sync-objects Warning! The protocol described in this file is currently in the testing phase. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes can only be done by creating a new major version of the extension. This global is a factory interface, allowing clients to request explicit synchronization for buffers on a per-surface basis. See wp_linux_drm_syncobj_surface_v1 for more information. Destroy this explicit synchronization factory object. Other objects 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 surface_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 surface_exists protocol error. Import a DRM synchronization object timeline. If the FD cannot be imported, the invalid_timeline error is raised. This object represents an explicit synchronization object timeline imported by the client to the compositor. Destroy the synchronization object timeline. Other objects are not affected by this request, in particular timeline points set by set_acquire_point and set_release_point are not unset. This object is an add-on interface for wl_surface to enable explicit synchronization. Each surface can be associated with only one object of this interface at any time. Explicit synchronization is guaranteed to be supported for buffers created with any version of the linux-dmabuf protocol. Compositors are free to support explicit synchronization for additional buffer types. If at surface commit time the attached buffer does not support explicit synchronization, an unsupported_buffer error is raised. As long as the wp_linux_drm_syncobj_surface_v1 object is alive, the compositor may ignore implicit synchronization for buffers attached and committed to the wl_surface. The delivery of wl_buffer.release events for buffers attached to the surface becomes undefined. Clients must set both acquire and release points if and only if a non-null buffer is attached in the same surface commit. See the no_buffer, no_acquire_point and no_release_point protocol errors. If at surface commit time the acquire and release DRM syncobj timelines are identical, the acquire point value must be strictly less than the release point value, or else the conflicting_points protocol error is raised. Destroy this surface synchronization object. Any timeline point set by this object with set_acquire_point or set_release_point since the last commit may be discarded by the compositor. Any timeline point set by this object before the last commit will not be affected. Set the timeline point that must be signalled before the compositor may sample from the buffer attached with wl_surface.attach. The 64-bit unsigned value combined from point_hi and point_lo is the point value. The acquire point 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 an acquire point has already been attached during the same commit cycle, the new point replaces the old one. If the associated wl_surface was destroyed, a no_surface error is raised. If at surface commit time there is a pending acquire timeline point set but no pending buffer attached, a no_buffer error is raised. If at surface commit time there is a pending buffer attached but no pending acquire timeline point set, the no_acquire_point protocol error is raised. Set the timeline point that must be signalled by the compositor when it has finished its usage of the buffer attached with wl_surface.attach for the relevant commit. Once the timeline point is signaled, and assuming the associated buffer is not pending release from other wl_surface.commit requests, no additional explicit or implicit synchronization with the compositor is required to safely re-use the buffer. Note that clients cannot rely on the release point being always signaled after the acquire point: compositors may release buffers without ever reading from them. In addition, the compositor may use different presentation paths for different commits, which may have different release behavior. As a result, the compositor may signal the release points in a different order than the client committed them. Because signaling a timeline point also signals every previous point, it is generally not safe to use the same timeline object for the release points of multiple buffers. The out-of-order signaling described above may lead to a release point being signaled before the compositor has finished reading. To avoid this, it is strongly recommended that each buffer should use a separate timeline for its release points. The 64-bit unsigned value combined from point_hi and point_lo is the point value. The release point 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 a release point has already been attached during the same commit cycle, the new point replaces the old one. If the associated wl_surface was destroyed, a no_surface error is raised. If at surface commit time there is a pending release timeline point set but no pending buffer attached, a no_buffer error is raised. If at surface commit time there is a pending buffer attached but no pending release timeline point set, the no_release_point protocol error is raised. wayland-protocols-0.32.6/protocols/staging/security-context/README000064400000000000000000000001241046102023000232630ustar 00000000000000security_context protocol Maintainers: Simon Ser (@emersion) wayland-protocols-0.32.6/protocols/staging/security-context/engines.md000064400000000000000000000011541046102023000243610ustar 00000000000000# security-context-v1 engines This document describes how some specific engine implementations populate the metadata in security-context-v1 and provide further metadata with out of band mechanisms. ## [Flatpak] * `sandbox_engine` is always set to `org.flatpak`. * `app_id` is the Flatpak application ID (in reverse-DNS style). It is always set. * `instance_id` is the Flatpak instance ID of the running sandbox. It is always set. More metadata is stored in `$XDG_RUNTIME_DIR/.flatpak/$instance_id/info`. This file will be readable when `wp_security_context_v1.commit` is called. [Flatpak]: https://flatpak.org/ wayland-protocols-0.32.6/protocols/staging/security-context/security-context-v1.xml000064400000000000000000000176351046102023000270210ustar 00000000000000 Copyright © 2021 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 client to register a new Wayland connection to the compositor and attach a security context to it. This is intended to be used by sandboxes. Sandbox engines attach a security context to all connections coming from inside the sandbox. The compositor can then restrict the features that the sandboxed connections can use. Compositors should forbid nesting multiple security contexts by not exposing wp_security_context_manager_v1 global to clients with a security context attached, or by sending the nested protocol error. Nested security contexts are dangerous because they can potentially allow privilege escalation of a sandboxed client. 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. Destroy the manager. This doesn't destroy objects created with the manager. Creates a new security context with a socket listening FD. The compositor will accept new client connections on listen_fd. listen_fd must be ready to accept new connections when this request is sent by the client. In other words, the client must call bind(2) and listen(2) before sending the FD. close_fd is a FD that will signal hangup when the compositor should stop accepting new connections on listen_fd. The compositor must continue to accept connections on listen_fd when the Wayland client which created the security context disconnects. After sending this request, closing listen_fd and close_fd remains the only valid operation on them. The security context allows a client to register a new client and attach security context metadata to the connections. When both are set, the combination of the application ID and the sandbox engine must uniquely identify an application. The same application ID will be used across instances (e.g. if the application is restarted, or if the application is started multiple times). When both are set, the combination of the instance ID and the sandbox engine must uniquely identify a running instance of an application. Destroy the security context object. Attach a unique sandbox engine name to the security context. The name should follow the reverse-DNS style (e.g. "org.flatpak"). A list of well-known engines is maintained at: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/security-context/engines.md It is a protocol error to call this request twice. The already_set error is sent in this case. Attach an application ID to the security context. The application ID is an opaque, sandbox-specific identifier for an application. See the well-known engines document for more details: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/security-context/engines.md The compositor may use the application ID to group clients belonging to the same security context application. Whether this request is optional or not depends on the sandbox engine used. It is a protocol error to call this request twice. The already_set error is sent in this case. Attach an instance ID to the security context. The instance ID is an opaque, sandbox-specific identifier for a running instance of an application. See the well-known engines document for more details: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/security-context/engines.md Whether this request is optional or not depends on the sandbox engine used. It is a protocol error to call this request twice. The already_set error is sent in this case. Atomically register the new client and attach the security context metadata. If the provided metadata is inconsistent or does not match with out of band metadata (see https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/security-context/engines.md), the invalid_metadata error may be sent eventually. It's a protocol error to send any request other than "destroy" after this request. In this case, the already_used error is sent. wayland-protocols-0.32.6/protocols/staging/single-pixel-buffer/README000064400000000000000000000001271046102023000236040ustar 00000000000000Single-pixel buffer protocol Maintainers: Simon Ser (@emersion) wayland-protocols-0.32.6/protocols/staging/single-pixel-buffer/single-pixel-buffer-v1.xml000064400000000000000000000061731046102023000276500ustar 00000000000000 Copyright © 2022 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 protocol extension allows clients to create single-pixel buffers. Compositors supporting this protocol extension should also support the viewporter protocol extension. Clients may use viewporter to scale a single-pixel buffer to a desired size. 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. The wp_single_pixel_buffer_manager_v1 interface is a factory for single-pixel buffers. Destroy the wp_single_pixel_buffer_manager_v1 object. The child objects created via this interface are unaffected. Create a single-pixel buffer from four 32-bit RGBA values. Unless specified in another protocol extension, the RGBA values use pre-multiplied alpha. The width and height of the buffer are 1. wayland-protocols-0.32.6/protocols/staging/tearing-control/README000064400000000000000000000001261046102023000230430ustar 00000000000000Tearing control protocol Maintainers: Xaver Hugl (@Zamundaaa) wayland-protocols-0.32.6/protocols/staging/tearing-control/tearing-control-v1.xml000064400000000000000000000130271046102023000263440ustar 00000000000000 Copyright © 2021 Xaver Hugl 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. For some use cases like games or drawing tablets it can make sense to reduce latency by accepting tearing with the use of asynchronous page flips. This global is a factory interface, allowing clients to inform which type of presentation the content of their surfaces is suitable for. 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 tearing_control_exists protocol error. 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. Destroy this tearing control factory object. Other objects, including wp_tearing_control_v1 objects created by this factory, are not affected by this request. Instantiate an interface extension for the given wl_surface to request asynchronous page flips for presentation. If the given wl_surface already has a wp_tearing_control_v1 object associated, the tearing_control_exists protocol error is raised. An additional interface to a wl_surface object, which allows the client to hint to the compositor if the content on the surface is suitable for presentation with tearing. The default presentation hint is vsync. See presentation_hint for more details. If the associated wl_surface is destroyed, this object becomes inert and should be destroyed. This enum provides information for if submitted frames from the client may be presented with tearing. The content of this surface is meant to be synchronized to the vertical blanking period. This should not result in visible tearing and may result in a delay before a surface commit is presented. The content of this surface is meant to be presented with minimal latency and tearing is acceptable. Set the presentation hint for the associated wl_surface. This state is double-buffered, see wl_surface.commit. The compositor is free to dynamically respect or ignore this hint based on various conditions like hardware capabilities, surface state and user preferences. Destroy this surface tearing object and revert the presentation hint to vsync. The change will be applied on the next wl_surface.commit. wayland-protocols-0.32.6/protocols/staging/xdg-activation/README000064400000000000000000000001241046102023000226530ustar 00000000000000XDG Activation protocol Maintainers: Aleix Pol Gonzalez (@apol) wayland-protocols-0.32.6/protocols/staging/xdg-activation/x11-interoperation.rst000064400000000000000000000051671046102023000262120ustar 00000000000000Interoperation with X11 ======================= *This document is non-normative.* The former `X11 Startup notification protocol `_ 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 requests surface activation with 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. 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.32.6/protocols/staging/xdg-activation/xdg-activation-v1.xml000064400000000000000000000214701046102023000257710ustar 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 forwarded to the client, which is supposed to activate one of its surfaces, through a separate band of communication. One established way of doing this is through the XDG_ACTIVATION_TOKEN environment variable of a newly launched child process. The child process should unset the environment variable again right after reading it out in order to avoid propagating it to other child processes. Another established way exists for Applications implementing the D-Bus interface org.freedesktop.Application, which should get their token under activation-token on their platform_data. In general activation tokens may be transferred across clients through means not described in this protocol. 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 activation 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. The serial can come from an input or focus event. For instance, if a click triggers the launch of a third-party client, the launcher client should send a set_serial request with the serial and seat from the wl_pointer.button event. Some compositors might refuse to activate toplevels when the token doesn't have a valid and recent enough event serial. 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. This request sets the surface requesting the activation. Note, this is different from the surface that will be activated. Some compositors might refuse to activate toplevels when the token doesn't have a requesting surface. Must be sent 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. Notify the compositor that the xdg_activation_token_v1 object will no longer be used. The received token stays valid. wayland-protocols-0.32.6/protocols/staging/xdg-dialog/README000064400000000000000000000001661046102023000217570ustar 00000000000000Dialog windows Maintainers: Carlos Garnacho (@carlosg) Jonas Ådahl (@jadahl) wayland-protocols-0.32.6/protocols/staging/xdg-dialog/xdg-dialog-v1.xml000064400000000000000000000113401046102023000241600ustar 00000000000000 Copyright © 2023 Carlos Garnacho 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_dialog_v1 interface is exposed as a global object allowing to register surfaces with a xdg_toplevel role as "dialogs" relative to another toplevel. The compositor may let this relation influence how the surface is placed, displayed or interacted with. 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. Destroys the xdg_wm_dialog_v1 object. This does not affect the xdg_dialog_v1 objects generated through it. Creates a xdg_dialog_v1 object for the given toplevel. See the interface description for more details. Compositors must raise an already_used error if clients attempt to create multiple xdg_dialog_v1 objects for the same xdg_toplevel. A xdg_dialog_v1 object is an ancillary object tied to a xdg_toplevel. Its purpose is hinting the compositor that the toplevel is a "dialog" (e.g. a temporary window) relative to another toplevel (see xdg_toplevel.set_parent). If the xdg_toplevel is destroyed, the xdg_dialog_v1 becomes inert. Through this object, the client may provide additional hints about the purpose of the secondary toplevel. This interface has no effect on toplevels that are not attached to a parent toplevel. Destroys the xdg_dialog_v1 object. If this object is destroyed before the related xdg_toplevel, the compositor should unapply its effects. Hints that the dialog has "modal" behavior. Modal dialogs typically require to be fully addressed by the user (i.e. closed) before resuming interaction with the parent toplevel, and may require a distinct presentation. Clients must implement the logic to filter events in the parent toplevel on their own. Compositors may choose any policy in event delivery to the parent toplevel, from delivering all events unfiltered to using them for internal consumption. Drops the hint that this dialog has "modal" behavior. See xdg_dialog_v1.set_modal for more details. wayland-protocols-0.32.6/protocols/staging/xdg-system-bell/README000064400000000000000000000001471046102023000227570ustar 00000000000000system_bell protocol Maintainers: Jonas Ådahl Carlos Garnacho wayland-protocols-0.32.6/protocols/staging/xdg-system-bell/xdg-system-bell-v1.xml000064400000000000000000000052121046102023000261630ustar 00000000000000 Copyright © 2016, 2023 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 global interface enables clients to ring the system bell. 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. Notify that the object will no longer be used. This requests rings the system bell on behalf of a client. How ringing the bell is implemented is up to the compositor. It may be an audible sound, a visual feedback of some kind, or any other thing including nothing. The passed surface should correspond to a toplevel like surface role, or be null, meaning the client doesn't have a particular toplevel it wants to associate the bell ringing with. See the xdg-shell protocol extension for a toplevel like surface role. wayland-protocols-0.32.6/protocols/staging/xdg-toplevel-drag/README000064400000000000000000000002111046102023000232540ustar 00000000000000xdg toplevel drag protocol Maintainers: David Redondo (@davidre) Nick Yamane (@nickdiego) wayland-protocols-0.32.6/protocols/staging/xdg-toplevel-drag/xdg-toplevel-drag-v1.xml000064400000000000000000000153441046102023000270040ustar 00000000000000 Copyright 2023 David Redondo 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 enhances normal drag and drop with the ability to move a window at the same time. This allows having detachable parts of a window that when dragged out of it become a new window and can be dragged over an existing window to be reattached. A typical workflow would be when the user starts dragging on top of a detachable part of a window, the client would create a wl_data_source and a xdg_toplevel_drag_v1 object and start the drag as normal via wl_data_device.start_drag. Once the client determines that the detachable window contents should be detached from the originating window, it creates a new xdg_toplevel with these contents and issues a xdg_toplevel_drag_v1.attach request before mapping it. From now on the new window is moved by the compositor during the drag as if the client called xdg_toplevel.move. Dragging an existing window is similar. The client creates a xdg_toplevel_drag_v1 object and attaches the existing toplevel before starting the drag. Clients use the existing drag and drop mechanism to detect when a window can be docked or undocked. If the client wants to snap a window into a parent window it should delete or unmap the dragged top-level. If the contents should be detached again it attaches a new toplevel as described above. If a drag operation is cancelled without being dropped, clients should revert to the previous state, deleting any newly created windows as appropriate. When a drag operation ends as indicated by wl_data_source.dnd_drop_performed the dragged toplevel window's final position is determined as if a xdg_toplevel_move operation ended. 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. Destroy this xdg_toplevel_drag_manager_v1 object. Other objects, including xdg_toplevel_drag_v1 objects created by this factory, are not affected by this request. Create an xdg_toplevel_drag for a drag and drop operation that is going to be started with data_source. This request can only be made on sources used in drag-and-drop, so it must be performed before wl_data_device.start_drag. Attempting to use the source other than for drag-and-drop such as in wl_data_device.set_selection will raise an invalid_source error. Destroying data_source while a toplevel is attached to the xdg_toplevel_drag is undefined. Destroy this xdg_toplevel_drag_v1 object. This request must only be called after the underlying wl_data_source drag has ended, as indicated by the dnd_drop_performed or cancelled events. In any other case an ongoing_drag error is raised. Request that the window will be moved with the cursor during the drag operation. The offset is a hint to the compositor how the toplevel should be positioned relative to the cursor hotspot in surface local coordinates and relative to the geometry of the toplevel being attached. See xdg_surface.set_window_geometry. For example it might only be used when an unmapped window is attached. The attached window does not participate in the selection of the drag target. If the toplevel is unmapped while it is attached, it is automatically detached from the drag. In this case this request has to be called again if the window should be attached after it is remapped. This request can be called multiple times but issuing it while a toplevel with an active role is attached raises a toplevel_attached error. wayland-protocols-0.32.6/protocols/staging/xdg-toplevel-icon/README000064400000000000000000000001301046102023000232670ustar 00000000000000xdg_toplevel_icon protocol Maintainers: Matthias Klumpp (@mak) wayland-protocols-0.32.6/protocols/staging/xdg-toplevel-icon/xdg-toplevel-icon-v1.xml000064400000000000000000000225371046102023000270340ustar 00000000000000 Copyright © 2023-2024 Matthias Klumpp Copyright © 2024 David Edmundson 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 set icons for their toplevel surfaces either via the XDG icon stock (using an icon name), or from pixel data. A toplevel icon represents the individual toplevel (unlike the application or launcher icon, which represents the application as a whole), and may be shown in window switchers, window overviews and taskbars that list individual windows. This document adheres to RFC 2119 when using words like "must", "should", "may", etc. Warning! The protocol described in this file is currently in the testing phase. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes can only be done by creating a new major version of the extension. This interface allows clients to create toplevel window icons and set them on toplevel windows to be displayed to the user. Destroy the toplevel icon manager. This does not destroy objects created with the manager. Creates a new icon object. This icon can then be attached to a xdg_toplevel via the 'set_icon' request. This request assigns the icon 'icon' to 'toplevel', or clears the toplevel icon if 'icon' was null. This state is double-buffered and is applied on the next wl_surface.commit of the toplevel. After making this call, the xdg_toplevel_icon_v1 provided as 'icon' can be destroyed by the client without 'toplevel' losing its icon. The xdg_toplevel_icon_v1 is immutable from this point, and any future attempts to change it must raise the 'xdg_toplevel_icon_v1.immutable' protocol error. The compositor must set the toplevel icon from either the pixel data the icon provides, or by loading a stock icon using the icon name. See the description of 'xdg_toplevel_icon_v1' for details. If 'icon' is set to null, the icon of the respective toplevel is reset to its default icon (usually the icon of the application, derived from its desktop-entry file, or a placeholder icon). If this request is passed an icon with no pixel buffers or icon name assigned, the icon must be reset just like if 'icon' was null. This event indicates an icon size the compositor prefers to be available if the client has scalable icons and can render to any size. When the 'xdg_toplevel_icon_manager_v1' object is created, the compositor may send one or more 'icon_size' events to describe the list of preferred icon sizes. If the compositor has no size preference, it may not send any 'icon_size' event, and it is up to the client to decide a suitable icon size. A sequence of 'icon_size' events must be finished with a 'done' event. If the compositor has no size preferences, it must still send the 'done' event, without any preceding 'icon_size' events. This event is sent after all 'icon_size' events have been sent. This interface defines a toplevel icon. An icon can have a name, and multiple buffers. In order to be applied, the icon must have either a name, or at least one buffer assigned. Applying an empty icon (with no buffer or name) to a toplevel should reset its icon to the default icon. It is up to compositor policy whether to prefer using a buffer or loading an icon via its name. See 'set_name' and 'add_buffer' for details. Destroys the 'xdg_toplevel_icon_v1' object. The icon must still remain set on every toplevel it was assigned to, until the toplevel icon is reset explicitly. This request assigns an icon name to this icon. Any previously set name is overridden. The compositor must resolve 'icon_name' according to the lookup rules described in the XDG icon theme specification[1] using the environment's current icon theme. If the compositor does not support icon names or cannot resolve 'icon_name' according to the XDG icon theme specification it must fall back to using pixel buffer data instead. If this request is made after the icon has been assigned to a toplevel via 'set_icon', a 'immutable' error must be raised. [1]: https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html This request adds pixel data supplied as wl_buffer to the icon. The client should add pixel data for all icon sizes and scales that it can provide, or which are explicitly requested by the compositor via 'icon_size' events on xdg_toplevel_icon_manager_v1. The wl_buffer supplying pixel data as 'buffer' must be backed by wl_shm and must be a square (width and height being equal). If any of these buffer requirements are not fulfilled, a 'invalid_buffer' error must be raised. If this icon instance already has a buffer of the same size and scale from a previous 'add_buffer' request, data from the last request overrides the preexisting pixel data. The wl_buffer must be kept alive for as long as the xdg_toplevel_icon it is associated with is not destroyed, otherwise a 'no_buffer' error is raised. The buffer contents must not be modified after it was assigned to the icon. As a result, the region of the wl_shm_pool's backing storage used for the wl_buffer must not be modified after this request is sent. The wl_buffer.release event is unused. If this request is made after the icon has been assigned to a toplevel via 'set_icon', a 'immutable' error must be raised. wayland-protocols-0.32.6/protocols/staging/xwayland-shell/README000064400000000000000000000001171046102023000226700ustar 00000000000000Xwayland shell protocol Maintainers: Joshua Ashton (@frog) wayland-protocols-0.32.6/protocols/staging/xwayland-shell/xwayland-shell-v1.xml000064400000000000000000000166111046102023000260200ustar 00000000000000 Copyright © 2022 Joshua Ashton 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 adds a xwayland_surface role which allows an Xwayland server to associate an X11 window to a wl_surface. Before this protocol, this would be done via the Xwayland server providing the wl_surface's resource id via the a client message with the WL_SURFACE_ID atom on the X window. This was problematic as a race could occur if the wl_surface associated with a WL_SURFACE_ID for a window was destroyed before the client message was processed by the compositor and another surface (or other object) had taken its id due to recycling. This protocol solves the problem by moving the X11 window to wl_surface association step to the Wayland side, which means that the association cannot happen out-of-sync with the resource lifetime of the wl_surface. This protocol avoids duplicating the race on the other side by adding a non-zero monotonic serial number which is entirely unique that is set on both the wl_surface (via. xwayland_surface_v1's set_serial method) and the X11 window (via. the `WL_SURFACE_SERIAL` client message) that can be used to associate them, and synchronize the two timelines. The key words "must", "must not", "required", "shall", "shall not", "should", "should not", "recommended", "may", and "optional" in this document are to be interpreted as described in IETF RFC 2119. 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. xwayland_shell_v1 is a singleton global object that provides the ability to create a xwayland_surface_v1 object for a given wl_surface. This interface is intended to be bound by the Xwayland server. A compositor must not allow clients other than Xwayland to bind to this interface. A compositor should hide this global from other clients' wl_registry. A client the compositor does not consider to be an Xwayland server attempting to bind this interface will result in an implementation-defined error. An Xwayland server that has bound this interface must not set the `WL_SURFACE_ID` atom on a window. Destroy the xwayland_shell_v1 object. The child objects created via this interface are unaffected. Create an xwayland_surface_v1 interface for a given wl_surface object and gives it the xwayland_surface role. It is illegal to create an xwayland_surface_v1 for a wl_surface which already has an assigned role and this will result in the `role` protocol error. See the documentation of xwayland_surface_v1 for more details about what an xwayland_surface_v1 is and how it is used. An Xwayland surface is a surface managed by an Xwayland server. It is used for associating surfaces to Xwayland windows. The Xwayland server associated with actions in this interface is determined by the Wayland client making the request. The client must call wl_surface.commit on the corresponding wl_surface for the xwayland_surface_v1 state to take effect. Associates an Xwayland window to a wl_surface. The association state is double-buffered, see wl_surface.commit. The `serial_lo` and `serial_hi` parameters specify a non-zero monotonic serial number which is entirely unique and provided by the Xwayland server equal to the serial value provided by a client message with a message type of the `WL_SURFACE_SERIAL` atom on the X11 window for this surface to be associated to. The serial value in the `WL_SURFACE_SERIAL` client message is specified as having the lo-bits specified in `l[0]` and the hi-bits specified in `l[1]`. If the serial value provided by `serial_lo` and `serial_hi` is not valid, the `invalid_serial` protocol error will be raised. An X11 window may be associated with multiple surfaces throughout its lifespan. (eg. unmapping and remapping a window). For each wl_surface, this state must not be committed more than once, otherwise the `already_associated` protocol error will be raised. Destroy the xwayland_surface_v1 object. Any already existing associations are unaffected by this action. wayland-protocols-0.32.6/protocols/tests/build-cxx.cc.in000064400000000000000000000003251046102023000213760ustar 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) { (void)argc; (void)argv; return 0; } wayland-protocols-0.32.6/protocols/tests/build-pedantic.c.in000064400000000000000000000002771046102023000222260ustar 00000000000000#include "@PROTOCOL_CLIENT_INCLUDE_FILE@" #include "@PROTOCOL_SERVER_INCLUDE_FILE@" /* This is a build-test only */ int main(int argc, char **argv) { (void)argc; (void)argv; return 0; } wayland-protocols-0.32.6/protocols/tests/meson.build000064400000000000000000000063111046102023000207260ustar 00000000000000prog_scan_sh = find_program('scan.sh') 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.full_path()), ] ) endforeach # Check buildability add_languages('c', 'cpp', native: false) replace = find_program('replace.py') extra_linker_flags = meson.get_compiler('c').get_supported_link_arguments([ '-Wl,--unresolved-symbols=ignore-all', ]) 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: extra_linker_flags, 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: extra_linker_flags, dependencies: libwayland, cpp_args: [ '-Wall', '-Werror', ], install: false, ) test(test_name, cxx_test_executable) endif endforeach wayland-protocols-0.32.6/protocols/tests/replace.py000075500000000000000000000006431046102023000205560ustar 00000000000000#!/usr/bin/env python3 import sys execpath, inpath, outpath, *dict_list = sys.argv dictionary = {} while dict_list: key, value, *rest = dict_list dictionary[key] = value dict_list = rest infile = open(inpath, 'r') outfile = open(outpath, 'w') buf = infile.read() infile.close() for key, value in dictionary.items(): buf = buf.replace('@{}@'.format(key), value) outfile.write(buf) outfile.close() wayland-protocols-0.32.6/protocols/tests/scan.sh000075500000000000000000000004331046102023000200460ustar 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.32.6/protocols/unstable/fullscreen-shell/README000064400000000000000000000001321046102023000233610ustar 00000000000000Fullscreen shell protocol Maintainers: Faith Ekstrand (@gfxstrand) wayland-protocols-0.32.6/protocols/unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml000064400000000000000000000277601046102023000306510ustar 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.32.6/protocols/unstable/idle-inhibit/README000064400000000000000000000001271046102023000224570ustar 00000000000000Screensaver inhibition protocol Maintainers: Bryce Harrington wayland-protocols-0.32.6/protocols/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml000064400000000000000000000076611046102023000270330ustar 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.32.6/protocols/unstable/input-method/README000064400000000000000000000001271046102023000225330ustar 00000000000000Input method protocol Maintainers: Jan Arne Petersen (@jpetersen) wayland-protocols-0.32.6/protocols/unstable/input-method/input-method-unstable-v1.xml000064400000000000000000000305211046102023000271520ustar 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.32.6/protocols/unstable/input-timestamps/README000064400000000000000000000002001046102023000234310ustar 00000000000000High-resolution timestamps for input events. Maintainers: Alexandros Frantzis (@afrantzis) wayland-protocols-0.32.6/protocols/unstable/input-timestamps/input-timestamps-unstable-v1.xml000064400000000000000000000157311046102023000307740ustar 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.32.6/protocols/unstable/keyboard-shortcuts-inhibit/README000064400000000000000000000001461046102023000253770ustar 00000000000000Compositor shortcuts inhibit protocol Maintainers: Olivier Fourdan (@ofourdan) ././@LongLink00006440000000000000000000000162000000000000007772Lustar wayland-protocols-0.32.6/protocols/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xmlwayland-protocols-0.32.6/protocols/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-un000064400000000000000000000147651046102023000323560ustar 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.32.6/protocols/unstable/linux-dmabuf/README000064400000000000000000000005201046102023000225060ustar 00000000000000Linux DMA-BUF protocol Maintainers: Pekka Paalanen (@pq) Daniel Stone (@daniels) 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. wayland-protocols-0.32.6/protocols/unstable/linux-dmabuf/feedback.rst000064400000000000000000000245501046102023000241150ustar 00000000000000.. Copyright 2021 Simon Ser .. contents:: linux-dmabuf feedback introduction ================================== linux-dmabuf feedback allows compositors and clients to negotiate optimal buffer allocation parameters. This document will assume that the compositor is using a rendering API such as OpenGL or Vulkan and KMS as the presentation API: even if linux-dmabuf feedback isn't restricted to this use-case, it's the most common. linux-dmabuf feedback introduces the following concepts: 1. A main device. This is the render device that the compositor is using to perform composition. Compositors should always be able to display a buffer submitted by a client, so this device can be used as a fallback in case none of the more optimized code-paths work. Clients should allocate buffers such that they can be imported and textured from the main device. 2. One or more tranches. Each tranche consists of a target device, allocation flags and a set of format/modifier pairs. A tranche can be seen as a set of formats/modifier pairs that are compatible with the target device. A tranche can have the ``scanout`` flag. It means that the target device is a KMS device, and that buffers allocated with one of the format/modifier pairs in the tranche are eligible for direct scanout. Clients should use the tranches in order to allocate buffers with the most appropriate format/modifier and also to avoid allocating in private device memory when cross-device operations are going to happen. linux-dmabuf feedback implementation notes ========================================== This section contains recommendations for client and compositor implementations. For clients ----------- Clients are expected to either pick a fixed DRM format beforehand, or perform the following steps repeatedly until they find a suitable format. Basic clients may only support static buffer allocation on startup. These clients should do the following: 1. Send a ``get_default_feedback`` request to get global feedback. 2. Select the device indicated by ``main_device`` for allocation. 3. For each tranche: 1. If ``tranche_target_device`` doesn't match the allocation device, ignore the tranche. 2. Accumulate allocation flags from ``tranche_flags``. 3. Accumulate format/modifier pairs received via ``tranche_formats`` in a list. 4. When the ``tranche_done`` event is received, try to allocate the buffer with the accumulated list of modifiers and allocation flags. If that fails, proceed with the next tranche. If that succeeds, stop the loop. 4. Destroy the feedback object. Tranches are ordered by preference: the more optimized tranches come first. As such, clients should use the first tranche that happens to work. Some clients may have already selected the device they want to use beforehand. These clients can ignore the ``main_device`` event, and ignore tranches whose ``tranche_target_device`` doesn't match the selected device. Such clients need to be prepared for the ``wp_linux_buffer_params.create`` request to potentially fail. If the client allocates a buffer without specifying explicit modifiers on a device different from the one indicated by ``main_device``, then the client must force a linear layout. Some clients might support re-negotiating the buffer format/modifier on the fly. These clients should send a ``get_surface_feedback`` request and keep the feedback object alive after the initial allocation. Each time a new set of feedback parameters is received (ended by the ``done`` event), they should perform the same steps as basic clients described above. They should detect when the optimal allocation parameters didn't change (same format/modifier/flags) to avoid needlessly re-allocating their buffers. Some clients might additionally support switching the device used for allocations on the fly. Such clients should send a ``get_surface_feedback`` request. For each tranche, select the device indicated by ``tranche_target_device`` for allocation. Accumulate allocation flags (received via ``tranche_flags``) and format/modifier pairs (received via ``tranche_formats``) as usual. When the ``tranche_done`` event is received, try to allocate the buffer with the accumulated list of modifiers and the allocation flags. Try to import the resulting buffer by sending a ``wp_linux_buffer_params.create`` request (this might fail). Repeat with each tranche until an allocation and import succeeds. Each time a new set of feedback parameters is received, they should perform these steps again. They should detect when the optimal allocation parameters didn't change (same device/format/modifier/flags) to avoid needlessly re-allocating their buffers. For compositors --------------- Basic compositors may only support texturing the DMA-BUFs via a rendering API such as OpenGL or Vulkan. Such compositors can send a single tranche as a reply to both ``get_default_feedback`` and ``get_surface_feedback``. Set the ``main_device`` to the rendering device. Send the tranche with ``tranche_target_device`` set to the rendering device and all of the DRM format/modifier pairs supported by the rendering API. Do not set the ``scanout`` flag in the ``tranche_flags`` event. Some compositors may support direct scan-out for full-screen surfaces. These compositors can re-send the feedback parameters when a surface becomes full-screen or leaves full-screen mode if the client has used the ``get_surface_feedback`` request. The non-full-screen feedback parameters are the same as basic compositors described above. The full-screen feedback parameters have two tranches: one with the format/modifier pairs supported by the KMS plane, with the ``scanout`` flag set in the ``tranche_flags`` event and with ``tranche_target_device`` set to the KMS scan-out device; the other with the rest of the format/modifier pairs (supported for texturing, but not for scan-out), without the ``scanout`` flag set in the ``tranche_flags`` event, and with the ``tranche_target_device`` set to the rendering device. Some compositors may support direct scan-out for all surfaces. These compositors can send two tranches for surfaces that become candidates for direct scan-out, similarly to compositors supporting direct scan-out for fullscreen surfaces. When a surface stops being a candidate for direct scan-out, compositors should re-send the feedback parameters optimized for texturing only. The way candidates for direct scan-out are selected is compositor policy, a possible implementation is to select as many surfaces as there are available hardware planes, starting from surfaces closer to the eye. Some compositors may support multiple devices at the same time. If the compositor supports rendering with a fixed device and direct scan-out on a secondary device, it may send a separate tranche for surfaces displayed on the secondary device that are candidates for direct scan-out. The ``tranche_target_device`` for this tranche will be the secondary device and will not match the ``main_device``. Some compositors may support switching their rendering device at runtime or changing their rendering device depending on the surface. When the rendering device changes for a surface, such compositors may re-send the feedback parameters with a different ``main_device``. However there is a risk that clients don't support switching their device at runtime and continue using the previous device. For this reason, compositors should always have a fallback rendering device that they initially send as ``main_device``, such that these clients use said fallback device. Compositors should not change the ``main_device`` on-the-fly when explicit modifiers are not supported, because there's a risk of importing buffers with an implicit non-linear modifier as a linear buffer, resulting in misinterpreted buffer contents. Compositors should not send feedback parameters if they don't have a fallback path. For instance, compositors shouldn't send a format/modifier supported for direct scan-out but not supported by the rendering API for texturing. Compositors can decide to use multiple tranches to describe the allocation parameters optimized for texturing. For example, if there are formats which have a fast texturing path and formats which have a slower texturing path, the compositor can decide to expose two separate tranches. Compositors can decide to use intermediate tranches to describe code-paths slower than direct scan-out but faster than texturing. For instance, a compositor could insert an intermediate tranche if it's possible to use a mem2mem device to convert buffers to be able to use scan-out. ``dev_t`` encoding ================== The protocol carries ``dev_t`` values on the wire using arrays. A compositor written in C can encode the values as follows: .. code-block:: c struct stat drm_node_stat; struct wl_array dev_array = { .size = sizeof(drm_node_stat.st_rdev), .data = &drm_node_stat.st_rdev, }; A client can decode the values as follows: .. code-block:: c dev_t dev; assert(dev_array->size == sizeof(dev)); memcpy(&dev, dev_array->data, sizeof(dev)); Because two DRM nodes can refer to the same DRM device while having different ``dev_t`` values, clients should use ``drmDevicesEqual`` to compare two devices. ``format_table`` encoding ========================= The ``format_table`` event carries a file descriptor containing a list of format + modifier pairs. The list is an array of pairs which can be accessed with this C structure definition: .. code-block:: c struct dmabuf_format_modifier { uint32_t format; uint32_t pad; /* unused */ uint64_t modifier; }; Integration with other APIs =========================== - libdrm: ``drmGetDeviceFromDevId`` returns a ``drmDevice`` from a device ID. - EGL: the `EGL_EXT_device_drm_render_node`_ extension may be used to query the DRM device render node used by a given EGL display. When unavailable, the older `EGL_EXT_device_drm`_ extension may be used as a fallback. - Vulkan: the `VK_EXT_physical_device_drm`_ extension may be used to query the DRM device used by a given ``VkPhysicalDevice``. .. _EGL_EXT_device_drm: https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_device_drm.txt .. _EGL_EXT_device_drm_render_node: https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_device_drm_render_node.txt .. _VK_EXT_physical_device_drm: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_EXT_physical_device_drm.html wayland-protocols-0.32.6/protocols/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml000064400000000000000000000701401046102023000271070ustar 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. Clients can use the get_surface_feedback request to get dmabuf feedback for a particular surface. If the client wants to retrieve feedback not tied to a surface, they can use the get_default_feedback request. 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. For all DRM formats and unless specified in another protocol extension, pre-multiplied alpha is used for pixel values. Unless specified otherwise in another protocol extension, implicit synchronization is used. In other words, compositors and clients must wait and signal fences implicitly passed via the DMA-BUF's reservation mechanism. 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. 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. Starting version 4, the format event is deprecated and must not be sent by compositors. Instead, use get_default_feedback or get_surface_feedback. 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. Starting version 4, the modifier event is deprecated and must not be sent by compositors. Instead, use get_default_feedback or get_surface_feedback. This request creates a new wp_linux_dmabuf_feedback object not bound to a particular surface. This object will deliver feedback about dmabuf parameters to use if the client doesn't support per-surface feedback (see get_surface_feedback). This request creates a new wp_linux_dmabuf_feedback object for the specified wl_surface. This object will deliver feedback about dmabuf parameters to use for buffers attached to this surface. If the surface is destroyed before the wp_linux_dmabuf_feedback object, the feedback object becomes inert. 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. Starting from version 4, the invalid_format protocol error is sent if the format + modifier pair was not advertised as supported. Starting from version 5, the invalid_format protocol error is sent if all planes don't use the same modifier. 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 zwp_linux_buffer_params_v1 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 zwp_linux_buffer_params_v1 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 platform 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. This object advertises dmabuf parameters feedback. This includes the preferred devices and the supported formats/modifiers. The parameters are sent once when this object is created and whenever they change. The done event is always sent once after all parameters have been sent. When a single parameter changes, all parameters are re-sent by the compositor. Compositors can re-send the parameters when the current client buffer allocations are sub-optimal. Compositors should not re-send the parameters if re-allocating the buffers would not result in a more optimal configuration. In particular, compositors should avoid sending the exact same parameters multiple times in a row. The tranche_target_device and tranche_formats events are grouped by tranches of preference. For each tranche, a tranche_target_device, one tranche_flags and one or more tranche_formats events are sent, followed by a tranche_done event finishing the list. The tranches are sent in descending order of preference. All formats and modifiers in the same tranche have the same preference. To send parameters, the compositor sends one main_device event, tranches (each consisting of one tranche_target_device event, one tranche_flags event, tranche_formats events and then a tranche_done event), then one done event. Using this request a client can tell the server that it is not going to use the wp_linux_dmabuf_feedback object anymore. This event is sent after all parameters of a wp_linux_dmabuf_feedback object have been sent. This allows changes to the wp_linux_dmabuf_feedback parameters to be seen as atomic, even if they happen via multiple events. This event provides a file descriptor which can be memory-mapped to access the format and modifier table. The table contains a tightly packed array of consecutive format + modifier pairs. Each pair is 16 bytes wide. It contains a format as a 32-bit unsigned integer, followed by 4 bytes of unused padding, and a modifier as a 64-bit unsigned integer. The native endianness is used. The client must map the file descriptor in read-only private mode. Compositors are not allowed to mutate the table file contents once this event has been sent. Instead, compositors must create a new, separate table file and re-send feedback parameters. Compositors are allowed to store duplicate format + modifier pairs in the table. This event advertises the main device that the server prefers to use when direct scan-out to the target device isn't possible. The advertised main device may be different for each wp_linux_dmabuf_feedback object, and may change over time. There is exactly one main device. The compositor must send at least one preference tranche with tranche_target_device equal to main_device. Clients need to create buffers that the main device can import and read from, otherwise creating the dmabuf wl_buffer will fail (see the wp_linux_buffer_params.create and create_immed requests for details). The main device will also likely be kept active by the compositor, so clients can use it instead of waking up another device for power savings. In general the device is a DRM node. The DRM node type (primary vs. render) is unspecified. Clients must not rely on the compositor sending a particular node type. Clients cannot check two devices for equality by comparing the dev_t value. If explicit modifiers are not supported and the client performs buffer allocations on a different device than the main device, then the client must force the buffer to have a linear layout. This event splits tranche_target_device and tranche_formats events in preference tranches. It is sent after a set of tranche_target_device and tranche_formats events; it represents the end of a tranche. The next tranche will have a lower preference. This event advertises the target device that the server prefers to use for a buffer created given this tranche. The advertised target device may be different for each preference tranche, and may change over time. There is exactly one target device per tranche. The target device may be a scan-out device, for example if the compositor prefers to directly scan-out a buffer created given this tranche. The target device may be a rendering device, for example if the compositor prefers to texture from said buffer. The client can use this hint to allocate the buffer in a way that makes it accessible from the target device, ideally directly. The buffer must still be accessible from the main device, either through direct import or through a potentially more expensive fallback path. If the buffer can't be directly imported from the main device then clients must be prepared for the compositor changing the tranche priority or making wl_buffer creation fail (see the wp_linux_buffer_params.create and create_immed requests for details). If the device is a DRM node, the DRM node type (primary vs. render) is unspecified. Clients must not rely on the compositor sending a particular node type. Clients cannot check two devices for equality by comparing the dev_t value. This event is tied to a preference tranche, see the tranche_done event. This event advertises the format + modifier combinations that the compositor supports. It carries an array of indices, each referring to a format + modifier pair in the last received format table (see the format_table event). Each index is a 16-bit unsigned integer in native endianness. For legacy support, DRM_FORMAT_MOD_INVALID is an allowed modifier. It indicates that the server can support the format with an implicit modifier. When a buffer 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. Compositors must not send duplicate format + modifier pairs within the same tranche or across two different tranches with the same target device and flags. This event is tied to a preference tranche, see the tranche_done event. For the definition of the format and modifier codes, see the wp_linux_buffer_params.create request. This event sets tranche-specific flags. The scanout flag is a hint that direct scan-out may be attempted by the compositor on the target device if the client appropriately allocates a buffer. How to allocate a buffer that can be scanned out on the target device is implementation-defined. This event is tied to a preference tranche, see the tranche_done event. wayland-protocols-0.32.6/protocols/unstable/linux-explicit-synchronization/README000064400000000000000000000002671046102023000263400ustar 00000000000000Linux explicit synchronization (dma-fence) protocol Maintainers: Daniel Stone (@daniels) Alexandros Frantzis (@afrantzis) ././@LongLink00006440000000000000000000000172000000000000007773Lustar wayland-protocols-0.32.6/protocols/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xmlwayland-protocols-0.32.6/protocols/unstable/linux-explicit-synchronization/linux-explicit-synchroniz000064400000000000000000000272741046102023000325740ustar 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. Note: this protocol is superseded by linux-drm-syncobj. 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.32.6/protocols/unstable/pointer-constraints/README000064400000000000000000000001251046102023000241410ustar 00000000000000Pointer constraints protocol Maintainers: Jonas Ådahl (@jadahl) wayland-protocols-0.32.6/protocols/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml000064400000000000000000000354131046102023000321770ustar 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 state, see wl_surface.commit. Set a new region used to lock the pointer. The new lock region is double-buffered, see wl_surface.commit. 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, see wl_surface.commit. 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.32.6/protocols/unstable/pointer-gestures/README000064400000000000000000000001271046102023000234350ustar 00000000000000Pointer gestures protocol Maintainers: Carlos Garnacho (@carlosg) wayland-protocols-0.32.6/protocols/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml000064400000000000000000000261211046102023000307570ustar 00000000000000 A global interface to provide semantic touchpad gestures for a given pointer. Three gestures are currently supported: swipe, pinch, and hold. Pinch and swipe gestures follow a three-stage cycle: begin, update, end. Hold gestures follow a two-stage cycle: begin and end. All gestures 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, pinch and hold objects created via this gesture object remain valid. Create a hold gesture object. See the wl_pointer_gesture_hold interface for details. 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 hold, 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 hold, 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. A hold gesture object notifies a client about a single- or multi-finger hold gesture detected on an indirect input device such as a touchpad. The gesture is usually initiated by one or more fingers being held down without significant movement. The precise conditions of when such a gesture is detected are implementation-dependent. In particular, this gesture may be used to cancel kinetic scrolling. A hold gesture consists of two stages: begin and end. Unlike pinch and swipe there is no update stage. There cannot be multiple simultaneous hold, 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 hold gesture is detected on the device. This event is sent when a hold gesture ceases to be valid. This may happen when the holding fingers are lifted or the gesture is cancelled, for example if the fingers move past an implementation-defined threshold, the finger count changes or the hold gesture changes into a different type of gesture. When a gesture is cancelled, the client may need to undo state changes caused by this gesture. What causes a gesture to be cancelled is implementation-dependent. wayland-protocols-0.32.6/protocols/unstable/primary-selection/README000064400000000000000000000001251046102023000235620ustar 00000000000000Primary selection protocol Maintainers: Simon Ser (@emersion) wayland-protocols-0.32.6/protocols/unstable/primary-selection/primary-selection-unstable-v1.xml000064400000000000000000000243451046102023000312430ustar 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.32.6/protocols/unstable/relative-pointer/README000064400000000000000000000001221046102023000234020ustar 00000000000000Relative pointer protocol Maintainers: Jonas Ådahl (@jadahl) wayland-protocols-0.32.6/protocols/unstable/relative-pointer/relative-pointer-unstable-v1.xml000064400000000000000000000146701046102023000307110ustar 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.32.6/protocols/unstable/tablet/README000064400000000000000000000001201046102023000213620ustar 00000000000000Tablet protocol Maintainers: Peter Hutterer (@whot) wayland-protocols-0.32.6/protocols/unstable/tablet/tablet-unstable-v1.xml000064400000000000000000000701641046102023000246550ustar 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.32.6/protocols/unstable/tablet/tablet-unstable-v2.xml000064400000000000000000001447521046102023000246630ustar 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. 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. 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. A descriptive name for the tablet device. If the device has no descriptive name, this event is not sent. This event is sent in the initial burst of events before the wp_tablet.done event. The USB vendor and product IDs for the tablet device. If the device has no USB vendor/product ID, this event is not sent. This can happen for virtual devices or non-USB devices, for instance. 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.32.6/protocols/unstable/text-input/README000064400000000000000000000001251046102023000222350ustar 00000000000000Text input protocol Maintainers: Jan Arne Petersen (@jpetersen) wayland-protocols-0.32.6/protocols/unstable/text-input/text-input-unstable-v1.xml000064400000000000000000000377001046102023000263700ustar 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.32.6/protocols/unstable/text-input/text-input-unstable-v3.xml000064400000000000000000000517631046102023000263770ustar 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 with evaluating and applying the changes as normal, except it should not change the current state of the zwp_text_input_v3 object. All pending state requests (set_surrounding_text, set_content_type and set_cursor_rectangle) on the zwp_text_input_v3 object should be sent and committed after receiving a zwp_text_input_v3.done event with a matching serial. 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.32.6/protocols/unstable/xdg-decoration/README000064400000000000000000000001221046102023000230200ustar 00000000000000xdg_decoration protocol Maintainers: Simon Ser (@emersion) wayland-protocols-0.32.6/protocols/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml000064400000000000000000000161631046102023000277440ustar 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. If an invalid mode is supplied by the client, the invalid_mode protocol error is raised by the compositor. 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 configures the effective 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.32.6/protocols/unstable/xdg-foreign/README000064400000000000000000000001151046102023000223240ustar 00000000000000xdg foreign protocol Maintainers: Jonas Ådahl (@jadahl) wayland-protocols-0.32.6/protocols/unstable/xdg-foreign/xdg-foreign-unstable-v1.xml000064400000000000000000000202761046102023000265500ustar 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.32.6/protocols/unstable/xdg-foreign/xdg-foreign-unstable-v2.xml000064400000000000000000000217661046102023000265560ustar 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.32.6/protocols/unstable/xdg-output/README000064400000000000000000000001241046102023000222330ustar 00000000000000xdg_output protocol Maintainers: Olivier Fourdan (@ofourdan) wayland-protocols-0.32.6/protocols/unstable/xdg-output/xdg-output-unstable-v1.xml000064400000000000000000000227351046102023000263700ustar 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. The logical_position and logical_size events defined in this protocol might provide information 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, 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. 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 monitor viewport in its compositing space will advertise a logical size of 3840×2160, - A compositor scaling the monitor viewport with scale factor 2 will advertise a logical size of 1920×1080, - A compositor scaling the monitor viewport using a fractional scale of 1.5 will advertise a logical size of 2560×1440. 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. This event is deprecated, instead clients should use wl_output.name. Compositors must still support this event. 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. This event is deprecated, instead clients should use wl_output.description. Compositors must still support this event. wayland-protocols-0.32.6/protocols/unstable/xdg-shell/README000064400000000000000000000004731046102023000220110ustar 00000000000000xdg shell protocol Maintainers: Jasper St. Pierre Disclaimer: This protocol extension has been superseded by the copy in stable/. The stable version has made backwards-incompatible changes relative to this version. This version is deprecated and only retained for backwards compatibility. wayland-protocols-0.32.6/protocols/unstable/xdg-shell/xdg-shell-unstable-v5.xml000064400000000000000000000661101046102023000257050ustar 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, see wl_surface.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 state, see wl_surface.commit. 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. Note that unrelated compositor side state changes may cause configure events to be emitted at any time, meaning trying to match this request to a specific future configure event is futile. 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. Note that unrelated compositor side state changes may cause configure events to be emitted at any time, meaning trying to match this request to a specific future configure event is futile. 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.32.6/protocols/unstable/xdg-shell/xdg-shell-unstable-v6.xml000064400000000000000000001323451046102023000257120ustar 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. If the role object still exists when this request is issued, the zxdg_shell_v6.defunct_surfaces is raised. This creates an xdg_toplevel object for the given xdg_surface and gives the associated wl_surface the xdg_toplevel role. If the surface already had a role, the zxdg_shell_v6.role error is raised. 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 the surface already had a role, the zxdg_shell_v6.role error is raised. 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 state, see wl_surface.commit. 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. If an invalid serial is used, the zxdg_shell_v6.invalid_surface_state error is raised. 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, see wl_surface.commit. The surface is maximized. The window geometry specified in the configure event must be obeyed by the client. If the window geometry is not obyed, the zxdg_shell_v6.invalid_surface_state error is raised. The surface is fullscreen. See set_fullscreen for more information. The surface is being resized. The window geometry specified in the configure event is a maximum; the client cannot resize beyond it. If the client attempts to resize above it, the zxdg_shell_v6.invalid_surface_state error is raised. 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, see wl_surface.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 the zxdg_shell_v6.invalid_surface_state error being raised. 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, see wl_surface.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 the zxdg_shell_v6.invalid_surface_state error being raised. 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. Note that unrelated compositor side state changes may cause configure events to be emitted at any time, meaning trying to match this request to a specific future configure event is futile. 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. Note that unrelated changes in the state of compositor may cause configure events to be emitted by the compositor between processing this request and emitting corresponding configure event, so trying to match the request with the event is futile. 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.32.6/protocols/unstable/xwayland-keyboard-grab/README000064400000000000000000000001441046102023000244530ustar 00000000000000Xwayland keyboard grabbing protocol Maintainers: Olivier Fourdan (@ofourdan) ././@LongLink00006440000000000000000000000152000000000000007771Lustar wayland-protocols-0.32.6/protocols/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xmlwayland-protocols-0.32.6/protocols/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v000064400000000000000000000127411046102023000321400ustar 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.32.6/protocols/wayland-protocols-uninstalled.pc.in000064400000000000000000000002161046102023000243520ustar 00000000000000pkgdatadir=@abs_top_srcdir@ Name: Wayland Protocols Description: Wayland protocol files (not installed) Version: @WAYLAND_PROTOCOLS_VERSION@ wayland-protocols-0.32.6/protocols/wayland-protocols.pc.in000064400000000000000000000003001046102023000220240ustar 00000000000000prefix=@prefix@ datarootdir=@datarootdir@ pkgdatadir=${pc_sysrootdir}${datarootdir}/@PACKAGE@ Name: Wayland Protocols Description: Wayland protocol files Version: @WAYLAND_PROTOCOLS_VERSION@ wayland-protocols-0.32.6/src/ext.rs000064400000000000000000000122231046102023000153320ustar 00000000000000//! Miscellaneous protocols #![cfg_attr(rustfmt, rustfmt_skip)] #[cfg(feature = "staging")] pub mod idle_notify { //! This protocol allows clients to monitor user idle status. #[allow(missing_docs)] pub mod v1 { wayland_protocol!( "./protocols/staging/ext-idle-notify/ext-idle-notify-v1.xml", [] ); } } #[cfg(feature = "staging")] pub mod session_lock { //! This protocol allows for a privileged Wayland client to lock the session //! and display arbitrary graphics while the session is locked. //! //! The compositor may choose to restrict this protocol to a special client //! launched by the compositor itself or expose it to all privileged clients, //! this is compositor policy. //! //! The client is responsible for performing authentication and informing the //! compositor when the session should be unlocked. If the client dies while //! the session is locked the session remains locked, possibly permanently //! depending on compositor policy. #[allow(missing_docs)] pub mod v1 { wayland_protocol!( "./protocols/staging/ext-session-lock/ext-session-lock-v1.xml", [] ); } } #[cfg(feature = "staging")] pub mod foreign_toplevel_list { //! The purpose of this protocol is to provide protocol object handles for toplevels, possibly //! originating from another client. //! //! This protocol is intentionally minimalistic and expects additional functionality (e.g. //! creating a screencopy source from a toplevel handle, getting information about the state of //! the toplevel) to be implemented in extension protocols. //! //! The compositor may choose to restrict this protocol to a special client launched by the //! compositor itself or expose it to all clients, this is compositor policy. #[allow(missing_docs)] pub mod v1 { wayland_protocol!( "./protocols/staging/ext-foreign-toplevel-list/ext-foreign-toplevel-list-v1.xml", [] ); } } #[cfg(feature = "staging")] pub mod transient_seat { //! The transient seat protocol can be used by privileged clients to create //! independent seats that will be removed from the compositor when the client //! destroys its transient seat. //! //! This protocol is intended for use with virtual input protocols such as //! "virtual_keyboard_unstable_v1" or "wlr_virtual_pointer_unstable_v1", both //! of which allow the user to select a seat. //! //! The "wl_seat" global created by this protocol does not generate input events //! on its own, or have any capabilities except those assigned to it by other //! protocol extensions, such as the ones mentioned above. //! //! For example, a remote desktop server can create a seat with virtual inputs //! for each remote user by following these steps for each new connection: //! * Create a transient seat //! * Wait for the transient seat to be created //! * Locate a "wl_seat" global with a matching name //! * Create virtual inputs using the resulting "wl_seat" global #[allow(missing_docs)] pub mod v1 { wayland_protocol!( "./protocols/staging/ext-transient-seat/ext-transient-seat-v1.xml", [] ); } } #[cfg(feature = "staging")] pub mod image_capture_source { //! This protocol serves as an intermediary between capturing protocols and //! potential image capture sources such as outputs and toplevels. //! //! This protocol may be extended to support more image capture sources in the //! future, thereby adding those image capture sources to other protocols that //! use the image capture source object without having to modify those //! protocols. #[allow(missing_docs)] pub mod v1 { wayland_protocol!( "./protocols/staging/ext-image-capture-source/ext-image-capture-source-v1.xml", [crate::ext::foreign_toplevel_list::v1, crate::xdg::shell] ); } } #[cfg(feature = "staging")] pub mod image_copy_capture { //! This protocol allows clients to ask the compositor to capture image sources //! such as outputs and toplevels into user submitted buffers. #[allow(missing_docs)] pub mod v1 { wayland_protocol!( "./protocols/staging/ext-image-copy-capture/ext-image-copy-capture-v1.xml", [crate::ext::image_capture_source::v1, crate::xdg::shell] ); } } #[cfg(feature = "staging")] pub mod data_control { //! 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. #[allow(missing_docs)] pub mod v1 { wayland_protocol!( "./protocols/staging/ext-data-control/ext-data-control-v1.xml", [] ); } } #[cfg(feature = "staging")] pub mod workspace { //! List and control workspaces #[allow(missing_docs)] pub mod v1 { wayland_protocol!( "./protocols/staging/ext-workspace/ext-workspace-v1.xml", [] ); } } wayland-protocols-0.32.6/src/lib.rs000064400000000000000000000047011046102023000153020ustar 00000000000000//! This crate provides bindings to the official wayland protocol extensions //! provided in //! //! 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`. //! //! ## Protocol categories //! //! The protocols provided in this crate are grouped in 4 main categories: //! //! - The [`wp`] module contains general purpose wayland protocols //! - The [`xdg`] module contains protocols specifically related to window management //! - The [`xwayland`] module contains protocols used by xwayland. //! - The [`ext`] module contains protocols that do not fit into the three previous categories. //! //! ## Staging protocols //! //! The cargo feature `staging` enables the generation of the staging protocols. //! //! 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 still be completely replaced in a new //! major version or with a completely different protocol. //! //! ## Unstable protocols //! //! The `wayland-protocols` project previously had a notion of "unstable protocols" representing protocols //! that are still being worked on and evolving. These protocols are recognized by the use of the prefix `z` //! in their interface names. //! //! This category has now been deprecated and is no longer supposed to be used, however several protocols //! are still under that umbrella. We can expect them to be replaced by staging and stable protocols in the //! long term, but in the meantime you can enable them with the `unstable` cargo feature. //! //! ## Other protocols //! //! Additionally, more protocol extensions are provided here: //! - [wayland-protocols-wlr](https://docs.rs/wayland-protocols-wlr) //! - [wayland-protocols-plasma](https://docs.rs/wayland-protocols-plasma) //! - [wayland-protocols-misc](https://docs.rs/wayland-protocols-misc) #![warn(missing_docs)] #![forbid(improper_ctypes, unsafe_op_in_unsafe_fn)] #![cfg_attr(docsrs, feature(doc_auto_cfg))] #[macro_use] mod protocol_macro; pub mod ext; pub mod wp; pub mod xdg; pub mod xwayland; wayland-protocols-0.32.6/src/protocol_macro.rs000064400000000000000000000033201046102023000175520ustar 00000000000000macro_rules! wayland_protocol( ($path:expr, [$($imports:path),*]) => { #[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 use wayland_client; use wayland_client::protocol::*; $(use $imports::{client::*};)* pub mod __interfaces { use wayland_client::protocol::__interfaces::*; $(use $imports::{client::__interfaces::*};)* wayland_scanner::generate_interfaces!($path); } use self::__interfaces::*; wayland_scanner::generate_client_code!($path); } #[cfg(feature = "server")] pub mod server { //! Server-side API of this protocol use wayland_server; use wayland_server::protocol::*; $(use $imports::{server::*};)* pub mod __interfaces { use wayland_server::protocol::__interfaces::*; $(use $imports::{server::__interfaces::*};)* wayland_scanner::generate_interfaces!($path); } use self::__interfaces::*; wayland_scanner::generate_server_code!($path); } } } ); wayland-protocols-0.32.6/src/wp.rs000064400000000000000000000501711046102023000151640ustar 00000000000000//! Generic wayland protocols #![cfg_attr(rustfmt, rustfmt_skip)] #[cfg(feature = "staging")] pub mod content_type { //! This protocol allows a client to describe the kind of content a surface //! will display, to allow the compositor to optimize its behavior for it. #[allow(missing_docs)] pub mod v1 { wayland_protocol!( "./protocols/staging/content-type/content-type-v1.xml", [] ); } } #[cfg(feature = "staging")] pub mod drm_lease { //! This protocol is used by Wayland compositors which act as Direct //! Renderering Manager (DRM) masters to lease DRM resources to Wayland //! clients. //! //! The compositor will advertise one wp_drm_lease_device_v1 global for each //! DRM node. Some time after a client binds to the wp_drm_lease_device_v1 //! global, the compositor will send a drm_fd event followed by zero, one or //! more connector events. After all currently available connectors have been //! sent, the compositor will send a wp_drm_lease_device_v1.done event. //! //! When the list of connectors available for lease changes the compositor //! will send wp_drm_lease_device_v1.connector events for added connectors and //! wp_drm_lease_connector_v1.withdrawn events for removed connectors, //! followed by a wp_drm_lease_device_v1.done event. //! //! The compositor will indicate when a device is gone by removing the global //! via a wl_registry.global_remove event. Upon receiving this event, the //! client should destroy any matching wp_drm_lease_device_v1 object. //! //! To destroy a wp_drm_lease_device_v1 object, the client must first issue //! a release request. Upon receiving this request, the compositor will //! immediately send a released event and destroy the object. The client must //! continue to process and discard drm_fd and connector events until it //! receives the released event. Upon receiving the released event, the //! client can safely cleanup any client-side resources. #[allow(missing_docs)] pub mod v1 { wayland_protocol!( "./protocols/staging/drm-lease/drm-lease-v1.xml", [] ); } } #[cfg(feature = "staging")] pub mod tearing_control { //! This protocol provides a way for clients to indicate whether //! or not their content is suitable for this kind of presentation. //! //! For some use cases like games or drawing tablets it can make sense to reduce //! latency by accepting tearing with the use of asynchronous page flips. #[allow(missing_docs)] pub mod v1 { wayland_protocol!( "./protocols/staging/tearing-control/tearing-control-v1.xml", [] ); } } #[cfg(feature = "staging")] pub mod fractional_scale { //! This protocol allows a compositor to suggest for surfaces to render at //! fractional scales. //! //! A client can submit scaled content by utilizing wp_viewport. This is done by //! creating a wp_viewport object for the surface and setting the destination //! rectangle to the surface size before the scale factor is applied. //! //! The buffer size is calculated by multiplying the surface size by the //! intended scale. //! //! The wl_surface buffer scale should remain set to 1. //! //! If a surface has a surface-local size of 100 px by 50 px and wishes to //! submit buffers with a scale of 1.5, then a buffer of 150px by 75 px should //! be used and the wp_viewport destination rectangle should be 100 px by 50 px. //! //! For toplevel surfaces, the size is rounded halfway away from zero. The //! rounding algorithm for subsurface position and size is not defined. #[allow(missing_docs)] pub mod v1 { wayland_protocol!( "./protocols/staging/fractional-scale/fractional-scale-v1.xml", [] ); } } #[cfg(feature = "unstable")] pub mod fullscreen_shell { //! Fullscreen shell protocol /// Unstable version 1 pub mod zv1 { wayland_protocol!( "./protocols/unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml", [] ); } } #[cfg(feature = "unstable")] pub mod idle_inhibit { //! Screensaver inhibition protocol /// Unstable version 1 pub mod zv1 { wayland_protocol!( "./protocols/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml", [] ); } } #[cfg(feature = "unstable")] pub mod input_method { //! Input method protocol /// Unstable version 1 pub mod zv1 { wayland_protocol!( "./protocols/unstable/input-method/input-method-unstable-v1.xml", [] ); } } #[cfg(feature = "unstable")] pub mod input_timestamps { //! Input timestamps protocol /// Unstable version 1 pub mod zv1 { wayland_protocol!( "./protocols/unstable/input-timestamps/input-timestamps-unstable-v1.xml", [] ); } } #[cfg(feature = "unstable")] 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. /// Unstable version 1 pub mod zv1 { wayland_protocol!( "./protocols/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml", [] ); } } pub mod linux_dmabuf { //! Linux DMA-BUF protocol /// Unstable version 1 pub mod zv1 { wayland_protocol!( "./protocols/stable/linux-dmabuf/linux-dmabuf-v1.xml", [] ); } } #[cfg(feature = "unstable")] pub mod linux_explicit_synchronization { //! Linux explicit synchronization protocol /// Unstable version 1 pub mod zv1 { wayland_protocol!( "./protocols/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml", [] ); } } #[cfg(feature = "staging")] pub mod linux_drm_syncobj { //! This protocol allows clients to request explicit synchronization for //! buffers. It is tied to the Linux DRM synchronization object framework. //! //! 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. //! //! With 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, with explicit synchronization, DRM synchronization object //! timeline points mark when the asynchronous operations are complete. When //! submitting a buffer, the client provides a timeline point which will be //! waited on before the compositor accesses the buffer, and another timeline //! point that the compositor will signal when it no longer needs to access the //! buffer contents for the purposes of the surface commit. //! //! Linux DRM synchronization objects are documented at: //! /// Version 1 pub mod v1 { wayland_protocol!( "./protocols/staging/linux-drm-syncobj/linux-drm-syncobj-v1.xml", [] ); } } #[cfg(feature = "unstable")] 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. /// Unstable version 1 pub mod zv1 { wayland_protocol!( "./protocols/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml", [] ); } } #[cfg(feature = "unstable")] pub mod pointer_gestures { //! Pointer gestures protocol /// Unstable version 1 pub mod zv1 { wayland_protocol!( "./protocols/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml", [] ); } } pub mod presentation_time { //! Presentation time protocol //! //! Allows precise feedback on presentation timing, for example for smooth video playback. wayland_protocol!( "./protocols/stable/presentation-time/presentation-time.xml", [] ); } #[cfg(feature = "unstable")] pub mod primary_selection { //! Primary selection protocol /// Unstable version 1 pub mod zv1 { wayland_protocol!( "./protocols/unstable/primary-selection/primary-selection-unstable-v1.xml", [] ); } } #[cfg(feature = "unstable")] 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. /// Unstable version 1 pub mod zv1 { wayland_protocol!( "./protocols/unstable/relative-pointer/relative-pointer-unstable-v1.xml", [] ); } } #[cfg(feature = "staging")] pub mod single_pixel_buffer { //! This protocol extension allows clients to create single-pixel buffers. //! //! Compositors supporting this protocol extension should also support the //! viewporter protocol extension. Clients may use viewporter to scale a //! single-pixel buffer to a desired size. /// Version 1 pub mod v1 { wayland_protocol!( "./protocols/staging/single-pixel-buffer/single-pixel-buffer-v1.xml", [] ); } } #[cfg(all(feature = "staging", feature = "unstable"))] pub mod cursor_shape { //! This protocol extension offers a simpler way for clients to set a cursor. /// Version 1 pub mod v1 { wayland_protocol!( "./protocols/staging/cursor-shape/cursor-shape-v1.xml", [crate::wp::tablet::zv2] ); } } 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. /// Unstable version 1 pub mod zv1 { wayland_protocol!( "./protocols/unstable/tablet/tablet-unstable-v1.xml", [] ); } /// Unstable version 2 pub mod zv2 { wayland_protocol!( "./protocols/unstable/tablet/tablet-unstable-v2.xml", [] ); } } #[cfg(feature = "unstable")] pub mod text_input { //! Text input protocol /// Unstable version 1 pub mod zv1 { wayland_protocol!( "./protocols/unstable/text-input/text-input-unstable-v1.xml", [] ); } /// Unstable version 3 pub mod zv3 { wayland_protocol!( "./protocols/unstable/text-input/text-input-unstable-v3.xml", [] ); } } 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!("./protocols/stable/viewporter/viewporter.xml", []); } #[cfg(feature = "staging")] pub mod security_context { //! This interface allows a client to register a new Wayland connection to //! the compositor and attach a security context to it. //! //! This is intended to be used by sandboxes. Sandbox engines attach a //! security context to all connections coming from inside the sandbox. The //! compositor can then restrict the features that the sandboxed connections //! can use. //! //! Compositors should forbid nesting multiple security contexts by not //! exposing wp_security_context_manager_v1 global to clients with a security //! context attached, or by sending the nested protocol error. Nested //! security contexts are dangerous because they can potentially allow //! privilege escalation of a sandboxed client. #[allow(missing_docs)] pub mod v1 { wayland_protocol!( "./protocols/staging/security-context/security-context-v1.xml", [] ); } } #[cfg(feature = "staging")] pub mod alpha_modifier { //! This interface allows a client to set a factor for the alpha values on a //! surface, which can be used to offload such operations to the compositor, //! which can in turn for example offload them to KMS. #[allow(missing_docs)] pub mod v1 { wayland_protocol!( "./protocols/staging/alpha-modifier/alpha-modifier-v1.xml", [] ); } } #[cfg(feature = "staging")] pub mod fifo { //! When a Wayland compositor considers applying a content update, //! it must ensure all the update's readiness constraints (fences, etc) //! are met. //! //! This protocol provides a way to use the completion of a display refresh //! cycle as an additional readiness constraint. #[allow(missing_docs)] pub mod v1 { wayland_protocol!( "./protocols/staging/fifo/fifo-v1.xml", [] ); } } #[cfg(feature = "staging")] pub mod commit_timing { //! When a compositor latches on to new content updates it will check for //! any number of requirements of the available content updates (such as //! fences of all buffers being signalled) to consider the update ready. //! //! This protocol provides a method for adding a time constraint to surface //! content. This constraint indicates to the compositor that a content //! update should be presented as closely as possible to, but not before, //! a specified time. //! //! This protocol does not change the Wayland property that content //! updates are applied in the order they are received, even when some //! content updates contain timestamps and others do not. //! //! To provide timestamps, this global factory interface must be used to //! acquire a `wp_commit_timing_v1` object for a surface, which may then be //! used to provide timestamp information for commits. #[allow(missing_docs)] pub mod v1 { wayland_protocol!( "./protocols/staging/commit-timing/commit-timing-v1.xml", [] ); } } wayland-protocols-0.32.6/src/xdg.rs000064400000000000000000000221051046102023000153140ustar 00000000000000//! Protocols related to window management #![cfg_attr(rustfmt, rustfmt_skip)] #[cfg(feature = "staging")] pub mod 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. #[allow(missing_docs)] pub mod v1 { wayland_protocol!( "./protocols/staging/xdg-activation/xdg-activation-v1.xml", [] ); } } #[cfg(feature = "unstable")] pub mod 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. /// Unstable version 1 pub mod zv1 { wayland_protocol!( "./protocols/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml", [crate::xdg::shell] ); } } #[cfg(feature = "unstable")] pub mod 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. /// Unstable version 1 pub mod zv1 { wayland_protocol!( "./protocols/unstable/xdg-foreign/xdg-foreign-unstable-v1.xml", [] ); } /// Unstable version 2 pub mod zv2 { wayland_protocol!( "./protocols/unstable/xdg-foreign/xdg-foreign-unstable-v2.xml", [] ); } } #[cfg(feature = "unstable")] 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. /// Unstable version 1 pub mod zv1 { wayland_protocol!( "./protocols/unstable/xdg-output/xdg-output-unstable-v1.xml", [] ); } } pub mod shell { //! XDG Shell protocol //! //! Exposes the `xdg_wm_base` global, which deprecates and replaces `wl_shell`. wayland_protocol!( "./protocols/stable/xdg-shell/xdg-shell.xml", [] ); } #[cfg(feature = "staging")] pub mod toplevel_drag { //! This protocol enhances normal drag and drop with the ability to move a //! window at the same time. This allows having detachable parts of a window //! that when dragged out of it become a new window and can be dragged over //! an existing window to be reattached. //! //! A typical workflow would be when the user starts dragging on top of a //! detachable part of a window, the client would create a `wl_data_source` and //! a `xdg_toplevel_drag_v1` object and start the drag as normal via //! `wl_data_device.start_drag`. Once the client determines that the detachable //! window contents should be detached from the originating window, it creates //! a new `xdg_toplevel` with these contents and issues a //! `xdg_toplevel_drag_v1.attach` request before mapping it. From now on the new //! window is moved by the compositor during the drag as if the client called //! `xdg_toplevel.move`. //! //! Dragging an existing window is similar. The client creates a //! `xdg_toplevel_drag_v1` object and attaches the existing toplevel before //! starting the drag. //! //! Clients use the existing drag and drop mechanism to detect when a window //! can be docked or undocked. If the client wants to snap a window into a //! parent window it should delete or unmap the dragged top-level. If the //! contents should be detached again it attaches a new toplevel as described //! above. If a drag operation is cancelled without being dropped, clients //! should revert to the previous state, deleting any newly created windows //! as appropriate. When a drag operation ends as indicated by //! `wl_data_source.dnd_drop_performed` the dragged toplevel window's final //! position is determined as if a `xdg_toplevel_move` operation ended. /// Version 1 pub mod v1 { wayland_protocol!( "./protocols/staging/xdg-toplevel-drag/xdg-toplevel-drag-v1.xml", [crate::xdg::shell] ); } } #[cfg(feature = "staging")] pub mod dialog { //! The `xdg_wm_dialog_v1` interface is exposed as a global object allowing //! to register surfaces with a xdg_toplevel role as "dialogs" relative to //! another toplevel. //! //! The compositor may let this relation influence how the surface is //! placed, displayed or interacted with. /// Version 1 pub mod v1 { wayland_protocol!( "./protocols/staging/xdg-dialog/xdg-dialog-v1.xml", [crate::xdg::shell] ); } } #[cfg(feature = "staging")] pub mod toplevel_icon { //! This protocol allows clients to set icons for their toplevel surfaces //! either via the XDG icon stock (using an icon name), or from pixel data. //! //! A toplevel icon represents the individual toplevel (unlike the application //! or launcher icon, which represents the application as a whole), and may be //! shown in window switchers, window overviews and taskbars that list //! individual windows. /// Version 1 pub mod v1 { wayland_protocol!( "./protocols/staging/xdg-toplevel-icon/xdg-toplevel-icon-v1.xml", [crate::xdg::shell] ); } } #[cfg(feature = "staging")] pub mod system_bell { //! This global interface enables clients to ring the system bell. /// Version 1 pub mod v1 { wayland_protocol!( "./protocols/staging/xdg-system-bell/xdg-system-bell-v1.xml", [] ); } } wayland-protocols-0.32.6/src/xwayland.rs000064400000000000000000000070561046102023000163710ustar 00000000000000//! XWayland related protocols #![cfg_attr(rustfmt, rustfmt_skip)] #[cfg(feature = "staging")] pub mod shell { //! This protocol adds a xwayland_surface role which allows an Xwayland //! server to associate an X11 window to a wl_surface. //! //! Before this protocol, this would be done via the Xwayland server //! providing the wl_surface's resource id via the a client message with //! the WL_SURFACE_ID atom on the X window. //! This was problematic as a race could occur if the wl_surface //! associated with a WL_SURFACE_ID for a window was destroyed before the //! client message was processed by the compositor and another surface //! (or other object) had taken its id due to recycling. //! //! This protocol solves the problem by moving the X11 window to wl_surface //! association step to the Wayland side, which means that the association //! cannot happen out-of-sync with the resource lifetime of the wl_surface. //! //! This protocol avoids duplicating the race on the other side by adding a //! non-zero monotonic serial number which is entirely unique that is set on //! both the wl_surface (via. xwayland_surface_v1's set_serial method) and //! the X11 window (via. the `WL_SURFACE_SERIAL` client message) that can be //! used to associate them, and synchronize the two timelines. //! //! The key words "must", "must not", "required", "shall", "shall not", //! "should", "should not", "recommended", "may", and "optional" in this //! document are to be interpreted as described in IETF RFC 2119. #[allow(missing_docs)] pub mod v1 { wayland_protocol!( "./protocols/staging/xwayland-shell/xwayland-shell-v1.xml", [] ); } } #[cfg(feature = "unstable")] pub mod 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. /// Unstable version 1 pub mod zv1 { wayland_protocol!( "./protocols/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml", [] ); } }