diff options
Diffstat (limited to 'chromium')
156 files changed, 65 insertions, 50715 deletions
diff --git a/chromium/DEPS b/chromium/DEPS index 32cb96404d5..9aca6cc0668 100644 --- a/chromium/DEPS +++ b/chromium/DEPS @@ -110,7 +110,7 @@ vars = { # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': '7724db6bce8e02ab82e86e93e8e8e1ec310ad03a', + 'v8_revision': '6d58d062d1375a97a9071a2d27a1cd5c22f7c414', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling swarming_client # and whatever else without interference from each other. @@ -1069,7 +1069,7 @@ deps = { Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), 'src-internal': { - 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@d588a6e25470981bac9309f18cffdad6c70cab5f', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@dcac75fe6f78eae0d965ae260cd0bba2447a1c19', 'condition': 'checkout_src_internal', }, diff --git a/chromium/build/util/LASTCHANGE b/chromium/build/util/LASTCHANGE index 5c5e9cdfd08..7738287b783 100644 --- a/chromium/build/util/LASTCHANGE +++ b/chromium/build/util/LASTCHANGE @@ -1 +1 @@ -LASTCHANGE=813bf9b1a5703461864fe56d23b6224480581ae1-refs/branch-heads/3497@{#969} +LASTCHANGE=cdec0adf58c577876de3d8f073dce520f0829431-refs/branch-heads/3497@{#988} diff --git a/chromium/buildtools/third_party/libc++/OWNERS b/chromium/buildtools/third_party/libc++/OWNERS deleted file mode 100644 index b90d1adbf3a..00000000000 --- a/chromium/buildtools/third_party/libc++/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -earthdok@chromium.org -glider@chromium.org diff --git a/chromium/buildtools/third_party/libc++/README.chromium b/chromium/buildtools/third_party/libc++/README.chromium deleted file mode 100644 index 0c6fbeeee84..00000000000 --- a/chromium/buildtools/third_party/libc++/README.chromium +++ /dev/null @@ -1,11 +0,0 @@ -Name: libcxx -Short Name: libc++ -URL: http://libcxx.llvm.org/ -Version: 1.0 -License: MIT, University of Illinois/NCSA Open Source License -License File: trunk/LICENSE.TXT -Security Critical: yes - -Description: - -libc++ for Chromium. diff --git a/chromium/buildtools/third_party/libc++abi/OWNERS b/chromium/buildtools/third_party/libc++abi/OWNERS deleted file mode 100644 index b90d1adbf3a..00000000000 --- a/chromium/buildtools/third_party/libc++abi/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -earthdok@chromium.org -glider@chromium.org diff --git a/chromium/buildtools/third_party/libc++abi/README.chromium b/chromium/buildtools/third_party/libc++abi/README.chromium deleted file mode 100644 index a57429eeaa3..00000000000 --- a/chromium/buildtools/third_party/libc++abi/README.chromium +++ /dev/null @@ -1,11 +0,0 @@ -Name: libcxxabi -Short Name: libc++abi -URL: http://libcxxabi.llvm.org/ -Version: 1.0 -License: MIT, University of Illinois/NCSA Open Source License -License File: trunk/LICENSE.TXT -Security Critical: yes - -Description: - -libc++abi for Chromium. diff --git a/chromium/buildtools/third_party/libc++abi/cxa_demangle_stub.cc b/chromium/buildtools/third_party/libc++abi/cxa_demangle_stub.cc deleted file mode 100644 index 6b5355f06c9..00000000000 --- a/chromium/buildtools/third_party/libc++abi/cxa_demangle_stub.cc +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2018 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include <stddef.h> -#include <unistd.h> - -extern "C" -// LLVM's demangler is large, and we have no need of it. Overriding it with -// our own stub version here stops a lot of code being pulled in from libc++. -// More here: -// https://llvm.org/svn/llvm-project/libcxxabi/trunk/src/cxa_demangle.cpp -#if defined(EXPORT_CXA_DEMANGLE) -__attribute__((visibility("default"))) -#endif -// This is a weak symbol to let android_crazy_linker override it in -// //base/android/linker:chromium_android_linker. -__attribute__((weak)) -char* __cxa_demangle(const char* mangled_name, - char* buf, - size_t* n, - int* status) { - static const int kMemoryAllocFailure = -1; // LLVM's memory_alloc_failure. - if (status) - *status = kMemoryAllocFailure; - return nullptr; -} diff --git a/chromium/buildtools/third_party/libunwind/OWNERS b/chromium/buildtools/third_party/libunwind/OWNERS deleted file mode 100644 index dfaca801134..00000000000 --- a/chromium/buildtools/third_party/libunwind/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -# You may only be an owner of libunwind if your username begins with 'th'. -thakis@chromium.org -thomasanderson@chromium.org diff --git a/chromium/buildtools/third_party/libunwind/README.chromium b/chromium/buildtools/third_party/libunwind/README.chromium deleted file mode 100644 index d787e87ad6b..00000000000 --- a/chromium/buildtools/third_party/libunwind/README.chromium +++ /dev/null @@ -1,11 +0,0 @@ -Name: libunwind -URL: https://llvm.org/svn/llvm-project/libunwind/trunk/ -Version: 1.0 -License: MIT, University of Illinois/NCSA Open Source License -License File: trunk/LICENSE.TXT -Security Critical: yes - -Description: - -libunwind for Chromium. -This is a dependency of libc++abi on ARM builds. diff --git a/chromium/chrome/VERSION b/chromium/chrome/VERSION index 78f5eb47de1..311a5375d04 100644 --- a/chromium/chrome/VERSION +++ b/chromium/chrome/VERSION @@ -1,4 +1,4 @@ MAJOR=69 MINOR=0 BUILD=3497 -PATCH=113 +PATCH=128 diff --git a/chromium/chrome/browser/resources/settings/internet_page/internet_subpage.js b/chromium/chrome/browser/resources/settings/internet_page/internet_subpage.js index 43de12eedea..7f61083c696 100644 --- a/chromium/chrome/browser/resources/settings/internet_page/internet_subpage.js +++ b/chromium/chrome/browser/resources/settings/internet_page/internet_subpage.js @@ -211,9 +211,9 @@ Polymer({ if (this.scanIntervalId_ != null) return; const INTERVAL_MS = 10 * 1000; - this.networkingPrivate.requestNetworkScan(); + this.networkingPrivate.requestNetworkScan(this.deviceState.Type); this.scanIntervalId_ = window.setInterval(() => { - this.networkingPrivate.requestNetworkScan(); + this.networkingPrivate.requestNetworkScan(this.deviceState.Type); }, INTERVAL_MS); }, diff --git a/chromium/device/usb/mojo/device_impl.cc b/chromium/device/usb/mojo/device_impl.cc index c460bcf9583..4de3ee0a35a 100644 --- a/chromium/device/usb/mojo/device_impl.cc +++ b/chromium/device/usb/mojo/device_impl.cc @@ -169,7 +169,8 @@ void DeviceImpl::OnOpen(base::WeakPtr<DeviceImpl> self, OpenCallback callback, scoped_refptr<UsbDeviceHandle> handle) { if (!self) { - handle->Close(); + if (handle) + handle->Close(); return; } diff --git a/chromium/device/usb/mojo/device_impl_unittest.cc b/chromium/device/usb/mojo/device_impl_unittest.cc index 7fbcedaad85..0c707a06d0a 100644 --- a/chromium/device/usb/mojo/device_impl_unittest.cc +++ b/chromium/device/usb/mojo/device_impl_unittest.cc @@ -462,6 +462,46 @@ TEST_F(USBDeviceImplTest, Open) { EXPECT_CALL(permission_provider(), DecrementConnectionCount()); } +TEST_F(USBDeviceImplTest, OpenFailure) { + MockUsbDeviceClient device_client; + UsbDevicePtr device = + GetMockDeviceProxy(device_client.CreateInterfacePtrAndBind()); + + EXPECT_CALL(mock_device(), OpenInternal(_)) + .WillOnce(Invoke([](UsbDevice::OpenCallback& callback) { + std::move(callback).Run(nullptr); + })); + EXPECT_CALL(device_client, OnDeviceOpened()).Times(0); + EXPECT_CALL(device_client, OnDeviceClosed()).Times(0); + + base::RunLoop loop; + device->Open(base::BindOnce(&ExpectOpenAndThen, + mojom::UsbOpenDeviceError::ACCESS_DENIED, + loop.QuitClosure())); + loop.Run(); +} + +TEST_F(USBDeviceImplTest, OpenDelayedFailure) { + MockUsbDeviceClient device_client; + UsbDevicePtr device = + GetMockDeviceProxy(device_client.CreateInterfacePtrAndBind()); + + UsbDevice::OpenCallback saved_callback; + EXPECT_CALL(mock_device(), OpenInternal(_)) + .WillOnce(Invoke([&saved_callback](UsbDevice::OpenCallback& callback) { + saved_callback = std::move(callback); + })); + EXPECT_CALL(device_client, OnDeviceOpened()).Times(0); + EXPECT_CALL(device_client, OnDeviceClosed()).Times(0); + + device->Open( + base::BindOnce([](mojom::UsbOpenDeviceError result) { NOTREACHED(); })); + device.reset(); + base::RunLoop().RunUntilIdle(); + + std::move(saved_callback).Run(nullptr); +} + TEST_F(USBDeviceImplTest, Close) { UsbDevicePtr device = GetMockDeviceProxy(); diff --git a/chromium/gpu/config/gpu_lists_version.h b/chromium/gpu/config/gpu_lists_version.h index 38dabeef636..58382eeaf7a 100644 --- a/chromium/gpu/config/gpu_lists_version.h +++ b/chromium/gpu/config/gpu_lists_version.h @@ -3,6 +3,6 @@ #ifndef GPU_CONFIG_GPU_LISTS_VERSION_H_ #define GPU_CONFIG_GPU_LISTS_VERSION_H_ -#define GPU_LISTS_VERSION "813bf9b1a5703461864fe56d23b6224480581ae1" +#define GPU_LISTS_VERSION "cdec0adf58c577876de3d8f073dce520f0829431" #endif // GPU_CONFIG_GPU_LISTS_VERSION_H_ diff --git a/chromium/third_party/jsr-305/README.chromium b/chromium/third_party/jsr-305/README.chromium deleted file mode 100644 index cecbc52be0d..00000000000 --- a/chromium/third_party/jsr-305/README.chromium +++ /dev/null @@ -1,16 +0,0 @@ -Name: JSR 305: Annotations for Software Defect Detection in Java -Short Name: jsr-305 -URL: https://code.google.com/p/jsr-305/ -Version: r51 -License: BSD 2-Clause License -License File: src/ri/LICENSE -Security Critical: no - -Description: -This project contains reference implementations, test cases, and other -documents under source code control for Java Specification Request 305: -Annotations for Software Defect Detection. More information at the Google -group: http://groups.google.com/group/jsr-305 - -Local Modifications: -None. diff --git a/chromium/third_party/wayland-protocols/LICENSE b/chromium/third_party/wayland-protocols/LICENSE deleted file mode 100644 index 8ab3291e385..00000000000 --- a/chromium/third_party/wayland-protocols/LICENSE +++ /dev/null @@ -1,33 +0,0 @@ -Copyright © 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 diff --git a/chromium/third_party/wayland-protocols/OWNERS b/chromium/third_party/wayland-protocols/OWNERS deleted file mode 100644 index fe51e0c4f9f..00000000000 --- a/chromium/third_party/wayland-protocols/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -reveman@chromium.org -piman@chromium.org diff --git a/chromium/third_party/wayland-protocols/README.chromium b/chromium/third_party/wayland-protocols/README.chromium deleted file mode 100644 index 410f6cec34e..00000000000 --- a/chromium/third_party/wayland-protocols/README.chromium +++ /dev/null @@ -1,73 +0,0 @@ -Name: wayland-protocols -URL: http://wayland.freedesktop.org/ -Version: 4f789286e4ab7f6fecc2ccb895d79362a9b2382a -License: MIT -License File: src/COPYING -Security Critical: yes - -Description: -wayland-protocols contains Wayland protocols that adds functionality not -available in the Wayland core protocol. Such protocols either adds -completely new functionality, or extends the functionality of some other -protocol either in Wayland core, or some other protocol in -wayland-protocols. - -To import a new snapshot of wayland-protocols: -- Checkout the latest version: git checkout 4f789286e4ab7f6fecc2ccb895d79362a9b2382a -- Change the DEPS entry to the newly checked out commit. -- Update generated files: - wayland-scanner code < src/unstable/xdg-shell/xdg-shell-unstable-v5.xml > protocol/xdg-shell-v5-protocol.c - wayland-scanner server-header < src/unstable/xdg-shell/xdg-shell-unstable-v5.xml > include/protocol/xdg-shell-unstable-v5-server-protocol.h - wayland-scanner client-header < src/unstable/xdg-shell/xdg-shell-unstable-v5.xml > include/protocol/xdg-shell-unstable-v5-client-protocol.h - wayland-scanner code < src/unstable/xdg-shell/xdg-shell-unstable-v6.xml > protocol/xdg-shell-v6-protocol.c - wayland-scanner server-header < src/unstable/xdg-shell/xdg-shell-unstable-v6.xml > include/protocol/xdg-shell-unstable-v6-server-protocol.h - wayland-scanner client-header < src/unstable/xdg-shell/xdg-shell-unstable-v6.xml > include/protocol/xdg-shell-unstable-v6-client-protocol.h - wayland-scanner code < src/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml > protocol/linux-dmabuf-protocol.c - wayland-scanner server-header < src/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml > include/protocol/linux-dmabuf-unstable-v1-server-protocol.h - wayland-scanner client-header < src/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml > include/protocol/linux-dmabuf-unstable-v1-client-protocol.h - wayland-scanner code < src/stable/viewporter/viewporter.xml > protocol/viewporter-protocol.c - wayland-scanner server-header < src/stable/viewporter/viewporter.xml > include/protocol/viewporter-server-protocol.h - wayland-scanner client-header < src/stable/viewporter/viewporter.xml > include/protocol/viewporter-client-protocol.h - wayland-scanner code < src/stable/presentation-time/presentation-time.xml > protocol/presentation-time-protocol.c - wayland-scanner server-header < src/stable/presentation-time/presentation-time.xml > include/protocol/presentation-time-server-protocol.h - wayland-scanner client-header < src/stable/presentation-time/presentation-time.xml > include/protocol/presentation-time-client-protocol.h - wayland-scanner code < unstable/secure-output/secure-output-unstable-v1.xml > protocol/secure-output-protocol.c - wayland-scanner server-header < unstable/secure-output/secure-output-unstable-v1.xml > include/protocol/secure-output-unstable-v1-server-protocol.h - wayland-scanner client-header < unstable/secure-output/secure-output-unstable-v1.xml > include/protocol/secure-output-unstable-v1-client-protocol.h - wayland-scanner code < unstable/alpha-compositing/alpha-compositing-unstable-v1.xml > protocol/alpha-compositing-protocol.c - wayland-scanner server-header < unstable/alpha-compositing/alpha-compositing-unstable-v1.xml > include/protocol/alpha-compositing-unstable-v1-server-protocol.h - wayland-scanner client-header < unstable/alpha-compositing/alpha-compositing-unstable-v1.xml > include/protocol/alpha-compositing-unstable-v1-client-protocol.h - wayland-scanner code < unstable/remote-shell/remote-shell-unstable-v1.xml > protocol/remote-shell-protocol.c - wayland-scanner server-header < unstable/remote-shell/remote-shell-unstable-v1.xml > include/protocol/remote-shell-unstable-v1-server-protocol.h - wayland-scanner client-header < unstable/remote-shell/remote-shell-unstable-v1.xml > include/protocol/remote-shell-unstable-v1-client-protocol.h - wayland-scanner code < unstable/vsync-feedback/vsync-feedback-unstable-v1.xml > protocol/vsync-feedback-protocol.c - wayland-scanner server-header < unstable/vsync-feedback/vsync-feedback-unstable-v1.xml > include/protocol/vsync-feedback-unstable-v1-server-protocol.h - wayland-scanner client-header < unstable/vsync-feedback/vsync-feedback-unstable-v1.xml > include/protocol/vsync-feedback-unstable-v1-client-protocol.h - wayland-scanner code < unstable/gaming-input/gaming-input-unstable-v1.xml > protocol/gaming-input-protocol-v1.c - wayland-scanner server-header < unstable/gaming-input/gaming-input-unstable-v1.xml > include/protocol/gaming-input-unstable-v1-server-protocol.h - wayland-scanner client-header < unstable/gaming-input/gaming-input-unstable-v1.xml > include/protocol/gaming-input-unstable-v1-client-protocol.h - wayland-scanner code < unstable/gaming-input/gaming-input-unstable-v2.xml > protocol/gaming-input-protocol-v2.c - wayland-scanner server-header < unstable/gaming-input/gaming-input-unstable-v2.xml > include/protocol/gaming-input-unstable-v2-server-protocol.h - wayland-scanner client-header < unstable/gaming-input/gaming-input-unstable-v2.xml > include/protocol/gaming-input-unstable-v2-client-protocol.h - wayland-scanner code < unstable/stylus/stylus-unstable-v2.xml > protocol/stylus-protocol-v2.c - wayland-scanner server-header < unstable/stylus/stylus-unstable-v2.xml > include/protocol/stylus-unstable-v2-server-protocol.h - wayland-scanner client-header < unstable/stylus/stylus-unstable-v2.xml > include/protocol/stylus-unstable-v2-client-protocol.h - wayland-scanner code < unstable/keyboard/keyboard-configuration-unstable-v1.xml > protocol/keyboard-configuration-protocol.c - wayland-scanner server-header < unstable/keyboard/keyboard-configuration-unstable-v1.xml > include/protocol/keyboard-configuration-unstable-v1-server-protocol.h - wayland-scanner client-header < unstable/keyboard/keyboard-configuration-unstable-v1.xml > include/protocol/keyboard-configuration-unstable-v1-client-protocol.h - wayland-scanner code < unstable/stylus-tools/stylus-tools-unstable-v1.xml > protocol/stylus-tools-protocol.c - wayland-scanner server-header < unstable/stylus-tools/stylus-tools-unstable-v1.xml > include/protocol/stylus-tools-unstable-v1-server-protocol.h - wayland-scanner client-header < unstable/stylus-tools/stylus-tools-unstable-v1.xml > include/protocol/stylus-tools-unstable-v1-client-protocol.h - wayland-scanner code < unstable/keyboard/keyboard-extension-unstable-v1.xml > protocol/keyboard-extension-protocol.c - wayland-scanner server-header < unstable/keyboard/keyboard-extension-unstable-v1.xml > include/protocol/keyboard-extension-unstable-v1-server-protocol.h - wayland-scanner client-header < unstable/keyboard/keyboard-extension-unstable-v1.xml > include/protocol/keyboard-extension-unstable-v1-client-protocol.h - wayland-scanner code < unstable/cursor-shapes/cursor-shapes-unstable-v1.xml > protocol/cursor-shapes-protocol.c - wayland-scanner server-header < unstable/cursor-shapes/cursor-shapes-unstable-v1.xml > include/protocol/cursor-shapes-unstable-v1-server-protocol.h - wayland-scanner client-header < unstable/cursor-shapes/cursor-shapes-unstable-v1.xml > include/protocol/cursor-shapes-unstable-v1-client-protocol.h - wayland-scanner code < src/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml > protocol/pointer-gestures-v1-protocol.c - wayland-scanner client-header < src/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml > include/protocol/pointer-gestures-unstable-v1-client-protocol.h - wayland-scanner server-header < src/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml > include/protocol/pointer-gestures-unstable-v1-server-protocol.h - wayland-scanner code < src/unstable/input-timestamps/input-timestamps-unstable-v1.xml > protocol/input-timestamps-v1-protocol.c - wayland-scanner server-header < src/unstable/input-timestamps/input-timestamps-unstable-v1.xml > include/protocol/input-timestamps-unstable-v1-server-protocol.h - wayland-scanner client-header < src/unstable/input-timestamps/input-timestamps-unstable-v1.xml > include/protocol/input-timestamps-unstable-v1-client-protocol.h -- Update this README to reflect the new version number. diff --git a/chromium/third_party/wayland-protocols/include/protocol/alpha-compositing-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/alpha-compositing-unstable-v1-client-protocol.h deleted file mode 100644 index ed191fc7615..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/alpha-compositing-unstable-v1-client-protocol.h +++ /dev/null @@ -1,308 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef ALPHA_COMPOSITING_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define ALPHA_COMPOSITING_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_alpha_compositing_unstable_v1 The alpha_compositing_unstable_v1 protocol - * Protocol for more advanced compositing and blending - * - * @section page_desc_alpha_compositing_unstable_v1 Description - * - * This protocol specifies a set of interfaces used to control the alpha - * compositing and blending of contents. - * - * 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. - * - * @section page_ifaces_alpha_compositing_unstable_v1 Interfaces - * - @subpage page_iface_zcr_alpha_compositing_v1 - alpha_compositing - * - @subpage page_iface_zcr_blending_v1 - blending interface to a wl_surface - * @section page_copyright_alpha_compositing_unstable_v1 Copyright - * <pre> - * - * Copyright 2016 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_surface; -struct zcr_alpha_compositing_v1; -struct zcr_blending_v1; - -/** - * @page page_iface_zcr_alpha_compositing_v1 zcr_alpha_compositing_v1 - * @section page_iface_zcr_alpha_compositing_v1_desc Description - * - * The global interface exposing compositing and blending capabilities is - * used to instantiate an interface extension for a wl_surface object. - * This extended interface will then allow the client to specify the - * blending equation and alpha value used for compositing the wl_surface. - * @section page_iface_zcr_alpha_compositing_v1_api API - * See @ref iface_zcr_alpha_compositing_v1. - */ -/** - * @defgroup iface_zcr_alpha_compositing_v1 The zcr_alpha_compositing_v1 interface - * - * The global interface exposing compositing and blending capabilities is - * used to instantiate an interface extension for a wl_surface object. - * This extended interface will then allow the client to specify the - * blending equation and alpha value used for compositing the wl_surface. - */ -extern const struct wl_interface zcr_alpha_compositing_v1_interface; -/** - * @page page_iface_zcr_blending_v1 zcr_blending_v1 - * @section page_iface_zcr_blending_v1_desc Description - * - * An additional interface to a wl_surface object, which allows the - * client to specify the blending equation used for compositing and - * an alpha value applied to the whole surface. - * - * If the wl_surface associated with the bledning object is destroyed, - * the blending object becomes inert. - * - * If the blending object is destroyed, the blending state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - * @section page_iface_zcr_blending_v1_api API - * See @ref iface_zcr_blending_v1. - */ -/** - * @defgroup iface_zcr_blending_v1 The zcr_blending_v1 interface - * - * An additional interface to a wl_surface object, which allows the - * client to specify the blending equation used for compositing and - * an alpha value applied to the whole surface. - * - * If the wl_surface associated with the bledning object is destroyed, - * the blending object becomes inert. - * - * If the blending object is destroyed, the blending state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - */ -extern const struct wl_interface zcr_blending_v1_interface; - -#ifndef ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM -#define ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM -enum zcr_alpha_compositing_v1_error { - /** - * the surface already has a blending object associated - */ - ZCR_ALPHA_COMPOSITING_V1_ERROR_BLENDING_EXISTS = 0, -}; -#endif /* ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM */ - -#define ZCR_ALPHA_COMPOSITING_V1_DESTROY 0 -#define ZCR_ALPHA_COMPOSITING_V1_GET_BLENDING 1 - - -/** - * @ingroup iface_zcr_alpha_compositing_v1 - */ -#define ZCR_ALPHA_COMPOSITING_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_alpha_compositing_v1 - */ -#define ZCR_ALPHA_COMPOSITING_V1_GET_BLENDING_SINCE_VERSION 1 - -/** @ingroup iface_zcr_alpha_compositing_v1 */ -static inline void -zcr_alpha_compositing_v1_set_user_data(struct zcr_alpha_compositing_v1 *zcr_alpha_compositing_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_alpha_compositing_v1, user_data); -} - -/** @ingroup iface_zcr_alpha_compositing_v1 */ -static inline void * -zcr_alpha_compositing_v1_get_user_data(struct zcr_alpha_compositing_v1 *zcr_alpha_compositing_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_alpha_compositing_v1); -} - -static inline uint32_t -zcr_alpha_compositing_v1_get_version(struct zcr_alpha_compositing_v1 *zcr_alpha_compositing_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_alpha_compositing_v1); -} - -/** - * @ingroup iface_zcr_alpha_compositing_v1 - * - * Informs the server that the client will not be using this - * protocol object anymore. This does not affect any other objects, - * blending objects included. - */ -static inline void -zcr_alpha_compositing_v1_destroy(struct zcr_alpha_compositing_v1 *zcr_alpha_compositing_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_alpha_compositing_v1, - ZCR_ALPHA_COMPOSITING_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_alpha_compositing_v1); -} - -/** - * @ingroup iface_zcr_alpha_compositing_v1 - * - * Instantiate an interface extension for the given wl_surface to - * provide surface blending. If the given wl_surface already has - * a blending object associated, the blending_exists protocol error - * is raised. - */ -static inline struct zcr_blending_v1 * -zcr_alpha_compositing_v1_get_blending(struct zcr_alpha_compositing_v1 *zcr_alpha_compositing_v1, struct wl_surface *surface) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_alpha_compositing_v1, - ZCR_ALPHA_COMPOSITING_V1_GET_BLENDING, &zcr_blending_v1_interface, NULL, surface); - - return (struct zcr_blending_v1 *) id; -} - -#ifndef ZCR_BLENDING_V1_BLENDING_EQUATION_ENUM -#define ZCR_BLENDING_V1_BLENDING_EQUATION_ENUM -/** - * @ingroup iface_zcr_blending_v1 - * different blending equations for compositing - * - * Blending equations that can be used when compositing a surface. - */ -enum zcr_blending_v1_blending_equation { - /** - * no blending - */ - ZCR_BLENDING_V1_BLENDING_EQUATION_NONE = 0, - /** - * one / one_minus_src_alpha - */ - ZCR_BLENDING_V1_BLENDING_EQUATION_PREMULT = 1, - /** - * src_alpha / one_minus_src_alpha - */ - ZCR_BLENDING_V1_BLENDING_EQUATION_COVERAGE = 2, -}; -#endif /* ZCR_BLENDING_V1_BLENDING_EQUATION_ENUM */ - -#define ZCR_BLENDING_V1_DESTROY 0 -#define ZCR_BLENDING_V1_SET_BLENDING 1 -#define ZCR_BLENDING_V1_SET_ALPHA 2 - - -/** - * @ingroup iface_zcr_blending_v1 - */ -#define ZCR_BLENDING_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_blending_v1 - */ -#define ZCR_BLENDING_V1_SET_BLENDING_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_blending_v1 - */ -#define ZCR_BLENDING_V1_SET_ALPHA_SINCE_VERSION 1 - -/** @ingroup iface_zcr_blending_v1 */ -static inline void -zcr_blending_v1_set_user_data(struct zcr_blending_v1 *zcr_blending_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_blending_v1, user_data); -} - -/** @ingroup iface_zcr_blending_v1 */ -static inline void * -zcr_blending_v1_get_user_data(struct zcr_blending_v1 *zcr_blending_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_blending_v1); -} - -static inline uint32_t -zcr_blending_v1_get_version(struct zcr_blending_v1 *zcr_blending_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_blending_v1); -} - -/** - * @ingroup iface_zcr_blending_v1 - * - * The associated wl_surface's blending state is removed. - * The change is applied on the next wl_surface.commit. - */ -static inline void -zcr_blending_v1_destroy(struct zcr_blending_v1 *zcr_blending_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_blending_v1, - ZCR_BLENDING_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_blending_v1); -} - -/** - * @ingroup iface_zcr_blending_v1 - * - * Set the blending equation for compositing the wl_surface. - * See wp_alpha_compositing for the description. - * - * The blending equation state is double-buffered state, - * and will be applied on the next wl_surface.commit. - */ -static inline void -zcr_blending_v1_set_blending(struct zcr_blending_v1 *zcr_blending_v1, uint32_t equation) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_blending_v1, - ZCR_BLENDING_V1_SET_BLENDING, equation); -} - -/** - * @ingroup iface_zcr_blending_v1 - * - * Set the alpha value applied to the whole surface for compositing. - * See wp_alpha_compositing for the description. - * - * The alpha value state is double-buffered state, - * and will be applied on the next wl_surface.commit. - */ -static inline void -zcr_blending_v1_set_alpha(struct zcr_blending_v1 *zcr_blending_v1, wl_fixed_t value) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_blending_v1, - ZCR_BLENDING_V1_SET_ALPHA, value); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/alpha-compositing-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/alpha-compositing-unstable-v1-server-protocol.h deleted file mode 100644 index 0a3d24bf4d3..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/alpha-compositing-unstable-v1-server-protocol.h +++ /dev/null @@ -1,253 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef ALPHA_COMPOSITING_UNSTABLE_V1_SERVER_PROTOCOL_H -#define ALPHA_COMPOSITING_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_alpha_compositing_unstable_v1 The alpha_compositing_unstable_v1 protocol - * Protocol for more advanced compositing and blending - * - * @section page_desc_alpha_compositing_unstable_v1 Description - * - * This protocol specifies a set of interfaces used to control the alpha - * compositing and blending of contents. - * - * 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. - * - * @section page_ifaces_alpha_compositing_unstable_v1 Interfaces - * - @subpage page_iface_zcr_alpha_compositing_v1 - alpha_compositing - * - @subpage page_iface_zcr_blending_v1 - blending interface to a wl_surface - * @section page_copyright_alpha_compositing_unstable_v1 Copyright - * <pre> - * - * Copyright 2016 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_surface; -struct zcr_alpha_compositing_v1; -struct zcr_blending_v1; - -/** - * @page page_iface_zcr_alpha_compositing_v1 zcr_alpha_compositing_v1 - * @section page_iface_zcr_alpha_compositing_v1_desc Description - * - * The global interface exposing compositing and blending capabilities is - * used to instantiate an interface extension for a wl_surface object. - * This extended interface will then allow the client to specify the - * blending equation and alpha value used for compositing the wl_surface. - * @section page_iface_zcr_alpha_compositing_v1_api API - * See @ref iface_zcr_alpha_compositing_v1. - */ -/** - * @defgroup iface_zcr_alpha_compositing_v1 The zcr_alpha_compositing_v1 interface - * - * The global interface exposing compositing and blending capabilities is - * used to instantiate an interface extension for a wl_surface object. - * This extended interface will then allow the client to specify the - * blending equation and alpha value used for compositing the wl_surface. - */ -extern const struct wl_interface zcr_alpha_compositing_v1_interface; -/** - * @page page_iface_zcr_blending_v1 zcr_blending_v1 - * @section page_iface_zcr_blending_v1_desc Description - * - * An additional interface to a wl_surface object, which allows the - * client to specify the blending equation used for compositing and - * an alpha value applied to the whole surface. - * - * If the wl_surface associated with the bledning object is destroyed, - * the blending object becomes inert. - * - * If the blending object is destroyed, the blending state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - * @section page_iface_zcr_blending_v1_api API - * See @ref iface_zcr_blending_v1. - */ -/** - * @defgroup iface_zcr_blending_v1 The zcr_blending_v1 interface - * - * An additional interface to a wl_surface object, which allows the - * client to specify the blending equation used for compositing and - * an alpha value applied to the whole surface. - * - * If the wl_surface associated with the bledning object is destroyed, - * the blending object becomes inert. - * - * If the blending object is destroyed, the blending state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - */ -extern const struct wl_interface zcr_blending_v1_interface; - -#ifndef ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM -#define ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM -enum zcr_alpha_compositing_v1_error { - /** - * the surface already has a blending object associated - */ - ZCR_ALPHA_COMPOSITING_V1_ERROR_BLENDING_EXISTS = 0, -}; -#endif /* ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM */ - -/** - * @ingroup iface_zcr_alpha_compositing_v1 - * @struct zcr_alpha_compositing_v1_interface - */ -struct zcr_alpha_compositing_v1_interface { - /** - * unbind from the blending interface - * - * Informs the server that the client will not be using this - * protocol object anymore. This does not affect any other objects, - * blending objects included. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * extend surface interface for blending - * - * Instantiate an interface extension for the given wl_surface to - * provide surface blending. If the given wl_surface already has a - * blending object associated, the blending_exists protocol error - * is raised. - * @param id the new blending interface id - * @param surface the surface - */ - void (*get_blending)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface); -}; - - -/** - * @ingroup iface_zcr_alpha_compositing_v1 - */ -#define ZCR_ALPHA_COMPOSITING_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_alpha_compositing_v1 - */ -#define ZCR_ALPHA_COMPOSITING_V1_GET_BLENDING_SINCE_VERSION 1 - -#ifndef ZCR_BLENDING_V1_BLENDING_EQUATION_ENUM -#define ZCR_BLENDING_V1_BLENDING_EQUATION_ENUM -/** - * @ingroup iface_zcr_blending_v1 - * different blending equations for compositing - * - * Blending equations that can be used when compositing a surface. - */ -enum zcr_blending_v1_blending_equation { - /** - * no blending - */ - ZCR_BLENDING_V1_BLENDING_EQUATION_NONE = 0, - /** - * one / one_minus_src_alpha - */ - ZCR_BLENDING_V1_BLENDING_EQUATION_PREMULT = 1, - /** - * src_alpha / one_minus_src_alpha - */ - ZCR_BLENDING_V1_BLENDING_EQUATION_COVERAGE = 2, -}; -#endif /* ZCR_BLENDING_V1_BLENDING_EQUATION_ENUM */ - -/** - * @ingroup iface_zcr_blending_v1 - * @struct zcr_blending_v1_interface - */ -struct zcr_blending_v1_interface { - /** - * remove blending from the surface - * - * The associated wl_surface's blending state is removed. The - * change is applied on the next wl_surface.commit. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the blending equation - * - * Set the blending equation for compositing the wl_surface. See - * wp_alpha_compositing for the description. - * - * The blending equation state is double-buffered state, and will - * be applied on the next wl_surface.commit. - * @param equation the new blending equation - */ - void (*set_blending)(struct wl_client *client, - struct wl_resource *resource, - uint32_t equation); - /** - * set the alpha value - * - * Set the alpha value applied to the whole surface for - * compositing. See wp_alpha_compositing for the description. - * - * The alpha value state is double-buffered state, and will be - * applied on the next wl_surface.commit. - * @param value the new alpha value - */ - void (*set_alpha)(struct wl_client *client, - struct wl_resource *resource, - wl_fixed_t value); -}; - - -/** - * @ingroup iface_zcr_blending_v1 - */ -#define ZCR_BLENDING_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_blending_v1 - */ -#define ZCR_BLENDING_V1_SET_BLENDING_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_blending_v1 - */ -#define ZCR_BLENDING_V1_SET_ALPHA_SINCE_VERSION 1 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/cursor-shapes-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/cursor-shapes-unstable-v1-client-protocol.h deleted file mode 100644 index 4f91836bd8b..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/cursor-shapes-unstable-v1-client-protocol.h +++ /dev/null @@ -1,213 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef CURSOR_SHAPES_V1_CLIENT_PROTOCOL_H -#define CURSOR_SHAPES_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_cursor_shapes_v1 The cursor_shapes_v1 protocol - * @section page_ifaces_cursor_shapes_v1 Interfaces - * - @subpage page_iface_zcr_cursor_shapes_v1 - Allows to set the cursor shape - * @section page_copyright_cursor_shapes_v1 Copyright - * <pre> - * - * Copyright 2018 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_pointer; -struct zcr_cursor_shapes_v1; - -/** - * @page page_iface_zcr_cursor_shapes_v1 zcr_cursor_shapes_v1 - * @section page_iface_zcr_cursor_shapes_v1_desc Description - * - * Allows to set the semantic cursor shape rather than a surface for a - * pointer cursor. - * - * 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - * @section page_iface_zcr_cursor_shapes_v1_api API - * See @ref iface_zcr_cursor_shapes_v1. - */ -/** - * @defgroup iface_zcr_cursor_shapes_v1 The zcr_cursor_shapes_v1 interface - * - * Allows to set the semantic cursor shape rather than a surface for a - * pointer cursor. - * - * 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - */ -extern const struct wl_interface zcr_cursor_shapes_v1_interface; - -#ifndef ZCR_CURSOR_SHAPES_V1_ERROR_ENUM -#define ZCR_CURSOR_SHAPES_V1_ERROR_ENUM -enum zcr_cursor_shapes_v1_error { - /** - * the specified shape value is invalid - */ - ZCR_CURSOR_SHAPES_V1_ERROR_INVALID_SHAPE = 0, -}; -#endif /* ZCR_CURSOR_SHAPES_V1_ERROR_ENUM */ - -#ifndef ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ENUM -#define ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ENUM -/** - * @ingroup iface_zcr_cursor_shapes_v1 - * the type of cursor shape - */ -enum zcr_cursor_shapes_v1_cursor_shape_type { - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_POINTER = 0, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_CROSS = 1, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_HAND = 2, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_IBEAM = 3, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_WAIT = 4, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_HELP = 5, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_EAST_RESIZE = 6, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_RESIZE = 7, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_EAST_RESIZE = 8, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_WEST_RESIZE = 9, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_RESIZE = 10, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_EAST_RESIZE = 11, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_WEST_RESIZE = 12, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_WEST_RESIZE = 13, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_SOUTH_RESIZE = 14, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_EAST_WEST_RESIZE = 15, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_EAST_SOUTH_WEST_RESIZE = 16, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_WEST_SOUTH_EAST_RESIZE = 17, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_COLUMN_RESIZE = 18, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ROW_RESIZE = 19, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_MIDDLE_PANNING = 20, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_EAST_PANNING = 21, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_PANNING = 22, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_EAST_PANNING = 23, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_WEST_PANNING = 24, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_PANNING = 25, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_EAST_PANNING = 26, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_WEST_PANNING = 27, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_WEST_PANNING = 28, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_MOVE = 29, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_VERTICAL_TEXT = 30, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_CELL = 31, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_CONTEXT_MENU = 32, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ALIAS = 33, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_PROGRESS = 34, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NO_DROP = 35, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_COPY = 36, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NONE = 37, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NOT_ALLOWED = 38, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ZOOM_IN = 39, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ZOOM_OUT = 40, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_GRAB = 41, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_GRABBING = 42, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_NONE = 43, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_MOVE = 44, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_COPY = 45, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_LINK = 46, -}; -#endif /* ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ENUM */ - -#define ZCR_CURSOR_SHAPES_V1_SET_CURSOR_SHAPE 0 - - -/** - * @ingroup iface_zcr_cursor_shapes_v1 - */ -#define ZCR_CURSOR_SHAPES_V1_SET_CURSOR_SHAPE_SINCE_VERSION 1 - -/** @ingroup iface_zcr_cursor_shapes_v1 */ -static inline void -zcr_cursor_shapes_v1_set_user_data(struct zcr_cursor_shapes_v1 *zcr_cursor_shapes_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_cursor_shapes_v1, user_data); -} - -/** @ingroup iface_zcr_cursor_shapes_v1 */ -static inline void * -zcr_cursor_shapes_v1_get_user_data(struct zcr_cursor_shapes_v1 *zcr_cursor_shapes_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_cursor_shapes_v1); -} - -static inline uint32_t -zcr_cursor_shapes_v1_get_version(struct zcr_cursor_shapes_v1 *zcr_cursor_shapes_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_cursor_shapes_v1); -} - -/** @ingroup iface_zcr_cursor_shapes_v1 */ -static inline void -zcr_cursor_shapes_v1_destroy(struct zcr_cursor_shapes_v1 *zcr_cursor_shapes_v1) -{ - wl_proxy_destroy((struct wl_proxy *) zcr_cursor_shapes_v1); -} - -/** - * @ingroup iface_zcr_cursor_shapes_v1 - * - * Sets the pointer cursor to the specified shape. The server will change - * the cursor graphics based on the specified shape and its graphic assets - * and system condition. - * - * The "shape" argument needs to be one of the values in cursor_shape_type - * enum. Otherwise invalid_shape error is raised. - * - * This is similar to wl_pointer::set_cursor request, but this accepts a - * shape instead of contents in the form of a surface. - * - * The client which do not know this protocol should work as-is, so - * wl_pointer::set_cursor will change the cursor graphics even when it's - * combined with this request; and another invocation of set_cursor_shape - * will change the cursor shape again. This means the last invoked one will - * be used for the actual cursor. - */ -static inline void -zcr_cursor_shapes_v1_set_cursor_shape(struct zcr_cursor_shapes_v1 *zcr_cursor_shapes_v1, struct wl_pointer *pointer, int32_t shape) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_cursor_shapes_v1, - ZCR_CURSOR_SHAPES_V1_SET_CURSOR_SHAPE, pointer, shape); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/cursor-shapes-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/cursor-shapes-unstable-v1-server-protocol.h deleted file mode 100644 index acea5255812..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/cursor-shapes-unstable-v1-server-protocol.h +++ /dev/null @@ -1,191 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef CURSOR_SHAPES_V1_SERVER_PROTOCOL_H -#define CURSOR_SHAPES_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_cursor_shapes_v1 The cursor_shapes_v1 protocol - * @section page_ifaces_cursor_shapes_v1 Interfaces - * - @subpage page_iface_zcr_cursor_shapes_v1 - Allows to set the cursor shape - * @section page_copyright_cursor_shapes_v1 Copyright - * <pre> - * - * Copyright 2018 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_pointer; -struct zcr_cursor_shapes_v1; - -/** - * @page page_iface_zcr_cursor_shapes_v1 zcr_cursor_shapes_v1 - * @section page_iface_zcr_cursor_shapes_v1_desc Description - * - * Allows to set the semantic cursor shape rather than a surface for a - * pointer cursor. - * - * 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - * @section page_iface_zcr_cursor_shapes_v1_api API - * See @ref iface_zcr_cursor_shapes_v1. - */ -/** - * @defgroup iface_zcr_cursor_shapes_v1 The zcr_cursor_shapes_v1 interface - * - * Allows to set the semantic cursor shape rather than a surface for a - * pointer cursor. - * - * 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - */ -extern const struct wl_interface zcr_cursor_shapes_v1_interface; - -#ifndef ZCR_CURSOR_SHAPES_V1_ERROR_ENUM -#define ZCR_CURSOR_SHAPES_V1_ERROR_ENUM -enum zcr_cursor_shapes_v1_error { - /** - * the specified shape value is invalid - */ - ZCR_CURSOR_SHAPES_V1_ERROR_INVALID_SHAPE = 0, -}; -#endif /* ZCR_CURSOR_SHAPES_V1_ERROR_ENUM */ - -#ifndef ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ENUM -#define ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ENUM -/** - * @ingroup iface_zcr_cursor_shapes_v1 - * the type of cursor shape - */ -enum zcr_cursor_shapes_v1_cursor_shape_type { - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_POINTER = 0, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_CROSS = 1, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_HAND = 2, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_IBEAM = 3, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_WAIT = 4, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_HELP = 5, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_EAST_RESIZE = 6, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_RESIZE = 7, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_EAST_RESIZE = 8, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_WEST_RESIZE = 9, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_RESIZE = 10, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_EAST_RESIZE = 11, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_WEST_RESIZE = 12, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_WEST_RESIZE = 13, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_SOUTH_RESIZE = 14, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_EAST_WEST_RESIZE = 15, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_EAST_SOUTH_WEST_RESIZE = 16, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_WEST_SOUTH_EAST_RESIZE = 17, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_COLUMN_RESIZE = 18, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ROW_RESIZE = 19, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_MIDDLE_PANNING = 20, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_EAST_PANNING = 21, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_PANNING = 22, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_EAST_PANNING = 23, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_WEST_PANNING = 24, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_PANNING = 25, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_EAST_PANNING = 26, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_WEST_PANNING = 27, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_WEST_PANNING = 28, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_MOVE = 29, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_VERTICAL_TEXT = 30, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_CELL = 31, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_CONTEXT_MENU = 32, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ALIAS = 33, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_PROGRESS = 34, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NO_DROP = 35, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_COPY = 36, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NONE = 37, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NOT_ALLOWED = 38, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ZOOM_IN = 39, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ZOOM_OUT = 40, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_GRAB = 41, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_GRABBING = 42, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_NONE = 43, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_MOVE = 44, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_COPY = 45, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_LINK = 46, -}; -#endif /* ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ENUM */ - -/** - * @ingroup iface_zcr_cursor_shapes_v1 - * @struct zcr_cursor_shapes_v1_interface - */ -struct zcr_cursor_shapes_v1_interface { - /** - * set pointer cursor to the shape - * - * Sets the pointer cursor to the specified shape. The server - * will change the cursor graphics based on the specified shape and - * its graphic assets and system condition. - * - * The "shape" argument needs to be one of the values in - * cursor_shape_type enum. Otherwise invalid_shape error is raised. - * - * This is similar to wl_pointer::set_cursor request, but this - * accepts a shape instead of contents in the form of a surface. - * - * The client which do not know this protocol should work as-is, so - * wl_pointer::set_cursor will change the cursor graphics even when - * it's combined with this request; and another invocation of - * set_cursor_shape will change the cursor shape again. This means - * the last invoked one will be used for the actual cursor. - */ - void (*set_cursor_shape)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *pointer, - int32_t shape); -}; - - -/** - * @ingroup iface_zcr_cursor_shapes_v1 - */ -#define ZCR_CURSOR_SHAPES_V1_SET_CURSOR_SHAPE_SINCE_VERSION 1 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-client-protocol.h deleted file mode 100644 index 66301bd626e..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-client-protocol.h +++ /dev/null @@ -1,332 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef GAMING_INPUT_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define GAMING_INPUT_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_gaming_input_unstable_v1 The gaming_input_unstable_v1 protocol - * @section page_ifaces_gaming_input_unstable_v1 Interfaces - * - @subpage page_iface_zcr_gaming_input_v1 - extends wl_seat with gaming input devices - * - @subpage page_iface_zcr_gamepad_v1 - gamepad input device - * @section page_copyright_gaming_input_unstable_v1 Copyright - * <pre> - * - * Copyright 2016 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_seat; -struct zcr_gamepad_v1; -struct zcr_gaming_input_v1; - -/** - * @page page_iface_zcr_gaming_input_v1 zcr_gaming_input_v1 - * @section page_iface_zcr_gaming_input_v1_desc Description - * - * A global interface to provide gaming input devices for a given seat. - * - * Currently only gamepad devices are supported. - * - * 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - * @section page_iface_zcr_gaming_input_v1_api API - * See @ref iface_zcr_gaming_input_v1. - */ -/** - * @defgroup iface_zcr_gaming_input_v1 The zcr_gaming_input_v1 interface - * - * A global interface to provide gaming input devices for a given seat. - * - * Currently only gamepad devices are supported. - * - * 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - */ -extern const struct wl_interface zcr_gaming_input_v1_interface; -/** - * @page page_iface_zcr_gamepad_v1 zcr_gamepad_v1 - * @section page_iface_zcr_gamepad_v1_desc Description - * - * The zcr_gamepad_v1 interface represents one or more gamepad input devices, - * which are reported as a normalized 'Standard Gamepad' as it is specified - * by the W3C Gamepad API at: https://w3c.github.io/gamepad/#remapping - * @section page_iface_zcr_gamepad_v1_api API - * See @ref iface_zcr_gamepad_v1. - */ -/** - * @defgroup iface_zcr_gamepad_v1 The zcr_gamepad_v1 interface - * - * The zcr_gamepad_v1 interface represents one or more gamepad input devices, - * which are reported as a normalized 'Standard Gamepad' as it is specified - * by the W3C Gamepad API at: https://w3c.github.io/gamepad/#remapping - */ -extern const struct wl_interface zcr_gamepad_v1_interface; - -#define ZCR_GAMING_INPUT_V1_GET_GAMEPAD 0 - - -/** - * @ingroup iface_zcr_gaming_input_v1 - */ -#define ZCR_GAMING_INPUT_V1_GET_GAMEPAD_SINCE_VERSION 1 - -/** @ingroup iface_zcr_gaming_input_v1 */ -static inline void -zcr_gaming_input_v1_set_user_data(struct zcr_gaming_input_v1 *zcr_gaming_input_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_gaming_input_v1, user_data); -} - -/** @ingroup iface_zcr_gaming_input_v1 */ -static inline void * -zcr_gaming_input_v1_get_user_data(struct zcr_gaming_input_v1 *zcr_gaming_input_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_gaming_input_v1); -} - -static inline uint32_t -zcr_gaming_input_v1_get_version(struct zcr_gaming_input_v1 *zcr_gaming_input_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_gaming_input_v1); -} - -/** @ingroup iface_zcr_gaming_input_v1 */ -static inline void -zcr_gaming_input_v1_destroy(struct zcr_gaming_input_v1 *zcr_gaming_input_v1) -{ - wl_proxy_destroy((struct wl_proxy *) zcr_gaming_input_v1); -} - -/** - * @ingroup iface_zcr_gaming_input_v1 - * - * Create gamepad object. See zcr_gamepad_v1 interface for details. - */ -static inline struct zcr_gamepad_v1 * -zcr_gaming_input_v1_get_gamepad(struct zcr_gaming_input_v1 *zcr_gaming_input_v1, struct wl_seat *seat) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_gaming_input_v1, - ZCR_GAMING_INPUT_V1_GET_GAMEPAD, &zcr_gamepad_v1_interface, NULL, seat); - - return (struct zcr_gamepad_v1 *) id; -} - -#ifndef ZCR_GAMEPAD_V1_GAMEPAD_STATE_ENUM -#define ZCR_GAMEPAD_V1_GAMEPAD_STATE_ENUM -/** - * @ingroup iface_zcr_gamepad_v1 - * connection state - */ -enum zcr_gamepad_v1_gamepad_state { - /** - * no gamepads are connected or on. - */ - ZCR_GAMEPAD_V1_GAMEPAD_STATE_OFF = 0, - /** - * at least one gamepad is connected. - */ - ZCR_GAMEPAD_V1_GAMEPAD_STATE_ON = 1, -}; -#endif /* ZCR_GAMEPAD_V1_GAMEPAD_STATE_ENUM */ - -#ifndef ZCR_GAMEPAD_V1_BUTTON_STATE_ENUM -#define ZCR_GAMEPAD_V1_BUTTON_STATE_ENUM -/** - * @ingroup iface_zcr_gamepad_v1 - * physical button state - * - * Describes the physical state of a button that produced the button - * event. - */ -enum zcr_gamepad_v1_button_state { - /** - * the button is not pressed - */ - ZCR_GAMEPAD_V1_BUTTON_STATE_RELEASED = 0, - /** - * the button is pressed - */ - ZCR_GAMEPAD_V1_BUTTON_STATE_PRESSED = 1, -}; -#endif /* ZCR_GAMEPAD_V1_BUTTON_STATE_ENUM */ - -/** - * @ingroup iface_zcr_gamepad_v1 - * @struct zcr_gamepad_v1_listener - */ -struct zcr_gamepad_v1_listener { - /** - * state change event - * - * Notification that this seat's connection state has changed. - * @param state new state - */ - void (*state_change)(void *data, - struct zcr_gamepad_v1 *zcr_gamepad_v1, - uint32_t state); - /** - * axis change event - * - * Notification of axis change. - * - * The axis id specifies which axis has changed as defined by the - * W3C 'Standard Gamepad'. - * - * The value is calibrated and normalized to the -1 to 1 range. - * @param time timestamp with millisecond granularity - * @param axis axis that produced this event - * @param value new value of axis - */ - void (*axis)(void *data, - struct zcr_gamepad_v1 *zcr_gamepad_v1, - uint32_t time, - uint32_t axis, - wl_fixed_t value); - /** - * Gamepad button changed - * - * Notification of button change. - * - * The button id specifies which button has changed as defined by - * the W3C 'Standard Gamepad'. - * - * A button can have a digital and an analog value. The analog - * value is normalized to a 0 to 1 range. If a button does not - * provide an analog value, it will be derived from the digital - * state. - * @param time timestamp with millisecond granularity - * @param button id of button - * @param state digital state of the button - * @param analog analog value of the button - */ - void (*button)(void *data, - struct zcr_gamepad_v1 *zcr_gamepad_v1, - uint32_t time, - uint32_t button, - uint32_t state, - wl_fixed_t analog); - /** - * Notifies end of a series of gamepad changes. - * - * Indicates the end of a set of events that logically belong - * together. A client is expected to accumulate the data in all - * events within the frame before proceeding. - * @param time timestamp with millisecond granularity - */ - void (*frame)(void *data, - struct zcr_gamepad_v1 *zcr_gamepad_v1, - uint32_t time); -}; - -/** - * @ingroup iface_zcr_gamepad_v1 - */ -static inline int -zcr_gamepad_v1_add_listener(struct zcr_gamepad_v1 *zcr_gamepad_v1, - const struct zcr_gamepad_v1_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zcr_gamepad_v1, - (void (**)(void)) listener, data); -} - -#define ZCR_GAMEPAD_V1_DESTROY 0 - -/** - * @ingroup iface_zcr_gamepad_v1 - */ -#define ZCR_GAMEPAD_V1_STATE_CHANGE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v1 - */ -#define ZCR_GAMEPAD_V1_AXIS_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v1 - */ -#define ZCR_GAMEPAD_V1_BUTTON_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v1 - */ -#define ZCR_GAMEPAD_V1_FRAME_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_gamepad_v1 - */ -#define ZCR_GAMEPAD_V1_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_gamepad_v1 */ -static inline void -zcr_gamepad_v1_set_user_data(struct zcr_gamepad_v1 *zcr_gamepad_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_gamepad_v1, user_data); -} - -/** @ingroup iface_zcr_gamepad_v1 */ -static inline void * -zcr_gamepad_v1_get_user_data(struct zcr_gamepad_v1 *zcr_gamepad_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_gamepad_v1); -} - -static inline uint32_t -zcr_gamepad_v1_get_version(struct zcr_gamepad_v1 *zcr_gamepad_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_gamepad_v1); -} - -/** - * @ingroup iface_zcr_gamepad_v1 - */ -static inline void -zcr_gamepad_v1_destroy(struct zcr_gamepad_v1 *zcr_gamepad_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_gamepad_v1, - ZCR_GAMEPAD_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_gamepad_v1); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-server-protocol.h deleted file mode 100644 index 7d065e017f2..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-server-protocol.h +++ /dev/null @@ -1,266 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef GAMING_INPUT_UNSTABLE_V1_SERVER_PROTOCOL_H -#define GAMING_INPUT_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_gaming_input_unstable_v1 The gaming_input_unstable_v1 protocol - * @section page_ifaces_gaming_input_unstable_v1 Interfaces - * - @subpage page_iface_zcr_gaming_input_v1 - extends wl_seat with gaming input devices - * - @subpage page_iface_zcr_gamepad_v1 - gamepad input device - * @section page_copyright_gaming_input_unstable_v1 Copyright - * <pre> - * - * Copyright 2016 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_seat; -struct zcr_gamepad_v1; -struct zcr_gaming_input_v1; - -/** - * @page page_iface_zcr_gaming_input_v1 zcr_gaming_input_v1 - * @section page_iface_zcr_gaming_input_v1_desc Description - * - * A global interface to provide gaming input devices for a given seat. - * - * Currently only gamepad devices are supported. - * - * 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - * @section page_iface_zcr_gaming_input_v1_api API - * See @ref iface_zcr_gaming_input_v1. - */ -/** - * @defgroup iface_zcr_gaming_input_v1 The zcr_gaming_input_v1 interface - * - * A global interface to provide gaming input devices for a given seat. - * - * Currently only gamepad devices are supported. - * - * 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - */ -extern const struct wl_interface zcr_gaming_input_v1_interface; -/** - * @page page_iface_zcr_gamepad_v1 zcr_gamepad_v1 - * @section page_iface_zcr_gamepad_v1_desc Description - * - * The zcr_gamepad_v1 interface represents one or more gamepad input devices, - * which are reported as a normalized 'Standard Gamepad' as it is specified - * by the W3C Gamepad API at: https://w3c.github.io/gamepad/#remapping - * @section page_iface_zcr_gamepad_v1_api API - * See @ref iface_zcr_gamepad_v1. - */ -/** - * @defgroup iface_zcr_gamepad_v1 The zcr_gamepad_v1 interface - * - * The zcr_gamepad_v1 interface represents one or more gamepad input devices, - * which are reported as a normalized 'Standard Gamepad' as it is specified - * by the W3C Gamepad API at: https://w3c.github.io/gamepad/#remapping - */ -extern const struct wl_interface zcr_gamepad_v1_interface; - -/** - * @ingroup iface_zcr_gaming_input_v1 - * @struct zcr_gaming_input_v1_interface - */ -struct zcr_gaming_input_v1_interface { - /** - * get gamepad device assigned to seat - * - * Create gamepad object. See zcr_gamepad_v1 interface for - * details. - */ - void (*get_gamepad)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *seat); -}; - - -/** - * @ingroup iface_zcr_gaming_input_v1 - */ -#define ZCR_GAMING_INPUT_V1_GET_GAMEPAD_SINCE_VERSION 1 - -#ifndef ZCR_GAMEPAD_V1_GAMEPAD_STATE_ENUM -#define ZCR_GAMEPAD_V1_GAMEPAD_STATE_ENUM -/** - * @ingroup iface_zcr_gamepad_v1 - * connection state - */ -enum zcr_gamepad_v1_gamepad_state { - /** - * no gamepads are connected or on. - */ - ZCR_GAMEPAD_V1_GAMEPAD_STATE_OFF = 0, - /** - * at least one gamepad is connected. - */ - ZCR_GAMEPAD_V1_GAMEPAD_STATE_ON = 1, -}; -#endif /* ZCR_GAMEPAD_V1_GAMEPAD_STATE_ENUM */ - -#ifndef ZCR_GAMEPAD_V1_BUTTON_STATE_ENUM -#define ZCR_GAMEPAD_V1_BUTTON_STATE_ENUM -/** - * @ingroup iface_zcr_gamepad_v1 - * physical button state - * - * Describes the physical state of a button that produced the button - * event. - */ -enum zcr_gamepad_v1_button_state { - /** - * the button is not pressed - */ - ZCR_GAMEPAD_V1_BUTTON_STATE_RELEASED = 0, - /** - * the button is pressed - */ - ZCR_GAMEPAD_V1_BUTTON_STATE_PRESSED = 1, -}; -#endif /* ZCR_GAMEPAD_V1_BUTTON_STATE_ENUM */ - -/** - * @ingroup iface_zcr_gamepad_v1 - * @struct zcr_gamepad_v1_interface - */ -struct zcr_gamepad_v1_interface { - /** - * destroy gamepad object - * - * - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZCR_GAMEPAD_V1_STATE_CHANGE 0 -#define ZCR_GAMEPAD_V1_AXIS 1 -#define ZCR_GAMEPAD_V1_BUTTON 2 -#define ZCR_GAMEPAD_V1_FRAME 3 - -/** - * @ingroup iface_zcr_gamepad_v1 - */ -#define ZCR_GAMEPAD_V1_STATE_CHANGE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v1 - */ -#define ZCR_GAMEPAD_V1_AXIS_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v1 - */ -#define ZCR_GAMEPAD_V1_BUTTON_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v1 - */ -#define ZCR_GAMEPAD_V1_FRAME_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_gamepad_v1 - */ -#define ZCR_GAMEPAD_V1_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_gamepad_v1 - * Sends an state_change event to the client owning the resource. - * @param resource_ The client's resource - * @param state new state - */ -static inline void -zcr_gamepad_v1_send_state_change(struct wl_resource *resource_, uint32_t state) -{ - wl_resource_post_event(resource_, ZCR_GAMEPAD_V1_STATE_CHANGE, state); -} - -/** - * @ingroup iface_zcr_gamepad_v1 - * Sends an axis event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param axis axis that produced this event - * @param value new value of axis - */ -static inline void -zcr_gamepad_v1_send_axis(struct wl_resource *resource_, uint32_t time, uint32_t axis, wl_fixed_t value) -{ - wl_resource_post_event(resource_, ZCR_GAMEPAD_V1_AXIS, time, axis, value); -} - -/** - * @ingroup iface_zcr_gamepad_v1 - * Sends an button event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param button id of button - * @param state digital state of the button - * @param analog analog value of the button - */ -static inline void -zcr_gamepad_v1_send_button(struct wl_resource *resource_, uint32_t time, uint32_t button, uint32_t state, wl_fixed_t analog) -{ - wl_resource_post_event(resource_, ZCR_GAMEPAD_V1_BUTTON, time, button, state, analog); -} - -/** - * @ingroup iface_zcr_gamepad_v1 - * Sends an frame event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - */ -static inline void -zcr_gamepad_v1_send_frame(struct wl_resource *resource_, uint32_t time) -{ - wl_resource_post_event(resource_, ZCR_GAMEPAD_V1_FRAME, time); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v2-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v2-client-protocol.h deleted file mode 100644 index 1c74e341141..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v2-client-protocol.h +++ /dev/null @@ -1,422 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef GAMING_INPUT_UNSTABLE_V2_CLIENT_PROTOCOL_H -#define GAMING_INPUT_UNSTABLE_V2_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_gaming_input_unstable_v2 The gaming_input_unstable_v2 protocol - * @section page_ifaces_gaming_input_unstable_v2 Interfaces - * - @subpage page_iface_zcr_gaming_input_v2 - extends wl_seat with gaming input devices - * - @subpage page_iface_zcr_gaming_seat_v2 - controller object for all gaming devices of a seat - * - @subpage page_iface_zcr_gamepad_v2 - gamepad input device - * @section page_copyright_gaming_input_unstable_v2 Copyright - * <pre> - * - * Copyright 2016 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_seat; -struct zcr_gamepad_v2; -struct zcr_gaming_input_v2; -struct zcr_gaming_seat_v2; - -/** - * @page page_iface_zcr_gaming_input_v2 zcr_gaming_input_v2 - * @section page_iface_zcr_gaming_input_v2_desc Description - * - * A global interface to provide gaming input devices for a given seat. - * - * Currently only gamepad devices are supported. - * - * 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - * @section page_iface_zcr_gaming_input_v2_api API - * See @ref iface_zcr_gaming_input_v2. - */ -/** - * @defgroup iface_zcr_gaming_input_v2 The zcr_gaming_input_v2 interface - * - * A global interface to provide gaming input devices for a given seat. - * - * Currently only gamepad devices are supported. - * - * 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - */ -extern const struct wl_interface zcr_gaming_input_v2_interface; -/** - * @page page_iface_zcr_gaming_seat_v2 zcr_gaming_seat_v2 - * @section page_iface_zcr_gaming_seat_v2_desc Description - * - * An object that provides access to all the gaming devices of a seat. - * When a gamepad is connected, the compositor will send gamepad_added event. - * @section page_iface_zcr_gaming_seat_v2_api API - * See @ref iface_zcr_gaming_seat_v2. - */ -/** - * @defgroup iface_zcr_gaming_seat_v2 The zcr_gaming_seat_v2 interface - * - * An object that provides access to all the gaming devices of a seat. - * When a gamepad is connected, the compositor will send gamepad_added event. - */ -extern const struct wl_interface zcr_gaming_seat_v2_interface; -/** - * @page page_iface_zcr_gamepad_v2 zcr_gamepad_v2 - * @section page_iface_zcr_gamepad_v2_desc Description - * - * The zcr_gamepad_v2 interface represents one or more gamepad input devices, - * which are reported as a normalized 'Standard Gamepad' as it is specified - * by the W3C Gamepad API at: https://w3c.github.io/gamepad/#remapping - * @section page_iface_zcr_gamepad_v2_api API - * See @ref iface_zcr_gamepad_v2. - */ -/** - * @defgroup iface_zcr_gamepad_v2 The zcr_gamepad_v2 interface - * - * The zcr_gamepad_v2 interface represents one or more gamepad input devices, - * which are reported as a normalized 'Standard Gamepad' as it is specified - * by the W3C Gamepad API at: https://w3c.github.io/gamepad/#remapping - */ -extern const struct wl_interface zcr_gamepad_v2_interface; - -#define ZCR_GAMING_INPUT_V2_GET_GAMING_SEAT 0 -#define ZCR_GAMING_INPUT_V2_DESTROY 1 - - -/** - * @ingroup iface_zcr_gaming_input_v2 - */ -#define ZCR_GAMING_INPUT_V2_GET_GAMING_SEAT_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gaming_input_v2 - */ -#define ZCR_GAMING_INPUT_V2_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_gaming_input_v2 */ -static inline void -zcr_gaming_input_v2_set_user_data(struct zcr_gaming_input_v2 *zcr_gaming_input_v2, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_gaming_input_v2, user_data); -} - -/** @ingroup iface_zcr_gaming_input_v2 */ -static inline void * -zcr_gaming_input_v2_get_user_data(struct zcr_gaming_input_v2 *zcr_gaming_input_v2) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_gaming_input_v2); -} - -static inline uint32_t -zcr_gaming_input_v2_get_version(struct zcr_gaming_input_v2 *zcr_gaming_input_v2) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_gaming_input_v2); -} - -/** - * @ingroup iface_zcr_gaming_input_v2 - * - * Get a gaming seat object for a given seat. Gaming seat provides access - * to gaming devices - */ -static inline struct zcr_gaming_seat_v2 * -zcr_gaming_input_v2_get_gaming_seat(struct zcr_gaming_input_v2 *zcr_gaming_input_v2, struct wl_seat *seat) -{ - struct wl_proxy *gaming_seat; - - gaming_seat = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_gaming_input_v2, - ZCR_GAMING_INPUT_V2_GET_GAMING_SEAT, &zcr_gaming_seat_v2_interface, NULL, seat); - - return (struct zcr_gaming_seat_v2 *) gaming_seat; -} - -/** - * @ingroup iface_zcr_gaming_input_v2 - * - * Destroy gaming_input object. Objects created from this object are - * unaffected and should be destroyed separately. - */ -static inline void -zcr_gaming_input_v2_destroy(struct zcr_gaming_input_v2 *zcr_gaming_input_v2) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_gaming_input_v2, - ZCR_GAMING_INPUT_V2_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_gaming_input_v2); -} - -/** - * @ingroup iface_zcr_gaming_seat_v2 - * @struct zcr_gaming_seat_v2_listener - */ -struct zcr_gaming_seat_v2_listener { - /** - * gamepad added event - * - * Notification that there is gamepad connected at this seat. - * @param gamepad new connected gamepad - */ - void (*gamepad_added)(void *data, - struct zcr_gaming_seat_v2 *zcr_gaming_seat_v2, - struct zcr_gamepad_v2 *gamepad); -}; - -/** - * @ingroup iface_zcr_gaming_seat_v2 - */ -static inline int -zcr_gaming_seat_v2_add_listener(struct zcr_gaming_seat_v2 *zcr_gaming_seat_v2, - const struct zcr_gaming_seat_v2_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zcr_gaming_seat_v2, - (void (**)(void)) listener, data); -} - -#define ZCR_GAMING_SEAT_V2_DESTROY 0 - -/** - * @ingroup iface_zcr_gaming_seat_v2 - */ -#define ZCR_GAMING_SEAT_V2_GAMEPAD_ADDED_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_gaming_seat_v2 - */ -#define ZCR_GAMING_SEAT_V2_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_gaming_seat_v2 */ -static inline void -zcr_gaming_seat_v2_set_user_data(struct zcr_gaming_seat_v2 *zcr_gaming_seat_v2, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_gaming_seat_v2, user_data); -} - -/** @ingroup iface_zcr_gaming_seat_v2 */ -static inline void * -zcr_gaming_seat_v2_get_user_data(struct zcr_gaming_seat_v2 *zcr_gaming_seat_v2) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_gaming_seat_v2); -} - -static inline uint32_t -zcr_gaming_seat_v2_get_version(struct zcr_gaming_seat_v2 *zcr_gaming_seat_v2) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_gaming_seat_v2); -} - -/** - * @ingroup iface_zcr_gaming_seat_v2 - * - * Destroy gaming_seat object. Objects created from this object are - * unaffected and should be destroyed separately. - */ -static inline void -zcr_gaming_seat_v2_destroy(struct zcr_gaming_seat_v2 *zcr_gaming_seat_v2) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_gaming_seat_v2, - ZCR_GAMING_SEAT_V2_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_gaming_seat_v2); -} - -#ifndef ZCR_GAMEPAD_V2_BUTTON_STATE_ENUM -#define ZCR_GAMEPAD_V2_BUTTON_STATE_ENUM -/** - * @ingroup iface_zcr_gamepad_v2 - * physical button state - * - * Describes the physical state of a button that produced the button - * event. - */ -enum zcr_gamepad_v2_button_state { - /** - * the button is not pressed - */ - ZCR_GAMEPAD_V2_BUTTON_STATE_RELEASED = 0, - /** - * the button is pressed - */ - ZCR_GAMEPAD_V2_BUTTON_STATE_PRESSED = 1, -}; -#endif /* ZCR_GAMEPAD_V2_BUTTON_STATE_ENUM */ - -/** - * @ingroup iface_zcr_gamepad_v2 - * @struct zcr_gamepad_v2_listener - */ -struct zcr_gamepad_v2_listener { - /** - * gamepad removed - * - * Removed event is send when the gamepad is disconnected. The - * client should expect no more event and call destroy. - * - * This event cannot be used as destructor as requests (e.g. - * vibration) might be added to this interface. - */ - void (*removed)(void *data, - struct zcr_gamepad_v2 *zcr_gamepad_v2); - /** - * axis change event - * - * Notification of axis change. - * - * The axis id specifies which axis has changed as defined by the - * W3C 'Standard Gamepad'. - * - * The value is calibrated and normalized to the -1 to 1 range. - * @param time timestamp with millisecond granularity - * @param axis axis that produced this event - * @param value new value of axis - */ - void (*axis)(void *data, - struct zcr_gamepad_v2 *zcr_gamepad_v2, - uint32_t time, - uint32_t axis, - wl_fixed_t value); - /** - * Gamepad button changed - * - * Notification of button change. - * - * The button id specifies which button has changed as defined by - * the W3C 'Standard Gamepad'. - * - * A button can have a digital and an analog value. The analog - * value is normalized to a 0 to 1 range. If a button does not - * provide an analog value, it will be derived from the digital - * state. - * @param time timestamp with millisecond granularity - * @param button id of button - * @param state digital state of the button - * @param analog analog value of the button - */ - void (*button)(void *data, - struct zcr_gamepad_v2 *zcr_gamepad_v2, - uint32_t time, - uint32_t button, - uint32_t state, - wl_fixed_t analog); - /** - * Notifies end of a series of gamepad changes. - * - * Indicates the end of a set of events that logically belong - * together. A client is expected to accumulate the data in all - * events within the frame before proceeding. - * @param time timestamp with millisecond granularity - */ - void (*frame)(void *data, - struct zcr_gamepad_v2 *zcr_gamepad_v2, - uint32_t time); -}; - -/** - * @ingroup iface_zcr_gamepad_v2 - */ -static inline int -zcr_gamepad_v2_add_listener(struct zcr_gamepad_v2 *zcr_gamepad_v2, - const struct zcr_gamepad_v2_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zcr_gamepad_v2, - (void (**)(void)) listener, data); -} - -#define ZCR_GAMEPAD_V2_DESTROY 0 - -/** - * @ingroup iface_zcr_gamepad_v2 - */ -#define ZCR_GAMEPAD_V2_REMOVED_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v2 - */ -#define ZCR_GAMEPAD_V2_AXIS_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v2 - */ -#define ZCR_GAMEPAD_V2_BUTTON_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v2 - */ -#define ZCR_GAMEPAD_V2_FRAME_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_gamepad_v2 - */ -#define ZCR_GAMEPAD_V2_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_gamepad_v2 */ -static inline void -zcr_gamepad_v2_set_user_data(struct zcr_gamepad_v2 *zcr_gamepad_v2, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_gamepad_v2, user_data); -} - -/** @ingroup iface_zcr_gamepad_v2 */ -static inline void * -zcr_gamepad_v2_get_user_data(struct zcr_gamepad_v2 *zcr_gamepad_v2) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_gamepad_v2); -} - -static inline uint32_t -zcr_gamepad_v2_get_version(struct zcr_gamepad_v2 *zcr_gamepad_v2) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_gamepad_v2); -} - -/** - * @ingroup iface_zcr_gamepad_v2 - */ -static inline void -zcr_gamepad_v2_destroy(struct zcr_gamepad_v2 *zcr_gamepad_v2) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_gamepad_v2, - ZCR_GAMEPAD_V2_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_gamepad_v2); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v2-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v2-server-protocol.h deleted file mode 100644 index eeba3aeb93b..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v2-server-protocol.h +++ /dev/null @@ -1,316 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef GAMING_INPUT_UNSTABLE_V2_SERVER_PROTOCOL_H -#define GAMING_INPUT_UNSTABLE_V2_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_gaming_input_unstable_v2 The gaming_input_unstable_v2 protocol - * @section page_ifaces_gaming_input_unstable_v2 Interfaces - * - @subpage page_iface_zcr_gaming_input_v2 - extends wl_seat with gaming input devices - * - @subpage page_iface_zcr_gaming_seat_v2 - controller object for all gaming devices of a seat - * - @subpage page_iface_zcr_gamepad_v2 - gamepad input device - * @section page_copyright_gaming_input_unstable_v2 Copyright - * <pre> - * - * Copyright 2016 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_seat; -struct zcr_gamepad_v2; -struct zcr_gaming_input_v2; -struct zcr_gaming_seat_v2; - -/** - * @page page_iface_zcr_gaming_input_v2 zcr_gaming_input_v2 - * @section page_iface_zcr_gaming_input_v2_desc Description - * - * A global interface to provide gaming input devices for a given seat. - * - * Currently only gamepad devices are supported. - * - * 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - * @section page_iface_zcr_gaming_input_v2_api API - * See @ref iface_zcr_gaming_input_v2. - */ -/** - * @defgroup iface_zcr_gaming_input_v2 The zcr_gaming_input_v2 interface - * - * A global interface to provide gaming input devices for a given seat. - * - * Currently only gamepad devices are supported. - * - * 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - */ -extern const struct wl_interface zcr_gaming_input_v2_interface; -/** - * @page page_iface_zcr_gaming_seat_v2 zcr_gaming_seat_v2 - * @section page_iface_zcr_gaming_seat_v2_desc Description - * - * An object that provides access to all the gaming devices of a seat. - * When a gamepad is connected, the compositor will send gamepad_added event. - * @section page_iface_zcr_gaming_seat_v2_api API - * See @ref iface_zcr_gaming_seat_v2. - */ -/** - * @defgroup iface_zcr_gaming_seat_v2 The zcr_gaming_seat_v2 interface - * - * An object that provides access to all the gaming devices of a seat. - * When a gamepad is connected, the compositor will send gamepad_added event. - */ -extern const struct wl_interface zcr_gaming_seat_v2_interface; -/** - * @page page_iface_zcr_gamepad_v2 zcr_gamepad_v2 - * @section page_iface_zcr_gamepad_v2_desc Description - * - * The zcr_gamepad_v2 interface represents one or more gamepad input devices, - * which are reported as a normalized 'Standard Gamepad' as it is specified - * by the W3C Gamepad API at: https://w3c.github.io/gamepad/#remapping - * @section page_iface_zcr_gamepad_v2_api API - * See @ref iface_zcr_gamepad_v2. - */ -/** - * @defgroup iface_zcr_gamepad_v2 The zcr_gamepad_v2 interface - * - * The zcr_gamepad_v2 interface represents one or more gamepad input devices, - * which are reported as a normalized 'Standard Gamepad' as it is specified - * by the W3C Gamepad API at: https://w3c.github.io/gamepad/#remapping - */ -extern const struct wl_interface zcr_gamepad_v2_interface; - -/** - * @ingroup iface_zcr_gaming_input_v2 - * @struct zcr_gaming_input_v2_interface - */ -struct zcr_gaming_input_v2_interface { - /** - * get a gaming seat - * - * Get a gaming seat object for a given seat. Gaming seat - * provides access to gaming devices - */ - void (*get_gaming_seat)(struct wl_client *client, - struct wl_resource *resource, - uint32_t gaming_seat, - struct wl_resource *seat); - /** - * release the memory for the gaming input object - * - * Destroy gaming_input object. Objects created from this object - * are unaffected and should be destroyed separately. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - - -/** - * @ingroup iface_zcr_gaming_input_v2 - */ -#define ZCR_GAMING_INPUT_V2_GET_GAMING_SEAT_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gaming_input_v2 - */ -#define ZCR_GAMING_INPUT_V2_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_gaming_seat_v2 - * @struct zcr_gaming_seat_v2_interface - */ -struct zcr_gaming_seat_v2_interface { - /** - * release the memory for the gaming seat object - * - * Destroy gaming_seat object. Objects created from this object - * are unaffected and should be destroyed separately. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZCR_GAMING_SEAT_V2_GAMEPAD_ADDED 0 - -/** - * @ingroup iface_zcr_gaming_seat_v2 - */ -#define ZCR_GAMING_SEAT_V2_GAMEPAD_ADDED_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_gaming_seat_v2 - */ -#define ZCR_GAMING_SEAT_V2_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_gaming_seat_v2 - * Sends an gamepad_added event to the client owning the resource. - * @param resource_ The client's resource - * @param gamepad new connected gamepad - */ -static inline void -zcr_gaming_seat_v2_send_gamepad_added(struct wl_resource *resource_, struct wl_resource *gamepad) -{ - wl_resource_post_event(resource_, ZCR_GAMING_SEAT_V2_GAMEPAD_ADDED, gamepad); -} - -#ifndef ZCR_GAMEPAD_V2_BUTTON_STATE_ENUM -#define ZCR_GAMEPAD_V2_BUTTON_STATE_ENUM -/** - * @ingroup iface_zcr_gamepad_v2 - * physical button state - * - * Describes the physical state of a button that produced the button - * event. - */ -enum zcr_gamepad_v2_button_state { - /** - * the button is not pressed - */ - ZCR_GAMEPAD_V2_BUTTON_STATE_RELEASED = 0, - /** - * the button is pressed - */ - ZCR_GAMEPAD_V2_BUTTON_STATE_PRESSED = 1, -}; -#endif /* ZCR_GAMEPAD_V2_BUTTON_STATE_ENUM */ - -/** - * @ingroup iface_zcr_gamepad_v2 - * @struct zcr_gamepad_v2_interface - */ -struct zcr_gamepad_v2_interface { - /** - * destroy gamepad object - * - * - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZCR_GAMEPAD_V2_REMOVED 0 -#define ZCR_GAMEPAD_V2_AXIS 1 -#define ZCR_GAMEPAD_V2_BUTTON 2 -#define ZCR_GAMEPAD_V2_FRAME 3 - -/** - * @ingroup iface_zcr_gamepad_v2 - */ -#define ZCR_GAMEPAD_V2_REMOVED_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v2 - */ -#define ZCR_GAMEPAD_V2_AXIS_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v2 - */ -#define ZCR_GAMEPAD_V2_BUTTON_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v2 - */ -#define ZCR_GAMEPAD_V2_FRAME_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_gamepad_v2 - */ -#define ZCR_GAMEPAD_V2_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_gamepad_v2 - * Sends an removed event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zcr_gamepad_v2_send_removed(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, ZCR_GAMEPAD_V2_REMOVED); -} - -/** - * @ingroup iface_zcr_gamepad_v2 - * Sends an axis event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param axis axis that produced this event - * @param value new value of axis - */ -static inline void -zcr_gamepad_v2_send_axis(struct wl_resource *resource_, uint32_t time, uint32_t axis, wl_fixed_t value) -{ - wl_resource_post_event(resource_, ZCR_GAMEPAD_V2_AXIS, time, axis, value); -} - -/** - * @ingroup iface_zcr_gamepad_v2 - * Sends an button event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param button id of button - * @param state digital state of the button - * @param analog analog value of the button - */ -static inline void -zcr_gamepad_v2_send_button(struct wl_resource *resource_, uint32_t time, uint32_t button, uint32_t state, wl_fixed_t analog) -{ - wl_resource_post_event(resource_, ZCR_GAMEPAD_V2_BUTTON, time, button, state, analog); -} - -/** - * @ingroup iface_zcr_gamepad_v2 - * Sends an frame event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - */ -static inline void -zcr_gamepad_v2_send_frame(struct wl_resource *resource_, uint32_t time) -{ - wl_resource_post_event(resource_, ZCR_GAMEPAD_V2_FRAME, time); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/input-timestamps-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/input-timestamps-unstable-v1-client-protocol.h deleted file mode 100644 index bef0d500930..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/input-timestamps-unstable-v1-client-protocol.h +++ /dev/null @@ -1,326 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef INPUT_TIMESTAMPS_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define INPUT_TIMESTAMPS_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_input_timestamps_unstable_v1 The input_timestamps_unstable_v1 protocol - * High-resolution timestamps for input events - * - * @section page_desc_input_timestamps_unstable_v1 Description - * - * 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. - * - * @section page_ifaces_input_timestamps_unstable_v1 Interfaces - * - @subpage page_iface_zwp_input_timestamps_manager_v1 - context object for high-resolution input timestamps - * - @subpage page_iface_zwp_input_timestamps_v1 - context object for input timestamps - * @section page_copyright_input_timestamps_unstable_v1 Copyright - * <pre> - * - * 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. - * </pre> - */ -struct wl_keyboard; -struct wl_pointer; -struct wl_touch; -struct zwp_input_timestamps_manager_v1; -struct zwp_input_timestamps_v1; - -/** - * @page page_iface_zwp_input_timestamps_manager_v1 zwp_input_timestamps_manager_v1 - * @section page_iface_zwp_input_timestamps_manager_v1_desc Description - * - * A global interface used for requesting high-resolution timestamps - * for input events. - * @section page_iface_zwp_input_timestamps_manager_v1_api API - * See @ref iface_zwp_input_timestamps_manager_v1. - */ -/** - * @defgroup iface_zwp_input_timestamps_manager_v1 The zwp_input_timestamps_manager_v1 interface - * - * A global interface used for requesting high-resolution timestamps - * for input events. - */ -extern const struct wl_interface zwp_input_timestamps_manager_v1_interface; -/** - * @page page_iface_zwp_input_timestamps_v1 zwp_input_timestamps_v1 - * @section page_iface_zwp_input_timestamps_v1_desc Description - * - * 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. - * @section page_iface_zwp_input_timestamps_v1_api API - * See @ref iface_zwp_input_timestamps_v1. - */ -/** - * @defgroup iface_zwp_input_timestamps_v1 The zwp_input_timestamps_v1 interface - * - * 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. - */ -extern const struct wl_interface zwp_input_timestamps_v1_interface; - -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_DESTROY 0 -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_KEYBOARD_TIMESTAMPS 1 -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_POINTER_TIMESTAMPS 2 -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_TOUCH_TIMESTAMPS 3 - - -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_KEYBOARD_TIMESTAMPS_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_POINTER_TIMESTAMPS_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_TOUCH_TIMESTAMPS_SINCE_VERSION 1 - -/** @ingroup iface_zwp_input_timestamps_manager_v1 */ -static inline void -zwp_input_timestamps_manager_v1_set_user_data(struct zwp_input_timestamps_manager_v1 *zwp_input_timestamps_manager_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zwp_input_timestamps_manager_v1, user_data); -} - -/** @ingroup iface_zwp_input_timestamps_manager_v1 */ -static inline void * -zwp_input_timestamps_manager_v1_get_user_data(struct zwp_input_timestamps_manager_v1 *zwp_input_timestamps_manager_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zwp_input_timestamps_manager_v1); -} - -static inline uint32_t -zwp_input_timestamps_manager_v1_get_version(struct zwp_input_timestamps_manager_v1 *zwp_input_timestamps_manager_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zwp_input_timestamps_manager_v1); -} - -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - * - * Informs the server that the client will no longer be using this - * protocol object. Existing objects created by this object are not - * affected. - */ -static inline void -zwp_input_timestamps_manager_v1_destroy(struct zwp_input_timestamps_manager_v1 *zwp_input_timestamps_manager_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zwp_input_timestamps_manager_v1, - ZWP_INPUT_TIMESTAMPS_MANAGER_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zwp_input_timestamps_manager_v1); -} - -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - * - * 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. - */ -static inline struct zwp_input_timestamps_v1 * -zwp_input_timestamps_manager_v1_get_keyboard_timestamps(struct zwp_input_timestamps_manager_v1 *zwp_input_timestamps_manager_v1, struct wl_keyboard *keyboard) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_input_timestamps_manager_v1, - ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_KEYBOARD_TIMESTAMPS, &zwp_input_timestamps_v1_interface, NULL, keyboard); - - return (struct zwp_input_timestamps_v1 *) id; -} - -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - * - * 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. - */ -static inline struct zwp_input_timestamps_v1 * -zwp_input_timestamps_manager_v1_get_pointer_timestamps(struct zwp_input_timestamps_manager_v1 *zwp_input_timestamps_manager_v1, struct wl_pointer *pointer) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_input_timestamps_manager_v1, - ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_POINTER_TIMESTAMPS, &zwp_input_timestamps_v1_interface, NULL, pointer); - - return (struct zwp_input_timestamps_v1 *) id; -} - -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - * - * 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. - */ -static inline struct zwp_input_timestamps_v1 * -zwp_input_timestamps_manager_v1_get_touch_timestamps(struct zwp_input_timestamps_manager_v1 *zwp_input_timestamps_manager_v1, struct wl_touch *touch) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_input_timestamps_manager_v1, - ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_TOUCH_TIMESTAMPS, &zwp_input_timestamps_v1_interface, NULL, touch); - - return (struct zwp_input_timestamps_v1 *) id; -} - -/** - * @ingroup iface_zwp_input_timestamps_v1 - * @struct zwp_input_timestamps_v1_listener - */ -struct zwp_input_timestamps_v1_listener { - /** - * high-resolution timestamp event - * - * 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]. - * @param tv_sec_hi high 32 bits of the seconds part of the timestamp - * @param tv_sec_lo low 32 bits of the seconds part of the timestamp - * @param tv_nsec nanoseconds part of the timestamp - */ - void (*timestamp)(void *data, - struct zwp_input_timestamps_v1 *zwp_input_timestamps_v1, - uint32_t tv_sec_hi, - uint32_t tv_sec_lo, - uint32_t tv_nsec); -}; - -/** - * @ingroup iface_zwp_input_timestamps_v1 - */ -static inline int -zwp_input_timestamps_v1_add_listener(struct zwp_input_timestamps_v1 *zwp_input_timestamps_v1, - const struct zwp_input_timestamps_v1_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zwp_input_timestamps_v1, - (void (**)(void)) listener, data); -} - -#define ZWP_INPUT_TIMESTAMPS_V1_DESTROY 0 - -/** - * @ingroup iface_zwp_input_timestamps_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_V1_TIMESTAMP_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_input_timestamps_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_V1_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zwp_input_timestamps_v1 */ -static inline void -zwp_input_timestamps_v1_set_user_data(struct zwp_input_timestamps_v1 *zwp_input_timestamps_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zwp_input_timestamps_v1, user_data); -} - -/** @ingroup iface_zwp_input_timestamps_v1 */ -static inline void * -zwp_input_timestamps_v1_get_user_data(struct zwp_input_timestamps_v1 *zwp_input_timestamps_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zwp_input_timestamps_v1); -} - -static inline uint32_t -zwp_input_timestamps_v1_get_version(struct zwp_input_timestamps_v1 *zwp_input_timestamps_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zwp_input_timestamps_v1); -} - -/** - * @ingroup iface_zwp_input_timestamps_v1 - * - * 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. - */ -static inline void -zwp_input_timestamps_v1_destroy(struct zwp_input_timestamps_v1 *zwp_input_timestamps_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zwp_input_timestamps_v1, - ZWP_INPUT_TIMESTAMPS_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zwp_input_timestamps_v1); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/input-timestamps-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/input-timestamps-unstable-v1-server-protocol.h deleted file mode 100644 index 65d9ceea040..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/input-timestamps-unstable-v1-server-protocol.h +++ /dev/null @@ -1,235 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef INPUT_TIMESTAMPS_UNSTABLE_V1_SERVER_PROTOCOL_H -#define INPUT_TIMESTAMPS_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_input_timestamps_unstable_v1 The input_timestamps_unstable_v1 protocol - * High-resolution timestamps for input events - * - * @section page_desc_input_timestamps_unstable_v1 Description - * - * 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. - * - * @section page_ifaces_input_timestamps_unstable_v1 Interfaces - * - @subpage page_iface_zwp_input_timestamps_manager_v1 - context object for high-resolution input timestamps - * - @subpage page_iface_zwp_input_timestamps_v1 - context object for input timestamps - * @section page_copyright_input_timestamps_unstable_v1 Copyright - * <pre> - * - * 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. - * </pre> - */ -struct wl_keyboard; -struct wl_pointer; -struct wl_touch; -struct zwp_input_timestamps_manager_v1; -struct zwp_input_timestamps_v1; - -/** - * @page page_iface_zwp_input_timestamps_manager_v1 zwp_input_timestamps_manager_v1 - * @section page_iface_zwp_input_timestamps_manager_v1_desc Description - * - * A global interface used for requesting high-resolution timestamps - * for input events. - * @section page_iface_zwp_input_timestamps_manager_v1_api API - * See @ref iface_zwp_input_timestamps_manager_v1. - */ -/** - * @defgroup iface_zwp_input_timestamps_manager_v1 The zwp_input_timestamps_manager_v1 interface - * - * A global interface used for requesting high-resolution timestamps - * for input events. - */ -extern const struct wl_interface zwp_input_timestamps_manager_v1_interface; -/** - * @page page_iface_zwp_input_timestamps_v1 zwp_input_timestamps_v1 - * @section page_iface_zwp_input_timestamps_v1_desc Description - * - * 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. - * @section page_iface_zwp_input_timestamps_v1_api API - * See @ref iface_zwp_input_timestamps_v1. - */ -/** - * @defgroup iface_zwp_input_timestamps_v1 The zwp_input_timestamps_v1 interface - * - * 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. - */ -extern const struct wl_interface zwp_input_timestamps_v1_interface; - -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - * @struct zwp_input_timestamps_manager_v1_interface - */ -struct zwp_input_timestamps_manager_v1_interface { - /** - * destroy the input timestamps manager object - * - * Informs the server that the client will no longer be using - * this protocol object. Existing objects created by this object - * are not affected. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * subscribe to high-resolution keyboard timestamp events - * - * 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. - * @param keyboard the wl_keyboard object for which to get timestamp events - */ - void (*get_keyboard_timestamps)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *keyboard); - /** - * subscribe to high-resolution pointer timestamp events - * - * 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. - * @param pointer the wl_pointer object for which to get timestamp events - */ - void (*get_pointer_timestamps)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *pointer); - /** - * subscribe to high-resolution touch timestamp events - * - * 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. - * @param touch the wl_touch object for which to get timestamp events - */ - void (*get_touch_timestamps)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *touch); -}; - - -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_KEYBOARD_TIMESTAMPS_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_POINTER_TIMESTAMPS_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_TOUCH_TIMESTAMPS_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_input_timestamps_v1 - * @struct zwp_input_timestamps_v1_interface - */ -struct zwp_input_timestamps_v1_interface { - /** - * destroy the input timestamps 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. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZWP_INPUT_TIMESTAMPS_V1_TIMESTAMP 0 - -/** - * @ingroup iface_zwp_input_timestamps_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_V1_TIMESTAMP_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_input_timestamps_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_V1_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_input_timestamps_v1 - * Sends an timestamp event to the client owning the resource. - * @param resource_ The client's resource - * @param tv_sec_hi high 32 bits of the seconds part of the timestamp - * @param tv_sec_lo low 32 bits of the seconds part of the timestamp - * @param tv_nsec nanoseconds part of the timestamp - */ -static inline void -zwp_input_timestamps_v1_send_timestamp(struct wl_resource *resource_, uint32_t tv_sec_hi, uint32_t tv_sec_lo, uint32_t tv_nsec) -{ - wl_resource_post_event(resource_, ZWP_INPUT_TIMESTAMPS_V1_TIMESTAMP, tv_sec_hi, tv_sec_lo, tv_nsec); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/keyboard-configuration-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/keyboard-configuration-unstable-v1-client-protocol.h deleted file mode 100644 index 5087c849a09..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/keyboard-configuration-unstable-v1-client-protocol.h +++ /dev/null @@ -1,260 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef KEYBOARD_CONFIGURATION_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define KEYBOARD_CONFIGURATION_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_keyboard_configuration_unstable_v1 The keyboard_configuration_unstable_v1 protocol - * @section page_ifaces_keyboard_configuration_unstable_v1 Interfaces - * - @subpage page_iface_zcr_keyboard_configuration_v1 - extends wl_keyboard with events for device configuration change - * - @subpage page_iface_zcr_keyboard_device_configuration_v1 - extension of wl_keyboard protocol - * @section page_copyright_keyboard_configuration_unstable_v1 Copyright - * <pre> - * - * Copyright 2016 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_keyboard; -struct zcr_keyboard_configuration_v1; -struct zcr_keyboard_device_configuration_v1; - -/** - * @page page_iface_zcr_keyboard_configuration_v1 zcr_keyboard_configuration_v1 - * @section page_iface_zcr_keyboard_configuration_v1_desc Description - * - * Allows a wl_keyboard to notify device configuration change events of - * the keyboard to the client. - * - * 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - * @section page_iface_zcr_keyboard_configuration_v1_api API - * See @ref iface_zcr_keyboard_configuration_v1. - */ -/** - * @defgroup iface_zcr_keyboard_configuration_v1 The zcr_keyboard_configuration_v1 interface - * - * Allows a wl_keyboard to notify device configuration change events of - * the keyboard to the client. - * - * 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - */ -extern const struct wl_interface zcr_keyboard_configuration_v1_interface; -/** - * @page page_iface_zcr_keyboard_device_configuration_v1 zcr_keyboard_device_configuration_v1 - * @section page_iface_zcr_keyboard_device_configuration_v1_desc Description - * - * The zcr_keyboard_device_configuration_v1 interface extends the wl_keyboard - * interface with events to describe device configuration of a keyboard. - * @section page_iface_zcr_keyboard_device_configuration_v1_api API - * See @ref iface_zcr_keyboard_device_configuration_v1. - */ -/** - * @defgroup iface_zcr_keyboard_device_configuration_v1 The zcr_keyboard_device_configuration_v1 interface - * - * The zcr_keyboard_device_configuration_v1 interface extends the wl_keyboard - * interface with events to describe device configuration of a keyboard. - */ -extern const struct wl_interface zcr_keyboard_device_configuration_v1_interface; - -#ifndef ZCR_KEYBOARD_CONFIGURATION_V1_ERROR_ENUM -#define ZCR_KEYBOARD_CONFIGURATION_V1_ERROR_ENUM -enum zcr_keyboard_configuration_v1_error { - /** - * the keyboard already has a device configuration object associated - */ - ZCR_KEYBOARD_CONFIGURATION_V1_ERROR_DEVICE_CONFIGURATION_EXISTS = 0, -}; -#endif /* ZCR_KEYBOARD_CONFIGURATION_V1_ERROR_ENUM */ - -#define ZCR_KEYBOARD_CONFIGURATION_V1_GET_KEYBOARD_DEVICE_CONFIGURATION 0 - - -/** - * @ingroup iface_zcr_keyboard_configuration_v1 - */ -#define ZCR_KEYBOARD_CONFIGURATION_V1_GET_KEYBOARD_DEVICE_CONFIGURATION_SINCE_VERSION 1 - -/** @ingroup iface_zcr_keyboard_configuration_v1 */ -static inline void -zcr_keyboard_configuration_v1_set_user_data(struct zcr_keyboard_configuration_v1 *zcr_keyboard_configuration_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_keyboard_configuration_v1, user_data); -} - -/** @ingroup iface_zcr_keyboard_configuration_v1 */ -static inline void * -zcr_keyboard_configuration_v1_get_user_data(struct zcr_keyboard_configuration_v1 *zcr_keyboard_configuration_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_keyboard_configuration_v1); -} - -static inline uint32_t -zcr_keyboard_configuration_v1_get_version(struct zcr_keyboard_configuration_v1 *zcr_keyboard_configuration_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_keyboard_configuration_v1); -} - -/** @ingroup iface_zcr_keyboard_configuration_v1 */ -static inline void -zcr_keyboard_configuration_v1_destroy(struct zcr_keyboard_configuration_v1 *zcr_keyboard_configuration_v1) -{ - wl_proxy_destroy((struct wl_proxy *) zcr_keyboard_configuration_v1); -} - -/** - * @ingroup iface_zcr_keyboard_configuration_v1 - * - * Create keyboard_device_configuration object. - * See zcr_keyboard_device_configuration interface for details. - * If the given wl_keyboard object already has a device configuration - * object associated, the keyboard_device_configuration_exists protocol - * error is raised. - */ -static inline struct zcr_keyboard_device_configuration_v1 * -zcr_keyboard_configuration_v1_get_keyboard_device_configuration(struct zcr_keyboard_configuration_v1 *zcr_keyboard_configuration_v1, struct wl_keyboard *keyboard) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_keyboard_configuration_v1, - ZCR_KEYBOARD_CONFIGURATION_V1_GET_KEYBOARD_DEVICE_CONFIGURATION, &zcr_keyboard_device_configuration_v1_interface, NULL, keyboard); - - return (struct zcr_keyboard_device_configuration_v1 *) id; -} - -#ifndef ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_KEYBOARD_TYPE_ENUM -#define ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_KEYBOARD_TYPE_ENUM -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - * keyboard types - */ -enum zcr_keyboard_device_configuration_v1_keyboard_type { - /** - * Physical keyboard - */ - ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_KEYBOARD_TYPE_PHYSICAL = 0, - /** - * Virtual keyboard - */ - ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_KEYBOARD_TYPE_VIRTUAL = 1, -}; -#endif /* ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_KEYBOARD_TYPE_ENUM */ - -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - * @struct zcr_keyboard_device_configuration_v1_listener - */ -struct zcr_keyboard_device_configuration_v1_listener { - /** - * keyboard type changed - * - * Notification that the user is switching to new keyboard type. - * - * If this event is not received, the cleint has to assume a - * physical keyboard is in use. - * @param type new device type - */ - void (*type_change)(void *data, - struct zcr_keyboard_device_configuration_v1 *zcr_keyboard_device_configuration_v1, - uint32_t type); -}; - -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - */ -static inline int -zcr_keyboard_device_configuration_v1_add_listener(struct zcr_keyboard_device_configuration_v1 *zcr_keyboard_device_configuration_v1, - const struct zcr_keyboard_device_configuration_v1_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zcr_keyboard_device_configuration_v1, - (void (**)(void)) listener, data); -} - -#define ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_DESTROY 0 - -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - */ -#define ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_TYPE_CHANGE_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - */ -#define ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_keyboard_device_configuration_v1 */ -static inline void -zcr_keyboard_device_configuration_v1_set_user_data(struct zcr_keyboard_device_configuration_v1 *zcr_keyboard_device_configuration_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_keyboard_device_configuration_v1, user_data); -} - -/** @ingroup iface_zcr_keyboard_device_configuration_v1 */ -static inline void * -zcr_keyboard_device_configuration_v1_get_user_data(struct zcr_keyboard_device_configuration_v1 *zcr_keyboard_device_configuration_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_keyboard_device_configuration_v1); -} - -static inline uint32_t -zcr_keyboard_device_configuration_v1_get_version(struct zcr_keyboard_device_configuration_v1 *zcr_keyboard_device_configuration_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_keyboard_device_configuration_v1); -} - -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - */ -static inline void -zcr_keyboard_device_configuration_v1_destroy(struct zcr_keyboard_device_configuration_v1 *zcr_keyboard_device_configuration_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_keyboard_device_configuration_v1, - ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_keyboard_device_configuration_v1); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/keyboard-configuration-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/keyboard-configuration-unstable-v1-server-protocol.h deleted file mode 100644 index bf17f5efd0e..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/keyboard-configuration-unstable-v1-server-protocol.h +++ /dev/null @@ -1,198 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef KEYBOARD_CONFIGURATION_UNSTABLE_V1_SERVER_PROTOCOL_H -#define KEYBOARD_CONFIGURATION_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_keyboard_configuration_unstable_v1 The keyboard_configuration_unstable_v1 protocol - * @section page_ifaces_keyboard_configuration_unstable_v1 Interfaces - * - @subpage page_iface_zcr_keyboard_configuration_v1 - extends wl_keyboard with events for device configuration change - * - @subpage page_iface_zcr_keyboard_device_configuration_v1 - extension of wl_keyboard protocol - * @section page_copyright_keyboard_configuration_unstable_v1 Copyright - * <pre> - * - * Copyright 2016 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_keyboard; -struct zcr_keyboard_configuration_v1; -struct zcr_keyboard_device_configuration_v1; - -/** - * @page page_iface_zcr_keyboard_configuration_v1 zcr_keyboard_configuration_v1 - * @section page_iface_zcr_keyboard_configuration_v1_desc Description - * - * Allows a wl_keyboard to notify device configuration change events of - * the keyboard to the client. - * - * 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - * @section page_iface_zcr_keyboard_configuration_v1_api API - * See @ref iface_zcr_keyboard_configuration_v1. - */ -/** - * @defgroup iface_zcr_keyboard_configuration_v1 The zcr_keyboard_configuration_v1 interface - * - * Allows a wl_keyboard to notify device configuration change events of - * the keyboard to the client. - * - * 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - */ -extern const struct wl_interface zcr_keyboard_configuration_v1_interface; -/** - * @page page_iface_zcr_keyboard_device_configuration_v1 zcr_keyboard_device_configuration_v1 - * @section page_iface_zcr_keyboard_device_configuration_v1_desc Description - * - * The zcr_keyboard_device_configuration_v1 interface extends the wl_keyboard - * interface with events to describe device configuration of a keyboard. - * @section page_iface_zcr_keyboard_device_configuration_v1_api API - * See @ref iface_zcr_keyboard_device_configuration_v1. - */ -/** - * @defgroup iface_zcr_keyboard_device_configuration_v1 The zcr_keyboard_device_configuration_v1 interface - * - * The zcr_keyboard_device_configuration_v1 interface extends the wl_keyboard - * interface with events to describe device configuration of a keyboard. - */ -extern const struct wl_interface zcr_keyboard_device_configuration_v1_interface; - -#ifndef ZCR_KEYBOARD_CONFIGURATION_V1_ERROR_ENUM -#define ZCR_KEYBOARD_CONFIGURATION_V1_ERROR_ENUM -enum zcr_keyboard_configuration_v1_error { - /** - * the keyboard already has a device configuration object associated - */ - ZCR_KEYBOARD_CONFIGURATION_V1_ERROR_DEVICE_CONFIGURATION_EXISTS = 0, -}; -#endif /* ZCR_KEYBOARD_CONFIGURATION_V1_ERROR_ENUM */ - -/** - * @ingroup iface_zcr_keyboard_configuration_v1 - * @struct zcr_keyboard_configuration_v1_interface - */ -struct zcr_keyboard_configuration_v1_interface { - /** - * get keyboard_device_configuration interface for a keyboard - * - * Create keyboard_device_configuration object. See - * zcr_keyboard_device_configuration interface for details. If the - * given wl_keyboard object already has a device configuration - * object associated, the keyboard_device_configuration_exists - * protocol error is raised. - */ - void (*get_keyboard_device_configuration)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *keyboard); -}; - - -/** - * @ingroup iface_zcr_keyboard_configuration_v1 - */ -#define ZCR_KEYBOARD_CONFIGURATION_V1_GET_KEYBOARD_DEVICE_CONFIGURATION_SINCE_VERSION 1 - -#ifndef ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_KEYBOARD_TYPE_ENUM -#define ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_KEYBOARD_TYPE_ENUM -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - * keyboard types - */ -enum zcr_keyboard_device_configuration_v1_keyboard_type { - /** - * Physical keyboard - */ - ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_KEYBOARD_TYPE_PHYSICAL = 0, - /** - * Virtual keyboard - */ - ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_KEYBOARD_TYPE_VIRTUAL = 1, -}; -#endif /* ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_KEYBOARD_TYPE_ENUM */ - -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - * @struct zcr_keyboard_device_configuration_v1_interface - */ -struct zcr_keyboard_device_configuration_v1_interface { - /** - * destroy keyboard_device_configuration object - * - * - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_TYPE_CHANGE 0 - -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - */ -#define ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_TYPE_CHANGE_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - */ -#define ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - * Sends an type_change event to the client owning the resource. - * @param resource_ The client's resource - * @param type new device type - */ -static inline void -zcr_keyboard_device_configuration_v1_send_type_change(struct wl_resource *resource_, uint32_t type) -{ - wl_resource_post_event(resource_, ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_TYPE_CHANGE, type); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/keyboard-extension-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/keyboard-extension-unstable-v1-client-protocol.h deleted file mode 100644 index ce8571f9d29..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/keyboard-extension-unstable-v1-client-protocol.h +++ /dev/null @@ -1,236 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef KEYBOARD_EXTENSION_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define KEYBOARD_EXTENSION_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_keyboard_extension_unstable_v1 The keyboard_extension_unstable_v1 protocol - * @section page_ifaces_keyboard_extension_unstable_v1 Interfaces - * - @subpage page_iface_zcr_keyboard_extension_v1 - extends wl_keyboard with ack_key events - * - @subpage page_iface_zcr_extended_keyboard_v1 - extension of wl_keyboard protocol - * @section page_copyright_keyboard_extension_unstable_v1 Copyright - * <pre> - * - * Copyright 2017 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_keyboard; -struct zcr_extended_keyboard_v1; -struct zcr_keyboard_extension_v1; - -/** - * @page page_iface_zcr_keyboard_extension_v1 zcr_keyboard_extension_v1 - * @section page_iface_zcr_keyboard_extension_v1_desc Description - * - * Allows a wl_keyboard to send ack_key requests for each key event of - * the keyboard to the server. - * - * 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - * @section page_iface_zcr_keyboard_extension_v1_api API - * See @ref iface_zcr_keyboard_extension_v1. - */ -/** - * @defgroup iface_zcr_keyboard_extension_v1 The zcr_keyboard_extension_v1 interface - * - * Allows a wl_keyboard to send ack_key requests for each key event of - * the keyboard to the server. - * - * 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - */ -extern const struct wl_interface zcr_keyboard_extension_v1_interface; -/** - * @page page_iface_zcr_extended_keyboard_v1 zcr_extended_keyboard_v1 - * @section page_iface_zcr_extended_keyboard_v1_desc Description - * - * The zcr_extended_keyboard_v1 interface extends the wl_keyboard interface - * with requests to notify whether sent key events are handled or not by - * the client. - * @section page_iface_zcr_extended_keyboard_v1_api API - * See @ref iface_zcr_extended_keyboard_v1. - */ -/** - * @defgroup iface_zcr_extended_keyboard_v1 The zcr_extended_keyboard_v1 interface - * - * The zcr_extended_keyboard_v1 interface extends the wl_keyboard interface - * with requests to notify whether sent key events are handled or not by - * the client. - */ -extern const struct wl_interface zcr_extended_keyboard_v1_interface; - -#ifndef ZCR_KEYBOARD_EXTENSION_V1_ERROR_ENUM -#define ZCR_KEYBOARD_EXTENSION_V1_ERROR_ENUM -enum zcr_keyboard_extension_v1_error { - /** - * the keyboard already has an extended_keyboard object associated - */ - ZCR_KEYBOARD_EXTENSION_V1_ERROR_EXTENDED_KEYBOARD_EXISTS = 0, -}; -#endif /* ZCR_KEYBOARD_EXTENSION_V1_ERROR_ENUM */ - -#define ZCR_KEYBOARD_EXTENSION_V1_GET_EXTENDED_KEYBOARD 0 - - -/** - * @ingroup iface_zcr_keyboard_extension_v1 - */ -#define ZCR_KEYBOARD_EXTENSION_V1_GET_EXTENDED_KEYBOARD_SINCE_VERSION 1 - -/** @ingroup iface_zcr_keyboard_extension_v1 */ -static inline void -zcr_keyboard_extension_v1_set_user_data(struct zcr_keyboard_extension_v1 *zcr_keyboard_extension_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_keyboard_extension_v1, user_data); -} - -/** @ingroup iface_zcr_keyboard_extension_v1 */ -static inline void * -zcr_keyboard_extension_v1_get_user_data(struct zcr_keyboard_extension_v1 *zcr_keyboard_extension_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_keyboard_extension_v1); -} - -static inline uint32_t -zcr_keyboard_extension_v1_get_version(struct zcr_keyboard_extension_v1 *zcr_keyboard_extension_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_keyboard_extension_v1); -} - -/** @ingroup iface_zcr_keyboard_extension_v1 */ -static inline void -zcr_keyboard_extension_v1_destroy(struct zcr_keyboard_extension_v1 *zcr_keyboard_extension_v1) -{ - wl_proxy_destroy((struct wl_proxy *) zcr_keyboard_extension_v1); -} - -/** - * @ingroup iface_zcr_keyboard_extension_v1 - * - * Create extended_keyboard object. - * See zcr_extended_keyboard interface for details. - * If the given wl_keyboard object already has a extended_keyboard object - * associated, the extended_keyboard_exists protocol error is raised. - */ -static inline struct zcr_extended_keyboard_v1 * -zcr_keyboard_extension_v1_get_extended_keyboard(struct zcr_keyboard_extension_v1 *zcr_keyboard_extension_v1, struct wl_keyboard *keyboard) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_keyboard_extension_v1, - ZCR_KEYBOARD_EXTENSION_V1_GET_EXTENDED_KEYBOARD, &zcr_extended_keyboard_v1_interface, NULL, keyboard); - - return (struct zcr_extended_keyboard_v1 *) id; -} - -#ifndef ZCR_EXTENDED_KEYBOARD_V1_HANDLED_STATE_ENUM -#define ZCR_EXTENDED_KEYBOARD_V1_HANDLED_STATE_ENUM -/** - * @ingroup iface_zcr_extended_keyboard_v1 - * whether a key event is handled by client or not - */ -enum zcr_extended_keyboard_v1_handled_state { - ZCR_EXTENDED_KEYBOARD_V1_HANDLED_STATE_NOT_HANDLED = 0, - ZCR_EXTENDED_KEYBOARD_V1_HANDLED_STATE_HANDLED = 1, -}; -#endif /* ZCR_EXTENDED_KEYBOARD_V1_HANDLED_STATE_ENUM */ - -#define ZCR_EXTENDED_KEYBOARD_V1_DESTROY 0 -#define ZCR_EXTENDED_KEYBOARD_V1_ACK_KEY 1 - - -/** - * @ingroup iface_zcr_extended_keyboard_v1 - */ -#define ZCR_EXTENDED_KEYBOARD_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_extended_keyboard_v1 - */ -#define ZCR_EXTENDED_KEYBOARD_V1_ACK_KEY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_extended_keyboard_v1 */ -static inline void -zcr_extended_keyboard_v1_set_user_data(struct zcr_extended_keyboard_v1 *zcr_extended_keyboard_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_extended_keyboard_v1, user_data); -} - -/** @ingroup iface_zcr_extended_keyboard_v1 */ -static inline void * -zcr_extended_keyboard_v1_get_user_data(struct zcr_extended_keyboard_v1 *zcr_extended_keyboard_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_extended_keyboard_v1); -} - -static inline uint32_t -zcr_extended_keyboard_v1_get_version(struct zcr_extended_keyboard_v1 *zcr_extended_keyboard_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_extended_keyboard_v1); -} - -/** - * @ingroup iface_zcr_extended_keyboard_v1 - */ -static inline void -zcr_extended_keyboard_v1_destroy(struct zcr_extended_keyboard_v1 *zcr_extended_keyboard_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_extended_keyboard_v1, - ZCR_EXTENDED_KEYBOARD_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_extended_keyboard_v1); -} - -/** - * @ingroup iface_zcr_extended_keyboard_v1 - */ -static inline void -zcr_extended_keyboard_v1_ack_key(struct zcr_extended_keyboard_v1 *zcr_extended_keyboard_v1, uint32_t serial, uint32_t handled) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_extended_keyboard_v1, - ZCR_EXTENDED_KEYBOARD_V1_ACK_KEY, serial, handled); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/keyboard-extension-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/keyboard-extension-unstable-v1-server-protocol.h deleted file mode 100644 index 9eb8c2bae32..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/keyboard-extension-unstable-v1-server-protocol.h +++ /dev/null @@ -1,188 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef KEYBOARD_EXTENSION_UNSTABLE_V1_SERVER_PROTOCOL_H -#define KEYBOARD_EXTENSION_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_keyboard_extension_unstable_v1 The keyboard_extension_unstable_v1 protocol - * @section page_ifaces_keyboard_extension_unstable_v1 Interfaces - * - @subpage page_iface_zcr_keyboard_extension_v1 - extends wl_keyboard with ack_key events - * - @subpage page_iface_zcr_extended_keyboard_v1 - extension of wl_keyboard protocol - * @section page_copyright_keyboard_extension_unstable_v1 Copyright - * <pre> - * - * Copyright 2017 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_keyboard; -struct zcr_extended_keyboard_v1; -struct zcr_keyboard_extension_v1; - -/** - * @page page_iface_zcr_keyboard_extension_v1 zcr_keyboard_extension_v1 - * @section page_iface_zcr_keyboard_extension_v1_desc Description - * - * Allows a wl_keyboard to send ack_key requests for each key event of - * the keyboard to the server. - * - * 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - * @section page_iface_zcr_keyboard_extension_v1_api API - * See @ref iface_zcr_keyboard_extension_v1. - */ -/** - * @defgroup iface_zcr_keyboard_extension_v1 The zcr_keyboard_extension_v1 interface - * - * Allows a wl_keyboard to send ack_key requests for each key event of - * the keyboard to the server. - * - * 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - */ -extern const struct wl_interface zcr_keyboard_extension_v1_interface; -/** - * @page page_iface_zcr_extended_keyboard_v1 zcr_extended_keyboard_v1 - * @section page_iface_zcr_extended_keyboard_v1_desc Description - * - * The zcr_extended_keyboard_v1 interface extends the wl_keyboard interface - * with requests to notify whether sent key events are handled or not by - * the client. - * @section page_iface_zcr_extended_keyboard_v1_api API - * See @ref iface_zcr_extended_keyboard_v1. - */ -/** - * @defgroup iface_zcr_extended_keyboard_v1 The zcr_extended_keyboard_v1 interface - * - * The zcr_extended_keyboard_v1 interface extends the wl_keyboard interface - * with requests to notify whether sent key events are handled or not by - * the client. - */ -extern const struct wl_interface zcr_extended_keyboard_v1_interface; - -#ifndef ZCR_KEYBOARD_EXTENSION_V1_ERROR_ENUM -#define ZCR_KEYBOARD_EXTENSION_V1_ERROR_ENUM -enum zcr_keyboard_extension_v1_error { - /** - * the keyboard already has an extended_keyboard object associated - */ - ZCR_KEYBOARD_EXTENSION_V1_ERROR_EXTENDED_KEYBOARD_EXISTS = 0, -}; -#endif /* ZCR_KEYBOARD_EXTENSION_V1_ERROR_ENUM */ - -/** - * @ingroup iface_zcr_keyboard_extension_v1 - * @struct zcr_keyboard_extension_v1_interface - */ -struct zcr_keyboard_extension_v1_interface { - /** - * get extended_keyboard for a keyboard - * - * Create extended_keyboard object. See zcr_extended_keyboard - * interface for details. If the given wl_keyboard object already - * has a extended_keyboard object associated, the - * extended_keyboard_exists protocol error is raised. - */ - void (*get_extended_keyboard)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *keyboard); -}; - - -/** - * @ingroup iface_zcr_keyboard_extension_v1 - */ -#define ZCR_KEYBOARD_EXTENSION_V1_GET_EXTENDED_KEYBOARD_SINCE_VERSION 1 - -#ifndef ZCR_EXTENDED_KEYBOARD_V1_HANDLED_STATE_ENUM -#define ZCR_EXTENDED_KEYBOARD_V1_HANDLED_STATE_ENUM -/** - * @ingroup iface_zcr_extended_keyboard_v1 - * whether a key event is handled by client or not - */ -enum zcr_extended_keyboard_v1_handled_state { - ZCR_EXTENDED_KEYBOARD_V1_HANDLED_STATE_NOT_HANDLED = 0, - ZCR_EXTENDED_KEYBOARD_V1_HANDLED_STATE_HANDLED = 1, -}; -#endif /* ZCR_EXTENDED_KEYBOARD_V1_HANDLED_STATE_ENUM */ - -/** - * @ingroup iface_zcr_extended_keyboard_v1 - * @struct zcr_extended_keyboard_v1_interface - */ -struct zcr_extended_keyboard_v1_interface { - /** - * destroy extended_keyboard object - * - * - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * acknowledge a key event - * - * - */ - void (*ack_key)(struct wl_client *client, - struct wl_resource *resource, - uint32_t serial, - uint32_t handled); -}; - - -/** - * @ingroup iface_zcr_extended_keyboard_v1 - */ -#define ZCR_EXTENDED_KEYBOARD_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_extended_keyboard_v1 - */ -#define ZCR_EXTENDED_KEYBOARD_V1_ACK_KEY_SINCE_VERSION 1 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/linux-dmabuf-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/linux-dmabuf-unstable-v1-client-protocol.h deleted file mode 100644 index 95e6f0a0b0c..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/linux-dmabuf-unstable-v1-client-protocol.h +++ /dev/null @@ -1,652 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef LINUX_DMABUF_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define LINUX_DMABUF_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_linux_dmabuf_unstable_v1 The linux_dmabuf_unstable_v1 protocol - * @section page_ifaces_linux_dmabuf_unstable_v1 Interfaces - * - @subpage page_iface_zwp_linux_dmabuf_v1 - factory for creating dmabuf-based wl_buffers - * - @subpage page_iface_zwp_linux_buffer_params_v1 - parameters for creating a dmabuf-based wl_buffer - * @section page_copyright_linux_dmabuf_unstable_v1 Copyright - * <pre> - * - * 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. - * </pre> - */ -struct wl_buffer; -struct zwp_linux_buffer_params_v1; -struct zwp_linux_dmabuf_v1; - -/** - * @page page_iface_zwp_linux_dmabuf_v1 zwp_linux_dmabuf_v1 - * @section page_iface_zwp_linux_dmabuf_v1_desc Description - * - * Following the interfaces from: - * https://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt - * and the Linux DRM sub-system's AddFb2 ioctl. - * - * This interface offers ways to create generic dmabuf-based - * wl_buffers. Immediately after a client binds to this interface, - * the set of supported formats and format modifiers is sent with - * 'format' and 'modifier' events. - * - * The following are required from clients: - * - * - Clients must ensure that either all data in the dma-buf is - * coherent for all subsequent read access or that coherency is - * correctly handled by the underlying kernel-side dma-buf - * implementation. - * - * - Don't make any more attachments after sending the buffer to the - * compositor. Making more attachments later increases the risk of - * the compositor not being able to use (re-import) an existing - * dmabuf-based wl_buffer. - * - * The underlying graphics stack must ensure the following: - * - * - The dmabuf file descriptors relayed to the server will stay valid - * for the whole lifetime of the wl_buffer. This means the server may - * at any time use those fds to import the dmabuf into any kernel - * sub-system that might accept it. - * - * To create a wl_buffer from one or more dmabufs, a client creates a - * zwp_linux_dmabuf_params_v1 object with a zwp_linux_dmabuf_v1.create_params - * request. All planes required by the intended format are added with - * the 'add' request. Finally, a 'create' or 'create_immed' request is - * issued, which has the following outcome depending on the import success. - * - * The 'create' request, - * - on success, triggers a 'created' event which provides the final - * wl_buffer to the client. - * - on failure, triggers a 'failed' event to convey that the server - * cannot use the dmabufs received from the client. - * - * For the 'create_immed' request, - * - on success, the server immediately imports the added dmabufs to - * create a wl_buffer. No event is sent from the server in this case. - * - on failure, the server can choose to either: - * - terminate the client by raising a fatal error. - * - mark the wl_buffer as failed, and send a 'failed' event to the - * client. If the client uses a failed wl_buffer as an argument to any - * request, the behaviour is compositor implementation-defined. - * - * Warning! The protocol described in this file is experimental and - * backward incompatible changes may be made. Backward compatible changes - * may be added together with the corresponding interface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and interface names and resetting the interface version. - * Once the protocol is to be declared stable, the 'z' prefix and the - * version number in the protocol and interface names are removed and the - * interface version number is reset. - * @section page_iface_zwp_linux_dmabuf_v1_api API - * See @ref iface_zwp_linux_dmabuf_v1. - */ -/** - * @defgroup iface_zwp_linux_dmabuf_v1 The zwp_linux_dmabuf_v1 interface - * - * Following the interfaces from: - * https://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt - * and the Linux DRM sub-system's AddFb2 ioctl. - * - * This interface offers ways to create generic dmabuf-based - * wl_buffers. Immediately after a client binds to this interface, - * the set of supported formats and format modifiers is sent with - * 'format' and 'modifier' events. - * - * The following are required from clients: - * - * - Clients must ensure that either all data in the dma-buf is - * coherent for all subsequent read access or that coherency is - * correctly handled by the underlying kernel-side dma-buf - * implementation. - * - * - Don't make any more attachments after sending the buffer to the - * compositor. Making more attachments later increases the risk of - * the compositor not being able to use (re-import) an existing - * dmabuf-based wl_buffer. - * - * The underlying graphics stack must ensure the following: - * - * - The dmabuf file descriptors relayed to the server will stay valid - * for the whole lifetime of the wl_buffer. This means the server may - * at any time use those fds to import the dmabuf into any kernel - * sub-system that might accept it. - * - * To create a wl_buffer from one or more dmabufs, a client creates a - * zwp_linux_dmabuf_params_v1 object with a zwp_linux_dmabuf_v1.create_params - * request. All planes required by the intended format are added with - * the 'add' request. Finally, a 'create' or 'create_immed' request is - * issued, which has the following outcome depending on the import success. - * - * The 'create' request, - * - on success, triggers a 'created' event which provides the final - * wl_buffer to the client. - * - on failure, triggers a 'failed' event to convey that the server - * cannot use the dmabufs received from the client. - * - * For the 'create_immed' request, - * - on success, the server immediately imports the added dmabufs to - * create a wl_buffer. No event is sent from the server in this case. - * - on failure, the server can choose to either: - * - terminate the client by raising a fatal error. - * - mark the wl_buffer as failed, and send a 'failed' event to the - * client. If the client uses a failed wl_buffer as an argument to any - * request, the behaviour is compositor implementation-defined. - * - * Warning! The protocol described in this file is experimental and - * backward incompatible changes may be made. Backward compatible changes - * may be added together with the corresponding interface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and interface names and resetting the interface version. - * Once the protocol is to be declared stable, the 'z' prefix and the - * version number in the protocol and interface names are removed and the - * interface version number is reset. - */ -extern const struct wl_interface zwp_linux_dmabuf_v1_interface; -/** - * @page page_iface_zwp_linux_buffer_params_v1 zwp_linux_buffer_params_v1 - * @section page_iface_zwp_linux_buffer_params_v1_desc Description - * - * 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. - * @section page_iface_zwp_linux_buffer_params_v1_api API - * See @ref iface_zwp_linux_buffer_params_v1. - */ -/** - * @defgroup iface_zwp_linux_buffer_params_v1 The zwp_linux_buffer_params_v1 interface - * - * 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. - */ -extern const struct wl_interface zwp_linux_buffer_params_v1_interface; - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - * @struct zwp_linux_dmabuf_v1_listener - */ -struct zwp_linux_dmabuf_v1_listener { - /** - * supported buffer format - * - * This event advertises one buffer format that the server - * supports. All the supported formats are advertised once when the - * client binds to this interface. A roundtrip after binding - * guarantees that the client has received all supported formats. - * - * For the definition of the format codes, see the - * zwp_linux_buffer_params_v1::create request. - * - * Warning: the 'format' event is likely to be deprecated and - * replaced with the 'modifier' event introduced in - * zwp_linux_dmabuf_v1 version 3, described below. Please refrain - * from using the information received from this event. - * @param format DRM_FORMAT code - */ - void (*format)(void *data, - struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1, - uint32_t format); - /** - * supported buffer format modifier - * - * 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 the definition of the format and modifier codes, see the - * zwp_linux_buffer_params_v1::create request. - * @param format DRM_FORMAT code - * @param modifier_hi high 32 bits of layout modifier - * @param modifier_lo low 32 bits of layout modifier - * @since 3 - */ - void (*modifier)(void *data, - struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1, - uint32_t format, - uint32_t modifier_hi, - uint32_t modifier_lo); -}; - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ -static inline int -zwp_linux_dmabuf_v1_add_listener(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1, - const struct zwp_linux_dmabuf_v1_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zwp_linux_dmabuf_v1, - (void (**)(void)) listener, data); -} - -#define ZWP_LINUX_DMABUF_V1_DESTROY 0 -#define ZWP_LINUX_DMABUF_V1_CREATE_PARAMS 1 - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ -#define ZWP_LINUX_DMABUF_V1_FORMAT_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ -#define ZWP_LINUX_DMABUF_V1_MODIFIER_SINCE_VERSION 3 - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ -#define ZWP_LINUX_DMABUF_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ -#define ZWP_LINUX_DMABUF_V1_CREATE_PARAMS_SINCE_VERSION 1 - -/** @ingroup iface_zwp_linux_dmabuf_v1 */ -static inline void -zwp_linux_dmabuf_v1_set_user_data(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zwp_linux_dmabuf_v1, user_data); -} - -/** @ingroup iface_zwp_linux_dmabuf_v1 */ -static inline void * -zwp_linux_dmabuf_v1_get_user_data(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zwp_linux_dmabuf_v1); -} - -static inline uint32_t -zwp_linux_dmabuf_v1_get_version(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zwp_linux_dmabuf_v1); -} - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - * - * Objects created through this interface, especially wl_buffers, will - * remain valid. - */ -static inline void -zwp_linux_dmabuf_v1_destroy(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zwp_linux_dmabuf_v1, - ZWP_LINUX_DMABUF_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zwp_linux_dmabuf_v1); -} - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - * - * 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. - */ -static inline struct zwp_linux_buffer_params_v1 * -zwp_linux_dmabuf_v1_create_params(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1) -{ - struct wl_proxy *params_id; - - params_id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_linux_dmabuf_v1, - ZWP_LINUX_DMABUF_V1_CREATE_PARAMS, &zwp_linux_buffer_params_v1_interface, NULL); - - return (struct zwp_linux_buffer_params_v1 *) params_id; -} - -#ifndef ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM -#define ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM -enum zwp_linux_buffer_params_v1_error { - /** - * the dmabuf_batch object has already been used to create a wl_buffer - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ALREADY_USED = 0, - /** - * plane index out of bounds - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_PLANE_IDX = 1, - /** - * the plane index was already set - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_PLANE_SET = 2, - /** - * missing or too many planes to create a buffer - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INCOMPLETE = 3, - /** - * format not supported - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_FORMAT = 4, - /** - * invalid width or height - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_DIMENSIONS = 5, - /** - * offset + stride * height goes out of dmabuf bounds - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_OUT_OF_BOUNDS = 6, - /** - * invalid wl_buffer resulted from importing dmabufs via the create_immed request on given buffer_params - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_WL_BUFFER = 7, -}; -#endif /* ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM */ - -#ifndef ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM -#define ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM -enum zwp_linux_buffer_params_v1_flags { - /** - * contents are y-inverted - */ - ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT = 1, - /** - * content is interlaced - */ - ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_INTERLACED = 2, - /** - * bottom field first - */ - ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_BOTTOM_FIRST = 4, -}; -#endif /* ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM */ - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * @struct zwp_linux_buffer_params_v1_listener - */ -struct zwp_linux_buffer_params_v1_listener { - /** - * buffer creation succeeded - * - * This event indicates that the attempted buffer creation was - * successful. It provides the new wl_buffer referencing the - * dmabuf(s). - * - * Upon receiving this event, the client should destroy the - * zlinux_dmabuf_params object. - * @param buffer the newly created wl_buffer - */ - void (*created)(void *data, - struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1, - struct wl_buffer *buffer); - /** - * buffer creation failed - * - * This event indicates that the attempted buffer creation has - * failed. It usually means that one of the dmabuf constraints has - * not been fulfilled. - * - * Upon receiving this event, the client should destroy the - * zlinux_buffer_params object. - */ - void (*failed)(void *data, - struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1); -}; - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -static inline int -zwp_linux_buffer_params_v1_add_listener(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1, - const struct zwp_linux_buffer_params_v1_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zwp_linux_buffer_params_v1, - (void (**)(void)) listener, data); -} - -#define ZWP_LINUX_BUFFER_PARAMS_V1_DESTROY 0 -#define ZWP_LINUX_BUFFER_PARAMS_V1_ADD 1 -#define ZWP_LINUX_BUFFER_PARAMS_V1_CREATE 2 -#define ZWP_LINUX_BUFFER_PARAMS_V1_CREATE_IMMED 3 - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_CREATED_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_FAILED_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_ADD_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_CREATE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_CREATE_IMMED_SINCE_VERSION 2 - -/** @ingroup iface_zwp_linux_buffer_params_v1 */ -static inline void -zwp_linux_buffer_params_v1_set_user_data(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zwp_linux_buffer_params_v1, user_data); -} - -/** @ingroup iface_zwp_linux_buffer_params_v1 */ -static inline void * -zwp_linux_buffer_params_v1_get_user_data(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zwp_linux_buffer_params_v1); -} - -static inline uint32_t -zwp_linux_buffer_params_v1_get_version(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zwp_linux_buffer_params_v1); -} - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * - * Cleans up the temporary data sent to the server for dmabuf-based - * wl_buffer creation. - */ -static inline void -zwp_linux_buffer_params_v1_destroy(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zwp_linux_buffer_params_v1, - ZWP_LINUX_BUFFER_PARAMS_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zwp_linux_buffer_params_v1); -} - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * - * 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. - * - * 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. - */ -static inline void -zwp_linux_buffer_params_v1_add(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1, int32_t fd, uint32_t plane_idx, uint32_t offset, uint32_t stride, uint32_t modifier_hi, uint32_t modifier_lo) -{ - wl_proxy_marshal((struct wl_proxy *) zwp_linux_buffer_params_v1, - ZWP_LINUX_BUFFER_PARAMS_V1_ADD, fd, plane_idx, offset, stride, modifier_hi, modifier_lo); -} - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * - * 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. - */ -static inline void -zwp_linux_buffer_params_v1_create(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1, int32_t width, int32_t height, uint32_t format, uint32_t flags) -{ - wl_proxy_marshal((struct wl_proxy *) zwp_linux_buffer_params_v1, - ZWP_LINUX_BUFFER_PARAMS_V1_CREATE, width, height, format, flags); -} - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * - * This asks for immediate creation of a wl_buffer by importing the - * added dmabufs. - * - * In case of import success, no event is sent from the server, and the - * wl_buffer is ready to be used by the client. - * - * Upon import failure, either of the following may happen, as seen fit - * by the implementation: - * - the client is terminated with one of the following fatal protocol - * errors: - * - INCOMPLETE, INVALID_FORMAT, INVALID_DIMENSIONS, OUT_OF_BOUNDS, - * in case of argument errors such as mismatch between the number - * of planes and the format, bad format, non-positive width or - * height, or bad offset or stride. - * - INVALID_WL_BUFFER, in case the cause for failure is unknown or - * plaform specific. - * - the server creates an invalid wl_buffer, marks it as failed and - * sends a 'failed' event to the client. The result of using this - * invalid wl_buffer as an argument in any request by the client is - * defined by the compositor implementation. - * - * This takes the same arguments as a 'create' request, and obeys the - * same restrictions. - */ -static inline struct wl_buffer * -zwp_linux_buffer_params_v1_create_immed(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1, int32_t width, int32_t height, uint32_t format, uint32_t flags) -{ - struct wl_proxy *buffer_id; - - buffer_id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_linux_buffer_params_v1, - ZWP_LINUX_BUFFER_PARAMS_V1_CREATE_IMMED, &wl_buffer_interface, NULL, width, height, format, flags); - - return (struct wl_buffer *) buffer_id; -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/linux-dmabuf-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/linux-dmabuf-unstable-v1-server-protocol.h deleted file mode 100644 index 775b18cdab3..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/linux-dmabuf-unstable-v1-server-protocol.h +++ /dev/null @@ -1,563 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef LINUX_DMABUF_UNSTABLE_V1_SERVER_PROTOCOL_H -#define LINUX_DMABUF_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_linux_dmabuf_unstable_v1 The linux_dmabuf_unstable_v1 protocol - * @section page_ifaces_linux_dmabuf_unstable_v1 Interfaces - * - @subpage page_iface_zwp_linux_dmabuf_v1 - factory for creating dmabuf-based wl_buffers - * - @subpage page_iface_zwp_linux_buffer_params_v1 - parameters for creating a dmabuf-based wl_buffer - * @section page_copyright_linux_dmabuf_unstable_v1 Copyright - * <pre> - * - * 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. - * </pre> - */ -struct wl_buffer; -struct zwp_linux_buffer_params_v1; -struct zwp_linux_dmabuf_v1; - -/** - * @page page_iface_zwp_linux_dmabuf_v1 zwp_linux_dmabuf_v1 - * @section page_iface_zwp_linux_dmabuf_v1_desc Description - * - * Following the interfaces from: - * https://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt - * and the Linux DRM sub-system's AddFb2 ioctl. - * - * This interface offers ways to create generic dmabuf-based - * wl_buffers. Immediately after a client binds to this interface, - * the set of supported formats and format modifiers is sent with - * 'format' and 'modifier' events. - * - * The following are required from clients: - * - * - Clients must ensure that either all data in the dma-buf is - * coherent for all subsequent read access or that coherency is - * correctly handled by the underlying kernel-side dma-buf - * implementation. - * - * - Don't make any more attachments after sending the buffer to the - * compositor. Making more attachments later increases the risk of - * the compositor not being able to use (re-import) an existing - * dmabuf-based wl_buffer. - * - * The underlying graphics stack must ensure the following: - * - * - The dmabuf file descriptors relayed to the server will stay valid - * for the whole lifetime of the wl_buffer. This means the server may - * at any time use those fds to import the dmabuf into any kernel - * sub-system that might accept it. - * - * To create a wl_buffer from one or more dmabufs, a client creates a - * zwp_linux_dmabuf_params_v1 object with a zwp_linux_dmabuf_v1.create_params - * request. All planes required by the intended format are added with - * the 'add' request. Finally, a 'create' or 'create_immed' request is - * issued, which has the following outcome depending on the import success. - * - * The 'create' request, - * - on success, triggers a 'created' event which provides the final - * wl_buffer to the client. - * - on failure, triggers a 'failed' event to convey that the server - * cannot use the dmabufs received from the client. - * - * For the 'create_immed' request, - * - on success, the server immediately imports the added dmabufs to - * create a wl_buffer. No event is sent from the server in this case. - * - on failure, the server can choose to either: - * - terminate the client by raising a fatal error. - * - mark the wl_buffer as failed, and send a 'failed' event to the - * client. If the client uses a failed wl_buffer as an argument to any - * request, the behaviour is compositor implementation-defined. - * - * Warning! The protocol described in this file is experimental and - * backward incompatible changes may be made. Backward compatible changes - * may be added together with the corresponding interface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and interface names and resetting the interface version. - * Once the protocol is to be declared stable, the 'z' prefix and the - * version number in the protocol and interface names are removed and the - * interface version number is reset. - * @section page_iface_zwp_linux_dmabuf_v1_api API - * See @ref iface_zwp_linux_dmabuf_v1. - */ -/** - * @defgroup iface_zwp_linux_dmabuf_v1 The zwp_linux_dmabuf_v1 interface - * - * Following the interfaces from: - * https://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt - * and the Linux DRM sub-system's AddFb2 ioctl. - * - * This interface offers ways to create generic dmabuf-based - * wl_buffers. Immediately after a client binds to this interface, - * the set of supported formats and format modifiers is sent with - * 'format' and 'modifier' events. - * - * The following are required from clients: - * - * - Clients must ensure that either all data in the dma-buf is - * coherent for all subsequent read access or that coherency is - * correctly handled by the underlying kernel-side dma-buf - * implementation. - * - * - Don't make any more attachments after sending the buffer to the - * compositor. Making more attachments later increases the risk of - * the compositor not being able to use (re-import) an existing - * dmabuf-based wl_buffer. - * - * The underlying graphics stack must ensure the following: - * - * - The dmabuf file descriptors relayed to the server will stay valid - * for the whole lifetime of the wl_buffer. This means the server may - * at any time use those fds to import the dmabuf into any kernel - * sub-system that might accept it. - * - * To create a wl_buffer from one or more dmabufs, a client creates a - * zwp_linux_dmabuf_params_v1 object with a zwp_linux_dmabuf_v1.create_params - * request. All planes required by the intended format are added with - * the 'add' request. Finally, a 'create' or 'create_immed' request is - * issued, which has the following outcome depending on the import success. - * - * The 'create' request, - * - on success, triggers a 'created' event which provides the final - * wl_buffer to the client. - * - on failure, triggers a 'failed' event to convey that the server - * cannot use the dmabufs received from the client. - * - * For the 'create_immed' request, - * - on success, the server immediately imports the added dmabufs to - * create a wl_buffer. No event is sent from the server in this case. - * - on failure, the server can choose to either: - * - terminate the client by raising a fatal error. - * - mark the wl_buffer as failed, and send a 'failed' event to the - * client. If the client uses a failed wl_buffer as an argument to any - * request, the behaviour is compositor implementation-defined. - * - * Warning! The protocol described in this file is experimental and - * backward incompatible changes may be made. Backward compatible changes - * may be added together with the corresponding interface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and interface names and resetting the interface version. - * Once the protocol is to be declared stable, the 'z' prefix and the - * version number in the protocol and interface names are removed and the - * interface version number is reset. - */ -extern const struct wl_interface zwp_linux_dmabuf_v1_interface; -/** - * @page page_iface_zwp_linux_buffer_params_v1 zwp_linux_buffer_params_v1 - * @section page_iface_zwp_linux_buffer_params_v1_desc Description - * - * 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. - * @section page_iface_zwp_linux_buffer_params_v1_api API - * See @ref iface_zwp_linux_buffer_params_v1. - */ -/** - * @defgroup iface_zwp_linux_buffer_params_v1 The zwp_linux_buffer_params_v1 interface - * - * 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. - */ -extern const struct wl_interface zwp_linux_buffer_params_v1_interface; - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - * @struct zwp_linux_dmabuf_v1_interface - */ -struct zwp_linux_dmabuf_v1_interface { - /** - * unbind the factory - * - * Objects created through this interface, especially wl_buffers, - * will remain valid. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * create a temporary object for buffer parameters - * - * 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. - * @param params_id the new temporary - */ - void (*create_params)(struct wl_client *client, - struct wl_resource *resource, - uint32_t params_id); -}; - -#define ZWP_LINUX_DMABUF_V1_FORMAT 0 -#define ZWP_LINUX_DMABUF_V1_MODIFIER 1 - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ -#define ZWP_LINUX_DMABUF_V1_FORMAT_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ -#define ZWP_LINUX_DMABUF_V1_MODIFIER_SINCE_VERSION 3 - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ -#define ZWP_LINUX_DMABUF_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ -#define ZWP_LINUX_DMABUF_V1_CREATE_PARAMS_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - * Sends an format event to the client owning the resource. - * @param resource_ The client's resource - * @param format DRM_FORMAT code - */ -static inline void -zwp_linux_dmabuf_v1_send_format(struct wl_resource *resource_, uint32_t format) -{ - wl_resource_post_event(resource_, ZWP_LINUX_DMABUF_V1_FORMAT, format); -} - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - * Sends an modifier event to the client owning the resource. - * @param resource_ The client's resource - * @param format DRM_FORMAT code - * @param modifier_hi high 32 bits of layout modifier - * @param modifier_lo low 32 bits of layout modifier - */ -static inline void -zwp_linux_dmabuf_v1_send_modifier(struct wl_resource *resource_, uint32_t format, uint32_t modifier_hi, uint32_t modifier_lo) -{ - wl_resource_post_event(resource_, ZWP_LINUX_DMABUF_V1_MODIFIER, format, modifier_hi, modifier_lo); -} - -#ifndef ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM -#define ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM -enum zwp_linux_buffer_params_v1_error { - /** - * the dmabuf_batch object has already been used to create a wl_buffer - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ALREADY_USED = 0, - /** - * plane index out of bounds - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_PLANE_IDX = 1, - /** - * the plane index was already set - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_PLANE_SET = 2, - /** - * missing or too many planes to create a buffer - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INCOMPLETE = 3, - /** - * format not supported - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_FORMAT = 4, - /** - * invalid width or height - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_DIMENSIONS = 5, - /** - * offset + stride * height goes out of dmabuf bounds - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_OUT_OF_BOUNDS = 6, - /** - * invalid wl_buffer resulted from importing dmabufs via the create_immed request on given buffer_params - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_WL_BUFFER = 7, -}; -#endif /* ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM */ - -#ifndef ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM -#define ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM -enum zwp_linux_buffer_params_v1_flags { - /** - * contents are y-inverted - */ - ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT = 1, - /** - * content is interlaced - */ - ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_INTERLACED = 2, - /** - * bottom field first - */ - ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_BOTTOM_FIRST = 4, -}; -#endif /* ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM */ - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * @struct zwp_linux_buffer_params_v1_interface - */ -struct zwp_linux_buffer_params_v1_interface { - /** - * delete this object, used or not - * - * Cleans up the temporary data sent to the server for - * dmabuf-based wl_buffer creation. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * add a dmabuf to the temporary set - * - * 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. - * - * 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. - * @param fd dmabuf fd - * @param plane_idx plane index - * @param offset offset in bytes - * @param stride stride in bytes - * @param modifier_hi high 32 bits of layout modifier - * @param modifier_lo low 32 bits of layout modifier - */ - void (*add)(struct wl_client *client, - struct wl_resource *resource, - int32_t fd, - uint32_t plane_idx, - uint32_t offset, - uint32_t stride, - uint32_t modifier_hi, - uint32_t modifier_lo); - /** - * create a wl_buffer from the given dmabufs - * - * 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. - * @param width base plane width in pixels - * @param height base plane height in pixels - * @param format DRM_FORMAT code - * @param flags see enum flags - */ - void (*create)(struct wl_client *client, - struct wl_resource *resource, - int32_t width, - int32_t height, - uint32_t format, - uint32_t flags); - /** - * immediately create a wl_buffer from the given dmabufs - * - * This asks for immediate creation of a wl_buffer by importing - * the added dmabufs. - * - * In case of import success, no event is sent from the server, and - * the wl_buffer is ready to be used by the client. - * - * Upon import failure, either of the following may happen, as seen - * fit by the implementation: - the client is terminated with one - * of the following fatal protocol errors: - INCOMPLETE, - * INVALID_FORMAT, INVALID_DIMENSIONS, OUT_OF_BOUNDS, in case of - * argument errors such as mismatch between the number of planes - * and the format, bad format, non-positive width or height, or bad - * offset or stride. - INVALID_WL_BUFFER, in case the cause for - * failure is unknown or plaform specific. - the server creates an - * invalid wl_buffer, marks it as failed and sends a 'failed' event - * to the client. The result of using this invalid wl_buffer as an - * argument in any request by the client is defined by the - * compositor implementation. - * - * This takes the same arguments as a 'create' request, and obeys - * the same restrictions. - * @param buffer_id id for the newly created wl_buffer - * @param width base plane width in pixels - * @param height base plane height in pixels - * @param format DRM_FORMAT code - * @param flags see enum flags - * @since 2 - */ - void (*create_immed)(struct wl_client *client, - struct wl_resource *resource, - uint32_t buffer_id, - int32_t width, - int32_t height, - uint32_t format, - uint32_t flags); -}; - -#define ZWP_LINUX_BUFFER_PARAMS_V1_CREATED 0 -#define ZWP_LINUX_BUFFER_PARAMS_V1_FAILED 1 - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_CREATED_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_FAILED_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_ADD_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_CREATE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_CREATE_IMMED_SINCE_VERSION 2 - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * Sends an created event to the client owning the resource. - * @param resource_ The client's resource - * @param buffer the newly created wl_buffer - */ -static inline void -zwp_linux_buffer_params_v1_send_created(struct wl_resource *resource_, struct wl_resource *buffer) -{ - wl_resource_post_event(resource_, ZWP_LINUX_BUFFER_PARAMS_V1_CREATED, buffer); -} - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * Sends an failed event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zwp_linux_buffer_params_v1_send_failed(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, ZWP_LINUX_BUFFER_PARAMS_V1_FAILED); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/pointer-gestures-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/pointer-gestures-unstable-v1-client-protocol.h deleted file mode 100644 index 415dd83001a..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/pointer-gestures-unstable-v1-client-protocol.h +++ /dev/null @@ -1,484 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef POINTER_GESTURES_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define POINTER_GESTURES_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_pointer_gestures_unstable_v1 The pointer_gestures_unstable_v1 protocol - * @section page_ifaces_pointer_gestures_unstable_v1 Interfaces - * - @subpage page_iface_zwp_pointer_gestures_v1 - touchpad gestures - * - @subpage page_iface_zwp_pointer_gesture_swipe_v1 - a swipe gesture object - * - @subpage page_iface_zwp_pointer_gesture_pinch_v1 - a pinch gesture object - */ -struct wl_pointer; -struct wl_surface; -struct zwp_pointer_gesture_pinch_v1; -struct zwp_pointer_gesture_swipe_v1; -struct zwp_pointer_gestures_v1; - -/** - * @page page_iface_zwp_pointer_gestures_v1 zwp_pointer_gestures_v1 - * @section page_iface_zwp_pointer_gestures_v1_desc Description - * - * A global interface to provide semantic touchpad gestures for a given - * pointer. - * - * Two gestures are currently supported: swipe and zoom/rotate. - * All gestures follow a three-stage cycle: begin, update, end and - * are identified by a unique id. - * - * Warning! The protocol described in this file is experimental and - * backward incompatible changes may be made. Backward compatible changes - * may be added together with the corresponding interface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and interface names and resetting the interface version. - * Once the protocol is to be declared stable, the 'z' prefix and the - * version number in the protocol and interface names are removed and the - * interface version number is reset. - * @section page_iface_zwp_pointer_gestures_v1_api API - * See @ref iface_zwp_pointer_gestures_v1. - */ -/** - * @defgroup iface_zwp_pointer_gestures_v1 The zwp_pointer_gestures_v1 interface - * - * A global interface to provide semantic touchpad gestures for a given - * pointer. - * - * Two gestures are currently supported: swipe and zoom/rotate. - * All gestures follow a three-stage cycle: begin, update, end and - * are identified by a unique id. - * - * Warning! The protocol described in this file is experimental and - * backward incompatible changes may be made. Backward compatible changes - * may be added together with the corresponding interface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and interface names and resetting the interface version. - * Once the protocol is to be declared stable, the 'z' prefix and the - * version number in the protocol and interface names are removed and the - * interface version number is reset. - */ -extern const struct wl_interface zwp_pointer_gestures_v1_interface; -/** - * @page page_iface_zwp_pointer_gesture_swipe_v1 zwp_pointer_gesture_swipe_v1 - * @section page_iface_zwp_pointer_gesture_swipe_v1_desc Description - * - * A swipe gesture object notifies a client about a multi-finger swipe - * gesture detected on an indirect input device such as a touchpad. - * The gesture is usually initiated by multiple fingers moving in the - * same direction but once initiated the direction may change. - * The precise conditions of when such a gesture is detected are - * implementation-dependent. - * - * A gesture consists of three stages: begin, update (optional) and end. - * There cannot be multiple simultaneous pinch or swipe gestures on a - * same pointer/seat, how compositors prevent these situations is - * implementation-dependent. - * - * A gesture may be cancelled by the compositor or the hardware. - * Clients should not consider performing permanent or irreversible - * actions until the end of a gesture has been received. - * @section page_iface_zwp_pointer_gesture_swipe_v1_api API - * See @ref iface_zwp_pointer_gesture_swipe_v1. - */ -/** - * @defgroup iface_zwp_pointer_gesture_swipe_v1 The zwp_pointer_gesture_swipe_v1 interface - * - * A swipe gesture object notifies a client about a multi-finger swipe - * gesture detected on an indirect input device such as a touchpad. - * The gesture is usually initiated by multiple fingers moving in the - * same direction but once initiated the direction may change. - * The precise conditions of when such a gesture is detected are - * implementation-dependent. - * - * A gesture consists of three stages: begin, update (optional) and end. - * There cannot be multiple simultaneous pinch or swipe gestures on a - * same pointer/seat, how compositors prevent these situations is - * implementation-dependent. - * - * A gesture may be cancelled by the compositor or the hardware. - * Clients should not consider performing permanent or irreversible - * actions until the end of a gesture has been received. - */ -extern const struct wl_interface zwp_pointer_gesture_swipe_v1_interface; -/** - * @page page_iface_zwp_pointer_gesture_pinch_v1 zwp_pointer_gesture_pinch_v1 - * @section page_iface_zwp_pointer_gesture_pinch_v1_desc Description - * - * A pinch gesture object notifies a client about a multi-finger pinch - * gesture detected on an indirect input device such as a touchpad. - * The gesture is usually initiated by multiple fingers moving towards - * each other or away from each other, or by two or more fingers rotating - * around a logical center of gravity. The precise conditions of when - * such a gesture is detected are implementation-dependent. - * - * A gesture consists of three stages: begin, update (optional) and end. - * There cannot be multiple simultaneous pinch or swipe gestures on a - * same pointer/seat, how compositors prevent these situations is - * implementation-dependent. - * - * A gesture may be cancelled by the compositor or the hardware. - * Clients should not consider performing permanent or irreversible - * actions until the end of a gesture has been received. - * @section page_iface_zwp_pointer_gesture_pinch_v1_api API - * See @ref iface_zwp_pointer_gesture_pinch_v1. - */ -/** - * @defgroup iface_zwp_pointer_gesture_pinch_v1 The zwp_pointer_gesture_pinch_v1 interface - * - * A pinch gesture object notifies a client about a multi-finger pinch - * gesture detected on an indirect input device such as a touchpad. - * The gesture is usually initiated by multiple fingers moving towards - * each other or away from each other, or by two or more fingers rotating - * around a logical center of gravity. The precise conditions of when - * such a gesture is detected are implementation-dependent. - * - * A gesture consists of three stages: begin, update (optional) and end. - * There cannot be multiple simultaneous pinch or swipe gestures on a - * same pointer/seat, how compositors prevent these situations is - * implementation-dependent. - * - * A gesture may be cancelled by the compositor or the hardware. - * Clients should not consider performing permanent or irreversible - * actions until the end of a gesture has been received. - */ -extern const struct wl_interface zwp_pointer_gesture_pinch_v1_interface; - -#define ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE 0 -#define ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE 1 - - -/** - * @ingroup iface_zwp_pointer_gestures_v1 - */ -#define ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_gestures_v1 - */ -#define ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE_SINCE_VERSION 1 - -/** @ingroup iface_zwp_pointer_gestures_v1 */ -static inline void -zwp_pointer_gestures_v1_set_user_data(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zwp_pointer_gestures_v1, user_data); -} - -/** @ingroup iface_zwp_pointer_gestures_v1 */ -static inline void * -zwp_pointer_gestures_v1_get_user_data(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zwp_pointer_gestures_v1); -} - -static inline uint32_t -zwp_pointer_gestures_v1_get_version(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gestures_v1); -} - -/** @ingroup iface_zwp_pointer_gestures_v1 */ -static inline void -zwp_pointer_gestures_v1_destroy(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1) -{ - wl_proxy_destroy((struct wl_proxy *) zwp_pointer_gestures_v1); -} - -/** - * @ingroup iface_zwp_pointer_gestures_v1 - * - * Create a swipe gesture object. See the - * wl_pointer_gesture_swipe interface for details. - */ -static inline struct zwp_pointer_gesture_swipe_v1 * -zwp_pointer_gestures_v1_get_swipe_gesture(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1, struct wl_pointer *pointer) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_pointer_gestures_v1, - ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE, &zwp_pointer_gesture_swipe_v1_interface, NULL, pointer); - - return (struct zwp_pointer_gesture_swipe_v1 *) id; -} - -/** - * @ingroup iface_zwp_pointer_gestures_v1 - * - * Create a pinch gesture object. See the - * wl_pointer_gesture_pinch interface for details. - */ -static inline struct zwp_pointer_gesture_pinch_v1 * -zwp_pointer_gestures_v1_get_pinch_gesture(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1, struct wl_pointer *pointer) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_pointer_gestures_v1, - ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE, &zwp_pointer_gesture_pinch_v1_interface, NULL, pointer); - - return (struct zwp_pointer_gesture_pinch_v1 *) id; -} - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - * @struct zwp_pointer_gesture_swipe_v1_listener - */ -struct zwp_pointer_gesture_swipe_v1_listener { - /** - * multi-finger swipe begin - * - * This event is sent when a multi-finger swipe gesture is - * detected on the device. - * @param time timestamp with millisecond granularity - * @param fingers number of fingers - */ - void (*begin)(void *data, - struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1, - uint32_t serial, - uint32_t time, - struct wl_surface *surface, - uint32_t fingers); - /** - * multi-finger swipe motion - * - * 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. - * @param time timestamp with millisecond granularity - * @param dx delta x coordinate in surface coordinate space - * @param dy delta y coordinate in surface coordinate space - */ - void (*update)(void *data, - struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1, - uint32_t time, - wl_fixed_t dx, - wl_fixed_t dy); - /** - * multi-finger swipe end - * - * 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. - * @param time timestamp with millisecond granularity - * @param cancelled 1 if the gesture was cancelled, 0 otherwise - */ - void (*end)(void *data, - struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1, - uint32_t serial, - uint32_t time, - int32_t cancelled); -}; - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - */ -static inline int -zwp_pointer_gesture_swipe_v1_add_listener(struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1, - const struct zwp_pointer_gesture_swipe_v1_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zwp_pointer_gesture_swipe_v1, - (void (**)(void)) listener, data); -} - -#define ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY 0 - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - */ -#define ZWP_POINTER_GESTURE_SWIPE_V1_BEGIN_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - */ -#define ZWP_POINTER_GESTURE_SWIPE_V1_UPDATE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - */ -#define ZWP_POINTER_GESTURE_SWIPE_V1_END_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - */ -#define ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zwp_pointer_gesture_swipe_v1 */ -static inline void -zwp_pointer_gesture_swipe_v1_set_user_data(struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zwp_pointer_gesture_swipe_v1, user_data); -} - -/** @ingroup iface_zwp_pointer_gesture_swipe_v1 */ -static inline void * -zwp_pointer_gesture_swipe_v1_get_user_data(struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zwp_pointer_gesture_swipe_v1); -} - -static inline uint32_t -zwp_pointer_gesture_swipe_v1_get_version(struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gesture_swipe_v1); -} - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - */ -static inline void -zwp_pointer_gesture_swipe_v1_destroy(struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zwp_pointer_gesture_swipe_v1, - ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zwp_pointer_gesture_swipe_v1); -} - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - * @struct zwp_pointer_gesture_pinch_v1_listener - */ -struct zwp_pointer_gesture_pinch_v1_listener { - /** - * multi-finger pinch begin - * - * This event is sent when a multi-finger pinch gesture is - * detected on the device. - * @param time timestamp with millisecond granularity - * @param fingers number of fingers - */ - void (*begin)(void *data, - struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1, - uint32_t serial, - uint32_t time, - struct wl_surface *surface, - uint32_t fingers); - /** - * multi-finger pinch motion - * - * 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. - * @param time timestamp with millisecond granularity - * @param dx delta x coordinate in surface coordinate space - * @param dy delta y coordinate in surface coordinate space - * @param scale scale relative to the initial finger position - * @param rotation angle in degrees cw relative to the previous event - */ - void (*update)(void *data, - struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1, - uint32_t time, - wl_fixed_t dx, - wl_fixed_t dy, - wl_fixed_t scale, - wl_fixed_t rotation); - /** - * multi-finger pinch end - * - * 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. - * @param time timestamp with millisecond granularity - * @param cancelled 1 if the gesture was cancelled, 0 otherwise - */ - void (*end)(void *data, - struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1, - uint32_t serial, - uint32_t time, - int32_t cancelled); -}; - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - */ -static inline int -zwp_pointer_gesture_pinch_v1_add_listener(struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1, - const struct zwp_pointer_gesture_pinch_v1_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zwp_pointer_gesture_pinch_v1, - (void (**)(void)) listener, data); -} - -#define ZWP_POINTER_GESTURE_PINCH_V1_DESTROY 0 - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - */ -#define ZWP_POINTER_GESTURE_PINCH_V1_BEGIN_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - */ -#define ZWP_POINTER_GESTURE_PINCH_V1_UPDATE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - */ -#define ZWP_POINTER_GESTURE_PINCH_V1_END_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - */ -#define ZWP_POINTER_GESTURE_PINCH_V1_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zwp_pointer_gesture_pinch_v1 */ -static inline void -zwp_pointer_gesture_pinch_v1_set_user_data(struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zwp_pointer_gesture_pinch_v1, user_data); -} - -/** @ingroup iface_zwp_pointer_gesture_pinch_v1 */ -static inline void * -zwp_pointer_gesture_pinch_v1_get_user_data(struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zwp_pointer_gesture_pinch_v1); -} - -static inline uint32_t -zwp_pointer_gesture_pinch_v1_get_version(struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gesture_pinch_v1); -} - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - */ -static inline void -zwp_pointer_gesture_pinch_v1_destroy(struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zwp_pointer_gesture_pinch_v1, - ZWP_POINTER_GESTURE_PINCH_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zwp_pointer_gesture_pinch_v1); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/pointer-gestures-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/pointer-gestures-unstable-v1-server-protocol.h deleted file mode 100644 index 51e5e79cf67..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/pointer-gestures-unstable-v1-server-protocol.h +++ /dev/null @@ -1,352 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef POINTER_GESTURES_UNSTABLE_V1_SERVER_PROTOCOL_H -#define POINTER_GESTURES_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_pointer_gestures_unstable_v1 The pointer_gestures_unstable_v1 protocol - * @section page_ifaces_pointer_gestures_unstable_v1 Interfaces - * - @subpage page_iface_zwp_pointer_gestures_v1 - touchpad gestures - * - @subpage page_iface_zwp_pointer_gesture_swipe_v1 - a swipe gesture object - * - @subpage page_iface_zwp_pointer_gesture_pinch_v1 - a pinch gesture object - */ -struct wl_pointer; -struct wl_surface; -struct zwp_pointer_gesture_pinch_v1; -struct zwp_pointer_gesture_swipe_v1; -struct zwp_pointer_gestures_v1; - -/** - * @page page_iface_zwp_pointer_gestures_v1 zwp_pointer_gestures_v1 - * @section page_iface_zwp_pointer_gestures_v1_desc Description - * - * A global interface to provide semantic touchpad gestures for a given - * pointer. - * - * Two gestures are currently supported: swipe and zoom/rotate. - * All gestures follow a three-stage cycle: begin, update, end and - * are identified by a unique id. - * - * Warning! The protocol described in this file is experimental and - * backward incompatible changes may be made. Backward compatible changes - * may be added together with the corresponding interface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and interface names and resetting the interface version. - * Once the protocol is to be declared stable, the 'z' prefix and the - * version number in the protocol and interface names are removed and the - * interface version number is reset. - * @section page_iface_zwp_pointer_gestures_v1_api API - * See @ref iface_zwp_pointer_gestures_v1. - */ -/** - * @defgroup iface_zwp_pointer_gestures_v1 The zwp_pointer_gestures_v1 interface - * - * A global interface to provide semantic touchpad gestures for a given - * pointer. - * - * Two gestures are currently supported: swipe and zoom/rotate. - * All gestures follow a three-stage cycle: begin, update, end and - * are identified by a unique id. - * - * Warning! The protocol described in this file is experimental and - * backward incompatible changes may be made. Backward compatible changes - * may be added together with the corresponding interface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and interface names and resetting the interface version. - * Once the protocol is to be declared stable, the 'z' prefix and the - * version number in the protocol and interface names are removed and the - * interface version number is reset. - */ -extern const struct wl_interface zwp_pointer_gestures_v1_interface; -/** - * @page page_iface_zwp_pointer_gesture_swipe_v1 zwp_pointer_gesture_swipe_v1 - * @section page_iface_zwp_pointer_gesture_swipe_v1_desc Description - * - * A swipe gesture object notifies a client about a multi-finger swipe - * gesture detected on an indirect input device such as a touchpad. - * The gesture is usually initiated by multiple fingers moving in the - * same direction but once initiated the direction may change. - * The precise conditions of when such a gesture is detected are - * implementation-dependent. - * - * A gesture consists of three stages: begin, update (optional) and end. - * There cannot be multiple simultaneous pinch or swipe gestures on a - * same pointer/seat, how compositors prevent these situations is - * implementation-dependent. - * - * A gesture may be cancelled by the compositor or the hardware. - * Clients should not consider performing permanent or irreversible - * actions until the end of a gesture has been received. - * @section page_iface_zwp_pointer_gesture_swipe_v1_api API - * See @ref iface_zwp_pointer_gesture_swipe_v1. - */ -/** - * @defgroup iface_zwp_pointer_gesture_swipe_v1 The zwp_pointer_gesture_swipe_v1 interface - * - * A swipe gesture object notifies a client about a multi-finger swipe - * gesture detected on an indirect input device such as a touchpad. - * The gesture is usually initiated by multiple fingers moving in the - * same direction but once initiated the direction may change. - * The precise conditions of when such a gesture is detected are - * implementation-dependent. - * - * A gesture consists of three stages: begin, update (optional) and end. - * There cannot be multiple simultaneous pinch or swipe gestures on a - * same pointer/seat, how compositors prevent these situations is - * implementation-dependent. - * - * A gesture may be cancelled by the compositor or the hardware. - * Clients should not consider performing permanent or irreversible - * actions until the end of a gesture has been received. - */ -extern const struct wl_interface zwp_pointer_gesture_swipe_v1_interface; -/** - * @page page_iface_zwp_pointer_gesture_pinch_v1 zwp_pointer_gesture_pinch_v1 - * @section page_iface_zwp_pointer_gesture_pinch_v1_desc Description - * - * A pinch gesture object notifies a client about a multi-finger pinch - * gesture detected on an indirect input device such as a touchpad. - * The gesture is usually initiated by multiple fingers moving towards - * each other or away from each other, or by two or more fingers rotating - * around a logical center of gravity. The precise conditions of when - * such a gesture is detected are implementation-dependent. - * - * A gesture consists of three stages: begin, update (optional) and end. - * There cannot be multiple simultaneous pinch or swipe gestures on a - * same pointer/seat, how compositors prevent these situations is - * implementation-dependent. - * - * A gesture may be cancelled by the compositor or the hardware. - * Clients should not consider performing permanent or irreversible - * actions until the end of a gesture has been received. - * @section page_iface_zwp_pointer_gesture_pinch_v1_api API - * See @ref iface_zwp_pointer_gesture_pinch_v1. - */ -/** - * @defgroup iface_zwp_pointer_gesture_pinch_v1 The zwp_pointer_gesture_pinch_v1 interface - * - * A pinch gesture object notifies a client about a multi-finger pinch - * gesture detected on an indirect input device such as a touchpad. - * The gesture is usually initiated by multiple fingers moving towards - * each other or away from each other, or by two or more fingers rotating - * around a logical center of gravity. The precise conditions of when - * such a gesture is detected are implementation-dependent. - * - * A gesture consists of three stages: begin, update (optional) and end. - * There cannot be multiple simultaneous pinch or swipe gestures on a - * same pointer/seat, how compositors prevent these situations is - * implementation-dependent. - * - * A gesture may be cancelled by the compositor or the hardware. - * Clients should not consider performing permanent or irreversible - * actions until the end of a gesture has been received. - */ -extern const struct wl_interface zwp_pointer_gesture_pinch_v1_interface; - -/** - * @ingroup iface_zwp_pointer_gestures_v1 - * @struct zwp_pointer_gestures_v1_interface - */ -struct zwp_pointer_gestures_v1_interface { - /** - * get swipe gesture - * - * Create a swipe gesture object. See the - * wl_pointer_gesture_swipe interface for details. - */ - void (*get_swipe_gesture)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *pointer); - /** - * get pinch gesture - * - * Create a pinch gesture object. See the - * wl_pointer_gesture_pinch interface for details. - */ - void (*get_pinch_gesture)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *pointer); -}; - - -/** - * @ingroup iface_zwp_pointer_gestures_v1 - */ -#define ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_gestures_v1 - */ -#define ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - * @struct zwp_pointer_gesture_swipe_v1_interface - */ -struct zwp_pointer_gesture_swipe_v1_interface { - /** - * destroy the pointer swipe gesture object - * - * - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZWP_POINTER_GESTURE_SWIPE_V1_BEGIN 0 -#define ZWP_POINTER_GESTURE_SWIPE_V1_UPDATE 1 -#define ZWP_POINTER_GESTURE_SWIPE_V1_END 2 - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - */ -#define ZWP_POINTER_GESTURE_SWIPE_V1_BEGIN_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - */ -#define ZWP_POINTER_GESTURE_SWIPE_V1_UPDATE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - */ -#define ZWP_POINTER_GESTURE_SWIPE_V1_END_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - */ -#define ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - * Sends an begin event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param fingers number of fingers - */ -static inline void -zwp_pointer_gesture_swipe_v1_send_begin(struct wl_resource *resource_, uint32_t serial, uint32_t time, struct wl_resource *surface, uint32_t fingers) -{ - wl_resource_post_event(resource_, ZWP_POINTER_GESTURE_SWIPE_V1_BEGIN, serial, time, surface, fingers); -} - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - * Sends an update event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param dx delta x coordinate in surface coordinate space - * @param dy delta y coordinate in surface coordinate space - */ -static inline void -zwp_pointer_gesture_swipe_v1_send_update(struct wl_resource *resource_, uint32_t time, wl_fixed_t dx, wl_fixed_t dy) -{ - wl_resource_post_event(resource_, ZWP_POINTER_GESTURE_SWIPE_V1_UPDATE, time, dx, dy); -} - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - * Sends an end event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param cancelled 1 if the gesture was cancelled, 0 otherwise - */ -static inline void -zwp_pointer_gesture_swipe_v1_send_end(struct wl_resource *resource_, uint32_t serial, uint32_t time, int32_t cancelled) -{ - wl_resource_post_event(resource_, ZWP_POINTER_GESTURE_SWIPE_V1_END, serial, time, cancelled); -} - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - * @struct zwp_pointer_gesture_pinch_v1_interface - */ -struct zwp_pointer_gesture_pinch_v1_interface { - /** - * destroy the pinch gesture object - * - * - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZWP_POINTER_GESTURE_PINCH_V1_BEGIN 0 -#define ZWP_POINTER_GESTURE_PINCH_V1_UPDATE 1 -#define ZWP_POINTER_GESTURE_PINCH_V1_END 2 - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - */ -#define ZWP_POINTER_GESTURE_PINCH_V1_BEGIN_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - */ -#define ZWP_POINTER_GESTURE_PINCH_V1_UPDATE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - */ -#define ZWP_POINTER_GESTURE_PINCH_V1_END_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - */ -#define ZWP_POINTER_GESTURE_PINCH_V1_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - * Sends an begin event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param fingers number of fingers - */ -static inline void -zwp_pointer_gesture_pinch_v1_send_begin(struct wl_resource *resource_, uint32_t serial, uint32_t time, struct wl_resource *surface, uint32_t fingers) -{ - wl_resource_post_event(resource_, ZWP_POINTER_GESTURE_PINCH_V1_BEGIN, serial, time, surface, fingers); -} - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - * Sends an update event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param dx delta x coordinate in surface coordinate space - * @param dy delta y coordinate in surface coordinate space - * @param scale scale relative to the initial finger position - * @param rotation angle in degrees cw relative to the previous event - */ -static inline void -zwp_pointer_gesture_pinch_v1_send_update(struct wl_resource *resource_, uint32_t time, wl_fixed_t dx, wl_fixed_t dy, wl_fixed_t scale, wl_fixed_t rotation) -{ - wl_resource_post_event(resource_, ZWP_POINTER_GESTURE_PINCH_V1_UPDATE, time, dx, dy, scale, rotation); -} - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - * Sends an end event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param cancelled 1 if the gesture was cancelled, 0 otherwise - */ -static inline void -zwp_pointer_gesture_pinch_v1_send_end(struct wl_resource *resource_, uint32_t serial, uint32_t time, int32_t cancelled) -{ - wl_resource_post_event(resource_, ZWP_POINTER_GESTURE_PINCH_V1_END, serial, time, cancelled); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/presentation-time-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/presentation-time-client-protocol.h deleted file mode 100644 index 23c2ae8cd4c..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/presentation-time-client-protocol.h +++ /dev/null @@ -1,497 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef PRESENTATION_TIME_CLIENT_PROTOCOL_H -#define PRESENTATION_TIME_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_presentation_time The presentation_time protocol - * @section page_ifaces_presentation_time Interfaces - * - @subpage page_iface_wp_presentation - timed presentation related wl_surface requests - * - @subpage page_iface_wp_presentation_feedback - presentation time feedback event - * @section page_copyright_presentation_time Copyright - * <pre> - * - * 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. - * </pre> - */ -struct wl_output; -struct wl_surface; -struct wp_presentation; -struct wp_presentation_feedback; - -/** - * @page page_iface_wp_presentation wp_presentation - * @section page_iface_wp_presentation_desc Description - * - * - * - * - * 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. - * @section page_iface_wp_presentation_api API - * See @ref iface_wp_presentation. - */ -/** - * @defgroup iface_wp_presentation The wp_presentation interface - * - * - * - * - * 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. - */ -extern const struct wl_interface wp_presentation_interface; -/** - * @page page_iface_wp_presentation_feedback wp_presentation_feedback - * @section page_iface_wp_presentation_feedback_desc Description - * - * 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. - * @section page_iface_wp_presentation_feedback_api API - * See @ref iface_wp_presentation_feedback. - */ -/** - * @defgroup iface_wp_presentation_feedback The wp_presentation_feedback interface - * - * 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. - */ -extern const struct wl_interface wp_presentation_feedback_interface; - -#ifndef WP_PRESENTATION_ERROR_ENUM -#define WP_PRESENTATION_ERROR_ENUM -/** - * @ingroup iface_wp_presentation - * fatal presentation errors - * - * These fatal protocol errors may be emitted in response to - * illegal presentation requests. - */ -enum wp_presentation_error { - /** - * invalid value in tv_nsec - */ - WP_PRESENTATION_ERROR_INVALID_TIMESTAMP = 0, - /** - * invalid flag - */ - WP_PRESENTATION_ERROR_INVALID_FLAG = 1, -}; -#endif /* WP_PRESENTATION_ERROR_ENUM */ - -/** - * @ingroup iface_wp_presentation - * @struct wp_presentation_listener - */ -struct wp_presentation_listener { - /** - * clock ID for timestamps - * - * This event tells the client in which clock domain the - * compositor interprets the timestamps used by the presentation - * extension. This clock is called the presentation clock. - * - * The compositor sends this event when the client binds to the - * presentation interface. The presentation clock does not change - * during the lifetime of the client connection. - * - * The clock identifier is platform dependent. On Linux/glibc, the - * identifier value is one of the clockid_t values accepted by - * clock_gettime(). clock_gettime() is defined by POSIX.1-2001. - * - * Timestamps in this clock domain are expressed as tv_sec_hi, - * tv_sec_lo, tv_nsec triples, each component being an unsigned - * 32-bit value. Whole seconds are in tv_sec which is a 64-bit - * value combined from tv_sec_hi and tv_sec_lo, and the additional - * fractional part in tv_nsec as nanoseconds. Hence, for valid - * timestamps tv_nsec must be in [0, 999999999]. - * - * Note that clock_id applies only to the presentation clock, and - * implies nothing about e.g. the timestamps used in the Wayland - * core protocol input events. - * - * Compositors should prefer a clock which does not jump and is not - * slewed e.g. by NTP. The absolute value of the clock is - * irrelevant. Precision of one millisecond or better is - * recommended. Clients must be able to query the current clock - * value directly, not by asking the compositor. - * @param clk_id platform clock identifier - */ - void (*clock_id)(void *data, - struct wp_presentation *wp_presentation, - uint32_t clk_id); -}; - -/** - * @ingroup iface_wp_presentation - */ -static inline int -wp_presentation_add_listener(struct wp_presentation *wp_presentation, - const struct wp_presentation_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wp_presentation, - (void (**)(void)) listener, data); -} - -#define WP_PRESENTATION_DESTROY 0 -#define WP_PRESENTATION_FEEDBACK 1 - -/** - * @ingroup iface_wp_presentation - */ -#define WP_PRESENTATION_CLOCK_ID_SINCE_VERSION 1 - -/** - * @ingroup iface_wp_presentation - */ -#define WP_PRESENTATION_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_presentation - */ -#define WP_PRESENTATION_FEEDBACK_SINCE_VERSION 1 - -/** @ingroup iface_wp_presentation */ -static inline void -wp_presentation_set_user_data(struct wp_presentation *wp_presentation, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wp_presentation, user_data); -} - -/** @ingroup iface_wp_presentation */ -static inline void * -wp_presentation_get_user_data(struct wp_presentation *wp_presentation) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wp_presentation); -} - -static inline uint32_t -wp_presentation_get_version(struct wp_presentation *wp_presentation) -{ - return wl_proxy_get_version((struct wl_proxy *) wp_presentation); -} - -/** - * @ingroup iface_wp_presentation - * - * Informs the server that the client will no longer be using - * this protocol object. Existing objects created by this object - * are not affected. - */ -static inline void -wp_presentation_destroy(struct wp_presentation *wp_presentation) -{ - wl_proxy_marshal((struct wl_proxy *) wp_presentation, - WP_PRESENTATION_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wp_presentation); -} - -/** - * @ingroup iface_wp_presentation - * - * 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. - */ -static inline struct wp_presentation_feedback * -wp_presentation_feedback(struct wp_presentation *wp_presentation, struct wl_surface *surface) -{ - struct wl_proxy *callback; - - callback = wl_proxy_marshal_constructor((struct wl_proxy *) wp_presentation, - WP_PRESENTATION_FEEDBACK, &wp_presentation_feedback_interface, surface, NULL); - - return (struct wp_presentation_feedback *) callback; -} - -#ifndef WP_PRESENTATION_FEEDBACK_KIND_ENUM -#define WP_PRESENTATION_FEEDBACK_KIND_ENUM -/** - * @ingroup iface_wp_presentation_feedback - * bitmask of flags in presented event - * - * These flags provide information about how the presentation of - * the related content update was done. The intent is to help - * clients assess the reliability of the feedback and the visual - * quality with respect to possible tearing and timings. The - * flags are: - * - * VSYNC: - * The presentation was synchronized to the "vertical retrace" by - * the display hardware such that tearing does not happen. - * Relying on user space scheduling is not acceptable for this - * flag. If presentation is done by a copy to the active - * frontbuffer, then it must guarantee that tearing cannot - * happen. - * - * HW_CLOCK: - * The display hardware provided measurements that the hardware - * driver converted into a presentation timestamp. Sampling a - * clock in user space is not acceptable for this flag. - * - * HW_COMPLETION: - * The display hardware signalled that it started using the new - * image content. The opposite of this is e.g. a timer being used - * to guess when the display hardware has switched to the new - * image content. - * - * ZERO_COPY: - * The presentation of this update was done zero-copy. This means - * the buffer from the client was given to display hardware as - * is, without copying it. Compositing with OpenGL counts as - * copying, even if textured directly from the client buffer. - * Possible zero-copy cases include direct scanout of a - * fullscreen surface and a surface on a hardware overlay. - */ -enum wp_presentation_feedback_kind { - /** - * presentation was vsync'd - */ - WP_PRESENTATION_FEEDBACK_KIND_VSYNC = 0x1, - /** - * hardware provided the presentation timestamp - */ - WP_PRESENTATION_FEEDBACK_KIND_HW_CLOCK = 0x2, - /** - * hardware signalled the start of the presentation - */ - WP_PRESENTATION_FEEDBACK_KIND_HW_COMPLETION = 0x4, - /** - * presentation was done zero-copy - */ - WP_PRESENTATION_FEEDBACK_KIND_ZERO_COPY = 0x8, -}; -#endif /* WP_PRESENTATION_FEEDBACK_KIND_ENUM */ - -/** - * @ingroup iface_wp_presentation_feedback - * @struct wp_presentation_feedback_listener - */ -struct wp_presentation_feedback_listener { - /** - * presentation synchronized to this output - * - * 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. - * @param output presentation output - */ - void (*sync_output)(void *data, - struct wp_presentation_feedback *wp_presentation_feedback, - struct wl_output *output); - /** - * the content update was displayed - * - * The associated content update was displayed to the user at the - * indicated time (tv_sec_hi/lo, tv_nsec). For the interpretation - * of the timestamp, see presentation.clock_id event. - * - * The timestamp corresponds to the time when the content update - * turned into light the first time on the surface's main output. - * Compositors may approximate this from the framebuffer flip - * completion events from the system, and the latency of the - * physical display path if known. - * - * This event is preceded by all related sync_output events telling - * which output's refresh cycle the feedback corresponds to, i.e. - * the main output for the surface. Compositors are recommended to - * choose the output containing the largest part of the wl_surface, - * or keeping the output they previously chose. Having a stable - * presentation output association helps clients predict future - * output refreshes (vblank). - * - * The 'refresh' argument gives the compositor's prediction of how - * many nanoseconds after tv_sec, tv_nsec the very next output - * refresh may occur. This is to further aid clients in predicting - * future refreshes, i.e., estimating the timestamps targeting the - * next few vblanks. If such prediction cannot usefully be done, - * the argument is zero. - * - * If the output does not have a constant refresh rate, explicit - * video mode switches excluded, then the refresh argument must be - * zero. - * - * The 64-bit value combined from seq_hi and seq_lo is the value of - * the output's vertical retrace counter when the content update - * was first scanned out to the display. This value must be - * compatible with the definition of MSC in GLX_OML_sync_control - * specification. Note, that if the display path has a non-zero - * latency, the time instant specified by this counter may differ - * from the timestamp's. - * - * If the output does not have a concept of vertical retrace or a - * refresh cycle, or the output device is self-refreshing without a - * way to query the refresh count, then the arguments seq_hi and - * seq_lo must be zero. - * @param tv_sec_hi high 32 bits of the seconds part of the presentation timestamp - * @param tv_sec_lo low 32 bits of the seconds part of the presentation timestamp - * @param tv_nsec nanoseconds part of the presentation timestamp - * @param refresh nanoseconds till next refresh - * @param seq_hi high 32 bits of refresh counter - * @param seq_lo low 32 bits of refresh counter - * @param flags combination of 'kind' values - */ - void (*presented)(void *data, - struct wp_presentation_feedback *wp_presentation_feedback, - uint32_t tv_sec_hi, - uint32_t tv_sec_lo, - uint32_t tv_nsec, - uint32_t refresh, - uint32_t seq_hi, - uint32_t seq_lo, - uint32_t flags); - /** - * the content update was not displayed - * - * The content update was never displayed to the user. - */ - void (*discarded)(void *data, - struct wp_presentation_feedback *wp_presentation_feedback); -}; - -/** - * @ingroup iface_wp_presentation_feedback - */ -static inline int -wp_presentation_feedback_add_listener(struct wp_presentation_feedback *wp_presentation_feedback, - const struct wp_presentation_feedback_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wp_presentation_feedback, - (void (**)(void)) listener, data); -} - -/** - * @ingroup iface_wp_presentation_feedback - */ -#define WP_PRESENTATION_FEEDBACK_SYNC_OUTPUT_SINCE_VERSION 1 -/** - * @ingroup iface_wp_presentation_feedback - */ -#define WP_PRESENTATION_FEEDBACK_PRESENTED_SINCE_VERSION 1 -/** - * @ingroup iface_wp_presentation_feedback - */ -#define WP_PRESENTATION_FEEDBACK_DISCARDED_SINCE_VERSION 1 - - -/** @ingroup iface_wp_presentation_feedback */ -static inline void -wp_presentation_feedback_set_user_data(struct wp_presentation_feedback *wp_presentation_feedback, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wp_presentation_feedback, user_data); -} - -/** @ingroup iface_wp_presentation_feedback */ -static inline void * -wp_presentation_feedback_get_user_data(struct wp_presentation_feedback *wp_presentation_feedback) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wp_presentation_feedback); -} - -static inline uint32_t -wp_presentation_feedback_get_version(struct wp_presentation_feedback *wp_presentation_feedback) -{ - return wl_proxy_get_version((struct wl_proxy *) wp_presentation_feedback); -} - -/** @ingroup iface_wp_presentation_feedback */ -static inline void -wp_presentation_feedback_destroy(struct wp_presentation_feedback *wp_presentation_feedback) -{ - wl_proxy_destroy((struct wl_proxy *) wp_presentation_feedback); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/presentation-time-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/presentation-time-server-protocol.h deleted file mode 100644 index d2e24ddf07d..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/presentation-time-server-protocol.h +++ /dev/null @@ -1,349 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef PRESENTATION_TIME_SERVER_PROTOCOL_H -#define PRESENTATION_TIME_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_presentation_time The presentation_time protocol - * @section page_ifaces_presentation_time Interfaces - * - @subpage page_iface_wp_presentation - timed presentation related wl_surface requests - * - @subpage page_iface_wp_presentation_feedback - presentation time feedback event - * @section page_copyright_presentation_time Copyright - * <pre> - * - * 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. - * </pre> - */ -struct wl_output; -struct wl_surface; -struct wp_presentation; -struct wp_presentation_feedback; - -/** - * @page page_iface_wp_presentation wp_presentation - * @section page_iface_wp_presentation_desc Description - * - * - * - * - * 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. - * @section page_iface_wp_presentation_api API - * See @ref iface_wp_presentation. - */ -/** - * @defgroup iface_wp_presentation The wp_presentation interface - * - * - * - * - * 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. - */ -extern const struct wl_interface wp_presentation_interface; -/** - * @page page_iface_wp_presentation_feedback wp_presentation_feedback - * @section page_iface_wp_presentation_feedback_desc Description - * - * 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. - * @section page_iface_wp_presentation_feedback_api API - * See @ref iface_wp_presentation_feedback. - */ -/** - * @defgroup iface_wp_presentation_feedback The wp_presentation_feedback interface - * - * 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. - */ -extern const struct wl_interface wp_presentation_feedback_interface; - -#ifndef WP_PRESENTATION_ERROR_ENUM -#define WP_PRESENTATION_ERROR_ENUM -/** - * @ingroup iface_wp_presentation - * fatal presentation errors - * - * These fatal protocol errors may be emitted in response to - * illegal presentation requests. - */ -enum wp_presentation_error { - /** - * invalid value in tv_nsec - */ - WP_PRESENTATION_ERROR_INVALID_TIMESTAMP = 0, - /** - * invalid flag - */ - WP_PRESENTATION_ERROR_INVALID_FLAG = 1, -}; -#endif /* WP_PRESENTATION_ERROR_ENUM */ - -/** - * @ingroup iface_wp_presentation - * @struct wp_presentation_interface - */ -struct wp_presentation_interface { - /** - * unbind from the presentation interface - * - * Informs the server that the client will no longer be using - * this protocol object. Existing objects created by this object - * are not affected. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * request presentation feedback information - * - * 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. - * @param surface target surface - * @param callback new feedback object - */ - void (*feedback)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *surface, - uint32_t callback); -}; - -#define WP_PRESENTATION_CLOCK_ID 0 - -/** - * @ingroup iface_wp_presentation - */ -#define WP_PRESENTATION_CLOCK_ID_SINCE_VERSION 1 - -/** - * @ingroup iface_wp_presentation - */ -#define WP_PRESENTATION_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_presentation - */ -#define WP_PRESENTATION_FEEDBACK_SINCE_VERSION 1 - -/** - * @ingroup iface_wp_presentation - * Sends an clock_id event to the client owning the resource. - * @param resource_ The client's resource - * @param clk_id platform clock identifier - */ -static inline void -wp_presentation_send_clock_id(struct wl_resource *resource_, uint32_t clk_id) -{ - wl_resource_post_event(resource_, WP_PRESENTATION_CLOCK_ID, clk_id); -} - -#ifndef WP_PRESENTATION_FEEDBACK_KIND_ENUM -#define WP_PRESENTATION_FEEDBACK_KIND_ENUM -/** - * @ingroup iface_wp_presentation_feedback - * bitmask of flags in presented event - * - * These flags provide information about how the presentation of - * the related content update was done. The intent is to help - * clients assess the reliability of the feedback and the visual - * quality with respect to possible tearing and timings. The - * flags are: - * - * VSYNC: - * The presentation was synchronized to the "vertical retrace" by - * the display hardware such that tearing does not happen. - * Relying on user space scheduling is not acceptable for this - * flag. If presentation is done by a copy to the active - * frontbuffer, then it must guarantee that tearing cannot - * happen. - * - * HW_CLOCK: - * The display hardware provided measurements that the hardware - * driver converted into a presentation timestamp. Sampling a - * clock in user space is not acceptable for this flag. - * - * HW_COMPLETION: - * The display hardware signalled that it started using the new - * image content. The opposite of this is e.g. a timer being used - * to guess when the display hardware has switched to the new - * image content. - * - * ZERO_COPY: - * The presentation of this update was done zero-copy. This means - * the buffer from the client was given to display hardware as - * is, without copying it. Compositing with OpenGL counts as - * copying, even if textured directly from the client buffer. - * Possible zero-copy cases include direct scanout of a - * fullscreen surface and a surface on a hardware overlay. - */ -enum wp_presentation_feedback_kind { - /** - * presentation was vsync'd - */ - WP_PRESENTATION_FEEDBACK_KIND_VSYNC = 0x1, - /** - * hardware provided the presentation timestamp - */ - WP_PRESENTATION_FEEDBACK_KIND_HW_CLOCK = 0x2, - /** - * hardware signalled the start of the presentation - */ - WP_PRESENTATION_FEEDBACK_KIND_HW_COMPLETION = 0x4, - /** - * presentation was done zero-copy - */ - WP_PRESENTATION_FEEDBACK_KIND_ZERO_COPY = 0x8, -}; -#endif /* WP_PRESENTATION_FEEDBACK_KIND_ENUM */ - -#define WP_PRESENTATION_FEEDBACK_SYNC_OUTPUT 0 -#define WP_PRESENTATION_FEEDBACK_PRESENTED 1 -#define WP_PRESENTATION_FEEDBACK_DISCARDED 2 - -/** - * @ingroup iface_wp_presentation_feedback - */ -#define WP_PRESENTATION_FEEDBACK_SYNC_OUTPUT_SINCE_VERSION 1 -/** - * @ingroup iface_wp_presentation_feedback - */ -#define WP_PRESENTATION_FEEDBACK_PRESENTED_SINCE_VERSION 1 -/** - * @ingroup iface_wp_presentation_feedback - */ -#define WP_PRESENTATION_FEEDBACK_DISCARDED_SINCE_VERSION 1 - - -/** - * @ingroup iface_wp_presentation_feedback - * Sends an sync_output event to the client owning the resource. - * @param resource_ The client's resource - * @param output presentation output - */ -static inline void -wp_presentation_feedback_send_sync_output(struct wl_resource *resource_, struct wl_resource *output) -{ - wl_resource_post_event(resource_, WP_PRESENTATION_FEEDBACK_SYNC_OUTPUT, output); -} - -/** - * @ingroup iface_wp_presentation_feedback - * Sends an presented event to the client owning the resource. - * @param resource_ The client's resource - * @param tv_sec_hi high 32 bits of the seconds part of the presentation timestamp - * @param tv_sec_lo low 32 bits of the seconds part of the presentation timestamp - * @param tv_nsec nanoseconds part of the presentation timestamp - * @param refresh nanoseconds till next refresh - * @param seq_hi high 32 bits of refresh counter - * @param seq_lo low 32 bits of refresh counter - * @param flags combination of 'kind' values - */ -static inline void -wp_presentation_feedback_send_presented(struct wl_resource *resource_, uint32_t tv_sec_hi, uint32_t tv_sec_lo, uint32_t tv_nsec, uint32_t refresh, uint32_t seq_hi, uint32_t seq_lo, uint32_t flags) -{ - wl_resource_post_event(resource_, WP_PRESENTATION_FEEDBACK_PRESENTED, tv_sec_hi, tv_sec_lo, tv_nsec, refresh, seq_hi, seq_lo, flags); -} - -/** - * @ingroup iface_wp_presentation_feedback - * Sends an discarded event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wp_presentation_feedback_send_discarded(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WP_PRESENTATION_FEEDBACK_DISCARDED); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/remote-shell-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/remote-shell-unstable-v1-client-protocol.h deleted file mode 100644 index fd17c6e9ea7..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/remote-shell-unstable-v1-client-protocol.h +++ /dev/null @@ -1,1923 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef REMOTE_SHELL_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define REMOTE_SHELL_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_remote_shell_unstable_v1 The remote_shell_unstable_v1 protocol - * Create remote desktop-style surfaces - * - * @section page_desc_remote_shell_unstable_v1 Description - * - * remote_shell allows clients to turn a wl_surface into a "real window" - * which can be stacked and activated by the user. - * - * 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. - * - * @section page_ifaces_remote_shell_unstable_v1 Interfaces - * - @subpage page_iface_zcr_remote_shell_v1 - remote_shell - * - @subpage page_iface_zcr_remote_surface_v1 - A desktop window - * - @subpage page_iface_zcr_notification_surface_v1 - A notification window - * - @subpage page_iface_zcr_input_method_surface_v1 - An input method window - * @section page_copyright_remote_shell_unstable_v1 Copyright - * <pre> - * - * Copyright 2016 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_surface; -struct zcr_input_method_surface_v1; -struct zcr_notification_surface_v1; -struct zcr_remote_shell_v1; -struct zcr_remote_surface_v1; - -/** - * @page page_iface_zcr_remote_shell_v1 zcr_remote_shell_v1 - * @section page_iface_zcr_remote_shell_v1_desc Description - * - * The global interface that allows clients to turn a wl_surface into a - * "real window" which is remotely managed but can be stacked, activated - * and made fullscreen by the user. - * @section page_iface_zcr_remote_shell_v1_api API - * See @ref iface_zcr_remote_shell_v1. - */ -/** - * @defgroup iface_zcr_remote_shell_v1 The zcr_remote_shell_v1 interface - * - * The global interface that allows clients to turn a wl_surface into a - * "real window" which is remotely managed but can be stacked, activated - * and made fullscreen by the user. - */ -extern const struct wl_interface zcr_remote_shell_v1_interface; -/** - * @page page_iface_zcr_remote_surface_v1 zcr_remote_surface_v1 - * @section page_iface_zcr_remote_surface_v1_desc Description - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface - * and allows for remotely managed windows. - * - * It provides requests to treat surfaces like windows, allowing to set - * properties like app id and geometry. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the remote_surface state to take effect. - * - * For a surface to be mapped by the compositor the client must have - * committed both an remote_surface state and a buffer. - * @section page_iface_zcr_remote_surface_v1_api API - * See @ref iface_zcr_remote_surface_v1. - */ -/** - * @defgroup iface_zcr_remote_surface_v1 The zcr_remote_surface_v1 interface - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface - * and allows for remotely managed windows. - * - * It provides requests to treat surfaces like windows, allowing to set - * properties like app id and geometry. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the remote_surface state to take effect. - * - * For a surface to be mapped by the compositor the client must have - * committed both an remote_surface state and a buffer. - */ -extern const struct wl_interface zcr_remote_surface_v1_interface; -/** - * @page page_iface_zcr_notification_surface_v1 zcr_notification_surface_v1 - * @section page_iface_zcr_notification_surface_v1_desc Description - * - * An interface that may be implemented by a wl_surface to host - * notification contents. - * @section page_iface_zcr_notification_surface_v1_api API - * See @ref iface_zcr_notification_surface_v1. - */ -/** - * @defgroup iface_zcr_notification_surface_v1 The zcr_notification_surface_v1 interface - * - * An interface that may be implemented by a wl_surface to host - * notification contents. - */ -extern const struct wl_interface zcr_notification_surface_v1_interface; -/** - * @page page_iface_zcr_input_method_surface_v1 zcr_input_method_surface_v1 - * @section page_iface_zcr_input_method_surface_v1_desc Description - * - * An interface that may be implemented by a wl_surface to host IME contents. - * @section page_iface_zcr_input_method_surface_v1_api API - * See @ref iface_zcr_input_method_surface_v1. - */ -/** - * @defgroup iface_zcr_input_method_surface_v1 The zcr_input_method_surface_v1 interface - * - * An interface that may be implemented by a wl_surface to host IME contents. - */ -extern const struct wl_interface zcr_input_method_surface_v1_interface; - -#ifndef ZCR_REMOTE_SHELL_V1_CONTAINER_ENUM -#define ZCR_REMOTE_SHELL_V1_CONTAINER_ENUM -/** - * @ingroup iface_zcr_remote_shell_v1 - * containers for remote surfaces - * - * Determine how a remote surface should be stacked relative to other - * shell surfaces. - */ -enum zcr_remote_shell_v1_container { - /** - * default container - */ - ZCR_REMOTE_SHELL_V1_CONTAINER_DEFAULT = 1, - /** - * system modal container - */ - ZCR_REMOTE_SHELL_V1_CONTAINER_OVERLAY = 2, -}; -#endif /* ZCR_REMOTE_SHELL_V1_CONTAINER_ENUM */ - -#ifndef ZCR_REMOTE_SHELL_V1_STATE_TYPE_ENUM -#define ZCR_REMOTE_SHELL_V1_STATE_TYPE_ENUM -/** - * @ingroup iface_zcr_remote_shell_v1 - * state types for remote surfaces - * - * Defines common show states for shell surfaces. - */ -enum zcr_remote_shell_v1_state_type { - /** - * normal window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_NORMAL = 1, - /** - * minimized window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_MINIMIZED = 2, - /** - * maximized window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_MAXIMIZED = 3, - /** - * fullscreen window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_FULLSCREEN = 4, - /** - * pinned window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_PINNED = 5, - /** - * trusted pinned window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_TRUSTED_PINNED = 6, - /** - * moving window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_MOVING = 7, - /** - * resizing window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_RESIZING = 8, - /** - * left snapped window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_LEFT_SNAPPED = 9, - /** - * right snapped window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_RIGHT_SNAPPED = 10, - /** - * pip window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_PIP = 11, -}; -#endif /* ZCR_REMOTE_SHELL_V1_STATE_TYPE_ENUM */ - -#ifndef ZCR_REMOTE_SHELL_V1_ERROR_ENUM -#define ZCR_REMOTE_SHELL_V1_ERROR_ENUM -enum zcr_remote_shell_v1_error { - /** - * given wl_surface has another role - */ - ZCR_REMOTE_SHELL_V1_ERROR_ROLE = 0, - /** - * invalid notification key - */ - ZCR_REMOTE_SHELL_V1_ERROR_INVALID_NOTIFICATION_KEY = 1, -}; -#endif /* ZCR_REMOTE_SHELL_V1_ERROR_ENUM */ - -#ifndef ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_ENUM -#define ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_ENUM -/** - * @ingroup iface_zcr_remote_shell_v1 - * the layout mode - * - * Determine how a client should layout surfaces. - */ -enum zcr_remote_shell_v1_layout_mode { - /** - * multiple windows - */ - ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_WINDOWED = 1, - /** - * restricted mode for tablet - */ - ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_TABLET = 2, -}; -#endif /* ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_ENUM */ - -/** - * @ingroup iface_zcr_remote_shell_v1 - * @struct zcr_remote_shell_v1_listener - */ -struct zcr_remote_shell_v1_listener { - /** - * activated surface changed - * - * Notifies client that the activated surface changed. - */ - void (*activated)(void *data, - struct zcr_remote_shell_v1 *zcr_remote_shell_v1, - struct wl_surface *gained_active, - struct wl_surface *lost_active); - /** - * suggests a re-configuration of remote shell - * - * [Deprecated] Suggests a re-configuration of remote shell. - */ - void (*configuration_changed)(void *data, - struct zcr_remote_shell_v1 *zcr_remote_shell_v1, - int32_t width, - int32_t height, - int32_t transform, - wl_fixed_t scale_factor, - int32_t work_area_inset_left, - int32_t work_area_inset_top, - int32_t work_area_inset_right, - int32_t work_area_inset_bottom, - uint32_t layout_mode); - /** - * area of remote shell - * - * Defines an area of the remote shell used for layout. Each - * series of "workspace" events must be terminated by a "configure" - * event. - * @param is_internal 1 if screen is built-in - * @since 5 - */ - void (*workspace)(void *data, - struct zcr_remote_shell_v1 *zcr_remote_shell_v1, - uint32_t id_hi, - uint32_t id_lo, - int32_t x, - int32_t y, - int32_t width, - int32_t height, - int32_t inset_left, - int32_t inset_top, - int32_t inset_right, - int32_t inset_bottom, - int32_t transform, - wl_fixed_t scale_factor, - uint32_t is_internal); - /** - * suggests configuration of remote shell - * - * Suggests a new configuration of the remote shell. Preceded by - * a series of "workspace" events. - * @since 5 - */ - void (*configure)(void *data, - struct zcr_remote_shell_v1 *zcr_remote_shell_v1, - uint32_t layout_mode); - /** - * initialize scale configuration - * - * Sends the default device scale factor. - * @param scale DP to pixels ratio, in 8.24 fixed point format - * @since 8 - */ - void (*default_device_scale_factor)(void *data, - struct zcr_remote_shell_v1 *zcr_remote_shell_v1, - int32_t scale); -}; - -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -static inline int -zcr_remote_shell_v1_add_listener(struct zcr_remote_shell_v1 *zcr_remote_shell_v1, - const struct zcr_remote_shell_v1_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zcr_remote_shell_v1, - (void (**)(void)) listener, data); -} - -#define ZCR_REMOTE_SHELL_V1_DESTROY 0 -#define ZCR_REMOTE_SHELL_V1_GET_REMOTE_SURFACE 1 -#define ZCR_REMOTE_SHELL_V1_GET_NOTIFICATION_SURFACE 2 -#define ZCR_REMOTE_SHELL_V1_GET_INPUT_METHOD_SURFACE 3 - -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_ACTIVATED_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_CONFIGURATION_CHANGED_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_WORKSPACE_SINCE_VERSION 5 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_CONFIGURE_SINCE_VERSION 5 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_DEFAULT_DEVICE_SCALE_FACTOR_SINCE_VERSION 8 - -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_GET_REMOTE_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_GET_NOTIFICATION_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_GET_INPUT_METHOD_SURFACE_SINCE_VERSION 17 - -/** @ingroup iface_zcr_remote_shell_v1 */ -static inline void -zcr_remote_shell_v1_set_user_data(struct zcr_remote_shell_v1 *zcr_remote_shell_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_remote_shell_v1, user_data); -} - -/** @ingroup iface_zcr_remote_shell_v1 */ -static inline void * -zcr_remote_shell_v1_get_user_data(struct zcr_remote_shell_v1 *zcr_remote_shell_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_remote_shell_v1); -} - -static inline uint32_t -zcr_remote_shell_v1_get_version(struct zcr_remote_shell_v1 *zcr_remote_shell_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_remote_shell_v1); -} - -/** - * @ingroup iface_zcr_remote_shell_v1 - * - * Destroy this remote_shell object. - * - * Destroying a bound remote_shell object while there are surfaces - * still alive created by this remote_shell object instance is illegal - * and will result in a protocol error. - */ -static inline void -zcr_remote_shell_v1_destroy(struct zcr_remote_shell_v1 *zcr_remote_shell_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_shell_v1, - ZCR_REMOTE_SHELL_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_remote_shell_v1); -} - -/** - * @ingroup iface_zcr_remote_shell_v1 - * - * This creates an remote_surface for the given surface and gives it the - * remote_surface role. A wl_surface can only be given a remote_surface - * role once. If get_remote_surface is called with a wl_surface that - * already has an active remote_surface associated with it, or if it had - * any other role, an error is raised. - * - * See the documentation of remote_surface for more details about what an - * remote_surface is and how it is used. - */ -static inline struct zcr_remote_surface_v1 * -zcr_remote_shell_v1_get_remote_surface(struct zcr_remote_shell_v1 *zcr_remote_shell_v1, struct wl_surface *surface, uint32_t container) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_remote_shell_v1, - ZCR_REMOTE_SHELL_V1_GET_REMOTE_SURFACE, &zcr_remote_surface_v1_interface, NULL, surface, container); - - return (struct zcr_remote_surface_v1 *) id; -} - -/** - * @ingroup iface_zcr_remote_shell_v1 - * - * Creates a notification_surface for the given surface, gives it the - * notification_surface role and associated it with a notification id. - */ -static inline struct zcr_notification_surface_v1 * -zcr_remote_shell_v1_get_notification_surface(struct zcr_remote_shell_v1 *zcr_remote_shell_v1, struct wl_surface *surface, const char *notification_key) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_remote_shell_v1, - ZCR_REMOTE_SHELL_V1_GET_NOTIFICATION_SURFACE, &zcr_notification_surface_v1_interface, NULL, surface, notification_key); - - return (struct zcr_notification_surface_v1 *) id; -} - -/** - * @ingroup iface_zcr_remote_shell_v1 - * - * Creates an input_method_surface for the given surface, gives it - * the input_method_surface role. - */ -static inline struct zcr_input_method_surface_v1 * -zcr_remote_shell_v1_get_input_method_surface(struct zcr_remote_shell_v1 *zcr_remote_shell_v1, struct wl_surface *surface) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_remote_shell_v1, - ZCR_REMOTE_SHELL_V1_GET_INPUT_METHOD_SURFACE, &zcr_input_method_surface_v1_interface, NULL, surface); - - return (struct zcr_input_method_surface_v1 *) id; -} - -#ifndef ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_ENUM -#define ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * systemui visibility behavior - * - * Determine the visibility behavior of the system UI. - */ -enum zcr_remote_surface_v1_systemui_visibility_state { - /** - * system ui is visible - */ - ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_VISIBLE = 1, - /** - * system ui autohides and is not sticky - */ - ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_AUTOHIDE_NON_STICKY = 2, - /** - * system ui autohides and is sticky - */ - ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_AUTOHIDE_STICKY = 3, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_ORIENTATION_ENUM -#define ZCR_REMOTE_SURFACE_V1_ORIENTATION_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * window orientation - * - * The orientation of the window. - */ -enum zcr_remote_surface_v1_orientation { - /** - * portrait - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_PORTRAIT = 1, - /** - * landscape - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LANDSCAPE = 2, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_ORIENTATION_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_ENUM -#define ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * window type - * - * The type of the window. - */ -enum zcr_remote_surface_v1_window_type { - /** - * normal app window - */ - ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_NORMAL = 1, - /** - * window is treated as systemui - */ - ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_SYSTEM_UI = 2, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_ENUM -#define ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * bounds_change_reason - * - * Specifies the cause of the window bounds change event. - */ -enum zcr_remote_surface_v1_bounds_change_reason { - /** - * the window is being moved by drag operation - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_DRAG_MOVE = 1, - /** - * the window is being resized by drag operation. - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_DRAG_RESIZE = 2, - /** - * the window is resized to left snapped state - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_SNAP_TO_LEFT = 3, - /** - * the window is resized to right snapped state - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_SNAP_TO_RIGHT = 4, - /** - * the window bounds is moved due to other WM operations - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_MOVE = 5, - /** - * the window bounds is reiszed due to other WM operations - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_RESIZE = 6, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_ENUM -#define ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * resize direction - * - * The resize direction for drag operation - */ -enum zcr_remote_surface_v1_resize_direction { - /** - * move only, no resize - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_NONE = 0, - /** - * resize to the left - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_LEFT = 1, - /** - * resize to the top left - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_TOPLEFT = 2, - /** - * resize to the top - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_TOP = 3, - /** - * resize to the top right - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_TOPRIGHT = 4, - /** - * resize to the right - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_RIGHT = 5, - /** - * resize to the buttom right - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_BOTTOMRIGHT = 6, - /** - * resize to the bottom - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_BOTTOM = 7, - /** - * resize to the bottom left - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_BOTTOMLEFT = 8, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_ENUM -#define ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * frame types - * - * Frame type that can be used to decorate a surface. - */ -enum zcr_remote_surface_v1_frame_type { - /** - * no frame - */ - ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_NONE = 0, - /** - * caption with shadow - */ - ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_NORMAL = 1, - /** - * shadow only - */ - ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_SHADOW = 2, - /** - * autohide frame with shadow - */ - ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_AUTOHIDE = 3, - /** - * overlay frame with shadow - */ - ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_OVERLAY = 4, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_ENUM -#define ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * frame button types - * - * The mask that represents buttons on frame. - */ -enum zcr_remote_surface_v1_frame_button_type { - /** - * a button to naviate backwards - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_BACK = 1, - /** - * a button to minimize the window - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_MINIMIZE = 2, - /** - * a button to maximize or restore - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_MAXIMIZE_RESTORE = 4, - /** - * a button to activate application's menu - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_MENU = 8, - /** - * a button to close the window - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_CLOSE = 16, - /** - * a mask to turn the maximize_restore button to zoom button - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_ZOOM = 32, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_ENUM -#define ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * orientation lock request for remote surfaces - * - * Defines orientation request when a remote surface is in foreground. - */ -enum zcr_remote_surface_v1_orientation_lock { - /** - * no orientation lock - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_NONE = 1, - /** - * primary or secondary portrait - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_PORTRAIT = 2, - /** - * primary or secondary landscape - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_LANDSCAPE = 3, - /** - * keep current orientation - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_CURRENT = 4, - /** - * primary portrait - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_PORTRAIT_PRIMARY = 5, - /** - * primary landscape - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_LANDSCAPE_PRIMARY = 6, - /** - * secondary portrait - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_PORTRAIT_SECONDARY = 7, - /** - * secondary landscape - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_LANDSCAPE_SECONDARY = 8, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_ENUM */ - -/** - * @ingroup iface_zcr_remote_surface_v1 - * @struct zcr_remote_surface_v1_listener - */ -struct zcr_remote_surface_v1_listener { - /** - * surface wants to be closed - * - * 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... - */ - void (*close)(void *data, - struct zcr_remote_surface_v1 *zcr_remote_surface_v1); - /** - * surface state type changed - * - * [Deprecated] The state_type_changed event is sent by the - * compositor when the surface state changed. - * - * This is an event to notify that the window state changed in - * compositor. The state change may be triggered by a client's - * request, or some user action directly handled by the compositor. - * The client may choose to ignore this event. - */ - void (*state_type_changed)(void *data, - struct zcr_remote_surface_v1 *zcr_remote_surface_v1, - uint32_t state_type); - /** - * suggest a surface change - * - * The configure event asks the client to change surface state. - * - * The client must apply the origin offset to window positions in - * set_window_geometry requests. - * - * The states listed in the event are state_type values, and might - * change due to a client request or an event directly handled by - * the compositor. - * - * Clients should arrange their surface for the new state, 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. - * @since 5 - */ - void (*configure)(void *data, - struct zcr_remote_surface_v1 *zcr_remote_surface_v1, - int32_t origin_offset_x, - int32_t origin_offset_y, - struct wl_array *states, - uint32_t serial); - /** - * announce window geometry commit - * - * Notify the client of committed window geometry. - * - * The compositor sends this event when it commits window geometry. - * The client may use this information to convert coordinates of - * input events using the latest committed geometry. - * @since 9 - */ - void (*window_geometry_changed)(void *data, - struct zcr_remote_surface_v1 *zcr_remote_surface_v1, - int32_t x, - int32_t y, - int32_t width, - int32_t height); - /** - * The compositor requested to change the bounds - * - * The compositor requested to change its bounds. - * "bounds_change_reason" specifies the cause of the bounds change. - * The client may apply the different move/resize strategy - * depending on the reason. - * - * "display_id_hi", "display_id_lo" specifies in which workspace - * the surface should live in. - * - * The client responds with set_window_geometry request, with the - * bounds it is resized to (this may be different from the bounds - * requested). - * - * The client may ignore move request depending on the state, e.g, - * if it becomes resizable or other constrants. - * @since 10 - */ - void (*bounds_changed)(void *data, - struct zcr_remote_surface_v1 *zcr_remote_surface_v1, - uint32_t workspace_id_hi, - uint32_t workspace_id_lo, - int32_t x, - int32_t y, - int32_t width, - int32_t height, - uint32_t bounds_change_reason); - /** - * Notifies that a drag to move/resize started. - * - * Notifies a client that the compositor started drag operation. - * "direction" specifies which direction it is being resized. - * "none" direction means just move but not resize. - * - * This will be followed by series of the "bounds_changed" event - * with "drag_resize" or "drag_move" reasons to update the window - * bounds druing the drag operation. - * @since 10 - */ - void (*drag_started)(void *data, - struct zcr_remote_surface_v1 *zcr_remote_surface_v1, - uint32_t direction); - /** - * Notifies that a drag operation has finished. - * - * Called when the drag operation is finished. "x" and "y" - * specifies the position of the pointer device used to drag. - * "canceled" is true if the drag operation is aborted during drag - * (e.g. by capture change or user action.) - * @param canceled true if the operation was canceled - * @since 10 - */ - void (*drag_finished)(void *data, - struct zcr_remote_surface_v1 *zcr_remote_surface_v1, - int32_t x, - int32_t y, - int32_t canceled); -}; - -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -static inline int -zcr_remote_surface_v1_add_listener(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, - const struct zcr_remote_surface_v1_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zcr_remote_surface_v1, - (void (**)(void)) listener, data); -} - -#define ZCR_REMOTE_SURFACE_V1_DESTROY 0 -#define ZCR_REMOTE_SURFACE_V1_SET_APP_ID 1 -#define ZCR_REMOTE_SURFACE_V1_SET_WINDOW_GEOMETRY 2 -#define ZCR_REMOTE_SURFACE_V1_SET_SCALE 3 -#define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW 4 -#define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW_BACKGROUND_OPACITY 5 -#define ZCR_REMOTE_SURFACE_V1_SET_TITLE 6 -#define ZCR_REMOTE_SURFACE_V1_SET_TOP_INSET 7 -#define ZCR_REMOTE_SURFACE_V1_ACTIVATE 8 -#define ZCR_REMOTE_SURFACE_V1_MAXIMIZE 9 -#define ZCR_REMOTE_SURFACE_V1_MINIMIZE 10 -#define ZCR_REMOTE_SURFACE_V1_RESTORE 11 -#define ZCR_REMOTE_SURFACE_V1_FULLSCREEN 12 -#define ZCR_REMOTE_SURFACE_V1_UNFULLSCREEN 13 -#define ZCR_REMOTE_SURFACE_V1_PIN 14 -#define ZCR_REMOTE_SURFACE_V1_UNPIN 15 -#define ZCR_REMOTE_SURFACE_V1_SET_SYSTEM_MODAL 16 -#define ZCR_REMOTE_SURFACE_V1_UNSET_SYSTEM_MODAL 17 -#define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SURFACE_SHADOW 18 -#define ZCR_REMOTE_SURFACE_V1_SET_SYSTEMUI_VISIBILITY 19 -#define ZCR_REMOTE_SURFACE_V1_SET_ALWAYS_ON_TOP 20 -#define ZCR_REMOTE_SURFACE_V1_UNSET_ALWAYS_ON_TOP 21 -#define ZCR_REMOTE_SURFACE_V1_ACK_CONFIGURE 22 -#define ZCR_REMOTE_SURFACE_V1_MOVE 23 -#define ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION 24 -#define ZCR_REMOTE_SURFACE_V1_SET_WINDOW_TYPE 25 -#define ZCR_REMOTE_SURFACE_V1_RESIZE 26 -#define ZCR_REMOTE_SURFACE_V1_SET_RESIZE_OUTSET 27 -#define ZCR_REMOTE_SURFACE_V1_START_MOVE 28 -#define ZCR_REMOTE_SURFACE_V1_SET_CAN_MAXIMIZE 29 -#define ZCR_REMOTE_SURFACE_V1_UNSET_CAN_MAXIMIZE 30 -#define ZCR_REMOTE_SURFACE_V1_SET_MIN_SIZE 31 -#define ZCR_REMOTE_SURFACE_V1_SET_MAX_SIZE 32 -#define ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_LEFT 33 -#define ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_RIGHT 34 -#define ZCR_REMOTE_SURFACE_V1_START_RESIZE 35 -#define ZCR_REMOTE_SURFACE_V1_SET_FRAME 36 -#define ZCR_REMOTE_SURFACE_V1_SET_FRAME_BUTTONS 37 -#define ZCR_REMOTE_SURFACE_V1_SET_EXTRA_TITLE 38 -#define ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION_LOCK 39 -#define ZCR_REMOTE_SURFACE_V1_PIP 40 - -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_CLOSE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_STATE_TYPE_CHANGED_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_CONFIGURE_SINCE_VERSION 5 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_WINDOW_GEOMETRY_CHANGED_SINCE_VERSION 9 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGED_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_DRAG_STARTED_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_DRAG_FINISHED_SINCE_VERSION 10 - -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_APP_ID_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_WINDOW_GEOMETRY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_SCALE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW_BACKGROUND_OPACITY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_TITLE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_TOP_INSET_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_ACTIVATE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_MAXIMIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_MINIMIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_RESTORE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_UNFULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_PIN_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_UNPIN_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_SYSTEM_MODAL_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_UNSET_SYSTEM_MODAL_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SURFACE_SHADOW_SINCE_VERSION 2 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_SYSTEMUI_VISIBILITY_SINCE_VERSION 3 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_ALWAYS_ON_TOP_SINCE_VERSION 4 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_UNSET_ALWAYS_ON_TOP_SINCE_VERSION 4 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_ACK_CONFIGURE_SINCE_VERSION 5 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_MOVE_SINCE_VERSION 5 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION_SINCE_VERSION 6 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_WINDOW_TYPE_SINCE_VERSION 7 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_RESIZE_SINCE_VERSION 9 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_RESIZE_OUTSET_SINCE_VERSION 9 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_START_MOVE_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_CAN_MAXIMIZE_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_UNSET_CAN_MAXIMIZE_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_MIN_SIZE_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_MAX_SIZE_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_LEFT_SINCE_VERSION 11 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_RIGHT_SINCE_VERSION 11 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_START_RESIZE_SINCE_VERSION 12 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_FRAME_SINCE_VERSION 13 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_FRAME_BUTTONS_SINCE_VERSION 13 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_EXTRA_TITLE_SINCE_VERSION 13 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION_LOCK_SINCE_VERSION 14 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_PIP_SINCE_VERSION 15 - -/** @ingroup iface_zcr_remote_surface_v1 */ -static inline void -zcr_remote_surface_v1_set_user_data(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_remote_surface_v1, user_data); -} - -/** @ingroup iface_zcr_remote_surface_v1 */ -static inline void * -zcr_remote_surface_v1_get_user_data(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_remote_surface_v1); -} - -static inline uint32_t -zcr_remote_surface_v1_get_version(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Unmap and destroy the window. The window will be effectively - * hidden from the user's point of view, and all state will be lost. - */ -static inline void -zcr_remote_surface_v1_destroy(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_remote_surface_v1); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Set an application identifier for the surface. - */ -static inline void -zcr_remote_surface_v1_set_app_id(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, const char *app_id) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_APP_ID, app_id); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * The window geometry of a window is its "visible bounds" from the - * user's perspective. Client-side decorations often have invisible - * portions like drop-shadows which should be ignored for the - * purposes of aligning, placing and constraining windows. - * - * The window geometry is double buffered, and will be applied at the - * time wl_surface.commit of the corresponding wl_surface is called. - * - * Once the window geometry of the surface is set once, it is not - * possible to unset it, and it will remain the same until - * set_window_geometry is called again, even if a new subsurface or - * buffer is attached. - * - * If never set, the value is the full bounds of the output. This - * updates dynamically on every commit. - * - * The arguments are given in the output coordinate space. - * - * The width and height must be greater than zero. - */ -static inline void -zcr_remote_surface_v1_set_window_geometry(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_WINDOW_GEOMETRY, x, y, width, height); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Set a scale factor that will be applied to surface and all descendants. - */ -static inline void -zcr_remote_surface_v1_set_scale(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, wl_fixed_t scale) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_SCALE, scale); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * [Deprecated] Request that surface needs a rectangular shadow. - * - * This is only a request that the surface should have a rectangular - * shadow. The compositor may choose to ignore this request. - * - * The arguments are given in the output coordinate space and specifies - * the inner bounds of the shadow. - * - * The arguments are given in the output coordinate space. - * Specifying zero width and height will disable the shadow. - */ -static inline void -zcr_remote_surface_v1_set_rectangular_shadow(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW, x, y, width, height); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * [Deprecated] Suggests the window's background opacity when the shadow is requested. - */ -static inline void -zcr_remote_surface_v1_set_rectangular_shadow_background_opacity(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, wl_fixed_t opacity) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW_BACKGROUND_OPACITY, opacity); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * 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. - */ -static inline void -zcr_remote_surface_v1_set_title(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, const char *title) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_TITLE, title); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Set distance from the top of the surface to the contents. - * - * This distance typically represents the size of the window caption. - */ -static inline void -zcr_remote_surface_v1_set_top_inset(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_TOP_INSET, height); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Make the surface active and bring it to the front. - */ -static inline void -zcr_remote_surface_v1_activate(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_ACTIVATE, serial); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is maximized. The window geometry will be updated - * to whatever the compositor finds appropriate for a maximized window. - * - * This is only a request that the window should be maximized. The - * compositor may choose to ignore this request. The client should - * listen to set_maximized events to determine if the window was - * maximized or not. - */ -static inline void -zcr_remote_surface_v1_maximize(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_MAXIMIZE); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is minimized. - * - * This is only a request that the window should be minimized. The - * compositor may choose to ignore this request. The client should - * listen to set_minimized events to determine if the window was - * minimized or not. - */ -static inline void -zcr_remote_surface_v1_minimize(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_MINIMIZE); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is restored. This restores the window geometry - * to what it was before the window was minimized, maximized or made - * fullscreen. - * - * This is only a request that the window should be restored. The - * compositor may choose to ignore this request. The client should - * listen to unset_maximized, unset_minimize and unset_fullscreen - * events to determine if the window was restored or not. - */ -static inline void -zcr_remote_surface_v1_restore(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_RESTORE); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is made fullscreen. - * - * This is only a request that the window should be made fullscreen. - * The compositor may choose to ignore this request. The client should - * listen to set_fullscreen events to determine if the window was - * made fullscreen or not. - */ -static inline void -zcr_remote_surface_v1_fullscreen(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_FULLSCREEN); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is made unfullscreen. - * - * This is only a request that the window should be made unfullscreen. - * The compositor may choose to ignore this request. The client should - * listen to unset_fullscreen events to determine if the window was - * made unfullscreen or not. - */ -static inline void -zcr_remote_surface_v1_unfullscreen(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_UNFULLSCREEN); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is pinned. - * - * This is only a request that the window should be pinned. - * The compositor may choose to ignore this request. The client should - * listen to state_changed events to determine if the window was - * pinned or not. If trusted flag is non-zero, the app can prevent users - * from exiting the pinned mode. - */ -static inline void -zcr_remote_surface_v1_pin(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t trusted) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_PIN, trusted); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is unpinned. - * - * This is only a request that the window should be unpinned. - * The compositor may choose to ignore this request. The client should - * listen to unset_pinned events to determine if the window was - * unpinned or not. - */ -static inline void -zcr_remote_surface_v1_unpin(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_UNPIN); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Suggests a surface should become system modal. - */ -static inline void -zcr_remote_surface_v1_set_system_modal(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_SYSTEM_MODAL); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Suggests a surface should become non system modal. - */ -static inline void -zcr_remote_surface_v1_unset_system_modal(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_UNSET_SYSTEM_MODAL); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface needs a rectangular shadow. - * - * This is only a request that the surface should have a rectangular - * shadow. The compositor may choose to ignore this request. - * - * The arguments are given in the remote surface coordinate space and - * specifies inner bounds of the shadow. Specifying zero width and height - * will disable the shadow. - */ -static inline void -zcr_remote_surface_v1_set_rectangular_surface_shadow(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SURFACE_SHADOW, x, y, width, height); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Requests how the surface will change the visibility of the system UI when it is made active. - */ -static inline void -zcr_remote_surface_v1_set_systemui_visibility(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t visibility) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_SYSTEMUI_VISIBILITY, visibility); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is made to be always on top. - * - * This is only a request that the window should be always on top. - * The compositor may choose to ignore this request. - * - */ -static inline void -zcr_remote_surface_v1_set_always_on_top(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_ALWAYS_ON_TOP); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is made to be not always on top. - * - * This is only a request that the window should be not always on top. - * The compositor may choose to ignore this request. - */ -static inline void -zcr_remote_surface_v1_unset_always_on_top(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_UNSET_ALWAYS_ON_TOP); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * 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 during display - * configuration to change its coordinate space for set_window_geometry - * requests only when the client has switched to the new coordinate space. - * - * 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. - */ -static inline void -zcr_remote_surface_v1_ack_configure(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_ACK_CONFIGURE, serial); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Start an interactive, user-driven move of the surface. - * - * The compositor responds to this request with a configure event that - * transitions to the "moving" state. The client must only initiate motion - * after acknowledging the state change. The compositor can assume that - * subsequent set_window_geometry requests are position updates until the - * next state transition is acknowledged. - * - * The compositor may ignore move requests depending on the state of the - * surface, e.g. fullscreen or maximized. - */ -static inline void -zcr_remote_surface_v1_move(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_MOVE); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Set an orientation for the surface. - */ -static inline void -zcr_remote_surface_v1_set_orientation(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t orientation) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION, orientation); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Set the type of window. This is only a hint to the compositor and the - * compositor is free to ignore it. - */ -static inline void -zcr_remote_surface_v1_set_window_type(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t type) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_WINDOW_TYPE, type); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * [Deprecated] Start an interactive, user-driven resize of the surface. - * - * The compositor responds to this request with a configure event that - * transitions to the "resizing" state. The client must only initiate - * resizing after acknowledging the state change. The compositor can assume - * that subsequent set_window_geometry requests are resizes until the next - * state transition is acknowledged. - * - * The compositor may ignore resize requests depending on the state of the - * surface, e.g. fullscreen or maximized. - */ -static inline void -zcr_remote_surface_v1_resize(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_RESIZE); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Expand input region of surface with resize outset. - * - * The compositor clips the input region of each surface to its bounds, - * unless the client requests a resize outset. In that case, the input - * region of the root surface is expanded to allow for some leeway around - * visible bounds when starting a user-driven resize. - */ -static inline void -zcr_remote_surface_v1_set_resize_outset(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t outset) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_RESIZE_OUTSET, outset); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request an interactive, user-driven move of the surface. "x" - * and "y" specifies the starting point of the pointer device - * that initiated the move. - * - * The compositor responds to this request with a drag_started - * event with "none" direction. Please see drag_started event - * for more details. - * - * The compositor may ignore move requests depending on the state of the - * surface, e.g. fullscreen or maximized. - */ -static inline void -zcr_remote_surface_v1_start_move(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t x, int32_t y) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_START_MOVE, x, y); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface can be in maximzied state. - */ -static inline void -zcr_remote_surface_v1_set_can_maximize(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_CAN_MAXIMIZE); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface can not be in maximzied state. - */ -static inline void -zcr_remote_surface_v1_unset_can_maximize(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_UNSET_CAN_MAXIMIZE); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Set a minimum size of the surface. - * - * Values set in this way are double-buffered. They will get - * applied on the next commit. - */ -static inline void -zcr_remote_surface_v1_set_min_size(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_MIN_SIZE, width, height); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Set a maximum size of the surface. - * - * Values set in this way are double-buffered. They will get - * applied on the next commit. - * - * Setting the same size as minimum size makes the surface - * unresizable. - */ -static inline void -zcr_remote_surface_v1_set_max_size(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_MAX_SIZE, width, height); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is snapped to left. - */ -static inline void -zcr_remote_surface_v1_set_snapped_to_left(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_LEFT); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is snapped to right. - */ -static inline void -zcr_remote_surface_v1_set_snapped_to_right(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_RIGHT); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request to start an interactive, user-driven resize of the surface. - * "x" and "y" specifies the starting point of the pointer device - * that initiated the reize. - * - * The compositor responds to this request with a "drag_started" - * event, followed by "bounds_changed" events, and ends the - * resize operation with a "drag_finhsed" event. The compositor - * determines the new bounds using the resize_direction and the - * pointer event location. - * - * The compositor may ignore resize requests depending on the state of the - * surface, e.g. fullscreen or maximized, or no drag event is in pregress. - */ -static inline void -zcr_remote_surface_v1_start_resize(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t resize_direction, int32_t x, int32_t y) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_START_RESIZE, resize_direction, x, y); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Enables compositor side frame decoration. |type| - * specifies the type of frame to use for the surface. - */ -static inline void -zcr_remote_surface_v1_set_frame(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t type) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_FRAME, type); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Updates the frame's button state. |visible_buttons| and |enabled_buttons| - * are the union of button mask defined in |frame_button_type| enum. - * - * The mask present in |enabled_buttons| but not in |visible_buttons| will - * be ignored. - */ -static inline void -zcr_remote_surface_v1_set_frame_buttons(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t visible_buttons, uint32_t enabled_buttons) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_FRAME_BUTTONS, visible_buttons, enabled_buttons); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * The extra informational string about the surface. This can be - * used to show the debug information in the title bar, or log - * messages. - * - * This is different from "set_title" which is used to identify - * the surface. - * - * The string must be encoded in UTF-8. - */ -static inline void -zcr_remote_surface_v1_set_extra_title(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, const char *extra_title) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_EXTRA_TITLE, extra_title); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request a specific orientation behavior when this surface is in foreground. - */ -static inline void -zcr_remote_surface_v1_set_orientation_lock(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t orientation_lock) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION_LOCK, orientation_lock); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is set to Picture-in-Picture (PIP). - */ -static inline void -zcr_remote_surface_v1_pip(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_PIP); -} - -#define ZCR_NOTIFICATION_SURFACE_V1_DESTROY 0 -#define ZCR_NOTIFICATION_SURFACE_V1_SET_APP_ID 1 - - -/** - * @ingroup iface_zcr_notification_surface_v1 - */ -#define ZCR_NOTIFICATION_SURFACE_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_notification_surface_v1 - */ -#define ZCR_NOTIFICATION_SURFACE_V1_SET_APP_ID_SINCE_VERSION 16 - -/** @ingroup iface_zcr_notification_surface_v1 */ -static inline void -zcr_notification_surface_v1_set_user_data(struct zcr_notification_surface_v1 *zcr_notification_surface_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_notification_surface_v1, user_data); -} - -/** @ingroup iface_zcr_notification_surface_v1 */ -static inline void * -zcr_notification_surface_v1_get_user_data(struct zcr_notification_surface_v1 *zcr_notification_surface_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_notification_surface_v1); -} - -static inline uint32_t -zcr_notification_surface_v1_get_version(struct zcr_notification_surface_v1 *zcr_notification_surface_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_notification_surface_v1); -} - -/** - * @ingroup iface_zcr_notification_surface_v1 - * - * Unmap and destroy the notification surface. - */ -static inline void -zcr_notification_surface_v1_destroy(struct zcr_notification_surface_v1 *zcr_notification_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_notification_surface_v1, - ZCR_NOTIFICATION_SURFACE_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_notification_surface_v1); -} - -/** - * @ingroup iface_zcr_notification_surface_v1 - * - * Set an application identifier for the notification surface. - */ -static inline void -zcr_notification_surface_v1_set_app_id(struct zcr_notification_surface_v1 *zcr_notification_surface_v1, const char *app_id) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_notification_surface_v1, - ZCR_NOTIFICATION_SURFACE_V1_SET_APP_ID, app_id); -} - -#define ZCR_INPUT_METHOD_SURFACE_V1_DESTROY 0 - - -/** - * @ingroup iface_zcr_input_method_surface_v1 - */ -#define ZCR_INPUT_METHOD_SURFACE_V1_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_input_method_surface_v1 */ -static inline void -zcr_input_method_surface_v1_set_user_data(struct zcr_input_method_surface_v1 *zcr_input_method_surface_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_input_method_surface_v1, user_data); -} - -/** @ingroup iface_zcr_input_method_surface_v1 */ -static inline void * -zcr_input_method_surface_v1_get_user_data(struct zcr_input_method_surface_v1 *zcr_input_method_surface_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_input_method_surface_v1); -} - -static inline uint32_t -zcr_input_method_surface_v1_get_version(struct zcr_input_method_surface_v1 *zcr_input_method_surface_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_input_method_surface_v1); -} - -/** - * @ingroup iface_zcr_input_method_surface_v1 - * - * Unmap and destroy the input mtehod surface. - */ -static inline void -zcr_input_method_surface_v1_destroy(struct zcr_input_method_surface_v1 *zcr_input_method_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_input_method_surface_v1, - ZCR_INPUT_METHOD_SURFACE_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_input_method_surface_v1); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/remote-shell-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/remote-shell-unstable-v1-server-protocol.h deleted file mode 100644 index 555b6a34ab4..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/remote-shell-unstable-v1-server-protocol.h +++ /dev/null @@ -1,1573 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef REMOTE_SHELL_UNSTABLE_V1_SERVER_PROTOCOL_H -#define REMOTE_SHELL_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_remote_shell_unstable_v1 The remote_shell_unstable_v1 protocol - * Create remote desktop-style surfaces - * - * @section page_desc_remote_shell_unstable_v1 Description - * - * remote_shell allows clients to turn a wl_surface into a "real window" - * which can be stacked and activated by the user. - * - * 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. - * - * @section page_ifaces_remote_shell_unstable_v1 Interfaces - * - @subpage page_iface_zcr_remote_shell_v1 - remote_shell - * - @subpage page_iface_zcr_remote_surface_v1 - A desktop window - * - @subpage page_iface_zcr_notification_surface_v1 - A notification window - * - @subpage page_iface_zcr_input_method_surface_v1 - An input method window - * @section page_copyright_remote_shell_unstable_v1 Copyright - * <pre> - * - * Copyright 2016 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_surface; -struct zcr_input_method_surface_v1; -struct zcr_notification_surface_v1; -struct zcr_remote_shell_v1; -struct zcr_remote_surface_v1; - -/** - * @page page_iface_zcr_remote_shell_v1 zcr_remote_shell_v1 - * @section page_iface_zcr_remote_shell_v1_desc Description - * - * The global interface that allows clients to turn a wl_surface into a - * "real window" which is remotely managed but can be stacked, activated - * and made fullscreen by the user. - * @section page_iface_zcr_remote_shell_v1_api API - * See @ref iface_zcr_remote_shell_v1. - */ -/** - * @defgroup iface_zcr_remote_shell_v1 The zcr_remote_shell_v1 interface - * - * The global interface that allows clients to turn a wl_surface into a - * "real window" which is remotely managed but can be stacked, activated - * and made fullscreen by the user. - */ -extern const struct wl_interface zcr_remote_shell_v1_interface; -/** - * @page page_iface_zcr_remote_surface_v1 zcr_remote_surface_v1 - * @section page_iface_zcr_remote_surface_v1_desc Description - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface - * and allows for remotely managed windows. - * - * It provides requests to treat surfaces like windows, allowing to set - * properties like app id and geometry. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the remote_surface state to take effect. - * - * For a surface to be mapped by the compositor the client must have - * committed both an remote_surface state and a buffer. - * @section page_iface_zcr_remote_surface_v1_api API - * See @ref iface_zcr_remote_surface_v1. - */ -/** - * @defgroup iface_zcr_remote_surface_v1 The zcr_remote_surface_v1 interface - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface - * and allows for remotely managed windows. - * - * It provides requests to treat surfaces like windows, allowing to set - * properties like app id and geometry. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the remote_surface state to take effect. - * - * For a surface to be mapped by the compositor the client must have - * committed both an remote_surface state and a buffer. - */ -extern const struct wl_interface zcr_remote_surface_v1_interface; -/** - * @page page_iface_zcr_notification_surface_v1 zcr_notification_surface_v1 - * @section page_iface_zcr_notification_surface_v1_desc Description - * - * An interface that may be implemented by a wl_surface to host - * notification contents. - * @section page_iface_zcr_notification_surface_v1_api API - * See @ref iface_zcr_notification_surface_v1. - */ -/** - * @defgroup iface_zcr_notification_surface_v1 The zcr_notification_surface_v1 interface - * - * An interface that may be implemented by a wl_surface to host - * notification contents. - */ -extern const struct wl_interface zcr_notification_surface_v1_interface; -/** - * @page page_iface_zcr_input_method_surface_v1 zcr_input_method_surface_v1 - * @section page_iface_zcr_input_method_surface_v1_desc Description - * - * An interface that may be implemented by a wl_surface to host IME contents. - * @section page_iface_zcr_input_method_surface_v1_api API - * See @ref iface_zcr_input_method_surface_v1. - */ -/** - * @defgroup iface_zcr_input_method_surface_v1 The zcr_input_method_surface_v1 interface - * - * An interface that may be implemented by a wl_surface to host IME contents. - */ -extern const struct wl_interface zcr_input_method_surface_v1_interface; - -#ifndef ZCR_REMOTE_SHELL_V1_CONTAINER_ENUM -#define ZCR_REMOTE_SHELL_V1_CONTAINER_ENUM -/** - * @ingroup iface_zcr_remote_shell_v1 - * containers for remote surfaces - * - * Determine how a remote surface should be stacked relative to other - * shell surfaces. - */ -enum zcr_remote_shell_v1_container { - /** - * default container - */ - ZCR_REMOTE_SHELL_V1_CONTAINER_DEFAULT = 1, - /** - * system modal container - */ - ZCR_REMOTE_SHELL_V1_CONTAINER_OVERLAY = 2, -}; -#endif /* ZCR_REMOTE_SHELL_V1_CONTAINER_ENUM */ - -#ifndef ZCR_REMOTE_SHELL_V1_STATE_TYPE_ENUM -#define ZCR_REMOTE_SHELL_V1_STATE_TYPE_ENUM -/** - * @ingroup iface_zcr_remote_shell_v1 - * state types for remote surfaces - * - * Defines common show states for shell surfaces. - */ -enum zcr_remote_shell_v1_state_type { - /** - * normal window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_NORMAL = 1, - /** - * minimized window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_MINIMIZED = 2, - /** - * maximized window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_MAXIMIZED = 3, - /** - * fullscreen window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_FULLSCREEN = 4, - /** - * pinned window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_PINNED = 5, - /** - * trusted pinned window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_TRUSTED_PINNED = 6, - /** - * moving window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_MOVING = 7, - /** - * resizing window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_RESIZING = 8, - /** - * left snapped window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_LEFT_SNAPPED = 9, - /** - * right snapped window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_RIGHT_SNAPPED = 10, - /** - * pip window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_PIP = 11, -}; -#endif /* ZCR_REMOTE_SHELL_V1_STATE_TYPE_ENUM */ - -#ifndef ZCR_REMOTE_SHELL_V1_ERROR_ENUM -#define ZCR_REMOTE_SHELL_V1_ERROR_ENUM -enum zcr_remote_shell_v1_error { - /** - * given wl_surface has another role - */ - ZCR_REMOTE_SHELL_V1_ERROR_ROLE = 0, - /** - * invalid notification key - */ - ZCR_REMOTE_SHELL_V1_ERROR_INVALID_NOTIFICATION_KEY = 1, -}; -#endif /* ZCR_REMOTE_SHELL_V1_ERROR_ENUM */ - -#ifndef ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_ENUM -#define ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_ENUM -/** - * @ingroup iface_zcr_remote_shell_v1 - * the layout mode - * - * Determine how a client should layout surfaces. - */ -enum zcr_remote_shell_v1_layout_mode { - /** - * multiple windows - */ - ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_WINDOWED = 1, - /** - * restricted mode for tablet - */ - ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_TABLET = 2, -}; -#endif /* ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_ENUM */ - -/** - * @ingroup iface_zcr_remote_shell_v1 - * @struct zcr_remote_shell_v1_interface - */ -struct zcr_remote_shell_v1_interface { - /** - * destroy remote_shell - * - * Destroy this remote_shell object. - * - * Destroying a bound remote_shell object while there are surfaces - * still alive created by this remote_shell object instance is - * illegal and will result in a protocol error. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * create a remote shell surface from a surface - * - * This creates an remote_surface for the given surface and gives - * it the remote_surface role. A wl_surface can only be given a - * remote_surface role once. If get_remote_surface is called with a - * wl_surface that already has an active remote_surface associated - * with it, or if it had any other role, an error is raised. - * - * See the documentation of remote_surface for more details about - * what an remote_surface is and how it is used. - */ - void (*get_remote_surface)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface, - uint32_t container); - /** - * create a notification surface from a surface - * - * Creates a notification_surface for the given surface, gives it - * the notification_surface role and associated it with a - * notification id. - */ - void (*get_notification_surface)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface, - const char *notification_key); - /** - * Create a input method surface from a surface - * - * Creates an input_method_surface for the given surface, gives - * it the input_method_surface role. - * @since 17 - */ - void (*get_input_method_surface)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface); -}; - -#define ZCR_REMOTE_SHELL_V1_ACTIVATED 0 -#define ZCR_REMOTE_SHELL_V1_CONFIGURATION_CHANGED 1 -#define ZCR_REMOTE_SHELL_V1_WORKSPACE 2 -#define ZCR_REMOTE_SHELL_V1_CONFIGURE 3 -#define ZCR_REMOTE_SHELL_V1_DEFAULT_DEVICE_SCALE_FACTOR 4 - -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_ACTIVATED_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_CONFIGURATION_CHANGED_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_WORKSPACE_SINCE_VERSION 5 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_CONFIGURE_SINCE_VERSION 5 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_DEFAULT_DEVICE_SCALE_FACTOR_SINCE_VERSION 8 - -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_GET_REMOTE_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_GET_NOTIFICATION_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_GET_INPUT_METHOD_SURFACE_SINCE_VERSION 17 - -/** - * @ingroup iface_zcr_remote_shell_v1 - * Sends an activated event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zcr_remote_shell_v1_send_activated(struct wl_resource *resource_, struct wl_resource *gained_active, struct wl_resource *lost_active) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SHELL_V1_ACTIVATED, gained_active, lost_active); -} - -/** - * @ingroup iface_zcr_remote_shell_v1 - * Sends an configuration_changed event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zcr_remote_shell_v1_send_configuration_changed(struct wl_resource *resource_, int32_t width, int32_t height, int32_t transform, wl_fixed_t scale_factor, int32_t work_area_inset_left, int32_t work_area_inset_top, int32_t work_area_inset_right, int32_t work_area_inset_bottom, uint32_t layout_mode) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SHELL_V1_CONFIGURATION_CHANGED, width, height, transform, scale_factor, work_area_inset_left, work_area_inset_top, work_area_inset_right, work_area_inset_bottom, layout_mode); -} - -/** - * @ingroup iface_zcr_remote_shell_v1 - * Sends an workspace event to the client owning the resource. - * @param resource_ The client's resource - * @param is_internal 1 if screen is built-in - */ -static inline void -zcr_remote_shell_v1_send_workspace(struct wl_resource *resource_, uint32_t id_hi, uint32_t id_lo, int32_t x, int32_t y, int32_t width, int32_t height, int32_t inset_left, int32_t inset_top, int32_t inset_right, int32_t inset_bottom, int32_t transform, wl_fixed_t scale_factor, uint32_t is_internal) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SHELL_V1_WORKSPACE, id_hi, id_lo, x, y, width, height, inset_left, inset_top, inset_right, inset_bottom, transform, scale_factor, is_internal); -} - -/** - * @ingroup iface_zcr_remote_shell_v1 - * Sends an configure event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zcr_remote_shell_v1_send_configure(struct wl_resource *resource_, uint32_t layout_mode) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SHELL_V1_CONFIGURE, layout_mode); -} - -/** - * @ingroup iface_zcr_remote_shell_v1 - * Sends an default_device_scale_factor event to the client owning the resource. - * @param resource_ The client's resource - * @param scale DP to pixels ratio, in 8.24 fixed point format - */ -static inline void -zcr_remote_shell_v1_send_default_device_scale_factor(struct wl_resource *resource_, int32_t scale) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SHELL_V1_DEFAULT_DEVICE_SCALE_FACTOR, scale); -} - -#ifndef ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_ENUM -#define ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * systemui visibility behavior - * - * Determine the visibility behavior of the system UI. - */ -enum zcr_remote_surface_v1_systemui_visibility_state { - /** - * system ui is visible - */ - ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_VISIBLE = 1, - /** - * system ui autohides and is not sticky - */ - ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_AUTOHIDE_NON_STICKY = 2, - /** - * system ui autohides and is sticky - */ - ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_AUTOHIDE_STICKY = 3, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_ORIENTATION_ENUM -#define ZCR_REMOTE_SURFACE_V1_ORIENTATION_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * window orientation - * - * The orientation of the window. - */ -enum zcr_remote_surface_v1_orientation { - /** - * portrait - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_PORTRAIT = 1, - /** - * landscape - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LANDSCAPE = 2, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_ORIENTATION_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_ENUM -#define ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * window type - * - * The type of the window. - */ -enum zcr_remote_surface_v1_window_type { - /** - * normal app window - */ - ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_NORMAL = 1, - /** - * window is treated as systemui - */ - ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_SYSTEM_UI = 2, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_ENUM -#define ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * bounds_change_reason - * - * Specifies the cause of the window bounds change event. - */ -enum zcr_remote_surface_v1_bounds_change_reason { - /** - * the window is being moved by drag operation - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_DRAG_MOVE = 1, - /** - * the window is being resized by drag operation. - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_DRAG_RESIZE = 2, - /** - * the window is resized to left snapped state - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_SNAP_TO_LEFT = 3, - /** - * the window is resized to right snapped state - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_SNAP_TO_RIGHT = 4, - /** - * the window bounds is moved due to other WM operations - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_MOVE = 5, - /** - * the window bounds is reiszed due to other WM operations - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_RESIZE = 6, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_ENUM -#define ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * resize direction - * - * The resize direction for drag operation - */ -enum zcr_remote_surface_v1_resize_direction { - /** - * move only, no resize - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_NONE = 0, - /** - * resize to the left - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_LEFT = 1, - /** - * resize to the top left - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_TOPLEFT = 2, - /** - * resize to the top - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_TOP = 3, - /** - * resize to the top right - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_TOPRIGHT = 4, - /** - * resize to the right - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_RIGHT = 5, - /** - * resize to the buttom right - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_BOTTOMRIGHT = 6, - /** - * resize to the bottom - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_BOTTOM = 7, - /** - * resize to the bottom left - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_BOTTOMLEFT = 8, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_ENUM -#define ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * frame types - * - * Frame type that can be used to decorate a surface. - */ -enum zcr_remote_surface_v1_frame_type { - /** - * no frame - */ - ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_NONE = 0, - /** - * caption with shadow - */ - ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_NORMAL = 1, - /** - * shadow only - */ - ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_SHADOW = 2, - /** - * autohide frame with shadow - */ - ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_AUTOHIDE = 3, - /** - * overlay frame with shadow - */ - ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_OVERLAY = 4, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_ENUM -#define ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * frame button types - * - * The mask that represents buttons on frame. - */ -enum zcr_remote_surface_v1_frame_button_type { - /** - * a button to naviate backwards - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_BACK = 1, - /** - * a button to minimize the window - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_MINIMIZE = 2, - /** - * a button to maximize or restore - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_MAXIMIZE_RESTORE = 4, - /** - * a button to activate application's menu - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_MENU = 8, - /** - * a button to close the window - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_CLOSE = 16, - /** - * a mask to turn the maximize_restore button to zoom button - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_ZOOM = 32, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_ENUM -#define ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * orientation lock request for remote surfaces - * - * Defines orientation request when a remote surface is in foreground. - */ -enum zcr_remote_surface_v1_orientation_lock { - /** - * no orientation lock - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_NONE = 1, - /** - * primary or secondary portrait - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_PORTRAIT = 2, - /** - * primary or secondary landscape - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_LANDSCAPE = 3, - /** - * keep current orientation - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_CURRENT = 4, - /** - * primary portrait - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_PORTRAIT_PRIMARY = 5, - /** - * primary landscape - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_LANDSCAPE_PRIMARY = 6, - /** - * secondary portrait - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_PORTRAIT_SECONDARY = 7, - /** - * secondary landscape - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_LANDSCAPE_SECONDARY = 8, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_ENUM */ - -/** - * @ingroup iface_zcr_remote_surface_v1 - * @struct zcr_remote_surface_v1_interface - */ -struct zcr_remote_surface_v1_interface { - /** - * Destroy the remote_surface - * - * Unmap and destroy the window. The window will be effectively - * hidden from the user's point of view, and all state will be - * lost. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * set application ID - * - * Set an application identifier for the surface. - */ - void (*set_app_id)(struct wl_client *client, - struct wl_resource *resource, - const char *app_id); - /** - * set the new window geometry - * - * The window geometry of a window is its "visible bounds" from - * the user's perspective. Client-side decorations often have - * invisible portions like drop-shadows which should be ignored for - * the purposes of aligning, placing and constraining windows. - * - * The window geometry is double buffered, and will be applied at - * the time wl_surface.commit of the corresponding wl_surface is - * called. - * - * Once the window geometry of the surface is set once, it is not - * possible to unset it, and it will remain the same until - * set_window_geometry is called again, even if a new subsurface or - * buffer is attached. - * - * If never set, the value is the full bounds of the output. This - * updates dynamically on every commit. - * - * The arguments are given in the output coordinate space. - * - * The width and height must be greater than zero. - */ - void (*set_window_geometry)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height); - /** - * set scale - * - * Set a scale factor that will be applied to surface and all - * descendants. - */ - void (*set_scale)(struct wl_client *client, - struct wl_resource *resource, - wl_fixed_t scale); - /** - * set a rectangular shadow - * - * [Deprecated] Request that surface needs a rectangular shadow. - * - * This is only a request that the surface should have a - * rectangular shadow. The compositor may choose to ignore this - * request. - * - * The arguments are given in the output coordinate space and - * specifies the inner bounds of the shadow. - * - * The arguments are given in the output coordinate space. - * Specifying zero width and height will disable the shadow. - */ - void (*set_rectangular_shadow)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height); - /** - * suggests the window's background opacity - * - * [Deprecated] Suggests the window's background opacity when the - * shadow is requested. - */ - void (*set_rectangular_shadow_background_opacity)(struct wl_client *client, - struct wl_resource *resource, - wl_fixed_t opacity); - /** - * set surface title - * - * 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. - */ - void (*set_title)(struct wl_client *client, - struct wl_resource *resource, - const char *title); - /** - * set top inset for surface - * - * Set distance from the top of the surface to the contents. - * - * This distance typically represents the size of the window - * caption. - */ - void (*set_top_inset)(struct wl_client *client, - struct wl_resource *resource, - int32_t height); - /** - * make the surface active - * - * Make the surface active and bring it to the front. - * @param serial the serial of the user event - */ - void (*activate)(struct wl_client *client, - struct wl_resource *resource, - uint32_t serial); - /** - * maximize - * - * Request that surface is maximized. The window geometry will be - * updated to whatever the compositor finds appropriate for a - * maximized window. - * - * This is only a request that the window should be maximized. The - * compositor may choose to ignore this request. The client should - * listen to set_maximized events to determine if the window was - * maximized or not. - */ - void (*maximize)(struct wl_client *client, - struct wl_resource *resource); - /** - * minimize - * - * Request that surface is minimized. - * - * This is only a request that the window should be minimized. The - * compositor may choose to ignore this request. The client should - * listen to set_minimized events to determine if the window was - * minimized or not. - */ - void (*minimize)(struct wl_client *client, - struct wl_resource *resource); - /** - * restore - * - * Request that surface is restored. This restores the window - * geometry to what it was before the window was minimized, - * maximized or made fullscreen. - * - * This is only a request that the window should be restored. The - * compositor may choose to ignore this request. The client should - * listen to unset_maximized, unset_minimize and unset_fullscreen - * events to determine if the window was restored or not. - */ - void (*restore)(struct wl_client *client, - struct wl_resource *resource); - /** - * fullscreen - * - * Request that surface is made fullscreen. - * - * This is only a request that the window should be made - * fullscreen. The compositor may choose to ignore this request. - * The client should listen to set_fullscreen events to determine - * if the window was made fullscreen or not. - */ - void (*fullscreen)(struct wl_client *client, - struct wl_resource *resource); - /** - * unfullscreen - * - * Request that surface is made unfullscreen. - * - * This is only a request that the window should be made - * unfullscreen. The compositor may choose to ignore this request. - * The client should listen to unset_fullscreen events to determine - * if the window was made unfullscreen or not. - */ - void (*unfullscreen)(struct wl_client *client, - struct wl_resource *resource); - /** - * pin - * - * Request that surface is pinned. - * - * This is only a request that the window should be pinned. The - * compositor may choose to ignore this request. The client should - * listen to state_changed events to determine if the window was - * pinned or not. If trusted flag is non-zero, the app can prevent - * users from exiting the pinned mode. - */ - void (*pin)(struct wl_client *client, - struct wl_resource *resource, - int32_t trusted); - /** - * unpin - * - * Request that surface is unpinned. - * - * This is only a request that the window should be unpinned. The - * compositor may choose to ignore this request. The client should - * listen to unset_pinned events to determine if the window was - * unpinned or not. - */ - void (*unpin)(struct wl_client *client, - struct wl_resource *resource); - /** - * suggests a re-layout of remote shell input area - * - * Suggests a surface should become system modal. - */ - void (*set_system_modal)(struct wl_client *client, - struct wl_resource *resource); - /** - * suggests a re-layout of remote shell input area - * - * Suggests a surface should become non system modal. - */ - void (*unset_system_modal)(struct wl_client *client, - struct wl_resource *resource); - /** - * set a rectangular shadow - * - * Request that surface needs a rectangular shadow. - * - * This is only a request that the surface should have a - * rectangular shadow. The compositor may choose to ignore this - * request. - * - * The arguments are given in the remote surface coordinate space - * and specifies inner bounds of the shadow. Specifying zero width - * and height will disable the shadow. - * @since 2 - */ - void (*set_rectangular_surface_shadow)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height); - /** - * requests the system ui visibility behavior for the surface - * - * Requests how the surface will change the visibility of the - * system UI when it is made active. - * @since 3 - */ - void (*set_systemui_visibility)(struct wl_client *client, - struct wl_resource *resource, - uint32_t visibility); - /** - * set always on top - * - * Request that surface is made to be always on top. - * - * This is only a request that the window should be always on top. - * The compositor may choose to ignore this request. - * @since 4 - */ - void (*set_always_on_top)(struct wl_client *client, - struct wl_resource *resource); - /** - * unset always on top - * - * Request that surface is made to be not always on top. - * - * This is only a request that the window should be not always on - * top. The compositor may choose to ignore this request. - * @since 4 - */ - void (*unset_always_on_top)(struct wl_client *client, - struct wl_resource *resource); - /** - * ack a configure event - * - * 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 during - * display configuration to change its coordinate space for - * set_window_geometry requests only when the client has switched - * to the new coordinate space. - * - * 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. - * @param serial the serial from the configure event - * @since 5 - */ - void (*ack_configure)(struct wl_client *client, - struct wl_resource *resource, - uint32_t serial); - /** - * start an interactive move - * - * Start an interactive, user-driven move of the surface. - * - * The compositor responds to this request with a configure event - * that transitions to the "moving" state. The client must only - * initiate motion after acknowledging the state change. The - * compositor can assume that subsequent set_window_geometry - * requests are position updates until the next state transition is - * acknowledged. - * - * The compositor may ignore move requests depending on the state - * of the surface, e.g. fullscreen or maximized. - * @since 5 - */ - void (*move)(struct wl_client *client, - struct wl_resource *resource); - /** - * set orientation - * - * Set an orientation for the surface. - * @since 6 - */ - void (*set_orientation)(struct wl_client *client, - struct wl_resource *resource, - int32_t orientation); - /** - * set the type of the window - * - * Set the type of window. This is only a hint to the compositor - * and the compositor is free to ignore it. - * @param type type of the window - * @since 7 - */ - void (*set_window_type)(struct wl_client *client, - struct wl_resource *resource, - uint32_t type); - /** - * start an interactive resize - * - * [Deprecated] Start an interactive, user-driven resize of the - * surface. - * - * The compositor responds to this request with a configure event - * that transitions to the "resizing" state. The client must only - * initiate resizing after acknowledging the state change. The - * compositor can assume that subsequent set_window_geometry - * requests are resizes until the next state transition is - * acknowledged. - * - * The compositor may ignore resize requests depending on the state - * of the surface, e.g. fullscreen or maximized. - * @since 9 - */ - void (*resize)(struct wl_client *client, - struct wl_resource *resource); - /** - * expand input region for resizing - * - * Expand input region of surface with resize outset. - * - * The compositor clips the input region of each surface to its - * bounds, unless the client requests a resize outset. In that - * case, the input region of the root surface is expanded to allow - * for some leeway around visible bounds when starting a - * user-driven resize. - * @since 9 - */ - void (*set_resize_outset)(struct wl_client *client, - struct wl_resource *resource, - int32_t outset); - /** - * start an interactive move - * - * Request an interactive, user-driven move of the surface. "x" - * and "y" specifies the starting point of the pointer device that - * initiated the move. - * - * The compositor responds to this request with a drag_started - * event with "none" direction. Please see drag_started event for - * more details. - * - * The compositor may ignore move requests depending on the state - * of the surface, e.g. fullscreen or maximized. - * @since 10 - */ - void (*start_move)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y); - /** - * set can_maximize - * - * Request that surface can be in maximzied state. - * @since 10 - */ - void (*set_can_maximize)(struct wl_client *client, - struct wl_resource *resource); - /** - * unset can_maximize - * - * Request that surface can not be in maximzied state. - * @since 10 - */ - void (*unset_can_maximize)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the minimum size - * - * Set a minimum size of the surface. - * - * Values set in this way are double-buffered. They will get - * applied on the next commit. - * @since 10 - */ - void (*set_min_size)(struct wl_client *client, - struct wl_resource *resource, - int32_t width, - int32_t height); - /** - * set the maximum size - * - * Set a maximum size of the surface. - * - * Values set in this way are double-buffered. They will get - * applied on the next commit. - * - * Setting the same size as minimum size makes the surface - * unresizable. - * @since 10 - */ - void (*set_max_size)(struct wl_client *client, - struct wl_resource *resource, - int32_t width, - int32_t height); - /** - * set the surface to left snapped - * - * Request that surface is snapped to left. - * @since 11 - */ - void (*set_snapped_to_left)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the surface to right snapped - * - * Request that surface is snapped to right. - * @since 11 - */ - void (*set_snapped_to_right)(struct wl_client *client, - struct wl_resource *resource); - /** - * start an interactive resize - * - * Request to start an interactive, user-driven resize of the - * surface. "x" and "y" specifies the starting point of the pointer - * device that initiated the reize. - * - * The compositor responds to this request with a "drag_started" - * event, followed by "bounds_changed" events, and ends the resize - * operation with a "drag_finhsed" event. The compositor determines - * the new bounds using the resize_direction and the pointer event - * location. - * - * The compositor may ignore resize requests depending on the state - * of the surface, e.g. fullscreen or maximized, or no drag event - * is in pregress. - * @param resize_direction the direction of resize - * @since 12 - */ - void (*start_resize)(struct wl_client *client, - struct wl_resource *resource, - uint32_t resize_direction, - int32_t x, - int32_t y); - /** - * request a frame for surface - * - * Enables compositor side frame decoration. |type| specifies the - * type of frame to use for the surface. - * @param type the frame type - * @since 13 - */ - void (*set_frame)(struct wl_client *client, - struct wl_resource *resource, - uint32_t type); - /** - * updates buttons' state on frame - * - * Updates the frame's button state. |visible_buttons| and - * |enabled_buttons| are the union of button mask defined in - * |frame_button_type| enum. - * - * The mask present in |enabled_buttons| but not in - * |visible_buttons| will be ignored. - * @since 13 - */ - void (*set_frame_buttons)(struct wl_client *client, - struct wl_resource *resource, - uint32_t visible_buttons, - uint32_t enabled_buttons); - /** - * set extra title string - * - * The extra informational string about the surface. This can be - * used to show the debug information in the title bar, or log - * messages. - * - * This is different from "set_title" which is used to identify the - * surface. - * - * The string must be encoded in UTF-8. - * @since 13 - */ - void (*set_extra_title)(struct wl_client *client, - struct wl_resource *resource, - const char *extra_title); - /** - * set orientation lock for a remote surface - * - * Request a specific orientation behavior when this surface is - * in foreground. - * @param orientation_lock the orientation lock - * @since 14 - */ - void (*set_orientation_lock)(struct wl_client *client, - struct wl_resource *resource, - uint32_t orientation_lock); - /** - * set pip for a remote surface - * - * Request that surface is set to Picture-in-Picture (PIP). - * @since 15 - */ - void (*pip)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZCR_REMOTE_SURFACE_V1_CLOSE 0 -#define ZCR_REMOTE_SURFACE_V1_STATE_TYPE_CHANGED 1 -#define ZCR_REMOTE_SURFACE_V1_CONFIGURE 2 -#define ZCR_REMOTE_SURFACE_V1_WINDOW_GEOMETRY_CHANGED 3 -#define ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGED 4 -#define ZCR_REMOTE_SURFACE_V1_DRAG_STARTED 5 -#define ZCR_REMOTE_SURFACE_V1_DRAG_FINISHED 6 - -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_CLOSE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_STATE_TYPE_CHANGED_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_CONFIGURE_SINCE_VERSION 5 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_WINDOW_GEOMETRY_CHANGED_SINCE_VERSION 9 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGED_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_DRAG_STARTED_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_DRAG_FINISHED_SINCE_VERSION 10 - -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_APP_ID_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_WINDOW_GEOMETRY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_SCALE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW_BACKGROUND_OPACITY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_TITLE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_TOP_INSET_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_ACTIVATE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_MAXIMIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_MINIMIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_RESTORE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_UNFULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_PIN_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_UNPIN_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_SYSTEM_MODAL_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_UNSET_SYSTEM_MODAL_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SURFACE_SHADOW_SINCE_VERSION 2 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_SYSTEMUI_VISIBILITY_SINCE_VERSION 3 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_ALWAYS_ON_TOP_SINCE_VERSION 4 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_UNSET_ALWAYS_ON_TOP_SINCE_VERSION 4 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_ACK_CONFIGURE_SINCE_VERSION 5 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_MOVE_SINCE_VERSION 5 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION_SINCE_VERSION 6 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_WINDOW_TYPE_SINCE_VERSION 7 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_RESIZE_SINCE_VERSION 9 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_RESIZE_OUTSET_SINCE_VERSION 9 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_START_MOVE_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_CAN_MAXIMIZE_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_UNSET_CAN_MAXIMIZE_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_MIN_SIZE_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_MAX_SIZE_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_LEFT_SINCE_VERSION 11 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_RIGHT_SINCE_VERSION 11 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_START_RESIZE_SINCE_VERSION 12 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_FRAME_SINCE_VERSION 13 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_FRAME_BUTTONS_SINCE_VERSION 13 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_EXTRA_TITLE_SINCE_VERSION 13 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION_LOCK_SINCE_VERSION 14 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_PIP_SINCE_VERSION 15 - -/** - * @ingroup iface_zcr_remote_surface_v1 - * Sends an close event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zcr_remote_surface_v1_send_close(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SURFACE_V1_CLOSE); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * Sends an state_type_changed event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zcr_remote_surface_v1_send_state_type_changed(struct wl_resource *resource_, uint32_t state_type) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SURFACE_V1_STATE_TYPE_CHANGED, state_type); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * Sends an configure event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zcr_remote_surface_v1_send_configure(struct wl_resource *resource_, int32_t origin_offset_x, int32_t origin_offset_y, struct wl_array *states, uint32_t serial) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SURFACE_V1_CONFIGURE, origin_offset_x, origin_offset_y, states, serial); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * Sends an window_geometry_changed event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zcr_remote_surface_v1_send_window_geometry_changed(struct wl_resource *resource_, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SURFACE_V1_WINDOW_GEOMETRY_CHANGED, x, y, width, height); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * Sends an bounds_changed event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zcr_remote_surface_v1_send_bounds_changed(struct wl_resource *resource_, uint32_t workspace_id_hi, uint32_t workspace_id_lo, int32_t x, int32_t y, int32_t width, int32_t height, uint32_t bounds_change_reason) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGED, workspace_id_hi, workspace_id_lo, x, y, width, height, bounds_change_reason); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * Sends an drag_started event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zcr_remote_surface_v1_send_drag_started(struct wl_resource *resource_, uint32_t direction) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SURFACE_V1_DRAG_STARTED, direction); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * Sends an drag_finished event to the client owning the resource. - * @param resource_ The client's resource - * @param canceled true if the operation was canceled - */ -static inline void -zcr_remote_surface_v1_send_drag_finished(struct wl_resource *resource_, int32_t x, int32_t y, int32_t canceled) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SURFACE_V1_DRAG_FINISHED, x, y, canceled); -} - -/** - * @ingroup iface_zcr_notification_surface_v1 - * @struct zcr_notification_surface_v1_interface - */ -struct zcr_notification_surface_v1_interface { - /** - * Destroy the notification_surface - * - * Unmap and destroy the notification surface. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * set application ID - * - * Set an application identifier for the notification surface. - * @since 16 - */ - void (*set_app_id)(struct wl_client *client, - struct wl_resource *resource, - const char *app_id); -}; - - -/** - * @ingroup iface_zcr_notification_surface_v1 - */ -#define ZCR_NOTIFICATION_SURFACE_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_notification_surface_v1 - */ -#define ZCR_NOTIFICATION_SURFACE_V1_SET_APP_ID_SINCE_VERSION 16 - -/** - * @ingroup iface_zcr_input_method_surface_v1 - * @struct zcr_input_method_surface_v1_interface - */ -struct zcr_input_method_surface_v1_interface { - /** - * Destroy the ime_surface - * - * Unmap and destroy the input mtehod surface. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - - -/** - * @ingroup iface_zcr_input_method_surface_v1 - */ -#define ZCR_INPUT_METHOD_SURFACE_V1_DESTROY_SINCE_VERSION 1 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/secure-output-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/secure-output-unstable-v1-client-protocol.h deleted file mode 100644 index 82c0a76aecd..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/secure-output-unstable-v1-client-protocol.h +++ /dev/null @@ -1,272 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef SECURE_OUTPUT_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define SECURE_OUTPUT_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_secure_output_unstable_v1 The secure_output_unstable_v1 protocol - * Protocol for providing secure output - * - * @section page_desc_secure_output_unstable_v1 Description - * - * This protocol specifies a set of interfaces used to prevent surface - * contents from appearing in screenshots or from being visible on non-secure - * outputs. - * - * In order to prevent surface contents from appearing in screenshots or from - * being visible on non-secure outputs, a client must first bind the global - * interface "wp_secure_output" which, if a compositor supports secure output, - * is exposed by the registry. Using the bound global object, the client uses - * the "get_security" request to instantiate an interface extension for a - * wl_surface object. This extended interface will then allow surfaces - * to be marked as only visible on secure outputs. - * - * Warning! The protocol described in this file is experimental and backward - * incompatible changes may be made. Backward compatible changes may be added - * together with the corresponding interface version bump. Backward - * incompatible changes are done by bumping the version number in the protocol - * and interface names and resetting the interface version. Once the protocol - * is to be declared stable, the 'z' prefix and the version number in the - * protocol and interface names are removed and the interface version number is - * reset. - * - * @section page_ifaces_secure_output_unstable_v1 Interfaces - * - @subpage page_iface_zcr_secure_output_v1 - secure output - * - @subpage page_iface_zcr_security_v1 - security interface to a wl_surface - * @section page_copyright_secure_output_unstable_v1 Copyright - * <pre> - * - * Copyright 2016 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_surface; -struct zcr_secure_output_v1; -struct zcr_security_v1; - -/** - * @page page_iface_zcr_secure_output_v1 zcr_secure_output_v1 - * @section page_iface_zcr_secure_output_v1_desc Description - * - * The global interface exposing secure output capabilities is used - * to instantiate an interface extension for a wl_surface object. - * This extended interface will then allow surfaces to be marked as - * as only visible on secure outputs. - * @section page_iface_zcr_secure_output_v1_api API - * See @ref iface_zcr_secure_output_v1. - */ -/** - * @defgroup iface_zcr_secure_output_v1 The zcr_secure_output_v1 interface - * - * The global interface exposing secure output capabilities is used - * to instantiate an interface extension for a wl_surface object. - * This extended interface will then allow surfaces to be marked as - * as only visible on secure outputs. - */ -extern const struct wl_interface zcr_secure_output_v1_interface; -/** - * @page page_iface_zcr_security_v1 zcr_security_v1 - * @section page_iface_zcr_security_v1_desc Description - * - * An additional interface to a wl_surface object, which allows the - * client to specify that a surface should not appear in screenshots - * or be visible on non-secure outputs. - * - * If the wl_surface associated with the security object is destroyed, - * the security object becomes inert. - * - * If the security object is destroyed, the security state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - * @section page_iface_zcr_security_v1_api API - * See @ref iface_zcr_security_v1. - */ -/** - * @defgroup iface_zcr_security_v1 The zcr_security_v1 interface - * - * An additional interface to a wl_surface object, which allows the - * client to specify that a surface should not appear in screenshots - * or be visible on non-secure outputs. - * - * If the wl_surface associated with the security object is destroyed, - * the security object becomes inert. - * - * If the security object is destroyed, the security state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - */ -extern const struct wl_interface zcr_security_v1_interface; - -#ifndef ZCR_SECURE_OUTPUT_V1_ERROR_ENUM -#define ZCR_SECURE_OUTPUT_V1_ERROR_ENUM -enum zcr_secure_output_v1_error { - /** - * the surface already has a security object associated - */ - ZCR_SECURE_OUTPUT_V1_ERROR_SECURITY_EXISTS = 0, -}; -#endif /* ZCR_SECURE_OUTPUT_V1_ERROR_ENUM */ - -#define ZCR_SECURE_OUTPUT_V1_DESTROY 0 -#define ZCR_SECURE_OUTPUT_V1_GET_SECURITY 1 - - -/** - * @ingroup iface_zcr_secure_output_v1 - */ -#define ZCR_SECURE_OUTPUT_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_secure_output_v1 - */ -#define ZCR_SECURE_OUTPUT_V1_GET_SECURITY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_secure_output_v1 */ -static inline void -zcr_secure_output_v1_set_user_data(struct zcr_secure_output_v1 *zcr_secure_output_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_secure_output_v1, user_data); -} - -/** @ingroup iface_zcr_secure_output_v1 */ -static inline void * -zcr_secure_output_v1_get_user_data(struct zcr_secure_output_v1 *zcr_secure_output_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_secure_output_v1); -} - -static inline uint32_t -zcr_secure_output_v1_get_version(struct zcr_secure_output_v1 *zcr_secure_output_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_secure_output_v1); -} - -/** - * @ingroup iface_zcr_secure_output_v1 - * - * Informs the server that the client will not be using this - * protocol object anymore. This does not affect any other objects, - * security objects included. - */ -static inline void -zcr_secure_output_v1_destroy(struct zcr_secure_output_v1 *zcr_secure_output_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_secure_output_v1, - ZCR_SECURE_OUTPUT_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_secure_output_v1); -} - -/** - * @ingroup iface_zcr_secure_output_v1 - * - * Instantiate an interface extension for the given wl_surface to - * provide surface security. If the given wl_surface already has - * a security object associated, the security_exists protocol error - * is raised. - */ -static inline struct zcr_security_v1 * -zcr_secure_output_v1_get_security(struct zcr_secure_output_v1 *zcr_secure_output_v1, struct wl_surface *surface) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_secure_output_v1, - ZCR_SECURE_OUTPUT_V1_GET_SECURITY, &zcr_security_v1_interface, NULL, surface); - - return (struct zcr_security_v1 *) id; -} - -#define ZCR_SECURITY_V1_DESTROY 0 -#define ZCR_SECURITY_V1_ONLY_VISIBLE_ON_SECURE_OUTPUT 1 - - -/** - * @ingroup iface_zcr_security_v1 - */ -#define ZCR_SECURITY_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_security_v1 - */ -#define ZCR_SECURITY_V1_ONLY_VISIBLE_ON_SECURE_OUTPUT_SINCE_VERSION 1 - -/** @ingroup iface_zcr_security_v1 */ -static inline void -zcr_security_v1_set_user_data(struct zcr_security_v1 *zcr_security_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_security_v1, user_data); -} - -/** @ingroup iface_zcr_security_v1 */ -static inline void * -zcr_security_v1_get_user_data(struct zcr_security_v1 *zcr_security_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_security_v1); -} - -static inline uint32_t -zcr_security_v1_get_version(struct zcr_security_v1 *zcr_security_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_security_v1); -} - -/** - * @ingroup iface_zcr_security_v1 - * - * The associated wl_surface's security state is removed. - * The change is applied on the next wl_surface.commit. - */ -static inline void -zcr_security_v1_destroy(struct zcr_security_v1 *zcr_security_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_security_v1, - ZCR_SECURITY_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_security_v1); -} - -/** - * @ingroup iface_zcr_security_v1 - * - * Constrain visibility of wl_surface contents to secure outputs. - * See wp_secure_output for the description. - * - * The only visible on secure output state is double-buffered state, - * and will be applied on the next wl_surface.commit. - */ -static inline void -zcr_security_v1_only_visible_on_secure_output(struct zcr_security_v1 *zcr_security_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_security_v1, - ZCR_SECURITY_V1_ONLY_VISIBLE_ON_SECURE_OUTPUT); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/secure-output-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/secure-output-unstable-v1-server-protocol.h deleted file mode 100644 index 27c7d90ecdc..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/secure-output-unstable-v1-server-protocol.h +++ /dev/null @@ -1,219 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef SECURE_OUTPUT_UNSTABLE_V1_SERVER_PROTOCOL_H -#define SECURE_OUTPUT_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_secure_output_unstable_v1 The secure_output_unstable_v1 protocol - * Protocol for providing secure output - * - * @section page_desc_secure_output_unstable_v1 Description - * - * This protocol specifies a set of interfaces used to prevent surface - * contents from appearing in screenshots or from being visible on non-secure - * outputs. - * - * In order to prevent surface contents from appearing in screenshots or from - * being visible on non-secure outputs, a client must first bind the global - * interface "wp_secure_output" which, if a compositor supports secure output, - * is exposed by the registry. Using the bound global object, the client uses - * the "get_security" request to instantiate an interface extension for a - * wl_surface object. This extended interface will then allow surfaces - * to be marked as only visible on secure outputs. - * - * Warning! The protocol described in this file is experimental and backward - * incompatible changes may be made. Backward compatible changes may be added - * together with the corresponding interface version bump. Backward - * incompatible changes are done by bumping the version number in the protocol - * and interface names and resetting the interface version. Once the protocol - * is to be declared stable, the 'z' prefix and the version number in the - * protocol and interface names are removed and the interface version number is - * reset. - * - * @section page_ifaces_secure_output_unstable_v1 Interfaces - * - @subpage page_iface_zcr_secure_output_v1 - secure output - * - @subpage page_iface_zcr_security_v1 - security interface to a wl_surface - * @section page_copyright_secure_output_unstable_v1 Copyright - * <pre> - * - * Copyright 2016 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_surface; -struct zcr_secure_output_v1; -struct zcr_security_v1; - -/** - * @page page_iface_zcr_secure_output_v1 zcr_secure_output_v1 - * @section page_iface_zcr_secure_output_v1_desc Description - * - * The global interface exposing secure output capabilities is used - * to instantiate an interface extension for a wl_surface object. - * This extended interface will then allow surfaces to be marked as - * as only visible on secure outputs. - * @section page_iface_zcr_secure_output_v1_api API - * See @ref iface_zcr_secure_output_v1. - */ -/** - * @defgroup iface_zcr_secure_output_v1 The zcr_secure_output_v1 interface - * - * The global interface exposing secure output capabilities is used - * to instantiate an interface extension for a wl_surface object. - * This extended interface will then allow surfaces to be marked as - * as only visible on secure outputs. - */ -extern const struct wl_interface zcr_secure_output_v1_interface; -/** - * @page page_iface_zcr_security_v1 zcr_security_v1 - * @section page_iface_zcr_security_v1_desc Description - * - * An additional interface to a wl_surface object, which allows the - * client to specify that a surface should not appear in screenshots - * or be visible on non-secure outputs. - * - * If the wl_surface associated with the security object is destroyed, - * the security object becomes inert. - * - * If the security object is destroyed, the security state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - * @section page_iface_zcr_security_v1_api API - * See @ref iface_zcr_security_v1. - */ -/** - * @defgroup iface_zcr_security_v1 The zcr_security_v1 interface - * - * An additional interface to a wl_surface object, which allows the - * client to specify that a surface should not appear in screenshots - * or be visible on non-secure outputs. - * - * If the wl_surface associated with the security object is destroyed, - * the security object becomes inert. - * - * If the security object is destroyed, the security state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - */ -extern const struct wl_interface zcr_security_v1_interface; - -#ifndef ZCR_SECURE_OUTPUT_V1_ERROR_ENUM -#define ZCR_SECURE_OUTPUT_V1_ERROR_ENUM -enum zcr_secure_output_v1_error { - /** - * the surface already has a security object associated - */ - ZCR_SECURE_OUTPUT_V1_ERROR_SECURITY_EXISTS = 0, -}; -#endif /* ZCR_SECURE_OUTPUT_V1_ERROR_ENUM */ - -/** - * @ingroup iface_zcr_secure_output_v1 - * @struct zcr_secure_output_v1_interface - */ -struct zcr_secure_output_v1_interface { - /** - * unbind from the secure output interface - * - * Informs the server that the client will not be using this - * protocol object anymore. This does not affect any other objects, - * security objects included. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * extend surface interface for security - * - * Instantiate an interface extension for the given wl_surface to - * provide surface security. If the given wl_surface already has a - * security object associated, the security_exists protocol error - * is raised. - * @param id the new security interface id - * @param surface the surface - */ - void (*get_security)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface); -}; - - -/** - * @ingroup iface_zcr_secure_output_v1 - */ -#define ZCR_SECURE_OUTPUT_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_secure_output_v1 - */ -#define ZCR_SECURE_OUTPUT_V1_GET_SECURITY_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_security_v1 - * @struct zcr_security_v1_interface - */ -struct zcr_security_v1_interface { - /** - * remove security from the surface - * - * The associated wl_surface's security state is removed. The - * change is applied on the next wl_surface.commit. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the only visible on secure output state - * - * Constrain visibility of wl_surface contents to secure outputs. - * See wp_secure_output for the description. - * - * The only visible on secure output state is double-buffered - * state, and will be applied on the next wl_surface.commit. - */ - void (*only_visible_on_secure_output)(struct wl_client *client, - struct wl_resource *resource); -}; - - -/** - * @ingroup iface_zcr_security_v1 - */ -#define ZCR_SECURITY_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_security_v1 - */ -#define ZCR_SECURITY_V1_ONLY_VISIBLE_ON_SECURE_OUTPUT_SINCE_VERSION 1 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/stylus-tools-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/stylus-tools-unstable-v1-client-protocol.h deleted file mode 100644 index 1e1eb25dc5a..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/stylus-tools-unstable-v1-client-protocol.h +++ /dev/null @@ -1,258 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef STYLUS_TOOLS_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define STYLUS_TOOLS_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_stylus_tools_unstable_v1 The stylus_tools_unstable_v1 protocol - * Protocol for the stylus tools - * - * @section page_desc_stylus_tools_unstable_v1 Description - * - * This protocol specifies a set of interfaces used to control the behavior - * of stylus tools. - * - * 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. - * - * @section page_ifaces_stylus_tools_unstable_v1 Interfaces - * - @subpage page_iface_zcr_stylus_tools_v1 - stylus_tools - * - @subpage page_iface_zcr_stylus_tool_v1 - stylus_tool interface to a wl_surface - * @section page_copyright_stylus_tools_unstable_v1 Copyright - * <pre> - * - * Copyright 2017 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_surface; -struct zcr_stylus_tool_v1; -struct zcr_stylus_tools_v1; - -/** - * @page page_iface_zcr_stylus_tools_v1 zcr_stylus_tools_v1 - * @section page_iface_zcr_stylus_tools_v1_desc Description - * - * The global interface is used to instantiate an interface extension for a - * wl_surface object. This extended interface will then allow the client to - * control the stylus-related behavior for input device event processing - * related to wl_surface. - * @section page_iface_zcr_stylus_tools_v1_api API - * See @ref iface_zcr_stylus_tools_v1. - */ -/** - * @defgroup iface_zcr_stylus_tools_v1 The zcr_stylus_tools_v1 interface - * - * The global interface is used to instantiate an interface extension for a - * wl_surface object. This extended interface will then allow the client to - * control the stylus-related behavior for input device event processing - * related to wl_surface. - */ -extern const struct wl_interface zcr_stylus_tools_v1_interface; -/** - * @page page_iface_zcr_stylus_tool_v1 zcr_stylus_tool_v1 - * @section page_iface_zcr_stylus_tool_v1_desc Description - * - * An additional interface to a wl_surface object, which allows the - * client to control the behavior of stylus tools. - * - * If the wl_surface associated with the stylus_tool object is destroyed, - * the stylus_tool object becomes inert. - * - * If the stylus_tool object is destroyed, the stylus_tool state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - * @section page_iface_zcr_stylus_tool_v1_api API - * See @ref iface_zcr_stylus_tool_v1. - */ -/** - * @defgroup iface_zcr_stylus_tool_v1 The zcr_stylus_tool_v1 interface - * - * An additional interface to a wl_surface object, which allows the - * client to control the behavior of stylus tools. - * - * If the wl_surface associated with the stylus_tool object is destroyed, - * the stylus_tool object becomes inert. - * - * If the stylus_tool object is destroyed, the stylus_tool state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - */ -extern const struct wl_interface zcr_stylus_tool_v1_interface; - -#ifndef ZCR_STYLUS_TOOLS_V1_ERROR_ENUM -#define ZCR_STYLUS_TOOLS_V1_ERROR_ENUM -enum zcr_stylus_tools_v1_error { - /** - * the surface already has a stylus_tool object associated - */ - ZCR_STYLUS_TOOLS_V1_ERROR_STYLUS_TOOL_EXISTS = 0, -}; -#endif /* ZCR_STYLUS_TOOLS_V1_ERROR_ENUM */ - -#define ZCR_STYLUS_TOOLS_V1_DESTROY 0 -#define ZCR_STYLUS_TOOLS_V1_GET_STYLUS_TOOL 1 - - -/** - * @ingroup iface_zcr_stylus_tools_v1 - */ -#define ZCR_STYLUS_TOOLS_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_stylus_tools_v1 - */ -#define ZCR_STYLUS_TOOLS_V1_GET_STYLUS_TOOL_SINCE_VERSION 1 - -/** @ingroup iface_zcr_stylus_tools_v1 */ -static inline void -zcr_stylus_tools_v1_set_user_data(struct zcr_stylus_tools_v1 *zcr_stylus_tools_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_stylus_tools_v1, user_data); -} - -/** @ingroup iface_zcr_stylus_tools_v1 */ -static inline void * -zcr_stylus_tools_v1_get_user_data(struct zcr_stylus_tools_v1 *zcr_stylus_tools_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_stylus_tools_v1); -} - -static inline uint32_t -zcr_stylus_tools_v1_get_version(struct zcr_stylus_tools_v1 *zcr_stylus_tools_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_stylus_tools_v1); -} - -/** - * @ingroup iface_zcr_stylus_tools_v1 - * - * Informs the server that the client will not be using this - * protocol object anymore. This does not affect any other objects, - * stylus_tool objects included. - */ -static inline void -zcr_stylus_tools_v1_destroy(struct zcr_stylus_tools_v1 *zcr_stylus_tools_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_stylus_tools_v1, - ZCR_STYLUS_TOOLS_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_stylus_tools_v1); -} - -/** - * @ingroup iface_zcr_stylus_tools_v1 - * - * Instantiate an interface extension for the given wl_surface to - * provide access to the stylus tools features. If the given - * wl_surface already has an stylus_tool object associated, - * the stylus_tool_exists protocol protocol error is raised. - */ -static inline struct zcr_stylus_tool_v1 * -zcr_stylus_tools_v1_get_stylus_tool(struct zcr_stylus_tools_v1 *zcr_stylus_tools_v1, struct wl_surface *surface) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_stylus_tools_v1, - ZCR_STYLUS_TOOLS_V1_GET_STYLUS_TOOL, &zcr_stylus_tool_v1_interface, NULL, surface); - - return (struct zcr_stylus_tool_v1 *) id; -} - -#define ZCR_STYLUS_TOOL_V1_DESTROY 0 -#define ZCR_STYLUS_TOOL_V1_SET_STYLUS_ONLY 1 - - -/** - * @ingroup iface_zcr_stylus_tool_v1 - */ -#define ZCR_STYLUS_TOOL_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_stylus_tool_v1 - */ -#define ZCR_STYLUS_TOOL_V1_SET_STYLUS_ONLY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_stylus_tool_v1 */ -static inline void -zcr_stylus_tool_v1_set_user_data(struct zcr_stylus_tool_v1 *zcr_stylus_tool_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_stylus_tool_v1, user_data); -} - -/** @ingroup iface_zcr_stylus_tool_v1 */ -static inline void * -zcr_stylus_tool_v1_get_user_data(struct zcr_stylus_tool_v1 *zcr_stylus_tool_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_stylus_tool_v1); -} - -static inline uint32_t -zcr_stylus_tool_v1_get_version(struct zcr_stylus_tool_v1 *zcr_stylus_tool_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_stylus_tool_v1); -} - -/** - * @ingroup iface_zcr_stylus_tool_v1 - * - * The associated wl_surface's stylus_tool state is removed. - * The change is applied on the next wl_surface.commit. - */ -static inline void -zcr_stylus_tool_v1_destroy(struct zcr_stylus_tool_v1 *zcr_stylus_tool_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_stylus_tool_v1, - ZCR_STYLUS_TOOL_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_stylus_tool_v1); -} - -/** - * @ingroup iface_zcr_stylus_tool_v1 - * - * Enables the "stylus-only" mode for input device event processing - * related to wl_surface. - */ -static inline void -zcr_stylus_tool_v1_set_stylus_only(struct zcr_stylus_tool_v1 *zcr_stylus_tool_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_stylus_tool_v1, - ZCR_STYLUS_TOOL_V1_SET_STYLUS_ONLY); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/stylus-tools-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/stylus-tools-unstable-v1-server-protocol.h deleted file mode 100644 index b1b117e206e..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/stylus-tools-unstable-v1-server-protocol.h +++ /dev/null @@ -1,205 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef STYLUS_TOOLS_UNSTABLE_V1_SERVER_PROTOCOL_H -#define STYLUS_TOOLS_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_stylus_tools_unstable_v1 The stylus_tools_unstable_v1 protocol - * Protocol for the stylus tools - * - * @section page_desc_stylus_tools_unstable_v1 Description - * - * This protocol specifies a set of interfaces used to control the behavior - * of stylus tools. - * - * 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. - * - * @section page_ifaces_stylus_tools_unstable_v1 Interfaces - * - @subpage page_iface_zcr_stylus_tools_v1 - stylus_tools - * - @subpage page_iface_zcr_stylus_tool_v1 - stylus_tool interface to a wl_surface - * @section page_copyright_stylus_tools_unstable_v1 Copyright - * <pre> - * - * Copyright 2017 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_surface; -struct zcr_stylus_tool_v1; -struct zcr_stylus_tools_v1; - -/** - * @page page_iface_zcr_stylus_tools_v1 zcr_stylus_tools_v1 - * @section page_iface_zcr_stylus_tools_v1_desc Description - * - * The global interface is used to instantiate an interface extension for a - * wl_surface object. This extended interface will then allow the client to - * control the stylus-related behavior for input device event processing - * related to wl_surface. - * @section page_iface_zcr_stylus_tools_v1_api API - * See @ref iface_zcr_stylus_tools_v1. - */ -/** - * @defgroup iface_zcr_stylus_tools_v1 The zcr_stylus_tools_v1 interface - * - * The global interface is used to instantiate an interface extension for a - * wl_surface object. This extended interface will then allow the client to - * control the stylus-related behavior for input device event processing - * related to wl_surface. - */ -extern const struct wl_interface zcr_stylus_tools_v1_interface; -/** - * @page page_iface_zcr_stylus_tool_v1 zcr_stylus_tool_v1 - * @section page_iface_zcr_stylus_tool_v1_desc Description - * - * An additional interface to a wl_surface object, which allows the - * client to control the behavior of stylus tools. - * - * If the wl_surface associated with the stylus_tool object is destroyed, - * the stylus_tool object becomes inert. - * - * If the stylus_tool object is destroyed, the stylus_tool state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - * @section page_iface_zcr_stylus_tool_v1_api API - * See @ref iface_zcr_stylus_tool_v1. - */ -/** - * @defgroup iface_zcr_stylus_tool_v1 The zcr_stylus_tool_v1 interface - * - * An additional interface to a wl_surface object, which allows the - * client to control the behavior of stylus tools. - * - * If the wl_surface associated with the stylus_tool object is destroyed, - * the stylus_tool object becomes inert. - * - * If the stylus_tool object is destroyed, the stylus_tool state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - */ -extern const struct wl_interface zcr_stylus_tool_v1_interface; - -#ifndef ZCR_STYLUS_TOOLS_V1_ERROR_ENUM -#define ZCR_STYLUS_TOOLS_V1_ERROR_ENUM -enum zcr_stylus_tools_v1_error { - /** - * the surface already has a stylus_tool object associated - */ - ZCR_STYLUS_TOOLS_V1_ERROR_STYLUS_TOOL_EXISTS = 0, -}; -#endif /* ZCR_STYLUS_TOOLS_V1_ERROR_ENUM */ - -/** - * @ingroup iface_zcr_stylus_tools_v1 - * @struct zcr_stylus_tools_v1_interface - */ -struct zcr_stylus_tools_v1_interface { - /** - * unbind from the stylus_tools interface - * - * Informs the server that the client will not be using this - * protocol object anymore. This does not affect any other objects, - * stylus_tool objects included. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * extend surface interface for stylus_tool - * - * Instantiate an interface extension for the given wl_surface to - * provide access to the stylus tools features. If the given - * wl_surface already has an stylus_tool object associated, the - * stylus_tool_exists protocol protocol error is raised. - * @param id the new stylus_tool interface id - * @param surface the surface - */ - void (*get_stylus_tool)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface); -}; - - -/** - * @ingroup iface_zcr_stylus_tools_v1 - */ -#define ZCR_STYLUS_TOOLS_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_stylus_tools_v1 - */ -#define ZCR_STYLUS_TOOLS_V1_GET_STYLUS_TOOL_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_stylus_tool_v1 - * @struct zcr_stylus_tool_v1_interface - */ -struct zcr_stylus_tool_v1_interface { - /** - * remove stylus_tool from the surface - * - * The associated wl_surface's stylus_tool state is removed. The - * change is applied on the next wl_surface.commit. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * Set the stylus-only mode - * - * Enables the "stylus-only" mode for input device event - * processing related to wl_surface. - */ - void (*set_stylus_only)(struct wl_client *client, - struct wl_resource *resource); -}; - - -/** - * @ingroup iface_zcr_stylus_tool_v1 - */ -#define ZCR_STYLUS_TOOL_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_stylus_tool_v1 - */ -#define ZCR_STYLUS_TOOL_V1_SET_STYLUS_ONLY_SINCE_VERSION 1 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/stylus-unstable-v2-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/stylus-unstable-v2-client-protocol.h deleted file mode 100644 index 0de3255e25b..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/stylus-unstable-v2-client-protocol.h +++ /dev/null @@ -1,316 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef STYLUS_UNSTABLE_V2_CLIENT_PROTOCOL_H -#define STYLUS_UNSTABLE_V2_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_stylus_unstable_v2 The stylus_unstable_v2 protocol - * @section page_ifaces_stylus_unstable_v2 Interfaces - * - @subpage page_iface_zcr_stylus_v2 - extends wl_touch with events for on-screen stylus - * - @subpage page_iface_zcr_touch_stylus_v2 - stylus extension for touch - * @section page_copyright_stylus_unstable_v2 Copyright - * <pre> - * - * Copyright 2016 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_touch; -struct zcr_stylus_v2; -struct zcr_touch_stylus_v2; - -/** - * @page page_iface_zcr_stylus_v2 zcr_stylus_v2 - * @section page_iface_zcr_stylus_v2_desc Description - * - * Allows a wl_touch to report stylus specific information. The client can - * interpret the on-screen stylus like any other touch event, and use - * this protocol to obtain detail information about the type of stylus, - * as well as the force and tilt of the tool. - * - * These events are to be fired by the server within the same frame as other - * wl_touch 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - * @section page_iface_zcr_stylus_v2_api API - * See @ref iface_zcr_stylus_v2. - */ -/** - * @defgroup iface_zcr_stylus_v2 The zcr_stylus_v2 interface - * - * Allows a wl_touch to report stylus specific information. The client can - * interpret the on-screen stylus like any other touch event, and use - * this protocol to obtain detail information about the type of stylus, - * as well as the force and tilt of the tool. - * - * These events are to be fired by the server within the same frame as other - * wl_touch 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - */ -extern const struct wl_interface zcr_stylus_v2_interface; -/** - * @page page_iface_zcr_touch_stylus_v2 zcr_touch_stylus_v2 - * @section page_iface_zcr_touch_stylus_v2_desc Description - * - * The zcr_touch_stylus_v1 interface extends the wl_touch interface with - * events to describe details about a stylus. - * @section page_iface_zcr_touch_stylus_v2_api API - * See @ref iface_zcr_touch_stylus_v2. - */ -/** - * @defgroup iface_zcr_touch_stylus_v2 The zcr_touch_stylus_v2 interface - * - * The zcr_touch_stylus_v1 interface extends the wl_touch interface with - * events to describe details about a stylus. - */ -extern const struct wl_interface zcr_touch_stylus_v2_interface; - -#ifndef ZCR_STYLUS_V2_ERROR_ENUM -#define ZCR_STYLUS_V2_ERROR_ENUM -enum zcr_stylus_v2_error { - /** - * the touch already has a touch_stylus object associated - */ - ZCR_STYLUS_V2_ERROR_TOUCH_STYLUS_EXISTS = 0, -}; -#endif /* ZCR_STYLUS_V2_ERROR_ENUM */ - -#define ZCR_STYLUS_V2_GET_TOUCH_STYLUS 0 - - -/** - * @ingroup iface_zcr_stylus_v2 - */ -#define ZCR_STYLUS_V2_GET_TOUCH_STYLUS_SINCE_VERSION 1 - -/** @ingroup iface_zcr_stylus_v2 */ -static inline void -zcr_stylus_v2_set_user_data(struct zcr_stylus_v2 *zcr_stylus_v2, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_stylus_v2, user_data); -} - -/** @ingroup iface_zcr_stylus_v2 */ -static inline void * -zcr_stylus_v2_get_user_data(struct zcr_stylus_v2 *zcr_stylus_v2) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_stylus_v2); -} - -static inline uint32_t -zcr_stylus_v2_get_version(struct zcr_stylus_v2 *zcr_stylus_v2) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_stylus_v2); -} - -/** @ingroup iface_zcr_stylus_v2 */ -static inline void -zcr_stylus_v2_destroy(struct zcr_stylus_v2 *zcr_stylus_v2) -{ - wl_proxy_destroy((struct wl_proxy *) zcr_stylus_v2); -} - -/** - * @ingroup iface_zcr_stylus_v2 - * - * Create touch_stylus object. See zcr_touch_stylus_v1 interface for - * details. If the given wl_touch already has a touch_stylus object - * associated, the touch_stylus_exists protocol error is raised. - */ -static inline struct zcr_touch_stylus_v2 * -zcr_stylus_v2_get_touch_stylus(struct zcr_stylus_v2 *zcr_stylus_v2, struct wl_touch *touch) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_stylus_v2, - ZCR_STYLUS_V2_GET_TOUCH_STYLUS, &zcr_touch_stylus_v2_interface, NULL, touch); - - return (struct zcr_touch_stylus_v2 *) id; -} - -#ifndef ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_ENUM -#define ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_ENUM -/** - * @ingroup iface_zcr_touch_stylus_v2 - * tool type of device. - */ -enum zcr_touch_stylus_v2_tool_type { - /** - * Touch - */ - ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_TOUCH = 1, - /** - * Pen - */ - ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_PEN = 2, - /** - * Eraser - */ - ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_ERASER = 3, -}; -#endif /* ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_ENUM */ - -/** - * @ingroup iface_zcr_touch_stylus_v2 - * @struct zcr_touch_stylus_v2_listener - */ -struct zcr_touch_stylus_v2_listener { - /** - * sets tool type of touch - * - * Notification that the user is using a tool type other than - * touch. There can only be one tool in use at a time. This event - * is sent in the same frame as the wl_touch.down event. The tool - * type cannot change while a touch is being reported. - * @param id touch id - * @param type type of tool in use - */ - void (*tool)(void *data, - struct zcr_touch_stylus_v2 *zcr_touch_stylus_v2, - uint32_t id, - uint32_t type); - /** - * force change event - * - * Notification of a change in physical force on the surface of - * the screen. The force is calibrated and normalized to the 0 to 1 - * range. - * @param time timestamp with millisecond granularity - * @param id touch id - * @param force new value of force - */ - void (*force)(void *data, - struct zcr_touch_stylus_v2 *zcr_touch_stylus_v2, - uint32_t time, - uint32_t id, - wl_fixed_t force); - /** - * tilt change event - * - * Notification of a change in tilt of a stylus. - * - * Measured from surface normal as plane angle in degrees, values - * lie in [-90,90]. A positive x is to the right and a positive y - * is towards the user. - * @param time timestamp with millisecond granularity - * @param id touch id - * @param tilt_x tilt in x direction - * @param tilt_y tilt in y direction - */ - void (*tilt)(void *data, - struct zcr_touch_stylus_v2 *zcr_touch_stylus_v2, - uint32_t time, - uint32_t id, - wl_fixed_t tilt_x, - wl_fixed_t tilt_y); -}; - -/** - * @ingroup iface_zcr_touch_stylus_v2 - */ -static inline int -zcr_touch_stylus_v2_add_listener(struct zcr_touch_stylus_v2 *zcr_touch_stylus_v2, - const struct zcr_touch_stylus_v2_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zcr_touch_stylus_v2, - (void (**)(void)) listener, data); -} - -#define ZCR_TOUCH_STYLUS_V2_DESTROY 0 - -/** - * @ingroup iface_zcr_touch_stylus_v2 - */ -#define ZCR_TOUCH_STYLUS_V2_TOOL_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_touch_stylus_v2 - */ -#define ZCR_TOUCH_STYLUS_V2_FORCE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_touch_stylus_v2 - */ -#define ZCR_TOUCH_STYLUS_V2_TILT_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_touch_stylus_v2 - */ -#define ZCR_TOUCH_STYLUS_V2_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_touch_stylus_v2 */ -static inline void -zcr_touch_stylus_v2_set_user_data(struct zcr_touch_stylus_v2 *zcr_touch_stylus_v2, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_touch_stylus_v2, user_data); -} - -/** @ingroup iface_zcr_touch_stylus_v2 */ -static inline void * -zcr_touch_stylus_v2_get_user_data(struct zcr_touch_stylus_v2 *zcr_touch_stylus_v2) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_touch_stylus_v2); -} - -static inline uint32_t -zcr_touch_stylus_v2_get_version(struct zcr_touch_stylus_v2 *zcr_touch_stylus_v2) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_touch_stylus_v2); -} - -/** - * @ingroup iface_zcr_touch_stylus_v2 - */ -static inline void -zcr_touch_stylus_v2_destroy(struct zcr_touch_stylus_v2 *zcr_touch_stylus_v2) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_touch_stylus_v2, - ZCR_TOUCH_STYLUS_V2_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_touch_stylus_v2); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/stylus-unstable-v2-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/stylus-unstable-v2-server-protocol.h deleted file mode 100644 index bd951b66b09..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/stylus-unstable-v2-server-protocol.h +++ /dev/null @@ -1,251 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef STYLUS_UNSTABLE_V2_SERVER_PROTOCOL_H -#define STYLUS_UNSTABLE_V2_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_stylus_unstable_v2 The stylus_unstable_v2 protocol - * @section page_ifaces_stylus_unstable_v2 Interfaces - * - @subpage page_iface_zcr_stylus_v2 - extends wl_touch with events for on-screen stylus - * - @subpage page_iface_zcr_touch_stylus_v2 - stylus extension for touch - * @section page_copyright_stylus_unstable_v2 Copyright - * <pre> - * - * Copyright 2016 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_touch; -struct zcr_stylus_v2; -struct zcr_touch_stylus_v2; - -/** - * @page page_iface_zcr_stylus_v2 zcr_stylus_v2 - * @section page_iface_zcr_stylus_v2_desc Description - * - * Allows a wl_touch to report stylus specific information. The client can - * interpret the on-screen stylus like any other touch event, and use - * this protocol to obtain detail information about the type of stylus, - * as well as the force and tilt of the tool. - * - * These events are to be fired by the server within the same frame as other - * wl_touch 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - * @section page_iface_zcr_stylus_v2_api API - * See @ref iface_zcr_stylus_v2. - */ -/** - * @defgroup iface_zcr_stylus_v2 The zcr_stylus_v2 interface - * - * Allows a wl_touch to report stylus specific information. The client can - * interpret the on-screen stylus like any other touch event, and use - * this protocol to obtain detail information about the type of stylus, - * as well as the force and tilt of the tool. - * - * These events are to be fired by the server within the same frame as other - * wl_touch 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 uinterface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and uinterface 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. - */ -extern const struct wl_interface zcr_stylus_v2_interface; -/** - * @page page_iface_zcr_touch_stylus_v2 zcr_touch_stylus_v2 - * @section page_iface_zcr_touch_stylus_v2_desc Description - * - * The zcr_touch_stylus_v1 interface extends the wl_touch interface with - * events to describe details about a stylus. - * @section page_iface_zcr_touch_stylus_v2_api API - * See @ref iface_zcr_touch_stylus_v2. - */ -/** - * @defgroup iface_zcr_touch_stylus_v2 The zcr_touch_stylus_v2 interface - * - * The zcr_touch_stylus_v1 interface extends the wl_touch interface with - * events to describe details about a stylus. - */ -extern const struct wl_interface zcr_touch_stylus_v2_interface; - -#ifndef ZCR_STYLUS_V2_ERROR_ENUM -#define ZCR_STYLUS_V2_ERROR_ENUM -enum zcr_stylus_v2_error { - /** - * the touch already has a touch_stylus object associated - */ - ZCR_STYLUS_V2_ERROR_TOUCH_STYLUS_EXISTS = 0, -}; -#endif /* ZCR_STYLUS_V2_ERROR_ENUM */ - -/** - * @ingroup iface_zcr_stylus_v2 - * @struct zcr_stylus_v2_interface - */ -struct zcr_stylus_v2_interface { - /** - * get stylus interface for touch - * - * Create touch_stylus object. See zcr_touch_stylus_v1 interface - * for details. If the given wl_touch already has a touch_stylus - * object associated, the touch_stylus_exists protocol error is - * raised. - */ - void (*get_touch_stylus)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *touch); -}; - - -/** - * @ingroup iface_zcr_stylus_v2 - */ -#define ZCR_STYLUS_V2_GET_TOUCH_STYLUS_SINCE_VERSION 1 - -#ifndef ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_ENUM -#define ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_ENUM -/** - * @ingroup iface_zcr_touch_stylus_v2 - * tool type of device. - */ -enum zcr_touch_stylus_v2_tool_type { - /** - * Touch - */ - ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_TOUCH = 1, - /** - * Pen - */ - ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_PEN = 2, - /** - * Eraser - */ - ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_ERASER = 3, -}; -#endif /* ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_ENUM */ - -/** - * @ingroup iface_zcr_touch_stylus_v2 - * @struct zcr_touch_stylus_v2_interface - */ -struct zcr_touch_stylus_v2_interface { - /** - * destroy stylus object - * - * - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZCR_TOUCH_STYLUS_V2_TOOL 0 -#define ZCR_TOUCH_STYLUS_V2_FORCE 1 -#define ZCR_TOUCH_STYLUS_V2_TILT 2 - -/** - * @ingroup iface_zcr_touch_stylus_v2 - */ -#define ZCR_TOUCH_STYLUS_V2_TOOL_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_touch_stylus_v2 - */ -#define ZCR_TOUCH_STYLUS_V2_FORCE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_touch_stylus_v2 - */ -#define ZCR_TOUCH_STYLUS_V2_TILT_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_touch_stylus_v2 - */ -#define ZCR_TOUCH_STYLUS_V2_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_touch_stylus_v2 - * Sends an tool event to the client owning the resource. - * @param resource_ The client's resource - * @param id touch id - * @param type type of tool in use - */ -static inline void -zcr_touch_stylus_v2_send_tool(struct wl_resource *resource_, uint32_t id, uint32_t type) -{ - wl_resource_post_event(resource_, ZCR_TOUCH_STYLUS_V2_TOOL, id, type); -} - -/** - * @ingroup iface_zcr_touch_stylus_v2 - * Sends an force event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param id touch id - * @param force new value of force - */ -static inline void -zcr_touch_stylus_v2_send_force(struct wl_resource *resource_, uint32_t time, uint32_t id, wl_fixed_t force) -{ - wl_resource_post_event(resource_, ZCR_TOUCH_STYLUS_V2_FORCE, time, id, force); -} - -/** - * @ingroup iface_zcr_touch_stylus_v2 - * Sends an tilt event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param id touch id - * @param tilt_x tilt in x direction - * @param tilt_y tilt in y direction - */ -static inline void -zcr_touch_stylus_v2_send_tilt(struct wl_resource *resource_, uint32_t time, uint32_t id, wl_fixed_t tilt_x, wl_fixed_t tilt_y) -{ - wl_resource_post_event(resource_, ZCR_TOUCH_STYLUS_V2_TILT, time, id, tilt_x, tilt_y); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/viewporter-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/viewporter-client-protocol.h deleted file mode 100644 index 76af3603f89..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/viewporter-client-protocol.h +++ /dev/null @@ -1,408 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef VIEWPORTER_CLIENT_PROTOCOL_H -#define VIEWPORTER_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_viewporter The viewporter protocol - * @section page_ifaces_viewporter Interfaces - * - @subpage page_iface_wp_viewporter - surface cropping and scaling - * - @subpage page_iface_wp_viewport - crop and scale interface to a wl_surface - * @section page_copyright_viewporter Copyright - * <pre> - * - * 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. - * </pre> - */ -struct wl_surface; -struct wp_viewport; -struct wp_viewporter; - -/** - * @page page_iface_wp_viewporter wp_viewporter - * @section page_iface_wp_viewporter_desc Description - * - * 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. - * @section page_iface_wp_viewporter_api API - * See @ref iface_wp_viewporter. - */ -/** - * @defgroup iface_wp_viewporter The wp_viewporter interface - * - * 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. - */ -extern const struct wl_interface wp_viewporter_interface; -/** - * @page page_iface_wp_viewport wp_viewport - * @section page_iface_wp_viewport_desc Description - * - * An additional interface to a wl_surface object, which allows the - * client to specify the cropping and scaling of the surface - * contents. - * - * This interface works with two concepts: the source rectangle (src_x, - * src_y, src_width, src_height), and the destination size (dst_width, - * dst_height). The contents of the source rectangle are scaled to the - * destination size, and content outside the source rectangle is ignored. - * This state is double-buffered, and is applied on the next - * wl_surface.commit. - * - * The two parts of crop and scale state are independent: the source - * rectangle, and the destination size. Initially both are unset, that - * is, no scaling is applied. The whole of the current wl_buffer is - * used as the source, and the surface size is as defined in - * wl_surface.attach. - * - * If the destination size is set, it causes the surface size to become - * dst_width, dst_height. The source (rectangle) is scaled to exactly - * this size. This overrides whatever the attached wl_buffer size is, - * unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface - * has no content and therefore no size. Otherwise, the size is always - * at least 1x1 in surface local coordinates. - * - * If the source rectangle is set, it defines what area of the wl_buffer is - * taken as the source. If the source rectangle is set and the destination - * size is not set, then src_width and src_height must be integers, and the - * surface size becomes the source rectangle size. This results in cropping - * without scaling. If src_width or src_height are not integers and - * destination size is not set, the bad_size protocol error is raised when - * the surface state is applied. - * - * The coordinate transformations from buffer pixel coordinates up to - * the surface-local coordinates happen in the following order: - * 1. buffer_transform (wl_surface.set_buffer_transform) - * 2. buffer_scale (wl_surface.set_buffer_scale) - * 3. crop and scale (wp_viewport.set*) - * This means, that the source rectangle coordinates of crop and scale - * are given in the coordinates after the buffer transform and scale, - * i.e. in the coordinates that would be the surface-local coordinates - * if the crop and scale was not applied. - * - * If src_x or src_y are negative, the bad_value protocol error is raised. - * Otherwise, if the source rectangle is partially or completely outside of - * the non-NULL wl_buffer, then the out_of_buffer protocol error is raised - * when the surface state is applied. A NULL wl_buffer does not raise the - * out_of_buffer error. - * - * The x, y arguments of wl_surface.attach are applied as normal to - * the surface. They indicate how many pixels to remove from the - * surface size from the left and the top. In other words, they are - * still in the surface-local coordinate system, just like dst_width - * and dst_height are. - * - * If the wl_surface associated with the wp_viewport is destroyed, - * all wp_viewport requests except 'destroy' raise the protocol error - * no_surface. - * - * If the wp_viewport object is destroyed, the crop and scale - * state is removed from the wl_surface. The change will be applied - * on the next wl_surface.commit. - * @section page_iface_wp_viewport_api API - * See @ref iface_wp_viewport. - */ -/** - * @defgroup iface_wp_viewport The wp_viewport interface - * - * An additional interface to a wl_surface object, which allows the - * client to specify the cropping and scaling of the surface - * contents. - * - * This interface works with two concepts: the source rectangle (src_x, - * src_y, src_width, src_height), and the destination size (dst_width, - * dst_height). The contents of the source rectangle are scaled to the - * destination size, and content outside the source rectangle is ignored. - * This state is double-buffered, and is applied on the next - * wl_surface.commit. - * - * The two parts of crop and scale state are independent: the source - * rectangle, and the destination size. Initially both are unset, that - * is, no scaling is applied. The whole of the current wl_buffer is - * used as the source, and the surface size is as defined in - * wl_surface.attach. - * - * If the destination size is set, it causes the surface size to become - * dst_width, dst_height. The source (rectangle) is scaled to exactly - * this size. This overrides whatever the attached wl_buffer size is, - * unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface - * has no content and therefore no size. Otherwise, the size is always - * at least 1x1 in surface local coordinates. - * - * If the source rectangle is set, it defines what area of the wl_buffer is - * taken as the source. If the source rectangle is set and the destination - * size is not set, then src_width and src_height must be integers, and the - * surface size becomes the source rectangle size. This results in cropping - * without scaling. If src_width or src_height are not integers and - * destination size is not set, the bad_size protocol error is raised when - * the surface state is applied. - * - * The coordinate transformations from buffer pixel coordinates up to - * the surface-local coordinates happen in the following order: - * 1. buffer_transform (wl_surface.set_buffer_transform) - * 2. buffer_scale (wl_surface.set_buffer_scale) - * 3. crop and scale (wp_viewport.set*) - * This means, that the source rectangle coordinates of crop and scale - * are given in the coordinates after the buffer transform and scale, - * i.e. in the coordinates that would be the surface-local coordinates - * if the crop and scale was not applied. - * - * If src_x or src_y are negative, the bad_value protocol error is raised. - * Otherwise, if the source rectangle is partially or completely outside of - * the non-NULL wl_buffer, then the out_of_buffer protocol error is raised - * when the surface state is applied. A NULL wl_buffer does not raise the - * out_of_buffer error. - * - * The x, y arguments of wl_surface.attach are applied as normal to - * the surface. They indicate how many pixels to remove from the - * surface size from the left and the top. In other words, they are - * still in the surface-local coordinate system, just like dst_width - * and dst_height are. - * - * If the wl_surface associated with the wp_viewport is destroyed, - * all wp_viewport requests except 'destroy' raise the protocol error - * no_surface. - * - * If the wp_viewport object is destroyed, the crop and scale - * state is removed from the wl_surface. The change will be applied - * on the next wl_surface.commit. - */ -extern const struct wl_interface wp_viewport_interface; - -#ifndef WP_VIEWPORTER_ERROR_ENUM -#define WP_VIEWPORTER_ERROR_ENUM -enum wp_viewporter_error { - /** - * the surface already has a viewport object associated - */ - WP_VIEWPORTER_ERROR_VIEWPORT_EXISTS = 0, -}; -#endif /* WP_VIEWPORTER_ERROR_ENUM */ - -#define WP_VIEWPORTER_DESTROY 0 -#define WP_VIEWPORTER_GET_VIEWPORT 1 - - -/** - * @ingroup iface_wp_viewporter - */ -#define WP_VIEWPORTER_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_viewporter - */ -#define WP_VIEWPORTER_GET_VIEWPORT_SINCE_VERSION 1 - -/** @ingroup iface_wp_viewporter */ -static inline void -wp_viewporter_set_user_data(struct wp_viewporter *wp_viewporter, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wp_viewporter, user_data); -} - -/** @ingroup iface_wp_viewporter */ -static inline void * -wp_viewporter_get_user_data(struct wp_viewporter *wp_viewporter) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wp_viewporter); -} - -static inline uint32_t -wp_viewporter_get_version(struct wp_viewporter *wp_viewporter) -{ - return wl_proxy_get_version((struct wl_proxy *) wp_viewporter); -} - -/** - * @ingroup iface_wp_viewporter - * - * 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. - */ -static inline void -wp_viewporter_destroy(struct wp_viewporter *wp_viewporter) -{ - wl_proxy_marshal((struct wl_proxy *) wp_viewporter, - WP_VIEWPORTER_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wp_viewporter); -} - -/** - * @ingroup iface_wp_viewporter - * - * 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. - */ -static inline struct wp_viewport * -wp_viewporter_get_viewport(struct wp_viewporter *wp_viewporter, struct wl_surface *surface) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wp_viewporter, - WP_VIEWPORTER_GET_VIEWPORT, &wp_viewport_interface, NULL, surface); - - return (struct wp_viewport *) id; -} - -#ifndef WP_VIEWPORT_ERROR_ENUM -#define WP_VIEWPORT_ERROR_ENUM -enum wp_viewport_error { - /** - * negative or zero values in width or height - */ - WP_VIEWPORT_ERROR_BAD_VALUE = 0, - /** - * destination size is not integer - */ - WP_VIEWPORT_ERROR_BAD_SIZE = 1, - /** - * source rectangle extends outside of the content area - */ - WP_VIEWPORT_ERROR_OUT_OF_BUFFER = 2, - /** - * the wl_surface was destroyed - */ - WP_VIEWPORT_ERROR_NO_SURFACE = 3, -}; -#endif /* WP_VIEWPORT_ERROR_ENUM */ - -#define WP_VIEWPORT_DESTROY 0 -#define WP_VIEWPORT_SET_SOURCE 1 -#define WP_VIEWPORT_SET_DESTINATION 2 - - -/** - * @ingroup iface_wp_viewport - */ -#define WP_VIEWPORT_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_viewport - */ -#define WP_VIEWPORT_SET_SOURCE_SINCE_VERSION 1 -/** - * @ingroup iface_wp_viewport - */ -#define WP_VIEWPORT_SET_DESTINATION_SINCE_VERSION 1 - -/** @ingroup iface_wp_viewport */ -static inline void -wp_viewport_set_user_data(struct wp_viewport *wp_viewport, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wp_viewport, user_data); -} - -/** @ingroup iface_wp_viewport */ -static inline void * -wp_viewport_get_user_data(struct wp_viewport *wp_viewport) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wp_viewport); -} - -static inline uint32_t -wp_viewport_get_version(struct wp_viewport *wp_viewport) -{ - return wl_proxy_get_version((struct wl_proxy *) wp_viewport); -} - -/** - * @ingroup iface_wp_viewport - * - * The associated wl_surface's crop and scale state is removed. - * The change is applied on the next wl_surface.commit. - */ -static inline void -wp_viewport_destroy(struct wp_viewport *wp_viewport) -{ - wl_proxy_marshal((struct wl_proxy *) wp_viewport, - WP_VIEWPORT_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wp_viewport); -} - -/** - * @ingroup iface_wp_viewport - * - * Set the source rectangle of the associated wl_surface. See - * wp_viewport for the description, and relation to the wl_buffer - * size. - * - * If all of x, y, width and height are -1.0, the source rectangle is - * unset instead. Any other set of values where width or height are zero - * or negative, or x or y are negative, raise the bad_value protocol - * error. - * - * The crop and scale state is double-buffered state, and will be - * applied on the next wl_surface.commit. - */ -static inline void -wp_viewport_set_source(struct wp_viewport *wp_viewport, wl_fixed_t x, wl_fixed_t y, wl_fixed_t width, wl_fixed_t height) -{ - wl_proxy_marshal((struct wl_proxy *) wp_viewport, - WP_VIEWPORT_SET_SOURCE, x, y, width, height); -} - -/** - * @ingroup iface_wp_viewport - * - * Set the destination size of the associated wl_surface. See - * wp_viewport for the description, and relation to the wl_buffer - * size. - * - * If width is -1 and height is -1, the destination size is unset - * instead. Any other pair of values for width and height that - * contains zero or negative values raises the bad_value protocol - * error. - * - * The crop and scale state is double-buffered state, and will be - * applied on the next wl_surface.commit. - */ -static inline void -wp_viewport_set_destination(struct wp_viewport *wp_viewport, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) wp_viewport, - WP_VIEWPORT_SET_DESTINATION, width, height); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/viewporter-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/viewporter-server-protocol.h deleted file mode 100644 index 0bdb53a6755..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/viewporter-server-protocol.h +++ /dev/null @@ -1,361 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef VIEWPORTER_SERVER_PROTOCOL_H -#define VIEWPORTER_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_viewporter The viewporter protocol - * @section page_ifaces_viewporter Interfaces - * - @subpage page_iface_wp_viewporter - surface cropping and scaling - * - @subpage page_iface_wp_viewport - crop and scale interface to a wl_surface - * @section page_copyright_viewporter Copyright - * <pre> - * - * 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. - * </pre> - */ -struct wl_surface; -struct wp_viewport; -struct wp_viewporter; - -/** - * @page page_iface_wp_viewporter wp_viewporter - * @section page_iface_wp_viewporter_desc Description - * - * 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. - * @section page_iface_wp_viewporter_api API - * See @ref iface_wp_viewporter. - */ -/** - * @defgroup iface_wp_viewporter The wp_viewporter interface - * - * 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. - */ -extern const struct wl_interface wp_viewporter_interface; -/** - * @page page_iface_wp_viewport wp_viewport - * @section page_iface_wp_viewport_desc Description - * - * An additional interface to a wl_surface object, which allows the - * client to specify the cropping and scaling of the surface - * contents. - * - * This interface works with two concepts: the source rectangle (src_x, - * src_y, src_width, src_height), and the destination size (dst_width, - * dst_height). The contents of the source rectangle are scaled to the - * destination size, and content outside the source rectangle is ignored. - * This state is double-buffered, and is applied on the next - * wl_surface.commit. - * - * The two parts of crop and scale state are independent: the source - * rectangle, and the destination size. Initially both are unset, that - * is, no scaling is applied. The whole of the current wl_buffer is - * used as the source, and the surface size is as defined in - * wl_surface.attach. - * - * If the destination size is set, it causes the surface size to become - * dst_width, dst_height. The source (rectangle) is scaled to exactly - * this size. This overrides whatever the attached wl_buffer size is, - * unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface - * has no content and therefore no size. Otherwise, the size is always - * at least 1x1 in surface local coordinates. - * - * If the source rectangle is set, it defines what area of the wl_buffer is - * taken as the source. If the source rectangle is set and the destination - * size is not set, then src_width and src_height must be integers, and the - * surface size becomes the source rectangle size. This results in cropping - * without scaling. If src_width or src_height are not integers and - * destination size is not set, the bad_size protocol error is raised when - * the surface state is applied. - * - * The coordinate transformations from buffer pixel coordinates up to - * the surface-local coordinates happen in the following order: - * 1. buffer_transform (wl_surface.set_buffer_transform) - * 2. buffer_scale (wl_surface.set_buffer_scale) - * 3. crop and scale (wp_viewport.set*) - * This means, that the source rectangle coordinates of crop and scale - * are given in the coordinates after the buffer transform and scale, - * i.e. in the coordinates that would be the surface-local coordinates - * if the crop and scale was not applied. - * - * If src_x or src_y are negative, the bad_value protocol error is raised. - * Otherwise, if the source rectangle is partially or completely outside of - * the non-NULL wl_buffer, then the out_of_buffer protocol error is raised - * when the surface state is applied. A NULL wl_buffer does not raise the - * out_of_buffer error. - * - * The x, y arguments of wl_surface.attach are applied as normal to - * the surface. They indicate how many pixels to remove from the - * surface size from the left and the top. In other words, they are - * still in the surface-local coordinate system, just like dst_width - * and dst_height are. - * - * If the wl_surface associated with the wp_viewport is destroyed, - * all wp_viewport requests except 'destroy' raise the protocol error - * no_surface. - * - * If the wp_viewport object is destroyed, the crop and scale - * state is removed from the wl_surface. The change will be applied - * on the next wl_surface.commit. - * @section page_iface_wp_viewport_api API - * See @ref iface_wp_viewport. - */ -/** - * @defgroup iface_wp_viewport The wp_viewport interface - * - * An additional interface to a wl_surface object, which allows the - * client to specify the cropping and scaling of the surface - * contents. - * - * This interface works with two concepts: the source rectangle (src_x, - * src_y, src_width, src_height), and the destination size (dst_width, - * dst_height). The contents of the source rectangle are scaled to the - * destination size, and content outside the source rectangle is ignored. - * This state is double-buffered, and is applied on the next - * wl_surface.commit. - * - * The two parts of crop and scale state are independent: the source - * rectangle, and the destination size. Initially both are unset, that - * is, no scaling is applied. The whole of the current wl_buffer is - * used as the source, and the surface size is as defined in - * wl_surface.attach. - * - * If the destination size is set, it causes the surface size to become - * dst_width, dst_height. The source (rectangle) is scaled to exactly - * this size. This overrides whatever the attached wl_buffer size is, - * unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface - * has no content and therefore no size. Otherwise, the size is always - * at least 1x1 in surface local coordinates. - * - * If the source rectangle is set, it defines what area of the wl_buffer is - * taken as the source. If the source rectangle is set and the destination - * size is not set, then src_width and src_height must be integers, and the - * surface size becomes the source rectangle size. This results in cropping - * without scaling. If src_width or src_height are not integers and - * destination size is not set, the bad_size protocol error is raised when - * the surface state is applied. - * - * The coordinate transformations from buffer pixel coordinates up to - * the surface-local coordinates happen in the following order: - * 1. buffer_transform (wl_surface.set_buffer_transform) - * 2. buffer_scale (wl_surface.set_buffer_scale) - * 3. crop and scale (wp_viewport.set*) - * This means, that the source rectangle coordinates of crop and scale - * are given in the coordinates after the buffer transform and scale, - * i.e. in the coordinates that would be the surface-local coordinates - * if the crop and scale was not applied. - * - * If src_x or src_y are negative, the bad_value protocol error is raised. - * Otherwise, if the source rectangle is partially or completely outside of - * the non-NULL wl_buffer, then the out_of_buffer protocol error is raised - * when the surface state is applied. A NULL wl_buffer does not raise the - * out_of_buffer error. - * - * The x, y arguments of wl_surface.attach are applied as normal to - * the surface. They indicate how many pixels to remove from the - * surface size from the left and the top. In other words, they are - * still in the surface-local coordinate system, just like dst_width - * and dst_height are. - * - * If the wl_surface associated with the wp_viewport is destroyed, - * all wp_viewport requests except 'destroy' raise the protocol error - * no_surface. - * - * If the wp_viewport object is destroyed, the crop and scale - * state is removed from the wl_surface. The change will be applied - * on the next wl_surface.commit. - */ -extern const struct wl_interface wp_viewport_interface; - -#ifndef WP_VIEWPORTER_ERROR_ENUM -#define WP_VIEWPORTER_ERROR_ENUM -enum wp_viewporter_error { - /** - * the surface already has a viewport object associated - */ - WP_VIEWPORTER_ERROR_VIEWPORT_EXISTS = 0, -}; -#endif /* WP_VIEWPORTER_ERROR_ENUM */ - -/** - * @ingroup iface_wp_viewporter - * @struct wp_viewporter_interface - */ -struct wp_viewporter_interface { - /** - * unbind from the cropping and scaling interface - * - * 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. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * extend surface interface for crop and scale - * - * 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. - * @param id the new viewport interface id - * @param surface the surface - */ - void (*get_viewport)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface); -}; - - -/** - * @ingroup iface_wp_viewporter - */ -#define WP_VIEWPORTER_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_viewporter - */ -#define WP_VIEWPORTER_GET_VIEWPORT_SINCE_VERSION 1 - -#ifndef WP_VIEWPORT_ERROR_ENUM -#define WP_VIEWPORT_ERROR_ENUM -enum wp_viewport_error { - /** - * negative or zero values in width or height - */ - WP_VIEWPORT_ERROR_BAD_VALUE = 0, - /** - * destination size is not integer - */ - WP_VIEWPORT_ERROR_BAD_SIZE = 1, - /** - * source rectangle extends outside of the content area - */ - WP_VIEWPORT_ERROR_OUT_OF_BUFFER = 2, - /** - * the wl_surface was destroyed - */ - WP_VIEWPORT_ERROR_NO_SURFACE = 3, -}; -#endif /* WP_VIEWPORT_ERROR_ENUM */ - -/** - * @ingroup iface_wp_viewport - * @struct wp_viewport_interface - */ -struct wp_viewport_interface { - /** - * remove scaling and cropping from the surface - * - * The associated wl_surface's crop and scale state is removed. - * The change is applied on the next wl_surface.commit. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the source rectangle for cropping - * - * Set the source rectangle of the associated wl_surface. See - * wp_viewport for the description, and relation to the wl_buffer - * size. - * - * If all of x, y, width and height are -1.0, the source rectangle - * is unset instead. Any other set of values where width or height - * are zero or negative, or x or y are negative, raise the - * bad_value protocol error. - * - * The crop and scale state is double-buffered state, and will be - * applied on the next wl_surface.commit. - * @param x source rectangle x - * @param y source rectangle y - * @param width source rectangle width - * @param height source rectangle height - */ - void (*set_source)(struct wl_client *client, - struct wl_resource *resource, - wl_fixed_t x, - wl_fixed_t y, - wl_fixed_t width, - wl_fixed_t height); - /** - * set the surface size for scaling - * - * Set the destination size of the associated wl_surface. See - * wp_viewport for the description, and relation to the wl_buffer - * size. - * - * If width is -1 and height is -1, the destination size is unset - * instead. Any other pair of values for width and height that - * contains zero or negative values raises the bad_value protocol - * error. - * - * The crop and scale state is double-buffered state, and will be - * applied on the next wl_surface.commit. - * @param width surface width - * @param height surface height - */ - void (*set_destination)(struct wl_client *client, - struct wl_resource *resource, - int32_t width, - int32_t height); -}; - - -/** - * @ingroup iface_wp_viewport - */ -#define WP_VIEWPORT_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_viewport - */ -#define WP_VIEWPORT_SET_SOURCE_SINCE_VERSION 1 -/** - * @ingroup iface_wp_viewport - */ -#define WP_VIEWPORT_SET_DESTINATION_SINCE_VERSION 1 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/vsync-feedback-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/vsync-feedback-unstable-v1-client-protocol.h deleted file mode 100644 index 5a37d0007c6..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/vsync-feedback-unstable-v1-client-protocol.h +++ /dev/null @@ -1,257 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef VSYNC_FEEDBACK_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define VSYNC_FEEDBACK_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_vsync_feedback_unstable_v1 The vsync_feedback_unstable_v1 protocol - * Protocol for providing vertical synchronization timing - * - * @section page_desc_vsync_feedback_unstable_v1 Description - * - * This protocol specifies a set of interfaces used to inform the client about - * vertical synchronization timing in a precise way and without unnecessary - * overhead. - * - * 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 version number in the protocol is removed and - * the interface version number is reset. - * - * @section page_ifaces_vsync_feedback_unstable_v1 Interfaces - * - @subpage page_iface_zcr_vsync_feedback_v1 - Protocol for providing vertical synchronization timing - * - @subpage page_iface_zcr_vsync_timing_v1 - - * @section page_copyright_vsync_feedback_unstable_v1 Copyright - * <pre> - * - * Copyright 2016 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_output; -struct zcr_vsync_feedback_v1; -struct zcr_vsync_timing_v1; - -/** - * @page page_iface_zcr_vsync_feedback_v1 zcr_vsync_feedback_v1 - * @section page_iface_zcr_vsync_feedback_v1_desc Description - * - * The global interface that allows clients to subscribe for vertical - * synchronization timing data for given wl_output. - * @section page_iface_zcr_vsync_feedback_v1_api API - * See @ref iface_zcr_vsync_feedback_v1. - */ -/** - * @defgroup iface_zcr_vsync_feedback_v1 The zcr_vsync_feedback_v1 interface - * - * The global interface that allows clients to subscribe for vertical - * synchronization timing data for given wl_output. - */ -extern const struct wl_interface zcr_vsync_feedback_v1_interface; -/** - * @page page_iface_zcr_vsync_timing_v1 zcr_vsync_timing_v1 - * @section page_iface_zcr_vsync_timing_v1_api API - * See @ref iface_zcr_vsync_timing_v1. - */ -/** - * @defgroup iface_zcr_vsync_timing_v1 The zcr_vsync_timing_v1 interface - */ -extern const struct wl_interface zcr_vsync_timing_v1_interface; - -#define ZCR_VSYNC_FEEDBACK_V1_DESTROY 0 -#define ZCR_VSYNC_FEEDBACK_V1_GET_VSYNC_TIMING 1 - - -/** - * @ingroup iface_zcr_vsync_feedback_v1 - */ -#define ZCR_VSYNC_FEEDBACK_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_vsync_feedback_v1 - */ -#define ZCR_VSYNC_FEEDBACK_V1_GET_VSYNC_TIMING_SINCE_VERSION 1 - -/** @ingroup iface_zcr_vsync_feedback_v1 */ -static inline void -zcr_vsync_feedback_v1_set_user_data(struct zcr_vsync_feedback_v1 *zcr_vsync_feedback_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_vsync_feedback_v1, user_data); -} - -/** @ingroup iface_zcr_vsync_feedback_v1 */ -static inline void * -zcr_vsync_feedback_v1_get_user_data(struct zcr_vsync_feedback_v1 *zcr_vsync_feedback_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_vsync_feedback_v1); -} - -static inline uint32_t -zcr_vsync_feedback_v1_get_version(struct zcr_vsync_feedback_v1 *zcr_vsync_feedback_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_vsync_feedback_v1); -} - -/** - * @ingroup iface_zcr_vsync_feedback_v1 - * - * Destroy this vsync feedback object. Existing vsync timing objects shall - * not be affected by this request. - */ -static inline void -zcr_vsync_feedback_v1_destroy(struct zcr_vsync_feedback_v1 *zcr_vsync_feedback_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_vsync_feedback_v1, - ZCR_VSYNC_FEEDBACK_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_vsync_feedback_v1); -} - -/** - * @ingroup iface_zcr_vsync_feedback_v1 - * - * Create a new vsync timing object that represents a subscription to - * vertical synchronization timing updates of given wl_output object. - * - * The newly created object will immediately signal an update to notify - * the subscriber of initial timing parameters. - */ -static inline struct zcr_vsync_timing_v1 * -zcr_vsync_feedback_v1_get_vsync_timing(struct zcr_vsync_feedback_v1 *zcr_vsync_feedback_v1, struct wl_output *output) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_vsync_feedback_v1, - ZCR_VSYNC_FEEDBACK_V1_GET_VSYNC_TIMING, &zcr_vsync_timing_v1_interface, NULL, output); - - return (struct zcr_vsync_timing_v1 *) id; -} - -/** - * @ingroup iface_zcr_vsync_timing_v1 - * @struct zcr_vsync_timing_v1_listener - */ -struct zcr_vsync_timing_v1_listener { - /** - * vsync timing updated - * - * Notifies client that vertical synchronization timing of given - * wl_output has changed. - * - * Timing information consists of two data, timebase and interval. - * Timebase is an absolute timestamp of the vsync event that caused - * the timing to change. Interval is a period of time between - * subsequent vsync events. - * - * The unit of all above mentioned time values shall be - * microseconds and absolute timestamps should match the realm of - * the primary system monotonic counter, i.e. the POSIX - * clock_gettime(CLOCK_MONOTONIC). Data type of both values is - * defined to be a 64-bit unsigned integer, but since the biggest - * unsigned integer datatype defined by the Wayland protocol is the - * 32-bit uint, both timebase and interval are split into most - * significant and least significant part, suffixed by "_h" and - * "_l" respectively. - * @param timebase_l new vsync timebase (lower 32 bits) - * @param timebase_h new vsync timebase (upper 32 bits) - * @param interval_l new vsync interval (lower 32 bits) - * @param interval_h new vsync interval (upper 32 bits) - */ - void (*update)(void *data, - struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1, - uint32_t timebase_l, - uint32_t timebase_h, - uint32_t interval_l, - uint32_t interval_h); -}; - -/** - * @ingroup iface_zcr_vsync_timing_v1 - */ -static inline int -zcr_vsync_timing_v1_add_listener(struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1, - const struct zcr_vsync_timing_v1_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zcr_vsync_timing_v1, - (void (**)(void)) listener, data); -} - -#define ZCR_VSYNC_TIMING_V1_DESTROY 0 - -/** - * @ingroup iface_zcr_vsync_timing_v1 - */ -#define ZCR_VSYNC_TIMING_V1_UPDATE_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_vsync_timing_v1 - */ -#define ZCR_VSYNC_TIMING_V1_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_vsync_timing_v1 */ -static inline void -zcr_vsync_timing_v1_set_user_data(struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_vsync_timing_v1, user_data); -} - -/** @ingroup iface_zcr_vsync_timing_v1 */ -static inline void * -zcr_vsync_timing_v1_get_user_data(struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_vsync_timing_v1); -} - -static inline uint32_t -zcr_vsync_timing_v1_get_version(struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_vsync_timing_v1); -} - -/** - * @ingroup iface_zcr_vsync_timing_v1 - * - * Destroy this vsync timing object. - */ -static inline void -zcr_vsync_timing_v1_destroy(struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_vsync_timing_v1, - ZCR_VSYNC_TIMING_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_vsync_timing_v1); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/vsync-feedback-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/vsync-feedback-unstable-v1-server-protocol.h deleted file mode 100644 index 67c1f8da480..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/vsync-feedback-unstable-v1-server-protocol.h +++ /dev/null @@ -1,179 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef VSYNC_FEEDBACK_UNSTABLE_V1_SERVER_PROTOCOL_H -#define VSYNC_FEEDBACK_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_vsync_feedback_unstable_v1 The vsync_feedback_unstable_v1 protocol - * Protocol for providing vertical synchronization timing - * - * @section page_desc_vsync_feedback_unstable_v1 Description - * - * This protocol specifies a set of interfaces used to inform the client about - * vertical synchronization timing in a precise way and without unnecessary - * overhead. - * - * 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 version number in the protocol is removed and - * the interface version number is reset. - * - * @section page_ifaces_vsync_feedback_unstable_v1 Interfaces - * - @subpage page_iface_zcr_vsync_feedback_v1 - Protocol for providing vertical synchronization timing - * - @subpage page_iface_zcr_vsync_timing_v1 - - * @section page_copyright_vsync_feedback_unstable_v1 Copyright - * <pre> - * - * Copyright 2016 The Chromium Authors. - * - * 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. - * </pre> - */ -struct wl_output; -struct zcr_vsync_feedback_v1; -struct zcr_vsync_timing_v1; - -/** - * @page page_iface_zcr_vsync_feedback_v1 zcr_vsync_feedback_v1 - * @section page_iface_zcr_vsync_feedback_v1_desc Description - * - * The global interface that allows clients to subscribe for vertical - * synchronization timing data for given wl_output. - * @section page_iface_zcr_vsync_feedback_v1_api API - * See @ref iface_zcr_vsync_feedback_v1. - */ -/** - * @defgroup iface_zcr_vsync_feedback_v1 The zcr_vsync_feedback_v1 interface - * - * The global interface that allows clients to subscribe for vertical - * synchronization timing data for given wl_output. - */ -extern const struct wl_interface zcr_vsync_feedback_v1_interface; -/** - * @page page_iface_zcr_vsync_timing_v1 zcr_vsync_timing_v1 - * @section page_iface_zcr_vsync_timing_v1_api API - * See @ref iface_zcr_vsync_timing_v1. - */ -/** - * @defgroup iface_zcr_vsync_timing_v1 The zcr_vsync_timing_v1 interface - */ -extern const struct wl_interface zcr_vsync_timing_v1_interface; - -/** - * @ingroup iface_zcr_vsync_feedback_v1 - * @struct zcr_vsync_feedback_v1_interface - */ -struct zcr_vsync_feedback_v1_interface { - /** - * destroy vsync feedback object - * - * Destroy this vsync feedback object. Existing vsync timing - * objects shall not be affected by this request. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * get vsync timing object for given wl_output - * - * Create a new vsync timing object that represents a - * subscription to vertical synchronization timing updates of given - * wl_output object. - * - * The newly created object will immediately signal an update to - * notify the subscriber of initial timing parameters. - * @param id the new vsync timing interface id - * @param output the wl_output object to subscribe for timings of - */ - void (*get_vsync_timing)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *output); -}; - - -/** - * @ingroup iface_zcr_vsync_feedback_v1 - */ -#define ZCR_VSYNC_FEEDBACK_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_vsync_feedback_v1 - */ -#define ZCR_VSYNC_FEEDBACK_V1_GET_VSYNC_TIMING_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_vsync_timing_v1 - * @struct zcr_vsync_timing_v1_interface - */ -struct zcr_vsync_timing_v1_interface { - /** - * destroy vsync timing object - * - * Destroy this vsync timing object. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZCR_VSYNC_TIMING_V1_UPDATE 0 - -/** - * @ingroup iface_zcr_vsync_timing_v1 - */ -#define ZCR_VSYNC_TIMING_V1_UPDATE_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_vsync_timing_v1 - */ -#define ZCR_VSYNC_TIMING_V1_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_vsync_timing_v1 - * Sends an update event to the client owning the resource. - * @param resource_ The client's resource - * @param timebase_l new vsync timebase (lower 32 bits) - * @param timebase_h new vsync timebase (upper 32 bits) - * @param interval_l new vsync interval (lower 32 bits) - * @param interval_h new vsync interval (upper 32 bits) - */ -static inline void -zcr_vsync_timing_v1_send_update(struct wl_resource *resource_, uint32_t timebase_l, uint32_t timebase_h, uint32_t interval_l, uint32_t interval_h) -{ - wl_resource_post_event(resource_, ZCR_VSYNC_TIMING_V1_UPDATE, timebase_l, timebase_h, interval_l, interval_h); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v5-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v5-client-protocol.h deleted file mode 100644 index 95d708514bb..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v5-client-protocol.h +++ /dev/null @@ -1,1110 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef XDG_SHELL_UNSTABLE_V5_CLIENT_PROTOCOL_H -#define XDG_SHELL_UNSTABLE_V5_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_xdg_shell_unstable_v5 The xdg_shell_unstable_v5 protocol - * @section page_ifaces_xdg_shell_unstable_v5 Interfaces - * - @subpage page_iface_xdg_shell - create desktop-style surfaces - * - @subpage page_iface_xdg_surface - A desktop window - * - @subpage page_iface_xdg_popup - short-lived, popup surfaces for menus - * @section page_copyright_xdg_shell_unstable_v5 Copyright - * <pre> - * - * 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. - * </pre> - */ -struct wl_output; -struct wl_seat; -struct wl_surface; -struct xdg_popup; -struct xdg_shell; -struct xdg_surface; - -/** - * @page page_iface_xdg_shell xdg_shell - * @section page_iface_xdg_shell_desc Description - * - * 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. - * @section page_iface_xdg_shell_api API - * See @ref iface_xdg_shell. - */ -/** - * @defgroup iface_xdg_shell The xdg_shell interface - * - * 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. - */ -extern const struct wl_interface xdg_shell_interface; -/** - * @page page_iface_xdg_surface xdg_surface - * @section page_iface_xdg_surface_desc Description - * - * 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. - * @section page_iface_xdg_surface_api API - * See @ref iface_xdg_surface. - */ -/** - * @defgroup iface_xdg_surface The xdg_surface interface - * - * 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. - */ -extern const struct wl_interface xdg_surface_interface; -/** - * @page page_iface_xdg_popup xdg_popup - * @section page_iface_xdg_popup_desc Description - * - * 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. - * @section page_iface_xdg_popup_api API - * See @ref iface_xdg_popup. - */ -/** - * @defgroup iface_xdg_popup The xdg_popup interface - * - * 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. - */ -extern const struct wl_interface xdg_popup_interface; - -#ifndef XDG_SHELL_VERSION_ENUM -#define XDG_SHELL_VERSION_ENUM -/** - * @ingroup iface_xdg_shell - * latest protocol version - * - * 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. - */ -enum xdg_shell_version { - /** - * Always the latest version - */ - XDG_SHELL_VERSION_CURRENT = 5, -}; -#endif /* XDG_SHELL_VERSION_ENUM */ - -#ifndef XDG_SHELL_ERROR_ENUM -#define XDG_SHELL_ERROR_ENUM -enum xdg_shell_error { - /** - * given wl_surface has another role - */ - XDG_SHELL_ERROR_ROLE = 0, - /** - * xdg_shell was destroyed before children - */ - XDG_SHELL_ERROR_DEFUNCT_SURFACES = 1, - /** - * the client tried to map or destroy a non-topmost popup - */ - XDG_SHELL_ERROR_NOT_THE_TOPMOST_POPUP = 2, - /** - * the client specified an invalid popup parent surface - */ - XDG_SHELL_ERROR_INVALID_POPUP_PARENT = 3, -}; -#endif /* XDG_SHELL_ERROR_ENUM */ - -/** - * @ingroup iface_xdg_shell - * @struct xdg_shell_listener - */ -struct xdg_shell_listener { - /** - * check if the client is alive - * - * 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. - * @param serial pass this to the pong request - */ - void (*ping)(void *data, - struct xdg_shell *xdg_shell, - uint32_t serial); -}; - -/** - * @ingroup iface_xdg_shell - */ -static inline int -xdg_shell_add_listener(struct xdg_shell *xdg_shell, - const struct xdg_shell_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) xdg_shell, - (void (**)(void)) listener, data); -} - -#define XDG_SHELL_DESTROY 0 -#define XDG_SHELL_USE_UNSTABLE_VERSION 1 -#define XDG_SHELL_GET_XDG_SURFACE 2 -#define XDG_SHELL_GET_XDG_POPUP 3 -#define XDG_SHELL_PONG 4 - -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_PING_SINCE_VERSION 1 - -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_USE_UNSTABLE_VERSION_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_GET_XDG_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_GET_XDG_POPUP_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_PONG_SINCE_VERSION 1 - -/** @ingroup iface_xdg_shell */ -static inline void -xdg_shell_set_user_data(struct xdg_shell *xdg_shell, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) xdg_shell, user_data); -} - -/** @ingroup iface_xdg_shell */ -static inline void * -xdg_shell_get_user_data(struct xdg_shell *xdg_shell) -{ - return wl_proxy_get_user_data((struct wl_proxy *) xdg_shell); -} - -static inline uint32_t -xdg_shell_get_version(struct xdg_shell *xdg_shell) -{ - return wl_proxy_get_version((struct wl_proxy *) xdg_shell); -} - -/** - * @ingroup iface_xdg_shell - * - * 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. - */ -static inline void -xdg_shell_destroy(struct xdg_shell *xdg_shell) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_shell, - XDG_SHELL_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) xdg_shell); -} - -/** - * @ingroup iface_xdg_shell - * - * 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. - */ -static inline void -xdg_shell_use_unstable_version(struct xdg_shell *xdg_shell, int32_t version) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_shell, - XDG_SHELL_USE_UNSTABLE_VERSION, version); -} - -/** - * @ingroup iface_xdg_shell - * - * 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. - */ -static inline struct xdg_surface * -xdg_shell_get_xdg_surface(struct xdg_shell *xdg_shell, struct wl_surface *surface) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) xdg_shell, - XDG_SHELL_GET_XDG_SURFACE, &xdg_surface_interface, NULL, surface); - - return (struct xdg_surface *) id; -} - -/** - * @ingroup iface_xdg_shell - * - * 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. - */ -static inline struct xdg_popup * -xdg_shell_get_xdg_popup(struct xdg_shell *xdg_shell, struct wl_surface *surface, struct wl_surface *parent, struct wl_seat *seat, uint32_t serial, int32_t x, int32_t y) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) xdg_shell, - XDG_SHELL_GET_XDG_POPUP, &xdg_popup_interface, NULL, surface, parent, seat, serial, x, y); - - return (struct xdg_popup *) id; -} - -/** - * @ingroup iface_xdg_shell - * - * A client must respond to a ping event with a pong request or - * the client may be deemed unresponsive. - */ -static inline void -xdg_shell_pong(struct xdg_shell *xdg_shell, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_shell, - XDG_SHELL_PONG, serial); -} - -#ifndef XDG_SURFACE_RESIZE_EDGE_ENUM -#define XDG_SURFACE_RESIZE_EDGE_ENUM -/** - * @ingroup iface_xdg_surface - * edge values for resizing - * - * These values are used to indicate which edge of a surface - * is being dragged in a resize operation. - */ -enum xdg_surface_resize_edge { - XDG_SURFACE_RESIZE_EDGE_NONE = 0, - XDG_SURFACE_RESIZE_EDGE_TOP = 1, - XDG_SURFACE_RESIZE_EDGE_BOTTOM = 2, - XDG_SURFACE_RESIZE_EDGE_LEFT = 4, - XDG_SURFACE_RESIZE_EDGE_TOP_LEFT = 5, - XDG_SURFACE_RESIZE_EDGE_BOTTOM_LEFT = 6, - XDG_SURFACE_RESIZE_EDGE_RIGHT = 8, - XDG_SURFACE_RESIZE_EDGE_TOP_RIGHT = 9, - XDG_SURFACE_RESIZE_EDGE_BOTTOM_RIGHT = 10, -}; -#endif /* XDG_SURFACE_RESIZE_EDGE_ENUM */ - -#ifndef XDG_SURFACE_STATE_ENUM -#define XDG_SURFACE_STATE_ENUM -/** - * @ingroup iface_xdg_surface - * the surface is now activated - * - * 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. - */ -enum xdg_surface_state { - /** - * the surface is maximized - */ - XDG_SURFACE_STATE_MAXIMIZED = 1, - /** - * the surface is fullscreen - */ - XDG_SURFACE_STATE_FULLSCREEN = 2, - /** - * the surface is being resized - */ - XDG_SURFACE_STATE_RESIZING = 3, - /** - * the surface is now activated - */ - XDG_SURFACE_STATE_ACTIVATED = 4, -}; -#endif /* XDG_SURFACE_STATE_ENUM */ - -/** - * @ingroup iface_xdg_surface - * @struct xdg_surface_listener - */ -struct xdg_surface_listener { - /** - * suggest a surface change - * - * 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. - */ - void (*configure)(void *data, - struct xdg_surface *xdg_surface, - int32_t width, - int32_t height, - struct wl_array *states, - uint32_t serial); - /** - * surface wants to be closed - * - * 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... - */ - void (*close)(void *data, - struct xdg_surface *xdg_surface); -}; - -/** - * @ingroup iface_xdg_surface - */ -static inline int -xdg_surface_add_listener(struct xdg_surface *xdg_surface, - const struct xdg_surface_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) xdg_surface, - (void (**)(void)) listener, data); -} - -#define XDG_SURFACE_DESTROY 0 -#define XDG_SURFACE_SET_PARENT 1 -#define XDG_SURFACE_SET_TITLE 2 -#define XDG_SURFACE_SET_APP_ID 3 -#define XDG_SURFACE_SHOW_WINDOW_MENU 4 -#define XDG_SURFACE_MOVE 5 -#define XDG_SURFACE_RESIZE 6 -#define XDG_SURFACE_ACK_CONFIGURE 7 -#define XDG_SURFACE_SET_WINDOW_GEOMETRY 8 -#define XDG_SURFACE_SET_MAXIMIZED 9 -#define XDG_SURFACE_UNSET_MAXIMIZED 10 -#define XDG_SURFACE_SET_FULLSCREEN 11 -#define XDG_SURFACE_UNSET_FULLSCREEN 12 -#define XDG_SURFACE_SET_MINIMIZED 13 - -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_CLOSE_SINCE_VERSION 1 - -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_PARENT_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_TITLE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_APP_ID_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SHOW_WINDOW_MENU_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_MOVE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_RESIZE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_ACK_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_WINDOW_GEOMETRY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_UNSET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_UNSET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_MINIMIZED_SINCE_VERSION 1 - -/** @ingroup iface_xdg_surface */ -static inline void -xdg_surface_set_user_data(struct xdg_surface *xdg_surface, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) xdg_surface, user_data); -} - -/** @ingroup iface_xdg_surface */ -static inline void * -xdg_surface_get_user_data(struct xdg_surface *xdg_surface) -{ - return wl_proxy_get_user_data((struct wl_proxy *) xdg_surface); -} - -static inline uint32_t -xdg_surface_get_version(struct xdg_surface *xdg_surface) -{ - return wl_proxy_get_version((struct wl_proxy *) xdg_surface); -} - -/** - * @ingroup iface_xdg_surface - * - * 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. - */ -static inline void -xdg_surface_destroy(struct xdg_surface *xdg_surface) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) xdg_surface); -} - -/** - * @ingroup iface_xdg_surface - * - * 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. - */ -static inline void -xdg_surface_set_parent(struct xdg_surface *xdg_surface, struct xdg_surface *parent) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_SET_PARENT, parent); -} - -/** - * @ingroup iface_xdg_surface - * - * Set a short title for the surface. - * - * This string may be used to identify the surface in a task bar, - * window list, or other user interface elements provided by the - * compositor. - * - * The string must be encoded in UTF-8. - */ -static inline void -xdg_surface_set_title(struct xdg_surface *xdg_surface, const char *title) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_SET_TITLE, title); -} - -/** - * @ingroup iface_xdg_surface - * - * 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/ - */ -static inline void -xdg_surface_set_app_id(struct xdg_surface *xdg_surface, const char *app_id) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_SET_APP_ID, app_id); -} - -/** - * @ingroup iface_xdg_surface - * - * 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. - */ -static inline void -xdg_surface_show_window_menu(struct xdg_surface *xdg_surface, struct wl_seat *seat, uint32_t serial, int32_t x, int32_t y) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_SHOW_WINDOW_MENU, seat, serial, x, y); -} - -/** - * @ingroup iface_xdg_surface - * - * 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. - */ -static inline void -xdg_surface_move(struct xdg_surface *xdg_surface, struct wl_seat *seat, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_MOVE, seat, serial); -} - -/** - * @ingroup iface_xdg_surface - * - * 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. - */ -static inline void -xdg_surface_resize(struct xdg_surface *xdg_surface, struct wl_seat *seat, uint32_t serial, uint32_t edges) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_RESIZE, seat, serial, edges); -} - -/** - * @ingroup iface_xdg_surface - * - * 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. - */ -static inline void -xdg_surface_ack_configure(struct xdg_surface *xdg_surface, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_ACK_CONFIGURE, serial); -} - -/** - * @ingroup iface_xdg_surface - * - * The window geometry of a window is its "visible bounds" from the - * user's perspective. Client-side decorations often have invisible - * portions like drop-shadows which should be ignored for the - * purposes of aligning, placing and constraining windows. - * - * The window geometry is double buffered, and will be applied at the - * time wl_surface.commit of the corresponding wl_surface is called. - * - * Once the window geometry of the surface is set once, it is not - * possible to unset it, and it will remain the same until - * set_window_geometry is called again, even if a new subsurface or - * buffer is attached. - * - * If never set, the value is the full bounds of the surface, - * including any subsurfaces. This updates dynamically on every - * commit. This unset mode is meant for extremely simple clients. - * - * If responding to a configure event, the window geometry in here - * must respect the sizing negotiations specified by the states in - * the configure event. - * - * The arguments are given in the surface local coordinate space of - * the wl_surface associated with this xdg_surface. - * - * The width and height must be greater than zero. - */ -static inline void -xdg_surface_set_window_geometry(struct xdg_surface *xdg_surface, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_SET_WINDOW_GEOMETRY, x, y, width, height); -} - -/** - * @ingroup iface_xdg_surface - * - * 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. - */ -static inline void -xdg_surface_set_maximized(struct xdg_surface *xdg_surface) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_SET_MAXIMIZED); -} - -/** - * @ingroup iface_xdg_surface - * - * 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. - */ -static inline void -xdg_surface_unset_maximized(struct xdg_surface *xdg_surface) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_UNSET_MAXIMIZED); -} - -/** - * @ingroup iface_xdg_surface - * - * 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. - */ -static inline void -xdg_surface_set_fullscreen(struct xdg_surface *xdg_surface, struct wl_output *output) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_SET_FULLSCREEN, output); -} - -/** - * @ingroup iface_xdg_surface - */ -static inline void -xdg_surface_unset_fullscreen(struct xdg_surface *xdg_surface) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_UNSET_FULLSCREEN); -} - -/** - * @ingroup iface_xdg_surface - * - * 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. - */ -static inline void -xdg_surface_set_minimized(struct xdg_surface *xdg_surface) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_SET_MINIMIZED); -} - -/** - * @ingroup iface_xdg_popup - * @struct xdg_popup_listener - */ -struct xdg_popup_listener { - /** - * popup interaction is done - * - * 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. - */ - void (*popup_done)(void *data, - struct xdg_popup *xdg_popup); -}; - -/** - * @ingroup iface_xdg_popup - */ -static inline int -xdg_popup_add_listener(struct xdg_popup *xdg_popup, - const struct xdg_popup_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) xdg_popup, - (void (**)(void)) listener, data); -} - -#define XDG_POPUP_DESTROY 0 - -/** - * @ingroup iface_xdg_popup - */ -#define XDG_POPUP_POPUP_DONE_SINCE_VERSION 1 - -/** - * @ingroup iface_xdg_popup - */ -#define XDG_POPUP_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_xdg_popup */ -static inline void -xdg_popup_set_user_data(struct xdg_popup *xdg_popup, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) xdg_popup, user_data); -} - -/** @ingroup iface_xdg_popup */ -static inline void * -xdg_popup_get_user_data(struct xdg_popup *xdg_popup) -{ - return wl_proxy_get_user_data((struct wl_proxy *) xdg_popup); -} - -static inline uint32_t -xdg_popup_get_version(struct xdg_popup *xdg_popup) -{ - return wl_proxy_get_version((struct wl_proxy *) xdg_popup); -} - -/** - * @ingroup iface_xdg_popup - * - * 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. - */ -static inline void -xdg_popup_destroy(struct xdg_popup *xdg_popup) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_popup, - XDG_POPUP_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) xdg_popup); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v5-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v5-server-protocol.h deleted file mode 100644 index 4ef85e7add2..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v5-server-protocol.h +++ /dev/null @@ -1,903 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef XDG_SHELL_UNSTABLE_V5_SERVER_PROTOCOL_H -#define XDG_SHELL_UNSTABLE_V5_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_xdg_shell_unstable_v5 The xdg_shell_unstable_v5 protocol - * @section page_ifaces_xdg_shell_unstable_v5 Interfaces - * - @subpage page_iface_xdg_shell - create desktop-style surfaces - * - @subpage page_iface_xdg_surface - A desktop window - * - @subpage page_iface_xdg_popup - short-lived, popup surfaces for menus - * @section page_copyright_xdg_shell_unstable_v5 Copyright - * <pre> - * - * 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. - * </pre> - */ -struct wl_output; -struct wl_seat; -struct wl_surface; -struct xdg_popup; -struct xdg_shell; -struct xdg_surface; - -/** - * @page page_iface_xdg_shell xdg_shell - * @section page_iface_xdg_shell_desc Description - * - * 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. - * @section page_iface_xdg_shell_api API - * See @ref iface_xdg_shell. - */ -/** - * @defgroup iface_xdg_shell The xdg_shell interface - * - * 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. - */ -extern const struct wl_interface xdg_shell_interface; -/** - * @page page_iface_xdg_surface xdg_surface - * @section page_iface_xdg_surface_desc Description - * - * 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. - * @section page_iface_xdg_surface_api API - * See @ref iface_xdg_surface. - */ -/** - * @defgroup iface_xdg_surface The xdg_surface interface - * - * 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. - */ -extern const struct wl_interface xdg_surface_interface; -/** - * @page page_iface_xdg_popup xdg_popup - * @section page_iface_xdg_popup_desc Description - * - * 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. - * @section page_iface_xdg_popup_api API - * See @ref iface_xdg_popup. - */ -/** - * @defgroup iface_xdg_popup The xdg_popup interface - * - * 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. - */ -extern const struct wl_interface xdg_popup_interface; - -#ifndef XDG_SHELL_VERSION_ENUM -#define XDG_SHELL_VERSION_ENUM -/** - * @ingroup iface_xdg_shell - * latest protocol version - * - * 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. - */ -enum xdg_shell_version { - /** - * Always the latest version - */ - XDG_SHELL_VERSION_CURRENT = 5, -}; -#endif /* XDG_SHELL_VERSION_ENUM */ - -#ifndef XDG_SHELL_ERROR_ENUM -#define XDG_SHELL_ERROR_ENUM -enum xdg_shell_error { - /** - * given wl_surface has another role - */ - XDG_SHELL_ERROR_ROLE = 0, - /** - * xdg_shell was destroyed before children - */ - XDG_SHELL_ERROR_DEFUNCT_SURFACES = 1, - /** - * the client tried to map or destroy a non-topmost popup - */ - XDG_SHELL_ERROR_NOT_THE_TOPMOST_POPUP = 2, - /** - * the client specified an invalid popup parent surface - */ - XDG_SHELL_ERROR_INVALID_POPUP_PARENT = 3, -}; -#endif /* XDG_SHELL_ERROR_ENUM */ - -/** - * @ingroup iface_xdg_shell - * @struct xdg_shell_interface - */ -struct xdg_shell_interface { - /** - * destroy xdg_shell - * - * 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. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * enable use of this unstable version - * - * 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. - */ - void (*use_unstable_version)(struct wl_client *client, - struct wl_resource *resource, - int32_t version); - /** - * create a shell surface from a surface - * - * 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. - */ - void (*get_xdg_surface)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface); - /** - * create a popup for a surface - * - * 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. - * @param seat the wl_seat of the user event - * @param serial the serial of the user event - */ - void (*get_xdg_popup)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface, - struct wl_resource *parent, - struct wl_resource *seat, - uint32_t serial, - int32_t x, - int32_t y); - /** - * respond to a ping event - * - * A client must respond to a ping event with a pong request or - * the client may be deemed unresponsive. - * @param serial serial of the ping event - */ - void (*pong)(struct wl_client *client, - struct wl_resource *resource, - uint32_t serial); -}; - -#define XDG_SHELL_PING 0 - -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_PING_SINCE_VERSION 1 - -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_USE_UNSTABLE_VERSION_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_GET_XDG_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_GET_XDG_POPUP_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_PONG_SINCE_VERSION 1 - -/** - * @ingroup iface_xdg_shell - * Sends an ping event to the client owning the resource. - * @param resource_ The client's resource - * @param serial pass this to the pong request - */ -static inline void -xdg_shell_send_ping(struct wl_resource *resource_, uint32_t serial) -{ - wl_resource_post_event(resource_, XDG_SHELL_PING, serial); -} - -#ifndef XDG_SURFACE_RESIZE_EDGE_ENUM -#define XDG_SURFACE_RESIZE_EDGE_ENUM -/** - * @ingroup iface_xdg_surface - * edge values for resizing - * - * These values are used to indicate which edge of a surface - * is being dragged in a resize operation. - */ -enum xdg_surface_resize_edge { - XDG_SURFACE_RESIZE_EDGE_NONE = 0, - XDG_SURFACE_RESIZE_EDGE_TOP = 1, - XDG_SURFACE_RESIZE_EDGE_BOTTOM = 2, - XDG_SURFACE_RESIZE_EDGE_LEFT = 4, - XDG_SURFACE_RESIZE_EDGE_TOP_LEFT = 5, - XDG_SURFACE_RESIZE_EDGE_BOTTOM_LEFT = 6, - XDG_SURFACE_RESIZE_EDGE_RIGHT = 8, - XDG_SURFACE_RESIZE_EDGE_TOP_RIGHT = 9, - XDG_SURFACE_RESIZE_EDGE_BOTTOM_RIGHT = 10, -}; -#endif /* XDG_SURFACE_RESIZE_EDGE_ENUM */ - -#ifndef XDG_SURFACE_STATE_ENUM -#define XDG_SURFACE_STATE_ENUM -/** - * @ingroup iface_xdg_surface - * the surface is now activated - * - * 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. - */ -enum xdg_surface_state { - /** - * the surface is maximized - */ - XDG_SURFACE_STATE_MAXIMIZED = 1, - /** - * the surface is fullscreen - */ - XDG_SURFACE_STATE_FULLSCREEN = 2, - /** - * the surface is being resized - */ - XDG_SURFACE_STATE_RESIZING = 3, - /** - * the surface is now activated - */ - XDG_SURFACE_STATE_ACTIVATED = 4, -}; -#endif /* XDG_SURFACE_STATE_ENUM */ - -/** - * @ingroup iface_xdg_surface - * @struct xdg_surface_interface - */ -struct xdg_surface_interface { - /** - * Destroy the xdg_surface - * - * 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. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the parent of this surface - * - * 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. - */ - void (*set_parent)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *parent); - /** - * set surface title - * - * 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. - */ - void (*set_title)(struct wl_client *client, - struct wl_resource *resource, - const char *title); - /** - * set application ID - * - * 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/ - */ - void (*set_app_id)(struct wl_client *client, - struct wl_resource *resource, - const char *app_id); - /** - * show the window menu - * - * 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. - * @param seat the wl_seat of the user event - * @param serial the serial of the user event - * @param x the x position to pop up the window menu at - * @param y the y position to pop up the window menu at - */ - void (*show_window_menu)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *seat, - uint32_t serial, - int32_t x, - int32_t y); - /** - * start an interactive move - * - * 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. - * @param seat the wl_seat of the user event - * @param serial the serial of the user event - */ - void (*move)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *seat, - uint32_t serial); - /** - * start an interactive resize - * - * 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. - * @param seat the wl_seat of the user event - * @param serial the serial of the user event - * @param edges which edge or corner is being dragged - */ - void (*resize)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *seat, - uint32_t serial, - uint32_t edges); - /** - * ack a configure event - * - * 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. - * @param serial the serial from the configure event - */ - void (*ack_configure)(struct wl_client *client, - struct wl_resource *resource, - uint32_t serial); - /** - * set the new window geometry - * - * The window geometry of a window is its "visible bounds" from - * the user's perspective. Client-side decorations often have - * invisible portions like drop-shadows which should be ignored for - * the purposes of aligning, placing and constraining windows. - * - * The window geometry is double buffered, and will be applied at - * the time wl_surface.commit of the corresponding wl_surface is - * called. - * - * Once the window geometry of the surface is set once, it is not - * possible to unset it, and it will remain the same until - * set_window_geometry is called again, even if a new subsurface or - * buffer is attached. - * - * If never set, the value is the full bounds of the surface, - * including any subsurfaces. This updates dynamically on every - * commit. This unset mode is meant for extremely simple clients. - * - * If responding to a configure event, the window geometry in here - * must respect the sizing negotiations specified by the states in - * the configure event. - * - * The arguments are given in the surface local coordinate space of - * the wl_surface associated with this xdg_surface. - * - * The width and height must be greater than zero. - */ - void (*set_window_geometry)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height); - /** - * maximize the window - * - * 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. - */ - void (*set_maximized)(struct wl_client *client, - struct wl_resource *resource); - /** - * unmaximize the window - * - * 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. - */ - void (*unset_maximized)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the window as fullscreen on a monitor - * - * 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. - */ - void (*set_fullscreen)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *output); - /** - */ - void (*unset_fullscreen)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the window as minimized - * - * 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. - */ - void (*set_minimized)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define XDG_SURFACE_CONFIGURE 0 -#define XDG_SURFACE_CLOSE 1 - -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_CLOSE_SINCE_VERSION 1 - -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_PARENT_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_TITLE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_APP_ID_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SHOW_WINDOW_MENU_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_MOVE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_RESIZE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_ACK_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_WINDOW_GEOMETRY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_UNSET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_UNSET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_MINIMIZED_SINCE_VERSION 1 - -/** - * @ingroup iface_xdg_surface - * Sends an configure event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -xdg_surface_send_configure(struct wl_resource *resource_, int32_t width, int32_t height, struct wl_array *states, uint32_t serial) -{ - wl_resource_post_event(resource_, XDG_SURFACE_CONFIGURE, width, height, states, serial); -} - -/** - * @ingroup iface_xdg_surface - * Sends an close event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -xdg_surface_send_close(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, XDG_SURFACE_CLOSE); -} - -/** - * @ingroup iface_xdg_popup - * @struct xdg_popup_interface - */ -struct xdg_popup_interface { - /** - * remove xdg_popup interface - * - * 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. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define XDG_POPUP_POPUP_DONE 0 - -/** - * @ingroup iface_xdg_popup - */ -#define XDG_POPUP_POPUP_DONE_SINCE_VERSION 1 - -/** - * @ingroup iface_xdg_popup - */ -#define XDG_POPUP_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_xdg_popup - * Sends an popup_done event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -xdg_popup_send_popup_done(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, XDG_POPUP_POPUP_DONE); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v6-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v6-client-protocol.h deleted file mode 100644 index 50475ca6274..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v6-client-protocol.h +++ /dev/null @@ -1,1750 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef XDG_SHELL_UNSTABLE_V6_CLIENT_PROTOCOL_H -#define XDG_SHELL_UNSTABLE_V6_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_xdg_shell_unstable_v6 The xdg_shell_unstable_v6 protocol - * @section page_ifaces_xdg_shell_unstable_v6 Interfaces - * - @subpage page_iface_zxdg_shell_v6 - create desktop-style surfaces - * - @subpage page_iface_zxdg_positioner_v6 - child surface positioner - * - @subpage page_iface_zxdg_surface_v6 - desktop user interface surface base interface - * - @subpage page_iface_zxdg_toplevel_v6 - toplevel surface - * - @subpage page_iface_zxdg_popup_v6 - short-lived, popup surfaces for menus - * @section page_copyright_xdg_shell_unstable_v6 Copyright - * <pre> - * - * 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. - * </pre> - */ -struct wl_output; -struct wl_seat; -struct wl_surface; -struct zxdg_popup_v6; -struct zxdg_positioner_v6; -struct zxdg_shell_v6; -struct zxdg_surface_v6; -struct zxdg_toplevel_v6; - -/** - * @page page_iface_zxdg_shell_v6 zxdg_shell_v6 - * @section page_iface_zxdg_shell_v6_desc Description - * - * 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. - * @section page_iface_zxdg_shell_v6_api API - * See @ref iface_zxdg_shell_v6. - */ -/** - * @defgroup iface_zxdg_shell_v6 The zxdg_shell_v6 interface - * - * 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. - */ -extern const struct wl_interface zxdg_shell_v6_interface; -/** - * @page page_iface_zxdg_positioner_v6 zxdg_positioner_v6 - * @section page_iface_zxdg_positioner_v6_desc Description - * - * 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. - * @section page_iface_zxdg_positioner_v6_api API - * See @ref iface_zxdg_positioner_v6. - */ -/** - * @defgroup iface_zxdg_positioner_v6 The zxdg_positioner_v6 interface - * - * 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. - */ -extern const struct wl_interface zxdg_positioner_v6_interface; -/** - * @page page_iface_zxdg_surface_v6 zxdg_surface_v6 - * @section page_iface_zxdg_surface_v6_desc Description - * - * 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 a 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. - * @section page_iface_zxdg_surface_v6_api API - * See @ref iface_zxdg_surface_v6. - */ -/** - * @defgroup iface_zxdg_surface_v6 The zxdg_surface_v6 interface - * - * 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 a 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. - */ -extern const struct wl_interface zxdg_surface_v6_interface; -/** - * @page page_iface_zxdg_toplevel_v6 zxdg_toplevel_v6 - * @section page_iface_zxdg_toplevel_v6_desc Description - * - * 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. - * @section page_iface_zxdg_toplevel_v6_api API - * See @ref iface_zxdg_toplevel_v6. - */ -/** - * @defgroup iface_zxdg_toplevel_v6 The zxdg_toplevel_v6 interface - * - * 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. - */ -extern const struct wl_interface zxdg_toplevel_v6_interface; -/** - * @page page_iface_zxdg_popup_v6 zxdg_popup_v6 - * @section page_iface_zxdg_popup_v6_desc Description - * - * 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. - * @section page_iface_zxdg_popup_v6_api API - * See @ref iface_zxdg_popup_v6. - */ -/** - * @defgroup iface_zxdg_popup_v6 The zxdg_popup_v6 interface - * - * 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. - */ -extern const struct wl_interface zxdg_popup_v6_interface; - -#ifndef ZXDG_SHELL_V6_ERROR_ENUM -#define ZXDG_SHELL_V6_ERROR_ENUM -enum zxdg_shell_v6_error { - /** - * given wl_surface has another role - */ - ZXDG_SHELL_V6_ERROR_ROLE = 0, - /** - * xdg_shell was destroyed before children - */ - ZXDG_SHELL_V6_ERROR_DEFUNCT_SURFACES = 1, - /** - * the client tried to map or destroy a non-topmost popup - */ - ZXDG_SHELL_V6_ERROR_NOT_THE_TOPMOST_POPUP = 2, - /** - * the client specified an invalid popup parent surface - */ - ZXDG_SHELL_V6_ERROR_INVALID_POPUP_PARENT = 3, - /** - * the client provided an invalid surface state - */ - ZXDG_SHELL_V6_ERROR_INVALID_SURFACE_STATE = 4, - /** - * the client provided an invalid positioner - */ - ZXDG_SHELL_V6_ERROR_INVALID_POSITIONER = 5, -}; -#endif /* ZXDG_SHELL_V6_ERROR_ENUM */ - -/** - * @ingroup iface_zxdg_shell_v6 - * @struct zxdg_shell_v6_listener - */ -struct zxdg_shell_v6_listener { - /** - * check if the client is alive - * - * 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. - * @param serial pass this to the pong request - */ - void (*ping)(void *data, - struct zxdg_shell_v6 *zxdg_shell_v6, - uint32_t serial); -}; - -/** - * @ingroup iface_zxdg_shell_v6 - */ -static inline int -zxdg_shell_v6_add_listener(struct zxdg_shell_v6 *zxdg_shell_v6, - const struct zxdg_shell_v6_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zxdg_shell_v6, - (void (**)(void)) listener, data); -} - -#define ZXDG_SHELL_V6_DESTROY 0 -#define ZXDG_SHELL_V6_CREATE_POSITIONER 1 -#define ZXDG_SHELL_V6_GET_XDG_SURFACE 2 -#define ZXDG_SHELL_V6_PONG 3 - -/** - * @ingroup iface_zxdg_shell_v6 - */ -#define ZXDG_SHELL_V6_PING_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_shell_v6 - */ -#define ZXDG_SHELL_V6_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_shell_v6 - */ -#define ZXDG_SHELL_V6_CREATE_POSITIONER_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_shell_v6 - */ -#define ZXDG_SHELL_V6_GET_XDG_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_shell_v6 - */ -#define ZXDG_SHELL_V6_PONG_SINCE_VERSION 1 - -/** @ingroup iface_zxdg_shell_v6 */ -static inline void -zxdg_shell_v6_set_user_data(struct zxdg_shell_v6 *zxdg_shell_v6, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zxdg_shell_v6, user_data); -} - -/** @ingroup iface_zxdg_shell_v6 */ -static inline void * -zxdg_shell_v6_get_user_data(struct zxdg_shell_v6 *zxdg_shell_v6) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zxdg_shell_v6); -} - -static inline uint32_t -zxdg_shell_v6_get_version(struct zxdg_shell_v6 *zxdg_shell_v6) -{ - return wl_proxy_get_version((struct wl_proxy *) zxdg_shell_v6); -} - -/** - * @ingroup iface_zxdg_shell_v6 - * - * 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. - */ -static inline void -zxdg_shell_v6_destroy(struct zxdg_shell_v6 *zxdg_shell_v6) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_shell_v6, - ZXDG_SHELL_V6_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zxdg_shell_v6); -} - -/** - * @ingroup iface_zxdg_shell_v6 - * - * 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. - */ -static inline struct zxdg_positioner_v6 * -zxdg_shell_v6_create_positioner(struct zxdg_shell_v6 *zxdg_shell_v6) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zxdg_shell_v6, - ZXDG_SHELL_V6_CREATE_POSITIONER, &zxdg_positioner_v6_interface, NULL); - - return (struct zxdg_positioner_v6 *) id; -} - -/** - * @ingroup iface_zxdg_shell_v6 - * - * 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. - */ -static inline struct zxdg_surface_v6 * -zxdg_shell_v6_get_xdg_surface(struct zxdg_shell_v6 *zxdg_shell_v6, struct wl_surface *surface) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zxdg_shell_v6, - ZXDG_SHELL_V6_GET_XDG_SURFACE, &zxdg_surface_v6_interface, NULL, surface); - - return (struct zxdg_surface_v6 *) id; -} - -/** - * @ingroup iface_zxdg_shell_v6 - * - * A client must respond to a ping event with a pong request or - * the client may be deemed unresponsive. See xdg_shell.ping. - */ -static inline void -zxdg_shell_v6_pong(struct zxdg_shell_v6 *zxdg_shell_v6, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_shell_v6, - ZXDG_SHELL_V6_PONG, serial); -} - -#ifndef ZXDG_POSITIONER_V6_ERROR_ENUM -#define ZXDG_POSITIONER_V6_ERROR_ENUM -enum zxdg_positioner_v6_error { - /** - * invalid input provided - */ - ZXDG_POSITIONER_V6_ERROR_INVALID_INPUT = 0, -}; -#endif /* ZXDG_POSITIONER_V6_ERROR_ENUM */ - -#ifndef ZXDG_POSITIONER_V6_ANCHOR_ENUM -#define ZXDG_POSITIONER_V6_ANCHOR_ENUM -enum zxdg_positioner_v6_anchor { - /** - * the center of the anchor rectangle - */ - ZXDG_POSITIONER_V6_ANCHOR_NONE = 0, - /** - * the top edge of the anchor rectangle - */ - ZXDG_POSITIONER_V6_ANCHOR_TOP = 1, - /** - * the bottom edge of the anchor rectangle - */ - ZXDG_POSITIONER_V6_ANCHOR_BOTTOM = 2, - /** - * the left edge of the anchor rectangle - */ - ZXDG_POSITIONER_V6_ANCHOR_LEFT = 4, - /** - * the right edge of the anchor rectangle - */ - ZXDG_POSITIONER_V6_ANCHOR_RIGHT = 8, -}; -#endif /* ZXDG_POSITIONER_V6_ANCHOR_ENUM */ - -#ifndef ZXDG_POSITIONER_V6_GRAVITY_ENUM -#define ZXDG_POSITIONER_V6_GRAVITY_ENUM -enum zxdg_positioner_v6_gravity { - /** - * center over the anchor edge - */ - ZXDG_POSITIONER_V6_GRAVITY_NONE = 0, - /** - * position above the anchor edge - */ - ZXDG_POSITIONER_V6_GRAVITY_TOP = 1, - /** - * position below the anchor edge - */ - ZXDG_POSITIONER_V6_GRAVITY_BOTTOM = 2, - /** - * position to the left of the anchor edge - */ - ZXDG_POSITIONER_V6_GRAVITY_LEFT = 4, - /** - * position to the right of the anchor edge - */ - ZXDG_POSITIONER_V6_GRAVITY_RIGHT = 8, -}; -#endif /* ZXDG_POSITIONER_V6_GRAVITY_ENUM */ - -#ifndef ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM -#define ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM -/** - * @ingroup iface_zxdg_positioner_v6 - * vertically resize the surface - * - * Resize the surface vertically so that it is completely unconstrained. - */ -enum zxdg_positioner_v6_constraint_adjustment { - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_NONE = 0, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_SLIDE_X = 1, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_SLIDE_Y = 2, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_FLIP_X = 4, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_FLIP_Y = 8, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_RESIZE_X = 16, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_RESIZE_Y = 32, -}; -#endif /* ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM */ - -#define ZXDG_POSITIONER_V6_DESTROY 0 -#define ZXDG_POSITIONER_V6_SET_SIZE 1 -#define ZXDG_POSITIONER_V6_SET_ANCHOR_RECT 2 -#define ZXDG_POSITIONER_V6_SET_ANCHOR 3 -#define ZXDG_POSITIONER_V6_SET_GRAVITY 4 -#define ZXDG_POSITIONER_V6_SET_CONSTRAINT_ADJUSTMENT 5 -#define ZXDG_POSITIONER_V6_SET_OFFSET 6 - - -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_SIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_ANCHOR_RECT_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_ANCHOR_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_GRAVITY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_CONSTRAINT_ADJUSTMENT_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_OFFSET_SINCE_VERSION 1 - -/** @ingroup iface_zxdg_positioner_v6 */ -static inline void -zxdg_positioner_v6_set_user_data(struct zxdg_positioner_v6 *zxdg_positioner_v6, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zxdg_positioner_v6, user_data); -} - -/** @ingroup iface_zxdg_positioner_v6 */ -static inline void * -zxdg_positioner_v6_get_user_data(struct zxdg_positioner_v6 *zxdg_positioner_v6) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zxdg_positioner_v6); -} - -static inline uint32_t -zxdg_positioner_v6_get_version(struct zxdg_positioner_v6 *zxdg_positioner_v6) -{ - return wl_proxy_get_version((struct wl_proxy *) zxdg_positioner_v6); -} - -/** - * @ingroup iface_zxdg_positioner_v6 - * - * Notify the compositor that the xdg_positioner will no longer be used. - */ -static inline void -zxdg_positioner_v6_destroy(struct zxdg_positioner_v6 *zxdg_positioner_v6) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, - ZXDG_POSITIONER_V6_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zxdg_positioner_v6); -} - -/** - * @ingroup iface_zxdg_positioner_v6 - * - * 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. - */ -static inline void -zxdg_positioner_v6_set_size(struct zxdg_positioner_v6 *zxdg_positioner_v6, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, - ZXDG_POSITIONER_V6_SET_SIZE, width, height); -} - -/** - * @ingroup iface_zxdg_positioner_v6 - * - * 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. - */ -static inline void -zxdg_positioner_v6_set_anchor_rect(struct zxdg_positioner_v6 *zxdg_positioner_v6, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, - ZXDG_POSITIONER_V6_SET_ANCHOR_RECT, x, y, width, height); -} - -/** - * @ingroup iface_zxdg_positioner_v6 - * - * 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. - */ -static inline void -zxdg_positioner_v6_set_anchor(struct zxdg_positioner_v6 *zxdg_positioner_v6, uint32_t anchor) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, - ZXDG_POSITIONER_V6_SET_ANCHOR, anchor); -} - -/** - * @ingroup iface_zxdg_positioner_v6 - * - * 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. - */ -static inline void -zxdg_positioner_v6_set_gravity(struct zxdg_positioner_v6 *zxdg_positioner_v6, uint32_t gravity) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, - ZXDG_POSITIONER_V6_SET_GRAVITY, gravity); -} - -/** - * @ingroup iface_zxdg_positioner_v6 - * - * 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. - */ -static inline void -zxdg_positioner_v6_set_constraint_adjustment(struct zxdg_positioner_v6 *zxdg_positioner_v6, uint32_t constraint_adjustment) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, - ZXDG_POSITIONER_V6_SET_CONSTRAINT_ADJUSTMENT, constraint_adjustment); -} - -/** - * @ingroup iface_zxdg_positioner_v6 - * - * 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. - */ -static inline void -zxdg_positioner_v6_set_offset(struct zxdg_positioner_v6 *zxdg_positioner_v6, int32_t x, int32_t y) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, - ZXDG_POSITIONER_V6_SET_OFFSET, x, y); -} - -#ifndef ZXDG_SURFACE_V6_ERROR_ENUM -#define ZXDG_SURFACE_V6_ERROR_ENUM -enum zxdg_surface_v6_error { - ZXDG_SURFACE_V6_ERROR_NOT_CONSTRUCTED = 1, - ZXDG_SURFACE_V6_ERROR_ALREADY_CONSTRUCTED = 2, - ZXDG_SURFACE_V6_ERROR_UNCONFIGURED_BUFFER = 3, -}; -#endif /* ZXDG_SURFACE_V6_ERROR_ENUM */ - -/** - * @ingroup iface_zxdg_surface_v6 - * @struct zxdg_surface_v6_listener - */ -struct zxdg_surface_v6_listener { - /** - * suggest a surface change - * - * 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. - * @param serial serial of the configure event - */ - void (*configure)(void *data, - struct zxdg_surface_v6 *zxdg_surface_v6, - uint32_t serial); -}; - -/** - * @ingroup iface_zxdg_surface_v6 - */ -static inline int -zxdg_surface_v6_add_listener(struct zxdg_surface_v6 *zxdg_surface_v6, - const struct zxdg_surface_v6_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zxdg_surface_v6, - (void (**)(void)) listener, data); -} - -#define ZXDG_SURFACE_V6_DESTROY 0 -#define ZXDG_SURFACE_V6_GET_TOPLEVEL 1 -#define ZXDG_SURFACE_V6_GET_POPUP 2 -#define ZXDG_SURFACE_V6_SET_WINDOW_GEOMETRY 3 -#define ZXDG_SURFACE_V6_ACK_CONFIGURE 4 - -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_CONFIGURE_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_GET_TOPLEVEL_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_GET_POPUP_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_SET_WINDOW_GEOMETRY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_ACK_CONFIGURE_SINCE_VERSION 1 - -/** @ingroup iface_zxdg_surface_v6 */ -static inline void -zxdg_surface_v6_set_user_data(struct zxdg_surface_v6 *zxdg_surface_v6, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zxdg_surface_v6, user_data); -} - -/** @ingroup iface_zxdg_surface_v6 */ -static inline void * -zxdg_surface_v6_get_user_data(struct zxdg_surface_v6 *zxdg_surface_v6) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zxdg_surface_v6); -} - -static inline uint32_t -zxdg_surface_v6_get_version(struct zxdg_surface_v6 *zxdg_surface_v6) -{ - return wl_proxy_get_version((struct wl_proxy *) zxdg_surface_v6); -} - -/** - * @ingroup iface_zxdg_surface_v6 - * - * Destroy the xdg_surface object. An xdg_surface must only be destroyed - * after its role object has been destroyed. - */ -static inline void -zxdg_surface_v6_destroy(struct zxdg_surface_v6 *zxdg_surface_v6) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_surface_v6, - ZXDG_SURFACE_V6_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zxdg_surface_v6); -} - -/** - * @ingroup iface_zxdg_surface_v6 - * - * 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. - */ -static inline struct zxdg_toplevel_v6 * -zxdg_surface_v6_get_toplevel(struct zxdg_surface_v6 *zxdg_surface_v6) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zxdg_surface_v6, - ZXDG_SURFACE_V6_GET_TOPLEVEL, &zxdg_toplevel_v6_interface, NULL); - - return (struct zxdg_toplevel_v6 *) id; -} - -/** - * @ingroup iface_zxdg_surface_v6 - * - * This creates an xdg_popup object for the given xdg_surface and gives the - * associated wl_surface the xdg_popup role. - * - * See the documentation of xdg_popup for more details about what an - * xdg_popup is and how it is used. - */ -static inline struct zxdg_popup_v6 * -zxdg_surface_v6_get_popup(struct zxdg_surface_v6 *zxdg_surface_v6, struct zxdg_surface_v6 *parent, struct zxdg_positioner_v6 *positioner) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zxdg_surface_v6, - ZXDG_SURFACE_V6_GET_POPUP, &zxdg_popup_v6_interface, NULL, parent, positioner); - - return (struct zxdg_popup_v6 *) id; -} - -/** - * @ingroup iface_zxdg_surface_v6 - * - * The window geometry of a surface is its "visible bounds" from the - * user's perspective. Client-side decorations often have invisible - * portions like drop-shadows which should be ignored for the - * purposes of aligning, placing and constraining windows. - * - * The window geometry is double buffered, and will be applied at the - * time wl_surface.commit of the corresponding wl_surface is called. - * - * Once the window geometry of the surface is set, it is not possible to - * unset it, and it will remain the same until set_window_geometry is - * called again, even if a new subsurface or buffer is attached. - * - * If never set, the value is the full bounds of the surface, - * including any subsurfaces. This updates dynamically on every - * commit. This unset is meant for extremely simple clients. - * - * The arguments are given in the surface-local coordinate space of - * the wl_surface associated with this xdg_surface. - * - * The width and height must be greater than zero. Setting an invalid size - * will raise an error. When applied, the effective window geometry will be - * the set window geometry clamped to the bounding rectangle of the - * combined geometry of the surface of the xdg_surface and the associated - * subsurfaces. - */ -static inline void -zxdg_surface_v6_set_window_geometry(struct zxdg_surface_v6 *zxdg_surface_v6, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_surface_v6, - ZXDG_SURFACE_V6_SET_WINDOW_GEOMETRY, x, y, width, height); -} - -/** - * @ingroup iface_zxdg_surface_v6 - * - * 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. - */ -static inline void -zxdg_surface_v6_ack_configure(struct zxdg_surface_v6 *zxdg_surface_v6, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_surface_v6, - ZXDG_SURFACE_V6_ACK_CONFIGURE, serial); -} - -#ifndef ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM -#define ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM -/** - * @ingroup iface_zxdg_toplevel_v6 - * edge values for resizing - * - * These values are used to indicate which edge of a surface - * is being dragged in a resize operation. - */ -enum zxdg_toplevel_v6_resize_edge { - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_NONE = 0, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP = 1, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM = 2, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_LEFT = 4, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP_LEFT = 5, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM_LEFT = 6, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_RIGHT = 8, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP_RIGHT = 9, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM_RIGHT = 10, -}; -#endif /* ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM */ - -#ifndef ZXDG_TOPLEVEL_V6_STATE_ENUM -#define ZXDG_TOPLEVEL_V6_STATE_ENUM -/** - * @ingroup iface_zxdg_toplevel_v6 - * the surface is now activated - * - * 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. - */ -enum zxdg_toplevel_v6_state { - /** - * the surface is maximized - */ - ZXDG_TOPLEVEL_V6_STATE_MAXIMIZED = 1, - /** - * the surface is fullscreen - */ - ZXDG_TOPLEVEL_V6_STATE_FULLSCREEN = 2, - /** - * the surface is being resized - */ - ZXDG_TOPLEVEL_V6_STATE_RESIZING = 3, - /** - * the surface is now activated - */ - ZXDG_TOPLEVEL_V6_STATE_ACTIVATED = 4, -}; -#endif /* ZXDG_TOPLEVEL_V6_STATE_ENUM */ - -/** - * @ingroup iface_zxdg_toplevel_v6 - * @struct zxdg_toplevel_v6_listener - */ -struct zxdg_toplevel_v6_listener { - /** - * suggest a surface change - * - * 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. - */ - void (*configure)(void *data, - struct zxdg_toplevel_v6 *zxdg_toplevel_v6, - int32_t width, - int32_t height, - struct wl_array *states); - /** - * surface wants to be closed - * - * 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. - */ - void (*close)(void *data, - struct zxdg_toplevel_v6 *zxdg_toplevel_v6); -}; - -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -static inline int -zxdg_toplevel_v6_add_listener(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, - const struct zxdg_toplevel_v6_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zxdg_toplevel_v6, - (void (**)(void)) listener, data); -} - -#define ZXDG_TOPLEVEL_V6_DESTROY 0 -#define ZXDG_TOPLEVEL_V6_SET_PARENT 1 -#define ZXDG_TOPLEVEL_V6_SET_TITLE 2 -#define ZXDG_TOPLEVEL_V6_SET_APP_ID 3 -#define ZXDG_TOPLEVEL_V6_SHOW_WINDOW_MENU 4 -#define ZXDG_TOPLEVEL_V6_MOVE 5 -#define ZXDG_TOPLEVEL_V6_RESIZE 6 -#define ZXDG_TOPLEVEL_V6_SET_MAX_SIZE 7 -#define ZXDG_TOPLEVEL_V6_SET_MIN_SIZE 8 -#define ZXDG_TOPLEVEL_V6_SET_MAXIMIZED 9 -#define ZXDG_TOPLEVEL_V6_UNSET_MAXIMIZED 10 -#define ZXDG_TOPLEVEL_V6_SET_FULLSCREEN 11 -#define ZXDG_TOPLEVEL_V6_UNSET_FULLSCREEN 12 -#define ZXDG_TOPLEVEL_V6_SET_MINIMIZED 13 - -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_CLOSE_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_PARENT_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_TITLE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_APP_ID_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SHOW_WINDOW_MENU_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_MOVE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_RESIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_MAX_SIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_MIN_SIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_UNSET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_UNSET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_MINIMIZED_SINCE_VERSION 1 - -/** @ingroup iface_zxdg_toplevel_v6 */ -static inline void -zxdg_toplevel_v6_set_user_data(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zxdg_toplevel_v6, user_data); -} - -/** @ingroup iface_zxdg_toplevel_v6 */ -static inline void * -zxdg_toplevel_v6_get_user_data(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zxdg_toplevel_v6); -} - -static inline uint32_t -zxdg_toplevel_v6_get_version(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) -{ - return wl_proxy_get_version((struct wl_proxy *) zxdg_toplevel_v6); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * 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. - */ -static inline void -zxdg_toplevel_v6_destroy(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zxdg_toplevel_v6); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * 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. - */ -static inline void -zxdg_toplevel_v6_set_parent(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct zxdg_toplevel_v6 *parent) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_SET_PARENT, parent); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * 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. - */ -static inline void -zxdg_toplevel_v6_set_title(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, const char *title) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_SET_TITLE, title); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * 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/ - */ -static inline void -zxdg_toplevel_v6_set_app_id(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, const char *app_id) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_SET_APP_ID, app_id); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * 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. - */ -static inline void -zxdg_toplevel_v6_show_window_menu(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct wl_seat *seat, uint32_t serial, int32_t x, int32_t y) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_SHOW_WINDOW_MENU, seat, serial, x, y); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * 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. - */ -static inline void -zxdg_toplevel_v6_move(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct wl_seat *seat, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_MOVE, seat, serial); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * 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. - */ -static inline void -zxdg_toplevel_v6_resize(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct wl_seat *seat, uint32_t serial, uint32_t edges) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_RESIZE, seat, serial, edges); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * Set a maximum size for the window. - * - * The client can specify a maximum size so that the compositor does - * not try to configure the window beyond this size. - * - * The width and height arguments are in window geometry coordinates. - * See xdg_surface.set_window_geometry. - * - * Values set in this way are double-buffered. They will get applied - * on the next commit. - * - * The compositor can use this information to allow or disallow - * different states like maximize or fullscreen and draw accurate - * animations. - * - * Similarly, a tiling window manager may use this information to - * place and resize client windows in a more effective way. - * - * The client should not rely on the compositor to obey the maximum - * size. The compositor may decide to ignore the values set by the - * client and request a larger size. - * - * If never set, or a value of zero in the request, means that the - * client has no expected maximum size in the given dimension. - * As a result, a client wishing to reset the maximum size - * to an unspecified state can use zero for width and height in the - * request. - * - * Requesting a maximum size to be smaller than the minimum size of - * a surface is illegal and will result in a protocol error. - * - * The width and height must be greater than or equal to zero. Using - * strictly negative values for width and height will result in a - * protocol error. - */ -static inline void -zxdg_toplevel_v6_set_max_size(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_SET_MAX_SIZE, width, height); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * Set a minimum size for the window. - * - * The client can specify a minimum size so that the compositor does - * not try to configure the window below this size. - * - * The width and height arguments are in window geometry coordinates. - * See xdg_surface.set_window_geometry. - * - * Values set in this way are double-buffered. They will get applied - * on the next commit. - * - * The compositor can use this information to allow or disallow - * different states like maximize or fullscreen and draw accurate - * animations. - * - * Similarly, a tiling window manager may use this information to - * place and resize client windows in a more effective way. - * - * The client should not rely on the compositor to obey the minimum - * size. The compositor may decide to ignore the values set by the - * client and request a smaller size. - * - * If never set, or a value of zero in the request, means that the - * client has no expected minimum size in the given dimension. - * As a result, a client wishing to reset the minimum size - * to an unspecified state can use zero for width and height in the - * request. - * - * Requesting a minimum size to be larger than the maximum size of - * a surface is illegal and will result in a protocol error. - * - * The width and height must be greater than or equal to zero. Using - * strictly negative values for width and height will result in a - * protocol error. - */ -static inline void -zxdg_toplevel_v6_set_min_size(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_SET_MIN_SIZE, width, height); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * 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. - */ -static inline void -zxdg_toplevel_v6_set_maximized(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_SET_MAXIMIZED); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * 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. - */ -static inline void -zxdg_toplevel_v6_unset_maximized(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_UNSET_MAXIMIZED); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * 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. - */ -static inline void -zxdg_toplevel_v6_set_fullscreen(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct wl_output *output) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_SET_FULLSCREEN, output); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -static inline void -zxdg_toplevel_v6_unset_fullscreen(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_UNSET_FULLSCREEN); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * 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. - */ -static inline void -zxdg_toplevel_v6_set_minimized(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_SET_MINIMIZED); -} - -#ifndef ZXDG_POPUP_V6_ERROR_ENUM -#define ZXDG_POPUP_V6_ERROR_ENUM -enum zxdg_popup_v6_error { - /** - * tried to grab after being mapped - */ - ZXDG_POPUP_V6_ERROR_INVALID_GRAB = 0, -}; -#endif /* ZXDG_POPUP_V6_ERROR_ENUM */ - -/** - * @ingroup iface_zxdg_popup_v6 - * @struct zxdg_popup_v6_listener - */ -struct zxdg_popup_v6_listener { - /** - * configure the popup surface - * - * 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. - * @param x x position relative to parent surface window geometry - * @param y y position relative to parent surface window geometry - * @param width window geometry width - * @param height window geometry height - */ - void (*configure)(void *data, - struct zxdg_popup_v6 *zxdg_popup_v6, - int32_t x, - int32_t y, - int32_t width, - int32_t height); - /** - * popup interaction is done - * - * 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. - */ - void (*popup_done)(void *data, - struct zxdg_popup_v6 *zxdg_popup_v6); -}; - -/** - * @ingroup iface_zxdg_popup_v6 - */ -static inline int -zxdg_popup_v6_add_listener(struct zxdg_popup_v6 *zxdg_popup_v6, - const struct zxdg_popup_v6_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zxdg_popup_v6, - (void (**)(void)) listener, data); -} - -#define ZXDG_POPUP_V6_DESTROY 0 -#define ZXDG_POPUP_V6_GRAB 1 - -/** - * @ingroup iface_zxdg_popup_v6 - */ -#define ZXDG_POPUP_V6_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_popup_v6 - */ -#define ZXDG_POPUP_V6_POPUP_DONE_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_popup_v6 - */ -#define ZXDG_POPUP_V6_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_popup_v6 - */ -#define ZXDG_POPUP_V6_GRAB_SINCE_VERSION 1 - -/** @ingroup iface_zxdg_popup_v6 */ -static inline void -zxdg_popup_v6_set_user_data(struct zxdg_popup_v6 *zxdg_popup_v6, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zxdg_popup_v6, user_data); -} - -/** @ingroup iface_zxdg_popup_v6 */ -static inline void * -zxdg_popup_v6_get_user_data(struct zxdg_popup_v6 *zxdg_popup_v6) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zxdg_popup_v6); -} - -static inline uint32_t -zxdg_popup_v6_get_version(struct zxdg_popup_v6 *zxdg_popup_v6) -{ - return wl_proxy_get_version((struct wl_proxy *) zxdg_popup_v6); -} - -/** - * @ingroup iface_zxdg_popup_v6 - * - * 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. - */ -static inline void -zxdg_popup_v6_destroy(struct zxdg_popup_v6 *zxdg_popup_v6) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_popup_v6, - ZXDG_POPUP_V6_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zxdg_popup_v6); -} - -/** - * @ingroup iface_zxdg_popup_v6 - * - * 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. - */ -static inline void -zxdg_popup_v6_grab(struct zxdg_popup_v6 *zxdg_popup_v6, struct wl_seat *seat, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_popup_v6, - ZXDG_POPUP_V6_GRAB, seat, serial); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v6-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v6-server-protocol.h deleted file mode 100644 index 57dc92bfcb5..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v6-server-protocol.h +++ /dev/null @@ -1,1441 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef XDG_SHELL_UNSTABLE_V6_SERVER_PROTOCOL_H -#define XDG_SHELL_UNSTABLE_V6_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_xdg_shell_unstable_v6 The xdg_shell_unstable_v6 protocol - * @section page_ifaces_xdg_shell_unstable_v6 Interfaces - * - @subpage page_iface_zxdg_shell_v6 - create desktop-style surfaces - * - @subpage page_iface_zxdg_positioner_v6 - child surface positioner - * - @subpage page_iface_zxdg_surface_v6 - desktop user interface surface base interface - * - @subpage page_iface_zxdg_toplevel_v6 - toplevel surface - * - @subpage page_iface_zxdg_popup_v6 - short-lived, popup surfaces for menus - * @section page_copyright_xdg_shell_unstable_v6 Copyright - * <pre> - * - * 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. - * </pre> - */ -struct wl_output; -struct wl_seat; -struct wl_surface; -struct zxdg_popup_v6; -struct zxdg_positioner_v6; -struct zxdg_shell_v6; -struct zxdg_surface_v6; -struct zxdg_toplevel_v6; - -/** - * @page page_iface_zxdg_shell_v6 zxdg_shell_v6 - * @section page_iface_zxdg_shell_v6_desc Description - * - * 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. - * @section page_iface_zxdg_shell_v6_api API - * See @ref iface_zxdg_shell_v6. - */ -/** - * @defgroup iface_zxdg_shell_v6 The zxdg_shell_v6 interface - * - * 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. - */ -extern const struct wl_interface zxdg_shell_v6_interface; -/** - * @page page_iface_zxdg_positioner_v6 zxdg_positioner_v6 - * @section page_iface_zxdg_positioner_v6_desc Description - * - * 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. - * @section page_iface_zxdg_positioner_v6_api API - * See @ref iface_zxdg_positioner_v6. - */ -/** - * @defgroup iface_zxdg_positioner_v6 The zxdg_positioner_v6 interface - * - * 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. - */ -extern const struct wl_interface zxdg_positioner_v6_interface; -/** - * @page page_iface_zxdg_surface_v6 zxdg_surface_v6 - * @section page_iface_zxdg_surface_v6_desc Description - * - * 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 a 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. - * @section page_iface_zxdg_surface_v6_api API - * See @ref iface_zxdg_surface_v6. - */ -/** - * @defgroup iface_zxdg_surface_v6 The zxdg_surface_v6 interface - * - * 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 a 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. - */ -extern const struct wl_interface zxdg_surface_v6_interface; -/** - * @page page_iface_zxdg_toplevel_v6 zxdg_toplevel_v6 - * @section page_iface_zxdg_toplevel_v6_desc Description - * - * 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. - * @section page_iface_zxdg_toplevel_v6_api API - * See @ref iface_zxdg_toplevel_v6. - */ -/** - * @defgroup iface_zxdg_toplevel_v6 The zxdg_toplevel_v6 interface - * - * 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. - */ -extern const struct wl_interface zxdg_toplevel_v6_interface; -/** - * @page page_iface_zxdg_popup_v6 zxdg_popup_v6 - * @section page_iface_zxdg_popup_v6_desc Description - * - * 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. - * @section page_iface_zxdg_popup_v6_api API - * See @ref iface_zxdg_popup_v6. - */ -/** - * @defgroup iface_zxdg_popup_v6 The zxdg_popup_v6 interface - * - * 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. - */ -extern const struct wl_interface zxdg_popup_v6_interface; - -#ifndef ZXDG_SHELL_V6_ERROR_ENUM -#define ZXDG_SHELL_V6_ERROR_ENUM -enum zxdg_shell_v6_error { - /** - * given wl_surface has another role - */ - ZXDG_SHELL_V6_ERROR_ROLE = 0, - /** - * xdg_shell was destroyed before children - */ - ZXDG_SHELL_V6_ERROR_DEFUNCT_SURFACES = 1, - /** - * the client tried to map or destroy a non-topmost popup - */ - ZXDG_SHELL_V6_ERROR_NOT_THE_TOPMOST_POPUP = 2, - /** - * the client specified an invalid popup parent surface - */ - ZXDG_SHELL_V6_ERROR_INVALID_POPUP_PARENT = 3, - /** - * the client provided an invalid surface state - */ - ZXDG_SHELL_V6_ERROR_INVALID_SURFACE_STATE = 4, - /** - * the client provided an invalid positioner - */ - ZXDG_SHELL_V6_ERROR_INVALID_POSITIONER = 5, -}; -#endif /* ZXDG_SHELL_V6_ERROR_ENUM */ - -/** - * @ingroup iface_zxdg_shell_v6 - * @struct zxdg_shell_v6_interface - */ -struct zxdg_shell_v6_interface { - /** - * destroy xdg_shell - * - * 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. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * create a positioner object - * - * 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. - */ - void (*create_positioner)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id); - /** - * create a shell surface from a surface - * - * 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. - */ - void (*get_xdg_surface)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface); - /** - * respond to a ping event - * - * A client must respond to a ping event with a pong request or - * the client may be deemed unresponsive. See xdg_shell.ping. - * @param serial serial of the ping event - */ - void (*pong)(struct wl_client *client, - struct wl_resource *resource, - uint32_t serial); -}; - -#define ZXDG_SHELL_V6_PING 0 - -/** - * @ingroup iface_zxdg_shell_v6 - */ -#define ZXDG_SHELL_V6_PING_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_shell_v6 - */ -#define ZXDG_SHELL_V6_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_shell_v6 - */ -#define ZXDG_SHELL_V6_CREATE_POSITIONER_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_shell_v6 - */ -#define ZXDG_SHELL_V6_GET_XDG_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_shell_v6 - */ -#define ZXDG_SHELL_V6_PONG_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_shell_v6 - * Sends an ping event to the client owning the resource. - * @param resource_ The client's resource - * @param serial pass this to the pong request - */ -static inline void -zxdg_shell_v6_send_ping(struct wl_resource *resource_, uint32_t serial) -{ - wl_resource_post_event(resource_, ZXDG_SHELL_V6_PING, serial); -} - -#ifndef ZXDG_POSITIONER_V6_ERROR_ENUM -#define ZXDG_POSITIONER_V6_ERROR_ENUM -enum zxdg_positioner_v6_error { - /** - * invalid input provided - */ - ZXDG_POSITIONER_V6_ERROR_INVALID_INPUT = 0, -}; -#endif /* ZXDG_POSITIONER_V6_ERROR_ENUM */ - -#ifndef ZXDG_POSITIONER_V6_ANCHOR_ENUM -#define ZXDG_POSITIONER_V6_ANCHOR_ENUM -enum zxdg_positioner_v6_anchor { - /** - * the center of the anchor rectangle - */ - ZXDG_POSITIONER_V6_ANCHOR_NONE = 0, - /** - * the top edge of the anchor rectangle - */ - ZXDG_POSITIONER_V6_ANCHOR_TOP = 1, - /** - * the bottom edge of the anchor rectangle - */ - ZXDG_POSITIONER_V6_ANCHOR_BOTTOM = 2, - /** - * the left edge of the anchor rectangle - */ - ZXDG_POSITIONER_V6_ANCHOR_LEFT = 4, - /** - * the right edge of the anchor rectangle - */ - ZXDG_POSITIONER_V6_ANCHOR_RIGHT = 8, -}; -#endif /* ZXDG_POSITIONER_V6_ANCHOR_ENUM */ - -#ifndef ZXDG_POSITIONER_V6_GRAVITY_ENUM -#define ZXDG_POSITIONER_V6_GRAVITY_ENUM -enum zxdg_positioner_v6_gravity { - /** - * center over the anchor edge - */ - ZXDG_POSITIONER_V6_GRAVITY_NONE = 0, - /** - * position above the anchor edge - */ - ZXDG_POSITIONER_V6_GRAVITY_TOP = 1, - /** - * position below the anchor edge - */ - ZXDG_POSITIONER_V6_GRAVITY_BOTTOM = 2, - /** - * position to the left of the anchor edge - */ - ZXDG_POSITIONER_V6_GRAVITY_LEFT = 4, - /** - * position to the right of the anchor edge - */ - ZXDG_POSITIONER_V6_GRAVITY_RIGHT = 8, -}; -#endif /* ZXDG_POSITIONER_V6_GRAVITY_ENUM */ - -#ifndef ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM -#define ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM -/** - * @ingroup iface_zxdg_positioner_v6 - * vertically resize the surface - * - * Resize the surface vertically so that it is completely unconstrained. - */ -enum zxdg_positioner_v6_constraint_adjustment { - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_NONE = 0, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_SLIDE_X = 1, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_SLIDE_Y = 2, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_FLIP_X = 4, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_FLIP_Y = 8, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_RESIZE_X = 16, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_RESIZE_Y = 32, -}; -#endif /* ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM */ - -/** - * @ingroup iface_zxdg_positioner_v6 - * @struct zxdg_positioner_v6_interface - */ -struct zxdg_positioner_v6_interface { - /** - * destroy the xdg_positioner object - * - * Notify the compositor that the xdg_positioner will no longer - * be used. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the size of the to-be positioned rectangle - * - * 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. - * @param width width of positioned rectangle - * @param height height of positioned rectangle - */ - void (*set_size)(struct wl_client *client, - struct wl_resource *resource, - int32_t width, - int32_t height); - /** - * set the anchor rectangle within the parent surface - * - * 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. - * @param x x position of anchor rectangle - * @param y y position of anchor rectangle - * @param width width of anchor rectangle - * @param height height of anchor rectangle - */ - void (*set_anchor_rect)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height); - /** - * set anchor rectangle anchor edges - * - * 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. - * @param anchor bit mask of anchor edges - */ - void (*set_anchor)(struct wl_client *client, - struct wl_resource *resource, - uint32_t anchor); - /** - * set child surface gravity - * - * 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. - * @param gravity bit mask of gravity directions - */ - void (*set_gravity)(struct wl_client *client, - struct wl_resource *resource, - uint32_t gravity); - /** - * set the adjustment to be done when constrained - * - * 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. - * @param constraint_adjustment bit mask of constraint adjustments - */ - void (*set_constraint_adjustment)(struct wl_client *client, - struct wl_resource *resource, - uint32_t constraint_adjustment); - /** - * set surface position offset - * - * 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. - * @param x surface position x offset - * @param y surface position y offset - */ - void (*set_offset)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y); -}; - - -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_SIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_ANCHOR_RECT_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_ANCHOR_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_GRAVITY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_CONSTRAINT_ADJUSTMENT_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_OFFSET_SINCE_VERSION 1 - -#ifndef ZXDG_SURFACE_V6_ERROR_ENUM -#define ZXDG_SURFACE_V6_ERROR_ENUM -enum zxdg_surface_v6_error { - ZXDG_SURFACE_V6_ERROR_NOT_CONSTRUCTED = 1, - ZXDG_SURFACE_V6_ERROR_ALREADY_CONSTRUCTED = 2, - ZXDG_SURFACE_V6_ERROR_UNCONFIGURED_BUFFER = 3, -}; -#endif /* ZXDG_SURFACE_V6_ERROR_ENUM */ - -/** - * @ingroup iface_zxdg_surface_v6 - * @struct zxdg_surface_v6_interface - */ -struct zxdg_surface_v6_interface { - /** - * destroy the xdg_surface - * - * Destroy the xdg_surface object. An xdg_surface must only be - * destroyed after its role object has been destroyed. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * assign the xdg_toplevel surface role - * - * 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. - */ - void (*get_toplevel)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id); - /** - * assign the xdg_popup surface role - * - * This creates an xdg_popup object for the given xdg_surface and - * gives the associated wl_surface the xdg_popup role. - * - * See the documentation of xdg_popup for more details about what - * an xdg_popup is and how it is used. - */ - void (*get_popup)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *parent, - struct wl_resource *positioner); - /** - * set the new window geometry - * - * The window geometry of a surface is its "visible bounds" from - * the user's perspective. Client-side decorations often have - * invisible portions like drop-shadows which should be ignored for - * the purposes of aligning, placing and constraining windows. - * - * The window geometry is double buffered, and will be applied at - * the time wl_surface.commit of the corresponding wl_surface is - * called. - * - * Once the window geometry of the surface is set, it is not - * possible to unset it, and it will remain the same until - * set_window_geometry is called again, even if a new subsurface or - * buffer is attached. - * - * If never set, the value is the full bounds of the surface, - * including any subsurfaces. This updates dynamically on every - * commit. This unset is meant for extremely simple clients. - * - * The arguments are given in the surface-local coordinate space of - * the wl_surface associated with this xdg_surface. - * - * The width and height must be greater than zero. Setting an - * invalid size will raise an error. When applied, the effective - * window geometry will be the set window geometry clamped to the - * bounding rectangle of the combined geometry of the surface of - * the xdg_surface and the associated subsurfaces. - */ - void (*set_window_geometry)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height); - /** - * ack a configure event - * - * 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. - * @param serial the serial from the configure event - */ - void (*ack_configure)(struct wl_client *client, - struct wl_resource *resource, - uint32_t serial); -}; - -#define ZXDG_SURFACE_V6_CONFIGURE 0 - -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_CONFIGURE_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_GET_TOPLEVEL_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_GET_POPUP_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_SET_WINDOW_GEOMETRY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_ACK_CONFIGURE_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_surface_v6 - * Sends an configure event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial of the configure event - */ -static inline void -zxdg_surface_v6_send_configure(struct wl_resource *resource_, uint32_t serial) -{ - wl_resource_post_event(resource_, ZXDG_SURFACE_V6_CONFIGURE, serial); -} - -#ifndef ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM -#define ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM -/** - * @ingroup iface_zxdg_toplevel_v6 - * edge values for resizing - * - * These values are used to indicate which edge of a surface - * is being dragged in a resize operation. - */ -enum zxdg_toplevel_v6_resize_edge { - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_NONE = 0, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP = 1, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM = 2, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_LEFT = 4, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP_LEFT = 5, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM_LEFT = 6, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_RIGHT = 8, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP_RIGHT = 9, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM_RIGHT = 10, -}; -#endif /* ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM */ - -#ifndef ZXDG_TOPLEVEL_V6_STATE_ENUM -#define ZXDG_TOPLEVEL_V6_STATE_ENUM -/** - * @ingroup iface_zxdg_toplevel_v6 - * the surface is now activated - * - * 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. - */ -enum zxdg_toplevel_v6_state { - /** - * the surface is maximized - */ - ZXDG_TOPLEVEL_V6_STATE_MAXIMIZED = 1, - /** - * the surface is fullscreen - */ - ZXDG_TOPLEVEL_V6_STATE_FULLSCREEN = 2, - /** - * the surface is being resized - */ - ZXDG_TOPLEVEL_V6_STATE_RESIZING = 3, - /** - * the surface is now activated - */ - ZXDG_TOPLEVEL_V6_STATE_ACTIVATED = 4, -}; -#endif /* ZXDG_TOPLEVEL_V6_STATE_ENUM */ - -/** - * @ingroup iface_zxdg_toplevel_v6 - * @struct zxdg_toplevel_v6_interface - */ -struct zxdg_toplevel_v6_interface { - /** - * destroy the xdg_toplevel - * - * 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. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the parent of this surface - * - * 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. - */ - void (*set_parent)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *parent); - /** - * set surface title - * - * 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. - */ - void (*set_title)(struct wl_client *client, - struct wl_resource *resource, - const char *title); - /** - * set application ID - * - * 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/ - */ - void (*set_app_id)(struct wl_client *client, - struct wl_resource *resource, - const char *app_id); - /** - * show the window menu - * - * 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. - * @param seat the wl_seat of the user event - * @param serial the serial of the user event - * @param x the x position to pop up the window menu at - * @param y the y position to pop up the window menu at - */ - void (*show_window_menu)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *seat, - uint32_t serial, - int32_t x, - int32_t y); - /** - * start an interactive move - * - * 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. - * @param seat the wl_seat of the user event - * @param serial the serial of the user event - */ - void (*move)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *seat, - uint32_t serial); - /** - * start an interactive resize - * - * 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. - * @param seat the wl_seat of the user event - * @param serial the serial of the user event - * @param edges which edge or corner is being dragged - */ - void (*resize)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *seat, - uint32_t serial, - uint32_t edges); - /** - * set the maximum size - * - * Set a maximum size for the window. - * - * The client can specify a maximum size so that the compositor - * does not try to configure the window beyond this size. - * - * The width and height arguments are in window geometry - * coordinates. See xdg_surface.set_window_geometry. - * - * Values set in this way are double-buffered. They will get - * applied on the next commit. - * - * The compositor can use this information to allow or disallow - * different states like maximize or fullscreen and draw accurate - * animations. - * - * Similarly, a tiling window manager may use this information to - * place and resize client windows in a more effective way. - * - * The client should not rely on the compositor to obey the maximum - * size. The compositor may decide to ignore the values set by the - * client and request a larger size. - * - * If never set, or a value of zero in the request, means that the - * client has no expected maximum size in the given dimension. As a - * result, a client wishing to reset the maximum size to an - * unspecified state can use zero for width and height in the - * request. - * - * Requesting a maximum size to be smaller than the minimum size of - * a surface is illegal and will result in a protocol error. - * - * The width and height must be greater than or equal to zero. - * Using strictly negative values for width and height will result - * in a protocol error. - */ - void (*set_max_size)(struct wl_client *client, - struct wl_resource *resource, - int32_t width, - int32_t height); - /** - * set the minimum size - * - * Set a minimum size for the window. - * - * The client can specify a minimum size so that the compositor - * does not try to configure the window below this size. - * - * The width and height arguments are in window geometry - * coordinates. See xdg_surface.set_window_geometry. - * - * Values set in this way are double-buffered. They will get - * applied on the next commit. - * - * The compositor can use this information to allow or disallow - * different states like maximize or fullscreen and draw accurate - * animations. - * - * Similarly, a tiling window manager may use this information to - * place and resize client windows in a more effective way. - * - * The client should not rely on the compositor to obey the minimum - * size. The compositor may decide to ignore the values set by the - * client and request a smaller size. - * - * If never set, or a value of zero in the request, means that the - * client has no expected minimum size in the given dimension. As a - * result, a client wishing to reset the minimum size to an - * unspecified state can use zero for width and height in the - * request. - * - * Requesting a minimum size to be larger than the maximum size of - * a surface is illegal and will result in a protocol error. - * - * The width and height must be greater than or equal to zero. - * Using strictly negative values for width and height will result - * in a protocol error. - */ - void (*set_min_size)(struct wl_client *client, - struct wl_resource *resource, - int32_t width, - int32_t height); - /** - * maximize the window - * - * 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. - */ - void (*set_maximized)(struct wl_client *client, - struct wl_resource *resource); - /** - * unmaximize the window - * - * 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. - */ - void (*unset_maximized)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the window as fullscreen on a monitor - * - * 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. - */ - void (*set_fullscreen)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *output); - /** - */ - void (*unset_fullscreen)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the window as minimized - * - * 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. - */ - void (*set_minimized)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZXDG_TOPLEVEL_V6_CONFIGURE 0 -#define ZXDG_TOPLEVEL_V6_CLOSE 1 - -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_CLOSE_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_PARENT_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_TITLE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_APP_ID_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SHOW_WINDOW_MENU_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_MOVE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_RESIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_MAX_SIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_MIN_SIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_UNSET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_UNSET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_MINIMIZED_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_toplevel_v6 - * Sends an configure event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zxdg_toplevel_v6_send_configure(struct wl_resource *resource_, int32_t width, int32_t height, struct wl_array *states) -{ - wl_resource_post_event(resource_, ZXDG_TOPLEVEL_V6_CONFIGURE, width, height, states); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * Sends an close event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zxdg_toplevel_v6_send_close(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, ZXDG_TOPLEVEL_V6_CLOSE); -} - -#ifndef ZXDG_POPUP_V6_ERROR_ENUM -#define ZXDG_POPUP_V6_ERROR_ENUM -enum zxdg_popup_v6_error { - /** - * tried to grab after being mapped - */ - ZXDG_POPUP_V6_ERROR_INVALID_GRAB = 0, -}; -#endif /* ZXDG_POPUP_V6_ERROR_ENUM */ - -/** - * @ingroup iface_zxdg_popup_v6 - * @struct zxdg_popup_v6_interface - */ -struct zxdg_popup_v6_interface { - /** - * remove xdg_popup interface - * - * 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. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * make the popup take an explicit grab - * - * 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. - * @param seat the wl_seat of the user event - * @param serial the serial of the user event - */ - void (*grab)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *seat, - uint32_t serial); -}; - -#define ZXDG_POPUP_V6_CONFIGURE 0 -#define ZXDG_POPUP_V6_POPUP_DONE 1 - -/** - * @ingroup iface_zxdg_popup_v6 - */ -#define ZXDG_POPUP_V6_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_popup_v6 - */ -#define ZXDG_POPUP_V6_POPUP_DONE_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_popup_v6 - */ -#define ZXDG_POPUP_V6_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_popup_v6 - */ -#define ZXDG_POPUP_V6_GRAB_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_popup_v6 - * Sends an configure event to the client owning the resource. - * @param resource_ The client's resource - * @param x x position relative to parent surface window geometry - * @param y y position relative to parent surface window geometry - * @param width window geometry width - * @param height window geometry height - */ -static inline void -zxdg_popup_v6_send_configure(struct wl_resource *resource_, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_resource_post_event(resource_, ZXDG_POPUP_V6_CONFIGURE, x, y, width, height); -} - -/** - * @ingroup iface_zxdg_popup_v6 - * Sends an popup_done event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zxdg_popup_v6_send_popup_done(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, ZXDG_POPUP_V6_POPUP_DONE); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/protocol/alpha-compositing-protocol.c b/chromium/third_party/wayland-protocols/protocol/alpha-compositing-protocol.c deleted file mode 100644 index 271b2c72add..00000000000 --- a/chromium/third_party/wayland-protocols/protocol/alpha-compositing-protocol.c +++ /dev/null @@ -1,61 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -/* - * Copyright 2016 The Chromium Authors. - * - * 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. - */ - -#include <stdlib.h> -#include <stdint.h> -#include "wayland-util.h" - -extern const struct wl_interface wl_surface_interface; -extern const struct wl_interface zcr_blending_v1_interface; - -static const struct wl_interface *types[] = { - NULL, - &zcr_blending_v1_interface, - &wl_surface_interface, -}; - -static const struct wl_message zcr_alpha_compositing_v1_requests[] = { - { "destroy", "", types + 0 }, - { "get_blending", "no", types + 1 }, -}; - -WL_EXPORT const struct wl_interface zcr_alpha_compositing_v1_interface = { - "zcr_alpha_compositing_v1", 1, - 2, zcr_alpha_compositing_v1_requests, - 0, NULL, -}; - -static const struct wl_message zcr_blending_v1_requests[] = { - { "destroy", "", types + 0 }, - { "set_blending", "u", types + 0 }, - { "set_alpha", "f", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zcr_blending_v1_interface = { - "zcr_blending_v1", 1, - 3, zcr_blending_v1_requests, - 0, NULL, -}; - diff --git a/chromium/third_party/wayland-protocols/protocol/cursor-shapes-protocol.c b/chromium/third_party/wayland-protocols/protocol/cursor-shapes-protocol.c deleted file mode 100644 index aac4166050c..00000000000 --- a/chromium/third_party/wayland-protocols/protocol/cursor-shapes-protocol.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -/* - * Copyright 2018 The Chromium Authors. - * - * 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. - */ - -#include <stdlib.h> -#include <stdint.h> -#include "wayland-util.h" - -extern const struct wl_interface wl_pointer_interface; - -static const struct wl_interface *types[] = { - &wl_pointer_interface, - NULL, -}; - -static const struct wl_message zcr_cursor_shapes_v1_requests[] = { - { "set_cursor_shape", "oi", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zcr_cursor_shapes_v1_interface = { - "zcr_cursor_shapes_v1", 1, - 1, zcr_cursor_shapes_v1_requests, - 0, NULL, -}; - diff --git a/chromium/third_party/wayland-protocols/protocol/gaming-input-protocol-v1.c b/chromium/third_party/wayland-protocols/protocol/gaming-input-protocol-v1.c deleted file mode 100644 index 27e1294f0af..00000000000 --- a/chromium/third_party/wayland-protocols/protocol/gaming-input-protocol-v1.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -/* - * Copyright 2016 The Chromium Authors. - * - * 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. - */ - -#include <stdlib.h> -#include <stdint.h> -#include "wayland-util.h" - -extern const struct wl_interface wl_seat_interface; -extern const struct wl_interface zcr_gamepad_v1_interface; - -static const struct wl_interface *types[] = { - NULL, - NULL, - NULL, - NULL, - &zcr_gamepad_v1_interface, - &wl_seat_interface, -}; - -static const struct wl_message zcr_gaming_input_v1_requests[] = { - { "get_gamepad", "no", types + 4 }, -}; - -WL_EXPORT const struct wl_interface zcr_gaming_input_v1_interface = { - "zcr_gaming_input_v1", 1, - 1, zcr_gaming_input_v1_requests, - 0, NULL, -}; - -static const struct wl_message zcr_gamepad_v1_requests[] = { - { "destroy", "", types + 0 }, -}; - -static const struct wl_message zcr_gamepad_v1_events[] = { - { "state_change", "u", types + 0 }, - { "axis", "uuf", types + 0 }, - { "button", "uuuf", types + 0 }, - { "frame", "u", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zcr_gamepad_v1_interface = { - "zcr_gamepad_v1", 1, - 1, zcr_gamepad_v1_requests, - 4, zcr_gamepad_v1_events, -}; - diff --git a/chromium/third_party/wayland-protocols/protocol/gaming-input-protocol-v2.c b/chromium/third_party/wayland-protocols/protocol/gaming-input-protocol-v2.c deleted file mode 100644 index 6ddcf3f9dd9..00000000000 --- a/chromium/third_party/wayland-protocols/protocol/gaming-input-protocol-v2.c +++ /dev/null @@ -1,85 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -/* - * Copyright 2016 The Chromium Authors. - * - * 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. - */ - -#include <stdlib.h> -#include <stdint.h> -#include "wayland-util.h" - -extern const struct wl_interface wl_seat_interface; -extern const struct wl_interface zcr_gamepad_v2_interface; -extern const struct wl_interface zcr_gaming_seat_v2_interface; - -static const struct wl_interface *types[] = { - NULL, - NULL, - NULL, - NULL, - &zcr_gaming_seat_v2_interface, - &wl_seat_interface, - &zcr_gamepad_v2_interface, -}; - -static const struct wl_message zcr_gaming_input_v2_requests[] = { - { "get_gaming_seat", "no", types + 4 }, - { "destroy", "", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zcr_gaming_input_v2_interface = { - "zcr_gaming_input_v2", 1, - 2, zcr_gaming_input_v2_requests, - 0, NULL, -}; - -static const struct wl_message zcr_gaming_seat_v2_requests[] = { - { "destroy", "", types + 0 }, -}; - -static const struct wl_message zcr_gaming_seat_v2_events[] = { - { "gamepad_added", "n", types + 6 }, -}; - -WL_EXPORT const struct wl_interface zcr_gaming_seat_v2_interface = { - "zcr_gaming_seat_v2", 1, - 1, zcr_gaming_seat_v2_requests, - 1, zcr_gaming_seat_v2_events, -}; - -static const struct wl_message zcr_gamepad_v2_requests[] = { - { "destroy", "", types + 0 }, -}; - -static const struct wl_message zcr_gamepad_v2_events[] = { - { "removed", "", types + 0 }, - { "axis", "uuf", types + 0 }, - { "button", "uuuf", types + 0 }, - { "frame", "u", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zcr_gamepad_v2_interface = { - "zcr_gamepad_v2", 1, - 1, zcr_gamepad_v2_requests, - 4, zcr_gamepad_v2_events, -}; - diff --git a/chromium/third_party/wayland-protocols/protocol/input-timestamps-v1-protocol.c b/chromium/third_party/wayland-protocols/protocol/input-timestamps-v1-protocol.c deleted file mode 100644 index 33e91129e59..00000000000 --- a/chromium/third_party/wayland-protocols/protocol/input-timestamps-v1-protocol.c +++ /dev/null @@ -1,73 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -/* - * 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. - */ - -#include <stdlib.h> -#include <stdint.h> -#include "wayland-util.h" - -extern const struct wl_interface wl_keyboard_interface; -extern const struct wl_interface wl_pointer_interface; -extern const struct wl_interface wl_touch_interface; -extern const struct wl_interface zwp_input_timestamps_v1_interface; - -static const struct wl_interface *types[] = { - NULL, - NULL, - NULL, - &zwp_input_timestamps_v1_interface, - &wl_keyboard_interface, - &zwp_input_timestamps_v1_interface, - &wl_pointer_interface, - &zwp_input_timestamps_v1_interface, - &wl_touch_interface, -}; - -static const struct wl_message zwp_input_timestamps_manager_v1_requests[] = { - { "destroy", "", types + 0 }, - { "get_keyboard_timestamps", "no", types + 3 }, - { "get_pointer_timestamps", "no", types + 5 }, - { "get_touch_timestamps", "no", types + 7 }, -}; - -WL_EXPORT const struct wl_interface zwp_input_timestamps_manager_v1_interface = { - "zwp_input_timestamps_manager_v1", 1, - 4, zwp_input_timestamps_manager_v1_requests, - 0, NULL, -}; - -static const struct wl_message zwp_input_timestamps_v1_requests[] = { - { "destroy", "", types + 0 }, -}; - -static const struct wl_message zwp_input_timestamps_v1_events[] = { - { "timestamp", "uuu", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zwp_input_timestamps_v1_interface = { - "zwp_input_timestamps_v1", 1, - 1, zwp_input_timestamps_v1_requests, - 1, zwp_input_timestamps_v1_events, -}; - diff --git a/chromium/third_party/wayland-protocols/protocol/keyboard-configuration-protocol.c b/chromium/third_party/wayland-protocols/protocol/keyboard-configuration-protocol.c deleted file mode 100644 index 0a8abf7b65b..00000000000 --- a/chromium/third_party/wayland-protocols/protocol/keyboard-configuration-protocol.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -/* - * Copyright 2016 The Chromium Authors. - * - * 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. - */ - -#include <stdlib.h> -#include <stdint.h> -#include "wayland-util.h" - -extern const struct wl_interface wl_keyboard_interface; -extern const struct wl_interface zcr_keyboard_device_configuration_v1_interface; - -static const struct wl_interface *types[] = { - NULL, - &zcr_keyboard_device_configuration_v1_interface, - &wl_keyboard_interface, -}; - -static const struct wl_message zcr_keyboard_configuration_v1_requests[] = { - { "get_keyboard_device_configuration", "no", types + 1 }, -}; - -WL_EXPORT const struct wl_interface zcr_keyboard_configuration_v1_interface = { - "zcr_keyboard_configuration_v1", 2, - 1, zcr_keyboard_configuration_v1_requests, - 0, NULL, -}; - -static const struct wl_message zcr_keyboard_device_configuration_v1_requests[] = { - { "destroy", "", types + 0 }, -}; - -static const struct wl_message zcr_keyboard_device_configuration_v1_events[] = { - { "type_change", "u", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zcr_keyboard_device_configuration_v1_interface = { - "zcr_keyboard_device_configuration_v1", 1, - 1, zcr_keyboard_device_configuration_v1_requests, - 1, zcr_keyboard_device_configuration_v1_events, -}; - diff --git a/chromium/third_party/wayland-protocols/protocol/keyboard-extension-protocol.c b/chromium/third_party/wayland-protocols/protocol/keyboard-extension-protocol.c deleted file mode 100644 index fb2ea2ba520..00000000000 --- a/chromium/third_party/wayland-protocols/protocol/keyboard-extension-protocol.c +++ /dev/null @@ -1,60 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -/* - * Copyright 2017 The Chromium Authors. - * - * 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. - */ - -#include <stdlib.h> -#include <stdint.h> -#include "wayland-util.h" - -extern const struct wl_interface wl_keyboard_interface; -extern const struct wl_interface zcr_extended_keyboard_v1_interface; - -static const struct wl_interface *types[] = { - NULL, - NULL, - &zcr_extended_keyboard_v1_interface, - &wl_keyboard_interface, -}; - -static const struct wl_message zcr_keyboard_extension_v1_requests[] = { - { "get_extended_keyboard", "no", types + 2 }, -}; - -WL_EXPORT const struct wl_interface zcr_keyboard_extension_v1_interface = { - "zcr_keyboard_extension_v1", 1, - 1, zcr_keyboard_extension_v1_requests, - 0, NULL, -}; - -static const struct wl_message zcr_extended_keyboard_v1_requests[] = { - { "destroy", "", types + 0 }, - { "ack_key", "uu", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zcr_extended_keyboard_v1_interface = { - "zcr_extended_keyboard_v1", 1, - 2, zcr_extended_keyboard_v1_requests, - 0, NULL, -}; - diff --git a/chromium/third_party/wayland-protocols/protocol/linux-dmabuf-protocol.c b/chromium/third_party/wayland-protocols/protocol/linux-dmabuf-protocol.c deleted file mode 100644 index d27b9bee7fb..00000000000 --- a/chromium/third_party/wayland-protocols/protocol/linux-dmabuf-protocol.c +++ /dev/null @@ -1,82 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -/* - * 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. - */ - -#include <stdlib.h> -#include <stdint.h> -#include "wayland-util.h" - -extern const struct wl_interface wl_buffer_interface; -extern const struct wl_interface zwp_linux_buffer_params_v1_interface; - -static const struct wl_interface *types[] = { - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - &zwp_linux_buffer_params_v1_interface, - &wl_buffer_interface, - NULL, - NULL, - NULL, - NULL, - &wl_buffer_interface, -}; - -static const struct wl_message zwp_linux_dmabuf_v1_requests[] = { - { "destroy", "", types + 0 }, - { "create_params", "n", types + 6 }, -}; - -static const struct wl_message zwp_linux_dmabuf_v1_events[] = { - { "format", "u", types + 0 }, - { "modifier", "3uuu", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zwp_linux_dmabuf_v1_interface = { - "zwp_linux_dmabuf_v1", 3, - 2, zwp_linux_dmabuf_v1_requests, - 2, zwp_linux_dmabuf_v1_events, -}; - -static const struct wl_message zwp_linux_buffer_params_v1_requests[] = { - { "destroy", "", types + 0 }, - { "add", "huuuuu", types + 0 }, - { "create", "iiuu", types + 0 }, - { "create_immed", "2niiuu", types + 7 }, -}; - -static const struct wl_message zwp_linux_buffer_params_v1_events[] = { - { "created", "n", types + 12 }, - { "failed", "", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zwp_linux_buffer_params_v1_interface = { - "zwp_linux_buffer_params_v1", 3, - 4, zwp_linux_buffer_params_v1_requests, - 2, zwp_linux_buffer_params_v1_events, -}; - diff --git a/chromium/third_party/wayland-protocols/protocol/pointer-gestures-v1-protocol.c b/chromium/third_party/wayland-protocols/protocol/pointer-gestures-v1-protocol.c deleted file mode 100644 index 842cb57a286..00000000000 --- a/chromium/third_party/wayland-protocols/protocol/pointer-gestures-v1-protocol.c +++ /dev/null @@ -1,74 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#include <stdlib.h> -#include <stdint.h> -#include "wayland-util.h" - -extern const struct wl_interface wl_pointer_interface; -extern const struct wl_interface wl_surface_interface; -extern const struct wl_interface zwp_pointer_gesture_pinch_v1_interface; -extern const struct wl_interface zwp_pointer_gesture_swipe_v1_interface; - -static const struct wl_interface *types[] = { - NULL, - NULL, - NULL, - NULL, - NULL, - &zwp_pointer_gesture_swipe_v1_interface, - &wl_pointer_interface, - &zwp_pointer_gesture_pinch_v1_interface, - &wl_pointer_interface, - NULL, - NULL, - &wl_surface_interface, - NULL, - NULL, - NULL, - &wl_surface_interface, - NULL, -}; - -static const struct wl_message zwp_pointer_gestures_v1_requests[] = { - { "get_swipe_gesture", "no", types + 5 }, - { "get_pinch_gesture", "no", types + 7 }, -}; - -WL_EXPORT const struct wl_interface zwp_pointer_gestures_v1_interface = { - "zwp_pointer_gestures_v1", 1, - 2, zwp_pointer_gestures_v1_requests, - 0, NULL, -}; - -static const struct wl_message zwp_pointer_gesture_swipe_v1_requests[] = { - { "destroy", "", types + 0 }, -}; - -static const struct wl_message zwp_pointer_gesture_swipe_v1_events[] = { - { "begin", "uuou", types + 9 }, - { "update", "uff", types + 0 }, - { "end", "uui", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zwp_pointer_gesture_swipe_v1_interface = { - "zwp_pointer_gesture_swipe_v1", 1, - 1, zwp_pointer_gesture_swipe_v1_requests, - 3, zwp_pointer_gesture_swipe_v1_events, -}; - -static const struct wl_message zwp_pointer_gesture_pinch_v1_requests[] = { - { "destroy", "", types + 0 }, -}; - -static const struct wl_message zwp_pointer_gesture_pinch_v1_events[] = { - { "begin", "uuou", types + 13 }, - { "update", "uffff", types + 0 }, - { "end", "uui", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zwp_pointer_gesture_pinch_v1_interface = { - "zwp_pointer_gesture_pinch_v1", 1, - 1, zwp_pointer_gesture_pinch_v1_requests, - 3, zwp_pointer_gesture_pinch_v1_events, -}; - diff --git a/chromium/third_party/wayland-protocols/protocol/presentation-time-protocol.c b/chromium/third_party/wayland-protocols/protocol/presentation-time-protocol.c deleted file mode 100644 index c3423f487e9..00000000000 --- a/chromium/third_party/wayland-protocols/protocol/presentation-time-protocol.c +++ /dev/null @@ -1,73 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -/* - * 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. - */ - -#include <stdlib.h> -#include <stdint.h> -#include "wayland-util.h" - -extern const struct wl_interface wl_output_interface; -extern const struct wl_interface wl_surface_interface; -extern const struct wl_interface wp_presentation_feedback_interface; - -static const struct wl_interface *types[] = { - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - &wl_surface_interface, - &wp_presentation_feedback_interface, - &wl_output_interface, -}; - -static const struct wl_message wp_presentation_requests[] = { - { "destroy", "", types + 0 }, - { "feedback", "on", types + 7 }, -}; - -static const struct wl_message wp_presentation_events[] = { - { "clock_id", "u", types + 0 }, -}; - -WL_EXPORT const struct wl_interface wp_presentation_interface = { - "wp_presentation", 1, - 2, wp_presentation_requests, - 1, wp_presentation_events, -}; - -static const struct wl_message wp_presentation_feedback_events[] = { - { "sync_output", "o", types + 9 }, - { "presented", "uuuuuuu", types + 0 }, - { "discarded", "", types + 0 }, -}; - -WL_EXPORT const struct wl_interface wp_presentation_feedback_interface = { - "wp_presentation_feedback", 1, - 0, NULL, - 3, wp_presentation_feedback_events, -}; - diff --git a/chromium/third_party/wayland-protocols/protocol/remote-shell-protocol.c b/chromium/third_party/wayland-protocols/protocol/remote-shell-protocol.c deleted file mode 100644 index c0d09551478..00000000000 --- a/chromium/third_party/wayland-protocols/protocol/remote-shell-protocol.c +++ /dev/null @@ -1,162 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -/* - * Copyright 2016 The Chromium Authors. - * - * 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. - */ - -#include <stdlib.h> -#include <stdint.h> -#include "wayland-util.h" - -extern const struct wl_interface wl_surface_interface; -extern const struct wl_interface zcr_input_method_surface_v1_interface; -extern const struct wl_interface zcr_notification_surface_v1_interface; -extern const struct wl_interface zcr_remote_surface_v1_interface; - -static const struct wl_interface *types[] = { - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - &zcr_remote_surface_v1_interface, - &wl_surface_interface, - NULL, - &zcr_notification_surface_v1_interface, - &wl_surface_interface, - NULL, - &zcr_input_method_surface_v1_interface, - &wl_surface_interface, - &wl_surface_interface, - &wl_surface_interface, -}; - -static const struct wl_message zcr_remote_shell_v1_requests[] = { - { "destroy", "", types + 0 }, - { "get_remote_surface", "nou", types + 13 }, - { "get_notification_surface", "nos", types + 16 }, - { "get_input_method_surface", "17no", types + 19 }, -}; - -static const struct wl_message zcr_remote_shell_v1_events[] = { - { "activated", "?o?o", types + 21 }, - { "configuration_changed", "iiifiiiiu", types + 0 }, - { "workspace", "5uuiiiiiiiiifu", types + 0 }, - { "configure", "5u", types + 0 }, - { "default_device_scale_factor", "8i", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zcr_remote_shell_v1_interface = { - "zcr_remote_shell_v1", 17, - 4, zcr_remote_shell_v1_requests, - 5, zcr_remote_shell_v1_events, -}; - -static const struct wl_message zcr_remote_surface_v1_requests[] = { - { "destroy", "", types + 0 }, - { "set_app_id", "s", types + 0 }, - { "set_window_geometry", "iiii", types + 0 }, - { "set_scale", "f", types + 0 }, - { "set_rectangular_shadow", "iiii", types + 0 }, - { "set_rectangular_shadow_background_opacity", "f", types + 0 }, - { "set_title", "s", types + 0 }, - { "set_top_inset", "i", types + 0 }, - { "activate", "u", types + 0 }, - { "maximize", "", types + 0 }, - { "minimize", "", types + 0 }, - { "restore", "", types + 0 }, - { "fullscreen", "", types + 0 }, - { "unfullscreen", "", types + 0 }, - { "pin", "i", types + 0 }, - { "unpin", "", types + 0 }, - { "set_system_modal", "", types + 0 }, - { "unset_system_modal", "", types + 0 }, - { "set_rectangular_surface_shadow", "2iiii", types + 0 }, - { "set_systemui_visibility", "3u", types + 0 }, - { "set_always_on_top", "4", types + 0 }, - { "unset_always_on_top", "4", types + 0 }, - { "ack_configure", "5u", types + 0 }, - { "move", "5", types + 0 }, - { "set_orientation", "6i", types + 0 }, - { "set_window_type", "7u", types + 0 }, - { "resize", "9", types + 0 }, - { "set_resize_outset", "9i", types + 0 }, - { "start_move", "10ii", types + 0 }, - { "set_can_maximize", "10", types + 0 }, - { "unset_can_maximize", "10", types + 0 }, - { "set_min_size", "10ii", types + 0 }, - { "set_max_size", "10ii", types + 0 }, - { "set_snapped_to_left", "11", types + 0 }, - { "set_snapped_to_right", "11", types + 0 }, - { "start_resize", "12uii", types + 0 }, - { "set_frame", "13u", types + 0 }, - { "set_frame_buttons", "13uu", types + 0 }, - { "set_extra_title", "13s", types + 0 }, - { "set_orientation_lock", "14u", types + 0 }, - { "pip", "15", types + 0 }, -}; - -static const struct wl_message zcr_remote_surface_v1_events[] = { - { "close", "", types + 0 }, - { "state_type_changed", "u", types + 0 }, - { "configure", "5iiau", types + 0 }, - { "window_geometry_changed", "9iiii", types + 0 }, - { "bounds_changed", "10uuiiiiu", types + 0 }, - { "drag_started", "10u", types + 0 }, - { "drag_finished", "10iii", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zcr_remote_surface_v1_interface = { - "zcr_remote_surface_v1", 15, - 41, zcr_remote_surface_v1_requests, - 7, zcr_remote_surface_v1_events, -}; - -static const struct wl_message zcr_notification_surface_v1_requests[] = { - { "destroy", "", types + 0 }, - { "set_app_id", "16s", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zcr_notification_surface_v1_interface = { - "zcr_notification_surface_v1", 16, - 2, zcr_notification_surface_v1_requests, - 0, NULL, -}; - -static const struct wl_message zcr_input_method_surface_v1_requests[] = { - { "destroy", "", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zcr_input_method_surface_v1_interface = { - "zcr_input_method_surface_v1", 17, - 1, zcr_input_method_surface_v1_requests, - 0, NULL, -}; - diff --git a/chromium/third_party/wayland-protocols/protocol/secure-output-protocol.c b/chromium/third_party/wayland-protocols/protocol/secure-output-protocol.c deleted file mode 100644 index 1ecc6466fb7..00000000000 --- a/chromium/third_party/wayland-protocols/protocol/secure-output-protocol.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -/* - * Copyright 2016 The Chromium Authors. - * - * 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. - */ - -#include <stdlib.h> -#include <stdint.h> -#include "wayland-util.h" - -extern const struct wl_interface wl_surface_interface; -extern const struct wl_interface zcr_security_v1_interface; - -static const struct wl_interface *types[] = { - &zcr_security_v1_interface, - &wl_surface_interface, -}; - -static const struct wl_message zcr_secure_output_v1_requests[] = { - { "destroy", "", types + 0 }, - { "get_security", "no", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zcr_secure_output_v1_interface = { - "zcr_secure_output_v1", 1, - 2, zcr_secure_output_v1_requests, - 0, NULL, -}; - -static const struct wl_message zcr_security_v1_requests[] = { - { "destroy", "", types + 0 }, - { "only_visible_on_secure_output", "", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zcr_security_v1_interface = { - "zcr_security_v1", 1, - 2, zcr_security_v1_requests, - 0, NULL, -}; - diff --git a/chromium/third_party/wayland-protocols/protocol/stylus-protocol-v2.c b/chromium/third_party/wayland-protocols/protocol/stylus-protocol-v2.c deleted file mode 100644 index 055a1e8a56c..00000000000 --- a/chromium/third_party/wayland-protocols/protocol/stylus-protocol-v2.c +++ /dev/null @@ -1,67 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -/* - * Copyright 2016 The Chromium Authors. - * - * 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. - */ - -#include <stdlib.h> -#include <stdint.h> -#include "wayland-util.h" - -extern const struct wl_interface wl_touch_interface; -extern const struct wl_interface zcr_touch_stylus_v2_interface; - -static const struct wl_interface *types[] = { - NULL, - NULL, - NULL, - NULL, - &zcr_touch_stylus_v2_interface, - &wl_touch_interface, -}; - -static const struct wl_message zcr_stylus_v2_requests[] = { - { "get_touch_stylus", "no", types + 4 }, -}; - -WL_EXPORT const struct wl_interface zcr_stylus_v2_interface = { - "zcr_stylus_v2", 1, - 1, zcr_stylus_v2_requests, - 0, NULL, -}; - -static const struct wl_message zcr_touch_stylus_v2_requests[] = { - { "destroy", "", types + 0 }, -}; - -static const struct wl_message zcr_touch_stylus_v2_events[] = { - { "tool", "uu", types + 0 }, - { "force", "uuf", types + 0 }, - { "tilt", "uuff", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zcr_touch_stylus_v2_interface = { - "zcr_touch_stylus_v2", 1, - 1, zcr_touch_stylus_v2_requests, - 3, zcr_touch_stylus_v2_events, -}; - diff --git a/chromium/third_party/wayland-protocols/protocol/stylus-tools-protocol.c b/chromium/third_party/wayland-protocols/protocol/stylus-tools-protocol.c deleted file mode 100644 index 3e7a04ed9b5..00000000000 --- a/chromium/third_party/wayland-protocols/protocol/stylus-tools-protocol.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -/* - * Copyright 2017 The Chromium Authors. - * - * 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. - */ - -#include <stdlib.h> -#include <stdint.h> -#include "wayland-util.h" - -extern const struct wl_interface wl_surface_interface; -extern const struct wl_interface zcr_stylus_tool_v1_interface; - -static const struct wl_interface *types[] = { - &zcr_stylus_tool_v1_interface, - &wl_surface_interface, -}; - -static const struct wl_message zcr_stylus_tools_v1_requests[] = { - { "destroy", "", types + 0 }, - { "get_stylus_tool", "no", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zcr_stylus_tools_v1_interface = { - "zcr_stylus_tools_v1", 1, - 2, zcr_stylus_tools_v1_requests, - 0, NULL, -}; - -static const struct wl_message zcr_stylus_tool_v1_requests[] = { - { "destroy", "", types + 0 }, - { "set_stylus_only", "", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zcr_stylus_tool_v1_interface = { - "zcr_stylus_tool_v1", 1, - 2, zcr_stylus_tool_v1_requests, - 0, NULL, -}; - diff --git a/chromium/third_party/wayland-protocols/protocol/viewporter-protocol.c b/chromium/third_party/wayland-protocols/protocol/viewporter-protocol.c deleted file mode 100644 index 8bc362c7097..00000000000 --- a/chromium/third_party/wayland-protocols/protocol/viewporter-protocol.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -/* - * 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. - */ - -#include <stdlib.h> -#include <stdint.h> -#include "wayland-util.h" - -extern const struct wl_interface wl_surface_interface; -extern const struct wl_interface wp_viewport_interface; - -static const struct wl_interface *types[] = { - NULL, - NULL, - NULL, - NULL, - &wp_viewport_interface, - &wl_surface_interface, -}; - -static const struct wl_message wp_viewporter_requests[] = { - { "destroy", "", types + 0 }, - { "get_viewport", "no", types + 4 }, -}; - -WL_EXPORT const struct wl_interface wp_viewporter_interface = { - "wp_viewporter", 1, - 2, wp_viewporter_requests, - 0, NULL, -}; - -static const struct wl_message wp_viewport_requests[] = { - { "destroy", "", types + 0 }, - { "set_source", "ffff", types + 0 }, - { "set_destination", "ii", types + 0 }, -}; - -WL_EXPORT const struct wl_interface wp_viewport_interface = { - "wp_viewport", 1, - 3, wp_viewport_requests, - 0, NULL, -}; - diff --git a/chromium/third_party/wayland-protocols/protocol/vsync-feedback-protocol.c b/chromium/third_party/wayland-protocols/protocol/vsync-feedback-protocol.c deleted file mode 100644 index c9627d2a366..00000000000 --- a/chromium/third_party/wayland-protocols/protocol/vsync-feedback-protocol.c +++ /dev/null @@ -1,66 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -/* - * Copyright 2016 The Chromium Authors. - * - * 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. - */ - -#include <stdlib.h> -#include <stdint.h> -#include "wayland-util.h" - -extern const struct wl_interface wl_output_interface; -extern const struct wl_interface zcr_vsync_timing_v1_interface; - -static const struct wl_interface *types[] = { - NULL, - NULL, - NULL, - NULL, - &zcr_vsync_timing_v1_interface, - &wl_output_interface, -}; - -static const struct wl_message zcr_vsync_feedback_v1_requests[] = { - { "destroy", "", types + 0 }, - { "get_vsync_timing", "n?o", types + 4 }, -}; - -WL_EXPORT const struct wl_interface zcr_vsync_feedback_v1_interface = { - "zcr_vsync_feedback_v1", 1, - 2, zcr_vsync_feedback_v1_requests, - 0, NULL, -}; - -static const struct wl_message zcr_vsync_timing_v1_requests[] = { - { "destroy", "", types + 0 }, -}; - -static const struct wl_message zcr_vsync_timing_v1_events[] = { - { "update", "uuuu", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zcr_vsync_timing_v1_interface = { - "zcr_vsync_timing_v1", 1, - 1, zcr_vsync_timing_v1_requests, - 1, zcr_vsync_timing_v1_events, -}; - diff --git a/chromium/third_party/wayland-protocols/protocol/xdg-shell-v5-protocol.c b/chromium/third_party/wayland-protocols/protocol/xdg-shell-v5-protocol.c deleted file mode 100644 index f2646a2ddfc..00000000000 --- a/chromium/third_party/wayland-protocols/protocol/xdg-shell-v5-protocol.c +++ /dev/null @@ -1,125 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -/* - * 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. - */ - -#include <stdlib.h> -#include <stdint.h> -#include "wayland-util.h" - -extern const struct wl_interface wl_output_interface; -extern const struct wl_interface wl_seat_interface; -extern const struct wl_interface wl_surface_interface; -extern const struct wl_interface xdg_popup_interface; -extern const struct wl_interface xdg_surface_interface; - -static const struct wl_interface *types[] = { - NULL, - NULL, - NULL, - NULL, - &xdg_surface_interface, - &wl_surface_interface, - &xdg_popup_interface, - &wl_surface_interface, - &wl_surface_interface, - &wl_seat_interface, - NULL, - NULL, - NULL, - &xdg_surface_interface, - &wl_seat_interface, - NULL, - NULL, - NULL, - &wl_seat_interface, - NULL, - &wl_seat_interface, - NULL, - NULL, - &wl_output_interface, -}; - -static const struct wl_message xdg_shell_requests[] = { - { "destroy", "", types + 0 }, - { "use_unstable_version", "i", types + 0 }, - { "get_xdg_surface", "no", types + 4 }, - { "get_xdg_popup", "nooouii", types + 6 }, - { "pong", "u", types + 0 }, -}; - -static const struct wl_message xdg_shell_events[] = { - { "ping", "u", types + 0 }, -}; - -WL_EXPORT const struct wl_interface xdg_shell_interface = { - "xdg_shell", 1, - 5, xdg_shell_requests, - 1, xdg_shell_events, -}; - -static const struct wl_message xdg_surface_requests[] = { - { "destroy", "", types + 0 }, - { "set_parent", "?o", types + 13 }, - { "set_title", "s", types + 0 }, - { "set_app_id", "s", types + 0 }, - { "show_window_menu", "ouii", types + 14 }, - { "move", "ou", types + 18 }, - { "resize", "ouu", types + 20 }, - { "ack_configure", "u", types + 0 }, - { "set_window_geometry", "iiii", types + 0 }, - { "set_maximized", "", types + 0 }, - { "unset_maximized", "", types + 0 }, - { "set_fullscreen", "?o", types + 23 }, - { "unset_fullscreen", "", types + 0 }, - { "set_minimized", "", types + 0 }, -}; - -static const struct wl_message xdg_surface_events[] = { - { "configure", "iiau", types + 0 }, - { "close", "", types + 0 }, -}; - -WL_EXPORT const struct wl_interface xdg_surface_interface = { - "xdg_surface", 1, - 14, xdg_surface_requests, - 2, xdg_surface_events, -}; - -static const struct wl_message xdg_popup_requests[] = { - { "destroy", "", types + 0 }, -}; - -static const struct wl_message xdg_popup_events[] = { - { "popup_done", "", types + 0 }, -}; - -WL_EXPORT const struct wl_interface xdg_popup_interface = { - "xdg_popup", 1, - 1, xdg_popup_requests, - 1, xdg_popup_events, -}; - diff --git a/chromium/third_party/wayland-protocols/protocol/xdg-shell-v6-protocol.c b/chromium/third_party/wayland-protocols/protocol/xdg-shell-v6-protocol.c deleted file mode 100644 index ce44a5ee18d..00000000000 --- a/chromium/third_party/wayland-protocols/protocol/xdg-shell-v6-protocol.c +++ /dev/null @@ -1,162 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -/* - * 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. - */ - -#include <stdlib.h> -#include <stdint.h> -#include "wayland-util.h" - -extern const struct wl_interface wl_output_interface; -extern const struct wl_interface wl_seat_interface; -extern const struct wl_interface wl_surface_interface; -extern const struct wl_interface zxdg_popup_v6_interface; -extern const struct wl_interface zxdg_positioner_v6_interface; -extern const struct wl_interface zxdg_surface_v6_interface; -extern const struct wl_interface zxdg_toplevel_v6_interface; - -static const struct wl_interface *types[] = { - NULL, - NULL, - NULL, - NULL, - &zxdg_positioner_v6_interface, - &zxdg_surface_v6_interface, - &wl_surface_interface, - &zxdg_toplevel_v6_interface, - &zxdg_popup_v6_interface, - &zxdg_surface_v6_interface, - &zxdg_positioner_v6_interface, - &zxdg_toplevel_v6_interface, - &wl_seat_interface, - NULL, - NULL, - NULL, - &wl_seat_interface, - NULL, - &wl_seat_interface, - NULL, - NULL, - &wl_output_interface, - &wl_seat_interface, - NULL, -}; - -static const struct wl_message zxdg_shell_v6_requests[] = { - { "destroy", "", types + 0 }, - { "create_positioner", "n", types + 4 }, - { "get_xdg_surface", "no", types + 5 }, - { "pong", "u", types + 0 }, -}; - -static const struct wl_message zxdg_shell_v6_events[] = { - { "ping", "u", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zxdg_shell_v6_interface = { - "zxdg_shell_v6", 1, - 4, zxdg_shell_v6_requests, - 1, zxdg_shell_v6_events, -}; - -static const struct wl_message zxdg_positioner_v6_requests[] = { - { "destroy", "", types + 0 }, - { "set_size", "ii", types + 0 }, - { "set_anchor_rect", "iiii", types + 0 }, - { "set_anchor", "u", types + 0 }, - { "set_gravity", "u", types + 0 }, - { "set_constraint_adjustment", "u", types + 0 }, - { "set_offset", "ii", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zxdg_positioner_v6_interface = { - "zxdg_positioner_v6", 1, - 7, zxdg_positioner_v6_requests, - 0, NULL, -}; - -static const struct wl_message zxdg_surface_v6_requests[] = { - { "destroy", "", types + 0 }, - { "get_toplevel", "n", types + 7 }, - { "get_popup", "noo", types + 8 }, - { "set_window_geometry", "iiii", types + 0 }, - { "ack_configure", "u", types + 0 }, -}; - -static const struct wl_message zxdg_surface_v6_events[] = { - { "configure", "u", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zxdg_surface_v6_interface = { - "zxdg_surface_v6", 1, - 5, zxdg_surface_v6_requests, - 1, zxdg_surface_v6_events, -}; - -static const struct wl_message zxdg_toplevel_v6_requests[] = { - { "destroy", "", types + 0 }, - { "set_parent", "?o", types + 11 }, - { "set_title", "s", types + 0 }, - { "set_app_id", "s", types + 0 }, - { "show_window_menu", "ouii", types + 12 }, - { "move", "ou", types + 16 }, - { "resize", "ouu", types + 18 }, - { "set_max_size", "ii", types + 0 }, - { "set_min_size", "ii", types + 0 }, - { "set_maximized", "", types + 0 }, - { "unset_maximized", "", types + 0 }, - { "set_fullscreen", "?o", types + 21 }, - { "unset_fullscreen", "", types + 0 }, - { "set_minimized", "", types + 0 }, -}; - -static const struct wl_message zxdg_toplevel_v6_events[] = { - { "configure", "iia", types + 0 }, - { "close", "", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zxdg_toplevel_v6_interface = { - "zxdg_toplevel_v6", 1, - 14, zxdg_toplevel_v6_requests, - 2, zxdg_toplevel_v6_events, -}; - -static const struct wl_message zxdg_popup_v6_requests[] = { - { "destroy", "", types + 0 }, - { "grab", "ou", types + 22 }, -}; - -static const struct wl_message zxdg_popup_v6_events[] = { - { "configure", "iiii", types + 0 }, - { "popup_done", "", types + 0 }, -}; - -WL_EXPORT const struct wl_interface zxdg_popup_v6_interface = { - "zxdg_popup_v6", 1, - 2, zxdg_popup_v6_requests, - 2, zxdg_popup_v6_events, -}; - diff --git a/chromium/third_party/wayland-protocols/src/COPYING b/chromium/third_party/wayland-protocols/src/COPYING deleted file mode 100644 index 8ab3291e385..00000000000 --- a/chromium/third_party/wayland-protocols/src/COPYING +++ /dev/null @@ -1,33 +0,0 @@ -Copyright © 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 diff --git a/chromium/third_party/wayland-protocols/src/Makefile.am b/chromium/third_party/wayland-protocols/src/Makefile.am deleted file mode 100644 index 4b9a90190e8..00000000000 --- a/chromium/third_party/wayland-protocols/src/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -unstable_protocols = \ - unstable/pointer-gestures/pointer-gestures-unstable-v1.xml \ - unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml \ - unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml \ - unstable/text-input/text-input-unstable-v1.xml \ - unstable/input-method/input-method-unstable-v1.xml \ - unstable/xdg-shell/xdg-shell-unstable-v5.xml \ - unstable/xdg-shell/xdg-shell-unstable-v6.xml \ - unstable/relative-pointer/relative-pointer-unstable-v1.xml \ - unstable/pointer-constraints/pointer-constraints-unstable-v1.xml \ - unstable/tablet/tablet-unstable-v1.xml \ - unstable/tablet/tablet-unstable-v2.xml \ - unstable/xdg-foreign/xdg-foreign-unstable-v1.xml \ - unstable/xdg-foreign/xdg-foreign-unstable-v2.xml \ - unstable/idle-inhibit/idle-inhibit-unstable-v1.xml \ - unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml \ - unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml \ - unstable/xdg-output/xdg-output-unstable-v1.xml \ - unstable/input-timestamps/input-timestamps-unstable-v1.xml \ - $(NULL) - -stable_protocols = \ - stable/presentation-time/presentation-time.xml \ - stable/viewporter/viewporter.xml \ - stable/xdg-shell/xdg-shell.xml \ - $(NULL) - -nobase_dist_pkgdata_DATA = \ - $(unstable_protocols) \ - $(stable_protocols) \ - $(NULL) - -dist_noinst_DATA = \ - $(sort $(foreach p,$(unstable_protocols),$(dir $p)README)) \ - $(sort $(foreach p,$(stable_protocols),$(dir $p)README)) \ - $(NULL) - -noarch_pkgconfig_DATA = wayland-protocols.pc - -dist_check_SCRIPTS = tests/scan.sh - -TESTS = $(unstable_protocols) $(stable_protocols) -TEST_EXTENSIONS = .xml -AM_TESTS_ENVIRONMENT = SCANNER='$(wayland_scanner)'; export SCANNER; -XML_LOG_COMPILER = $(srcdir)/tests/scan.sh diff --git a/chromium/third_party/wayland-protocols/src/README b/chromium/third_party/wayland-protocols/src/README deleted file mode 100644 index da1f1d5b37a..00000000000 --- a/chromium/third_party/wayland-protocols/src/README +++ /dev/null @@ -1,141 +0,0 @@ -Wayland protocols ------------------ - -wayland-protocols contains Wayland protocols that add functionality not -available in the Wayland core protocol. Such protocols either add -completely new functionality, or extend the functionality of some other -protocol either in Wayland core, or some other protocol in -wayland-protocols. - -A protocol in wayland-protocols consists of a directory containing a set -of XML files containing the protocol specification, and a README file -containing detailed state and a list of maintainers. - -Protocol directory tree structure -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Protocols may be 'stable', 'unstable' or 'deprecated', and the interface -and protocol names as well as place in the directory tree will reflect -this. - -A stable protocol is a protocol which has been declared stable by -the maintainers. Changes to such protocols will always be backward -compatible. - -An unstable protocol is a protocol currently under development and this -will be reflected in the protocol and interface names. See <<Unstable -naming convention>>. - -A deprecated protocol is a protocol that has either been replaced by some -other protocol, or declared undesirable for some other reason. No more -changes will be made to a deprecated protocol. - -Depending on which of the above states the protocol is in, the protocol -is placed within the toplevel directory containing the protocols with the -same state. Stable protocols are placed in the +stable/+ directory, -unstable protocols are placed in the +unstable/+ directory, and -deprecated protocols are placed in the +deprecated/+ directory. - -Protocol development procedure -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -To propose a new protocol, create a patch adding the relevant files and -Makefile.am entry to the wayland-protocols git repository with the -explanation and motivation in the commit message. Then send the patch to -the wayland-devel@lists.freedesktop.org mailing list using -'git send-email' with the subject prefix 'RFC wayland-protocols' or -'PATCH wayland-protocols' depending on what state the protocol is in. - -To propose changes to existing protocols, create a patch with the -changes and send it to the list mentioned above while also CC:ing the -maintainers mentioned in the README file. Use the same rule for adding a -subject prefix as above and method for sending the patch. - -If the changes are backward incompatible changes to an unstable protocol, -see <<Unstable protocol changes>>. - -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 operating system specific protocols, the interfaces should be -prefixed with both +wp_+ and the operating system, for example -+wp_linux_+, or +wp_freebsd_+, etc. - -Unstable naming convention -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Unstable protocols have a special naming convention in order to make it -possible to make discoverable backward incompatible changes. - -An unstable protocol has at least two versions: the major version, which -represents backward incompatible changes, and the minor version, which -represents backward compatible changes to the interfaces in the protocol. - -The major version is part of the XML file name, the protocol name in the -XML, and interface names in the protocol. - -Minor versions are the version attributes of the interfaces in the XML. -There may be more than one minor version per protocol, if there are more -than one global. - -The XML file and protocol name also has the word 'unstable' in them, and -all of the interfaces in the protocol are prefixed with +z+ and -suffixed with the major version number. - -For example, an unstable protocol called foo-bar with major version 2 -containing the two interfaces wp_foo and wp_bar both minor version 1 will -be placed in the directory +unstable/foo-bar/+ consisting of one file -called +README+ and one called +foo-bar-unstable-v2.xml+. The XML file -will consist of two interfaces called +zwp_foo_v2+ and +zwp_bar_v2+ with -the +version+ attribute set to +1+. - -Unstable protocol changes -~~~~~~~~~~~~~~~~~~~~~~~~~ -During the development of a new protocol it is possible that backward -incompatible changes are needed. Such a change needs to be represented -in the major and minor versions of the protocol. - -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 minor version number (interface version attribute) of all - the interfaces to +1+. - -Backward compatible changes within a major unstable version can be done -in the regular way as done in core Wayland or in stable protocols. - -Declaring a protocol stable -~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Once it is decided that a protocol should be declared stable, meaning no -more backward incompatible changes will ever be allowed, one last -breakage is needed. - -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 +unstable/+ directory. - . Copy the final version of the XML that is the version that was - decided to be declared stable into the new directory. The target name - should be the same name as the protocol directory but with the +.xml+ - suffix. - . Rename the name of the protocol in the XML by removing the - 'unstable' part and the major version number. - . Remove the +z+ prefix and the major version number suffix from all - of the interfaces in the protocol. - . Reset all of the interface version attributes to +1+. - . Update the +README+ file in the unstable directory and create a new - +README+ file in the new directory. - -Releases -~~~~~~~~ -Each release of wayland-protocols finalizes the version of the protocols -to their state they had at that time. diff --git a/chromium/third_party/wayland-protocols/src/autogen.sh b/chromium/third_party/wayland-protocols/src/autogen.sh deleted file mode 100755 index b08bc831f64..00000000000 --- a/chromium/third_party/wayland-protocols/src/autogen.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -test -n "$srcdir" || srcdir=`dirname "$0"` -test -n "$srcdir" || srcdir=. -( - cd "$srcdir" && - autoreconf --force -v --install -) || exit -test -n "$NOCONFIGURE" || "$srcdir/configure" "$@" diff --git a/chromium/third_party/wayland-protocols/src/configure.ac b/chromium/third_party/wayland-protocols/src/configure.ac deleted file mode 100644 index 7e1638357e9..00000000000 --- a/chromium/third_party/wayland-protocols/src/configure.ac +++ /dev/null @@ -1,45 +0,0 @@ -AC_PREREQ([2.64]) - -m4_define([wayland_protocols_major_version], [1]) -m4_define([wayland_protocols_minor_version], [12]) -m4_define([wayland_protocols_version], - [wayland_protocols_major_version.wayland_protocols_minor_version]) - -AC_INIT([wayland-protocols], - [wayland_protocols_version], - [https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=unspecified], - [wayland-protocols], - [http://wayland.freedesktop.org/]) - -AC_CONFIG_MACRO_DIR([m4]) - -AC_SUBST([WAYLAND_PROTOCOLS_VERSION], [wayland_protocols_version]) - -AC_ARG_VAR([wayland_scanner], [The wayland-scanner executable]) -AC_PATH_PROG([wayland_scanner], [wayland-scanner]) -if test x$wayland_scanner = x; then - if test "x$cross_compiling" != "xyes"; then - PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner]) - wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner` - else - AC_MSG_WARN([You are cross compiling without wayland-scanner in your path. make check will fail.]) - fi -fi - -AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz tar-ustar]) - -AM_SILENT_RULES([yes]) - -PKG_NOARCH_INSTALLDIR - -AC_CONFIG_FILES([ - Makefile - wayland-protocols.pc - wayland-protocols-uninstalled.pc - ]) -AC_OUTPUT - -AC_MSG_RESULT([ - Version ${WAYLAND_PROTOCOLS_VERSION} - Prefix ${prefix} - ]) diff --git a/chromium/third_party/wayland-protocols/src/m4/compat.m4 b/chromium/third_party/wayland-protocols/src/m4/compat.m4 deleted file mode 100644 index 290ef035f14..00000000000 --- a/chromium/third_party/wayland-protocols/src/m4/compat.m4 +++ /dev/null @@ -1,12 +0,0 @@ -dnl noarch_pkgconfigdir only available in pkg-config 0.27 and newer -dnl http://lists.freedesktop.org/archives/pkg-config/2012-July/000875.html -dnl Ubuntu 14.04 provides only pkg-config 0.26 so lacks this function. -dnl -dnl The Wayland project maintains automated builds for Ubuntu 14.04 in -dnl a Launchpad PPA. 14.04 is a Long Term Support distro release, which -dnl will reach EOL April 2019, however the Wayland PPA may stop targeting -dnl it some time after the next LTS release (April 2016). -m4_ifndef([PKG_NOARCH_INSTALLDIR], [AC_DEFUN([PKG_NOARCH_INSTALLDIR], [ - noarch_pkgconfigdir='${datadir}'/pkgconfig - AC_SUBST([noarch_pkgconfigdir]) -])]) diff --git a/chromium/third_party/wayland-protocols/src/stable/presentation-time/README b/chromium/third_party/wayland-protocols/src/stable/presentation-time/README deleted file mode 100644 index c7781ea802f..00000000000 --- a/chromium/third_party/wayland-protocols/src/stable/presentation-time/README +++ /dev/null @@ -1,5 +0,0 @@ -Presentation time protocol - -Maintainers: -Pekka Paalanen <pekka.paalanen@collabora.co.uk> - diff --git a/chromium/third_party/wayland-protocols/src/stable/presentation-time/presentation-time.xml b/chromium/third_party/wayland-protocols/src/stable/presentation-time/presentation-time.xml deleted file mode 100644 index a46994c8d2c..00000000000 --- a/chromium/third_party/wayland-protocols/src/stable/presentation-time/presentation-time.xml +++ /dev/null @@ -1,266 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="presentation_time"> -<!-- wrap:70 --> - - <copyright> - 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. - </copyright> - - <interface name="wp_presentation" version="1"> - <description summary="timed presentation related wl_surface requests"> - -<!-- Introduction --> - - 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. - -<!-- Completing presentation --> - - 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. - </description> - - <enum name="error"> - <description summary="fatal presentation errors"> - These fatal protocol errors may be emitted in response to - illegal presentation requests. - </description> - <entry name="invalid_timestamp" value="0" - summary="invalid value in tv_nsec"/> - <entry name="invalid_flag" value="1" - summary="invalid flag"/> - </enum> - - <request name="destroy" type="destructor"> - <description summary="unbind from the presentation interface"> - Informs the server that the client will no longer be using - this protocol object. Existing objects created by this object - are not affected. - </description> - </request> - - <request name="feedback"> - <description summary="request presentation feedback information"> - 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. - </description> - <arg name="surface" type="object" interface="wl_surface" - summary="target surface"/> - <arg name="callback" type="new_id" interface="wp_presentation_feedback" - summary="new feedback object"/> - </request> - - <event name="clock_id"> - <description summary="clock ID for timestamps"> - This event tells the client in which clock domain the - compositor interprets the timestamps used by the presentation - extension. This clock is called the presentation clock. - - The compositor sends this event when the client binds to the - presentation interface. The presentation clock does not change - during the lifetime of the client connection. - - The clock identifier is platform dependent. On Linux/glibc, - the identifier value is one of the clockid_t values accepted - by clock_gettime(). clock_gettime() is defined by - POSIX.1-2001. - - Timestamps in this clock domain are expressed as tv_sec_hi, - tv_sec_lo, tv_nsec triples, each component being an unsigned - 32-bit value. Whole seconds are in tv_sec which is a 64-bit - value combined from tv_sec_hi and tv_sec_lo, and the - additional fractional part in tv_nsec as nanoseconds. Hence, - for valid timestamps tv_nsec must be in [0, 999999999]. - - Note that clock_id applies only to the presentation clock, - and implies nothing about e.g. the timestamps used in the - Wayland core protocol input events. - - Compositors should prefer a clock which does not jump and is - not slewed e.g. by NTP. The absolute value of the clock is - irrelevant. Precision of one millisecond or better is - recommended. Clients must be able to query the current clock - value directly, not by asking the compositor. - </description> - <arg name="clk_id" type="uint" summary="platform clock identifier"/> - </event> - - </interface> - - <interface name="wp_presentation_feedback" version="1"> - <description summary="presentation time feedback event"> - 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. - </description> - - <event name="sync_output"> - <description summary="presentation synchronized to this output"> - 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. - </description> - <arg name="output" type="object" interface="wl_output" - summary="presentation output"/> - </event> - - <enum name="kind"> - <description summary="bitmask of flags in presented event"> - These flags provide information about how the presentation of - the related content update was done. The intent is to help - clients assess the reliability of the feedback and the visual - quality with respect to possible tearing and timings. The - flags are: - - VSYNC: - The presentation was synchronized to the "vertical retrace" by - the display hardware such that tearing does not happen. - Relying on user space scheduling is not acceptable for this - flag. If presentation is done by a copy to the active - frontbuffer, then it must guarantee that tearing cannot - happen. - - HW_CLOCK: - The display hardware provided measurements that the hardware - driver converted into a presentation timestamp. Sampling a - clock in user space is not acceptable for this flag. - - HW_COMPLETION: - The display hardware signalled that it started using the new - image content. The opposite of this is e.g. a timer being used - to guess when the display hardware has switched to the new - image content. - - ZERO_COPY: - The presentation of this update was done zero-copy. This means - the buffer from the client was given to display hardware as - is, without copying it. Compositing with OpenGL counts as - copying, even if textured directly from the client buffer. - Possible zero-copy cases include direct scanout of a - fullscreen surface and a surface on a hardware overlay. - </description> - <entry name="vsync" value="0x1" summary="presentation was vsync'd"/> - <entry name="hw_clock" value="0x2" - summary="hardware provided the presentation timestamp"/> - <entry name="hw_completion" value="0x4" - summary="hardware signalled the start of the presentation"/> - <entry name="zero_copy" value="0x8" - summary="presentation was done zero-copy"/> - </enum> - - <event name="presented"> - <description summary="the content update was displayed"> - The associated content update was displayed to the user at the - indicated time (tv_sec_hi/lo, tv_nsec). For the interpretation of - the timestamp, see presentation.clock_id event. - - The timestamp corresponds to the time when the content update - turned into light the first time on the surface's main output. - Compositors may approximate this from the framebuffer flip - completion events from the system, and the latency of the - physical display path if known. - - This event is preceded by all related sync_output events - telling which output's refresh cycle the feedback corresponds - to, i.e. the main output for the surface. Compositors are - recommended to choose the output containing the largest part - of the wl_surface, or keeping the output they previously - chose. Having a stable presentation output association helps - clients predict future output refreshes (vblank). - - The 'refresh' argument gives the compositor's prediction of how - many nanoseconds after tv_sec, tv_nsec the very next output - refresh may occur. This is to further aid clients in - predicting future refreshes, i.e., estimating the timestamps - targeting the next few vblanks. If such prediction cannot - usefully be done, the argument is zero. - - If the output does not have a constant refresh rate, explicit - video mode switches excluded, then the refresh argument must - be zero. - - The 64-bit value combined from seq_hi and seq_lo is the value - of the output's vertical retrace counter when the content - update was first scanned out to the display. This value must - be compatible with the definition of MSC in - GLX_OML_sync_control specification. Note, that if the display - path has a non-zero latency, the time instant specified by - this counter may differ from the timestamp's. - - If the output does not have a concept of vertical retrace or a - refresh cycle, or the output device is self-refreshing without - a way to query the refresh count, then the arguments seq_hi - and seq_lo must be zero. - </description> - <arg name="tv_sec_hi" type="uint" - summary="high 32 bits of the seconds part of the presentation timestamp"/> - <arg name="tv_sec_lo" type="uint" - summary="low 32 bits of the seconds part of the presentation timestamp"/> - <arg name="tv_nsec" type="uint" - summary="nanoseconds part of the presentation timestamp"/> - <arg name="refresh" type="uint" summary="nanoseconds till next refresh"/> - <arg name="seq_hi" type="uint" - summary="high 32 bits of refresh counter"/> - <arg name="seq_lo" type="uint" - summary="low 32 bits of refresh counter"/> - <arg name="flags" type="uint" summary="combination of 'kind' values"/> - </event> - - <event name="discarded"> - <description summary="the content update was not displayed"> - The content update was never displayed to the user. - </description> - </event> - </interface> - -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/stable/viewporter/README b/chromium/third_party/wayland-protocols/src/stable/viewporter/README deleted file mode 100644 index e09057b16cb..00000000000 --- a/chromium/third_party/wayland-protocols/src/stable/viewporter/README +++ /dev/null @@ -1,7 +0,0 @@ -Viewporter: cropping and scaling extension for surface contents - -Previously known as wl_scaler. - -Maintainers: -Pekka Paalanen <pekka.paalanen@collabora.co.uk> - diff --git a/chromium/third_party/wayland-protocols/src/stable/viewporter/viewporter.xml b/chromium/third_party/wayland-protocols/src/stable/viewporter/viewporter.xml deleted file mode 100644 index c732d8c35bc..00000000000 --- a/chromium/third_party/wayland-protocols/src/stable/viewporter/viewporter.xml +++ /dev/null @@ -1,186 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="viewporter"> - - <copyright> - 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. - </copyright> - - <interface name="wp_viewporter" version="1"> - <description summary="surface cropping and scaling"> - 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="unbind from the cropping and scaling interface"> - 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. - </description> - </request> - - <enum name="error"> - <entry name="viewport_exists" value="0" - summary="the surface already has a viewport object associated"/> - </enum> - - <request name="get_viewport"> - <description summary="extend surface interface for crop and scale"> - 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. - </description> - <arg name="id" type="new_id" interface="wp_viewport" - summary="the new viewport interface id"/> - <arg name="surface" type="object" interface="wl_surface" - summary="the surface"/> - </request> - </interface> - - <interface name="wp_viewport" version="1"> - <description summary="crop and scale interface to a wl_surface"> - An additional interface to a wl_surface object, which allows the - client to specify the cropping and scaling of the surface - contents. - - This interface works with two concepts: the source rectangle (src_x, - src_y, src_width, src_height), and the destination size (dst_width, - dst_height). The contents of the source rectangle are scaled to the - destination size, and content outside the source rectangle is ignored. - This state is double-buffered, and is applied on the next - wl_surface.commit. - - The two parts of crop and scale state are independent: the source - rectangle, and the destination size. Initially both are unset, that - is, no scaling is applied. The whole of the current wl_buffer is - used as the source, and the surface size is as defined in - wl_surface.attach. - - If the destination size is set, it causes the surface size to become - dst_width, dst_height. The source (rectangle) is scaled to exactly - this size. This overrides whatever the attached wl_buffer size is, - unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface - has no content and therefore no size. Otherwise, the size is always - at least 1x1 in surface local coordinates. - - If the source rectangle is set, it defines what area of the wl_buffer is - taken as the source. If the source rectangle is set and the destination - size is not set, then src_width and src_height must be integers, and the - surface size becomes the source rectangle size. This results in cropping - without scaling. If src_width or src_height are not integers and - destination size is not set, the bad_size protocol error is raised when - the surface state is applied. - - The coordinate transformations from buffer pixel coordinates up to - the surface-local coordinates happen in the following order: - 1. buffer_transform (wl_surface.set_buffer_transform) - 2. buffer_scale (wl_surface.set_buffer_scale) - 3. crop and scale (wp_viewport.set*) - This means, that the source rectangle coordinates of crop and scale - are given in the coordinates after the buffer transform and scale, - i.e. in the coordinates that would be the surface-local coordinates - if the crop and scale was not applied. - - If src_x or src_y are negative, the bad_value protocol error is raised. - Otherwise, if the source rectangle is partially or completely outside of - the non-NULL wl_buffer, then the out_of_buffer protocol error is raised - when the surface state is applied. A NULL wl_buffer does not raise the - out_of_buffer error. - - The x, y arguments of wl_surface.attach are applied as normal to - the surface. They indicate how many pixels to remove from the - surface size from the left and the top. In other words, they are - still in the surface-local coordinate system, just like dst_width - and dst_height are. - - If the wl_surface associated with the wp_viewport is destroyed, - all wp_viewport requests except 'destroy' raise the protocol error - no_surface. - - If the wp_viewport object is destroyed, the crop and scale - state is removed from the wl_surface. The change will be applied - on the next wl_surface.commit. - </description> - - <request name="destroy" type="destructor"> - <description summary="remove scaling and cropping from the surface"> - The associated wl_surface's crop and scale state is removed. - The change is applied on the next wl_surface.commit. - </description> - </request> - - <enum name="error"> - <entry name="bad_value" value="0" - summary="negative or zero values in width or height"/> - <entry name="bad_size" value="1" - summary="destination size is not integer"/> - <entry name="out_of_buffer" value="2" - summary="source rectangle extends outside of the content area"/> - <entry name="no_surface" value="3" - summary="the wl_surface was destroyed"/> - </enum> - - <request name="set_source"> - <description summary="set the source rectangle for cropping"> - Set the source rectangle of the associated wl_surface. See - wp_viewport for the description, and relation to the wl_buffer - size. - - If all of x, y, width and height are -1.0, the source rectangle is - unset instead. Any other set of values where width or height are zero - or negative, or x or y are negative, raise the bad_value protocol - error. - - The crop and scale state is double-buffered state, and will be - applied on the next wl_surface.commit. - </description> - <arg name="x" type="fixed" summary="source rectangle x"/> - <arg name="y" type="fixed" summary="source rectangle y"/> - <arg name="width" type="fixed" summary="source rectangle width"/> - <arg name="height" type="fixed" summary="source rectangle height"/> - </request> - - <request name="set_destination"> - <description summary="set the surface size for scaling"> - Set the destination size of the associated wl_surface. See - wp_viewport for the description, and relation to the wl_buffer - size. - - If width is -1 and height is -1, the destination size is unset - instead. Any other pair of values for width and height that - contains zero or negative values raises the bad_value protocol - error. - - The crop and scale state is double-buffered state, and will be - applied on the next wl_surface.commit. - </description> - <arg name="width" type="int" summary="surface width"/> - <arg name="height" type="int" summary="surface height"/> - </request> - </interface> - -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/stable/xdg-shell/README b/chromium/third_party/wayland-protocols/src/stable/xdg-shell/README deleted file mode 100644 index 2769abbd845..00000000000 --- a/chromium/third_party/wayland-protocols/src/stable/xdg-shell/README +++ /dev/null @@ -1,5 +0,0 @@ -xdg shell protocol - -Maintainers: -Jonas Ådahl <jadahl@gmail.com> -Mike Blumenkrantz <zmike@osg.samsung.com> diff --git a/chromium/third_party/wayland-protocols/src/stable/xdg-shell/xdg-shell.xml b/chromium/third_party/wayland-protocols/src/stable/xdg-shell/xdg-shell.xml deleted file mode 100644 index dc70c7ab8be..00000000000 --- a/chromium/third_party/wayland-protocols/src/stable/xdg-shell/xdg-shell.xml +++ /dev/null @@ -1,1120 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="xdg_shell"> - - <copyright> - 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. - </copyright> - - <interface name="xdg_wm_base" version="1"> - <description summary="create desktop-style surfaces"> - 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. - </description> - - <enum name="error"> - <entry name="role" value="0" summary="given wl_surface has another role"/> - <entry name="defunct_surfaces" value="1" - summary="xdg_wm_base was destroyed before children"/> - <entry name="not_the_topmost_popup" value="2" - summary="the client tried to map or destroy a non-topmost popup"/> - <entry name="invalid_popup_parent" value="3" - summary="the client specified an invalid popup parent surface"/> - <entry name="invalid_surface_state" value="4" - summary="the client provided an invalid surface state"/> - <entry name="invalid_positioner" value="5" - summary="the client provided an invalid positioner"/> - </enum> - - <request name="destroy" type="destructor"> - <description summary="destroy xdg_wm_base"> - Destroy this xdg_wm_base object. - - Destroying a bound xdg_wm_base object while there are surfaces - still alive created by this xdg_wm_base object instance is illegal - and will result in a protocol error. - </description> - </request> - - <request name="create_positioner"> - <description summary="create a positioner object"> - 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. - </description> - <arg name="id" type="new_id" interface="xdg_positioner"/> - </request> - - <request name="get_xdg_surface"> - <description summary="create a shell surface from a surface"> - 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. - </description> - <arg name="id" type="new_id" interface="xdg_surface"/> - <arg name="surface" type="object" interface="wl_surface"/> - </request> - - <request name="pong"> - <description summary="respond to a ping event"> - A client must respond to a ping event with a pong request or - the client may be deemed unresponsive. See xdg_wm_base.ping. - </description> - <arg name="serial" type="uint" summary="serial of the ping event"/> - </request> - - <event name="ping"> - <description summary="check if the client is alive"> - 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.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_wm_base object it created. - </description> - <arg name="serial" type="uint" summary="pass this to the pong request"/> - </event> - </interface> - - <interface name="xdg_positioner" version="1"> - <description summary="child surface positioner"> - 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. - </description> - - <enum name="error"> - <entry name="invalid_input" value="0" summary="invalid input provided"/> - </enum> - - <request name="destroy" type="destructor"> - <description summary="destroy the xdg_positioner object"> - Notify the compositor that the xdg_positioner will no longer be used. - </description> - </request> - - <request name="set_size"> - <description summary="set the size of the to-be positioned rectangle"> - 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. - </description> - <arg name="width" type="int" summary="width of positioned rectangle"/> - <arg name="height" type="int" summary="height of positioned rectangle"/> - </request> - - <request name="set_anchor_rect"> - <description summary="set the anchor rectangle within the parent surface"> - 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. - </description> - <arg name="x" type="int" summary="x position of anchor rectangle"/> - <arg name="y" type="int" summary="y position of anchor rectangle"/> - <arg name="width" type="int" summary="width of anchor rectangle"/> - <arg name="height" type="int" summary="height of anchor rectangle"/> - </request> - - <enum name="anchor"> - <entry name="none" value="0"/> - <entry name="top" value="1"/> - <entry name="bottom" value="2"/> - <entry name="left" value="3"/> - <entry name="right" value="4"/> - <entry name="top_left" value="5"/> - <entry name="bottom_left" value="6"/> - <entry name="top_right" value="7"/> - <entry name="bottom_right" value="8"/> - </enum> - - <request name="set_anchor"> - <description summary="set anchor rectangle anchor"> - 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. - </description> - <arg name="anchor" type="uint" enum="anchor" - summary="anchor"/> - </request> - - <enum name="gravity"> - <entry name="none" value="0"/> - <entry name="top" value="1"/> - <entry name="bottom" value="2"/> - <entry name="left" value="3"/> - <entry name="right" value="4"/> - <entry name="top_left" value="5"/> - <entry name="bottom_left" value="6"/> - <entry name="top_right" value="7"/> - <entry name="bottom_right" value="8"/> - </enum> - - <request name="set_gravity"> - <description summary="set child surface gravity"> - 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. - </description> - <arg name="gravity" type="uint" enum="gravity" - summary="gravity direction"/> - </request> - - <enum name="constraint_adjustment" bitfield="true"> - <description summary="constraint adjustments"> - 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. - </description> - <entry name="none" value="0"> - <description summary="don't move the child surface when constrained"> - Don't alter the surface position even if it is constrained on some - axis, for example partially outside the edge of an output. - </description> - </entry> - <entry name="slide_x" value="1"> - <description summary="move along the x axis until unconstrained"> - 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. - </description> - </entry> - <entry name="slide_y" value="2"> - <description summary="move along the y axis until unconstrained"> - 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. - </description> - </entry> - <entry name="flip_x" value="4"> - <description summary="invert the anchor and gravity on the x axis"> - 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. - </description> - </entry> - <entry name="flip_y" value="8"> - <description summary="invert the anchor and gravity on the y axis"> - 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. - </description> - </entry> - <entry name="resize_x" value="16"> - <description summary="horizontally resize the surface"> - Resize the surface horizontally so that it is completely - unconstrained. - </description> - </entry> - <entry name="resize_y" value="32"> - <description summary="vertically resize the surface"> - Resize the surface vertically so that it is completely unconstrained. - </description> - </entry> - </enum> - - <request name="set_constraint_adjustment"> - <description summary="set the adjustment to be done when constrained"> - 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. - </description> - <arg name="constraint_adjustment" type="uint" - summary="bit mask of constraint adjustments"/> - </request> - - <request name="set_offset"> - <description summary="set surface position offset"> - 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. - </description> - <arg name="x" type="int" summary="surface position x offset"/> - <arg name="y" type="int" summary="surface position y offset"/> - </request> - </interface> - - <interface name="xdg_surface" version="1"> - <description summary="desktop user interface surface base interface"> - 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. - - 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. - </description> - - <enum name="error"> - <entry name="not_constructed" value="1"/> - <entry name="already_constructed" value="2"/> - <entry name="unconfigured_buffer" value="3"/> - </enum> - - <request name="destroy" type="destructor"> - <description summary="destroy the xdg_surface"> - Destroy the xdg_surface object. An xdg_surface must only be destroyed - after its role object has been destroyed. - </description> - </request> - - <request name="get_toplevel"> - <description summary="assign the xdg_toplevel surface role"> - 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. - </description> - <arg name="id" type="new_id" interface="xdg_toplevel"/> - </request> - - <request name="get_popup"> - <description summary="assign the xdg_popup surface role"> - 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. - </description> - <arg name="id" type="new_id" interface="xdg_popup"/> - <arg name="parent" type="object" interface="xdg_surface" allow-null="true"/> - <arg name="positioner" type="object" interface="xdg_positioner"/> - </request> - - <request name="set_window_geometry"> - <description summary="set the new window geometry"> - The window geometry of a surface is its "visible bounds" from the - user's perspective. Client-side decorations often have invisible - portions like drop-shadows which should be ignored for the - purposes of aligning, placing and constraining windows. - - The window geometry is double buffered, and will be applied at the - time wl_surface.commit of the corresponding wl_surface is called. - - When maintaining a position, the compositor should treat the (x, y) - coordinate of the window geometry as the top left corner of the window. - A client changing the (x, y) window geometry coordinate should in - general not alter the position of the window. - - Once the window geometry of the surface is set, it is not possible to - unset it, and it will remain the same until set_window_geometry is - called again, even if a new subsurface or buffer is attached. - - If never set, the value is the full bounds of the surface, - including any subsurfaces. This updates dynamically on every - commit. This unset is meant for extremely simple clients. - - The arguments are given in the surface-local coordinate space of - the wl_surface associated with this xdg_surface. - - The width and height must be greater than zero. Setting an invalid size - will raise an error. When applied, the effective window geometry will be - the set window geometry clamped to the bounding rectangle of the - combined geometry of the surface of the xdg_surface and the associated - subsurfaces. - </description> - <arg name="x" type="int"/> - <arg name="y" type="int"/> - <arg name="width" type="int"/> - <arg name="height" type="int"/> - </request> - - <request name="ack_configure"> - <description summary="ack a configure event"> - 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. - </description> - <arg name="serial" type="uint" summary="the serial from the configure event"/> - </request> - - <event name="configure"> - <description summary="suggest a surface change"> - 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. - </description> - <arg name="serial" type="uint" summary="serial of the configure event"/> - </event> - </interface> - - <interface name="xdg_toplevel" version="1"> - <description summary="toplevel surface"> - This interface defines an xdg_surface role which allows a surface to, - among other things, set window-like properties such as maximize, - fullscreen, and minimize, set application-specific metadata like title and - id, and well as trigger user interactive operations such as interactive - resize and move. - - Unmapping an xdg_toplevel means that the surface cannot be shown - by the compositor until it is explicitly mapped again. - All active operations (e.g., move, resize) are canceled and all - attributes (e.g. title, state, stacking, ...) are discarded for - an xdg_toplevel surface when it is unmapped. - - Attaching a null buffer to a toplevel unmaps the surface. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the xdg_toplevel"> - This request destroys the role surface and unmaps the surface; - see "Unmapping" behavior in interface section for details. - </description> - </request> - - <request name="set_parent"> - <description summary="set the parent of this surface"> - Set the "parent" of this surface. This surface should be stacked - this above the parent surface and all other ancestor surfaces. - - Parent windows should be set on dialogs, toolboxes, or other - "auxiliary" surfaces, so that the parent is raised when the dialog - is raised. - - Setting a null parent for a child window removes any parent-child - relationship for the child. Setting a null parent for a window which - currently has no parent is a no-op. - - If the parent is unmapped then its children are managed as - though the parent of the now-unmapped parent has become the - parent of this surface. If no parent exists for the now-unmapped - parent then the children are managed as though they have no - parent surface. - </description> - <arg name="parent" type="object" interface="xdg_toplevel" allow-null="true"/> - </request> - - <request name="set_title"> - <description summary="set surface title"> - 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. - </description> - <arg name="title" type="string"/> - </request> - - <request name="set_app_id"> - <description summary="set application ID"> - 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/ - </description> - <arg name="app_id" type="string"/> - </request> - - <request name="show_window_menu"> - <description summary="show the window menu"> - 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. - </description> - <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/> - <arg name="serial" type="uint" summary="the serial of the user event"/> - <arg name="x" type="int" summary="the x position to pop up the window menu at"/> - <arg name="y" type="int" summary="the y position to pop up the window menu at"/> - </request> - - <request name="move"> - <description summary="start an interactive move"> - 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. - </description> - <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/> - <arg name="serial" type="uint" summary="the serial of the user event"/> - </request> - - <enum name="resize_edge"> - <description summary="edge values for resizing"> - These values are used to indicate which edge of a surface - is being dragged in a resize operation. - </description> - <entry name="none" value="0"/> - <entry name="top" value="1"/> - <entry name="bottom" value="2"/> - <entry name="left" value="4"/> - <entry name="top_left" value="5"/> - <entry name="bottom_left" value="6"/> - <entry name="right" value="8"/> - <entry name="top_right" value="9"/> - <entry name="bottom_right" value="10"/> - </enum> - - <request name="resize"> - <description summary="start an interactive resize"> - 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. - </description> - <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/> - <arg name="serial" type="uint" summary="the serial of the user event"/> - <arg name="edges" type="uint" summary="which edge or corner is being dragged"/> - </request> - - <enum name="state"> - <description summary="types of state on the surface"> - The different state values used on the surface. This is designed for - state values like maximized, fullscreen. It is paired with the - configure event to ensure that both the client and the compositor - setting the state can be synchronized. - - States set in this way are double-buffered. They will get applied on - the next commit. - </description> - <entry name="maximized" value="1" summary="the surface is maximized"> - <description summary="the surface is maximized"> - The surface is maximized. The window geometry specified in the configure - event must be obeyed by the client. - </description> - </entry> - <entry name="fullscreen" value="2" summary="the surface is fullscreen"> - <description summary="the surface is fullscreen"> - 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. - </description> - </entry> - <entry name="resizing" value="3" summary="the surface is being resized"> - <description summary="the surface is being resized"> - 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. - </description> - </entry> - <entry name="activated" value="4" summary="the surface is now activated"> - <description summary="the surface is now activated"> - 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. - </description> - </entry> - </enum> - - <request name="set_max_size"> - <description summary="set the maximum size"> - Set a maximum size for the window. - - The client can specify a maximum size so that the compositor does - not try to configure the window beyond this size. - - The width and height arguments are in window geometry coordinates. - See xdg_surface.set_window_geometry. - - Values set in this way are double-buffered. They will get applied - on the next commit. - - The compositor can use this information to allow or disallow - different states like maximize or fullscreen and draw accurate - animations. - - Similarly, a tiling window manager may use this information to - place and resize client windows in a more effective way. - - The client should not rely on the compositor to obey the maximum - size. The compositor may decide to ignore the values set by the - client and request a larger size. - - If never set, or a value of zero in the request, means that the - client has no expected maximum size in the given dimension. - As a result, a client wishing to reset the maximum size - to an unspecified state can use zero for width and height in the - request. - - Requesting a maximum size to be smaller than the minimum size of - a surface is illegal and will result in a protocol error. - - The width and height must be greater than or equal to zero. Using - strictly negative values for width and height will result in a - protocol error. - </description> - <arg name="width" type="int"/> - <arg name="height" type="int"/> - </request> - - <request name="set_min_size"> - <description summary="set the minimum size"> - Set a minimum size for the window. - - The client can specify a minimum size so that the compositor does - not try to configure the window below this size. - - The width and height arguments are in window geometry coordinates. - See xdg_surface.set_window_geometry. - - Values set in this way are double-buffered. They will get applied - on the next commit. - - The compositor can use this information to allow or disallow - different states like maximize or fullscreen and draw accurate - animations. - - Similarly, a tiling window manager may use this information to - place and resize client windows in a more effective way. - - The client should not rely on the compositor to obey the minimum - size. The compositor may decide to ignore the values set by the - client and request a smaller size. - - If never set, or a value of zero in the request, means that the - client has no expected minimum size in the given dimension. - As a result, a client wishing to reset the minimum size - to an unspecified state can use zero for width and height in the - request. - - Requesting a minimum size to be larger than the maximum size of - a surface is illegal and will result in a protocol error. - - The width and height must be greater than or equal to zero. Using - strictly negative values for width and height will result in a - protocol error. - </description> - <arg name="width" type="int"/> - <arg name="height" type="int"/> - </request> - - <request name="set_maximized"> - <description summary="maximize the window"> - 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. - - If the surface is in a fullscreen state, this request has no direct - effect. It will alter the state the surface is returned to when - unmaximized if not overridden by the compositor. - </description> - </request> - - <request name="unset_maximized"> - <description summary="unmaximize the window"> - 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 - event. 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. - - If the surface is in a fullscreen state, this request has no direct - effect. It will alter the state the surface is returned to when - unmaximized if not overridden by the compositor. - </description> - </request> - - <request name="set_fullscreen"> - <description summary="set the window as fullscreen on an output"> - Make the surface fullscreen. - - After requesting that the surface should be fullscreened, the - compositor will respond by emitting a configure event with the - "fullscreen" state and the fullscreen window geometry. 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. - </description> - <arg name="output" type="object" interface="wl_output" allow-null="true"/> - </request> - - <request name="unset_fullscreen"> - <description summary="unset the window as fullscreen"> - Make the surface no longer fullscreen. - - After requesting that the surface should be unfullscreened, the - compositor will respond by emitting a configure event without the - "fullscreen" state. - - 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). - </description> - </request> - - <request name="set_minimized"> - <description summary="set the window as minimized"> - 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. - </description> - </request> - - <event name="configure"> - <description summary="suggest a surface change"> - 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. - </description> - <arg name="width" type="int"/> - <arg name="height" type="int"/> - <arg name="states" type="array"/> - </event> - - <event name="close"> - <description summary="surface wants to be closed"> - 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. - </description> - </event> - </interface> - - <interface name="xdg_popup" version="1"> - <description summary="short-lived, popup surfaces for menus"> - 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. - </description> - - <enum name="error"> - <entry name="invalid_grab" value="0" - summary="tried to grab after being mapped"/> - </enum> - - <request name="destroy" type="destructor"> - <description summary="remove xdg_popup interface"> - 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. - </description> - </request> - - <request name="grab"> - <description summary="make the popup take an explicit grab"> - 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. - </description> - <arg name="seat" type="object" interface="wl_seat" - summary="the wl_seat of the user event"/> - <arg name="serial" type="uint" summary="the serial of the user event"/> - </request> - - <event name="configure"> - <description summary="configure the popup surface"> - 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. - </description> - <arg name="x" type="int" - summary="x position relative to parent surface window geometry"/> - <arg name="y" type="int" - summary="y position relative to parent surface window geometry"/> - <arg name="width" type="int" summary="window geometry width"/> - <arg name="height" type="int" summary="window geometry height"/> - </event> - - <event name="popup_done"> - <description summary="popup interaction is done"> - 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. - </description> - </event> - - </interface> -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/unstable/fullscreen-shell/README b/chromium/third_party/wayland-protocols/src/unstable/fullscreen-shell/README deleted file mode 100644 index 5ad740f5e79..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/fullscreen-shell/README +++ /dev/null @@ -1,4 +0,0 @@ -Fullscreen shell protocol - -Maintainers: -Jason Ekstrand <jason@jlekstrand.net> diff --git a/chromium/third_party/wayland-protocols/src/unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml b/chromium/third_party/wayland-protocols/src/unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml deleted file mode 100644 index 7d141ee3cbe..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml +++ /dev/null @@ -1,220 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="fullscreen_shell_unstable_v1"> - - <interface name="zwp_fullscreen_shell_v1" version="1"> - <description summary="displays a single surface per output"> - 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. - </description> - - <request name="release" type="destructor"> - <description summary="release the wl_fullscreen_shell interface"> - 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. - </description> - </request> - - <enum name="capability"> - <description summary="capabilities advertised by the compositor"> - 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). - </description> - <entry name="arbitrary_modes" value="1" summary="compositor is capable of almost any output mode"/> - <entry name="cursor_plane" value="2" summary="compositor has a separate cursor plane"/> - </enum> - - <event name="capability"> - <description summary="advertises a capability of the compositor"> - 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. - </description> - <arg name="capability" type="uint"/> - </event> - - <enum name="present_method"> - <description summary="different method to set the surface fullscreen"> - 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. - </description> - <entry name="default" value="0" summary="no preference, apply default policy"/> - <entry name="center" value="1" summary="center the surface on the output"/> - <entry name="zoom" value="2" summary="scale the surface, preserving aspect ratio, to the largest size that will fit on the output" /> - <entry name="zoom_crop" value="3" summary="scale the surface, preserving aspect ratio, to fully fill the output cropping if needed" /> - <entry name="stretch" value="4" summary="scale the surface to the size of the output ignoring aspect ratio" /> - </enum> - - <request name="present_surface"> - <description summary="present surface for display"> - 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. - </description> - <arg name="surface" type="object" interface="wl_surface" allow-null="true"/> - <arg name="method" type="uint"/> - <arg name="output" type="object" interface="wl_output" allow-null="true"/> - </request> - - <request name="present_surface_for_mode"> - <description summary="present surface for display at a particular mode"> - 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. - </description> - <arg name="surface" type="object" interface="wl_surface"/> - <arg name="output" type="object" interface="wl_output"/> - <arg name="framerate" type="int"/> - <arg name="feedback" type="new_id" interface="zwp_fullscreen_shell_mode_feedback_v1"/> - </request> - - <enum name="error"> - <description summary="wl_fullscreen_shell error values"> - These errors can be emitted in response to wl_fullscreen_shell requests. - </description> - <entry name="invalid_method" value="0" summary="present_method is not known"/> - </enum> - </interface> - - <interface name="zwp_fullscreen_shell_mode_feedback_v1" version="1"> - <event name="mode_successful"> - <description summary="mode switch succeeded"> - 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. - </description> - </event> - - <event name="mode_failed"> - <description summary="mode switch failed"> - 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. - </description> - </event> - - <event name="present_cancelled"> - <description summary="mode switch cancelled"> - 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. - </description> - </event> - </interface> - -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/unstable/idle-inhibit/README b/chromium/third_party/wayland-protocols/src/unstable/idle-inhibit/README deleted file mode 100644 index 396e8716269..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/idle-inhibit/README +++ /dev/null @@ -1,4 +0,0 @@ -Screensaver inhibition protocol - -Maintainers: -Bryce Harrington <bryce@osg.samsung.com> diff --git a/chromium/third_party/wayland-protocols/src/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml b/chromium/third_party/wayland-protocols/src/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml deleted file mode 100644 index 9c06cdcba6c..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="idle_inhibit_unstable_v1"> - - <copyright> - 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. - </copyright> - - <interface name="zwp_idle_inhibit_manager_v1" version="1"> - <description summary="control behavior when display idles"> - 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the idle inhibitor object"> - Destroy the inhibit manager. - </description> - </request> - - <request name="create_inhibitor"> - <description summary="create a new inhibitor object"> - Create a new inhibitor object associated with the given surface. - </description> - <arg name="id" type="new_id" interface="zwp_idle_inhibitor_v1"/> - <arg name="surface" type="object" interface="wl_surface" - summary="the surface that inhibits the idle behavior"/> - </request> - - </interface> - - <interface name="zwp_idle_inhibitor_v1" version="1"> - <description summary="context object for inhibiting idle behavior"> - 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the idle inhibitor object"> - Remove the inhibitor effect from the associated wl_surface. - </description> - </request> - - </interface> -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/unstable/input-method/README b/chromium/third_party/wayland-protocols/src/unstable/input-method/README deleted file mode 100644 index c95ba72789b..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/input-method/README +++ /dev/null @@ -1,4 +0,0 @@ -Input method protocol - -Maintainers: -Jan Arne Petersen <janarne@gmail.com> diff --git a/chromium/third_party/wayland-protocols/src/unstable/input-method/input-method-unstable-v1.xml b/chromium/third_party/wayland-protocols/src/unstable/input-method/input-method-unstable-v1.xml deleted file mode 100644 index e9d93ba609e..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/input-method/input-method-unstable-v1.xml +++ /dev/null @@ -1,305 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="input_method_unstable_v1"> - - <copyright> - 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. - </copyright> - - <interface name="zwp_input_method_context_v1" version="1"> - <description summary="input method context"> - 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. - </description> - - <request name="destroy" type="destructor"/> - - <request name="commit_string"> - <description summary="commit string"> - 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. - </description> - <arg name="serial" type="uint" summary="serial of the latest known text input state"/> - <arg name="text" type="string"/> - </request> - - <request name="preedit_string"> - <description summary="pre-edit string"> - 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. - </description> - <arg name="serial" type="uint" summary="serial of the latest known text input state"/> - <arg name="text" type="string"/> - <arg name="commit" type="string"/> - </request> - - <request name="preedit_styling"> - <description summary="pre-edit styling"> - 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. - </description> - <arg name="index" type="uint"/> - <arg name="length" type="uint"/> - <arg name="style" type="uint"/> - </request> - - <request name="preedit_cursor"> - <description summary="pre-edit cursor"> - 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. - </description> - <arg name="index" type="int"/> - </request> - - <request name="delete_surrounding_text"> - <description summary="delete text"> - Remove the surrounding text. - - This request will be handled on the text_input side directly following - a commit_string request. - </description> - <arg name="index" type="int"/> - <arg name="length" type="uint"/> - </request> - - <request name="cursor_position"> - <description summary="set cursor to a new position"> - 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. - </description> - <arg name="index" type="int"/> - <arg name="anchor" type="int"/> - </request> - - <request name="modifiers_map"> - <arg name="map" type="array"/> - </request> - - <request name="keysym"> - <description summary="keysym"> - 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. - </description> - <arg name="serial" type="uint" summary="serial of the latest known text input state"/> - <arg name="time" type="uint"/> - <arg name="sym" type="uint"/> - <arg name="state" type="uint"/> - <arg name="modifiers" type="uint"/> - </request> - - <request name="grab_keyboard"> - <description summary="grab hardware keyboard"> - 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. - </description> - <arg name="keyboard" type="new_id" interface="wl_keyboard"/> - </request> - - <request name="key"> - <description summary="forward key event"> - 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. - </description> - <arg name="serial" type="uint" summary="serial from wl_keyboard::key"/> - <arg name="time" type="uint" summary="time from wl_keyboard::key"/> - <arg name="key" type="uint" summary="key from wl_keyboard::key"/> - <arg name="state" type="uint" summary="state from wl_keyboard::key"/> - </request> - - <request name="modifiers"> - <description summary="forward modifiers event"> - 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. - </description> - <arg name="serial" type="uint" summary="serial from wl_keyboard::modifiers"/> - <arg name="mods_depressed" type="uint" summary="mods_depressed from wl_keyboard::modifiers"/> - <arg name="mods_latched" type="uint" summary="mods_latched from wl_keyboard::modifiers"/> - <arg name="mods_locked" type="uint" summary="mods_locked from wl_keyboard::modifiers"/> - <arg name="group" type="uint" summary="group from wl_keyboard::modifiers"/> - </request> - - <request name="language"> - <arg name="serial" type="uint" summary="serial of the latest known text input state"/> - <arg name="language" type="string"/> - </request> - - <request name="text_direction"> - <arg name="serial" type="uint" summary="serial of the latest known text input state"/> - <arg name="direction" type="uint"/> - </request> - - <event name="surrounding_text"> - <description summary="surrounding text 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. - </description> - <arg name="text" type="string"/> - <arg name="cursor" type="uint"/> - <arg name="anchor" type="uint"/> - </event> - - <event name="reset"> - </event> - - <event name="content_type"> - <arg name="hint" type="uint"/> - <arg name="purpose" type="uint"/> - </event> - - <event name="invoke_action"> - <arg name="button" type="uint"/> - <arg name="index" type="uint"/> - </event> - - <event name="commit_state"> - <arg name="serial" type="uint" summary="serial of text input state"/> - </event> - - <event name="preferred_language"> - <arg name="language" type="string"/> - </event> - </interface> - - <interface name="zwp_input_method_v1" version="1"> - <description summary="input method"> - 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. - </description> - - <event name="activate"> - <description summary="activate event"> - A text input was activated. Creates an input method context object - which allows communication with the text input. - </description> - <arg name="id" type="new_id" interface="zwp_input_method_context_v1"/> - </event> - - <event name="deactivate"> - <description summary="deactivate event"> - The text input corresponding to the context argument was deactivated. - The input method context should be destroyed after deactivation is - handled. - </description> - <arg name="context" type="object" interface="zwp_input_method_context_v1"/> - </event> - </interface> - - <interface name="zwp_input_panel_v1" version="1"> - <description summary="interface for implementing keyboards"> - Only one client can bind this interface at a time. - </description> - - <request name="get_input_panel_surface"> - <arg name="id" type="new_id" interface="zwp_input_panel_surface_v1"/> - <arg name="surface" type="object" interface="wl_surface"/> - </request> - </interface> - - <interface name="zwp_input_panel_surface_v1" version="1"> - <enum name="position"> - <entry name="center_bottom" value="0"/> - </enum> - - <request name="set_toplevel"> - <description summary="set the surface type as a keyboard"> - Set the input_panel_surface type to keyboard. - - A keyboard surface is only shown when a text input is active. - </description> - <arg name="output" type="object" interface="wl_output"/> - <arg name="position" type="uint"/> - </request> - - <request name="set_overlay_panel"> - <description summary="set the surface type as an overlay panel"> - 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. - </description> - </request> - </interface> - -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/unstable/input-timestamps/README b/chromium/third_party/wayland-protocols/src/unstable/input-timestamps/README deleted file mode 100644 index 3e82890bb3d..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/input-timestamps/README +++ /dev/null @@ -1,4 +0,0 @@ -High-resolution timestamps for input events. - -Maintainers: -Alexandros Frantzis <alexandros.frantzis@collabora.com> diff --git a/chromium/third_party/wayland-protocols/src/unstable/input-timestamps/input-timestamps-unstable-v1.xml b/chromium/third_party/wayland-protocols/src/unstable/input-timestamps/input-timestamps-unstable-v1.xml deleted file mode 100644 index 7c5e08280af..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/input-timestamps/input-timestamps-unstable-v1.xml +++ /dev/null @@ -1,145 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="input_timestamps_unstable_v1"> - - <copyright> - 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. - </copyright> - - <description summary="High-resolution timestamps for input events"> - 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. - </description> - - <interface name="zwp_input_timestamps_manager_v1" version="1"> - <description summary="context object for high-resolution input timestamps"> - A global interface used for requesting high-resolution timestamps - for input events. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the input timestamps manager object"> - Informs the server that the client will no longer be using this - protocol object. Existing objects created by this object are not - affected. - </description> - </request> - - <request name="get_keyboard_timestamps"> - <description summary="subscribe to high-resolution keyboard timestamp events"> - 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. - </description> - <arg name="id" type="new_id" interface="zwp_input_timestamps_v1"/> - <arg name="keyboard" type="object" interface="wl_keyboard" - summary="the wl_keyboard object for which to get timestamp events"/> - </request> - - <request name="get_pointer_timestamps"> - <description summary="subscribe to high-resolution pointer timestamp events"> - 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. - </description> - <arg name="id" type="new_id" interface="zwp_input_timestamps_v1"/> - <arg name="pointer" type="object" interface="wl_pointer" - summary="the wl_pointer object for which to get timestamp events"/> - </request> - - <request name="get_touch_timestamps"> - <description summary="subscribe to high-resolution touch timestamp events"> - 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. - </description> - <arg name="id" type="new_id" interface="zwp_input_timestamps_v1"/> - <arg name="touch" type="object" interface="wl_touch" - summary="the wl_touch object for which to get timestamp events"/> - </request> - </interface> - - <interface name="zwp_input_timestamps_v1" version="1"> - <description summary="context object for input timestamps"> - 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the input timestamps 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. - </description> - </request> - - <event name="timestamp"> - <description summary="high-resolution timestamp event"> - 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]. - </description> - <arg name="tv_sec_hi" type="uint" - summary="high 32 bits of the seconds part of the timestamp"/> - <arg name="tv_sec_lo" type="uint" - summary="low 32 bits of the seconds part of the timestamp"/> - <arg name="tv_nsec" type="uint" - summary="nanoseconds part of the timestamp"/> - </event> - </interface> - -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/unstable/keyboard-shortcuts-inhibit/README b/chromium/third_party/wayland-protocols/src/unstable/keyboard-shortcuts-inhibit/README deleted file mode 100644 index 63ff3350a28..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/keyboard-shortcuts-inhibit/README +++ /dev/null @@ -1,4 +0,0 @@ -Compositor shortcuts inhibit protocol - -Maintainers: -Olivier Fourdan <ofourdan@redhat.com> diff --git a/chromium/third_party/wayland-protocols/src/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml b/chromium/third_party/wayland-protocols/src/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml deleted file mode 100644 index 27748764d83..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml +++ /dev/null @@ -1,143 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="keyboard_shortcuts_inhibit_unstable_v1"> - - <copyright> - 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. - </copyright> - - <description summary="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. - - 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. - </description> - - <interface name="zwp_keyboard_shortcuts_inhibit_manager_v1" version="1"> - <description summary="context object for keyboard grab_manager"> - A global interface used for inhibiting the compositor keyboard shortcuts. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the keyboard shortcuts inhibitor object"> - Destroy the keyboard shortcuts inhibitor manager. - </description> - </request> - - <request name="inhibit_shortcuts"> - <description summary="create a new keyboard shortcuts inhibitor object"> - 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. - </description> - <arg name="id" type="new_id" interface="zwp_keyboard_shortcuts_inhibitor_v1"/> - <arg name="surface" type="object" interface="wl_surface" - summary="the surface that inhibits the keyboard shortcuts behavior"/> - <arg name="seat" type="object" interface="wl_seat" - summary="the wl_seat for which keyboard shortcuts should be disabled"/> - </request> - - <enum name="error"> - <entry name="already_inhibited" - value="0" - summary="the shortcuts are already inhibited for this surface"/> - </enum> - </interface> - - <interface name="zwp_keyboard_shortcuts_inhibitor_v1" version="1"> - <description summary="context object for keyboard shortcuts inhibitor"> - 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the keyboard shortcuts inhibitor object"> - Remove the keyboard shortcuts inhibitor from the associated wl_surface. - </description> - </request> - - <event name="active"> - <description summary="shortcuts are inhibited"> - 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. - </description> - </event> - - <event name="inactive"> - <description summary="shortcuts are restored"> - This event indicates that the shortcuts inhibitor is inactive, - normal shortcuts processing is restored by the compositor. - </description> - </event> - </interface> -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/unstable/linux-dmabuf/README b/chromium/third_party/wayland-protocols/src/unstable/linux-dmabuf/README deleted file mode 100644 index cdedf98a5a8..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/linux-dmabuf/README +++ /dev/null @@ -1,5 +0,0 @@ -Linux DMA-BUF protocol - -Maintainers: -Pekka Paalanen <pekka.paalanen@collabora.co.uk> -Daniel Stone <daniels@collabora.com> diff --git a/chromium/third_party/wayland-protocols/src/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml b/chromium/third_party/wayland-protocols/src/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml deleted file mode 100644 index 154afe23e1b..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml +++ /dev/null @@ -1,348 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="linux_dmabuf_unstable_v1"> - - <copyright> - 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. - </copyright> - - <interface name="zwp_linux_dmabuf_v1" version="3"> - <description summary="factory for creating dmabuf-based wl_buffers"> - Following the interfaces from: - https://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt - and the Linux DRM sub-system's AddFb2 ioctl. - - This interface offers ways to create generic dmabuf-based - wl_buffers. Immediately after a client binds to this interface, - the set of supported formats and format modifiers is sent with - 'format' and 'modifier' events. - - The following are required from clients: - - - Clients must ensure that either all data in the dma-buf is - coherent for all subsequent read access or that coherency is - correctly handled by the underlying kernel-side dma-buf - implementation. - - - Don't make any more attachments after sending the buffer to the - compositor. Making more attachments later increases the risk of - the compositor not being able to use (re-import) an existing - dmabuf-based wl_buffer. - - The underlying graphics stack must ensure the following: - - - The dmabuf file descriptors relayed to the server will stay valid - for the whole lifetime of the wl_buffer. This means the server may - at any time use those fds to import the dmabuf into any kernel - sub-system that might accept it. - - To create a wl_buffer from one or more dmabufs, a client creates a - zwp_linux_dmabuf_params_v1 object with a zwp_linux_dmabuf_v1.create_params - request. All planes required by the intended format are added with - the 'add' request. Finally, a 'create' or 'create_immed' request is - issued, which has the following outcome depending on the import success. - - The 'create' request, - - on success, triggers a 'created' event which provides the final - wl_buffer to the client. - - on failure, triggers a 'failed' event to convey that the server - cannot use the dmabufs received from the client. - - For the 'create_immed' request, - - on success, the server immediately imports the added dmabufs to - create a wl_buffer. No event is sent from the server in this case. - - on failure, the server can choose to either: - - terminate the client by raising a fatal error. - - mark the wl_buffer as failed, and send a 'failed' event to the - client. If the client uses a failed wl_buffer as an argument to any - request, the behaviour is compositor implementation-defined. - - Warning! The protocol described in this file is experimental and - backward incompatible changes may be made. Backward compatible changes - may be added together with the corresponding interface version bump. - Backward incompatible changes are done by bumping the version number in - the protocol and interface names and resetting the interface version. - Once the protocol is to be declared stable, the 'z' prefix and the - version number in the protocol and interface names are removed and the - interface version number is reset. - </description> - - <request name="destroy" type="destructor"> - <description summary="unbind the factory"> - Objects created through this interface, especially wl_buffers, will - remain valid. - </description> - </request> - - <request name="create_params"> - <description summary="create a temporary object for buffer parameters"> - 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. - </description> - <arg name="params_id" type="new_id" interface="zwp_linux_buffer_params_v1" - summary="the new temporary"/> - </request> - - <event name="format"> - <description summary="supported buffer format"> - This event advertises one buffer format that the server supports. - All the supported formats are advertised once when the client - binds to this interface. A roundtrip after binding guarantees - that the client has received all supported formats. - - For the definition of the format codes, see the - zwp_linux_buffer_params_v1::create request. - - Warning: the 'format' event is likely to be deprecated and replaced - with the 'modifier' event introduced in zwp_linux_dmabuf_v1 - version 3, described below. Please refrain from using the information - received from this event. - </description> - <arg name="format" type="uint" summary="DRM_FORMAT code"/> - </event> - - <event name="modifier" since="3"> - <description summary="supported buffer format modifier"> - 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 the definition of the format and modifier codes, see the - zwp_linux_buffer_params_v1::create request. - </description> - <arg name="format" type="uint" summary="DRM_FORMAT code"/> - <arg name="modifier_hi" type="uint" - summary="high 32 bits of layout modifier"/> - <arg name="modifier_lo" type="uint" - summary="low 32 bits of layout modifier"/> - </event> - </interface> - - <interface name="zwp_linux_buffer_params_v1" version="3"> - <description summary="parameters for creating a dmabuf-based wl_buffer"> - 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. - </description> - - <enum name="error"> - <entry name="already_used" value="0" - summary="the dmabuf_batch object has already been used to create a wl_buffer"/> - <entry name="plane_idx" value="1" - summary="plane index out of bounds"/> - <entry name="plane_set" value="2" - summary="the plane index was already set"/> - <entry name="incomplete" value="3" - summary="missing or too many planes to create a buffer"/> - <entry name="invalid_format" value="4" - summary="format not supported"/> - <entry name="invalid_dimensions" value="5" - summary="invalid width or height"/> - <entry name="out_of_bounds" value="6" - summary="offset + stride * height goes out of dmabuf bounds"/> - <entry name="invalid_wl_buffer" value="7" - summary="invalid wl_buffer resulted from importing dmabufs via - the create_immed request on given buffer_params"/> - </enum> - - <request name="destroy" type="destructor"> - <description summary="delete this object, used or not"> - Cleans up the temporary data sent to the server for dmabuf-based - wl_buffer creation. - </description> - </request> - - <request name="add"> - <description summary="add a dmabuf to the temporary set"> - 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. - - 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. - </description> - <arg name="fd" type="fd" summary="dmabuf fd"/> - <arg name="plane_idx" type="uint" summary="plane index"/> - <arg name="offset" type="uint" summary="offset in bytes"/> - <arg name="stride" type="uint" summary="stride in bytes"/> - <arg name="modifier_hi" type="uint" - summary="high 32 bits of layout modifier"/> - <arg name="modifier_lo" type="uint" - summary="low 32 bits of layout modifier"/> - </request> - - <enum name="flags"> - <entry name="y_invert" value="1" summary="contents are y-inverted"/> - <entry name="interlaced" value="2" summary="content is interlaced"/> - <entry name="bottom_first" value="4" summary="bottom field first"/> - </enum> - - <request name="create"> - <description summary="create a wl_buffer from the given dmabufs"> - 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. - </description> - <arg name="width" type="int" summary="base plane width in pixels"/> - <arg name="height" type="int" summary="base plane height in pixels"/> - <arg name="format" type="uint" summary="DRM_FORMAT code"/> - <arg name="flags" type="uint" summary="see enum flags"/> - </request> - - <event name="created"> - <description summary="buffer creation succeeded"> - This event indicates that the attempted buffer creation was - successful. It provides the new wl_buffer referencing the dmabuf(s). - - Upon receiving this event, the client should destroy the - zlinux_dmabuf_params object. - </description> - <arg name="buffer" type="new_id" interface="wl_buffer" - summary="the newly created wl_buffer"/> - </event> - - <event name="failed"> - <description summary="buffer creation failed"> - This event indicates that the attempted buffer creation has - failed. It usually means that one of the dmabuf constraints - has not been fulfilled. - - Upon receiving this event, the client should destroy the - zlinux_buffer_params object. - </description> - </event> - - <request name="create_immed" since="2"> - <description summary="immediately create a wl_buffer from the given - dmabufs"> - This asks for immediate creation of a wl_buffer by importing the - added dmabufs. - - In case of import success, no event is sent from the server, and the - wl_buffer is ready to be used by the client. - - Upon import failure, either of the following may happen, as seen fit - by the implementation: - - the client is terminated with one of the following fatal protocol - errors: - - INCOMPLETE, INVALID_FORMAT, INVALID_DIMENSIONS, OUT_OF_BOUNDS, - in case of argument errors such as mismatch between the number - of planes and the format, bad format, non-positive width or - height, or bad offset or stride. - - INVALID_WL_BUFFER, in case the cause for failure is unknown or - plaform specific. - - the server creates an invalid wl_buffer, marks it as failed and - sends a 'failed' event to the client. The result of using this - invalid wl_buffer as an argument in any request by the client is - defined by the compositor implementation. - - This takes the same arguments as a 'create' request, and obeys the - same restrictions. - </description> - <arg name="buffer_id" type="new_id" interface="wl_buffer" - summary="id for the newly created wl_buffer"/> - <arg name="width" type="int" summary="base plane width in pixels"/> - <arg name="height" type="int" summary="base plane height in pixels"/> - <arg name="format" type="uint" summary="DRM_FORMAT code"/> - <arg name="flags" type="uint" summary="see enum flags"/> - </request> - - </interface> - -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/unstable/pointer-constraints/README b/chromium/third_party/wayland-protocols/src/unstable/pointer-constraints/README deleted file mode 100644 index 8a242f8d7e5..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/pointer-constraints/README +++ /dev/null @@ -1,4 +0,0 @@ -Pointer constraints protocol - -Maintainers: -Jonas Ådahl <jadahl@gmail.com> diff --git a/chromium/third_party/wayland-protocols/src/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml b/chromium/third_party/wayland-protocols/src/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml deleted file mode 100644 index 4e67a13c981..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml +++ /dev/null @@ -1,339 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="pointer_constraints_unstable_v1"> - - <copyright> - 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. - </copyright> - - <description summary="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. - - 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. - </description> - - <interface name="zwp_pointer_constraints_v1" version="1"> - <description summary="constrain the movement of a pointer"> - 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. - </description> - - <enum name="error"> - <description summary="wp_pointer_constraints error values"> - These errors can be emitted in response to wp_pointer_constraints - requests. - </description> - <entry name="already_constrained" value="1" - summary="pointer constraint already requested on that surface"/> - </enum> - - <enum name="lifetime"> - <description summary="constraint lifetime"> - These values represent different lifetime semantics. They are passed - as arguments to the factory requests to specify how the constraint - lifetimes should be managed. - </description> - <entry name="oneshot" value="1"> - <description summary="the pointer constraint is defunct once deactivated"> - 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. - </description> - </entry> - <entry name="persistent" value="2"> - <description summary="the pointer constraint may reactivate"> - 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. - </description> - </entry> - </enum> - - <request name="destroy" type="destructor"> - <description summary="destroy the pointer constraints manager object"> - Used by the client to notify the server that it will no longer use this - pointer constraints object. - </description> - </request> - - <request name="lock_pointer"> - <description summary="lock pointer to a position"> - 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. - </description> - <arg name="id" type="new_id" interface="zwp_locked_pointer_v1"/> - <arg name="surface" type="object" interface="wl_surface" - summary="surface to lock pointer to"/> - <arg name="pointer" type="object" interface="wl_pointer" - summary="the pointer that should be locked"/> - <arg name="region" type="object" interface="wl_region" allow-null="true" - summary="region of surface"/> - <arg name="lifetime" type="uint" summary="lock lifetime"/> - </request> - - <request name="confine_pointer"> - <description summary="confine pointer to a region"> - 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. - </description> - <arg name="id" type="new_id" interface="zwp_confined_pointer_v1"/> - <arg name="surface" type="object" interface="wl_surface" - summary="surface to lock pointer to"/> - <arg name="pointer" type="object" interface="wl_pointer" - summary="the pointer that should be confined"/> - <arg name="region" type="object" interface="wl_region" allow-null="true" - summary="region of surface"/> - <arg name="lifetime" type="uint" summary="confinement lifetime"/> - </request> - </interface> - - <interface name="zwp_locked_pointer_v1" version="1"> - <description summary="receive relative pointer motion events"> - 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the locked pointer object"> - Destroy the locked pointer object. If applicable, the compositor will - unlock the pointer. - </description> - </request> - - <request name="set_cursor_position_hint"> - <description summary="set the pointer cursor position hint"> - Set the cursor position hint relative to the top left corner of the - surface. - - If the client is drawing its own cursor, it should update the position - hint to the position of its own cursor. A compositor may use this - information to warp the pointer upon unlock in order to avoid pointer - jumps. - - The cursor position hint is double buffered. The new hint will only take - effect when the associated surface gets it pending state applied. See - wl_surface.commit for details. - </description> - <arg name="surface_x" type="fixed" - summary="surface-local x coordinate"/> - <arg name="surface_y" type="fixed" - summary="surface-local y coordinate"/> - </request> - - <request name="set_region"> - <description summary="set a new lock region"> - Set a new region used to lock the pointer. - - The new lock region is double-buffered. The new lock region will - only take effect when the associated surface gets its pending state - applied. See wl_surface.commit for details. - - For details about the lock region, see wp_locked_pointer. - </description> - <arg name="region" type="object" interface="wl_region" allow-null="true" - summary="region of surface"/> - </request> - - <event name="locked"> - <description summary="lock activation event"> - Notification that the pointer lock of the seat's pointer is activated. - </description> - </event> - - <event name="unlocked"> - <description summary="lock deactivation event"> - 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. - </description> - </event> - </interface> - - <interface name="zwp_confined_pointer_v1" version="1"> - <description summary="confined pointer object"> - 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the confined pointer object"> - Destroy the confined pointer object. If applicable, the compositor will - unconfine the pointer. - </description> - </request> - - <request name="set_region"> - <description summary="set a new confine region"> - Set a new region used to confine the pointer. - - The new confine region is double-buffered. The new confine region will - only take effect when the associated surface gets its pending state - applied. See wl_surface.commit for details. - - If the confinement is active when the new confinement region is applied - and the pointer ends up outside of newly applied region, the pointer may - warped to a position within the new confinement region. If warped, a - wl_pointer.motion event will be emitted, but no - wp_relative_pointer.relative_motion event. - - The compositor may also, instead of using the new region, unconfine the - pointer. - - For details about the confine region, see wp_confined_pointer. - </description> - <arg name="region" type="object" interface="wl_region" allow-null="true" - summary="region of surface"/> - </request> - - <event name="confined"> - <description summary="pointer confined"> - Notification that the pointer confinement of the seat's pointer is - activated. - </description> - </event> - - <event name="unconfined"> - <description summary="pointer unconfined"> - 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. - </description> - </event> - </interface> - -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/unstable/pointer-gestures/README b/chromium/third_party/wayland-protocols/src/unstable/pointer-gestures/README deleted file mode 100644 index a419632b0f5..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/pointer-gestures/README +++ /dev/null @@ -1,4 +0,0 @@ -Pointer gestures protocol - -Maintainers: -Carlos Garnacho <carlosg@gnome.org> diff --git a/chromium/third_party/wayland-protocols/src/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml b/chromium/third_party/wayland-protocols/src/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml deleted file mode 100644 index 5b7132c8dd1..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml +++ /dev/null @@ -1,177 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="pointer_gestures_unstable_v1"> - - <interface name="zwp_pointer_gestures_v1" version="1"> - <description summary="touchpad gestures"> - A global interface to provide semantic touchpad gestures for a given - pointer. - - Two gestures are currently supported: swipe and zoom/rotate. - All gestures follow a three-stage cycle: begin, update, end and - are identified by a unique id. - - Warning! The protocol described in this file is experimental and - backward incompatible changes may be made. Backward compatible changes - may be added together with the corresponding interface version bump. - Backward incompatible changes are done by bumping the version number in - the protocol and interface names and resetting the interface version. - Once the protocol is to be declared stable, the 'z' prefix and the - version number in the protocol and interface names are removed and the - interface version number is reset. - </description> - - <request name="get_swipe_gesture"> - <description summary="get swipe gesture"> - Create a swipe gesture object. See the - wl_pointer_gesture_swipe interface for details. - </description> - <arg name="id" type="new_id" interface="zwp_pointer_gesture_swipe_v1"/> - <arg name="pointer" type="object" interface="wl_pointer"/> - </request> - - <request name="get_pinch_gesture"> - <description summary="get pinch gesture"> - Create a pinch gesture object. See the - wl_pointer_gesture_pinch interface for details. - </description> - <arg name="id" type="new_id" interface="zwp_pointer_gesture_pinch_v1"/> - <arg name="pointer" type="object" interface="wl_pointer"/> - </request> - </interface> - - <interface name="zwp_pointer_gesture_swipe_v1" version="1"> - <description summary="a swipe gesture object"> - A swipe gesture object notifies a client about a multi-finger swipe - gesture detected on an indirect input device such as a touchpad. - The gesture is usually initiated by multiple fingers moving in the - same direction but once initiated the direction may change. - The precise conditions of when such a gesture is detected are - implementation-dependent. - - A gesture consists of three stages: begin, update (optional) and end. - There cannot be multiple simultaneous pinch or swipe gestures on a - same pointer/seat, how compositors prevent these situations is - implementation-dependent. - - A gesture may be cancelled by the compositor or the hardware. - Clients should not consider performing permanent or irreversible - actions until the end of a gesture has been received. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the pointer swipe gesture object"/> - </request> - - <event name="begin"> - <description summary="multi-finger swipe begin"> - This event is sent when a multi-finger swipe gesture is detected - on the device. - </description> - <arg name="serial" type="uint"/> - <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> - <arg name="surface" type="object" interface="wl_surface"/> - <arg name="fingers" type="uint" summary="number of fingers"/> - </event> - - <event name="update"> - <description summary="multi-finger swipe motion"> - 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. - </description> - <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> - <arg name="dx" type="fixed" summary="delta x coordinate in surface coordinate space"/> - <arg name="dy" type="fixed" summary="delta y coordinate in surface coordinate space"/> - </event> - - <event name="end"> - <description summary="multi-finger swipe end"> - 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. - </description> - <arg name="serial" type="uint"/> - <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> - <arg name="cancelled" type="int" summary="1 if the gesture was cancelled, 0 otherwise"/> - </event> - </interface> - - <interface name="zwp_pointer_gesture_pinch_v1" version="1"> - <description summary="a pinch gesture object"> - A pinch gesture object notifies a client about a multi-finger pinch - gesture detected on an indirect input device such as a touchpad. - The gesture is usually initiated by multiple fingers moving towards - each other or away from each other, or by two or more fingers rotating - around a logical center of gravity. The precise conditions of when - such a gesture is detected are implementation-dependent. - - A gesture consists of three stages: begin, update (optional) and end. - There cannot be multiple simultaneous pinch or swipe gestures on a - same pointer/seat, how compositors prevent these situations is - implementation-dependent. - - A gesture may be cancelled by the compositor or the hardware. - Clients should not consider performing permanent or irreversible - actions until the end of a gesture has been received. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the pinch gesture object"/> - </request> - - <event name="begin"> - <description summary="multi-finger pinch begin"> - This event is sent when a multi-finger pinch gesture is detected - on the device. - </description> - <arg name="serial" type="uint"/> - <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> - <arg name="surface" type="object" interface="wl_surface"/> - <arg name="fingers" type="uint" summary="number of fingers"/> - </event> - - <event name="update"> - <description summary="multi-finger pinch motion"> - 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. - </description> - <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> - <arg name="dx" type="fixed" summary="delta x coordinate in surface coordinate space"/> - <arg name="dy" type="fixed" summary="delta y coordinate in surface coordinate space"/> - <arg name="scale" type="fixed" summary="scale relative to the initial finger position"/> - <arg name="rotation" type="fixed" summary="angle in degrees cw relative to the previous event"/> - </event> - - <event name="end"> - <description summary="multi-finger pinch end"> - 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. - </description> - <arg name="serial" type="uint"/> - <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> - <arg name="cancelled" type="int" summary="1 if the gesture was cancelled, 0 otherwise"/> - </event> - </interface> - -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/unstable/relative-pointer/README b/chromium/third_party/wayland-protocols/src/unstable/relative-pointer/README deleted file mode 100644 index 64c42a126e7..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/relative-pointer/README +++ /dev/null @@ -1,4 +0,0 @@ -Relative pointer protocol - -Maintainers: -Jonas Ådahl <jadahl@gmail.com> diff --git a/chromium/third_party/wayland-protocols/src/unstable/relative-pointer/relative-pointer-unstable-v1.xml b/chromium/third_party/wayland-protocols/src/unstable/relative-pointer/relative-pointer-unstable-v1.xml deleted file mode 100644 index ca6f81d12ac..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/relative-pointer/relative-pointer-unstable-v1.xml +++ /dev/null @@ -1,136 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="relative_pointer_unstable_v1"> - - <copyright> - 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. - </copyright> - - <description summary="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. - - 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. - </description> - - <interface name="zwp_relative_pointer_manager_v1" version="1"> - <description summary="get relative pointer objects"> - A global interface used for getting the relative pointer object for a - given pointer. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the relative pointer manager object"> - Used by the client to notify the server that it will no longer use this - relative pointer manager object. - </description> - </request> - - <request name="get_relative_pointer"> - <description summary="get a relative pointer object"> - Create a relative pointer interface given a wl_pointer object. See the - wp_relative_pointer interface for more details. - </description> - <arg name="id" type="new_id" interface="zwp_relative_pointer_v1"/> - <arg name="pointer" type="object" interface="wl_pointer"/> - </request> - </interface> - - <interface name="zwp_relative_pointer_v1" version="1"> - <description summary="relative pointer object"> - 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="release the relative pointer object"/> - </request> - - <event name="relative_motion"> - <description summary="relative pointer motion"> - 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. - </description> - <arg name="utime_hi" type="uint" - summary="high 32 bits of a 64 bit timestamp with microsecond granularity"/> - <arg name="utime_lo" type="uint" - summary="low 32 bits of a 64 bit timestamp with microsecond granularity"/> - <arg name="dx" type="fixed" - summary="the x component of the motion vector"/> - <arg name="dy" type="fixed" - summary="the y component of the motion vector"/> - <arg name="dx_unaccel" type="fixed" - summary="the x component of the unaccelerated motion vector"/> - <arg name="dy_unaccel" type="fixed" - summary="the y component of the unaccelerated motion vector"/> - </event> - </interface> - -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/unstable/tablet/README b/chromium/third_party/wayland-protocols/src/unstable/tablet/README deleted file mode 100644 index 7ba8e77a13a..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/tablet/README +++ /dev/null @@ -1,4 +0,0 @@ -Tablet protocol - -Maintainers: -Peter Hutterer <peter.hutterer@who-t.net> diff --git a/chromium/third_party/wayland-protocols/src/unstable/tablet/tablet-unstable-v1.xml b/chromium/third_party/wayland-protocols/src/unstable/tablet/tablet-unstable-v1.xml deleted file mode 100644 index 6db9c05a415..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/tablet/tablet-unstable-v1.xml +++ /dev/null @@ -1,640 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="tablet_unstable_v1"> - - <copyright> - 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. - </copyright> - - <description summary="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. - - 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. - </description> - - <interface name="zwp_tablet_manager_v1" version="1"> - <description summary="controller object for graphic tablet devices"> - 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. - </description> - - <request name="get_tablet_seat"> - <description summary="get the tablet seat"> - Get the wp_tablet_seat object for the given seat. This object - provides access to all graphics tablets in this seat. - </description> - <arg name="tablet_seat" type="new_id" interface="zwp_tablet_seat_v1"/> - <arg name="seat" type="object" interface="wl_seat" summary="The wl_seat object to retrieve the tablets for" /> - </request> - - <request name="destroy" type="destructor"> - <description summary="release the memory for the tablet manager object"> - Destroy the wp_tablet_manager object. Objects created from this - object are unaffected and should be destroyed separately. - </description> - </request> - </interface> - - <interface name="zwp_tablet_seat_v1" version="1"> - <description summary="controller object for graphic tablet devices of a seat"> - 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="release the memory for the tablet seat object"> - Destroy the wp_tablet_seat object. Objects created from this - object are unaffected and should be destroyed separately. - </description> - </request> - - <event name="tablet_added"> - <description summary="new device notification"> - 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. - </description> - <arg name="id" type="new_id" interface="zwp_tablet_v1" summary="the newly added graphics tablet"/> - </event> - - <event name="tool_added"> - <description summary="a new tool has been used with a tablet"> - 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. - </description> - <arg name="id" type="new_id" interface="zwp_tablet_tool_v1" summary="the newly added tablet tool"/> - </event> - </interface> - - <interface name="zwp_tablet_tool_v1" version="1"> - <description summary="a physical tablet tool"> - 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. - </description> - - <request name="set_cursor"> - <description summary="set the tablet tool's surface"> - 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. - </description> - <arg name="serial" type="uint" summary="serial of the enter event"/> - <arg name="surface" type="object" interface="wl_surface" allow-null="true"/> - <arg name="hotspot_x" type="int" summary="surface-local x coordinate"/> - <arg name="hotspot_y" type="int" summary="surface-local y coordinate"/> - </request> - - <request name="destroy" type="destructor"> - <description summary="destroy the tool object"> - This destroys the client's resource for this tool object. - </description> - </request> - - <enum name="type"> - <description summary="a physical tool type"> - 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. - </description> - <entry name="pen" value="0x140" summary="Pen"/> - <entry name="eraser" value="0x141" summary="Eraser"/> - <entry name="brush" value="0x142" summary="Brush"/> - <entry name="pencil" value="0x143" summary="Pencil"/> - <entry name="airbrush" value="0x144" summary="Airbrush"/> - <entry name="finger" value="0x145" summary="Finger"/> - <entry name="mouse" value="0x146" summary="Mouse"/> - <entry name="lens" value="0x147" summary="Lens"/> - </enum> - - <event name="type"> - <description summary="tool type"> - 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. - </description> - <arg name="tool_type" type="uint" enum="type" summary="the physical tool type"/> - </event> - - <event name="hardware_serial"> - <description summary="unique hardware serial number of the tool"> - 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. - </description> - <arg name="hardware_serial_hi" type="uint" summary="the unique serial number of the tool, most significant bits"/> - <arg name="hardware_serial_lo" type="uint" summary="the unique serial number of the tool, least significant bits"/> - </event> - - <event name="hardware_id_wacom"> - <description summary="hardware id notification in Wacom's format"> - 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. - </description> - <arg name="hardware_id_hi" type="uint" summary="the hardware id, most significant bits"/> - <arg name="hardware_id_lo" type="uint" summary="the hardware id, least significant bits"/> - </event> - - <enum name="capability"> - <description summary="capability flags for a tool"> - Describes extra capabilities on a tablet. - - Any tool must provide x and y values, extra axes are - device-specific. - </description> - <entry name="tilt" value="1" summary="Tilt axes"/> - <entry name="pressure" value="2" summary="Pressure axis"/> - <entry name="distance" value="3" summary="Distance axis"/> - <entry name="rotation" value="4" summary="Z-rotation axis"/> - <entry name="slider" value="5" summary="Slider axis"/> - <entry name="wheel" value="6" summary="Wheel axis"/> - </enum> - - <event name="capability"> - <description summary="tool capability notification"> - 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. - </description> - <arg name="capability" type="uint" enum="capability" summary="the capability"/> - </event> - - <event name="done"> - <description summary="tool description events sequence complete"> - 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. - </description> - </event> - - <event name="removed"> - <description summary="tool removed"> - 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. - </description> - </event> - - <event name="proximity_in"> - <description summary="proximity in event"> - 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. - </description> - <arg name="serial" type="uint"/> - <arg name="tablet" type="object" interface="zwp_tablet_v1" summary="The tablet the tool is in proximity of"/> - <arg name="surface" type="object" interface="wl_surface" summary="The current surface the tablet tool is over"/> - </event> - - <event name="proximity_out"> - <description summary="proximity out 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. - </description> - </event> - - <event name="down"> - <description summary="tablet tool is making contact"> - 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. - </description> - <arg name="serial" type="uint"/> - </event> - - <event name="up"> - <description summary="tablet tool is no longer making contact"> - 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. - </description> - </event> - - <event name="motion"> - <description summary="motion event"> - Sent whenever a tablet tool moves. - </description> - <arg name="x" type="fixed" summary="surface-local x coordinate"/> - <arg name="y" type="fixed" summary="surface-local y coordinate"/> - </event> - - <event name="pressure"> - <description summary="pressure change event"> - 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. - </description> - <arg name="pressure" type="uint" summary="The current pressure value"/> - </event> - - <event name="distance"> - <description summary="distance change event"> - 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. - </description> - <arg name="distance" type="uint" summary="The current distance value"/> - </event> - - <event name="tilt"> - <description summary="tilt change event"> - 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. - </description> - <arg name="tilt_x" type="int" summary="The current value of the X tilt axis"/> - <arg name="tilt_y" type="int" summary="The current value of the Y tilt axis"/> - </event> - - <event name="rotation"> - <description summary="z-rotation change event"> - 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. - </description> - <arg name="degrees" type="int" summary="The current rotation of the Z axis"/> - </event> - - <event name="slider"> - <description summary="Slider position change event"> - 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. - </description> - <arg name="position" type="int" summary="The current position of slider"/> - </event> - - <event name="wheel"> - <description summary="Wheel delta event"> - 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. - </description> - <arg name="degrees" type="int" summary="The wheel delta in 0.01 of a degree"/> - <arg name="clicks" type="int" summary="The wheel delta in discrete clicks"/> - </event> - - <enum name="button_state"> - <description summary="physical button state"> - Describes the physical state of a button that produced the button event. - </description> - <entry name="released" value="0" summary="button is not pressed"/> - <entry name="pressed" value="1" summary="button is pressed"/> - </enum> - - <event name="button"> - <description summary="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. - </description> - <arg name="serial" type="uint"/> - <arg name="button" type="uint" summary="The button whose state has changed"/> - <arg name="state" type="uint" enum="button_state" summary="Whether the button was pressed or released"/> - </event> - - <event name="frame"> - <description summary="frame event"> - 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. - </description> - <arg name="time" type="uint" summary="The time of the event with millisecond granularity"/> - </event> - - <enum name="error"> - <entry name="role" value="0" summary="given wl_surface has another role"/> - </enum> - </interface> - - <interface name="zwp_tablet_v1" version="1"> - <description summary="graphics tablet device"> - 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the tablet object"> - This destroys the client's resource for this tablet object. - </description> - </request> - - <event name="name"> - <description summary="tablet device name"> - This event is sent in the initial burst of events before the - wp_tablet.done event. - </description> - <arg name="name" type="string" summary="the device name"/> - </event> - - <event name="id"> - <description summary="tablet device USB vendor/product id"> - This event is sent in the initial burst of events before the - wp_tablet.done event. - </description> - <arg name="vid" type="uint" summary="USB vendor id"/> - <arg name="pid" type="uint" summary="USB product id"/> - </event> - - <event name="path"> - <description summary="path to the device"> - 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. - </description> - <arg name="path" type="string" summary="path to local device"/> - </event> - - <event name="done"> - <description summary="tablet description events sequence complete"> - 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. - </description> - </event> - - <event name="removed"> - <description summary="tablet removed event"> - 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. - </description> - </event> - </interface> - -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/unstable/tablet/tablet-unstable-v2.xml b/chromium/third_party/wayland-protocols/src/unstable/tablet/tablet-unstable-v2.xml deleted file mode 100644 index b286d964af8..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/tablet/tablet-unstable-v2.xml +++ /dev/null @@ -1,1178 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="tablet_unstable_v2"> - - <copyright> - 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. - </copyright> - - <description summary="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. - - 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. - </description> - - <interface name="zwp_tablet_manager_v2" version="1"> - <description summary="controller object for graphic tablet devices"> - 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. - </description> - - <request name="get_tablet_seat"> - <description summary="get the tablet seat"> - Get the wp_tablet_seat object for the given seat. This object - provides access to all graphics tablets in this seat. - </description> - <arg name="tablet_seat" type="new_id" interface="zwp_tablet_seat_v2"/> - <arg name="seat" type="object" interface="wl_seat" summary="The wl_seat object to retrieve the tablets for" /> - </request> - - <request name="destroy" type="destructor"> - <description summary="release the memory for the tablet manager object"> - Destroy the wp_tablet_manager object. Objects created from this - object are unaffected and should be destroyed separately. - </description> - </request> - </interface> - - <interface name="zwp_tablet_seat_v2" version="1"> - <description summary="controller object for graphic tablet devices of a seat"> - 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="release the memory for the tablet seat object"> - Destroy the wp_tablet_seat object. Objects created from this - object are unaffected and should be destroyed separately. - </description> - </request> - - <event name="tablet_added"> - <description summary="new device notification"> - 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. - </description> - <arg name="id" type="new_id" interface="zwp_tablet_v2" summary="the newly added graphics tablet"/> - </event> - - <event name="tool_added"> - <description summary="a new tool has been used with a tablet"> - 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. - </description> - <arg name="id" type="new_id" interface="zwp_tablet_tool_v2" summary="the newly added tablet tool"/> - </event> - - <event name="pad_added"> - <description summary="new pad notification"> - 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. - </description> - <arg name="id" type="new_id" interface="zwp_tablet_pad_v2" summary="the newly added pad"/> - </event> - </interface> - - <interface name="zwp_tablet_tool_v2" version="1"> - <description summary="a physical tablet tool"> - 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. - </description> - - <request name="set_cursor"> - <description summary="set the tablet tool's surface"> - 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. - </description> - <arg name="serial" type="uint" summary="serial of the enter event"/> - <arg name="surface" type="object" interface="wl_surface" allow-null="true"/> - <arg name="hotspot_x" type="int" summary="surface-local x coordinate"/> - <arg name="hotspot_y" type="int" summary="surface-local y coordinate"/> - </request> - - <request name="destroy" type="destructor"> - <description summary="destroy the tool object"> - This destroys the client's resource for this tool object. - </description> - </request> - - <enum name="type"> - <description summary="a physical tool type"> - 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. - </description> - <entry name="pen" value="0x140" summary="Pen"/> - <entry name="eraser" value="0x141" summary="Eraser"/> - <entry name="brush" value="0x142" summary="Brush"/> - <entry name="pencil" value="0x143" summary="Pencil"/> - <entry name="airbrush" value="0x144" summary="Airbrush"/> - <entry name="finger" value="0x145" summary="Finger"/> - <entry name="mouse" value="0x146" summary="Mouse"/> - <entry name="lens" value="0x147" summary="Lens"/> - </enum> - - <event name="type"> - <description summary="tool type"> - 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. - </description> - <arg name="tool_type" type="uint" enum="type" summary="the physical tool type"/> - </event> - - <event name="hardware_serial"> - <description summary="unique hardware serial number of the tool"> - 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. - </description> - <arg name="hardware_serial_hi" type="uint" summary="the unique serial number of the tool, most significant bits"/> - <arg name="hardware_serial_lo" type="uint" summary="the unique serial number of the tool, least significant bits"/> - </event> - - <event name="hardware_id_wacom"> - <description summary="hardware id notification in Wacom's format"> - 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. - </description> - <arg name="hardware_id_hi" type="uint" summary="the hardware id, most significant bits"/> - <arg name="hardware_id_lo" type="uint" summary="the hardware id, least significant bits"/> - </event> - - <enum name="capability"> - <description summary="capability flags for a tool"> - Describes extra capabilities on a tablet. - - Any tool must provide x and y values, extra axes are - device-specific. - </description> - <entry name="tilt" value="1" summary="Tilt axes"/> - <entry name="pressure" value="2" summary="Pressure axis"/> - <entry name="distance" value="3" summary="Distance axis"/> - <entry name="rotation" value="4" summary="Z-rotation axis"/> - <entry name="slider" value="5" summary="Slider axis"/> - <entry name="wheel" value="6" summary="Wheel axis"/> - </enum> - - <event name="capability"> - <description summary="tool capability notification"> - 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. - </description> - <arg name="capability" type="uint" enum="capability" summary="the capability"/> - </event> - - <event name="done"> - <description summary="tool description events sequence complete"> - 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. - </description> - </event> - - <event name="removed"> - <description summary="tool removed"> - 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. - </description> - </event> - - <event name="proximity_in"> - <description summary="proximity in event"> - 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. - </description> - <arg name="serial" type="uint"/> - <arg name="tablet" type="object" interface="zwp_tablet_v2" summary="The tablet the tool is in proximity of"/> - <arg name="surface" type="object" interface="wl_surface" summary="The current surface the tablet tool is over"/> - </event> - - <event name="proximity_out"> - <description summary="proximity out 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. - </description> - </event> - - <event name="down"> - <description summary="tablet tool is making contact"> - 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. - </description> - <arg name="serial" type="uint"/> - </event> - - <event name="up"> - <description summary="tablet tool is no longer making contact"> - 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. - </description> - </event> - - <event name="motion"> - <description summary="motion event"> - Sent whenever a tablet tool moves. - </description> - <arg name="x" type="fixed" summary="surface-local x coordinate"/> - <arg name="y" type="fixed" summary="surface-local y coordinate"/> - </event> - - <event name="pressure"> - <description summary="pressure change event"> - 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. - </description> - <arg name="pressure" type="uint" summary="The current pressure value"/> - </event> - - <event name="distance"> - <description summary="distance change event"> - 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. - </description> - <arg name="distance" type="uint" summary="The current distance value"/> - </event> - - <event name="tilt"> - <description summary="tilt change event"> - 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. - </description> - <arg name="tilt_x" type="fixed" summary="The current value of the X tilt axis"/> - <arg name="tilt_y" type="fixed" summary="The current value of the Y tilt axis"/> - </event> - - <event name="rotation"> - <description summary="z-rotation change event"> - Sent whenever the z-rotation axis on the tool changes. The - rotation value is in degrees clockwise from the tool's - logical neutral position. - </description> - <arg name="degrees" type="fixed" summary="The current rotation of the Z axis"/> - </event> - - <event name="slider"> - <description summary="Slider position change event"> - 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. - </description> - <arg name="position" type="int" summary="The current position of slider"/> - </event> - - <event name="wheel"> - <description summary="Wheel delta event"> - 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. - </description> - <arg name="degrees" type="fixed" summary="The wheel delta in degrees"/> - <arg name="clicks" type="int" summary="The wheel delta in discrete clicks"/> - </event> - - <enum name="button_state"> - <description summary="physical button state"> - Describes the physical state of a button that produced the button event. - </description> - <entry name="released" value="0" summary="button is not pressed"/> - <entry name="pressed" value="1" summary="button is pressed"/> - </enum> - - <event name="button"> - <description summary="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. - </description> - <arg name="serial" type="uint"/> - <arg name="button" type="uint" summary="The button whose state has changed"/> - <arg name="state" type="uint" enum="button_state" summary="Whether the button was pressed or released"/> - </event> - - <event name="frame"> - <description summary="frame event"> - 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. - </description> - <arg name="time" type="uint" summary="The time of the event with millisecond granularity"/> - </event> - - <enum name="error"> - <entry name="role" value="0" summary="given wl_surface has another role"/> - </enum> - </interface> - - <interface name="zwp_tablet_v2" version="1"> - <description summary="graphics tablet device"> - 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the tablet object"> - This destroys the client's resource for this tablet object. - </description> - </request> - - <event name="name"> - <description summary="tablet device name"> - This event is sent in the initial burst of events before the - wp_tablet.done event. - </description> - <arg name="name" type="string" summary="the device name"/> - </event> - - <event name="id"> - <description summary="tablet device USB vendor/product id"> - This event is sent in the initial burst of events before the - wp_tablet.done event. - </description> - <arg name="vid" type="uint" summary="USB vendor id"/> - <arg name="pid" type="uint" summary="USB product id"/> - </event> - - <event name="path"> - <description summary="path to the device"> - 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. - </description> - <arg name="path" type="string" summary="path to local device"/> - </event> - - <event name="done"> - <description summary="tablet description events sequence complete"> - 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. - </description> - </event> - - <event name="removed"> - <description summary="tablet removed event"> - 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. - </description> - </event> - </interface> - - <interface name="zwp_tablet_pad_ring_v2" version="1"> - <description summary="pad ring"> - 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. - </description> - - <request name="set_feedback"> - <description summary="set compositor feedback"> - 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. - </description> - <arg name="description" type="string" summary="ring description"/> - <arg name="serial" type="uint" summary="serial of the mode switch event"/> - </request> - - <request name="destroy" type="destructor"> - <description summary="destroy the ring object"> - This destroys the client's resource for this ring object. - </description> - </request> - - <enum name="source"> - <description summary="ring axis source"> - 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. - </description> - <entry name="finger" value="1" summary="finger"/> - </enum> - - <event name="source"> - <description summary="ring event source"> - 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. - </description> - <arg name="source" type="uint" enum="source" summary="the event source"/> - </event> - - <event name="angle"> - <description summary="angle changed"> - 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. - </description> - <arg name="degrees" type="fixed" summary="the current angle in degrees"/> - </event> - - <event name="stop"> - <description summary="interaction stopped"> - 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. - </description> - </event> - - <event name="frame"> - <description summary="end of a ring event sequence"> - 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. - </description> - <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> - </event> - </interface> - - <interface name="zwp_tablet_pad_strip_v2" version="1"> - <description summary="pad strip"> - 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. - </description> - - <request name="set_feedback"> - <description summary="set compositor feedback"> - 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. - </description> - <arg name="description" type="string" summary="strip description"/> - <arg name="serial" type="uint" summary="serial of the mode switch event"/> - </request> - - <request name="destroy" type="destructor"> - <description summary="destroy the strip object"> - This destroys the client's resource for this strip object. - </description> - </request> - - <enum name="source"> - <description summary="strip axis source"> - 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. - </description> - <entry name="finger" value="1" summary="finger"/> - </enum> - - <event name="source"> - <description summary="strip event source"> - 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. - </description> - <arg name="source" type="uint" enum="source" summary="the event source"/> - </event> - - <event name="position"> - <description summary="position changed"> - 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. - </description> - <arg name="position" type="uint" summary="the current position"/> - </event> - - <event name="stop"> - <description summary="interaction stopped"> - 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. - </description> - </event> - - <event name="frame"> - <description summary="end of a strip event sequence"> - 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. - </description> - <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> - </event> - </interface> - - <interface name="zwp_tablet_pad_group_v2" version="1"> - <description summary="a set of buttons, rings and strips"> - 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the pad object"> - Destroy the wp_tablet_pad_group object. Objects created from this object - are unaffected and should be destroyed separately. - </description> - </request> - - <event name="buttons"> - <description summary="buttons announced"> - 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. - </description> - <arg name="buttons" type="array" summary="buttons in this group"/> - </event> - - <event name="ring"> - <description summary="ring announced"> - 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. - </description> - <arg name="ring" type="new_id" interface="zwp_tablet_pad_ring_v2"/> - </event> - - <event name="strip"> - <description summary="strip announced"> - 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. - </description> - <arg name="strip" type="new_id" interface="zwp_tablet_pad_strip_v2"/> - </event> - - <event name="modes"> - <description summary="mode-switch ability announced"> - 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. - </description> - <arg name="modes" type="uint" summary="the number of modes"/> - </event> - - <event name="done"> - <description summary="tablet group description events sequence complete"> - 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. - </description> - </event> - - <event name="mode_switch"> - <description summary="mode switch event"> - 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. - </description> - <arg name="time" type="uint" summary="the time of the event with millisecond granularity"/> - <arg name="serial" type="uint"/> - <arg name="mode" type="uint" summary="the new mode of the pad"/> - </event> - </interface> - - <interface name="zwp_tablet_pad_v2" version="1"> - <description summary="a set of buttons, rings and strips"> - 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. - </description> - - <request name="set_feedback"> - <description summary="set compositor feedback"> - 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. - </description> - <arg name="button" type="uint" summary="button index"/> - <arg name="description" type="string" summary="button description"/> - <arg name="serial" type="uint" summary="serial of the mode switch event"/> - </request> - - <request name="destroy" type="destructor"> - <description summary="destroy the pad object"> - Destroy the wp_tablet_pad object. Objects created from this object - are unaffected and should be destroyed separately. - </description> - </request> - - <event name="group"> - <description summary="group announced"> - 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. - </description> - <arg name="pad_group" type="new_id" interface="zwp_tablet_pad_group_v2"/> - </event> - - <event name="path"> - <description summary="path to the device"> - 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. - </description> - <arg name="path" type="string" summary="path to local device"/> - </event> - - <event name="buttons"> - <description summary="buttons announced"> - 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. - </description> - <arg name="buttons" type="uint" summary="the number of buttons"/> - </event> - - <event name="done"> - <description summary="pad description event sequence complete"> - 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. - </description> - </event> - - <enum name="button_state"> - <description summary="physical button state"> - Describes the physical state of a button that caused the button - event. - </description> - <entry name="released" value="0" summary="the button is not pressed"/> - <entry name="pressed" value="1" summary="the button is pressed"/> - </enum> - - <event name="button"> - <description summary="physical button state"> - Sent whenever the physical state of a button changes. - </description> - <arg name="time" type="uint" summary="the time of the event with millisecond granularity"/> - <arg name="button" type="uint" summary="the index of the button that changed state"/> - <arg name="state" type="uint" enum="button_state"/> - </event> - - <event name="enter"> - <description summary="enter event"> - Notification that this pad is focused on the specified surface. - </description> - <arg name="serial" type="uint" summary="serial number of the enter event"/> - <arg name="tablet" type="object" interface="zwp_tablet_v2" summary="the tablet the pad is attached to"/> - <arg name="surface" type="object" interface="wl_surface" summary="surface the pad is focused on"/> - </event> - - <event name="leave"> - <description summary="enter event"> - Notification that this pad is no longer focused on the specified - surface. - </description> - <arg name="serial" type="uint" summary="serial number of the leave event"/> - <arg name="surface" type="object" interface="wl_surface" summary="surface the pad is no longer focused on"/> - </event> - - <event name="removed"> - <description summary="pad removed event"> - 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. - </description> - </event> - </interface> -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/unstable/text-input/README b/chromium/third_party/wayland-protocols/src/unstable/text-input/README deleted file mode 100644 index afa4bacf521..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/text-input/README +++ /dev/null @@ -1,4 +0,0 @@ -Text input protocol - -Maintainers: -Jan Arne Petersen <janarne@gmail.com> diff --git a/chromium/third_party/wayland-protocols/src/unstable/text-input/text-input-unstable-v1.xml b/chromium/third_party/wayland-protocols/src/unstable/text-input/text-input-unstable-v1.xml deleted file mode 100644 index 29a217ebe2e..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/text-input/text-input-unstable-v1.xml +++ /dev/null @@ -1,385 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="text_input_unstable_v1"> - - <copyright> - 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. - </copyright> - - <interface name="zwp_text_input_v1" version="1"> - <description summary="text input"> - 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. - </description> - - <request name="activate"> - <description summary="request activation"> - 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. - </description> - <arg name="seat" type="object" interface="wl_seat"/> - <arg name="surface" type="object" interface="wl_surface"/> - </request> - - <request name="deactivate"> - <description summary="request deactivation"> - 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. - </description> - <arg name="seat" type="object" interface="wl_seat"/> - </request> - - <request name="show_input_panel"> - <description summary="show input panels"> - Requests input panels (virtual keyboard) to show. - </description> - </request> - - <request name="hide_input_panel"> - <description summary="hide input panels"> - Requests input panels (virtual keyboard) to hide. - </description> - </request> - - <request name="reset"> - <description summary="reset"> - 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. - </description> - </request> - - <request name="set_surrounding_text"> - <description summary="sets the surrounding text"> - 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. - </description> - <arg name="text" type="string"/> - <arg name="cursor" type="uint"/> - <arg name="anchor" type="uint"/> - </request> - - <enum name="content_hint"> - <description summary="content hint"> - Content hint is a bitmask to allow to modify the behavior of the text - input. - </description> - <entry name="none" value="0x0" summary="no special behaviour"/> - <entry name="default" value="0x7" summary="auto completion, correction and capitalization"/> - <entry name="password" value="0xc0" summary="hidden and sensitive text"/> - <entry name="auto_completion" value="0x1" summary="suggest word completions"/> - <entry name="auto_correction" value="0x2" summary="suggest word corrections"/> - <entry name="auto_capitalization" value="0x4" summary="switch to uppercase letters at the start of a sentence"/> - <entry name="lowercase" value="0x8" summary="prefer lowercase letters"/> - <entry name="uppercase" value="0x10" summary="prefer uppercase letters"/> - <entry name="titlecase" value="0x20" summary="prefer casing for titles and headings (can be language dependent)"/> - <entry name="hidden_text" value="0x40" summary="characters should be hidden"/> - <entry name="sensitive_data" value="0x80" summary="typed text should not be stored"/> - <entry name="latin" value="0x100" summary="just latin characters should be entered"/> - <entry name="multiline" value="0x200" summary="the text input is multiline"/> - </enum> - - <enum name="content_purpose"> - <description summary="content purpose"> - 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. - </description> - <entry name="normal" value="0" summary="default input, allowing all characters"/> - <entry name="alpha" value="1" summary="allow only alphabetic characters"/> - <entry name="digits" value="2" summary="allow only digits"/> - <entry name="number" value="3" summary="input a number (including decimal separator and sign)"/> - <entry name="phone" value="4" summary="input a phone number"/> - <entry name="url" value="5" summary="input an URL"/> - <entry name="email" value="6" summary="input an email address"/> - <entry name="name" value="7" summary="input a name of a person"/> - <entry name="password" value="8" summary="input a password (combine with password or sensitive_data hint)"/> - <entry name="date" value="9" summary="input a date"/> - <entry name="time" value="10" summary="input a time"/> - <entry name="datetime" value="11" summary="input a date and time"/> - <entry name="terminal" value="12" summary="input for a terminal"/> - </enum> - - <request name="set_content_type"> - <description summary="set content purpose and hint"> - 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. - </description> - <arg name="hint" type="uint"/> - <arg name="purpose" type="uint"/> - </request> - - <request name="set_cursor_rectangle"> - <arg name="x" type="int"/> - <arg name="y" type="int"/> - <arg name="width" type="int"/> - <arg name="height" type="int"/> - </request> - - <request name="set_preferred_language"> - <description summary="sets preferred language"> - 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. - </description> - <arg name="language" type="string"/> - </request> - - <request name="commit_state"> - <arg name="serial" type="uint" summary="used to identify the known state"/> - </request> - - <request name="invoke_action"> - <arg name="button" type="uint"/> - <arg name="index" type="uint"/> - </request> - - <event name="enter"> - <description summary="enter event"> - Notify the text_input object when it received focus. Typically in - response to an activate request. - </description> - <arg name="surface" type="object" interface="wl_surface"/> - </event> - - <event name="leave"> - <description summary="leave event"> - 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. - </description> - </event> - - <event name="modifiers_map"> - <description summary="modifiers map"> - 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. - </description> - <arg name="map" type="array"/> - </event> - - <event name="input_panel_state"> - <description summary="state of the input panel"> - Notify when the visibility state of the input panel changed. - </description> - <arg name="state" type="uint"/> - </event> - - <event name="preedit_string"> - <description summary="pre-edit"> - 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. - </description> - <arg name="serial" type="uint" summary="serial of the latest known text input state"/> - <arg name="text" type="string"/> - <arg name="commit" type="string"/> - </event> - - <enum name="preedit_style"> - <entry name="default" value="0" summary="default style for composing text"/> - <entry name="none" value="1" summary="style should be the same as in non-composing text"/> - <entry name="active" value="2"/> - <entry name="inactive" value="3"/> - <entry name="highlight" value="4"/> - <entry name="underline" value="5"/> - <entry name="selection" value="6"/> - <entry name="incorrect" value="7"/> - </enum> - - <event name="preedit_styling"> - <description summary="pre-edit styling"> - 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. - </description> - <arg name="index" type="uint"/> - <arg name="length" type="uint"/> - <arg name="style" type="uint"/> - </event> - - <event name="preedit_cursor"> - <description summary="pre-edit cursor"> - 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. - </description> - <arg name="index" type="int"/> - </event> - - <event name="commit_string"> - <description summary="commit"> - 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. - </description> - <arg name="serial" type="uint" summary="serial of the latest known text input state"/> - <arg name="text" type="string"/> - </event> - - <event name="cursor_position"> - <description summary="set cursor to new position"> - Notify when the cursor or anchor position should be modified. - - This event should be handled as part of a following commit_string - event. - </description> - <arg name="index" type="int"/> - <arg name="anchor" type="int"/> - </event> - - <event name="delete_surrounding_text"> - <description summary="delete surrounding text"> - 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. - </description> - <arg name="index" type="int"/> - <arg name="length" type="uint"/> - </event> - - <event name="keysym"> - <description summary="keysym"> - 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) - </description> - <arg name="serial" type="uint" summary="serial of the latest known text input state"/> - <arg name="time" type="uint"/> - <arg name="sym" type="uint"/> - <arg name="state" type="uint"/> - <arg name="modifiers" type="uint"/> - </event> - - <event name="language"> - <description summary="language"> - Sets the language of the input text. The "language" argument is an - RFC-3066 format language tag. - </description> - <arg name="serial" type="uint" summary="serial of the latest known text input state"/> - <arg name="language" type="string"/> - </event> - - <enum name="text_direction"> - <entry name="auto" value="0" summary="automatic text direction based on text and language"/> - <entry name="ltr" value="1" summary="left-to-right"/> - <entry name="rtl" value="2" summary="right-to-left"/> - </enum> - - <event name="text_direction"> - <description summary="text direction"> - 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. - </description> - <arg name="serial" type="uint" summary="serial of the latest known text input state"/> - <arg name="direction" type="uint"/> - </event> - </interface> - - <interface name="zwp_text_input_manager_v1" version="1"> - <description summary="text input manager"> - A factory for text_input objects. This object is a global singleton. - </description> - - <request name="create_text_input"> - <description summary="create text input"> - Creates a new text_input object. - </description> - <arg name="id" type="new_id" interface="zwp_text_input_v1"/> - </request> - </interface> - -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/unstable/xdg-foreign/README b/chromium/third_party/wayland-protocols/src/unstable/xdg-foreign/README deleted file mode 100644 index f5bcb838f34..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/xdg-foreign/README +++ /dev/null @@ -1,4 +0,0 @@ -xdg foreign protocol - -Maintainers: -Jonas Ådahl <jadahl@gmail.com> diff --git a/chromium/third_party/wayland-protocols/src/unstable/xdg-foreign/xdg-foreign-unstable-v1.xml b/chromium/third_party/wayland-protocols/src/unstable/xdg-foreign/xdg-foreign-unstable-v1.xml deleted file mode 100644 index 062b09041a2..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/xdg-foreign/xdg-foreign-unstable-v1.xml +++ /dev/null @@ -1,182 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="xdg_foreign_unstable_v1"> - - <copyright> - 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. - </copyright> - - <description summary="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. - - 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. - </description> - - <interface name="zxdg_exporter_v1" version="1"> - <description summary="interface for exporting surfaces"> - A global interface used for exporting surfaces that can later be imported - using xdg_importer. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the xdg_exporter object"> - Notify the compositor that the xdg_exporter object will no longer be - used. - </description> - </request> - - <request name="export"> - <description summary="export a surface"> - 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 a xdg_imported multiple times. Only xdg_surface - surfaces may be exported. - </description> - <arg name="id" type="new_id" interface="zxdg_exported_v1" - summary="the new xdg_exported object"/> - <arg name="surface" type="object" interface="wl_surface" - summary="the surface to export"/> - </request> - </interface> - - <interface name="zxdg_importer_v1" version="1"> - <description summary="interface for importing surfaces"> - 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the xdg_importer object"> - Notify the compositor that the xdg_importer object will no longer be - used. - </description> - </request> - - <request name="import"> - <description summary="import a surface"> - 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. - </description> - <arg name="id" type="new_id" interface="zxdg_imported_v1" - summary="the new xdg_imported object"/> - <arg name="handle" type="string" - summary="the exported surface handle"/> - </request> - </interface> - - <interface name="zxdg_exported_v1" version="1"> - <description summary="an exported surface handle"> - A 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="unexport the exported surface"> - 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. - </description> - </request> - - <event name="handle"> - <description summary="the exported surface 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. - </description> - <arg name="handle" type="string" summary="the exported surface handle"/> - </event> - </interface> - - <interface name="zxdg_imported_v1" version="1"> - <description summary="an imported surface handle"> - A 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the xdg_imported object"> - 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. - </description> - </request> - - <request name="set_parent_of"> - <description summary="set as the parent of some surface"> - 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. - </description> - <arg name="surface" type="object" interface="wl_surface" - summary="the child surface"/> - </request> - - <event name="destroyed"> - <description summary="the imported surface handle has been destroyed"> - 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. - </description> - </event> - </interface> - -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/unstable/xdg-foreign/xdg-foreign-unstable-v2.xml b/chromium/third_party/wayland-protocols/src/unstable/xdg-foreign/xdg-foreign-unstable-v2.xml deleted file mode 100644 index bf46fa8096c..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/xdg-foreign/xdg-foreign-unstable-v2.xml +++ /dev/null @@ -1,182 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="xdg_foreign_unstable_v2"> - - <copyright> - 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. - </copyright> - - <description summary="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_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. - </description> - - <interface name="zxdg_exporter_v2" version="1"> - <description summary="interface for exporting surfaces"> - A global interface used for exporting surfaces that can later be imported - using xdg_importer. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the xdg_exporter object"> - Notify the compositor that the xdg_exporter object will no longer be - used. - </description> - </request> - - <request name="export_toplevel"> - <description summary="export a toplevel surface"> - 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 a xdg_imported multiple times. Only xdg_toplevel - equivalent surfaces may be exported. - </description> - <arg name="id" type="new_id" interface="zxdg_exported_v2" - summary="the new xdg_exported object"/> - <arg name="surface" type="object" interface="wl_surface" - summary="the surface to export"/> - </request> - </interface> - - <interface name="zxdg_importer_v2" version="1"> - <description summary="interface for importing surfaces"> - 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the xdg_importer object"> - Notify the compositor that the xdg_importer object will no longer be - used. - </description> - </request> - - <request name="import_toplevel"> - <description summary="import a toplevel surface"> - 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. - </description> - <arg name="id" type="new_id" interface="zxdg_imported_v2" - summary="the new xdg_imported object"/> - <arg name="handle" type="string" - summary="the exported surface handle"/> - </request> - </interface> - - <interface name="zxdg_exported_v2" version="1"> - <description summary="an exported surface handle"> - A 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="unexport the exported surface"> - 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. - </description> - </request> - - <event name="handle"> - <description summary="the exported surface 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. - </description> - <arg name="handle" type="string" summary="the exported surface handle"/> - </event> - </interface> - - <interface name="zxdg_imported_v2" version="1"> - <description summary="an imported surface handle"> - A 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the xdg_imported object"> - 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. - </description> - </request> - - <request name="set_parent_of"> - <description summary="set as the parent of some surface"> - Set the imported surface as the parent of some surface of the client. - The passed surface must be a xdg_toplevel equivalent. Calling this - function sets up a surface to surface relation with the same stacking - and positioning semantics as xdg_toplevel.set_parent. - </description> - <arg name="surface" type="object" interface="wl_surface" - summary="the child surface"/> - </request> - - <event name="destroyed"> - <description summary="the imported surface handle has been destroyed"> - 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. - </description> - </event> - </interface> - -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/unstable/xdg-output/README b/chromium/third_party/wayland-protocols/src/unstable/xdg-output/README deleted file mode 100644 index e42b7115fd8..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/xdg-output/README +++ /dev/null @@ -1,4 +0,0 @@ -xdg_output protocol - -Maintainers: -Olivier Fourdan <ofourdan@redhat.com> diff --git a/chromium/third_party/wayland-protocols/src/unstable/xdg-output/xdg-output-unstable-v1.xml b/chromium/third_party/wayland-protocols/src/unstable/xdg-output/xdg-output-unstable-v1.xml deleted file mode 100644 index 0c0c481ae50..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/xdg-output/xdg-output-unstable-v1.xml +++ /dev/null @@ -1,161 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="xdg_output_unstable_v1"> - - <copyright> - 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. - </copyright> - - <description summary="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. - - 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. - </description> - - <interface name="zxdg_output_manager_v1" version="1"> - <description summary="manage xdg_output objects"> - A global factory interface for xdg_output objects. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the xdg_output_manager object"> - 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. - </description> - </request> - - <request name="get_xdg_output"> - <description summary="create an xdg output from a wl_output"> - This creates a new xdg_output object for the given wl_output. - </description> - <arg name="id" type="new_id" interface="zxdg_output_v1"/> - <arg name="output" type="object" interface="wl_output"/> - </request> - </interface> - - <interface name="zxdg_output_v1" version="1"> - <description summary="compositor logical output region"> - An xdg_output describes part of the compositor geometry. - - This typically corresponds to a monitor that displays part of the - compositor space. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the xdg_output object"> - Using this request a client can tell the server that it is not - going to use the xdg_output object anymore. - </description> - </request> - - <event name="logical_position"> - <description summary="position of the output within the global compositor space"> - 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. - </description> - <arg name="x" type="int" - summary="x position within the global compositor space"/> - <arg name="y" type="int" - summary="y position within the global compositor space"/> - </event> - - <event name="logical_size"> - <description summary="size of the output in the global compositor space"> - The logical_size event describes the size of the output in the - global compositor space. - - For example, a surface without any buffer scale, transformation - nor rotation set, with the size matching the logical_size will - have the same size as the corresponding output when displayed. - - Most regular Wayland clients should not pay attention to the - logical size and would rather rely on xdg_shell interfaces. - - Some clients such as Xwayland, however, need this to configure - their surfaces in the global compositor space as the compositor - may apply a different scale from what is advertised by the output - scaling property (to achieve fractional scaling, for example). - - For example, for a wl_output mode 3840×2160 and a scale factor 2: - - - A compositor not scaling the surface buffers will advertise a - logical size of 3840×2160, - - - A compositor automatically scaling the surface buffers will - advertise a logical size of 1920×1080, - - - A compositor using a fractional scale of 1.5 will advertise a - logical size to 2560×1620. - - 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). - </description> - <arg name="width" type="int" - summary="width in global compositor space"/> - <arg name="height" type="int" - summary="height in global compositor space"/> - </event> - - <event name="done"> - <description summary="all information about the output have been sent"> - 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. - </description> - </event> - - </interface> -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/unstable/xdg-shell/README b/chromium/third_party/wayland-protocols/src/unstable/xdg-shell/README deleted file mode 100644 index 96ae4ef0073..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/xdg-shell/README +++ /dev/null @@ -1,4 +0,0 @@ -xdg shell protocol - -Maintainers: -Jasper St. Pierre <jstpierre@mecheye.net> diff --git a/chromium/third_party/wayland-protocols/src/unstable/xdg-shell/xdg-shell-unstable-v5.xml b/chromium/third_party/wayland-protocols/src/unstable/xdg-shell/xdg-shell-unstable-v5.xml deleted file mode 100644 index ef0180d0107..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/xdg-shell/xdg-shell-unstable-v5.xml +++ /dev/null @@ -1,623 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="xdg_shell_unstable_v5"> - - <copyright> - 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. - </copyright> - - <interface name="xdg_shell" version="1"> - <description summary="create desktop-style surfaces"> - 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. - </description> - - <enum name="version"> - <description summary="latest protocol version"> - 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. - </description> - <entry name="current" value="5" summary="Always the latest version"/> - </enum> - - <enum name="error"> - <entry name="role" value="0" summary="given wl_surface has another role"/> - <entry name="defunct_surfaces" value="1" summary="xdg_shell was destroyed before children"/> - <entry name="not_the_topmost_popup" value="2" summary="the client tried to map or destroy a non-topmost popup"/> - <entry name="invalid_popup_parent" value="3" summary="the client specified an invalid popup parent surface"/> - </enum> - - <request name="destroy" type="destructor"> - <description summary="destroy xdg_shell"> - 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. - </description> - </request> - - <request name="use_unstable_version"> - <description summary="enable use of this unstable version"> - 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. - </description> - <arg name="version" type="int"/> - </request> - - <request name="get_xdg_surface"> - <description summary="create a shell surface from a surface"> - 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. - </description> - <arg name="id" type="new_id" interface="xdg_surface"/> - <arg name="surface" type="object" interface="wl_surface"/> - </request> - - <request name="get_xdg_popup"> - <description summary="create a popup for a surface"> - 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. - </description> - <arg name="id" type="new_id" interface="xdg_popup"/> - <arg name="surface" type="object" interface="wl_surface"/> - <arg name="parent" type="object" interface="wl_surface"/> - <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/> - <arg name="serial" type="uint" summary="the serial of the user event"/> - <arg name="x" type="int"/> - <arg name="y" type="int"/> - </request> - - <event name="ping"> - <description summary="check if the client is alive"> - 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. - </description> - <arg name="serial" type="uint" summary="pass this to the pong request"/> - </event> - - <request name="pong"> - <description summary="respond to a ping event"> - A client must respond to a ping event with a pong request or - the client may be deemed unresponsive. - </description> - <arg name="serial" type="uint" summary="serial of the ping event"/> - </request> - </interface> - - <interface name="xdg_surface" version="1"> - <description summary="A desktop window"> - 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="Destroy the xdg_surface"> - 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. - </description> - </request> - - <request name="set_parent"> - <description summary="set the parent of this surface"> - 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. - </description> - <arg name="parent" type="object" interface="xdg_surface" allow-null="true"/> - </request> - - <request name="set_title"> - <description summary="set surface title"> - 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. - </description> - <arg name="title" type="string"/> - </request> - - <request name="set_app_id"> - <description summary="set application ID"> - 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/ - </description> - <arg name="app_id" type="string"/> - </request> - - <request name="show_window_menu"> - <description summary="show the window menu"> - 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. - </description> - <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/> - <arg name="serial" type="uint" summary="the serial of the user event"/> - <arg name="x" type="int" summary="the x position to pop up the window menu at"/> - <arg name="y" type="int" summary="the y position to pop up the window menu at"/> - </request> - - <request name="move"> - <description summary="start an interactive move"> - 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. - </description> - <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/> - <arg name="serial" type="uint" summary="the serial of the user event"/> - </request> - - <enum name="resize_edge"> - <description summary="edge values for resizing"> - These values are used to indicate which edge of a surface - is being dragged in a resize operation. - </description> - <entry name="none" value="0"/> - <entry name="top" value="1"/> - <entry name="bottom" value="2"/> - <entry name="left" value="4"/> - <entry name="top_left" value="5"/> - <entry name="bottom_left" value="6"/> - <entry name="right" value="8"/> - <entry name="top_right" value="9"/> - <entry name="bottom_right" value="10"/> - </enum> - - <request name="resize"> - <description summary="start an interactive resize"> - 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. - </description> - <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/> - <arg name="serial" type="uint" summary="the serial of the user event"/> - <arg name="edges" type="uint" summary="which edge or corner is being dragged"/> - </request> - - <enum name="state"> - <description summary="types of state on the surface"> - The different state values used on the surface. This is designed for - state values like maximized, fullscreen. It is paired with the - configure event to ensure that both the client and the compositor - setting the state can be synchronized. - - States set in this way are double-buffered. They will get applied on - the next commit. - - Desktop environments may extend this enum by taking up a range of - values and documenting the range they chose in this description. - They are not required to document the values for the range that they - chose. Ideally, any good extensions from a desktop environment should - make its way into standardization into this enum. - - The current reserved ranges are: - - 0x0000 - 0x0FFF: xdg-shell core values, documented below. - 0x1000 - 0x1FFF: GNOME - 0x2000 - 0x2FFF: EFL - </description> - <entry name="maximized" value="1" summary="the surface is maximized"> - <description summary="the surface is maximized"> - The surface is maximized. The window geometry specified in the configure - event must be obeyed by the client. - </description> - </entry> - <entry name="fullscreen" value="2" summary="the surface is fullscreen"> - <description summary="the surface is fullscreen"> - The surface is fullscreen. The window geometry specified in the configure - event must be obeyed by the client. - </description> - </entry> - <entry name="resizing" value="3" summary="the surface is being resized"> - <description summary="the surface is being resized"> - 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. - </description> - </entry> - <entry name="activated" value="4" summary="the surface is now activated"> - <description summary="the surface is now activated"> - 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. - </description> - </entry> - </enum> - - <event name="configure"> - <description summary="suggest a surface change"> - 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. - </description> - <arg name="width" type="int"/> - <arg name="height" type="int"/> - <arg name="states" type="array"/> - <arg name="serial" type="uint"/> - </event> - - <request name="ack_configure"> - <description summary="ack a configure event"> - 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. - </description> - <arg name="serial" type="uint" summary="the serial from the configure event"/> - </request> - - <request name="set_window_geometry"> - <description summary="set the new window geometry"> - The window geometry of a window is its "visible bounds" from the - user's perspective. Client-side decorations often have invisible - portions like drop-shadows which should be ignored for the - purposes of aligning, placing and constraining windows. - - The window geometry is double buffered, and will be applied at the - time wl_surface.commit of the corresponding wl_surface is called. - - Once the window geometry of the surface is set once, it is not - possible to unset it, and it will remain the same until - set_window_geometry is called again, even if a new subsurface or - buffer is attached. - - If never set, the value is the full bounds of the surface, - including any subsurfaces. This updates dynamically on every - commit. This unset mode is meant for extremely simple clients. - - If responding to a configure event, the window geometry in here - must respect the sizing negotiations specified by the states in - the configure event. - - The arguments are given in the surface local coordinate space of - the wl_surface associated with this xdg_surface. - - The width and height must be greater than zero. - </description> - <arg name="x" type="int"/> - <arg name="y" type="int"/> - <arg name="width" type="int"/> - <arg name="height" type="int"/> - </request> - - <request name="set_maximized"> - <description summary="maximize the window"> - 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. - </description> - </request> - - <request name="unset_maximized"> - <description summary="unmaximize the window"> - 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. - </description> - </request> - - <request name="set_fullscreen"> - <description summary="set the window as fullscreen on a monitor"> - 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. - </description> - <arg name="output" type="object" interface="wl_output" allow-null="true"/> - </request> - <request name="unset_fullscreen" /> - - <request name="set_minimized"> - <description summary="set the window as minimized"> - 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. - </description> - </request> - - <event name="close"> - <description summary="surface wants to be closed"> - 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... - </description> - </event> - </interface> - - <interface name="xdg_popup" version="1"> - <description summary="short-lived, popup surfaces for menus"> - 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="remove xdg_popup interface"> - 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. - </description> - </request> - - <event name="popup_done"> - <description summary="popup interaction is done"> - 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. - </description> - </event> - - </interface> -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/unstable/xdg-shell/xdg-shell-unstable-v6.xml b/chromium/third_party/wayland-protocols/src/unstable/xdg-shell/xdg-shell-unstable-v6.xml deleted file mode 100644 index 1c0f92452b9..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/xdg-shell/xdg-shell-unstable-v6.xml +++ /dev/null @@ -1,1044 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="xdg_shell_unstable_v6"> - - <copyright> - 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. - </copyright> - - <interface name="zxdg_shell_v6" version="1"> - <description summary="create desktop-style surfaces"> - 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. - </description> - - <enum name="error"> - <entry name="role" value="0" summary="given wl_surface has another role"/> - <entry name="defunct_surfaces" value="1" - summary="xdg_shell was destroyed before children"/> - <entry name="not_the_topmost_popup" value="2" - summary="the client tried to map or destroy a non-topmost popup"/> - <entry name="invalid_popup_parent" value="3" - summary="the client specified an invalid popup parent surface"/> - <entry name="invalid_surface_state" value="4" - summary="the client provided an invalid surface state"/> - <entry name="invalid_positioner" value="5" - summary="the client provided an invalid positioner"/> - </enum> - - <request name="destroy" type="destructor"> - <description summary="destroy xdg_shell"> - 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. - </description> - </request> - - <request name="create_positioner"> - <description summary="create a positioner object"> - 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. - </description> - <arg name="id" type="new_id" interface="zxdg_positioner_v6"/> - </request> - - <request name="get_xdg_surface"> - <description summary="create a shell surface from a surface"> - 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. - </description> - <arg name="id" type="new_id" interface="zxdg_surface_v6"/> - <arg name="surface" type="object" interface="wl_surface"/> - </request> - - <request name="pong"> - <description summary="respond to a ping event"> - A client must respond to a ping event with a pong request or - the client may be deemed unresponsive. See xdg_shell.ping. - </description> - <arg name="serial" type="uint" summary="serial of the ping event"/> - </request> - - <event name="ping"> - <description summary="check if the client is alive"> - 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. - </description> - <arg name="serial" type="uint" summary="pass this to the pong request"/> - </event> - </interface> - - <interface name="zxdg_positioner_v6" version="1"> - <description summary="child surface positioner"> - 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. - </description> - - <enum name="error"> - <entry name="invalid_input" value="0" summary="invalid input provided"/> - </enum> - - <request name="destroy" type="destructor"> - <description summary="destroy the xdg_positioner object"> - Notify the compositor that the xdg_positioner will no longer be used. - </description> - </request> - - <request name="set_size"> - <description summary="set the size of the to-be positioned rectangle"> - 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. - </description> - <arg name="width" type="int" summary="width of positioned rectangle"/> - <arg name="height" type="int" summary="height of positioned rectangle"/> - </request> - - <request name="set_anchor_rect"> - <description summary="set the anchor rectangle within the parent surface"> - 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. - </description> - <arg name="x" type="int" summary="x position of anchor rectangle"/> - <arg name="y" type="int" summary="y position of anchor rectangle"/> - <arg name="width" type="int" summary="width of anchor rectangle"/> - <arg name="height" type="int" summary="height of anchor rectangle"/> - </request> - - <enum name="anchor" bitfield="true"> - <entry name="none" value="0" - summary="the center of the anchor rectangle"/> - <entry name="top" value="1" - summary="the top edge of the anchor rectangle"/> - <entry name="bottom" value="2" - summary="the bottom edge of the anchor rectangle"/> - <entry name="left" value="4" - summary="the left edge of the anchor rectangle"/> - <entry name="right" value="8" - summary="the right edge of the anchor rectangle"/> - </enum> - - <request name="set_anchor"> - <description summary="set anchor rectangle anchor edges"> - 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. - </description> - <arg name="anchor" type="uint" enum="anchor" - summary="bit mask of anchor edges"/> - </request> - - <enum name="gravity" bitfield="true"> - <entry name="none" value="0" - summary="center over the anchor edge"/> - <entry name="top" value="1" - summary="position above the anchor edge"/> - <entry name="bottom" value="2" - summary="position below the anchor edge"/> - <entry name="left" value="4" - summary="position to the left of the anchor edge"/> - <entry name="right" value="8" - summary="position to the right of the anchor edge"/> - </enum> - - <request name="set_gravity"> - <description summary="set child surface gravity"> - 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. - </description> - <arg name="gravity" type="uint" enum="gravity" - summary="bit mask of gravity directions"/> - </request> - - <enum name="constraint_adjustment" bitfield="true"> - <description summary="constraint adjustments"> - 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. - </description> - <entry name="none" value="0"> - <description summary="don't move the child surface when constrained"> - Don't alter the surface position even if it is constrained on some - axis, for example partially outside the edge of a monitor. - </description> - </entry> - <entry name="slide_x" value="1"> - <description summary="move along the x axis until unconstrained"> - 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. - </description> - </entry> - <entry name="slide_y" value="2"> - <description summary="move along the y axis until unconstrained"> - 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. - </description> - </entry> - <entry name="flip_x" value="4"> - <description summary="invert the anchor and gravity on the x axis"> - 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. - </description> - </entry> - <entry name="flip_y" value="8"> - <description summary="invert the anchor and gravity on the y axis"> - 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. - </description> - </entry> - <entry name="resize_x" value="16"> - <description summary="horizontally resize the surface"> - Resize the surface horizontally so that it is completely - unconstrained. - </description> - </entry> - <entry name="resize_y" value="32"> - <description summary="vertically resize the surface"> - Resize the surface vertically so that it is completely unconstrained. - </description> - </entry> - </enum> - - <request name="set_constraint_adjustment"> - <description summary="set the adjustment to be done when constrained"> - 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. - </description> - <arg name="constraint_adjustment" type="uint" - summary="bit mask of constraint adjustments"/> - </request> - - <request name="set_offset"> - <description summary="set surface position offset"> - 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. - </description> - <arg name="x" type="int" summary="surface position x offset"/> - <arg name="y" type="int" summary="surface position y offset"/> - </request> - </interface> - - <interface name="zxdg_surface_v6" version="1"> - <description summary="desktop user interface surface base interface"> - 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 a 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. - </description> - - <enum name="error"> - <entry name="not_constructed" value="1"/> - <entry name="already_constructed" value="2"/> - <entry name="unconfigured_buffer" value="3"/> - </enum> - - <request name="destroy" type="destructor"> - <description summary="destroy the xdg_surface"> - Destroy the xdg_surface object. An xdg_surface must only be destroyed - after its role object has been destroyed. - </description> - </request> - - <request name="get_toplevel"> - <description summary="assign the xdg_toplevel surface role"> - 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. - </description> - <arg name="id" type="new_id" interface="zxdg_toplevel_v6"/> - </request> - - <request name="get_popup"> - <description summary="assign the xdg_popup surface role"> - This creates an xdg_popup object for the given xdg_surface and gives the - associated wl_surface the xdg_popup role. - - See the documentation of xdg_popup for more details about what an - xdg_popup is and how it is used. - </description> - <arg name="id" type="new_id" interface="zxdg_popup_v6"/> - <arg name="parent" type="object" interface="zxdg_surface_v6"/> - <arg name="positioner" type="object" interface="zxdg_positioner_v6"/> - </request> - - <request name="set_window_geometry"> - <description summary="set the new window geometry"> - The window geometry of a surface is its "visible bounds" from the - user's perspective. Client-side decorations often have invisible - portions like drop-shadows which should be ignored for the - purposes of aligning, placing and constraining windows. - - The window geometry is double buffered, and will be applied at the - time wl_surface.commit of the corresponding wl_surface is called. - - Once the window geometry of the surface is set, it is not possible to - unset it, and it will remain the same until set_window_geometry is - called again, even if a new subsurface or buffer is attached. - - If never set, the value is the full bounds of the surface, - including any subsurfaces. This updates dynamically on every - commit. This unset is meant for extremely simple clients. - - The arguments are given in the surface-local coordinate space of - the wl_surface associated with this xdg_surface. - - The width and height must be greater than zero. Setting an invalid size - will raise an error. When applied, the effective window geometry will be - the set window geometry clamped to the bounding rectangle of the - combined geometry of the surface of the xdg_surface and the associated - subsurfaces. - </description> - <arg name="x" type="int"/> - <arg name="y" type="int"/> - <arg name="width" type="int"/> - <arg name="height" type="int"/> - </request> - - <request name="ack_configure"> - <description summary="ack a configure event"> - 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. - </description> - <arg name="serial" type="uint" summary="the serial from the configure event"/> - </request> - - <event name="configure"> - <description summary="suggest a surface change"> - 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. - </description> - <arg name="serial" type="uint" summary="serial of the configure event"/> - </event> - </interface> - - <interface name="zxdg_toplevel_v6" version="1"> - <description summary="toplevel surface"> - 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. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the xdg_toplevel"> - 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. - </description> - </request> - - <request name="set_parent"> - <description summary="set the parent of this surface"> - 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. - </description> - <arg name="parent" type="object" interface="zxdg_toplevel_v6" allow-null="true"/> - </request> - - <request name="set_title"> - <description summary="set surface title"> - 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. - </description> - <arg name="title" type="string"/> - </request> - - <request name="set_app_id"> - <description summary="set application ID"> - 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/ - </description> - <arg name="app_id" type="string"/> - </request> - - <request name="show_window_menu"> - <description summary="show the window menu"> - 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. - </description> - <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/> - <arg name="serial" type="uint" summary="the serial of the user event"/> - <arg name="x" type="int" summary="the x position to pop up the window menu at"/> - <arg name="y" type="int" summary="the y position to pop up the window menu at"/> - </request> - - <request name="move"> - <description summary="start an interactive move"> - 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. - </description> - <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/> - <arg name="serial" type="uint" summary="the serial of the user event"/> - </request> - - <enum name="resize_edge"> - <description summary="edge values for resizing"> - These values are used to indicate which edge of a surface - is being dragged in a resize operation. - </description> - <entry name="none" value="0"/> - <entry name="top" value="1"/> - <entry name="bottom" value="2"/> - <entry name="left" value="4"/> - <entry name="top_left" value="5"/> - <entry name="bottom_left" value="6"/> - <entry name="right" value="8"/> - <entry name="top_right" value="9"/> - <entry name="bottom_right" value="10"/> - </enum> - - <request name="resize"> - <description summary="start an interactive resize"> - 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. - </description> - <arg name="seat" type="object" interface="wl_seat" summary="the wl_seat of the user event"/> - <arg name="serial" type="uint" summary="the serial of the user event"/> - <arg name="edges" type="uint" summary="which edge or corner is being dragged"/> - </request> - - <enum name="state"> - <description summary="types of state on the surface"> - The different state values used on the surface. This is designed for - state values like maximized, fullscreen. It is paired with the - configure event to ensure that both the client and the compositor - setting the state can be synchronized. - - States set in this way are double-buffered. They will get applied on - the next commit. - </description> - <entry name="maximized" value="1" summary="the surface is maximized"> - <description summary="the surface is maximized"> - The surface is maximized. The window geometry specified in the configure - event must be obeyed by the client. - </description> - </entry> - <entry name="fullscreen" value="2" summary="the surface is fullscreen"> - <description summary="the surface is fullscreen"> - The surface is fullscreen. The window geometry specified in the configure - event must be obeyed by the client. - </description> - </entry> - <entry name="resizing" value="3" summary="the surface is being resized"> - <description summary="the surface is being resized"> - 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. - </description> - </entry> - <entry name="activated" value="4" summary="the surface is now activated"> - <description summary="the surface is now activated"> - 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. - </description> - </entry> - </enum> - - <request name="set_max_size"> - <description summary="set the maximum size"> - Set a maximum size for the window. - - The client can specify a maximum size so that the compositor does - not try to configure the window beyond this size. - - The width and height arguments are in window geometry coordinates. - See xdg_surface.set_window_geometry. - - Values set in this way are double-buffered. They will get applied - on the next commit. - - The compositor can use this information to allow or disallow - different states like maximize or fullscreen and draw accurate - animations. - - Similarly, a tiling window manager may use this information to - place and resize client windows in a more effective way. - - The client should not rely on the compositor to obey the maximum - size. The compositor may decide to ignore the values set by the - client and request a larger size. - - If never set, or a value of zero in the request, means that the - client has no expected maximum size in the given dimension. - As a result, a client wishing to reset the maximum size - to an unspecified state can use zero for width and height in the - request. - - Requesting a maximum size to be smaller than the minimum size of - a surface is illegal and will result in a protocol error. - - The width and height must be greater than or equal to zero. Using - strictly negative values for width and height will result in a - protocol error. - </description> - <arg name="width" type="int"/> - <arg name="height" type="int"/> - </request> - - <request name="set_min_size"> - <description summary="set the minimum size"> - Set a minimum size for the window. - - The client can specify a minimum size so that the compositor does - not try to configure the window below this size. - - The width and height arguments are in window geometry coordinates. - See xdg_surface.set_window_geometry. - - Values set in this way are double-buffered. They will get applied - on the next commit. - - The compositor can use this information to allow or disallow - different states like maximize or fullscreen and draw accurate - animations. - - Similarly, a tiling window manager may use this information to - place and resize client windows in a more effective way. - - The client should not rely on the compositor to obey the minimum - size. The compositor may decide to ignore the values set by the - client and request a smaller size. - - If never set, or a value of zero in the request, means that the - client has no expected minimum size in the given dimension. - As a result, a client wishing to reset the minimum size - to an unspecified state can use zero for width and height in the - request. - - Requesting a minimum size to be larger than the maximum size of - a surface is illegal and will result in a protocol error. - - The width and height must be greater than or equal to zero. Using - strictly negative values for width and height will result in a - protocol error. - </description> - <arg name="width" type="int"/> - <arg name="height" type="int"/> - </request> - - <request name="set_maximized"> - <description summary="maximize the window"> - 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. - </description> - </request> - - <request name="unset_maximized"> - <description summary="unmaximize the window"> - 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. - </description> - </request> - - <request name="set_fullscreen"> - <description summary="set the window as fullscreen on a monitor"> - 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. - </description> - <arg name="output" type="object" interface="wl_output" allow-null="true"/> - </request> - <request name="unset_fullscreen" /> - - <request name="set_minimized"> - <description summary="set the window as minimized"> - 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. - </description> - </request> - - <event name="configure"> - <description summary="suggest a surface change"> - 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. - </description> - <arg name="width" type="int"/> - <arg name="height" type="int"/> - <arg name="states" type="array"/> - </event> - - <event name="close"> - <description summary="surface wants to be closed"> - 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. - </description> - </event> - </interface> - - <interface name="zxdg_popup_v6" version="1"> - <description summary="short-lived, popup surfaces for menus"> - 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. - </description> - - <enum name="error"> - <entry name="invalid_grab" value="0" - summary="tried to grab after being mapped"/> - </enum> - - <request name="destroy" type="destructor"> - <description summary="remove xdg_popup interface"> - 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. - </description> - </request> - - <request name="grab"> - <description summary="make the popup take an explicit grab"> - 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. - </description> - <arg name="seat" type="object" interface="wl_seat" - summary="the wl_seat of the user event"/> - <arg name="serial" type="uint" summary="the serial of the user event"/> - </request> - - <event name="configure"> - <description summary="configure the popup surface"> - 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. - </description> - <arg name="x" type="int" - summary="x position relative to parent surface window geometry"/> - <arg name="y" type="int" - summary="y position relative to parent surface window geometry"/> - <arg name="width" type="int" summary="window geometry width"/> - <arg name="height" type="int" summary="window geometry height"/> - </event> - - <event name="popup_done"> - <description summary="popup interaction is done"> - 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. - </description> - </event> - - </interface> -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/unstable/xwayland-keyboard-grab/README b/chromium/third_party/wayland-protocols/src/unstable/xwayland-keyboard-grab/README deleted file mode 100644 index dbe45a50666..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/xwayland-keyboard-grab/README +++ /dev/null @@ -1,4 +0,0 @@ -Xwayland keyboard grabbing protocol - -Maintainers: -Olivier Fourdan <ofourdan@redhat.com> diff --git a/chromium/third_party/wayland-protocols/src/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml b/chromium/third_party/wayland-protocols/src/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml deleted file mode 100644 index be4992fd72d..00000000000 --- a/chromium/third_party/wayland-protocols/src/unstable/xwayland-keyboard-grab/xwayland-keyboard-grab-unstable-v1.xml +++ /dev/null @@ -1,121 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="xwayland_keyboard_grab_unstable_v1"> - - <copyright> - 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. - </copyright> - - <description summary="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. - - 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. - </description> - - <interface name="zwp_xwayland_keyboard_grab_manager_v1" version="1"> - <description summary="context object for keyboard grab manager"> - A global interface used for grabbing the keyboard. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the keyboard grab manager"> - Destroy the keyboard grab manager. - </description> - </request> - - <request name="grab_keyboard"> - <description summary="grab the keyboard to a surface"> - 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. - </description> - - <arg name="id" type="new_id" interface="zwp_xwayland_keyboard_grab_v1"/> - <arg name="surface" type="object" interface="wl_surface" - summary="surface to report keyboard events to"/> - <arg name="seat" type="object" interface="wl_seat" - summary="the seat for which the keyboard should be grabbed"/> - </request> - </interface> - - <interface name="zwp_xwayland_keyboard_grab_v1" version="1"> - <description summary="interface for grabbing the keyboard"> - A global interface used for grabbing the keyboard. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy the grabbed keyboard object"> - Destroy the grabbed keyboard object. If applicable, the compositor - will ungrab the keyboard. - </description> - </request> - </interface> -</protocol> diff --git a/chromium/third_party/wayland-protocols/src/wayland-protocols-uninstalled.pc.in b/chromium/third_party/wayland-protocols/src/wayland-protocols-uninstalled.pc.in deleted file mode 100644 index cf7adf257a7..00000000000 --- a/chromium/third_party/wayland-protocols/src/wayland-protocols-uninstalled.pc.in +++ /dev/null @@ -1,5 +0,0 @@ -pkgdatadir=@abs_top_srcdir@ - -Name: Wayland Protocols -Description: Wayland protocol files (not installed) -Version: @WAYLAND_PROTOCOLS_VERSION@ diff --git a/chromium/third_party/wayland-protocols/src/wayland-protocols.pc.in b/chromium/third_party/wayland-protocols/src/wayland-protocols.pc.in deleted file mode 100644 index 379be0689ea..00000000000 --- a/chromium/third_party/wayland-protocols/src/wayland-protocols.pc.in +++ /dev/null @@ -1,7 +0,0 @@ -prefix=@prefix@ -datarootdir=@datarootdir@ -pkgdatadir=${pc_sysrootdir}@datadir@/@PACKAGE@ - -Name: Wayland Protocols -Description: Wayland protocol files -Version: @WAYLAND_PROTOCOLS_VERSION@ diff --git a/chromium/third_party/wayland-protocols/unstable/alpha-compositing/README b/chromium/third_party/wayland-protocols/unstable/alpha-compositing/README deleted file mode 100644 index a98ad0ed84d..00000000000 --- a/chromium/third_party/wayland-protocols/unstable/alpha-compositing/README +++ /dev/null @@ -1,4 +0,0 @@ -Alpha compositing protocol - -Maintainers: -David Reveman <reveman@chromium.org> diff --git a/chromium/third_party/wayland-protocols/unstable/alpha-compositing/alpha-compositing-unstable-v1.xml b/chromium/third_party/wayland-protocols/unstable/alpha-compositing/alpha-compositing-unstable-v1.xml deleted file mode 100644 index 6f67669b965..00000000000 --- a/chromium/third_party/wayland-protocols/unstable/alpha-compositing/alpha-compositing-unstable-v1.xml +++ /dev/null @@ -1,130 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="alpha_compositing_unstable_v1"> - - <copyright> - Copyright 2016 The Chromium Authors. - - 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. - </copyright> - - <description summary="Protocol for more advanced compositing and blending"> - This protocol specifies a set of interfaces used to control the alpha - compositing and blending of contents. - - 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. - </description> - - <interface name="zcr_alpha_compositing_v1" version="1"> - <description summary="alpha_compositing"> - The global interface exposing compositing and blending capabilities is - used to instantiate an interface extension for a wl_surface object. - This extended interface will then allow the client to specify the - blending equation and alpha value used for compositing the wl_surface. - </description> - - <request name="destroy" type="destructor"> - <description summary="unbind from the blending interface"> - Informs the server that the client will not be using this - protocol object anymore. This does not affect any other objects, - blending objects included. - </description> - </request> - - <enum name="error"> - <entry name="blending_exists" value="0" - summary="the surface already has a blending object associated"/> - </enum> - - <request name="get_blending"> - <description summary="extend surface interface for blending"> - Instantiate an interface extension for the given wl_surface to - provide surface blending. If the given wl_surface already has - a blending object associated, the blending_exists protocol error - is raised. - </description> - - <arg name="id" type="new_id" interface="zcr_blending_v1" - summary="the new blending interface id"/> - <arg name="surface" type="object" interface="wl_surface" - summary="the surface"/> - </request> - </interface> - - <interface name="zcr_blending_v1" version="1"> - <description summary="blending interface to a wl_surface"> - An additional interface to a wl_surface object, which allows the - client to specify the blending equation used for compositing and - an alpha value applied to the whole surface. - - If the wl_surface associated with the bledning object is destroyed, - the blending object becomes inert. - - If the blending object is destroyed, the blending state is removed - from the wl_surface. The change will be applied on the next - wl_surface.commit. - </description> - - <request name="destroy" type="destructor"> - <description summary="remove blending from the surface"> - The associated wl_surface's blending state is removed. - The change is applied on the next wl_surface.commit. - </description> - </request> - - <enum name="blending_equation"> - <description summary="different blending equations for compositing"> - Blending equations that can be used when compositing a surface. - </description> - <entry name="none" value="0" summary="no blending"/> - <entry name="premult" value="1" summary="one / one_minus_src_alpha"/> - <entry name="coverage" value="2" summary="src_alpha / one_minus_src_alpha" /> - </enum> - - <request name="set_blending"> - <description summary="set the blending equation"> - Set the blending equation for compositing the wl_surface. - See wp_alpha_compositing for the description. - - The blending equation state is double-buffered state, - and will be applied on the next wl_surface.commit. - </description> - <arg name="equation" type="uint" summary="the new blending equation"/> - </request> - - <request name="set_alpha"> - <description summary="set the alpha value"> - Set the alpha value applied to the whole surface for compositing. - See wp_alpha_compositing for the description. - - The alpha value state is double-buffered state, - and will be applied on the next wl_surface.commit. - </description> - <arg name="value" type="fixed" summary="the new alpha value"/> - </request> - </interface> - -</protocol> diff --git a/chromium/third_party/wayland-protocols/unstable/cursor-shapes/README b/chromium/third_party/wayland-protocols/unstable/cursor-shapes/README deleted file mode 100644 index d18a72a3061..00000000000 --- a/chromium/third_party/wayland-protocols/unstable/cursor-shapes/README +++ /dev/null @@ -1,4 +0,0 @@ -Cursor shapes protocol - -Maintainers: -Jun Mukai <mukai@chromium.org> diff --git a/chromium/third_party/wayland-protocols/unstable/cursor-shapes/cursor-shapes-unstable-v1.xml b/chromium/third_party/wayland-protocols/unstable/cursor-shapes/cursor-shapes-unstable-v1.xml deleted file mode 100644 index f94a6b4325b..00000000000 --- a/chromium/third_party/wayland-protocols/unstable/cursor-shapes/cursor-shapes-unstable-v1.xml +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="cursor_shapes_v1"> - - <copyright> - Copyright 2018 The Chromium Authors. - - 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. - </copyright> - - <interface name="zcr_cursor_shapes_v1" version="1"> - <description summary="Allows to set the cursor shape"> - Allows to set the semantic cursor shape rather than a surface for a - pointer cursor. - - 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 uinterface version bump. - Backward incompatible changes are done by bumping the version number in - the protocol and uinterface 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. - </description> - - <enum name="error"> - <entry name="invalid_shape" value="0" - summary="the specified shape value is invalid"/> - </enum> - - <enum name="cursor_shape_type"> - <description summary="the type of cursor shape"/> - <entry name="pointer" value="0"/> - <entry name="cross" value="1"/> - <entry name="hand" value="2"/> - <entry name="ibeam" value="3"/> - <entry name="wait" value="4"/> - <entry name="help" value="5"/> - <entry name="east_resize" value="6"/> - <entry name="north_resize" value="7"/> - <entry name="north_east_resize" value="8"/> - <entry name="north_west_resize" value="9"/> - <entry name="south_resize" value="10"/> - <entry name="south_east_resize" value="11"/> - <entry name="south_west_resize" value="12"/> - <entry name="west_resize" value="13"/> - <entry name="north_south_resize" value="14"/> - <entry name="east_west_resize" value="15"/> - <entry name="north_east_south_west_resize" value="16"/> - <entry name="north_west_south_east_resize" value="17"/> - <entry name="column_resize" value="18"/> - <entry name="row_resize" value="19"/> - <entry name="middle_panning" value="20"/> - <entry name="east_panning" value="21"/> - <entry name="north_panning" value="22"/> - <entry name="north_east_panning" value="23"/> - <entry name="north_west_panning" value="24"/> - <entry name="south_panning" value="25"/> - <entry name="south_east_panning" value="26"/> - <entry name="south_west_panning" value="27"/> - <entry name="west_panning" value="28"/> - <entry name="move" value="29"/> - <entry name="vertical_text" value="30"/> - <entry name="cell" value="31"/> - <entry name="context_menu" value="32"/> - <entry name="alias" value="33"/> - <entry name="progress" value="34"/> - <entry name="no_drop" value="35"/> - <entry name="copy" value="36"/> - <entry name="none" value="37"/> - <entry name="not_allowed" value="38"/> - <entry name="zoom_in" value="39"/> - <entry name="zoom_out" value="40"/> - <entry name="grab" value="41"/> - <entry name="grabbing" value="42"/> - <entry name="dnd_none" value="43"/> - <entry name="dnd_move" value="44"/> - <entry name="dnd_copy" value="45"/> - <entry name="dnd_link" value="46"/> - </enum> - - <request name="set_cursor_shape"> - <description summary="set pointer cursor to the shape"> - Sets the pointer cursor to the specified shape. The server will change - the cursor graphics based on the specified shape and its graphic assets - and system condition. - - The "shape" argument needs to be one of the values in cursor_shape_type - enum. Otherwise invalid_shape error is raised. - - This is similar to wl_pointer::set_cursor request, but this accepts a - shape instead of contents in the form of a surface. - - The client which do not know this protocol should work as-is, so - wl_pointer::set_cursor will change the cursor graphics even when it's - combined with this request; and another invocation of set_cursor_shape - will change the cursor shape again. This means the last invoked one will - be used for the actual cursor. - </description> - <arg name="pointer" type="object" interface="wl_pointer"/> - <arg name="shape" type="int"/> - </request> - </interface> -</protocol> diff --git a/chromium/third_party/wayland-protocols/unstable/gaming-input/README b/chromium/third_party/wayland-protocols/unstable/gaming-input/README deleted file mode 100644 index 388c8aa487e..00000000000 --- a/chromium/third_party/wayland-protocols/unstable/gaming-input/README +++ /dev/null @@ -1,4 +0,0 @@ -Gamepads protocol - -Maintainers: -Dennis Kempin <denniskempin@chromium.org> diff --git a/chromium/third_party/wayland-protocols/unstable/gaming-input/gaming-input-unstable-v1.xml b/chromium/third_party/wayland-protocols/unstable/gaming-input/gaming-input-unstable-v1.xml deleted file mode 100644 index 8ae1872f089..00000000000 --- a/chromium/third_party/wayland-protocols/unstable/gaming-input/gaming-input-unstable-v1.xml +++ /dev/null @@ -1,127 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="gaming_input_unstable_v1"> - - <copyright> - Copyright 2016 The Chromium Authors. - - 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. - </copyright> - - <interface name="zcr_gaming_input_v1" version="1"> - <description summary="extends wl_seat with gaming input devices"> - A global interface to provide gaming input devices for a given seat. - - Currently only gamepad devices are supported. - - 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 uinterface version bump. - Backward incompatible changes are done by bumping the version number in - the protocol and uinterface 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. - </description> - - <request name="get_gamepad"> - <description summary="get gamepad device assigned to seat"> - Create gamepad object. See zcr_gamepad_v1 interface for details. - </description> - <arg name="id" type="new_id" interface="zcr_gamepad_v1"/> - <arg name="seat" type="object" interface="wl_seat"/> - </request> - </interface> - - <interface name="zcr_gamepad_v1" version="1"> - <description summary="gamepad input device"> - The zcr_gamepad_v1 interface represents one or more gamepad input devices, - which are reported as a normalized 'Standard Gamepad' as it is specified - by the W3C Gamepad API at: https://w3c.github.io/gamepad/#remapping - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy gamepad object"/> - </request> - - <enum name="gamepad_state"> - <description summary="connection state"/> - <entry name="off" value="0" summary="no gamepads are connected or on."/> - <entry name="on" value="1" summary="at least one gamepad is connected."/> - </enum> - - <event name="state_change"> - <description summary="state change event"> - Notification that this seat's connection state has changed. - </description> - <arg name="state" type="uint" enum="gamepad_state" summary="new state"/> - </event> - - <event name="axis"> - <description summary="axis change event"> - Notification of axis change. - - The axis id specifies which axis has changed as defined by the W3C - 'Standard Gamepad'. - - The value is calibrated and normalized to the -1 to 1 range. - </description> - <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> - <arg name="axis" type="uint" summary="axis that produced this event"/> - <arg name="value" type="fixed" summary="new value of axis"/> - </event> - - <enum name="button_state"> - <description summary="physical button state"> - Describes the physical state of a button that produced the button - event. - </description> - <entry name="released" value="0" summary="the button is not pressed"/> - <entry name="pressed" value="1" summary="the button is pressed"/> - </enum> - - <event name="button"> - <description summary="Gamepad button changed"> - Notification of button change. - - The button id specifies which button has changed as defined by the W3C - 'Standard Gamepad'. - - A button can have a digital and an analog value. The analog value is - normalized to a 0 to 1 range. - If a button does not provide an analog value, it will be derived from - the digital state. - </description> - <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> - <arg name="button" type="uint" summary="id of button"/> - <arg name="state" type="uint" enum="button_state" summary="digital state of the button"/> - <arg name="analog" type="fixed" summary="analog value of the button"/> - </event> - - <event name="frame"> - <description summary="Notifies end of a series of gamepad changes."> - Indicates the end of a set of events that logically belong together. - A client is expected to accumulate the data in all events within the - frame before proceeding. - </description> - <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> - </event> - </interface> - -</protocol> diff --git a/chromium/third_party/wayland-protocols/unstable/gaming-input/gaming-input-unstable-v2.xml b/chromium/third_party/wayland-protocols/unstable/gaming-input/gaming-input-unstable-v2.xml deleted file mode 100644 index 9e9f35ec8b8..00000000000 --- a/chromium/third_party/wayland-protocols/unstable/gaming-input/gaming-input-unstable-v2.xml +++ /dev/null @@ -1,152 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="gaming_input_unstable_v2"> - - <copyright> - Copyright 2016 The Chromium Authors. - - 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. - </copyright> - - <interface name="zcr_gaming_input_v2" version="1"> - <description summary="extends wl_seat with gaming input devices"> - A global interface to provide gaming input devices for a given seat. - - Currently only gamepad devices are supported. - - 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 uinterface version bump. - Backward incompatible changes are done by bumping the version number in - the protocol and uinterface 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. - </description> - - <request name="get_gaming_seat"> - <description summary="get a gaming seat"> - Get a gaming seat object for a given seat. Gaming seat provides access - to gaming devices - </description> - <arg name="gaming_seat" type="new_id" interface="zcr_gaming_seat_v2"/> - <arg name="seat" type="object" interface="wl_seat"/> - </request> - - <request name="destroy" type="destructor"> - <description summary="release the memory for the gaming input object"> - Destroy gaming_input object. Objects created from this object are - unaffected and should be destroyed separately. - </description> - </request> - </interface> - - <interface name="zcr_gaming_seat_v2" version="1"> - <description summary="controller object for all gaming devices of a seat"> - An object that provides access to all the gaming devices of a seat. - When a gamepad is connected, the compositor will send gamepad_added event. - </description> - - <request name="destroy" type="destructor"> - <description summary="release the memory for the gaming seat object"> - Destroy gaming_seat object. Objects created from this object are - unaffected and should be destroyed separately. - </description> - </request> - - <event name="gamepad_added"> - <description summary="gamepad added event"> - Notification that there is gamepad connected at this seat. - </description> - <arg name="gamepad" type="new_id" interface="zcr_gamepad_v2" summary="new connected gamepad"/> - </event> - </interface> - - <interface name="zcr_gamepad_v2" version="1"> - <description summary="gamepad input device"> - The zcr_gamepad_v2 interface represents one or more gamepad input devices, - which are reported as a normalized 'Standard Gamepad' as it is specified - by the W3C Gamepad API at: https://w3c.github.io/gamepad/#remapping - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy gamepad object"/> - </request> - - <event name="removed"> - <description summary="gamepad removed"> - Removed event is send when the gamepad is disconnected. The client should - expect no more event and call destroy. - - This event cannot be used as destructor as requests (e.g. vibration) might - be added to this interface. - </description> - </event> - - <event name="axis"> - <description summary="axis change event"> - Notification of axis change. - - The axis id specifies which axis has changed as defined by the W3C - 'Standard Gamepad'. - - The value is calibrated and normalized to the -1 to 1 range. - </description> - <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> - <arg name="axis" type="uint" summary="axis that produced this event"/> - <arg name="value" type="fixed" summary="new value of axis"/> - </event> - - <enum name="button_state"> - <description summary="physical button state"> - Describes the physical state of a button that produced the button - event. - </description> - <entry name="released" value="0" summary="the button is not pressed"/> - <entry name="pressed" value="1" summary="the button is pressed"/> - </enum> - - <event name="button"> - <description summary="Gamepad button changed"> - Notification of button change. - - The button id specifies which button has changed as defined by the W3C - 'Standard Gamepad'. - - A button can have a digital and an analog value. The analog value is - normalized to a 0 to 1 range. - If a button does not provide an analog value, it will be derived from - the digital state. - </description> - <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> - <arg name="button" type="uint" summary="id of button"/> - <arg name="state" type="uint" enum="button_state" summary="digital state of the button"/> - <arg name="analog" type="fixed" summary="analog value of the button"/> - </event> - - <event name="frame"> - <description summary="Notifies end of a series of gamepad changes."> - Indicates the end of a set of events that logically belong together. - A client is expected to accumulate the data in all events within the - frame before proceeding. - </description> - <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> - </event> - </interface> -</protocol> diff --git a/chromium/third_party/wayland-protocols/unstable/keyboard/README b/chromium/third_party/wayland-protocols/unstable/keyboard/README deleted file mode 100644 index 700fff91073..00000000000 --- a/chromium/third_party/wayland-protocols/unstable/keyboard/README +++ /dev/null @@ -1,4 +0,0 @@ -Extensions of wl_keyboard protocol. - -Maintainers: -Yuichiro Hanada <yhanada@chromium.org> diff --git a/chromium/third_party/wayland-protocols/unstable/keyboard/keyboard-configuration-unstable-v1.xml b/chromium/third_party/wayland-protocols/unstable/keyboard/keyboard-configuration-unstable-v1.xml deleted file mode 100644 index 8d3cf72b4d4..00000000000 --- a/chromium/third_party/wayland-protocols/unstable/keyboard/keyboard-configuration-unstable-v1.xml +++ /dev/null @@ -1,87 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="keyboard_configuration_unstable_v1"> - - <copyright> - Copyright 2016 The Chromium Authors. - - 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. - </copyright> - - <interface name="zcr_keyboard_configuration_v1" version="2"> - <description summary="extends wl_keyboard with events for device configuration change"> - Allows a wl_keyboard to notify device configuration change events of - the keyboard to the client. - - 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 uinterface version bump. - Backward incompatible changes are done by bumping the version number in - the protocol and uinterface 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. - </description> - - <enum name="error"> - <entry name="device_configuration_exists" value="0" - summary="the keyboard already has a device configuration object associated"/> - </enum> - - <request name="get_keyboard_device_configuration"> - <description summary="get keyboard_device_configuration interface for a keyboard"> - Create keyboard_device_configuration object. - See zcr_keyboard_device_configuration interface for details. - If the given wl_keyboard object already has a device configuration - object associated, the keyboard_device_configuration_exists protocol - error is raised. - </description> - <arg name="id" type="new_id" interface="zcr_keyboard_device_configuration_v1"/> - <arg name="keyboard" type="object" interface="wl_keyboard"/> - </request> - </interface> - - <interface name="zcr_keyboard_device_configuration_v1" version="1"> - <description summary="extension of wl_keyboard protocol"> - The zcr_keyboard_device_configuration_v1 interface extends the wl_keyboard - interface with events to describe device configuration of a keyboard. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy keyboard_device_configuration object"/> - </request> - - <enum name="keyboard_type"> - <description summary="keyboard types"/> - <entry name="physical" value="0" summary="Physical keyboard"/> - <entry name="virtual" value="1" summary="Virtual keyboard"/> - </enum> - - <event name="type_change"> - <description summary="keyboard type changed"> - Notification that the user is switching to new keyboard type. - - If this event is not received, the cleint has to assume a physical - keyboard is in use. - </description> - <arg name="type" type="uint" enum="keyboard_type" summary="new device type"/> - </event> - </interface> - -</protocol> diff --git a/chromium/third_party/wayland-protocols/unstable/keyboard/keyboard-extension-unstable-v1.xml b/chromium/third_party/wayland-protocols/unstable/keyboard/keyboard-extension-unstable-v1.xml deleted file mode 100644 index a90604dc262..00000000000 --- a/chromium/third_party/wayland-protocols/unstable/keyboard/keyboard-extension-unstable-v1.xml +++ /dev/null @@ -1,82 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="keyboard_extension_unstable_v1"> - - <copyright> - Copyright 2017 The Chromium Authors. - - 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. - </copyright> - - <interface name="zcr_keyboard_extension_v1" version="1"> - <description summary="extends wl_keyboard with ack_key events"> - Allows a wl_keyboard to send ack_key requests for each key event of - the keyboard to the server. - - 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 uinterface version bump. - Backward incompatible changes are done by bumping the version number in - the protocol and uinterface 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. - </description> - - <enum name="error"> - <entry name="extended_keyboard_exists" value="0" - summary="the keyboard already has an extended_keyboard object associated"/> - </enum> - - <request name="get_extended_keyboard"> - <description summary="get extended_keyboard for a keyboard"> - Create extended_keyboard object. - See zcr_extended_keyboard interface for details. - If the given wl_keyboard object already has a extended_keyboard object - associated, the extended_keyboard_exists protocol error is raised. - </description> - <arg name="id" type="new_id" interface="zcr_extended_keyboard_v1"/> - <arg name="keyboard" type="object" interface="wl_keyboard"/> - </request> - </interface> - - <interface name="zcr_extended_keyboard_v1" version="1"> - <description summary="extension of wl_keyboard protocol"> - The zcr_extended_keyboard_v1 interface extends the wl_keyboard interface - with requests to notify whether sent key events are handled or not by - the client. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy extended_keyboard object"/> - </request> - - <enum name="handled_state"> - <description summary="whether a key event is handled by client or not"/> - <entry name="not_handled" value="0"/> - <entry name="handled" value="1"/> - </enum> - - <request name="ack_key"> - <description summary="acknowledge a key event"/> - <arg name="serial" type="uint"/> - <arg name="handled" type="uint" enum="handled_state"/> - </request> - </interface> -</protocol> diff --git a/chromium/third_party/wayland-protocols/unstable/remote-shell/README b/chromium/third_party/wayland-protocols/unstable/remote-shell/README deleted file mode 100644 index 5df5b13761d..00000000000 --- a/chromium/third_party/wayland-protocols/unstable/remote-shell/README +++ /dev/null @@ -1,4 +0,0 @@ -Nested shell protocol - -Maintainers: -David Reveman <reveman@chromium.org> diff --git a/chromium/third_party/wayland-protocols/unstable/remote-shell/remote-shell-unstable-v1.xml b/chromium/third_party/wayland-protocols/unstable/remote-shell/remote-shell-unstable-v1.xml deleted file mode 100644 index ef9402df80f..00000000000 --- a/chromium/third_party/wayland-protocols/unstable/remote-shell/remote-shell-unstable-v1.xml +++ /dev/null @@ -1,942 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="remote_shell_unstable_v1"> - - <copyright> - Copyright 2016 The Chromium Authors. - - 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. - </copyright> - - <description summary="Create remote desktop-style surfaces"> - remote_shell allows clients to turn a wl_surface into a "real window" - which can be stacked and activated by the user. - - 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. - </description> - - <interface name="zcr_remote_shell_v1" version="17"> - <description summary="remote_shell"> - The global interface that allows clients to turn a wl_surface into a - "real window" which is remotely managed but can be stacked, activated - and made fullscreen by the user. - </description> - - <enum name="container"> - <description summary="containers for remote surfaces"> - Determine how a remote surface should be stacked relative to other - shell surfaces. - </description> - <entry name="default" value="1" summary="default container"/> - <entry name="overlay" value="2" summary="system modal container"/> - </enum> - - <enum name="state_type"> - <description summary="state types for remote surfaces"> - Defines common show states for shell surfaces. - </description> - <entry name="normal" value="1" summary="normal window state"/> - <entry name="minimized" value="2" summary="minimized window state"/> - <entry name="maximized" value="3" summary="maximized window state"/> - <entry name="fullscreen" value="4" summary="fullscreen window state"/> - <entry name="pinned" value="5" summary="pinned window state"/> - <entry name="trusted_pinned" value="6" summary="trusted pinned window state"/> - <entry name="moving" value="7" summary="moving window state"/> - <entry name="resizing" value="8" summary="resizing window state"/> - <entry name="left_snapped" value="9" summary="left snapped window state"/> - <entry name="right_snapped" value="10" summary="right snapped window state"/> - <entry name="pip" value="11" summary="pip window state"/> - </enum> - - <enum name="error"> - <entry name="role" value="0" summary="given wl_surface has another role"/> - <entry name="invalid_notification_key" value="1" - summary="invalid notification key"/> - </enum> - - <enum name="layout_mode"> - <description summary="the layout mode"> - Determine how a client should layout surfaces. - </description> - <entry name="windowed" value="1" summary="multiple windows"/> - <entry name="tablet" value="2" summary="restricted mode for tablet"/> - </enum> - - <request name="destroy" type="destructor"> - <description summary="destroy remote_shell"> - Destroy this remote_shell object. - - Destroying a bound remote_shell object while there are surfaces - still alive created by this remote_shell object instance is illegal - and will result in a protocol error. - </description> - </request> - - <request name="get_remote_surface"> - <description summary="create a remote shell surface from a surface"> - This creates an remote_surface for the given surface and gives it the - remote_surface role. A wl_surface can only be given a remote_surface - role once. If get_remote_surface is called with a wl_surface that - already has an active remote_surface associated with it, or if it had - any other role, an error is raised. - - See the documentation of remote_surface for more details about what an - remote_surface is and how it is used. - </description> - <arg name="id" type="new_id" interface="zcr_remote_surface_v1"/> - <arg name="surface" type="object" interface="wl_surface"/> - <arg name="container" type="uint"/> - </request> - - <event name="activated"> - <description summary="activated surface changed"> - Notifies client that the activated surface changed. - </description> - <arg name="gained_active" type="object" interface="wl_surface" allow-null="true"/> - <arg name="lost_active" type="object" interface="wl_surface" allow-null="true"/> - </event> - - <request name="get_notification_surface"> - <description summary="create a notification surface from a surface"> - Creates a notification_surface for the given surface, gives it the - notification_surface role and associated it with a notification id. - </description> - <arg name="id" type="new_id" interface="zcr_notification_surface_v1"/> - <arg name="surface" type="object" interface="wl_surface"/> - <arg name="notification_key" type="string" /> - </request> - - <event name="configuration_changed"> - <description summary="suggests a re-configuration of remote shell"> - [Deprecated] Suggests a re-configuration of remote shell. - </description> - <arg name="width" type="int"/> - <arg name="height" type="int"/> - <arg name="transform" type="int"/> - <arg name="scale_factor" type="fixed"/> - <arg name="work_area_inset_left" type="int"/> - <arg name="work_area_inset_top" type="int"/> - <arg name="work_area_inset_right" type="int"/> - <arg name="work_area_inset_bottom" type="int"/> - <arg name="layout_mode" type="uint"/> - </event> - - <!-- Version 5 additions --> - - <event name="workspace" since="5"> - <description summary="area of remote shell"> - Defines an area of the remote shell used for layout. Each series of - "workspace" events must be terminated by a "configure" event. - </description> - <arg name="id_hi" type="uint"/> - <arg name="id_lo" type="uint"/> - <arg name="x" type="int"/> - <arg name="y" type="int"/> - <arg name="width" type="int"/> - <arg name="height" type="int"/> - <arg name="inset_left" type="int"/> - <arg name="inset_top" type="int"/> - <arg name="inset_right" type="int"/> - <arg name="inset_bottom" type="int"/> - <arg name="transform" type="int"/> - <arg name="scale_factor" type="fixed"/> - <arg name="is_internal" type="uint" summary="1 if screen is built-in"/> - </event> - - <event name="configure" since="5"> - <description summary="suggests configuration of remote shell"> - Suggests a new configuration of the remote shell. Preceded by a series - of "workspace" events. - </description> - <arg name="layout_mode" type="uint"/> - </event> - - <!-- Version 8 additions --> - - <event name="default_device_scale_factor" since="8"> - <description summary="initialize scale configuration"> - Sends the default device scale factor. - </description> - <arg name="scale" type="int" summary="DP to pixels ratio, in 8.24 fixed point format"/> - </event> - - <!-- Version 17 additions --> - - <request name="get_input_method_surface" since="17"> - <description summary="Create a input method surface from a surface"> - Creates an input_method_surface for the given surface, gives it - the input_method_surface role. - </description> - <arg name="id" type="new_id" interface="zcr_input_method_surface_v1"/> - <arg name="surface" type="object" interface="wl_surface"/> - </request> - </interface> - - <interface name="zcr_remote_surface_v1" version="15"> - <description summary="A desktop window"> - An interface that may be implemented by a wl_surface, for - implementations that provide a desktop-style user interface - and allows for remotely managed windows. - - It provides requests to treat surfaces like windows, allowing to set - properties like app id and geometry. - - The client must call wl_surface.commit on the corresponding wl_surface - for the remote_surface state to take effect. - - For a surface to be mapped by the compositor the client must have - committed both an remote_surface state and a buffer. - </description> - - <enum name="systemui_visibility_state"> - <description summary="systemui visibility behavior"> - Determine the visibility behavior of the system UI. - </description> - <entry name="visible" value="1" summary="system ui is visible"/> - <entry name="autohide_non_sticky" value="2" summary="system ui autohides and is not sticky"/> - <entry name="autohide_sticky" value="3" summary="system ui autohides and is sticky"/> - </enum> - - <enum name="orientation"> - <description summary="window orientation"> - The orientation of the window. - </description> - <entry name="portrait" value="1" summary="portrait"/> - <entry name="landscape" value="2" summary="landscape"/> - </enum> - - <enum name="window_type"> - <description summary="window type"> - The type of the window. - </description> - <entry name="normal" value="1" summary="normal app window"/> - <entry name="system_ui" value="2" summary="window is treated as systemui"/> - </enum> - - <request name="destroy" type="destructor"> - <description summary="Destroy the remote_surface"> - Unmap and destroy the window. The window will be effectively - hidden from the user's point of view, and all state will be lost. - </description> - </request> - - <request name="set_app_id"> - <description summary="set application ID"> - Set an application identifier for the surface. - </description> - <arg name="app_id" type="string"/> - </request> - - <request name="set_window_geometry"> - <description summary="set the new window geometry"> - The window geometry of a window is its "visible bounds" from the - user's perspective. Client-side decorations often have invisible - portions like drop-shadows which should be ignored for the - purposes of aligning, placing and constraining windows. - - The window geometry is double buffered, and will be applied at the - time wl_surface.commit of the corresponding wl_surface is called. - - Once the window geometry of the surface is set once, it is not - possible to unset it, and it will remain the same until - set_window_geometry is called again, even if a new subsurface or - buffer is attached. - - If never set, the value is the full bounds of the output. This - updates dynamically on every commit. - - The arguments are given in the output coordinate space. - - The width and height must be greater than zero. - </description> - <arg name="x" type="int"/> - <arg name="y" type="int"/> - <arg name="width" type="int"/> - <arg name="height" type="int"/> - </request> - - <request name="set_scale"> - <description summary="set scale"> - Set a scale factor that will be applied to surface and all descendants. - </description> - <arg name="scale" type="fixed"/> - </request> - - <request name="set_rectangular_shadow"> - <description summary="set a rectangular shadow"> - [Deprecated] Request that surface needs a rectangular shadow. - - This is only a request that the surface should have a rectangular - shadow. The compositor may choose to ignore this request. - - The arguments are given in the output coordinate space and specifies - the inner bounds of the shadow. - - The arguments are given in the output coordinate space. - Specifying zero width and height will disable the shadow. - </description> - <arg name="x" type="int"/> - <arg name="y" type="int"/> - <arg name="width" type="int"/> - <arg name="height" type="int"/> - </request> - - <request name="set_rectangular_shadow_background_opacity"> - <description summary="suggests the window's background opacity"> - [Deprecated] Suggests the window's background opacity when the shadow is requested. - </description> - <arg name="opacity" type="fixed"/> - </request> - - <request name="set_title"> - <description summary="set surface title"> - 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. - </description> - <arg name="title" type="string"/> - </request> - - <request name="set_top_inset"> - <description summary="set top inset for surface"> - Set distance from the top of the surface to the contents. - - This distance typically represents the size of the window caption. - </description> - <arg name="height" type="int"/> - </request> - - <request name="activate"> - <description summary="make the surface active"> - Make the surface active and bring it to the front. - </description> - <arg name="serial" type="uint" summary="the serial of the user event"/> - </request> - - <request name="maximize"> - <description summary="maximize"> - Request that surface is maximized. The window geometry will be updated - to whatever the compositor finds appropriate for a maximized window. - - This is only a request that the window should be maximized. The - compositor may choose to ignore this request. The client should - listen to set_maximized events to determine if the window was - maximized or not. - </description> - </request> - - <request name="minimize"> - <description summary="minimize"> - Request that surface is minimized. - - This is only a request that the window should be minimized. The - compositor may choose to ignore this request. The client should - listen to set_minimized events to determine if the window was - minimized or not. - </description> - </request> - - <request name="restore"> - <description summary="restore"> - Request that surface is restored. This restores the window geometry - to what it was before the window was minimized, maximized or made - fullscreen. - - This is only a request that the window should be restored. The - compositor may choose to ignore this request. The client should - listen to unset_maximized, unset_minimize and unset_fullscreen - events to determine if the window was restored or not. - </description> - </request> - - <request name="fullscreen"> - <description summary="fullscreen"> - Request that surface is made fullscreen. - - This is only a request that the window should be made fullscreen. - The compositor may choose to ignore this request. The client should - listen to set_fullscreen events to determine if the window was - made fullscreen or not. - </description> - </request> - - <request name="unfullscreen"> - <description summary="unfullscreen"> - Request that surface is made unfullscreen. - - This is only a request that the window should be made unfullscreen. - The compositor may choose to ignore this request. The client should - listen to unset_fullscreen events to determine if the window was - made unfullscreen or not. - </description> - </request> - - <request name="pin"> - <description summary="pin"> - Request that surface is pinned. - - This is only a request that the window should be pinned. - The compositor may choose to ignore this request. The client should - listen to state_changed events to determine if the window was - pinned or not. If trusted flag is non-zero, the app can prevent users - from exiting the pinned mode. - </description> - <arg name="trusted" type="int"/> - </request> - - <request name="unpin"> - <description summary="unpin"> - Request that surface is unpinned. - - This is only a request that the window should be unpinned. - The compositor may choose to ignore this request. The client should - listen to unset_pinned events to determine if the window was - unpinned or not. - </description> - </request> - - <request name="set_system_modal"> - <description summary="suggests a re-layout of remote shell input area"> - Suggests a surface should become system modal. - </description> - </request> - - <request name="unset_system_modal"> - <description summary="suggests a re-layout of remote shell input area"> - Suggests a surface should become non system modal. - </description> - </request> - - <event name="close"> - <description summary="surface wants to be closed"> - 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... - </description> - </event> - - <event name="state_type_changed"> - <description summary="surface state type changed"> - [Deprecated] The state_type_changed event is sent by the compositor when - the surface state changed. - - This is an event to notify that the window state changed in compositor. - The state change may be triggered by a client's request, or some user - action directly handled by the compositor. The client may choose to - ignore this event. - </description> - <arg name="state_type" type="uint"/> - </event> - - <!-- Version 2 additions --> - - <request name="set_rectangular_surface_shadow" since="2"> - <description summary="set a rectangular shadow"> - Request that surface needs a rectangular shadow. - - This is only a request that the surface should have a rectangular - shadow. The compositor may choose to ignore this request. - - The arguments are given in the remote surface coordinate space and - specifies inner bounds of the shadow. Specifying zero width and height - will disable the shadow. - </description> - <arg name="x" type="int"/> - <arg name="y" type="int"/> - <arg name="width" type="int"/> - <arg name="height" type="int"/> - </request> - - <!-- Version 3 additions --> - - <request name="set_systemui_visibility" since="3"> - <description summary="requests the system ui visibility behavior for the surface"> - Requests how the surface will change the visibility of the system UI when it is made active. - </description> - <arg name="visibility" type="uint"/> - </request> - - <!-- Version 4 additions --> - - <request name="set_always_on_top" since="4"> - <description summary="set always on top"> - Request that surface is made to be always on top. - - This is only a request that the window should be always on top. - The compositor may choose to ignore this request. - - </description> - </request> - - <request name="unset_always_on_top" since="4"> - <description summary="unset always on top"> - Request that surface is made to be not always on top. - - This is only a request that the window should be not always on top. - The compositor may choose to ignore this request. - </description> - </request> - - <!-- Version 5 additions --> - - <event name="configure" since="5"> - <description summary="suggest a surface change"> - The configure event asks the client to change surface state. - - The client must apply the origin offset to window positions in - set_window_geometry requests. - - The states listed in the event are state_type values, and might change - due to a client request or an event directly handled by the compositor. - - Clients should arrange their surface for the new state, 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. - </description> - <arg name="origin_offset_x" type="int"/> - <arg name="origin_offset_y" type="int"/> - <arg name="states" type="array"/> - <arg name="serial" type="uint"/> - </event> - - <request name="ack_configure" since="5"> - <description summary="ack a configure event"> - 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 during display - configuration to change its coordinate space for set_window_geometry - requests only when the client has switched to the new coordinate space. - - 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. - </description> - <arg name="serial" type="uint" summary="the serial from the configure event"/> - </request> - - <request name="move" since="5"> - <description summary="start an interactive move"> - [Deprecated] Start an interactive, user-driven move of the surface. - - The compositor responds to this request with a configure event that - transitions to the "moving" state. The client must only initiate motion - after acknowledging the state change. The compositor can assume that - subsequent set_window_geometry requests are position updates until the - next state transition is acknowledged. - - The compositor may ignore move requests depending on the state of the - surface, e.g. fullscreen or maximized. - </description> - </request> - - <!-- Version 6 additions --> - - <request name="set_orientation" since="6"> - <description summary="set orientation"> - Set an orientation for the surface. - </description> - <arg name="orientation" type="int"/> - </request> - - <!-- Version 7 additions --> - - <request name="set_window_type" since="7"> - <description summary="set the type of the window"> - Set the type of window. This is only a hint to the compositor and the - compositor is free to ignore it. - </description> - <arg name="type" type="uint" summary="type of the window"/> - </request> - - <!-- Version 9 additions --> - - <request name="resize" since="9"> - <description summary="start an interactive resize"> - [Deprecated] Start an interactive, user-driven resize of the surface. - - The compositor responds to this request with a configure event that - transitions to the "resizing" state. The client must only initiate - resizing after acknowledging the state change. The compositor can assume - that subsequent set_window_geometry requests are resizes until the next - state transition is acknowledged. - - The compositor may ignore resize requests depending on the state of the - surface, e.g. fullscreen or maximized. - </description> - </request> - - <request name="set_resize_outset" since="9"> - <description summary="expand input region for resizing"> - Expand input region of surface with resize outset. - - The compositor clips the input region of each surface to its bounds, - unless the client requests a resize outset. In that case, the input - region of the root surface is expanded to allow for some leeway around - visible bounds when starting a user-driven resize. - </description> - <arg name="outset" type="int"/> - </request> - - <event name="window_geometry_changed" since="9"> - <description summary="announce window geometry commit"> - Notify the client of committed window geometry. - - The compositor sends this event when it commits window geometry. The - client may use this information to convert coordinates of input events - using the latest committed geometry. - </description> - <arg name="x" type="int"/> - <arg name="y" type="int"/> - <arg name="width" type="int"/> - <arg name="height" type="int"/> - </event> - - <!-- Version 10 additions --> - - <enum name="bounds_change_reason"> - <description summary="bounds_change_reason"> - Specifies the cause of the window bounds change event. - </description> - <entry name="drag_move" value="1" summary="the window is being moved by drag operation"/> - <entry name="drag_resize" value="2" summary="the window is being resized by drag operation."/> - <entry name="snap_to_left" value="3" - summary="the window is resized to left snapped state"/> - <entry name="snap_to_right" value="4" - summary="the window is resized to right snapped state"/> - <entry name="move" value="5" - summary="the window bounds is moved due to other WM operations"/> - <entry name="resize" value="6" - summary="the window bounds is reiszed due to other WM operations"/> - </enum> - - <event name="bounds_changed" since="10"> - <description summary="The compositor requested to change the bounds"> - The compositor requested to change its - bounds. "bounds_change_reason" specifies the cause of the - bounds change. The client may apply the different move/resize - strategy depending on the reason. - - "display_id_hi", "display_id_lo" specifies in which workspace - the surface should live in. - - The client responds with set_window_geometry request, with the - bounds it is resized to (this may be different from the bounds - requested). - - The client may ignore move request depending on the state, - e.g, if it becomes resizable or other constrants. - </description> - <arg name="workspace_id_hi" type="uint"/> - <arg name="workspace_id_lo" type="uint"/> - <arg name="x" type="int"/> - <arg name="y" type="int"/> - <arg name="width" type="int"/> - <arg name="height" type="int"/> - <arg name="bounds_change_reason" type="uint"/> - </event> - - <request name="start_move" since="10"> - <description summary="start an interactive move"> - Request an interactive, user-driven move of the surface. "x" - and "y" specifies the starting point of the pointer device - that initiated the move. - - The compositor responds to this request with a drag_started - event with "none" direction. Please see drag_started event - for more details. - - The compositor may ignore move requests depending on the state of the - surface, e.g. fullscreen or maximized. - </description> - <arg name="x" type="int"/> - <arg name="y" type="int"/> - </request> - - <enum name="resize_direction"> - <description summary="resize direction"> - The resize direction for drag operation - </description> - <entry name="none" value="0" summary="move only, no resize"/> - <entry name="left" value="1" summary="resize to the left"/> - <entry name="topleft" value="2" summary="resize to the top left"/> - <entry name="top" value="3" summary="resize to the top"/> - <entry name="topright" value="4" summary="resize to the top right"/> - <entry name="right" value="5" summary="resize to the right"/> - <entry name="bottomright" value="6" summary="resize to the buttom right"/> - <entry name="bottom" value="7" summary="resize to the bottom"/> - <entry name="bottomleft" value="8" summary="resize to the bottom left"/> - </enum> - - <event name="drag_started" since="10"> - <description summary="Notifies that a drag to move/resize started."> - Notifies a client that the compositor started drag - operation. "direction" specifies which direction it is being - resized. "none" direction means just move but not resize. - - This will be followed by series of the "bounds_changed" event - with "drag_resize" or "drag_move" reasons to update the window - bounds druing the drag operation. - </description> - <arg name="direction" type="uint"/> - </event> - - <event name="drag_finished" since="10"> - <description summary="Notifies that a drag operation has finished."> - Called when the drag operation is finished. "x" and "y" - specifies the position of the pointer device used to drag. - "canceled" is true if the drag operation is aborted during - drag (e.g. by capture change or user action.) - </description> - <arg name="x" type="int"/> - <arg name="y" type="int"/> - <arg name="canceled" type="int" summary="true if the operation was canceled"/> - </event> - - <request name="set_can_maximize" since="10"> - <description summary="set can_maximize"> - Request that surface can be in maximzied state. - </description> - </request> - - <request name="unset_can_maximize" since="10"> - <description summary="unset can_maximize"> - Request that surface can not be in maximzied state. - </description> - </request> - - <request name="set_min_size" since="10"> - <description summary="set the minimum size"> - Set a minimum size of the surface. - - Values set in this way are double-buffered. They will get - applied on the next commit. - </description> - <arg name="width" type="int"/> - <arg name="height" type="int"/> - </request> - - <request name="set_max_size" since="10"> - <description summary="set the maximum size"> - Set a maximum size of the surface. - - Values set in this way are double-buffered. They will get - applied on the next commit. - - Setting the same size as minimum size makes the surface - unresizable. - </description> - <arg name="width" type="int"/> - <arg name="height" type="int"/> - </request> - - <!-- Version 11 additions --> - - <request name="set_snapped_to_left" since="11"> - <description summary="set the surface to left snapped"> - Request that surface is snapped to left. - </description> - </request> - - <request name="set_snapped_to_right" since="11"> - <description summary="set the surface to right snapped"> - Request that surface is snapped to right. - </description> - </request> - - <!-- Version 12 additions --> - - <request name="start_resize" since="12"> - <description summary="start an interactive resize"> - Request to start an interactive, user-driven resize of the surface. - "x" and "y" specifies the starting point of the pointer device - that initiated the reize. - - The compositor responds to this request with a "drag_started" - event, followed by "bounds_changed" events, and ends the - resize operation with a "drag_finhsed" event. The compositor - determines the new bounds using the resize_direction and the - pointer event location. - - The compositor may ignore resize requests depending on the state of the - surface, e.g. fullscreen or maximized, or no drag event is in pregress. - </description> - <arg name="resize_direction" type="uint" summary="the direction of resize"/> - <arg name="x" type="int"/> - <arg name="y" type="int"/> - </request> - - <!-- Version 13 additions --> - - <enum name="frame_type"> - <description summary="frame types"> - Frame type that can be used to decorate a surface. - </description> - <entry name="none" value="0" summary="no frame"/> - <entry name="normal" value="1" summary="caption with shadow" /> - <entry name="shadow" value="2" summary="shadow only"/> - <entry name="autohide" value="3" summary="autohide frame with shadow"/> - <entry name="overlay" value="4" summary="overlay frame with shadow" /> - </enum> - - <request name="set_frame" since="13"> - <description summary="request a frame for surface"> - Enables compositor side frame decoration. |type| - specifies the type of frame to use for the surface. - </description> - <arg name="type" type="uint" summary="the frame type"/> - </request> - - <enum name="frame_button_type"> - <description summary="frame button types"> - The mask that represents buttons on frame. - </description> - <entry name="back" value="1" summary="a button to naviate backwards"/> - <entry name="minimize" value="2" summary="a button to minimize the window"/> - <entry name="maximize_restore" value="4" - summary="a button to maximize or restore"/> - <entry name="menu" value="8" - summary="a button to activate application's menu"/> - <entry name="close" value="16" summary="a button to close the window"/> - <entry name="zoom" value="32" - summary="a mask to turn the maximize_restore button to zoom button"/> - </enum> - - <request name="set_frame_buttons" since="13"> - <description summary="updates buttons' state on frame"> - Updates the frame's button state. |visible_buttons| and |enabled_buttons| - are the union of button mask defined in |frame_button_type| enum. - - The mask present in |enabled_buttons| but not in |visible_buttons| will - be ignored. - </description> - <arg name="visible_buttons" type="uint"/> - <arg name="enabled_buttons" type="uint"/> - </request> - - <request name="set_extra_title" since="13"> - <description summary="set extra title string"> - The extra informational string about the surface. This can be - used to show the debug information in the title bar, or log - messages. - - This is different from "set_title" which is used to identify - the surface. - - The string must be encoded in UTF-8. - </description> - <arg name="extra_title" type="string"/> - </request> - - <!-- Version 14 additions --> - - <enum name="orientation_lock"> - <description summary="orientation lock request for remote surfaces"> - Defines orientation request when a remote surface is in foreground. - </description> - <entry name="none" value="1" summary="no orientation lock"/> - <entry name="portrait" value="2" summary="primary or secondary portrait"/> - <entry name="landscape" value="3" summary="primary or secondary landscape"/> - <entry name="current" value="4" summary="keep current orientation"/> - <entry name="portrait_primary" value="5" summary="primary portrait"/> - <entry name="landscape_primary" value="6" summary="primary landscape"/> - <entry name="portrait_secondary" value="7" summary="secondary portrait"/> - <entry name="landscape_secondary" value="8" summary="secondary landscape"/> - </enum> - - <request name="set_orientation_lock" since="14"> - <description summary="set orientation lock for a remote surface"> - Request a specific orientation behavior when this surface is in foreground. - </description> - <arg name="orientation_lock" type="uint" summary="the orientation lock"/> - </request> - - <!-- Version 15 additions --> - - <request name="pip" since="15"> - <description summary="set pip for a remote surface"> - Request that surface is set to Picture-in-Picture (PIP). - </description> - </request> - - </interface> - - <interface name="zcr_notification_surface_v1" version="16"> - <description summary="A notification window"> - An interface that may be implemented by a wl_surface to host - notification contents. - </description> - - <request name="destroy" type="destructor"> - <description summary="Destroy the notification_surface"> - Unmap and destroy the notification surface. - </description> - </request> - - <!-- Version 16 additions --> - - <request name="set_app_id" since="16"> - <description summary="set application ID"> - Set an application identifier for the notification surface. - </description> - <arg name="app_id" type="string"/> - </request> - </interface> - - <interface name="zcr_input_method_surface_v1" version="17"> - <description summary="An input method window"> - An interface that may be implemented by a wl_surface to host IME contents. - </description> - - <request name="destroy" type="destructor"> - <description summary="Destroy the ime_surface"> - Unmap and destroy the input mtehod surface. - </description> - </request> - </interface> - -</protocol> diff --git a/chromium/third_party/wayland-protocols/unstable/secure-output/README b/chromium/third_party/wayland-protocols/unstable/secure-output/README deleted file mode 100644 index 3251af981e8..00000000000 --- a/chromium/third_party/wayland-protocols/unstable/secure-output/README +++ /dev/null @@ -1,4 +0,0 @@ -Secure output protocol - -Maintainers: -David Reveman <reveman@chromium.org> diff --git a/chromium/third_party/wayland-protocols/unstable/secure-output/secure-output-unstable-v1.xml b/chromium/third_party/wayland-protocols/unstable/secure-output/secure-output-unstable-v1.xml deleted file mode 100644 index ebcff9755e7..00000000000 --- a/chromium/third_party/wayland-protocols/unstable/secure-output/secure-output-unstable-v1.xml +++ /dev/null @@ -1,118 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="secure_output_unstable_v1"> - - <copyright> - Copyright 2016 The Chromium Authors. - - 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. - </copyright> - - <description summary="Protocol for providing secure output"> - This protocol specifies a set of interfaces used to prevent surface - contents from appearing in screenshots or from being visible on non-secure - outputs. - - In order to prevent surface contents from appearing in screenshots or from - being visible on non-secure outputs, a client must first bind the global - interface "wp_secure_output" which, if a compositor supports secure output, - is exposed by the registry. Using the bound global object, the client uses - the "get_security" request to instantiate an interface extension for a - wl_surface object. This extended interface will then allow surfaces - to be marked as only visible on secure outputs. - - Warning! The protocol described in this file is experimental and backward - incompatible changes may be made. Backward compatible changes may be added - together with the corresponding interface version bump. Backward - incompatible changes are done by bumping the version number in the protocol - and interface names and resetting the interface version. Once the protocol - is to be declared stable, the 'z' prefix and the version number in the - protocol and interface names are removed and the interface version number is - reset. - </description> - - <interface name="zcr_secure_output_v1" version="1"> - <description summary="secure output"> - The global interface exposing secure output capabilities is used - to instantiate an interface extension for a wl_surface object. - This extended interface will then allow surfaces to be marked as - as only visible on secure outputs. - </description> - - <request name="destroy" type="destructor"> - <description summary="unbind from the secure output interface"> - Informs the server that the client will not be using this - protocol object anymore. This does not affect any other objects, - security objects included. - </description> - </request> - - <enum name="error"> - <entry name="security_exists" value="0" - summary="the surface already has a security object associated"/> - </enum> - - <request name="get_security"> - <description summary="extend surface interface for security"> - Instantiate an interface extension for the given wl_surface to - provide surface security. If the given wl_surface already has - a security object associated, the security_exists protocol error - is raised. - </description> - - <arg name="id" type="new_id" interface="zcr_security_v1" - summary="the new security interface id"/> - <arg name="surface" type="object" interface="wl_surface" - summary="the surface"/> - </request> - </interface> - - <interface name="zcr_security_v1" version="1"> - <description summary="security interface to a wl_surface"> - An additional interface to a wl_surface object, which allows the - client to specify that a surface should not appear in screenshots - or be visible on non-secure outputs. - - If the wl_surface associated with the security object is destroyed, - the security object becomes inert. - - If the security object is destroyed, the security state is removed - from the wl_surface. The change will be applied on the next - wl_surface.commit. - </description> - - <request name="destroy" type="destructor"> - <description summary="remove security from the surface"> - The associated wl_surface's security state is removed. - The change is applied on the next wl_surface.commit. - </description> - </request> - - <request name="only_visible_on_secure_output"> - <description summary="set the only visible on secure output state"> - Constrain visibility of wl_surface contents to secure outputs. - See wp_secure_output for the description. - - The only visible on secure output state is double-buffered state, - and will be applied on the next wl_surface.commit. - </description> - </request> - </interface> - -</protocol> diff --git a/chromium/third_party/wayland-protocols/unstable/stylus-tools/README b/chromium/third_party/wayland-protocols/unstable/stylus-tools/README deleted file mode 100644 index b7ca3cf3edf..00000000000 --- a/chromium/third_party/wayland-protocols/unstable/stylus-tools/README +++ /dev/null @@ -1,4 +0,0 @@ -Stylus tools protocol - -Maintainers: -Vladislav Kaznacheev <kaznacheev@chromium.org> diff --git a/chromium/third_party/wayland-protocols/unstable/stylus-tools/stylus-tools-unstable-v1.xml b/chromium/third_party/wayland-protocols/unstable/stylus-tools/stylus-tools-unstable-v1.xml deleted file mode 100644 index 0d753c5d5a1..00000000000 --- a/chromium/third_party/wayland-protocols/unstable/stylus-tools/stylus-tools-unstable-v1.xml +++ /dev/null @@ -1,105 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="stylus_tools_unstable_v1"> - - <copyright> - Copyright 2017 The Chromium Authors. - - 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. -</copyright> - - <description summary="Protocol for the stylus tools"> - This protocol specifies a set of interfaces used to control the behavior - of stylus tools. - - 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. - </description> - - <interface name="zcr_stylus_tools_v1" version="1"> - <description summary="stylus_tools"> - The global interface is used to instantiate an interface extension for a - wl_surface object. This extended interface will then allow the client to - control the stylus-related behavior for input device event processing - related to wl_surface. - </description> - - <request name="destroy" type="destructor"> - <description summary="unbind from the stylus_tools interface"> - Informs the server that the client will not be using this - protocol object anymore. This does not affect any other objects, - stylus_tool objects included. - </description> - </request> - - <enum name="error"> - <entry name="stylus_tool_exists" value="0" - summary="the surface already has a stylus_tool object associated"/> - </enum> - - <request name="get_stylus_tool"> - <description summary="extend surface interface for stylus_tool"> - Instantiate an interface extension for the given wl_surface to - provide access to the stylus tools features. If the given - wl_surface already has an stylus_tool object associated, - the stylus_tool_exists protocol protocol error is raised. - </description> - - <arg name="id" type="new_id" interface="zcr_stylus_tool_v1" - summary="the new stylus_tool interface id"/> - <arg name="surface" type="object" interface="wl_surface" - summary="the surface"/> - </request> - </interface> - - <interface name="zcr_stylus_tool_v1" version="1"> - <description summary="stylus_tool interface to a wl_surface"> - An additional interface to a wl_surface object, which allows the - client to control the behavior of stylus tools. - - If the wl_surface associated with the stylus_tool object is destroyed, - the stylus_tool object becomes inert. - - If the stylus_tool object is destroyed, the stylus_tool state is removed - from the wl_surface. The change will be applied on the next - wl_surface.commit. - </description> - - <request name="destroy" type="destructor"> - <description summary="remove stylus_tool from the surface"> - The associated wl_surface's stylus_tool state is removed. - The change is applied on the next wl_surface.commit. - </description> - </request> - - <request name="set_stylus_only"> - <description summary="Set the stylus-only mode"> - Enables the "stylus-only" mode for input device event processing - related to wl_surface. - </description> - </request> - </interface> - -</protocol> diff --git a/chromium/third_party/wayland-protocols/unstable/stylus/README b/chromium/third_party/wayland-protocols/unstable/stylus/README deleted file mode 100644 index cd60ae52727..00000000000 --- a/chromium/third_party/wayland-protocols/unstable/stylus/README +++ /dev/null @@ -1,4 +0,0 @@ -Extension of pointer protocol with details for on-screen stylus - -Maintainers: -Dennis Kempin <denniskempin@chromium.org> diff --git a/chromium/third_party/wayland-protocols/unstable/stylus/stylus-unstable-v2.xml b/chromium/third_party/wayland-protocols/unstable/stylus/stylus-unstable-v2.xml deleted file mode 100644 index 8465f076824..00000000000 --- a/chromium/third_party/wayland-protocols/unstable/stylus/stylus-unstable-v2.xml +++ /dev/null @@ -1,116 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="stylus_unstable_v2"> - - <copyright> - Copyright 2016 The Chromium Authors. - - 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. - </copyright> - - <interface name="zcr_stylus_v2" version="1"> - <description summary="extends wl_touch with events for on-screen stylus"> - Allows a wl_touch to report stylus specific information. The client can - interpret the on-screen stylus like any other touch event, and use - this protocol to obtain detail information about the type of stylus, - as well as the force and tilt of the tool. - - These events are to be fired by the server within the same frame as other - wl_touch 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 uinterface version bump. - Backward incompatible changes are done by bumping the version number in - the protocol and uinterface 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. - </description> - - <enum name="error"> - <entry name="touch_stylus_exists" value="0" - summary="the touch already has a touch_stylus object associated"/> - </enum> - - <request name="get_touch_stylus"> - <description summary="get stylus interface for touch"> - Create touch_stylus object. See zcr_touch_stylus_v1 interface for - details. If the given wl_touch already has a touch_stylus object - associated, the touch_stylus_exists protocol error is raised. - </description> - <arg name="id" type="new_id" interface="zcr_touch_stylus_v2"/> - <arg name="touch" type="object" interface="wl_touch"/> - </request> - </interface> - - <interface name="zcr_touch_stylus_v2" version="1"> - <description summary="stylus extension for touch"> - The zcr_touch_stylus_v1 interface extends the wl_touch interface with - events to describe details about a stylus. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy stylus object"/> - </request> - - <enum name="tool_type"> - <description summary="tool type of device."/> - <entry name="touch" value="1" summary="Touch"/> - <entry name="pen" value="2" summary="Pen"/> - <entry name="eraser" value="3" summary="Eraser"/> - </enum> - - <event name="tool"> - <description summary="sets tool type of touch"> - Notification that the user is using a tool type other than touch. There - can only be one tool in use at a time. - This event is sent in the same frame as the wl_touch.down event. The - tool type cannot change while a touch is being reported. - </description> - <arg name="id" type="uint" summary="touch id"/> - <arg name="type" type="uint" enum="tool_type" summary="type of tool in use"/> - </event> - - <event name="force"> - <description summary="force change event"> - Notification of a change in physical force on the surface of the screen. - The force is calibrated and normalized to the 0 to 1 range. - </description> - <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> - <arg name="id" type="uint" summary="touch id"/> - <arg name="force" type="fixed" summary="new value of force"/> - </event> - - <event name="tilt"> - <description summary="tilt change event"> - Notification of a change in tilt of a stylus. - - Measured from surface normal as plane angle in degrees, values lie in - [-90,90]. A positive x is to the right and a positive y is towards the - user. - </description> - <arg name="time" type="uint" summary="timestamp with millisecond granularity"/> - <arg name="id" type="uint" summary="touch id"/> - <arg name="tilt_x" type="fixed" summary="tilt in x direction"/> - <arg name="tilt_y" type="fixed" summary="tilt in y direction"/> - </event> - </interface> - -</protocol> diff --git a/chromium/third_party/wayland-protocols/unstable/vsync-feedback/README b/chromium/third_party/wayland-protocols/unstable/vsync-feedback/README deleted file mode 100644 index f57e594b105..00000000000 --- a/chromium/third_party/wayland-protocols/unstable/vsync-feedback/README +++ /dev/null @@ -1,4 +0,0 @@ -Vertical synchronization timing feedback protocol - -Maintainers: -Tomasz Figa <tfiga@chromium.org> diff --git a/chromium/third_party/wayland-protocols/unstable/vsync-feedback/vsync-feedback-unstable-v1.xml b/chromium/third_party/wayland-protocols/unstable/vsync-feedback/vsync-feedback-unstable-v1.xml deleted file mode 100644 index 79211ffe5fd..00000000000 --- a/chromium/third_party/wayland-protocols/unstable/vsync-feedback/vsync-feedback-unstable-v1.xml +++ /dev/null @@ -1,99 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<protocol name="vsync_feedback_unstable_v1"> - - <copyright> - Copyright 2016 The Chromium Authors. - - 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. - </copyright> - - <description summary="Protocol for providing vertical synchronization timing"> - This protocol specifies a set of interfaces used to inform the client about - vertical synchronization timing in a precise way and without unnecessary - overhead. - - 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 version number in the protocol is removed and - the interface version number is reset. - </description> - - <interface name="zcr_vsync_feedback_v1" version="1"> - <description summary="Protocol for providing vertical synchronization timing"> - The global interface that allows clients to subscribe for vertical - synchronization timing data for given wl_output. - </description> - - <request name="destroy" type="destructor"> - <description summary="destroy vsync feedback object"> - Destroy this vsync feedback object. Existing vsync timing objects shall - not be affected by this request. - </description> - </request> - - <request name="get_vsync_timing"> - <description summary="get vsync timing object for given wl_output"> - Create a new vsync timing object that represents a subscription to - vertical synchronization timing updates of given wl_output object. - - The newly created object will immediately signal an update to notify - the subscriber of initial timing parameters. - </description> - <arg name="id" type="new_id" interface="zcr_vsync_timing_v1" summary="the new vsync timing interface id"/> - <arg name="output" type="object" interface="wl_output" summary="the wl_output object to subscribe for timings of" allow-null="true"/> - </request> - </interface> - - <interface name="zcr_vsync_timing_v1" version="1"> - <request name="destroy" type="destructor"> - <description summary="destroy vsync timing object"> - Destroy this vsync timing object. - </description> - </request> - - <event name="update"> - <description summary="vsync timing updated"> - Notifies client that vertical synchronization timing of given wl_output - has changed. - - Timing information consists of two data, timebase and interval. Timebase - is an absolute timestamp of the vsync event that caused the timing to - change. Interval is a period of time between subsequent vsync events. - - The unit of all above mentioned time values shall be microseconds and - absolute timestamps should match the realm of the primary system - monotonic counter, i.e. the POSIX clock_gettime(CLOCK_MONOTONIC). Data - type of both values is defined to be a 64-bit unsigned integer, but - since the biggest unsigned integer datatype defined by the Wayland - protocol is the 32-bit uint, both timebase and interval are split into - most significant and least significant part, suffixed by "_h" and "_l" - respectively. - </description> - <arg name="timebase_l" type="uint" summary="new vsync timebase (lower 32 bits)"/> - <arg name="timebase_h" type="uint" summary="new vsync timebase (upper 32 bits)"/> - <arg name="interval_l" type="uint" summary="new vsync interval (lower 32 bits)"/> - <arg name="interval_h" type="uint" summary="new vsync interval (upper 32 bits)"/> - </event> - </interface> - -</protocol> diff --git a/chromium/third_party/wayland/LICENSE b/chromium/third_party/wayland/LICENSE deleted file mode 100644 index bd433a832eb..00000000000 --- a/chromium/third_party/wayland/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -wayland/COPYING - -Copyright © 2008-2012 Kristian Høgsberg -Copyright © 2010-2012 Intel Corporation -Copyright © 2011 Benjamin Franzke -Copyright © 2012 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. diff --git a/chromium/third_party/wayland/OWNERS b/chromium/third_party/wayland/OWNERS deleted file mode 100644 index fe51e0c4f9f..00000000000 --- a/chromium/third_party/wayland/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -reveman@chromium.org -piman@chromium.org diff --git a/chromium/third_party/wayland/README.chromium b/chromium/third_party/wayland/README.chromium deleted file mode 100644 index 3cc66368875..00000000000 --- a/chromium/third_party/wayland/README.chromium +++ /dev/null @@ -1,22 +0,0 @@ -Name: wayland -URL: http://wayland.freedesktop.org/ -Version: 1.13.0 -License: MIT -License File: src/COPYING -Security Critical: yes - -Description: -Wayland is a protocol for a compositor to talk to its clients as well as a C -library implementation of that protocol. - -Modifications: -- None - -To import a new snapshot of wayland: -- Checkout the latest release tag: git checkout 1.13.0 -- Change the DEPS entry to the newly checked out commit. -- Update generated files: - ./autogen.sh && make - rsync -R $(git ls-files --others '*.h') ../include - rsync -R $(git ls-files --others 'protocol/*-protocol.c') .. -- Update this README to reflect the new version number. diff --git a/chromium/third_party/wayland/include/config.h b/chromium/third_party/wayland/include/config.h deleted file mode 100644 index 1d8e4819077..00000000000 --- a/chromium/third_party/wayland/include/config.h +++ /dev/null @@ -1,81 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the `accept4' function. */ -#define HAVE_ACCEPT4 1 - -/* Define to 1 if you have the <dlfcn.h> header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the <execinfo.h> header file. */ -#define HAVE_EXECINFO_H 1 - -/* Define to 1 if you have the <expat.h> header file. */ -/* #undef HAVE_EXPAT_H */ - -/* Define to 1 if you have the <inttypes.h> header file. */ -#define HAVE_INTTYPES_H 1 - -/* libxml-2.0 is available */ -#define HAVE_LIBXML 1 - -/* Define to 1 if you have the <memory.h> header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mkostemp' function. */ -#define HAVE_MKOSTEMP 1 - -/* Define to 1 if you have the `posix_fallocate' function. */ -#define HAVE_POSIX_FALLOCATE 1 - -/* Define to 1 if you have the <stdint.h> header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the <stdlib.h> header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the <strings.h> header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the <string.h> header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the <sys/stat.h> header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the <sys/types.h> header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the <unistd.h> header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "wayland" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=wayland&version=1.13.0" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "wayland" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "wayland 1.13.0" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "wayland" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://wayland.freedesktop.org/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "1.13.0" - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Version number of package */ -#define VERSION "1.13.0" diff --git a/chromium/third_party/wayland/include/protocol/wayland-client-protocol-core.h b/chromium/third_party/wayland/include/protocol/wayland-client-protocol-core.h deleted file mode 100644 index 6c84fd1c151..00000000000 --- a/chromium/third_party/wayland/include/protocol/wayland-client-protocol-core.h +++ /dev/null @@ -1,5587 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef WAYLAND_CLIENT_PROTOCOL_H -#define WAYLAND_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client-core.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_wayland The wayland protocol - * @section page_ifaces_wayland Interfaces - * - @subpage page_iface_wl_display - core global object - * - @subpage page_iface_wl_registry - global registry object - * - @subpage page_iface_wl_callback - callback object - * - @subpage page_iface_wl_compositor - the compositor singleton - * - @subpage page_iface_wl_shm_pool - a shared memory pool - * - @subpage page_iface_wl_shm - shared memory support - * - @subpage page_iface_wl_buffer - content for a wl_surface - * - @subpage page_iface_wl_data_offer - offer to transfer data - * - @subpage page_iface_wl_data_source - offer to transfer data - * - @subpage page_iface_wl_data_device - data transfer device - * - @subpage page_iface_wl_data_device_manager - data transfer interface - * - @subpage page_iface_wl_shell - create desktop-style surfaces - * - @subpage page_iface_wl_shell_surface - desktop-style metadata interface - * - @subpage page_iface_wl_surface - an onscreen surface - * - @subpage page_iface_wl_seat - group of input devices - * - @subpage page_iface_wl_pointer - pointer input device - * - @subpage page_iface_wl_keyboard - keyboard input device - * - @subpage page_iface_wl_touch - touchscreen input device - * - @subpage page_iface_wl_output - compositor output region - * - @subpage page_iface_wl_region - region interface - * - @subpage page_iface_wl_subcompositor - sub-surface compositing - * - @subpage page_iface_wl_subsurface - sub-surface interface to a wl_surface - * @section page_copyright_wayland Copyright - * <pre> - * - * Copyright © 2008-2011 Kristian Høgsberg - * Copyright © 2010-2011 Intel Corporation - * Copyright © 2012-2013 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. - * </pre> - */ -struct wl_buffer; -struct wl_callback; -struct wl_compositor; -struct wl_data_device; -struct wl_data_device_manager; -struct wl_data_offer; -struct wl_data_source; -struct wl_display; -struct wl_keyboard; -struct wl_output; -struct wl_pointer; -struct wl_region; -struct wl_registry; -struct wl_seat; -struct wl_shell; -struct wl_shell_surface; -struct wl_shm; -struct wl_shm_pool; -struct wl_subcompositor; -struct wl_subsurface; -struct wl_surface; -struct wl_touch; - -/** - * @page page_iface_wl_display wl_display - * @section page_iface_wl_display_desc Description - * - * The core global object. This is a special singleton object. It - * is used for internal Wayland protocol features. - * @section page_iface_wl_display_api API - * See @ref iface_wl_display. - */ -/** - * @defgroup iface_wl_display The wl_display interface - * - * The core global object. This is a special singleton object. It - * is used for internal Wayland protocol features. - */ -extern const struct wl_interface wl_display_interface; -/** - * @page page_iface_wl_registry wl_registry - * @section page_iface_wl_registry_desc Description - * - * The singleton global registry object. The server has a number of - * global objects that are available to all clients. These objects - * typically represent an actual object in the server (for example, - * an input device) or they are singleton objects that provide - * extension functionality. - * - * When a client creates a registry object, the registry object - * will emit a global event for each global currently in the - * registry. Globals come and go as a result of device or - * monitor hotplugs, reconfiguration or other events, and the - * registry will send out global and global_remove events to - * keep the client up to date with the changes. To mark the end - * of the initial burst of events, the client can use the - * wl_display.sync request immediately after calling - * wl_display.get_registry. - * - * A client can bind to a global object by using the bind - * request. This creates a client-side handle that lets the object - * emit events to the client and lets the client invoke requests on - * the object. - * @section page_iface_wl_registry_api API - * See @ref iface_wl_registry. - */ -/** - * @defgroup iface_wl_registry The wl_registry interface - * - * The singleton global registry object. The server has a number of - * global objects that are available to all clients. These objects - * typically represent an actual object in the server (for example, - * an input device) or they are singleton objects that provide - * extension functionality. - * - * When a client creates a registry object, the registry object - * will emit a global event for each global currently in the - * registry. Globals come and go as a result of device or - * monitor hotplugs, reconfiguration or other events, and the - * registry will send out global and global_remove events to - * keep the client up to date with the changes. To mark the end - * of the initial burst of events, the client can use the - * wl_display.sync request immediately after calling - * wl_display.get_registry. - * - * A client can bind to a global object by using the bind - * request. This creates a client-side handle that lets the object - * emit events to the client and lets the client invoke requests on - * the object. - */ -extern const struct wl_interface wl_registry_interface; -/** - * @page page_iface_wl_callback wl_callback - * @section page_iface_wl_callback_desc Description - * - * Clients can handle the 'done' event to get notified when - * the related request is done. - * @section page_iface_wl_callback_api API - * See @ref iface_wl_callback. - */ -/** - * @defgroup iface_wl_callback The wl_callback interface - * - * Clients can handle the 'done' event to get notified when - * the related request is done. - */ -extern const struct wl_interface wl_callback_interface; -/** - * @page page_iface_wl_compositor wl_compositor - * @section page_iface_wl_compositor_desc Description - * - * A compositor. This object is a singleton global. The - * compositor is in charge of combining the contents of multiple - * surfaces into one displayable output. - * @section page_iface_wl_compositor_api API - * See @ref iface_wl_compositor. - */ -/** - * @defgroup iface_wl_compositor The wl_compositor interface - * - * A compositor. This object is a singleton global. The - * compositor is in charge of combining the contents of multiple - * surfaces into one displayable output. - */ -extern const struct wl_interface wl_compositor_interface; -/** - * @page page_iface_wl_shm_pool wl_shm_pool - * @section page_iface_wl_shm_pool_desc Description - * - * The wl_shm_pool object encapsulates a piece of memory shared - * between the compositor and client. Through the wl_shm_pool - * object, the client can allocate shared memory wl_buffer objects. - * All objects created through the same pool share the same - * underlying mapped memory. Reusing the mapped memory avoids the - * setup/teardown overhead and is useful when interactively resizing - * a surface or for many small buffers. - * @section page_iface_wl_shm_pool_api API - * See @ref iface_wl_shm_pool. - */ -/** - * @defgroup iface_wl_shm_pool The wl_shm_pool interface - * - * The wl_shm_pool object encapsulates a piece of memory shared - * between the compositor and client. Through the wl_shm_pool - * object, the client can allocate shared memory wl_buffer objects. - * All objects created through the same pool share the same - * underlying mapped memory. Reusing the mapped memory avoids the - * setup/teardown overhead and is useful when interactively resizing - * a surface or for many small buffers. - */ -extern const struct wl_interface wl_shm_pool_interface; -/** - * @page page_iface_wl_shm wl_shm - * @section page_iface_wl_shm_desc Description - * - * A singleton global object that provides support for shared - * memory. - * - * Clients can create wl_shm_pool objects using the create_pool - * request. - * - * At connection setup time, the wl_shm object emits one or more - * format events to inform clients about the valid pixel formats - * that can be used for buffers. - * @section page_iface_wl_shm_api API - * See @ref iface_wl_shm. - */ -/** - * @defgroup iface_wl_shm The wl_shm interface - * - * A singleton global object that provides support for shared - * memory. - * - * Clients can create wl_shm_pool objects using the create_pool - * request. - * - * At connection setup time, the wl_shm object emits one or more - * format events to inform clients about the valid pixel formats - * that can be used for buffers. - */ -extern const struct wl_interface wl_shm_interface; -/** - * @page page_iface_wl_buffer wl_buffer - * @section page_iface_wl_buffer_desc Description - * - * A buffer provides the content for a wl_surface. Buffers are - * created through factory interfaces such as wl_drm, wl_shm or - * similar. It has a width and a height and can be attached to a - * wl_surface, but the mechanism by which a client provides and - * updates the contents is defined by the buffer factory interface. - * @section page_iface_wl_buffer_api API - * See @ref iface_wl_buffer. - */ -/** - * @defgroup iface_wl_buffer The wl_buffer interface - * - * A buffer provides the content for a wl_surface. Buffers are - * created through factory interfaces such as wl_drm, wl_shm or - * similar. It has a width and a height and can be attached to a - * wl_surface, but the mechanism by which a client provides and - * updates the contents is defined by the buffer factory interface. - */ -extern const struct wl_interface wl_buffer_interface; -/** - * @page page_iface_wl_data_offer wl_data_offer - * @section page_iface_wl_data_offer_desc Description - * - * A wl_data_offer represents a piece of data offered for transfer - * by another client (the source client). It is used by the - * copy-and-paste and drag-and-drop mechanisms. 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. - * @section page_iface_wl_data_offer_api API - * See @ref iface_wl_data_offer. - */ -/** - * @defgroup iface_wl_data_offer The wl_data_offer interface - * - * A wl_data_offer represents a piece of data offered for transfer - * by another client (the source client). It is used by the - * copy-and-paste and drag-and-drop mechanisms. 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. - */ -extern const struct wl_interface wl_data_offer_interface; -/** - * @page page_iface_wl_data_source wl_data_source - * @section page_iface_wl_data_source_desc Description - * - * The wl_data_source object is the source side of a wl_data_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. - * @section page_iface_wl_data_source_api API - * See @ref iface_wl_data_source. - */ -/** - * @defgroup iface_wl_data_source The wl_data_source interface - * - * The wl_data_source object is the source side of a wl_data_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. - */ -extern const struct wl_interface wl_data_source_interface; -/** - * @page page_iface_wl_data_device wl_data_device - * @section page_iface_wl_data_device_desc Description - * - * There is one wl_data_device per seat which can be obtained - * from the global wl_data_device_manager singleton. - * - * A wl_data_device provides access to inter-client data transfer - * mechanisms such as copy-and-paste and drag-and-drop. - * @section page_iface_wl_data_device_api API - * See @ref iface_wl_data_device. - */ -/** - * @defgroup iface_wl_data_device The wl_data_device interface - * - * There is one wl_data_device per seat which can be obtained - * from the global wl_data_device_manager singleton. - * - * A wl_data_device provides access to inter-client data transfer - * mechanisms such as copy-and-paste and drag-and-drop. - */ -extern const struct wl_interface wl_data_device_interface; -/** - * @page page_iface_wl_data_device_manager wl_data_device_manager - * @section page_iface_wl_data_device_manager_desc Description - * - * The wl_data_device_manager is a singleton global object that - * provides access to inter-client data transfer mechanisms such as - * copy-and-paste and drag-and-drop. These mechanisms are tied to - * a wl_seat and this interface lets a client get a wl_data_device - * corresponding to a wl_seat. - * - * Depending on the version bound, the objects created from the bound - * wl_data_device_manager object will have different requirements for - * functioning properly. See wl_data_source.set_actions, - * wl_data_offer.accept and wl_data_offer.finish for details. - * @section page_iface_wl_data_device_manager_api API - * See @ref iface_wl_data_device_manager. - */ -/** - * @defgroup iface_wl_data_device_manager The wl_data_device_manager interface - * - * The wl_data_device_manager is a singleton global object that - * provides access to inter-client data transfer mechanisms such as - * copy-and-paste and drag-and-drop. These mechanisms are tied to - * a wl_seat and this interface lets a client get a wl_data_device - * corresponding to a wl_seat. - * - * Depending on the version bound, the objects created from the bound - * wl_data_device_manager object will have different requirements for - * functioning properly. See wl_data_source.set_actions, - * wl_data_offer.accept and wl_data_offer.finish for details. - */ -extern const struct wl_interface wl_data_device_manager_interface; -/** - * @page page_iface_wl_shell wl_shell - * @section page_iface_wl_shell_desc Description - * - * This interface is implemented by servers that provide - * desktop-style user interfaces. - * - * It allows clients to associate a wl_shell_surface with - * a basic surface. - * @section page_iface_wl_shell_api API - * See @ref iface_wl_shell. - */ -/** - * @defgroup iface_wl_shell The wl_shell interface - * - * This interface is implemented by servers that provide - * desktop-style user interfaces. - * - * It allows clients to associate a wl_shell_surface with - * a basic surface. - */ -extern const struct wl_interface wl_shell_interface; -/** - * @page page_iface_wl_shell_surface wl_shell_surface - * @section page_iface_wl_shell_surface_desc Description - * - * 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 toplevel, fullscreen - * or popup windows, move, resize or maximize them, associate - * metadata like title and class, etc. - * - * On the server side the object is automatically destroyed when - * the related wl_surface is destroyed. On the client side, - * wl_shell_surface_destroy() must be called before destroying - * the wl_surface object. - * @section page_iface_wl_shell_surface_api API - * See @ref iface_wl_shell_surface. - */ -/** - * @defgroup iface_wl_shell_surface The wl_shell_surface interface - * - * 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 toplevel, fullscreen - * or popup windows, move, resize or maximize them, associate - * metadata like title and class, etc. - * - * On the server side the object is automatically destroyed when - * the related wl_surface is destroyed. On the client side, - * wl_shell_surface_destroy() must be called before destroying - * the wl_surface object. - */ -extern const struct wl_interface wl_shell_surface_interface; -/** - * @page page_iface_wl_surface wl_surface - * @section page_iface_wl_surface_desc Description - * - * A surface is a rectangular area that is displayed on the screen. - * It has a location, size and pixel contents. - * - * The size of a surface (and relative positions on it) is described - * in surface-local coordinates, which may differ from the buffer - * coordinates of the pixel content, in case a buffer_transform - * or a buffer_scale is used. - * - * A surface without a "role" is fairly useless: a compositor does - * not know where, when or how to present it. The role is the - * purpose of a wl_surface. Examples of roles are a cursor for a - * pointer (as set by wl_pointer.set_cursor), a drag icon - * (wl_data_device.start_drag), a sub-surface - * (wl_subcompositor.get_subsurface), and a window as defined by a - * shell protocol (e.g. wl_shell.get_shell_surface). - * - * A surface can have only one role at a time. Initially a - * wl_surface does not have a role. Once a wl_surface is given a - * role, it is set permanently for the whole lifetime of the - * wl_surface object. Giving the current role again is allowed, - * unless explicitly forbidden by the relevant interface - * specification. - * - * Surface roles are given by requests in other interfaces such as - * wl_pointer.set_cursor. The request should explicitly mention - * that this request gives a role to a wl_surface. Often, this - * request also creates a new protocol object that represents the - * role and adds additional functionality to wl_surface. When a - * client wants to destroy a wl_surface, they must destroy this 'role - * object' before the wl_surface. - * - * Destroying the role object does not remove the role from the - * wl_surface, but it may stop the wl_surface from "playing the role". - * For instance, if a wl_subsurface object is destroyed, the wl_surface - * it was created for will be unmapped and forget its position and - * z-order. It is allowed to create a wl_subsurface for the same - * wl_surface again, but it is not allowed to use the wl_surface as - * a cursor (cursor is a different role than sub-surface, and role - * switching is not allowed). - * @section page_iface_wl_surface_api API - * See @ref iface_wl_surface. - */ -/** - * @defgroup iface_wl_surface The wl_surface interface - * - * A surface is a rectangular area that is displayed on the screen. - * It has a location, size and pixel contents. - * - * The size of a surface (and relative positions on it) is described - * in surface-local coordinates, which may differ from the buffer - * coordinates of the pixel content, in case a buffer_transform - * or a buffer_scale is used. - * - * A surface without a "role" is fairly useless: a compositor does - * not know where, when or how to present it. The role is the - * purpose of a wl_surface. Examples of roles are a cursor for a - * pointer (as set by wl_pointer.set_cursor), a drag icon - * (wl_data_device.start_drag), a sub-surface - * (wl_subcompositor.get_subsurface), and a window as defined by a - * shell protocol (e.g. wl_shell.get_shell_surface). - * - * A surface can have only one role at a time. Initially a - * wl_surface does not have a role. Once a wl_surface is given a - * role, it is set permanently for the whole lifetime of the - * wl_surface object. Giving the current role again is allowed, - * unless explicitly forbidden by the relevant interface - * specification. - * - * Surface roles are given by requests in other interfaces such as - * wl_pointer.set_cursor. The request should explicitly mention - * that this request gives a role to a wl_surface. Often, this - * request also creates a new protocol object that represents the - * role and adds additional functionality to wl_surface. When a - * client wants to destroy a wl_surface, they must destroy this 'role - * object' before the wl_surface. - * - * Destroying the role object does not remove the role from the - * wl_surface, but it may stop the wl_surface from "playing the role". - * For instance, if a wl_subsurface object is destroyed, the wl_surface - * it was created for will be unmapped and forget its position and - * z-order. It is allowed to create a wl_subsurface for the same - * wl_surface again, but it is not allowed to use the wl_surface as - * a cursor (cursor is a different role than sub-surface, and role - * switching is not allowed). - */ -extern const struct wl_interface wl_surface_interface; -/** - * @page page_iface_wl_seat wl_seat - * @section page_iface_wl_seat_desc Description - * - * A seat is a group of keyboards, pointer and touch devices. This - * object is published as a global during start up, or when such a - * device is hot plugged. A seat typically has a pointer and - * maintains a keyboard focus and a pointer focus. - * @section page_iface_wl_seat_api API - * See @ref iface_wl_seat. - */ -/** - * @defgroup iface_wl_seat The wl_seat interface - * - * A seat is a group of keyboards, pointer and touch devices. This - * object is published as a global during start up, or when such a - * device is hot plugged. A seat typically has a pointer and - * maintains a keyboard focus and a pointer focus. - */ -extern const struct wl_interface wl_seat_interface; -/** - * @page page_iface_wl_pointer wl_pointer - * @section page_iface_wl_pointer_desc Description - * - * The wl_pointer interface represents one or more input devices, - * such as mice, which control the pointer location and pointer_focus - * of a seat. - * - * The wl_pointer interface generates motion, enter and leave - * events for the surfaces that the pointer is located over, - * and button and axis events for button presses, button releases - * and scrolling. - * @section page_iface_wl_pointer_api API - * See @ref iface_wl_pointer. - */ -/** - * @defgroup iface_wl_pointer The wl_pointer interface - * - * The wl_pointer interface represents one or more input devices, - * such as mice, which control the pointer location and pointer_focus - * of a seat. - * - * The wl_pointer interface generates motion, enter and leave - * events for the surfaces that the pointer is located over, - * and button and axis events for button presses, button releases - * and scrolling. - */ -extern const struct wl_interface wl_pointer_interface; -/** - * @page page_iface_wl_keyboard wl_keyboard - * @section page_iface_wl_keyboard_desc Description - * - * The wl_keyboard interface represents one or more keyboards - * associated with a seat. - * @section page_iface_wl_keyboard_api API - * See @ref iface_wl_keyboard. - */ -/** - * @defgroup iface_wl_keyboard The wl_keyboard interface - * - * The wl_keyboard interface represents one or more keyboards - * associated with a seat. - */ -extern const struct wl_interface wl_keyboard_interface; -/** - * @page page_iface_wl_touch wl_touch - * @section page_iface_wl_touch_desc Description - * - * The wl_touch interface represents a touchscreen - * associated with a seat. - * - * Touch interactions can consist of one or more contacts. - * For each contact, a series of events is generated, starting - * with a down event, followed by zero or more motion events, - * and ending with an up event. Events relating to the same - * contact point can be identified by the ID of the sequence. - * @section page_iface_wl_touch_api API - * See @ref iface_wl_touch. - */ -/** - * @defgroup iface_wl_touch The wl_touch interface - * - * The wl_touch interface represents a touchscreen - * associated with a seat. - * - * Touch interactions can consist of one or more contacts. - * For each contact, a series of events is generated, starting - * with a down event, followed by zero or more motion events, - * and ending with an up event. Events relating to the same - * contact point can be identified by the ID of the sequence. - */ -extern const struct wl_interface wl_touch_interface; -/** - * @page page_iface_wl_output wl_output - * @section page_iface_wl_output_desc Description - * - * An output describes part of the compositor geometry. The - * compositor works in the 'compositor coordinate system' and an - * output corresponds to a rectangular area in that space that is - * actually visible. This typically corresponds to a monitor that - * displays part of the compositor space. This object is published - * as global during start up, or when a monitor is hotplugged. - * @section page_iface_wl_output_api API - * See @ref iface_wl_output. - */ -/** - * @defgroup iface_wl_output The wl_output interface - * - * An output describes part of the compositor geometry. The - * compositor works in the 'compositor coordinate system' and an - * output corresponds to a rectangular area in that space that is - * actually visible. This typically corresponds to a monitor that - * displays part of the compositor space. This object is published - * as global during start up, or when a monitor is hotplugged. - */ -extern const struct wl_interface wl_output_interface; -/** - * @page page_iface_wl_region wl_region - * @section page_iface_wl_region_desc Description - * - * A region object describes an area. - * - * Region objects are used to describe the opaque and input - * regions of a surface. - * @section page_iface_wl_region_api API - * See @ref iface_wl_region. - */ -/** - * @defgroup iface_wl_region The wl_region interface - * - * A region object describes an area. - * - * Region objects are used to describe the opaque and input - * regions of a surface. - */ -extern const struct wl_interface wl_region_interface; -/** - * @page page_iface_wl_subcompositor wl_subcompositor - * @section page_iface_wl_subcompositor_desc Description - * - * The global interface exposing sub-surface compositing capabilities. - * A wl_surface, that has sub-surfaces associated, is called the - * parent surface. Sub-surfaces can be arbitrarily nested and create - * a tree of sub-surfaces. - * - * The root surface in a tree of sub-surfaces is the main - * surface. The main surface cannot be a sub-surface, because - * sub-surfaces must always have a parent. - * - * A main surface with its sub-surfaces forms a (compound) window. - * For window management purposes, this set of wl_surface objects is - * to be considered as a single window, and it should also behave as - * such. - * - * The aim of sub-surfaces is to offload some of the compositing work - * within a window from clients to the compositor. A prime example is - * a video player with decorations and video in separate wl_surface - * objects. This should allow the compositor to pass YUV video buffer - * processing to dedicated overlay hardware when possible. - * @section page_iface_wl_subcompositor_api API - * See @ref iface_wl_subcompositor. - */ -/** - * @defgroup iface_wl_subcompositor The wl_subcompositor interface - * - * The global interface exposing sub-surface compositing capabilities. - * A wl_surface, that has sub-surfaces associated, is called the - * parent surface. Sub-surfaces can be arbitrarily nested and create - * a tree of sub-surfaces. - * - * The root surface in a tree of sub-surfaces is the main - * surface. The main surface cannot be a sub-surface, because - * sub-surfaces must always have a parent. - * - * A main surface with its sub-surfaces forms a (compound) window. - * For window management purposes, this set of wl_surface objects is - * to be considered as a single window, and it should also behave as - * such. - * - * The aim of sub-surfaces is to offload some of the compositing work - * within a window from clients to the compositor. A prime example is - * a video player with decorations and video in separate wl_surface - * objects. This should allow the compositor to pass YUV video buffer - * processing to dedicated overlay hardware when possible. - */ -extern const struct wl_interface wl_subcompositor_interface; -/** - * @page page_iface_wl_subsurface wl_subsurface - * @section page_iface_wl_subsurface_desc Description - * - * An additional interface to a wl_surface object, which has been - * made a sub-surface. A sub-surface has one parent surface. A - * sub-surface's size and position are not limited to that of the parent. - * Particularly, a sub-surface is not automatically clipped to its - * parent's area. - * - * A sub-surface becomes mapped, when a non-NULL wl_buffer is applied - * and the parent surface is mapped. The order of which one happens - * first is irrelevant. A sub-surface is hidden if the parent becomes - * hidden, or if a NULL wl_buffer is applied. These rules apply - * recursively through the tree of surfaces. - * - * The behaviour of a wl_surface.commit request on a sub-surface - * depends on the sub-surface's mode. The possible modes are - * synchronized and desynchronized, see methods - * wl_subsurface.set_sync and wl_subsurface.set_desync. Synchronized - * mode caches the wl_surface state to be applied when the parent's - * state gets applied, and desynchronized mode applies the pending - * wl_surface state directly. A sub-surface is initially in the - * synchronized mode. - * - * Sub-surfaces have also other kind of state, which is managed by - * wl_subsurface requests, as opposed to wl_surface requests. This - * state includes the sub-surface position relative to the parent - * surface (wl_subsurface.set_position), and the stacking order of - * the parent and its sub-surfaces (wl_subsurface.place_above and - * .place_below). This state is applied when the parent surface's - * wl_surface state is applied, regardless of the sub-surface's mode. - * As the exception, set_sync and set_desync are effective immediately. - * - * The main surface can be thought to be always in desynchronized mode, - * since it does not have a parent in the sub-surfaces sense. - * - * Even if a sub-surface is in desynchronized mode, it will behave as - * in synchronized mode, if its parent surface behaves as in - * synchronized mode. This rule is applied recursively throughout the - * tree of surfaces. This means, that one can set a sub-surface into - * synchronized mode, and then assume that all its child and grand-child - * sub-surfaces are synchronized, too, without explicitly setting them. - * - * If the wl_surface associated with the wl_subsurface is destroyed, the - * wl_subsurface object becomes inert. Note, that destroying either object - * takes effect immediately. If you need to synchronize the removal - * of a sub-surface to the parent surface update, unmap the sub-surface - * first by attaching a NULL wl_buffer, update parent, and then destroy - * the sub-surface. - * - * If the parent wl_surface object is destroyed, the sub-surface is - * unmapped. - * @section page_iface_wl_subsurface_api API - * See @ref iface_wl_subsurface. - */ -/** - * @defgroup iface_wl_subsurface The wl_subsurface interface - * - * An additional interface to a wl_surface object, which has been - * made a sub-surface. A sub-surface has one parent surface. A - * sub-surface's size and position are not limited to that of the parent. - * Particularly, a sub-surface is not automatically clipped to its - * parent's area. - * - * A sub-surface becomes mapped, when a non-NULL wl_buffer is applied - * and the parent surface is mapped. The order of which one happens - * first is irrelevant. A sub-surface is hidden if the parent becomes - * hidden, or if a NULL wl_buffer is applied. These rules apply - * recursively through the tree of surfaces. - * - * The behaviour of a wl_surface.commit request on a sub-surface - * depends on the sub-surface's mode. The possible modes are - * synchronized and desynchronized, see methods - * wl_subsurface.set_sync and wl_subsurface.set_desync. Synchronized - * mode caches the wl_surface state to be applied when the parent's - * state gets applied, and desynchronized mode applies the pending - * wl_surface state directly. A sub-surface is initially in the - * synchronized mode. - * - * Sub-surfaces have also other kind of state, which is managed by - * wl_subsurface requests, as opposed to wl_surface requests. This - * state includes the sub-surface position relative to the parent - * surface (wl_subsurface.set_position), and the stacking order of - * the parent and its sub-surfaces (wl_subsurface.place_above and - * .place_below). This state is applied when the parent surface's - * wl_surface state is applied, regardless of the sub-surface's mode. - * As the exception, set_sync and set_desync are effective immediately. - * - * The main surface can be thought to be always in desynchronized mode, - * since it does not have a parent in the sub-surfaces sense. - * - * Even if a sub-surface is in desynchronized mode, it will behave as - * in synchronized mode, if its parent surface behaves as in - * synchronized mode. This rule is applied recursively throughout the - * tree of surfaces. This means, that one can set a sub-surface into - * synchronized mode, and then assume that all its child and grand-child - * sub-surfaces are synchronized, too, without explicitly setting them. - * - * If the wl_surface associated with the wl_subsurface is destroyed, the - * wl_subsurface object becomes inert. Note, that destroying either object - * takes effect immediately. If you need to synchronize the removal - * of a sub-surface to the parent surface update, unmap the sub-surface - * first by attaching a NULL wl_buffer, update parent, and then destroy - * the sub-surface. - * - * If the parent wl_surface object is destroyed, the sub-surface is - * unmapped. - */ -extern const struct wl_interface wl_subsurface_interface; - -#ifndef WL_DISPLAY_ERROR_ENUM -#define WL_DISPLAY_ERROR_ENUM -/** - * @ingroup iface_wl_display - * global error values - * - * These errors are global and can be emitted in response to any - * server request. - */ -enum wl_display_error { - /** - * server couldn't find object - */ - WL_DISPLAY_ERROR_INVALID_OBJECT = 0, - /** - * method doesn't exist on the specified interface - */ - WL_DISPLAY_ERROR_INVALID_METHOD = 1, - /** - * server is out of memory - */ - WL_DISPLAY_ERROR_NO_MEMORY = 2, -}; -#endif /* WL_DISPLAY_ERROR_ENUM */ - -/** - * @ingroup iface_wl_display - * @struct wl_display_listener - */ -struct wl_display_listener { - /** - * fatal error event - * - * The error event is sent out when a fatal (non-recoverable) - * error has occurred. The object_id argument is the object where - * the error occurred, most often in response to a request to that - * object. The code identifies the error and is defined by the - * object interface. As such, each interface defines its own set of - * error codes. The message is a brief description of the error, - * for (debugging) convenience. - * @param object_id object where the error occurred - * @param code error code - * @param message error description - */ - void (*error)(void *data, - struct wl_display *wl_display, - void *object_id, - uint32_t code, - const char *message); - /** - * acknowledge object ID deletion - * - * This event is used internally by the object ID management - * logic. When a client deletes an object, the server will send - * this event to acknowledge that it has seen the delete request. - * When the client receives this event, it will know that it can - * safely reuse the object ID. - * @param id deleted object ID - */ - void (*delete_id)(void *data, - struct wl_display *wl_display, - uint32_t id); -}; - -/** - * @ingroup iface_wl_display - */ -static inline int -wl_display_add_listener(struct wl_display *wl_display, - const struct wl_display_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_display, - (void (**)(void)) listener, data); -} - -#define WL_DISPLAY_SYNC 0 -#define WL_DISPLAY_GET_REGISTRY 1 - -/** - * @ingroup iface_wl_display - */ -#define WL_DISPLAY_ERROR_SINCE_VERSION 1 -/** - * @ingroup iface_wl_display - */ -#define WL_DISPLAY_DELETE_ID_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_display - */ -#define WL_DISPLAY_SYNC_SINCE_VERSION 1 -/** - * @ingroup iface_wl_display - */ -#define WL_DISPLAY_GET_REGISTRY_SINCE_VERSION 1 - -/** @ingroup iface_wl_display */ -static inline void -wl_display_set_user_data(struct wl_display *wl_display, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_display, user_data); -} - -/** @ingroup iface_wl_display */ -static inline void * -wl_display_get_user_data(struct wl_display *wl_display) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_display); -} - -static inline uint32_t -wl_display_get_version(struct wl_display *wl_display) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_display); -} - -/** - * @ingroup iface_wl_display - * - * The sync request asks the server to emit the 'done' event - * on the returned wl_callback object. Since requests are - * handled in-order and events are delivered in-order, this can - * be used as a barrier to ensure all previous requests and the - * resulting events have been handled. - * - * The object returned by this request will be destroyed by the - * compositor after the callback is fired and as such the client must not - * attempt to use it after that point. - * - * The callback_data passed in the callback is the event serial. - */ -static inline struct wl_callback * -wl_display_sync(struct wl_display *wl_display) -{ - struct wl_proxy *callback; - - callback = wl_proxy_marshal_constructor((struct wl_proxy *) wl_display, - WL_DISPLAY_SYNC, &wl_callback_interface, NULL); - - return (struct wl_callback *) callback; -} - -/** - * @ingroup iface_wl_display - * - * This request creates a registry object that allows the client - * to list and bind the global objects available from the - * compositor. - */ -static inline struct wl_registry * -wl_display_get_registry(struct wl_display *wl_display) -{ - struct wl_proxy *registry; - - registry = wl_proxy_marshal_constructor((struct wl_proxy *) wl_display, - WL_DISPLAY_GET_REGISTRY, &wl_registry_interface, NULL); - - return (struct wl_registry *) registry; -} - -/** - * @ingroup iface_wl_registry - * @struct wl_registry_listener - */ -struct wl_registry_listener { - /** - * announce global object - * - * Notify the client of global objects. - * - * The event notifies the client that a global object with the - * given name is now available, and it implements the given version - * of the given interface. - * @param name numeric name of the global object - * @param interface interface implemented by the object - * @param version interface version - */ - void (*global)(void *data, - struct wl_registry *wl_registry, - uint32_t name, - const char *interface, - uint32_t version); - /** - * announce removal of global object - * - * Notify the client of removed global objects. - * - * This event notifies the client that the global identified by - * name is no longer available. If the client bound to the global - * using the bind request, the client should now destroy that - * object. - * - * The object remains valid and requests to the object will be - * ignored until the client destroys it, to avoid races between the - * global going away and a client sending a request to it. - * @param name numeric name of the global object - */ - void (*global_remove)(void *data, - struct wl_registry *wl_registry, - uint32_t name); -}; - -/** - * @ingroup iface_wl_registry - */ -static inline int -wl_registry_add_listener(struct wl_registry *wl_registry, - const struct wl_registry_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_registry, - (void (**)(void)) listener, data); -} - -#define WL_REGISTRY_BIND 0 - -/** - * @ingroup iface_wl_registry - */ -#define WL_REGISTRY_GLOBAL_SINCE_VERSION 1 -/** - * @ingroup iface_wl_registry - */ -#define WL_REGISTRY_GLOBAL_REMOVE_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_registry - */ -#define WL_REGISTRY_BIND_SINCE_VERSION 1 - -/** @ingroup iface_wl_registry */ -static inline void -wl_registry_set_user_data(struct wl_registry *wl_registry, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_registry, user_data); -} - -/** @ingroup iface_wl_registry */ -static inline void * -wl_registry_get_user_data(struct wl_registry *wl_registry) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_registry); -} - -static inline uint32_t -wl_registry_get_version(struct wl_registry *wl_registry) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_registry); -} - -/** @ingroup iface_wl_registry */ -static inline void -wl_registry_destroy(struct wl_registry *wl_registry) -{ - wl_proxy_destroy((struct wl_proxy *) wl_registry); -} - -/** - * @ingroup iface_wl_registry - * - * Binds a new, client-created object to the server using the - * specified name as the identifier. - */ -static inline void * -wl_registry_bind(struct wl_registry *wl_registry, uint32_t name, const struct wl_interface *interface, uint32_t version) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor_versioned((struct wl_proxy *) wl_registry, - WL_REGISTRY_BIND, interface, version, name, interface->name, version, NULL); - - return (void *) id; -} - -/** - * @ingroup iface_wl_callback - * @struct wl_callback_listener - */ -struct wl_callback_listener { - /** - * done event - * - * Notify the client when the related request is done. - * @param callback_data request-specific data for the callback - */ - void (*done)(void *data, - struct wl_callback *wl_callback, - uint32_t callback_data); -}; - -/** - * @ingroup iface_wl_callback - */ -static inline int -wl_callback_add_listener(struct wl_callback *wl_callback, - const struct wl_callback_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_callback, - (void (**)(void)) listener, data); -} - -/** - * @ingroup iface_wl_callback - */ -#define WL_CALLBACK_DONE_SINCE_VERSION 1 - - -/** @ingroup iface_wl_callback */ -static inline void -wl_callback_set_user_data(struct wl_callback *wl_callback, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_callback, user_data); -} - -/** @ingroup iface_wl_callback */ -static inline void * -wl_callback_get_user_data(struct wl_callback *wl_callback) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_callback); -} - -static inline uint32_t -wl_callback_get_version(struct wl_callback *wl_callback) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_callback); -} - -/** @ingroup iface_wl_callback */ -static inline void -wl_callback_destroy(struct wl_callback *wl_callback) -{ - wl_proxy_destroy((struct wl_proxy *) wl_callback); -} - -#define WL_COMPOSITOR_CREATE_SURFACE 0 -#define WL_COMPOSITOR_CREATE_REGION 1 - - -/** - * @ingroup iface_wl_compositor - */ -#define WL_COMPOSITOR_CREATE_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_compositor - */ -#define WL_COMPOSITOR_CREATE_REGION_SINCE_VERSION 1 - -/** @ingroup iface_wl_compositor */ -static inline void -wl_compositor_set_user_data(struct wl_compositor *wl_compositor, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_compositor, user_data); -} - -/** @ingroup iface_wl_compositor */ -static inline void * -wl_compositor_get_user_data(struct wl_compositor *wl_compositor) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_compositor); -} - -static inline uint32_t -wl_compositor_get_version(struct wl_compositor *wl_compositor) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_compositor); -} - -/** @ingroup iface_wl_compositor */ -static inline void -wl_compositor_destroy(struct wl_compositor *wl_compositor) -{ - wl_proxy_destroy((struct wl_proxy *) wl_compositor); -} - -/** - * @ingroup iface_wl_compositor - * - * Ask the compositor to create a new surface. - */ -static inline struct wl_surface * -wl_compositor_create_surface(struct wl_compositor *wl_compositor) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_compositor, - WL_COMPOSITOR_CREATE_SURFACE, &wl_surface_interface, NULL); - - return (struct wl_surface *) id; -} - -/** - * @ingroup iface_wl_compositor - * - * Ask the compositor to create a new region. - */ -static inline struct wl_region * -wl_compositor_create_region(struct wl_compositor *wl_compositor) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_compositor, - WL_COMPOSITOR_CREATE_REGION, &wl_region_interface, NULL); - - return (struct wl_region *) id; -} - -#define WL_SHM_POOL_CREATE_BUFFER 0 -#define WL_SHM_POOL_DESTROY 1 -#define WL_SHM_POOL_RESIZE 2 - - -/** - * @ingroup iface_wl_shm_pool - */ -#define WL_SHM_POOL_CREATE_BUFFER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shm_pool - */ -#define WL_SHM_POOL_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shm_pool - */ -#define WL_SHM_POOL_RESIZE_SINCE_VERSION 1 - -/** @ingroup iface_wl_shm_pool */ -static inline void -wl_shm_pool_set_user_data(struct wl_shm_pool *wl_shm_pool, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_shm_pool, user_data); -} - -/** @ingroup iface_wl_shm_pool */ -static inline void * -wl_shm_pool_get_user_data(struct wl_shm_pool *wl_shm_pool) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_shm_pool); -} - -static inline uint32_t -wl_shm_pool_get_version(struct wl_shm_pool *wl_shm_pool) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_shm_pool); -} - -/** - * @ingroup iface_wl_shm_pool - * - * Create a wl_buffer object from the pool. - * - * The buffer is created offset bytes into the pool and has - * width and height as specified. The stride argument specifies - * the number of bytes from the beginning of one row to the beginning - * of the next. The format is the pixel format of the buffer and - * must be one of those advertised through the wl_shm.format event. - * - * A buffer will keep a reference to the pool it was created from - * so it is valid to destroy the pool immediately after creating - * a buffer from it. - */ -static inline struct wl_buffer * -wl_shm_pool_create_buffer(struct wl_shm_pool *wl_shm_pool, int32_t offset, int32_t width, int32_t height, int32_t stride, uint32_t format) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_shm_pool, - WL_SHM_POOL_CREATE_BUFFER, &wl_buffer_interface, NULL, offset, width, height, stride, format); - - return (struct wl_buffer *) id; -} - -/** - * @ingroup iface_wl_shm_pool - * - * Destroy the shared memory pool. - * - * The mmapped memory will be released when all - * buffers that have been created from this pool - * are gone. - */ -static inline void -wl_shm_pool_destroy(struct wl_shm_pool *wl_shm_pool) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shm_pool, - WL_SHM_POOL_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wl_shm_pool); -} - -/** - * @ingroup iface_wl_shm_pool - * - * This request will cause the server to remap the backing memory - * for the pool from the file descriptor passed when the pool was - * created, but using the new size. This request can only be - * used to make the pool bigger. - */ -static inline void -wl_shm_pool_resize(struct wl_shm_pool *wl_shm_pool, int32_t size) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shm_pool, - WL_SHM_POOL_RESIZE, size); -} - -#ifndef WL_SHM_ERROR_ENUM -#define WL_SHM_ERROR_ENUM -/** - * @ingroup iface_wl_shm - * wl_shm error values - * - * These errors can be emitted in response to wl_shm requests. - */ -enum wl_shm_error { - /** - * buffer format is not known - */ - WL_SHM_ERROR_INVALID_FORMAT = 0, - /** - * invalid size or stride during pool or buffer creation - */ - WL_SHM_ERROR_INVALID_STRIDE = 1, - /** - * mmapping the file descriptor failed - */ - WL_SHM_ERROR_INVALID_FD = 2, -}; -#endif /* WL_SHM_ERROR_ENUM */ - -#ifndef WL_SHM_FORMAT_ENUM -#define WL_SHM_FORMAT_ENUM -/** - * @ingroup iface_wl_shm - * pixel formats - * - * This describes the memory layout of an individual pixel. - * - * All renderers should support argb8888 and xrgb8888 but any other - * formats are optional and may not be supported by the particular - * renderer in use. - * - * The drm format codes match the macros defined in drm_fourcc.h. - * The formats actually supported by the compositor will be - * reported by the format event. - */ -enum wl_shm_format { - /** - * 32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian - */ - WL_SHM_FORMAT_ARGB8888 = 0, - /** - * 32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian - */ - WL_SHM_FORMAT_XRGB8888 = 1, - /** - * 8-bit color index format, [7:0] C - */ - WL_SHM_FORMAT_C8 = 0x20203843, - /** - * 8-bit RGB format, [7:0] R:G:B 3:3:2 - */ - WL_SHM_FORMAT_RGB332 = 0x38424752, - /** - * 8-bit BGR format, [7:0] B:G:R 2:3:3 - */ - WL_SHM_FORMAT_BGR233 = 0x38524742, - /** - * 16-bit xRGB format, [15:0] x:R:G:B 4:4:4:4 little endian - */ - WL_SHM_FORMAT_XRGB4444 = 0x32315258, - /** - * 16-bit xBGR format, [15:0] x:B:G:R 4:4:4:4 little endian - */ - WL_SHM_FORMAT_XBGR4444 = 0x32314258, - /** - * 16-bit RGBx format, [15:0] R:G:B:x 4:4:4:4 little endian - */ - WL_SHM_FORMAT_RGBX4444 = 0x32315852, - /** - * 16-bit BGRx format, [15:0] B:G:R:x 4:4:4:4 little endian - */ - WL_SHM_FORMAT_BGRX4444 = 0x32315842, - /** - * 16-bit ARGB format, [15:0] A:R:G:B 4:4:4:4 little endian - */ - WL_SHM_FORMAT_ARGB4444 = 0x32315241, - /** - * 16-bit ABGR format, [15:0] A:B:G:R 4:4:4:4 little endian - */ - WL_SHM_FORMAT_ABGR4444 = 0x32314241, - /** - * 16-bit RBGA format, [15:0] R:G:B:A 4:4:4:4 little endian - */ - WL_SHM_FORMAT_RGBA4444 = 0x32314152, - /** - * 16-bit BGRA format, [15:0] B:G:R:A 4:4:4:4 little endian - */ - WL_SHM_FORMAT_BGRA4444 = 0x32314142, - /** - * 16-bit xRGB format, [15:0] x:R:G:B 1:5:5:5 little endian - */ - WL_SHM_FORMAT_XRGB1555 = 0x35315258, - /** - * 16-bit xBGR 1555 format, [15:0] x:B:G:R 1:5:5:5 little endian - */ - WL_SHM_FORMAT_XBGR1555 = 0x35314258, - /** - * 16-bit RGBx 5551 format, [15:0] R:G:B:x 5:5:5:1 little endian - */ - WL_SHM_FORMAT_RGBX5551 = 0x35315852, - /** - * 16-bit BGRx 5551 format, [15:0] B:G:R:x 5:5:5:1 little endian - */ - WL_SHM_FORMAT_BGRX5551 = 0x35315842, - /** - * 16-bit ARGB 1555 format, [15:0] A:R:G:B 1:5:5:5 little endian - */ - WL_SHM_FORMAT_ARGB1555 = 0x35315241, - /** - * 16-bit ABGR 1555 format, [15:0] A:B:G:R 1:5:5:5 little endian - */ - WL_SHM_FORMAT_ABGR1555 = 0x35314241, - /** - * 16-bit RGBA 5551 format, [15:0] R:G:B:A 5:5:5:1 little endian - */ - WL_SHM_FORMAT_RGBA5551 = 0x35314152, - /** - * 16-bit BGRA 5551 format, [15:0] B:G:R:A 5:5:5:1 little endian - */ - WL_SHM_FORMAT_BGRA5551 = 0x35314142, - /** - * 16-bit RGB 565 format, [15:0] R:G:B 5:6:5 little endian - */ - WL_SHM_FORMAT_RGB565 = 0x36314752, - /** - * 16-bit BGR 565 format, [15:0] B:G:R 5:6:5 little endian - */ - WL_SHM_FORMAT_BGR565 = 0x36314742, - /** - * 24-bit RGB format, [23:0] R:G:B little endian - */ - WL_SHM_FORMAT_RGB888 = 0x34324752, - /** - * 24-bit BGR format, [23:0] B:G:R little endian - */ - WL_SHM_FORMAT_BGR888 = 0x34324742, - /** - * 32-bit xBGR format, [31:0] x:B:G:R 8:8:8:8 little endian - */ - WL_SHM_FORMAT_XBGR8888 = 0x34324258, - /** - * 32-bit RGBx format, [31:0] R:G:B:x 8:8:8:8 little endian - */ - WL_SHM_FORMAT_RGBX8888 = 0x34325852, - /** - * 32-bit BGRx format, [31:0] B:G:R:x 8:8:8:8 little endian - */ - WL_SHM_FORMAT_BGRX8888 = 0x34325842, - /** - * 32-bit ABGR format, [31:0] A:B:G:R 8:8:8:8 little endian - */ - WL_SHM_FORMAT_ABGR8888 = 0x34324241, - /** - * 32-bit RGBA format, [31:0] R:G:B:A 8:8:8:8 little endian - */ - WL_SHM_FORMAT_RGBA8888 = 0x34324152, - /** - * 32-bit BGRA format, [31:0] B:G:R:A 8:8:8:8 little endian - */ - WL_SHM_FORMAT_BGRA8888 = 0x34324142, - /** - * 32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian - */ - WL_SHM_FORMAT_XRGB2101010 = 0x30335258, - /** - * 32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian - */ - WL_SHM_FORMAT_XBGR2101010 = 0x30334258, - /** - * 32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian - */ - WL_SHM_FORMAT_RGBX1010102 = 0x30335852, - /** - * 32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian - */ - WL_SHM_FORMAT_BGRX1010102 = 0x30335842, - /** - * 32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian - */ - WL_SHM_FORMAT_ARGB2101010 = 0x30335241, - /** - * 32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian - */ - WL_SHM_FORMAT_ABGR2101010 = 0x30334241, - /** - * 32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian - */ - WL_SHM_FORMAT_RGBA1010102 = 0x30334152, - /** - * 32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian - */ - WL_SHM_FORMAT_BGRA1010102 = 0x30334142, - /** - * packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian - */ - WL_SHM_FORMAT_YUYV = 0x56595559, - /** - * packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian - */ - WL_SHM_FORMAT_YVYU = 0x55595659, - /** - * packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian - */ - WL_SHM_FORMAT_UYVY = 0x59565955, - /** - * packed YCbCr format, [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian - */ - WL_SHM_FORMAT_VYUY = 0x59555956, - /** - * packed AYCbCr format, [31:0] A:Y:Cb:Cr 8:8:8:8 little endian - */ - WL_SHM_FORMAT_AYUV = 0x56555941, - /** - * 2 plane YCbCr Cr:Cb format, 2x2 subsampled Cr:Cb plane - */ - WL_SHM_FORMAT_NV12 = 0x3231564e, - /** - * 2 plane YCbCr Cb:Cr format, 2x2 subsampled Cb:Cr plane - */ - WL_SHM_FORMAT_NV21 = 0x3132564e, - /** - * 2 plane YCbCr Cr:Cb format, 2x1 subsampled Cr:Cb plane - */ - WL_SHM_FORMAT_NV16 = 0x3631564e, - /** - * 2 plane YCbCr Cb:Cr format, 2x1 subsampled Cb:Cr plane - */ - WL_SHM_FORMAT_NV61 = 0x3136564e, - /** - * 3 plane YCbCr format, 4x4 subsampled Cb (1) and Cr (2) planes - */ - WL_SHM_FORMAT_YUV410 = 0x39565559, - /** - * 3 plane YCbCr format, 4x4 subsampled Cr (1) and Cb (2) planes - */ - WL_SHM_FORMAT_YVU410 = 0x39555659, - /** - * 3 plane YCbCr format, 4x1 subsampled Cb (1) and Cr (2) planes - */ - WL_SHM_FORMAT_YUV411 = 0x31315559, - /** - * 3 plane YCbCr format, 4x1 subsampled Cr (1) and Cb (2) planes - */ - WL_SHM_FORMAT_YVU411 = 0x31315659, - /** - * 3 plane YCbCr format, 2x2 subsampled Cb (1) and Cr (2) planes - */ - WL_SHM_FORMAT_YUV420 = 0x32315559, - /** - * 3 plane YCbCr format, 2x2 subsampled Cr (1) and Cb (2) planes - */ - WL_SHM_FORMAT_YVU420 = 0x32315659, - /** - * 3 plane YCbCr format, 2x1 subsampled Cb (1) and Cr (2) planes - */ - WL_SHM_FORMAT_YUV422 = 0x36315559, - /** - * 3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes - */ - WL_SHM_FORMAT_YVU422 = 0x36315659, - /** - * 3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes - */ - WL_SHM_FORMAT_YUV444 = 0x34325559, - /** - * 3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes - */ - WL_SHM_FORMAT_YVU444 = 0x34325659, -}; -#endif /* WL_SHM_FORMAT_ENUM */ - -/** - * @ingroup iface_wl_shm - * @struct wl_shm_listener - */ -struct wl_shm_listener { - /** - * pixel format description - * - * Informs the client about a valid pixel format that can be used - * for buffers. Known formats include argb8888 and xrgb8888. - * @param format buffer pixel format - */ - void (*format)(void *data, - struct wl_shm *wl_shm, - uint32_t format); -}; - -/** - * @ingroup iface_wl_shm - */ -static inline int -wl_shm_add_listener(struct wl_shm *wl_shm, - const struct wl_shm_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_shm, - (void (**)(void)) listener, data); -} - -#define WL_SHM_CREATE_POOL 0 - -/** - * @ingroup iface_wl_shm - */ -#define WL_SHM_FORMAT_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_shm - */ -#define WL_SHM_CREATE_POOL_SINCE_VERSION 1 - -/** @ingroup iface_wl_shm */ -static inline void -wl_shm_set_user_data(struct wl_shm *wl_shm, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_shm, user_data); -} - -/** @ingroup iface_wl_shm */ -static inline void * -wl_shm_get_user_data(struct wl_shm *wl_shm) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_shm); -} - -static inline uint32_t -wl_shm_get_version(struct wl_shm *wl_shm) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_shm); -} - -/** @ingroup iface_wl_shm */ -static inline void -wl_shm_destroy(struct wl_shm *wl_shm) -{ - wl_proxy_destroy((struct wl_proxy *) wl_shm); -} - -/** - * @ingroup iface_wl_shm - * - * Create a new wl_shm_pool object. - * - * The pool can be used to create shared memory based buffer - * objects. The server will mmap size bytes of the passed file - * descriptor, to use as backing memory for the pool. - */ -static inline struct wl_shm_pool * -wl_shm_create_pool(struct wl_shm *wl_shm, int32_t fd, int32_t size) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_shm, - WL_SHM_CREATE_POOL, &wl_shm_pool_interface, NULL, fd, size); - - return (struct wl_shm_pool *) id; -} - -/** - * @ingroup iface_wl_buffer - * @struct wl_buffer_listener - */ -struct wl_buffer_listener { - /** - * compositor releases buffer - * - * Sent when this wl_buffer is no longer used by the compositor. - * The client is now free to reuse or destroy this buffer and its - * backing storage. - * - * If a client receives a release event before the frame callback - * requested in the same wl_surface.commit that attaches this - * wl_buffer to a surface, then the client is immediately free to - * reuse the buffer and its backing storage, and does not need a - * second buffer for the next surface content update. Typically - * this is possible, when the compositor maintains a copy of the - * wl_surface contents, e.g. as a GL texture. This is an important - * optimization for GL(ES) compositors with wl_shm clients. - */ - void (*release)(void *data, - struct wl_buffer *wl_buffer); -}; - -/** - * @ingroup iface_wl_buffer - */ -static inline int -wl_buffer_add_listener(struct wl_buffer *wl_buffer, - const struct wl_buffer_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_buffer, - (void (**)(void)) listener, data); -} - -#define WL_BUFFER_DESTROY 0 - -/** - * @ingroup iface_wl_buffer - */ -#define WL_BUFFER_RELEASE_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_buffer - */ -#define WL_BUFFER_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_wl_buffer */ -static inline void -wl_buffer_set_user_data(struct wl_buffer *wl_buffer, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_buffer, user_data); -} - -/** @ingroup iface_wl_buffer */ -static inline void * -wl_buffer_get_user_data(struct wl_buffer *wl_buffer) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_buffer); -} - -static inline uint32_t -wl_buffer_get_version(struct wl_buffer *wl_buffer) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_buffer); -} - -/** - * @ingroup iface_wl_buffer - * - * Destroy a buffer. If and how you need to release the backing - * storage is defined by the buffer factory interface. - * - * For possible side-effects to a surface, see wl_surface.attach. - */ -static inline void -wl_buffer_destroy(struct wl_buffer *wl_buffer) -{ - wl_proxy_marshal((struct wl_proxy *) wl_buffer, - WL_BUFFER_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wl_buffer); -} - -#ifndef WL_DATA_OFFER_ERROR_ENUM -#define WL_DATA_OFFER_ERROR_ENUM -enum wl_data_offer_error { - /** - * finish request was called untimely - */ - WL_DATA_OFFER_ERROR_INVALID_FINISH = 0, - /** - * action mask contains invalid values - */ - WL_DATA_OFFER_ERROR_INVALID_ACTION_MASK = 1, - /** - * action argument has an invalid value - */ - WL_DATA_OFFER_ERROR_INVALID_ACTION = 2, - /** - * offer doesn't accept this request - */ - WL_DATA_OFFER_ERROR_INVALID_OFFER = 3, -}; -#endif /* WL_DATA_OFFER_ERROR_ENUM */ - -/** - * @ingroup iface_wl_data_offer - * @struct wl_data_offer_listener - */ -struct wl_data_offer_listener { - /** - * advertise offered mime type - * - * Sent immediately after creating the wl_data_offer object. One - * event per offered mime type. - * @param mime_type offered mime type - */ - void (*offer)(void *data, - struct wl_data_offer *wl_data_offer, - const char *mime_type); - /** - * notify the source-side available actions - * - * This event indicates the actions offered by the data source. - * It will be sent right after wl_data_device.enter, or anytime the - * source side changes its offered actions through - * wl_data_source.set_actions. - * @param source_actions actions offered by the data source - * @since 3 - */ - void (*source_actions)(void *data, - struct wl_data_offer *wl_data_offer, - uint32_t source_actions); - /** - * notify the selected action - * - * This event indicates the action selected by the compositor - * after matching the source/destination side actions. Only one - * action (or none) will be offered here. - * - * This event can be emitted multiple times during the - * drag-and-drop operation in response to destination side action - * changes through wl_data_offer.set_actions. - * - * This event will no longer be emitted after wl_data_device.drop - * happened on the drag-and-drop destination, the client must honor - * the last action received, or the last preferred one set through - * wl_data_offer.set_actions when handling an "ask" action. - * - * Compositors may also change the selected action on the fly, - * mainly in response to keyboard modifier changes during the - * drag-and-drop operation. - * - * The most recent action received is always the valid one. Prior - * to receiving wl_data_device.drop, the chosen action may change - * (e.g. due to keyboard modifiers being pressed). At the time of - * receiving wl_data_device.drop the drag-and-drop destination must - * honor the last action received. - * - * Action changes may still happen after wl_data_device.drop, - * especially on "ask" actions, where the drag-and-drop destination - * may choose another action afterwards. Action changes happening - * at this stage are always the result of inter-client negotiation, - * the compositor shall no longer be able to induce a different - * action. - * - * Upon "ask" actions, it is expected that the drag-and-drop - * destination may potentially choose a different action and/or - * mime type, based on wl_data_offer.source_actions and finally - * chosen by the user (e.g. popping up a menu with the available - * options). The final wl_data_offer.set_actions and - * wl_data_offer.accept requests must happen before the call to - * wl_data_offer.finish. - * @param dnd_action action selected by the compositor - * @since 3 - */ - void (*action)(void *data, - struct wl_data_offer *wl_data_offer, - uint32_t dnd_action); -}; - -/** - * @ingroup iface_wl_data_offer - */ -static inline int -wl_data_offer_add_listener(struct wl_data_offer *wl_data_offer, - const struct wl_data_offer_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_data_offer, - (void (**)(void)) listener, data); -} - -#define WL_DATA_OFFER_ACCEPT 0 -#define WL_DATA_OFFER_RECEIVE 1 -#define WL_DATA_OFFER_DESTROY 2 -#define WL_DATA_OFFER_FINISH 3 -#define WL_DATA_OFFER_SET_ACTIONS 4 - -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_OFFER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_SOURCE_ACTIONS_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_ACTION_SINCE_VERSION 3 - -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_ACCEPT_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_RECEIVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_FINISH_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_SET_ACTIONS_SINCE_VERSION 3 - -/** @ingroup iface_wl_data_offer */ -static inline void -wl_data_offer_set_user_data(struct wl_data_offer *wl_data_offer, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_data_offer, user_data); -} - -/** @ingroup iface_wl_data_offer */ -static inline void * -wl_data_offer_get_user_data(struct wl_data_offer *wl_data_offer) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_data_offer); -} - -static inline uint32_t -wl_data_offer_get_version(struct wl_data_offer *wl_data_offer) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_data_offer); -} - -/** - * @ingroup iface_wl_data_offer - * - * Indicate that the client can accept the given mime type, or - * NULL for not accepted. - * - * For objects of version 2 or older, this request is used by the - * client to give feedback whether the client can receive the given - * mime type, or NULL if none is accepted; the feedback does not - * determine whether the drag-and-drop operation succeeds or not. - * - * For objects of version 3 or newer, this request determines the - * final result of the drag-and-drop operation. If the end result - * is that no mime types were accepted, the drag-and-drop operation - * will be cancelled and the corresponding drag source will receive - * wl_data_source.cancelled. Clients may still use this event in - * conjunction with wl_data_source.action for feedback. - */ -static inline void -wl_data_offer_accept(struct wl_data_offer *wl_data_offer, uint32_t serial, const char *mime_type) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_offer, - WL_DATA_OFFER_ACCEPT, serial, mime_type); -} - -/** - * @ingroup iface_wl_data_offer - * - * 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, - * both before and after wl_data_device.drop. Drag-and-drop destination - * clients may preemptively fetch data or examine it more closely to - * determine acceptance. - */ -static inline void -wl_data_offer_receive(struct wl_data_offer *wl_data_offer, const char *mime_type, int32_t fd) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_offer, - WL_DATA_OFFER_RECEIVE, mime_type, fd); -} - -/** - * @ingroup iface_wl_data_offer - * - * Destroy the data offer. - */ -static inline void -wl_data_offer_destroy(struct wl_data_offer *wl_data_offer) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_offer, - WL_DATA_OFFER_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wl_data_offer); -} - -/** - * @ingroup iface_wl_data_offer - * - * Notifies the compositor that the drag destination successfully - * finished the drag-and-drop operation. - * - * Upon receiving this request, the compositor will emit - * wl_data_source.dnd_finished on the drag source client. - * - * It is a client error to perform other requests than - * wl_data_offer.destroy after this one. It is also an error to perform - * this request after a NULL mime type has been set in - * wl_data_offer.accept or no action was received through - * wl_data_offer.action. - */ -static inline void -wl_data_offer_finish(struct wl_data_offer *wl_data_offer) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_offer, - WL_DATA_OFFER_FINISH); -} - -/** - * @ingroup iface_wl_data_offer - * - * Sets the actions that the destination side client supports for - * this operation. This request may trigger the emission of - * wl_data_source.action and wl_data_offer.action events if the compositor - * needs to change the selected action. - * - * This request can be called multiple times throughout the - * drag-and-drop operation, typically in response to wl_data_device.enter - * or wl_data_device.motion events. - * - * This request determines the final result of the drag-and-drop - * operation. If the end result is that no action is accepted, - * the drag source will receive wl_drag_source.cancelled. - * - * The dnd_actions argument must contain only values expressed in the - * wl_data_device_manager.dnd_actions enum, and the preferred_action - * argument must only contain one of those values set, otherwise it - * will result in a protocol error. - * - * While managing an "ask" action, the destination drag-and-drop client - * may perform further wl_data_offer.receive requests, and is expected - * to perform one last wl_data_offer.set_actions request with a preferred - * action other than "ask" (and optionally wl_data_offer.accept) before - * requesting wl_data_offer.finish, in order to convey the action selected - * by the user. If the preferred action is not in the - * wl_data_offer.source_actions mask, an error will be raised. - * - * If the "ask" action is dismissed (e.g. user cancellation), the client - * is expected to perform wl_data_offer.destroy right away. - * - * This request can only be made on drag-and-drop offers, a protocol error - * will be raised otherwise. - */ -static inline void -wl_data_offer_set_actions(struct wl_data_offer *wl_data_offer, uint32_t dnd_actions, uint32_t preferred_action) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_offer, - WL_DATA_OFFER_SET_ACTIONS, dnd_actions, preferred_action); -} - -#ifndef WL_DATA_SOURCE_ERROR_ENUM -#define WL_DATA_SOURCE_ERROR_ENUM -enum wl_data_source_error { - /** - * action mask contains invalid values - */ - WL_DATA_SOURCE_ERROR_INVALID_ACTION_MASK = 0, - /** - * source doesn't accept this request - */ - WL_DATA_SOURCE_ERROR_INVALID_SOURCE = 1, -}; -#endif /* WL_DATA_SOURCE_ERROR_ENUM */ - -/** - * @ingroup iface_wl_data_source - * @struct wl_data_source_listener - */ -struct wl_data_source_listener { - /** - * a target accepts an offered mime type - * - * Sent when a target accepts pointer_focus or motion events. If - * a target does not accept any of the offered types, type is NULL. - * - * Used for feedback during drag-and-drop. - * @param mime_type mime type accepted by the target - */ - void (*target)(void *data, - struct wl_data_source *wl_data_source, - const char *mime_type); - /** - * send the data - * - * Request for data from the client. Send the data as the - * specified mime type over the passed file descriptor, then close - * it. - * @param mime_type mime type for the data - * @param fd file descriptor for the data - */ - void (*send)(void *data, - struct wl_data_source *wl_data_source, - const char *mime_type, - int32_t fd); - /** - * selection was cancelled - * - * This data source is no longer valid. There are several reasons - * why this could happen: - * - * - The data source has been replaced by another data source. - - * The drag-and-drop operation was performed, but the drop - * destination did not accept any of the mime types offered through - * wl_data_source.target. - The drag-and-drop operation was - * performed, but the drop destination did not select any of the - * actions present in the mask offered through - * wl_data_source.action. - The drag-and-drop operation was - * performed but didn't happen over a surface. - The compositor - * cancelled the drag-and-drop operation (e.g. compositor dependent - * timeouts to avoid stale drag-and-drop transfers). - * - * The client should clean up and destroy this data source. - * - * For objects of version 2 or older, wl_data_source.cancelled will - * only be emitted if the data source was replaced by another data - * source. - */ - void (*cancelled)(void *data, - struct wl_data_source *wl_data_source); - /** - * the drag-and-drop operation physically finished - * - * The user performed the drop action. This event does not - * indicate acceptance, wl_data_source.cancelled may still be - * emitted afterwards if the drop destination does not accept any - * mime type. - * - * However, this event might however not be received if the - * compositor cancelled the drag-and-drop operation before this - * event could happen. - * - * Note that the data_source may still be used in the future and - * should not be destroyed here. - * @since 3 - */ - void (*dnd_drop_performed)(void *data, - struct wl_data_source *wl_data_source); - /** - * the drag-and-drop operation concluded - * - * The drop destination finished interoperating with this data - * source, so the client is now free to destroy this data source - * and free all associated data. - * - * If the action used to perform the operation was "move", the - * source can now delete the transferred data. - * @since 3 - */ - void (*dnd_finished)(void *data, - struct wl_data_source *wl_data_source); - /** - * notify the selected action - * - * This event indicates the action selected by the compositor - * after matching the source/destination side actions. Only one - * action (or none) will be offered here. - * - * This event can be emitted multiple times during the - * drag-and-drop operation, mainly in response to destination side - * changes through wl_data_offer.set_actions, and as the data - * device enters/leaves surfaces. - * - * It is only possible to receive this event after - * wl_data_source.dnd_drop_performed if the drag-and-drop operation - * ended in an "ask" action, in which case the final - * wl_data_source.action event will happen immediately before - * wl_data_source.dnd_finished. - * - * Compositors may also change the selected action on the fly, - * mainly in response to keyboard modifier changes during the - * drag-and-drop operation. - * - * The most recent action received is always the valid one. The - * chosen action may change alongside negotiation (e.g. an "ask" - * action can turn into a "move" operation), so the effects of the - * final action must always be applied in - * wl_data_offer.dnd_finished. - * - * Clients can trigger cursor surface changes from this point, so - * they reflect the current action. - * @param dnd_action action selected by the compositor - * @since 3 - */ - void (*action)(void *data, - struct wl_data_source *wl_data_source, - uint32_t dnd_action); -}; - -/** - * @ingroup iface_wl_data_source - */ -static inline int -wl_data_source_add_listener(struct wl_data_source *wl_data_source, - const struct wl_data_source_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_data_source, - (void (**)(void)) listener, data); -} - -#define WL_DATA_SOURCE_OFFER 0 -#define WL_DATA_SOURCE_DESTROY 1 -#define WL_DATA_SOURCE_SET_ACTIONS 2 - -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_TARGET_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_SEND_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_CANCELLED_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_DND_DROP_PERFORMED_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_DND_FINISHED_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_ACTION_SINCE_VERSION 3 - -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_OFFER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_SET_ACTIONS_SINCE_VERSION 3 - -/** @ingroup iface_wl_data_source */ -static inline void -wl_data_source_set_user_data(struct wl_data_source *wl_data_source, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_data_source, user_data); -} - -/** @ingroup iface_wl_data_source */ -static inline void * -wl_data_source_get_user_data(struct wl_data_source *wl_data_source) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_data_source); -} - -static inline uint32_t -wl_data_source_get_version(struct wl_data_source *wl_data_source) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_data_source); -} - -/** - * @ingroup iface_wl_data_source - * - * This request adds a mime type to the set of mime types - * advertised to targets. Can be called several times to offer - * multiple types. - */ -static inline void -wl_data_source_offer(struct wl_data_source *wl_data_source, const char *mime_type) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_source, - WL_DATA_SOURCE_OFFER, mime_type); -} - -/** - * @ingroup iface_wl_data_source - * - * Destroy the data source. - */ -static inline void -wl_data_source_destroy(struct wl_data_source *wl_data_source) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_source, - WL_DATA_SOURCE_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wl_data_source); -} - -/** - * @ingroup iface_wl_data_source - * - * Sets the actions that the source side client supports for this - * operation. This request may trigger wl_data_source.action and - * wl_data_offer.action events if the compositor needs to change the - * selected action. - * - * The dnd_actions argument must contain only values expressed in the - * wl_data_device_manager.dnd_actions enum, otherwise it will result - * in a protocol error. - * - * This request must be made once only, and 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 will raise a protocol error. - */ -static inline void -wl_data_source_set_actions(struct wl_data_source *wl_data_source, uint32_t dnd_actions) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_source, - WL_DATA_SOURCE_SET_ACTIONS, dnd_actions); -} - -#ifndef WL_DATA_DEVICE_ERROR_ENUM -#define WL_DATA_DEVICE_ERROR_ENUM -enum wl_data_device_error { - /** - * given wl_surface has another role - */ - WL_DATA_DEVICE_ERROR_ROLE = 0, -}; -#endif /* WL_DATA_DEVICE_ERROR_ENUM */ - -/** - * @ingroup iface_wl_data_device - * @struct wl_data_device_listener - */ -struct wl_data_device_listener { - /** - * introduce a new wl_data_offer - * - * The data_offer event introduces a new wl_data_offer object, - * which will subsequently be used in either the data_device.enter - * event (for drag-and-drop) or the data_device.selection event - * (for selections). Immediately following the - * data_device_data_offer event, the new data_offer object will - * send out data_offer.offer events to describe the mime types it - * offers. - * @param id the new data_offer object - */ - void (*data_offer)(void *data, - struct wl_data_device *wl_data_device, - struct wl_data_offer *id); - /** - * initiate drag-and-drop session - * - * This event is sent when an active drag-and-drop pointer enters - * a surface owned by the client. The position of the pointer at - * enter time is provided by the x and y arguments, in - * surface-local coordinates. - * @param serial serial number of the enter event - * @param surface client surface entered - * @param x surface-local x coordinate - * @param y surface-local y coordinate - * @param id source data_offer object - */ - void (*enter)(void *data, - struct wl_data_device *wl_data_device, - uint32_t serial, - struct wl_surface *surface, - wl_fixed_t x, - wl_fixed_t y, - struct wl_data_offer *id); - /** - * end drag-and-drop session - * - * This event is sent when the drag-and-drop pointer leaves the - * surface and the session ends. The client must destroy the - * wl_data_offer introduced at enter time at this point. - */ - void (*leave)(void *data, - struct wl_data_device *wl_data_device); - /** - * drag-and-drop session motion - * - * This event is sent when the drag-and-drop pointer moves within - * the currently focused surface. The new position of the pointer - * is provided by the x and y arguments, in surface-local - * coordinates. - * @param time timestamp with millisecond granularity - * @param x surface-local x coordinate - * @param y surface-local y coordinate - */ - void (*motion)(void *data, - struct wl_data_device *wl_data_device, - uint32_t time, - wl_fixed_t x, - wl_fixed_t y); - /** - * end drag-and-drop session successfully - * - * The event is sent when a drag-and-drop operation is ended - * because the implicit grab is removed. - * - * The drag-and-drop destination is expected to honor the last - * action received through wl_data_offer.action, if the resulting - * action is "copy" or "move", the destination can still perform - * wl_data_offer.receive requests, and is expected to end all - * transfers with a wl_data_offer.finish request. - * - * If the resulting action is "ask", the action will not be - * considered final. The drag-and-drop destination is expected to - * perform one last wl_data_offer.set_actions request, or - * wl_data_offer.destroy in order to cancel the operation. - */ - void (*drop)(void *data, - struct wl_data_device *wl_data_device); - /** - * advertise new selection - * - * The selection event is sent out to notify the client of a new - * wl_data_offer for the selection for this device. The - * data_device.data_offer and the data_offer.offer events are sent - * out immediately before this event to introduce the data offer - * object. The selection event is sent to a client immediately - * before receiving keyboard focus and when a new selection is set - * while the client has keyboard focus. The data_offer is valid - * until a new data_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. - * @param id selection data_offer object - */ - void (*selection)(void *data, - struct wl_data_device *wl_data_device, - struct wl_data_offer *id); -}; - -/** - * @ingroup iface_wl_data_device - */ -static inline int -wl_data_device_add_listener(struct wl_data_device *wl_data_device, - const struct wl_data_device_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_data_device, - (void (**)(void)) listener, data); -} - -#define WL_DATA_DEVICE_START_DRAG 0 -#define WL_DATA_DEVICE_SET_SELECTION 1 -#define WL_DATA_DEVICE_RELEASE 2 - -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_DATA_OFFER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_LEAVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_MOTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_DROP_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_SELECTION_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_START_DRAG_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_SET_SELECTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_RELEASE_SINCE_VERSION 2 - -/** @ingroup iface_wl_data_device */ -static inline void -wl_data_device_set_user_data(struct wl_data_device *wl_data_device, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_data_device, user_data); -} - -/** @ingroup iface_wl_data_device */ -static inline void * -wl_data_device_get_user_data(struct wl_data_device *wl_data_device) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_data_device); -} - -static inline uint32_t -wl_data_device_get_version(struct wl_data_device *wl_data_device) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_data_device); -} - -/** @ingroup iface_wl_data_device */ -static inline void -wl_data_device_destroy(struct wl_data_device *wl_data_device) -{ - wl_proxy_destroy((struct wl_proxy *) wl_data_device); -} - -/** - * @ingroup iface_wl_data_device - * - * This request asks the compositor to start a drag-and-drop - * operation on behalf of the client. - * - * The source argument is the data source that provides the data - * for the eventual data transfer. If source is NULL, enter, leave - * and motion events are sent only to the client that initiated the - * drag and the client is expected to handle the data passing - * internally. - * - * The origin surface is the surface where the drag originates and - * the client must have an active implicit grab that matches the - * serial. - * - * The icon surface is an optional (can be NULL) surface that - * provides an icon to be moved around with the cursor. Initially, - * the top-left corner of the icon surface is placed at the cursor - * hotspot, but subsequent wl_surface.attach request can move the - * relative position. Attach requests must be confirmed with - * wl_surface.commit as usual. The icon surface is given the role of - * a drag-and-drop icon. If the icon surface already has another role, - * it raises a protocol error. - * - * The current and pending input regions of the icon wl_surface are - * cleared, and wl_surface.set_input_region is ignored until the - * wl_surface is no longer used as the icon surface. When the use - * as an icon ends, the current and pending input regions become - * undefined, and the wl_surface is unmapped. - */ -static inline void -wl_data_device_start_drag(struct wl_data_device *wl_data_device, struct wl_data_source *source, struct wl_surface *origin, struct wl_surface *icon, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_device, - WL_DATA_DEVICE_START_DRAG, source, origin, icon, serial); -} - -/** - * @ingroup iface_wl_data_device - * - * This request asks the compositor to set the selection - * to the data from the source on behalf of the client. - * - * To unset the selection, set the source to NULL. - */ -static inline void -wl_data_device_set_selection(struct wl_data_device *wl_data_device, struct wl_data_source *source, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_device, - WL_DATA_DEVICE_SET_SELECTION, source, serial); -} - -/** - * @ingroup iface_wl_data_device - * - * This request destroys the data device. - */ -static inline void -wl_data_device_release(struct wl_data_device *wl_data_device) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_device, - WL_DATA_DEVICE_RELEASE); - - wl_proxy_destroy((struct wl_proxy *) wl_data_device); -} - -#ifndef WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM -#define WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM -/** - * @ingroup iface_wl_data_device_manager - * drag and drop actions - * - * This is a bitmask of the available/preferred actions in a - * drag-and-drop operation. - * - * In the compositor, the selected action is a result of matching the - * actions offered by the source and destination sides. "action" events - * with a "none" action will be sent to both source and destination if - * there is no match. All further checks will effectively happen on - * (source actions ∩ destination actions). - * - * In addition, compositors may also pick different actions in - * reaction to key modifiers being pressed. One common design that - * is used in major toolkits (and the behavior recommended for - * compositors) is: - * - * - If no modifiers are pressed, the first match (in bit order) - * will be used. - * - Pressing Shift selects "move", if enabled in the mask. - * - Pressing Control selects "copy", if enabled in the mask. - * - * Behavior beyond that is considered implementation-dependent. - * Compositors may for example bind other modifiers (like Alt/Meta) - * or drags initiated with other buttons than BTN_LEFT to specific - * actions (e.g. "ask"). - */ -enum wl_data_device_manager_dnd_action { - /** - * no action - */ - WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE = 0, - /** - * copy action - */ - WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY = 1, - /** - * move action - */ - WL_DATA_DEVICE_MANAGER_DND_ACTION_MOVE = 2, - /** - * ask action - */ - WL_DATA_DEVICE_MANAGER_DND_ACTION_ASK = 4, -}; -#endif /* WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM */ - -#define WL_DATA_DEVICE_MANAGER_CREATE_DATA_SOURCE 0 -#define WL_DATA_DEVICE_MANAGER_GET_DATA_DEVICE 1 - - -/** - * @ingroup iface_wl_data_device_manager - */ -#define WL_DATA_DEVICE_MANAGER_CREATE_DATA_SOURCE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device_manager - */ -#define WL_DATA_DEVICE_MANAGER_GET_DATA_DEVICE_SINCE_VERSION 1 - -/** @ingroup iface_wl_data_device_manager */ -static inline void -wl_data_device_manager_set_user_data(struct wl_data_device_manager *wl_data_device_manager, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_data_device_manager, user_data); -} - -/** @ingroup iface_wl_data_device_manager */ -static inline void * -wl_data_device_manager_get_user_data(struct wl_data_device_manager *wl_data_device_manager) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_data_device_manager); -} - -static inline uint32_t -wl_data_device_manager_get_version(struct wl_data_device_manager *wl_data_device_manager) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_data_device_manager); -} - -/** @ingroup iface_wl_data_device_manager */ -static inline void -wl_data_device_manager_destroy(struct wl_data_device_manager *wl_data_device_manager) -{ - wl_proxy_destroy((struct wl_proxy *) wl_data_device_manager); -} - -/** - * @ingroup iface_wl_data_device_manager - * - * Create a new data source. - */ -static inline struct wl_data_source * -wl_data_device_manager_create_data_source(struct wl_data_device_manager *wl_data_device_manager) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_data_device_manager, - WL_DATA_DEVICE_MANAGER_CREATE_DATA_SOURCE, &wl_data_source_interface, NULL); - - return (struct wl_data_source *) id; -} - -/** - * @ingroup iface_wl_data_device_manager - * - * Create a new data device for a given seat. - */ -static inline struct wl_data_device * -wl_data_device_manager_get_data_device(struct wl_data_device_manager *wl_data_device_manager, struct wl_seat *seat) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_data_device_manager, - WL_DATA_DEVICE_MANAGER_GET_DATA_DEVICE, &wl_data_device_interface, NULL, seat); - - return (struct wl_data_device *) id; -} - -#ifndef WL_SHELL_ERROR_ENUM -#define WL_SHELL_ERROR_ENUM -enum wl_shell_error { - /** - * given wl_surface has another role - */ - WL_SHELL_ERROR_ROLE = 0, -}; -#endif /* WL_SHELL_ERROR_ENUM */ - -#define WL_SHELL_GET_SHELL_SURFACE 0 - - -/** - * @ingroup iface_wl_shell - */ -#define WL_SHELL_GET_SHELL_SURFACE_SINCE_VERSION 1 - -/** @ingroup iface_wl_shell */ -static inline void -wl_shell_set_user_data(struct wl_shell *wl_shell, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_shell, user_data); -} - -/** @ingroup iface_wl_shell */ -static inline void * -wl_shell_get_user_data(struct wl_shell *wl_shell) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_shell); -} - -static inline uint32_t -wl_shell_get_version(struct wl_shell *wl_shell) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_shell); -} - -/** @ingroup iface_wl_shell */ -static inline void -wl_shell_destroy(struct wl_shell *wl_shell) -{ - wl_proxy_destroy((struct wl_proxy *) wl_shell); -} - -/** - * @ingroup iface_wl_shell - * - * Create a shell surface for an existing surface. This gives - * the wl_surface the role of a shell surface. If the wl_surface - * already has another role, it raises a protocol error. - * - * Only one shell surface can be associated with a given surface. - */ -static inline struct wl_shell_surface * -wl_shell_get_shell_surface(struct wl_shell *wl_shell, struct wl_surface *surface) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_shell, - WL_SHELL_GET_SHELL_SURFACE, &wl_shell_surface_interface, NULL, surface); - - return (struct wl_shell_surface *) id; -} - -#ifndef WL_SHELL_SURFACE_RESIZE_ENUM -#define WL_SHELL_SURFACE_RESIZE_ENUM -/** - * @ingroup iface_wl_shell_surface - * edge values for resizing - * - * These values are used to indicate which edge of a surface - * is being dragged in a resize operation. The server may - * use this information to adapt its behavior, e.g. choose - * an appropriate cursor image. - */ -enum wl_shell_surface_resize { - /** - * no edge - */ - WL_SHELL_SURFACE_RESIZE_NONE = 0, - /** - * top edge - */ - WL_SHELL_SURFACE_RESIZE_TOP = 1, - /** - * bottom edge - */ - WL_SHELL_SURFACE_RESIZE_BOTTOM = 2, - /** - * left edge - */ - WL_SHELL_SURFACE_RESIZE_LEFT = 4, - /** - * top and left edges - */ - WL_SHELL_SURFACE_RESIZE_TOP_LEFT = 5, - /** - * bottom and left edges - */ - WL_SHELL_SURFACE_RESIZE_BOTTOM_LEFT = 6, - /** - * right edge - */ - WL_SHELL_SURFACE_RESIZE_RIGHT = 8, - /** - * top and right edges - */ - WL_SHELL_SURFACE_RESIZE_TOP_RIGHT = 9, - /** - * bottom and right edges - */ - WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT = 10, -}; -#endif /* WL_SHELL_SURFACE_RESIZE_ENUM */ - -#ifndef WL_SHELL_SURFACE_TRANSIENT_ENUM -#define WL_SHELL_SURFACE_TRANSIENT_ENUM -/** - * @ingroup iface_wl_shell_surface - * details of transient behaviour - * - * These flags specify details of the expected behaviour - * of transient surfaces. Used in the set_transient request. - */ -enum wl_shell_surface_transient { - /** - * do not set keyboard focus - */ - WL_SHELL_SURFACE_TRANSIENT_INACTIVE = 0x1, -}; -#endif /* WL_SHELL_SURFACE_TRANSIENT_ENUM */ - -#ifndef WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM -#define WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM -/** - * @ingroup iface_wl_shell_surface - * different method to set the surface fullscreen - * - * 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. - */ -enum wl_shell_surface_fullscreen_method { - /** - * no preference, apply default policy - */ - WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT = 0, - /** - * scale, preserve the surface's aspect ratio and center on output - */ - WL_SHELL_SURFACE_FULLSCREEN_METHOD_SCALE = 1, - /** - * switch output mode to the smallest mode that can fit the surface, add black borders to compensate size mismatch - */ - WL_SHELL_SURFACE_FULLSCREEN_METHOD_DRIVER = 2, - /** - * no upscaling, center on output and add black borders to compensate size mismatch - */ - WL_SHELL_SURFACE_FULLSCREEN_METHOD_FILL = 3, -}; -#endif /* WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM */ - -/** - * @ingroup iface_wl_shell_surface - * @struct wl_shell_surface_listener - */ -struct wl_shell_surface_listener { - /** - * ping client - * - * Ping a client to check if it is receiving events and sending - * requests. A client is expected to reply with a pong request. - * @param serial serial number of the ping - */ - void (*ping)(void *data, - struct wl_shell_surface *wl_shell_surface, - uint32_t serial); - /** - * suggest resize - * - * The configure event asks the client to resize its surface. - * - * The size is a hint, in the sense that the client is free to - * ignore it if it doesn't resize, pick a smaller size (to satisfy - * aspect ratio or resize in steps of NxM pixels). - * - * The edges parameter provides a hint about how the surface was - * resized. The client may use this information to decide how to - * adjust its content to the new size (e.g. a scrolling area might - * adjust its content position to leave the viewable content - * unmoved). - * - * The client is free to dismiss all but the last configure event - * it received. - * - * The width and height arguments specify the size of the window in - * surface-local coordinates. - * @param edges how the surface was resized - * @param width new width of the surface - * @param height new height of the surface - */ - void (*configure)(void *data, - struct wl_shell_surface *wl_shell_surface, - uint32_t edges, - int32_t width, - int32_t height); - /** - * popup interaction is done - * - * The popup_done event is sent out when a popup grab is broken, - * that is, when the user clicks a surface that doesn't belong to - * the client owning the popup surface. - */ - void (*popup_done)(void *data, - struct wl_shell_surface *wl_shell_surface); -}; - -/** - * @ingroup iface_wl_shell_surface - */ -static inline int -wl_shell_surface_add_listener(struct wl_shell_surface *wl_shell_surface, - const struct wl_shell_surface_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_shell_surface, - (void (**)(void)) listener, data); -} - -#define WL_SHELL_SURFACE_PONG 0 -#define WL_SHELL_SURFACE_MOVE 1 -#define WL_SHELL_SURFACE_RESIZE 2 -#define WL_SHELL_SURFACE_SET_TOPLEVEL 3 -#define WL_SHELL_SURFACE_SET_TRANSIENT 4 -#define WL_SHELL_SURFACE_SET_FULLSCREEN 5 -#define WL_SHELL_SURFACE_SET_POPUP 6 -#define WL_SHELL_SURFACE_SET_MAXIMIZED 7 -#define WL_SHELL_SURFACE_SET_TITLE 8 -#define WL_SHELL_SURFACE_SET_CLASS 9 - -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_PING_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_POPUP_DONE_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_PONG_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_MOVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_RESIZE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_TOPLEVEL_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_TRANSIENT_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_POPUP_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_TITLE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_CLASS_SINCE_VERSION 1 - -/** @ingroup iface_wl_shell_surface */ -static inline void -wl_shell_surface_set_user_data(struct wl_shell_surface *wl_shell_surface, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_shell_surface, user_data); -} - -/** @ingroup iface_wl_shell_surface */ -static inline void * -wl_shell_surface_get_user_data(struct wl_shell_surface *wl_shell_surface) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_shell_surface); -} - -static inline uint32_t -wl_shell_surface_get_version(struct wl_shell_surface *wl_shell_surface) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_shell_surface); -} - -/** @ingroup iface_wl_shell_surface */ -static inline void -wl_shell_surface_destroy(struct wl_shell_surface *wl_shell_surface) -{ - wl_proxy_destroy((struct wl_proxy *) wl_shell_surface); -} - -/** - * @ingroup iface_wl_shell_surface - * - * A client must respond to a ping event with a pong request or - * the client may be deemed unresponsive. - */ -static inline void -wl_shell_surface_pong(struct wl_shell_surface *wl_shell_surface, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shell_surface, - WL_SHELL_SURFACE_PONG, serial); -} - -/** - * @ingroup iface_wl_shell_surface - * - * Start a pointer-driven move of the surface. - * - * This request must be used in response to a button press event. - * The server may ignore move requests depending on the state of - * the surface (e.g. fullscreen or maximized). - */ -static inline void -wl_shell_surface_move(struct wl_shell_surface *wl_shell_surface, struct wl_seat *seat, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shell_surface, - WL_SHELL_SURFACE_MOVE, seat, serial); -} - -/** - * @ingroup iface_wl_shell_surface - * - * Start a pointer-driven resizing of the surface. - * - * This request must be used in response to a button press event. - * The server may ignore resize requests depending on the state of - * the surface (e.g. fullscreen or maximized). - */ -static inline void -wl_shell_surface_resize(struct wl_shell_surface *wl_shell_surface, struct wl_seat *seat, uint32_t serial, uint32_t edges) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shell_surface, - WL_SHELL_SURFACE_RESIZE, seat, serial, edges); -} - -/** - * @ingroup iface_wl_shell_surface - * - * Map the surface as a toplevel surface. - * - * A toplevel surface is not fullscreen, maximized or transient. - */ -static inline void -wl_shell_surface_set_toplevel(struct wl_shell_surface *wl_shell_surface) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shell_surface, - WL_SHELL_SURFACE_SET_TOPLEVEL); -} - -/** - * @ingroup iface_wl_shell_surface - * - * Map the surface relative to an existing surface. - * - * The x and y arguments specify the location of the upper left - * corner of the surface relative to the upper left corner of the - * parent surface, in surface-local coordinates. - * - * The flags argument controls details of the transient behaviour. - */ -static inline void -wl_shell_surface_set_transient(struct wl_shell_surface *wl_shell_surface, struct wl_surface *parent, int32_t x, int32_t y, uint32_t flags) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shell_surface, - WL_SHELL_SURFACE_SET_TRANSIENT, parent, x, y, flags); -} - -/** - * @ingroup iface_wl_shell_surface - * - * Map the surface as a fullscreen surface. - * - * If an output parameter is given then the surface will be made - * fullscreen on that output. If the client does not specify the - * output then the compositor will apply its policy - usually - * choosing the output on which the surface has the biggest surface - * area. - * - * The client may specify a method to resolve a size conflict - * between the output size and the surface size - this is provided - * through the method parameter. - * - * The framerate parameter is used only when the method is set - * to "driver", to indicate the preferred framerate. A value of 0 - * indicates that the client does not care about framerate. The - * framerate is specified in mHz, that is framerate of 60000 is 60Hz. - * - * A method of "scale" or "driver" implies a scaling operation of - * the surface, either via a direct scaling operation or a change of - * the output mode. This will override any kind of output scaling, so - * that mapping a surface with a buffer size equal to the mode can - * fill the screen independent of buffer_scale. - * - * A method of "fill" means we don't scale up the buffer, however - * any output scale is applied. This means that you may run into - * an edge case where the application maps a buffer with the same - * size of the output mode but buffer_scale 1 (thus making a - * surface larger than the output). In this case it is allowed to - * downscale the results to fit the screen. - * - * The compositor must reply to this request with a configure event - * with the dimensions for the output on which the surface will - * be made fullscreen. - */ -static inline void -wl_shell_surface_set_fullscreen(struct wl_shell_surface *wl_shell_surface, uint32_t method, uint32_t framerate, struct wl_output *output) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shell_surface, - WL_SHELL_SURFACE_SET_FULLSCREEN, method, framerate, output); -} - -/** - * @ingroup iface_wl_shell_surface - * - * Map the surface as a popup. - * - * A popup surface is a transient surface with an added pointer - * grab. - * - * An existing implicit grab will be changed to owner-events mode, - * and the popup grab will continue after the implicit grab ends - * (i.e. releasing the mouse button does not cause the popup to - * be unmapped). - * - * The popup grab continues until the window is destroyed or a - * mouse button is pressed in any other client's window. A click - * in any of the client's surfaces is reported as normal, however, - * clicks in other clients' surfaces will be discarded and trigger - * the callback. - * - * The x and y arguments specify the location of the upper left - * corner of the surface relative to the upper left corner of the - * parent surface, in surface-local coordinates. - */ -static inline void -wl_shell_surface_set_popup(struct wl_shell_surface *wl_shell_surface, struct wl_seat *seat, uint32_t serial, struct wl_surface *parent, int32_t x, int32_t y, uint32_t flags) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shell_surface, - WL_SHELL_SURFACE_SET_POPUP, seat, serial, parent, x, y, flags); -} - -/** - * @ingroup iface_wl_shell_surface - * - * Map the surface as a maximized surface. - * - * If an output parameter is given then the surface will be - * maximized on that output. If the client does not specify the - * output then the compositor will apply its policy - usually - * choosing the output on which the surface has the biggest surface - * area. - * - * The compositor will reply with a configure event telling - * the expected new surface size. The operation is completed - * on the next buffer attach to this surface. - * - * A maximized surface typically fills the entire output it is - * bound to, except for desktop elements such as panels. This is - * the main difference between a maximized shell surface and a - * fullscreen shell surface. - * - * The details depend on the compositor implementation. - */ -static inline void -wl_shell_surface_set_maximized(struct wl_shell_surface *wl_shell_surface, struct wl_output *output) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shell_surface, - WL_SHELL_SURFACE_SET_MAXIMIZED, output); -} - -/** - * @ingroup iface_wl_shell_surface - * - * Set a short title for the surface. - * - * This string may be used to identify the surface in a task bar, - * window list, or other user interface elements provided by the - * compositor. - * - * The string must be encoded in UTF-8. - */ -static inline void -wl_shell_surface_set_title(struct wl_shell_surface *wl_shell_surface, const char *title) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shell_surface, - WL_SHELL_SURFACE_SET_TITLE, title); -} - -/** - * @ingroup iface_wl_shell_surface - * - * Set a class for the surface. - * - * The surface class identifies the general class of applications - * to which the surface belongs. A common convention is to use the - * file name (or the full path if it is a non-standard location) of - * the application's .desktop file as the class. - */ -static inline void -wl_shell_surface_set_class(struct wl_shell_surface *wl_shell_surface, const char *class_) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shell_surface, - WL_SHELL_SURFACE_SET_CLASS, class_); -} - -#ifndef WL_SURFACE_ERROR_ENUM -#define WL_SURFACE_ERROR_ENUM -/** - * @ingroup iface_wl_surface - * wl_surface error values - * - * These errors can be emitted in response to wl_surface requests. - */ -enum wl_surface_error { - /** - * buffer scale value is invalid - */ - WL_SURFACE_ERROR_INVALID_SCALE = 0, - /** - * buffer transform value is invalid - */ - WL_SURFACE_ERROR_INVALID_TRANSFORM = 1, -}; -#endif /* WL_SURFACE_ERROR_ENUM */ - -/** - * @ingroup iface_wl_surface - * @struct wl_surface_listener - */ -struct wl_surface_listener { - /** - * surface enters an output - * - * This is emitted whenever a surface's creation, movement, or - * resizing results in some part of it being within the scanout - * region of an output. - * - * Note that a surface may be overlapping with zero or more - * outputs. - * @param output output entered by the surface - */ - void (*enter)(void *data, - struct wl_surface *wl_surface, - struct wl_output *output); - /** - * surface leaves an output - * - * This is emitted whenever a surface's creation, movement, or - * resizing results in it no longer having any part of it within - * the scanout region of an output. - * @param output output left by the surface - */ - void (*leave)(void *data, - struct wl_surface *wl_surface, - struct wl_output *output); -}; - -/** - * @ingroup iface_wl_surface - */ -static inline int -wl_surface_add_listener(struct wl_surface *wl_surface, - const struct wl_surface_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_surface, - (void (**)(void)) listener, data); -} - -#define WL_SURFACE_DESTROY 0 -#define WL_SURFACE_ATTACH 1 -#define WL_SURFACE_DAMAGE 2 -#define WL_SURFACE_FRAME 3 -#define WL_SURFACE_SET_OPAQUE_REGION 4 -#define WL_SURFACE_SET_INPUT_REGION 5 -#define WL_SURFACE_COMMIT 6 -#define WL_SURFACE_SET_BUFFER_TRANSFORM 7 -#define WL_SURFACE_SET_BUFFER_SCALE 8 -#define WL_SURFACE_DAMAGE_BUFFER 9 - -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_LEAVE_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_ATTACH_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_DAMAGE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_FRAME_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_SET_OPAQUE_REGION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_SET_INPUT_REGION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_COMMIT_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_SET_BUFFER_TRANSFORM_SINCE_VERSION 2 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_SET_BUFFER_SCALE_SINCE_VERSION 3 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION 4 - -/** @ingroup iface_wl_surface */ -static inline void -wl_surface_set_user_data(struct wl_surface *wl_surface, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_surface, user_data); -} - -/** @ingroup iface_wl_surface */ -static inline void * -wl_surface_get_user_data(struct wl_surface *wl_surface) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_surface); -} - -static inline uint32_t -wl_surface_get_version(struct wl_surface *wl_surface) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_surface); -} - -/** - * @ingroup iface_wl_surface - * - * Deletes the surface and invalidates its object ID. - */ -static inline void -wl_surface_destroy(struct wl_surface *wl_surface) -{ - wl_proxy_marshal((struct wl_proxy *) wl_surface, - WL_SURFACE_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wl_surface); -} - -/** - * @ingroup iface_wl_surface - * - * Set a buffer as the content of this surface. - * - * The new size of the surface is calculated based on the buffer - * size transformed by the inverse buffer_transform and the - * inverse buffer_scale. This means that the supplied buffer - * must be an integer multiple of the buffer_scale. - * - * The x and y arguments specify the location of the new pending - * buffer's upper left corner, relative to the current buffer's upper - * left corner, in surface-local coordinates. In other words, the - * x and y, combined with the new surface size define in which - * directions the surface's size changes. - * - * Surface contents are double-buffered state, see wl_surface.commit. - * - * The initial surface contents are void; there is no content. - * wl_surface.attach assigns the given wl_buffer as the pending - * wl_buffer. wl_surface.commit makes the pending wl_buffer the new - * surface contents, and the size of the surface becomes the size - * calculated from the wl_buffer, as described above. After commit, - * there is no pending buffer until the next attach. - * - * Committing a pending wl_buffer allows the compositor to read the - * pixels in the wl_buffer. The compositor may access the pixels at - * any time after the wl_surface.commit request. When the compositor - * will not access the pixels anymore, it will send the - * wl_buffer.release event. Only after receiving wl_buffer.release, - * the client may reuse the wl_buffer. A wl_buffer that has been - * attached and then replaced by another attach instead of committed - * will not receive a release event, and is not used by the - * compositor. - * - * Destroying the wl_buffer after wl_buffer.release does not change - * the surface contents. However, if the client destroys the - * wl_buffer before receiving the wl_buffer.release event, the surface - * contents become undefined immediately. - * - * If wl_surface.attach is sent with a NULL wl_buffer, the - * following wl_surface.commit will remove the surface content. - */ -static inline void -wl_surface_attach(struct wl_surface *wl_surface, struct wl_buffer *buffer, int32_t x, int32_t y) -{ - wl_proxy_marshal((struct wl_proxy *) wl_surface, - WL_SURFACE_ATTACH, buffer, x, y); -} - -/** - * @ingroup iface_wl_surface - * - * This request is used to describe the regions where the pending - * buffer is different from the current surface contents, and where - * the surface therefore needs to be repainted. The compositor - * ignores the parts of the damage that fall outside of the surface. - * - * Damage is double-buffered state, see wl_surface.commit. - * - * The damage rectangle is specified in surface-local coordinates, - * where x and y specify the upper left corner of the damage rectangle. - * - * The initial value for pending damage is empty: no damage. - * wl_surface.damage adds pending damage: the new pending damage - * is the union of old pending damage and the given rectangle. - * - * wl_surface.commit assigns pending damage as the current damage, - * and clears pending damage. The server will clear the current - * damage as it repaints the surface. - * - * Alternatively, damage can be posted with wl_surface.damage_buffer - * which uses buffer coordinates instead of surface coordinates, - * and is probably the preferred and intuitive way of doing this. - */ -static inline void -wl_surface_damage(struct wl_surface *wl_surface, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) wl_surface, - WL_SURFACE_DAMAGE, x, y, width, height); -} - -/** - * @ingroup iface_wl_surface - * - * Request a notification when it is a good time to start drawing a new - * frame, by creating a frame callback. This is useful for throttling - * redrawing operations, and driving animations. - * - * When a client is animating on a wl_surface, it can use the 'frame' - * request to get notified when it is a good time to draw and commit the - * next frame of animation. If the client commits an update earlier than - * that, it is likely that some updates will not make it to the display, - * and the client is wasting resources by drawing too often. - * - * The frame request will take effect on the next wl_surface.commit. - * The notification will only be posted for one frame unless - * requested again. For a wl_surface, the notifications are posted in - * the order the frame requests were committed. - * - * The server must send the notifications so that a client - * will not send excessive updates, while still allowing - * the highest possible update rate for clients that wait for the reply - * before drawing again. The server should give some time for the client - * to draw and commit after sending the frame callback events to let it - * hit the next output refresh. - * - * A server should avoid signaling the frame callbacks if the - * surface is not visible in any way, e.g. the surface is off-screen, - * or completely obscured by other opaque surfaces. - * - * The object returned by this request will be destroyed by the - * compositor after the callback is fired and as such the client must not - * attempt to use it after that point. - * - * The callback_data passed in the callback is the current time, in - * milliseconds, with an undefined base. - */ -static inline struct wl_callback * -wl_surface_frame(struct wl_surface *wl_surface) -{ - struct wl_proxy *callback; - - callback = wl_proxy_marshal_constructor((struct wl_proxy *) wl_surface, - WL_SURFACE_FRAME, &wl_callback_interface, NULL); - - return (struct wl_callback *) callback; -} - -/** - * @ingroup iface_wl_surface - * - * This request sets the region of the surface that contains - * opaque content. - * - * The opaque region is an optimization hint for the compositor - * that lets it optimize the redrawing of content behind opaque - * regions. Setting an opaque region is not required for correct - * behaviour, but marking transparent content as opaque will result - * in repaint artifacts. - * - * The opaque region is specified in surface-local coordinates. - * - * The compositor ignores the parts of the opaque region that fall - * outside of the surface. - * - * Opaque region is double-buffered state, see wl_surface.commit. - * - * wl_surface.set_opaque_region changes the pending opaque region. - * wl_surface.commit copies the pending region to the current region. - * Otherwise, the pending and current regions are never changed. - * - * The initial value for an opaque region is empty. Setting the pending - * opaque region has copy semantics, and the wl_region object can be - * destroyed immediately. A NULL wl_region causes the pending opaque - * region to be set to empty. - */ -static inline void -wl_surface_set_opaque_region(struct wl_surface *wl_surface, struct wl_region *region) -{ - wl_proxy_marshal((struct wl_proxy *) wl_surface, - WL_SURFACE_SET_OPAQUE_REGION, region); -} - -/** - * @ingroup iface_wl_surface - * - * This request sets the region of the surface that can receive - * pointer and touch events. - * - * Input events happening outside of this region will try the next - * surface in the server surface stack. The compositor ignores the - * parts of the input region that fall outside of the surface. - * - * The input region is specified in surface-local coordinates. - * - * Input region is double-buffered state, see wl_surface.commit. - * - * wl_surface.set_input_region changes the pending input region. - * wl_surface.commit copies the pending region to the current region. - * Otherwise the pending and current regions are never changed, - * except cursor and icon surfaces are special cases, see - * wl_pointer.set_cursor and wl_data_device.start_drag. - * - * The initial value for an input region is infinite. That means the - * whole surface will accept input. Setting the pending input region - * has copy semantics, and the wl_region object can be destroyed - * immediately. A NULL wl_region causes the input region to be set - * to infinite. - */ -static inline void -wl_surface_set_input_region(struct wl_surface *wl_surface, struct wl_region *region) -{ - wl_proxy_marshal((struct wl_proxy *) wl_surface, - WL_SURFACE_SET_INPUT_REGION, region); -} - -/** - * @ingroup iface_wl_surface - * - * Surface state (input, opaque, and damage regions, attached buffers, - * etc.) is double-buffered. Protocol requests modify the pending state, - * as opposed to the current state in use by the compositor. 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. - * - * On commit, a pending wl_buffer is applied first, and all other state - * second. This means that all coordinates in double-buffered state are - * relative to the new wl_buffer coming into use, except for - * wl_surface.attach itself. If there is no pending wl_buffer, the - * coordinates are relative to the current surface contents. - * - * All requests that need a commit to become effective are documented - * to affect double-buffered state. - * - * Other interfaces may add further double-buffered surface state. - */ -static inline void -wl_surface_commit(struct wl_surface *wl_surface) -{ - wl_proxy_marshal((struct wl_proxy *) wl_surface, - WL_SURFACE_COMMIT); -} - -/** - * @ingroup iface_wl_surface - * - * This request sets an optional transformation on how the compositor - * interprets the contents of the buffer attached to the surface. The - * accepted values for the transform parameter are the values for - * wl_output.transform. - * - * Buffer transform is double-buffered state, see wl_surface.commit. - * - * A newly created surface has its buffer transformation set to normal. - * - * wl_surface.set_buffer_transform changes the pending buffer - * transformation. wl_surface.commit copies the pending buffer - * transformation to the current one. Otherwise, the pending and current - * values are never changed. - * - * The purpose of this request is to allow clients to render content - * according to the output transform, thus permitting the compositor to - * use certain optimizations even if the display is rotated. Using - * hardware overlays and scanning out a client buffer for fullscreen - * surfaces are examples of such optimizations. Those optimizations are - * highly dependent on the compositor implementation, so the use of this - * request should be considered on a case-by-case basis. - * - * Note that if the transform value includes 90 or 270 degree rotation, - * the width of the buffer will become the surface height and the height - * of the buffer will become the surface width. - * - * If transform is not one of the values from the - * wl_output.transform enum the invalid_transform protocol error - * is raised. - */ -static inline void -wl_surface_set_buffer_transform(struct wl_surface *wl_surface, int32_t transform) -{ - wl_proxy_marshal((struct wl_proxy *) wl_surface, - WL_SURFACE_SET_BUFFER_TRANSFORM, transform); -} - -/** - * @ingroup iface_wl_surface - * - * This request sets an optional scaling factor on how the compositor - * interprets the contents of the buffer attached to the window. - * - * Buffer scale is double-buffered state, see wl_surface.commit. - * - * A newly created surface has its buffer scale set to 1. - * - * wl_surface.set_buffer_scale changes the pending buffer scale. - * wl_surface.commit copies the pending buffer scale to the current one. - * Otherwise, the pending and current values are never changed. - * - * The purpose of this request is to allow clients to supply higher - * resolution buffer data for use on high resolution outputs. It is - * intended that you pick the same buffer scale as the scale of the - * output that the surface is displayed on. This means the compositor - * can avoid scaling when rendering the surface on that output. - * - * Note that if the scale is larger than 1, then you have to attach - * a buffer that is larger (by a factor of scale in each dimension) - * than the desired surface size. - * - * If scale is not positive the invalid_scale protocol error is - * raised. - */ -static inline void -wl_surface_set_buffer_scale(struct wl_surface *wl_surface, int32_t scale) -{ - wl_proxy_marshal((struct wl_proxy *) wl_surface, - WL_SURFACE_SET_BUFFER_SCALE, scale); -} - -/** - * @ingroup iface_wl_surface - * - * This request is used to describe the regions where the pending - * buffer is different from the current surface contents, and where - * the surface therefore needs to be repainted. The compositor - * ignores the parts of the damage that fall outside of the surface. - * - * Damage is double-buffered state, see wl_surface.commit. - * - * The damage rectangle is specified in buffer coordinates, - * where x and y specify the upper left corner of the damage rectangle. - * - * The initial value for pending damage is empty: no damage. - * wl_surface.damage_buffer adds pending damage: the new pending - * damage is the union of old pending damage and the given rectangle. - * - * wl_surface.commit assigns pending damage as the current damage, - * and clears pending damage. The server will clear the current - * damage as it repaints the surface. - * - * This request differs from wl_surface.damage in only one way - it - * takes damage in buffer coordinates instead of surface-local - * coordinates. While this generally is more intuitive than surface - * coordinates, it is especially desirable when using wp_viewport - * or when a drawing library (like EGL) is unaware of buffer scale - * and buffer transform. - * - * Note: Because buffer transformation changes and damage requests may - * be interleaved in the protocol stream, it is impossible to determine - * the actual mapping between surface and buffer damage until - * wl_surface.commit time. Therefore, compositors wishing to take both - * kinds of damage into account will have to accumulate damage from the - * two requests separately and only transform from one to the other - * after receiving the wl_surface.commit. - */ -static inline void -wl_surface_damage_buffer(struct wl_surface *wl_surface, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) wl_surface, - WL_SURFACE_DAMAGE_BUFFER, x, y, width, height); -} - -#ifndef WL_SEAT_CAPABILITY_ENUM -#define WL_SEAT_CAPABILITY_ENUM -/** - * @ingroup iface_wl_seat - * seat capability bitmask - * - * This is a bitmask of capabilities this seat has; if a member is - * set, then it is present on the seat. - */ -enum wl_seat_capability { - /** - * the seat has pointer devices - */ - WL_SEAT_CAPABILITY_POINTER = 1, - /** - * the seat has one or more keyboards - */ - WL_SEAT_CAPABILITY_KEYBOARD = 2, - /** - * the seat has touch devices - */ - WL_SEAT_CAPABILITY_TOUCH = 4, -}; -#endif /* WL_SEAT_CAPABILITY_ENUM */ - -/** - * @ingroup iface_wl_seat - * @struct wl_seat_listener - */ -struct wl_seat_listener { - /** - * seat capabilities changed - * - * This is emitted whenever a seat gains or loses the pointer, - * keyboard or touch capabilities. The argument is a capability - * enum containing the complete set of capabilities this seat has. - * - * When the pointer capability is added, a client may create a - * wl_pointer object using the wl_seat.get_pointer request. This - * object will receive pointer events until the capability is - * removed in the future. - * - * When the pointer capability is removed, a client should destroy - * the wl_pointer objects associated with the seat where the - * capability was removed, using the wl_pointer.release request. No - * further pointer events will be received on these objects. - * - * In some compositors, if a seat regains the pointer capability - * and a client has a previously obtained wl_pointer object of - * version 4 or less, that object may start sending pointer events - * again. This behavior is considered a misinterpretation of the - * intended behavior and must not be relied upon by the client. - * wl_pointer objects of version 5 or later must not send events if - * created before the most recent event notifying the client of an - * added pointer capability. - * - * The above behavior also applies to wl_keyboard and wl_touch with - * the keyboard and touch capabilities, respectively. - * @param capabilities capabilities of the seat - */ - void (*capabilities)(void *data, - struct wl_seat *wl_seat, - uint32_t capabilities); - /** - * unique identifier for this seat - * - * In a multiseat configuration this can be used by the client to - * help identify which physical devices the seat represents. Based - * on the seat configuration used by the compositor. - * @param name seat identifier - * @since 2 - */ - void (*name)(void *data, - struct wl_seat *wl_seat, - const char *name); -}; - -/** - * @ingroup iface_wl_seat - */ -static inline int -wl_seat_add_listener(struct wl_seat *wl_seat, - const struct wl_seat_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_seat, - (void (**)(void)) listener, data); -} - -#define WL_SEAT_GET_POINTER 0 -#define WL_SEAT_GET_KEYBOARD 1 -#define WL_SEAT_GET_TOUCH 2 -#define WL_SEAT_RELEASE 3 - -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_CAPABILITIES_SINCE_VERSION 1 -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_NAME_SINCE_VERSION 2 - -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_GET_POINTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_GET_KEYBOARD_SINCE_VERSION 1 -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_GET_TOUCH_SINCE_VERSION 1 -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_RELEASE_SINCE_VERSION 5 - -/** @ingroup iface_wl_seat */ -static inline void -wl_seat_set_user_data(struct wl_seat *wl_seat, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_seat, user_data); -} - -/** @ingroup iface_wl_seat */ -static inline void * -wl_seat_get_user_data(struct wl_seat *wl_seat) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_seat); -} - -static inline uint32_t -wl_seat_get_version(struct wl_seat *wl_seat) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_seat); -} - -/** @ingroup iface_wl_seat */ -static inline void -wl_seat_destroy(struct wl_seat *wl_seat) -{ - wl_proxy_destroy((struct wl_proxy *) wl_seat); -} - -/** - * @ingroup iface_wl_seat - * - * The ID provided will be initialized to the wl_pointer interface - * for this seat. - * - * This request only takes effect if the seat has the pointer - * capability, or has had the pointer capability in the past. - * It is a protocol violation to issue this request on a seat that has - * never had the pointer capability. - */ -static inline struct wl_pointer * -wl_seat_get_pointer(struct wl_seat *wl_seat) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_seat, - WL_SEAT_GET_POINTER, &wl_pointer_interface, NULL); - - return (struct wl_pointer *) id; -} - -/** - * @ingroup iface_wl_seat - * - * The ID provided will be initialized to the wl_keyboard interface - * for this seat. - * - * This request only takes effect if the seat has the keyboard - * capability, or has had the keyboard capability in the past. - * It is a protocol violation to issue this request on a seat that has - * never had the keyboard capability. - */ -static inline struct wl_keyboard * -wl_seat_get_keyboard(struct wl_seat *wl_seat) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_seat, - WL_SEAT_GET_KEYBOARD, &wl_keyboard_interface, NULL); - - return (struct wl_keyboard *) id; -} - -/** - * @ingroup iface_wl_seat - * - * The ID provided will be initialized to the wl_touch interface - * for this seat. - * - * This request only takes effect if the seat has the touch - * capability, or has had the touch capability in the past. - * It is a protocol violation to issue this request on a seat that has - * never had the touch capability. - */ -static inline struct wl_touch * -wl_seat_get_touch(struct wl_seat *wl_seat) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_seat, - WL_SEAT_GET_TOUCH, &wl_touch_interface, NULL); - - return (struct wl_touch *) id; -} - -/** - * @ingroup iface_wl_seat - * - * Using this request a client can tell the server that it is not going to - * use the seat object anymore. - */ -static inline void -wl_seat_release(struct wl_seat *wl_seat) -{ - wl_proxy_marshal((struct wl_proxy *) wl_seat, - WL_SEAT_RELEASE); - - wl_proxy_destroy((struct wl_proxy *) wl_seat); -} - -#ifndef WL_POINTER_ERROR_ENUM -#define WL_POINTER_ERROR_ENUM -enum wl_pointer_error { - /** - * given wl_surface has another role - */ - WL_POINTER_ERROR_ROLE = 0, -}; -#endif /* WL_POINTER_ERROR_ENUM */ - -#ifndef WL_POINTER_BUTTON_STATE_ENUM -#define WL_POINTER_BUTTON_STATE_ENUM -/** - * @ingroup iface_wl_pointer - * physical button state - * - * Describes the physical state of a button that produced the button - * event. - */ -enum wl_pointer_button_state { - /** - * the button is not pressed - */ - WL_POINTER_BUTTON_STATE_RELEASED = 0, - /** - * the button is pressed - */ - WL_POINTER_BUTTON_STATE_PRESSED = 1, -}; -#endif /* WL_POINTER_BUTTON_STATE_ENUM */ - -#ifndef WL_POINTER_AXIS_ENUM -#define WL_POINTER_AXIS_ENUM -/** - * @ingroup iface_wl_pointer - * axis types - * - * Describes the axis types of scroll events. - */ -enum wl_pointer_axis { - /** - * vertical axis - */ - WL_POINTER_AXIS_VERTICAL_SCROLL = 0, - /** - * horizontal axis - */ - WL_POINTER_AXIS_HORIZONTAL_SCROLL = 1, -}; -#endif /* WL_POINTER_AXIS_ENUM */ - -#ifndef WL_POINTER_AXIS_SOURCE_ENUM -#define WL_POINTER_AXIS_SOURCE_ENUM -/** - * @ingroup iface_wl_pointer - * axis source types - * - * Describes the source types for axis events. This indicates to the - * client how an axis event was physically generated; a client may - * adjust the user interface accordingly. For example, scroll events - * from a "finger" source may be in a smooth coordinate space with - * kinetic scrolling whereas a "wheel" source may be in discrete steps - * of a number of lines. - * - * The "continuous" axis source is a device generating events in a - * continuous coordinate space, but using something other than a - * finger. One example for this source is button-based scrolling where - * the vertical motion of a device is converted to scroll events while - * a button is held down. - * - * The "wheel tilt" axis source indicates that the actual device is a - * wheel but the scroll event is not caused by a rotation but a - * (usually sideways) tilt of the wheel. - */ -enum wl_pointer_axis_source { - /** - * a physical wheel rotation - */ - WL_POINTER_AXIS_SOURCE_WHEEL = 0, - /** - * finger on a touch surface - */ - WL_POINTER_AXIS_SOURCE_FINGER = 1, - /** - * continuous coordinate space - */ - WL_POINTER_AXIS_SOURCE_CONTINUOUS = 2, - /** - * a physical wheel tilt - * @since 6 - */ - WL_POINTER_AXIS_SOURCE_WHEEL_TILT = 3, -}; -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_AXIS_SOURCE_WHEEL_TILT_SINCE_VERSION 6 -#endif /* WL_POINTER_AXIS_SOURCE_ENUM */ - -/** - * @ingroup iface_wl_pointer - * @struct wl_pointer_listener - */ -struct wl_pointer_listener { - /** - * enter event - * - * Notification that this seat's pointer is focused on a certain - * surface. - * - * When a seat's focus enters a surface, the pointer image is - * undefined and a client should respond to this event by setting - * an appropriate pointer image with the set_cursor request. - * @param serial serial number of the enter event - * @param surface surface entered by the pointer - * @param surface_x surface-local x coordinate - * @param surface_y surface-local y coordinate - */ - void (*enter)(void *data, - struct wl_pointer *wl_pointer, - uint32_t serial, - struct wl_surface *surface, - wl_fixed_t surface_x, - wl_fixed_t surface_y); - /** - * leave event - * - * Notification that this seat's pointer is no longer focused on - * a certain surface. - * - * The leave notification is sent before the enter notification for - * the new focus. - * @param serial serial number of the leave event - * @param surface surface left by the pointer - */ - void (*leave)(void *data, - struct wl_pointer *wl_pointer, - uint32_t serial, - struct wl_surface *surface); - /** - * pointer motion event - * - * Notification of pointer location change. The arguments - * surface_x and surface_y are the location relative to the focused - * surface. - * @param time timestamp with millisecond granularity - * @param surface_x surface-local x coordinate - * @param surface_y surface-local y coordinate - */ - void (*motion)(void *data, - struct wl_pointer *wl_pointer, - uint32_t time, - wl_fixed_t surface_x, - wl_fixed_t surface_y); - /** - * pointer button event - * - * Mouse button click and release notifications. - * - * The location of the click is given by the last motion or enter - * event. The time argument is a timestamp with millisecond - * granularity, with an undefined base. - * - * The button is a button code as defined in the Linux kernel's - * linux/input-event-codes.h header file, e.g. BTN_LEFT. - * - * Any 16-bit button code value is reserved for future additions to - * the kernel's event code list. All other button codes above - * 0xFFFF are currently undefined but may be used in future - * versions of this protocol. - * @param serial serial number of the button event - * @param time timestamp with millisecond granularity - * @param button button that produced the event - * @param state physical state of the button - */ - void (*button)(void *data, - struct wl_pointer *wl_pointer, - uint32_t serial, - uint32_t time, - uint32_t button, - uint32_t state); - /** - * axis event - * - * Scroll and other axis notifications. - * - * For scroll events (vertical and horizontal scroll axes), the - * value parameter is the length of a vector along the specified - * axis in a coordinate space identical to those of motion events, - * representing a relative movement along the specified axis. - * - * For devices that support movements non-parallel to axes multiple - * axis events will be emitted. - * - * When applicable, for example for touch pads, the server can - * choose to emit scroll events where the motion vector is - * equivalent to a motion event vector. - * - * When applicable, a client can transform its content relative to - * the scroll distance. - * @param time timestamp with millisecond granularity - * @param axis axis type - * @param value length of vector in surface-local coordinate space - */ - void (*axis)(void *data, - struct wl_pointer *wl_pointer, - uint32_t time, - uint32_t axis, - wl_fixed_t value); - /** - * end of a pointer event sequence - * - * Indicates the end of a set of events that logically belong - * together. A client is expected to accumulate the data in all - * events within the frame before proceeding. - * - * All wl_pointer events before a wl_pointer.frame event belong - * logically together. For example, in a diagonal scroll motion the - * compositor will send an optional wl_pointer.axis_source event, - * two wl_pointer.axis events (horizontal and vertical) and finally - * a wl_pointer.frame event. The client may use this information to - * calculate a diagonal vector for scrolling. - * - * When multiple wl_pointer.axis events occur within the same - * frame, the motion vector is the combined motion of all events. - * When a wl_pointer.axis and a wl_pointer.axis_stop event occur - * within the same frame, this indicates that axis movement in one - * axis has stopped but continues in the other axis. When multiple - * wl_pointer.axis_stop events occur within the same frame, this - * indicates that these axes stopped in the same instance. - * - * A wl_pointer.frame event is sent for every logical event group, - * even if the group only contains a single wl_pointer event. - * Specifically, a client may get a sequence: motion, frame, - * button, frame, axis, frame, axis_stop, frame. - * - * The wl_pointer.enter and wl_pointer.leave events are logical - * events generated by the compositor and not the hardware. These - * events are also grouped by a wl_pointer.frame. When a pointer - * moves from one surface to another, a compositor should group the - * wl_pointer.leave event within the same wl_pointer.frame. - * However, a client must not rely on wl_pointer.leave and - * wl_pointer.enter being in the same wl_pointer.frame. - * Compositor-specific policies may require the wl_pointer.leave - * and wl_pointer.enter event being split across multiple - * wl_pointer.frame groups. - * @since 5 - */ - void (*frame)(void *data, - struct wl_pointer *wl_pointer); - /** - * axis source event - * - * Source information for scroll and other axes. - * - * This event does not occur on its own. It is sent before a - * wl_pointer.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 wl_pointer.axis_source.finger, a wl_pointer.axis_stop event - * will be sent when the user lifts the finger off the device. - * - * If the source is wl_pointer.axis_source.wheel, - * wl_pointer.axis_source.wheel_tilt or - * wl_pointer.axis_source.continuous, a wl_pointer.axis_stop event - * may or may not be sent. Whether a compositor sends an axis_stop - * event for these sources is hardware-specific and - * implementation-dependent; clients must not rely on receiving an - * axis_stop event for these scroll sources and should treat scroll - * sequences from these scroll sources as unterminated by default. - * - * This event is optional. If the source is unknown for a - * particular axis event sequence, no event is sent. Only one - * wl_pointer.axis_source event is permitted per frame. - * - * The order of wl_pointer.axis_discrete and wl_pointer.axis_source - * is not guaranteed. - * @param axis_source source of the axis event - * @since 5 - */ - void (*axis_source)(void *data, - struct wl_pointer *wl_pointer, - uint32_t axis_source); - /** - * axis stop event - * - * Stop notification for scroll and other axes. - * - * For some wl_pointer.axis_source types, a wl_pointer.axis_stop - * event is sent to notify a client that the axis sequence has - * terminated. This enables the client to implement kinetic - * scrolling. See the wl_pointer.axis_source documentation for - * information on when this event may be generated. - * - * Any wl_pointer.axis events with the same axis_source after this - * event should be considered as the start of a new axis motion. - * - * The timestamp is to be interpreted identical to the timestamp in - * the wl_pointer.axis event. The timestamp value may be the same - * as a preceding wl_pointer.axis event. - * @param time timestamp with millisecond granularity - * @param axis the axis stopped with this event - * @since 5 - */ - void (*axis_stop)(void *data, - struct wl_pointer *wl_pointer, - uint32_t time, - uint32_t axis); - /** - * axis click event - * - * Discrete step information for scroll and other axes. - * - * This event carries the axis value of the wl_pointer.axis event - * in discrete steps (e.g. mouse wheel clicks). - * - * This event does not occur on its own, it is coupled with a - * wl_pointer.axis event that represents this axis value on a - * continuous scale. The protocol guarantees that each - * axis_discrete event is always followed by exactly one axis event - * with the same axis number within the same wl_pointer.frame. Note - * that the protocol allows for other events to occur between the - * axis_discrete and its coupled axis event, including other - * axis_discrete or axis events. - * - * This event is optional; continuous scrolling devices like - * two-finger scrolling on touchpads do not have discrete steps and - * do not generate this event. - * - * The discrete value carries the directional information. e.g. a - * value of -2 is two steps towards the negative direction of this - * axis. - * - * The axis number is identical to the axis number in the - * associated axis event. - * - * The order of wl_pointer.axis_discrete and wl_pointer.axis_source - * is not guaranteed. - * @param axis axis type - * @param discrete number of steps - * @since 5 - */ - void (*axis_discrete)(void *data, - struct wl_pointer *wl_pointer, - uint32_t axis, - int32_t discrete); -}; - -/** - * @ingroup iface_wl_pointer - */ -static inline int -wl_pointer_add_listener(struct wl_pointer *wl_pointer, - const struct wl_pointer_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_pointer, - (void (**)(void)) listener, data); -} - -#define WL_POINTER_SET_CURSOR 0 -#define WL_POINTER_RELEASE 1 - -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_LEAVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_MOTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_BUTTON_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_AXIS_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_FRAME_SINCE_VERSION 5 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_AXIS_SOURCE_SINCE_VERSION 5 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_AXIS_STOP_SINCE_VERSION 5 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_AXIS_DISCRETE_SINCE_VERSION 5 - -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_SET_CURSOR_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_RELEASE_SINCE_VERSION 3 - -/** @ingroup iface_wl_pointer */ -static inline void -wl_pointer_set_user_data(struct wl_pointer *wl_pointer, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_pointer, user_data); -} - -/** @ingroup iface_wl_pointer */ -static inline void * -wl_pointer_get_user_data(struct wl_pointer *wl_pointer) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_pointer); -} - -static inline uint32_t -wl_pointer_get_version(struct wl_pointer *wl_pointer) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_pointer); -} - -/** @ingroup iface_wl_pointer */ -static inline void -wl_pointer_destroy(struct wl_pointer *wl_pointer) -{ - wl_proxy_destroy((struct wl_proxy *) wl_pointer); -} - -/** - * @ingroup iface_wl_pointer - * - * Set the pointer surface, i.e., the surface that contains the - * pointer image (cursor). This request gives the surface the role - * of a cursor. If the surface already has another role, it raises - * a protocol error. - * - * The cursor actually changes only if the pointer - * focus for this device is 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 pointer 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. - */ -static inline void -wl_pointer_set_cursor(struct wl_pointer *wl_pointer, uint32_t serial, struct wl_surface *surface, int32_t hotspot_x, int32_t hotspot_y) -{ - wl_proxy_marshal((struct wl_proxy *) wl_pointer, - WL_POINTER_SET_CURSOR, serial, surface, hotspot_x, hotspot_y); -} - -/** - * @ingroup iface_wl_pointer - * - * Using this request a client can tell the server that it is not going to - * use the pointer object anymore. - * - * This request destroys the pointer proxy object, so clients must not call - * wl_pointer_destroy() after using this request. - */ -static inline void -wl_pointer_release(struct wl_pointer *wl_pointer) -{ - wl_proxy_marshal((struct wl_proxy *) wl_pointer, - WL_POINTER_RELEASE); - - wl_proxy_destroy((struct wl_proxy *) wl_pointer); -} - -#ifndef WL_KEYBOARD_KEYMAP_FORMAT_ENUM -#define WL_KEYBOARD_KEYMAP_FORMAT_ENUM -/** - * @ingroup iface_wl_keyboard - * keyboard mapping format - * - * This specifies the format of the keymap provided to the - * client with the wl_keyboard.keymap event. - */ -enum wl_keyboard_keymap_format { - /** - * no keymap; client must understand how to interpret the raw keycode - */ - WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP = 0, - /** - * libxkbcommon compatible; to determine the xkb keycode, clients must add 8 to the key event keycode - */ - WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1 = 1, -}; -#endif /* WL_KEYBOARD_KEYMAP_FORMAT_ENUM */ - -#ifndef WL_KEYBOARD_KEY_STATE_ENUM -#define WL_KEYBOARD_KEY_STATE_ENUM -/** - * @ingroup iface_wl_keyboard - * physical key state - * - * Describes the physical state of a key that produced the key event. - */ -enum wl_keyboard_key_state { - /** - * key is not pressed - */ - WL_KEYBOARD_KEY_STATE_RELEASED = 0, - /** - * key is pressed - */ - WL_KEYBOARD_KEY_STATE_PRESSED = 1, -}; -#endif /* WL_KEYBOARD_KEY_STATE_ENUM */ - -/** - * @ingroup iface_wl_keyboard - * @struct wl_keyboard_listener - */ -struct wl_keyboard_listener { - /** - * keyboard mapping - * - * This event provides a file descriptor to the client which can - * be memory-mapped to provide a keyboard mapping description. - * @param format keymap format - * @param fd keymap file descriptor - * @param size keymap size, in bytes - */ - void (*keymap)(void *data, - struct wl_keyboard *wl_keyboard, - uint32_t format, - int32_t fd, - uint32_t size); - /** - * enter event - * - * Notification that this seat's keyboard focus is on a certain - * surface. - * @param serial serial number of the enter event - * @param surface surface gaining keyboard focus - * @param keys the currently pressed keys - */ - void (*enter)(void *data, - struct wl_keyboard *wl_keyboard, - uint32_t serial, - struct wl_surface *surface, - struct wl_array *keys); - /** - * leave event - * - * Notification that this seat's keyboard focus is no longer on a - * certain surface. - * - * The leave notification is sent before the enter notification for - * the new focus. - * @param serial serial number of the leave event - * @param surface surface that lost keyboard focus - */ - void (*leave)(void *data, - struct wl_keyboard *wl_keyboard, - uint32_t serial, - struct wl_surface *surface); - /** - * key event - * - * A key was pressed or released. The time argument is a - * timestamp with millisecond granularity, with an undefined base. - * @param serial serial number of the key event - * @param time timestamp with millisecond granularity - * @param key key that produced the event - * @param state physical state of the key - */ - void (*key)(void *data, - struct wl_keyboard *wl_keyboard, - uint32_t serial, - uint32_t time, - uint32_t key, - uint32_t state); - /** - * modifier and group state - * - * Notifies clients that the modifier and/or group state has - * changed, and it should update its local state. - * @param serial serial number of the modifiers event - * @param mods_depressed depressed modifiers - * @param mods_latched latched modifiers - * @param mods_locked locked modifiers - * @param group keyboard layout - */ - void (*modifiers)(void *data, - struct wl_keyboard *wl_keyboard, - uint32_t serial, - uint32_t mods_depressed, - uint32_t mods_latched, - uint32_t mods_locked, - uint32_t group); - /** - * repeat rate and delay - * - * Informs the client about the keyboard's repeat rate and delay. - * - * This event is sent as soon as the wl_keyboard object has been - * created, and is guaranteed to be received by the client before - * any key press event. - * - * Negative values for either rate or delay are illegal. A rate of - * zero will disable any repeating (regardless of the value of - * delay). - * - * This event can be sent later on as well with a new value if - * necessary, so clients should continue listening for the event - * past the creation of wl_keyboard. - * @param rate the rate of repeating keys in characters per second - * @param delay delay in milliseconds since key down until repeating starts - * @since 4 - */ - void (*repeat_info)(void *data, - struct wl_keyboard *wl_keyboard, - int32_t rate, - int32_t delay); -}; - -/** - * @ingroup iface_wl_keyboard - */ -static inline int -wl_keyboard_add_listener(struct wl_keyboard *wl_keyboard, - const struct wl_keyboard_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_keyboard, - (void (**)(void)) listener, data); -} - -#define WL_KEYBOARD_RELEASE 0 - -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_KEYMAP_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_LEAVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_KEY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_MODIFIERS_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION 4 - -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_RELEASE_SINCE_VERSION 3 - -/** @ingroup iface_wl_keyboard */ -static inline void -wl_keyboard_set_user_data(struct wl_keyboard *wl_keyboard, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_keyboard, user_data); -} - -/** @ingroup iface_wl_keyboard */ -static inline void * -wl_keyboard_get_user_data(struct wl_keyboard *wl_keyboard) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_keyboard); -} - -static inline uint32_t -wl_keyboard_get_version(struct wl_keyboard *wl_keyboard) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_keyboard); -} - -/** @ingroup iface_wl_keyboard */ -static inline void -wl_keyboard_destroy(struct wl_keyboard *wl_keyboard) -{ - wl_proxy_destroy((struct wl_proxy *) wl_keyboard); -} - -/** - * @ingroup iface_wl_keyboard - */ -static inline void -wl_keyboard_release(struct wl_keyboard *wl_keyboard) -{ - wl_proxy_marshal((struct wl_proxy *) wl_keyboard, - WL_KEYBOARD_RELEASE); - - wl_proxy_destroy((struct wl_proxy *) wl_keyboard); -} - -/** - * @ingroup iface_wl_touch - * @struct wl_touch_listener - */ -struct wl_touch_listener { - /** - * touch down event and beginning of a touch sequence - * - * A new touch point has appeared on the surface. This touch - * point is assigned a unique ID. Future events from this touch - * point reference this ID. The ID ceases to be valid after a touch - * up event and may be reused in the future. - * @param serial serial number of the touch down event - * @param time timestamp with millisecond granularity - * @param surface surface touched - * @param id the unique ID of this touch point - * @param x surface-local x coordinate - * @param y surface-local y coordinate - */ - void (*down)(void *data, - struct wl_touch *wl_touch, - uint32_t serial, - uint32_t time, - struct wl_surface *surface, - int32_t id, - wl_fixed_t x, - wl_fixed_t y); - /** - * end of a touch event sequence - * - * The touch point has disappeared. No further events will be - * sent for this touch point and the touch point's ID is released - * and may be reused in a future touch down event. - * @param serial serial number of the touch up event - * @param time timestamp with millisecond granularity - * @param id the unique ID of this touch point - */ - void (*up)(void *data, - struct wl_touch *wl_touch, - uint32_t serial, - uint32_t time, - int32_t id); - /** - * update of touch point coordinates - * - * A touch point has changed coordinates. - * @param time timestamp with millisecond granularity - * @param id the unique ID of this touch point - * @param x surface-local x coordinate - * @param y surface-local y coordinate - */ - void (*motion)(void *data, - struct wl_touch *wl_touch, - uint32_t time, - int32_t id, - wl_fixed_t x, - wl_fixed_t y); - /** - * end of touch frame event - * - * Indicates the end of a set of events that logically belong - * together. A client is expected to accumulate the data in all - * events within the frame before proceeding. - * - * A wl_touch.frame terminates at least one event but otherwise no - * guarantee is provided about the set of events within a frame. A - * client must assume that any state not updated in a frame is - * unchanged from the previously known state. - */ - void (*frame)(void *data, - struct wl_touch *wl_touch); - /** - * touch session cancelled - * - * Sent if the compositor decides the touch stream is a global - * gesture. No further events are sent to the clients from that - * particular gesture. Touch cancellation applies to all touch - * points currently active on this client's surface. The client is - * responsible for finalizing the touch points, future touch points - * on this surface may reuse the touch point ID. - */ - void (*cancel)(void *data, - struct wl_touch *wl_touch); - /** - * update shape of touch point - * - * Sent when a touchpoint has changed its shape. - * - * This event does not occur on its own. It is sent before a - * wl_touch.frame event and carries the new shape information for - * any previously reported, or new touch points of that frame. - * - * Other events describing the touch point such as wl_touch.down, - * wl_touch.motion or wl_touch.orientation may be sent within the - * same wl_touch.frame. A client should treat these events as a - * single logical touch point update. The order of wl_touch.shape, - * wl_touch.orientation and wl_touch.motion is not guaranteed. A - * wl_touch.down event is guaranteed to occur before the first - * wl_touch.shape event for this touch ID but both events may occur - * within the same wl_touch.frame. - * - * A touchpoint shape is approximated by an ellipse through the - * major and minor axis length. The major axis length describes the - * longer diameter of the ellipse, while the minor axis length - * describes the shorter diameter. Major and minor are orthogonal - * and both are specified in surface-local coordinates. The center - * of the ellipse is always at the touchpoint location as reported - * by wl_touch.down or wl_touch.move. - * - * This event is only sent by the compositor if the touch device - * supports shape reports. The client has to make reasonable - * assumptions about the shape if it did not receive this event. - * @param id the unique ID of this touch point - * @param major length of the major axis in surface-local coordinates - * @param minor length of the minor axis in surface-local coordinates - * @since 6 - */ - void (*shape)(void *data, - struct wl_touch *wl_touch, - int32_t id, - wl_fixed_t major, - wl_fixed_t minor); - /** - * update orientation of touch point - * - * Sent when a touchpoint has changed its orientation. - * - * This event does not occur on its own. It is sent before a - * wl_touch.frame event and carries the new shape information for - * any previously reported, or new touch points of that frame. - * - * Other events describing the touch point such as wl_touch.down, - * wl_touch.motion or wl_touch.shape may be sent within the same - * wl_touch.frame. A client should treat these events as a single - * logical touch point update. The order of wl_touch.shape, - * wl_touch.orientation and wl_touch.motion is not guaranteed. A - * wl_touch.down event is guaranteed to occur before the first - * wl_touch.orientation event for this touch ID but both events may - * occur within the same wl_touch.frame. - * - * The orientation describes the clockwise angle of a touchpoint's - * major axis to the positive surface y-axis and is normalized to - * the -180 to +180 degree range. The granularity of orientation - * depends on the touch device, some devices only support binary - * rotation values between 0 and 90 degrees. - * - * This event is only sent by the compositor if the touch device - * supports orientation reports. - * @param id the unique ID of this touch point - * @param orientation angle between major axis and positive surface y-axis in degrees - * @since 6 - */ - void (*orientation)(void *data, - struct wl_touch *wl_touch, - int32_t id, - wl_fixed_t orientation); -}; - -/** - * @ingroup iface_wl_touch - */ -static inline int -wl_touch_add_listener(struct wl_touch *wl_touch, - const struct wl_touch_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_touch, - (void (**)(void)) listener, data); -} - -#define WL_TOUCH_RELEASE 0 - -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_DOWN_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_UP_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_MOTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_FRAME_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_CANCEL_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_SHAPE_SINCE_VERSION 6 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_ORIENTATION_SINCE_VERSION 6 - -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_RELEASE_SINCE_VERSION 3 - -/** @ingroup iface_wl_touch */ -static inline void -wl_touch_set_user_data(struct wl_touch *wl_touch, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_touch, user_data); -} - -/** @ingroup iface_wl_touch */ -static inline void * -wl_touch_get_user_data(struct wl_touch *wl_touch) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_touch); -} - -static inline uint32_t -wl_touch_get_version(struct wl_touch *wl_touch) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_touch); -} - -/** @ingroup iface_wl_touch */ -static inline void -wl_touch_destroy(struct wl_touch *wl_touch) -{ - wl_proxy_destroy((struct wl_proxy *) wl_touch); -} - -/** - * @ingroup iface_wl_touch - */ -static inline void -wl_touch_release(struct wl_touch *wl_touch) -{ - wl_proxy_marshal((struct wl_proxy *) wl_touch, - WL_TOUCH_RELEASE); - - wl_proxy_destroy((struct wl_proxy *) wl_touch); -} - -#ifndef WL_OUTPUT_SUBPIXEL_ENUM -#define WL_OUTPUT_SUBPIXEL_ENUM -/** - * @ingroup iface_wl_output - * subpixel geometry information - * - * This enumeration describes how the physical - * pixels on an output are laid out. - */ -enum wl_output_subpixel { - /** - * unknown geometry - */ - WL_OUTPUT_SUBPIXEL_UNKNOWN = 0, - /** - * no geometry - */ - WL_OUTPUT_SUBPIXEL_NONE = 1, - /** - * horizontal RGB - */ - WL_OUTPUT_SUBPIXEL_HORIZONTAL_RGB = 2, - /** - * horizontal BGR - */ - WL_OUTPUT_SUBPIXEL_HORIZONTAL_BGR = 3, - /** - * vertical RGB - */ - WL_OUTPUT_SUBPIXEL_VERTICAL_RGB = 4, - /** - * vertical BGR - */ - WL_OUTPUT_SUBPIXEL_VERTICAL_BGR = 5, -}; -#endif /* WL_OUTPUT_SUBPIXEL_ENUM */ - -#ifndef WL_OUTPUT_TRANSFORM_ENUM -#define WL_OUTPUT_TRANSFORM_ENUM -/** - * @ingroup iface_wl_output - * transform from framebuffer to output - * - * This describes the transform that a compositor will apply to a - * surface to compensate for the rotation or mirroring of an - * output device. - * - * The flipped values correspond to an initial flip around a - * vertical axis followed by rotation. - * - * The purpose is mainly to allow clients to render accordingly and - * tell the compositor, so that for fullscreen surfaces, the - * compositor will still be able to scan out directly from client - * surfaces. - */ -enum wl_output_transform { - /** - * no transform - */ - WL_OUTPUT_TRANSFORM_NORMAL = 0, - /** - * 90 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_90 = 1, - /** - * 180 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_180 = 2, - /** - * 270 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_270 = 3, - /** - * 180 degree flip around a vertical axis - */ - WL_OUTPUT_TRANSFORM_FLIPPED = 4, - /** - * flip and rotate 90 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_FLIPPED_90 = 5, - /** - * flip and rotate 180 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_FLIPPED_180 = 6, - /** - * flip and rotate 270 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_FLIPPED_270 = 7, -}; -#endif /* WL_OUTPUT_TRANSFORM_ENUM */ - -#ifndef WL_OUTPUT_MODE_ENUM -#define WL_OUTPUT_MODE_ENUM -/** - * @ingroup iface_wl_output - * mode information - * - * These flags describe properties of an output mode. - * They are used in the flags bitfield of the mode event. - */ -enum wl_output_mode { - /** - * indicates this is the current mode - */ - WL_OUTPUT_MODE_CURRENT = 0x1, - /** - * indicates this is the preferred mode - */ - WL_OUTPUT_MODE_PREFERRED = 0x2, -}; -#endif /* WL_OUTPUT_MODE_ENUM */ - -/** - * @ingroup iface_wl_output - * @struct wl_output_listener - */ -struct wl_output_listener { - /** - * properties of the output - * - * The geometry event describes geometric properties of the - * output. The event is sent when binding to the output object and - * whenever any of the properties change. - * @param x x position within the global compositor space - * @param y y position within the global compositor space - * @param physical_width width in millimeters of the output - * @param physical_height height in millimeters of the output - * @param subpixel subpixel orientation of the output - * @param make textual description of the manufacturer - * @param model textual description of the model - * @param transform transform that maps framebuffer to output - */ - void (*geometry)(void *data, - struct wl_output *wl_output, - int32_t x, - int32_t y, - int32_t physical_width, - int32_t physical_height, - int32_t subpixel, - const char *make, - const char *model, - int32_t transform); - /** - * advertise available modes for the output - * - * The mode event describes an available mode for the output. - * - * The event is sent when binding to the output object and there - * will always be one mode, the current mode. The event is sent - * again if an output changes mode, for the mode that is now - * current. In other words, the current mode is always the last - * mode that was received with the current flag set. - * - * The size of a mode is given in physical hardware units of the - * output device. This is not necessarily the same as the output - * size in the global compositor space. For instance, the output - * may be scaled, as described in wl_output.scale, or transformed, - * as described in wl_output.transform. - * @param flags bitfield of mode flags - * @param width width of the mode in hardware units - * @param height height of the mode in hardware units - * @param refresh vertical refresh rate in mHz - */ - void (*mode)(void *data, - struct wl_output *wl_output, - uint32_t flags, - int32_t width, - int32_t height, - int32_t refresh); - /** - * sent all information about output - * - * This event is sent after all other properties have been sent - * after binding to the output object and after any other property - * changes done after that. This allows changes to the output - * properties to be seen as atomic, even if they happen via - * multiple events. - * @since 2 - */ - void (*done)(void *data, - struct wl_output *wl_output); - /** - * output scaling properties - * - * This event contains scaling geometry information that is not - * in the geometry event. It may be sent after binding the output - * object or if the output scale changes later. If it is not sent, - * the client should assume a scale of 1. - * - * A scale larger than 1 means that the compositor will - * automatically scale surface buffers by this amount when - * rendering. This is used for very high resolution displays where - * applications rendering at the native resolution would be too - * small to be legible. - * - * It is intended that scaling aware clients track the current - * output of a surface, and if it is on a scaled output it should - * use wl_surface.set_buffer_scale with the scale of the output. - * That way the compositor can avoid scaling the surface, and the - * client can supply a higher detail image. - * @param factor scaling factor of output - * @since 2 - */ - void (*scale)(void *data, - struct wl_output *wl_output, - int32_t factor); -}; - -/** - * @ingroup iface_wl_output - */ -static inline int -wl_output_add_listener(struct wl_output *wl_output, - const struct wl_output_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_output, - (void (**)(void)) listener, data); -} - -#define WL_OUTPUT_RELEASE 0 - -/** - * @ingroup iface_wl_output - */ -#define WL_OUTPUT_GEOMETRY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_output - */ -#define WL_OUTPUT_MODE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_output - */ -#define WL_OUTPUT_DONE_SINCE_VERSION 2 -/** - * @ingroup iface_wl_output - */ -#define WL_OUTPUT_SCALE_SINCE_VERSION 2 - -/** - * @ingroup iface_wl_output - */ -#define WL_OUTPUT_RELEASE_SINCE_VERSION 3 - -/** @ingroup iface_wl_output */ -static inline void -wl_output_set_user_data(struct wl_output *wl_output, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_output, user_data); -} - -/** @ingroup iface_wl_output */ -static inline void * -wl_output_get_user_data(struct wl_output *wl_output) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_output); -} - -static inline uint32_t -wl_output_get_version(struct wl_output *wl_output) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_output); -} - -/** @ingroup iface_wl_output */ -static inline void -wl_output_destroy(struct wl_output *wl_output) -{ - wl_proxy_destroy((struct wl_proxy *) wl_output); -} - -/** - * @ingroup iface_wl_output - * - * Using this request a client can tell the server that it is not going to - * use the output object anymore. - */ -static inline void -wl_output_release(struct wl_output *wl_output) -{ - wl_proxy_marshal((struct wl_proxy *) wl_output, - WL_OUTPUT_RELEASE); - - wl_proxy_destroy((struct wl_proxy *) wl_output); -} - -#define WL_REGION_DESTROY 0 -#define WL_REGION_ADD 1 -#define WL_REGION_SUBTRACT 2 - - -/** - * @ingroup iface_wl_region - */ -#define WL_REGION_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_region - */ -#define WL_REGION_ADD_SINCE_VERSION 1 -/** - * @ingroup iface_wl_region - */ -#define WL_REGION_SUBTRACT_SINCE_VERSION 1 - -/** @ingroup iface_wl_region */ -static inline void -wl_region_set_user_data(struct wl_region *wl_region, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_region, user_data); -} - -/** @ingroup iface_wl_region */ -static inline void * -wl_region_get_user_data(struct wl_region *wl_region) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_region); -} - -static inline uint32_t -wl_region_get_version(struct wl_region *wl_region) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_region); -} - -/** - * @ingroup iface_wl_region - * - * Destroy the region. This will invalidate the object ID. - */ -static inline void -wl_region_destroy(struct wl_region *wl_region) -{ - wl_proxy_marshal((struct wl_proxy *) wl_region, - WL_REGION_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wl_region); -} - -/** - * @ingroup iface_wl_region - * - * Add the specified rectangle to the region. - */ -static inline void -wl_region_add(struct wl_region *wl_region, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) wl_region, - WL_REGION_ADD, x, y, width, height); -} - -/** - * @ingroup iface_wl_region - * - * Subtract the specified rectangle from the region. - */ -static inline void -wl_region_subtract(struct wl_region *wl_region, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) wl_region, - WL_REGION_SUBTRACT, x, y, width, height); -} - -#ifndef WL_SUBCOMPOSITOR_ERROR_ENUM -#define WL_SUBCOMPOSITOR_ERROR_ENUM -enum wl_subcompositor_error { - /** - * the to-be sub-surface is invalid - */ - WL_SUBCOMPOSITOR_ERROR_BAD_SURFACE = 0, -}; -#endif /* WL_SUBCOMPOSITOR_ERROR_ENUM */ - -#define WL_SUBCOMPOSITOR_DESTROY 0 -#define WL_SUBCOMPOSITOR_GET_SUBSURFACE 1 - - -/** - * @ingroup iface_wl_subcompositor - */ -#define WL_SUBCOMPOSITOR_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subcompositor - */ -#define WL_SUBCOMPOSITOR_GET_SUBSURFACE_SINCE_VERSION 1 - -/** @ingroup iface_wl_subcompositor */ -static inline void -wl_subcompositor_set_user_data(struct wl_subcompositor *wl_subcompositor, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_subcompositor, user_data); -} - -/** @ingroup iface_wl_subcompositor */ -static inline void * -wl_subcompositor_get_user_data(struct wl_subcompositor *wl_subcompositor) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_subcompositor); -} - -static inline uint32_t -wl_subcompositor_get_version(struct wl_subcompositor *wl_subcompositor) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_subcompositor); -} - -/** - * @ingroup iface_wl_subcompositor - * - * Informs the server that the client will not be using this - * protocol object anymore. This does not affect any other - * objects, wl_subsurface objects included. - */ -static inline void -wl_subcompositor_destroy(struct wl_subcompositor *wl_subcompositor) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subcompositor, - WL_SUBCOMPOSITOR_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wl_subcompositor); -} - -/** - * @ingroup iface_wl_subcompositor - * - * Create a sub-surface interface for the given surface, and - * associate it with the given parent surface. This turns a - * plain wl_surface into a sub-surface. - * - * The to-be sub-surface must not already have another role, and it - * must not have an existing wl_subsurface object. Otherwise a protocol - * error is raised. - */ -static inline struct wl_subsurface * -wl_subcompositor_get_subsurface(struct wl_subcompositor *wl_subcompositor, struct wl_surface *surface, struct wl_surface *parent) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_subcompositor, - WL_SUBCOMPOSITOR_GET_SUBSURFACE, &wl_subsurface_interface, NULL, surface, parent); - - return (struct wl_subsurface *) id; -} - -#ifndef WL_SUBSURFACE_ERROR_ENUM -#define WL_SUBSURFACE_ERROR_ENUM -enum wl_subsurface_error { - /** - * wl_surface is not a sibling or the parent - */ - WL_SUBSURFACE_ERROR_BAD_SURFACE = 0, -}; -#endif /* WL_SUBSURFACE_ERROR_ENUM */ - -#define WL_SUBSURFACE_DESTROY 0 -#define WL_SUBSURFACE_SET_POSITION 1 -#define WL_SUBSURFACE_PLACE_ABOVE 2 -#define WL_SUBSURFACE_PLACE_BELOW 3 -#define WL_SUBSURFACE_SET_SYNC 4 -#define WL_SUBSURFACE_SET_DESYNC 5 - - -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_SET_POSITION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_PLACE_ABOVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_PLACE_BELOW_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_SET_SYNC_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_SET_DESYNC_SINCE_VERSION 1 - -/** @ingroup iface_wl_subsurface */ -static inline void -wl_subsurface_set_user_data(struct wl_subsurface *wl_subsurface, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_subsurface, user_data); -} - -/** @ingroup iface_wl_subsurface */ -static inline void * -wl_subsurface_get_user_data(struct wl_subsurface *wl_subsurface) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_subsurface); -} - -static inline uint32_t -wl_subsurface_get_version(struct wl_subsurface *wl_subsurface) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_subsurface); -} - -/** - * @ingroup iface_wl_subsurface - * - * The sub-surface interface is removed from the wl_surface object - * that was turned into a sub-surface with a - * wl_subcompositor.get_subsurface request. The wl_surface's association - * to the parent is deleted, and the wl_surface loses its role as - * a sub-surface. The wl_surface is unmapped. - */ -static inline void -wl_subsurface_destroy(struct wl_subsurface *wl_subsurface) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subsurface, - WL_SUBSURFACE_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wl_subsurface); -} - -/** - * @ingroup iface_wl_subsurface - * - * This schedules a sub-surface position change. - * The sub-surface will be moved so that its origin (top left - * corner pixel) will be at the location x, y of the parent surface - * coordinate system. The coordinates are not restricted to the parent - * surface area. Negative values are allowed. - * - * The scheduled coordinates will take effect whenever the state of the - * parent surface is applied. When this happens depends on whether the - * parent surface is in synchronized mode or not. See - * wl_subsurface.set_sync and wl_subsurface.set_desync for details. - * - * If more than one set_position request is invoked by the client before - * the commit of the parent surface, the position of a new request always - * replaces the scheduled position from any previous request. - * - * The initial position is 0, 0. - */ -static inline void -wl_subsurface_set_position(struct wl_subsurface *wl_subsurface, int32_t x, int32_t y) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subsurface, - WL_SUBSURFACE_SET_POSITION, x, y); -} - -/** - * @ingroup iface_wl_subsurface - * - * This sub-surface is taken from the stack, and put back just - * above the reference surface, changing the z-order of the sub-surfaces. - * The reference surface must be one of the sibling surfaces, or the - * parent surface. Using any other surface, including this sub-surface, - * will cause a protocol error. - * - * The z-order is double-buffered. Requests are handled in order and - * applied immediately to a pending state. The final pending state is - * copied to the active state the next time the state of the parent - * surface is applied. When this happens depends on whether the parent - * surface is in synchronized mode or not. See wl_subsurface.set_sync and - * wl_subsurface.set_desync for details. - * - * A new sub-surface is initially added as the top-most in the stack - * of its siblings and parent. - */ -static inline void -wl_subsurface_place_above(struct wl_subsurface *wl_subsurface, struct wl_surface *sibling) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subsurface, - WL_SUBSURFACE_PLACE_ABOVE, sibling); -} - -/** - * @ingroup iface_wl_subsurface - * - * The sub-surface is placed just below the reference surface. - * See wl_subsurface.place_above. - */ -static inline void -wl_subsurface_place_below(struct wl_subsurface *wl_subsurface, struct wl_surface *sibling) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subsurface, - WL_SUBSURFACE_PLACE_BELOW, sibling); -} - -/** - * @ingroup iface_wl_subsurface - * - * Change the commit behaviour of the sub-surface to synchronized - * mode, also described as the parent dependent mode. - * - * In synchronized mode, wl_surface.commit on a sub-surface will - * accumulate the committed state in a cache, but the state will - * not be applied and hence will not change the compositor output. - * The cached state is applied to the sub-surface immediately after - * the parent surface's state is applied. This ensures atomic - * updates of the parent and all its synchronized sub-surfaces. - * Applying the cached state will invalidate the cache, so further - * parent surface commits do not (re-)apply old state. - * - * See wl_subsurface for the recursive effect of this mode. - */ -static inline void -wl_subsurface_set_sync(struct wl_subsurface *wl_subsurface) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subsurface, - WL_SUBSURFACE_SET_SYNC); -} - -/** - * @ingroup iface_wl_subsurface - * - * Change the commit behaviour of the sub-surface to desynchronized - * mode, also described as independent or freely running mode. - * - * In desynchronized mode, wl_surface.commit on a sub-surface will - * apply the pending state directly, without caching, as happens - * normally with a wl_surface. Calling wl_surface.commit on the - * parent surface has no effect on the sub-surface's wl_surface - * state. This mode allows a sub-surface to be updated on its own. - * - * If cached state exists when wl_surface.commit is called in - * desynchronized mode, the pending state is added to the cached - * state, and applied as a whole. This invalidates the cache. - * - * Note: even if a sub-surface is set to desynchronized, a parent - * sub-surface may override it to behave as synchronized. For details, - * see wl_subsurface. - * - * If a surface's parent surface behaves as desynchronized, then - * the cached state is applied on set_desync. - */ -static inline void -wl_subsurface_set_desync(struct wl_subsurface *wl_subsurface) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subsurface, - WL_SUBSURFACE_SET_DESYNC); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland/include/protocol/wayland-client-protocol.h b/chromium/third_party/wayland/include/protocol/wayland-client-protocol.h deleted file mode 100644 index 07935344357..00000000000 --- a/chromium/third_party/wayland/include/protocol/wayland-client-protocol.h +++ /dev/null @@ -1,5587 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef WAYLAND_CLIENT_PROTOCOL_H -#define WAYLAND_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_wayland The wayland protocol - * @section page_ifaces_wayland Interfaces - * - @subpage page_iface_wl_display - core global object - * - @subpage page_iface_wl_registry - global registry object - * - @subpage page_iface_wl_callback - callback object - * - @subpage page_iface_wl_compositor - the compositor singleton - * - @subpage page_iface_wl_shm_pool - a shared memory pool - * - @subpage page_iface_wl_shm - shared memory support - * - @subpage page_iface_wl_buffer - content for a wl_surface - * - @subpage page_iface_wl_data_offer - offer to transfer data - * - @subpage page_iface_wl_data_source - offer to transfer data - * - @subpage page_iface_wl_data_device - data transfer device - * - @subpage page_iface_wl_data_device_manager - data transfer interface - * - @subpage page_iface_wl_shell - create desktop-style surfaces - * - @subpage page_iface_wl_shell_surface - desktop-style metadata interface - * - @subpage page_iface_wl_surface - an onscreen surface - * - @subpage page_iface_wl_seat - group of input devices - * - @subpage page_iface_wl_pointer - pointer input device - * - @subpage page_iface_wl_keyboard - keyboard input device - * - @subpage page_iface_wl_touch - touchscreen input device - * - @subpage page_iface_wl_output - compositor output region - * - @subpage page_iface_wl_region - region interface - * - @subpage page_iface_wl_subcompositor - sub-surface compositing - * - @subpage page_iface_wl_subsurface - sub-surface interface to a wl_surface - * @section page_copyright_wayland Copyright - * <pre> - * - * Copyright © 2008-2011 Kristian Høgsberg - * Copyright © 2010-2011 Intel Corporation - * Copyright © 2012-2013 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. - * </pre> - */ -struct wl_buffer; -struct wl_callback; -struct wl_compositor; -struct wl_data_device; -struct wl_data_device_manager; -struct wl_data_offer; -struct wl_data_source; -struct wl_display; -struct wl_keyboard; -struct wl_output; -struct wl_pointer; -struct wl_region; -struct wl_registry; -struct wl_seat; -struct wl_shell; -struct wl_shell_surface; -struct wl_shm; -struct wl_shm_pool; -struct wl_subcompositor; -struct wl_subsurface; -struct wl_surface; -struct wl_touch; - -/** - * @page page_iface_wl_display wl_display - * @section page_iface_wl_display_desc Description - * - * The core global object. This is a special singleton object. It - * is used for internal Wayland protocol features. - * @section page_iface_wl_display_api API - * See @ref iface_wl_display. - */ -/** - * @defgroup iface_wl_display The wl_display interface - * - * The core global object. This is a special singleton object. It - * is used for internal Wayland protocol features. - */ -extern const struct wl_interface wl_display_interface; -/** - * @page page_iface_wl_registry wl_registry - * @section page_iface_wl_registry_desc Description - * - * The singleton global registry object. The server has a number of - * global objects that are available to all clients. These objects - * typically represent an actual object in the server (for example, - * an input device) or they are singleton objects that provide - * extension functionality. - * - * When a client creates a registry object, the registry object - * will emit a global event for each global currently in the - * registry. Globals come and go as a result of device or - * monitor hotplugs, reconfiguration or other events, and the - * registry will send out global and global_remove events to - * keep the client up to date with the changes. To mark the end - * of the initial burst of events, the client can use the - * wl_display.sync request immediately after calling - * wl_display.get_registry. - * - * A client can bind to a global object by using the bind - * request. This creates a client-side handle that lets the object - * emit events to the client and lets the client invoke requests on - * the object. - * @section page_iface_wl_registry_api API - * See @ref iface_wl_registry. - */ -/** - * @defgroup iface_wl_registry The wl_registry interface - * - * The singleton global registry object. The server has a number of - * global objects that are available to all clients. These objects - * typically represent an actual object in the server (for example, - * an input device) or they are singleton objects that provide - * extension functionality. - * - * When a client creates a registry object, the registry object - * will emit a global event for each global currently in the - * registry. Globals come and go as a result of device or - * monitor hotplugs, reconfiguration or other events, and the - * registry will send out global and global_remove events to - * keep the client up to date with the changes. To mark the end - * of the initial burst of events, the client can use the - * wl_display.sync request immediately after calling - * wl_display.get_registry. - * - * A client can bind to a global object by using the bind - * request. This creates a client-side handle that lets the object - * emit events to the client and lets the client invoke requests on - * the object. - */ -extern const struct wl_interface wl_registry_interface; -/** - * @page page_iface_wl_callback wl_callback - * @section page_iface_wl_callback_desc Description - * - * Clients can handle the 'done' event to get notified when - * the related request is done. - * @section page_iface_wl_callback_api API - * See @ref iface_wl_callback. - */ -/** - * @defgroup iface_wl_callback The wl_callback interface - * - * Clients can handle the 'done' event to get notified when - * the related request is done. - */ -extern const struct wl_interface wl_callback_interface; -/** - * @page page_iface_wl_compositor wl_compositor - * @section page_iface_wl_compositor_desc Description - * - * A compositor. This object is a singleton global. The - * compositor is in charge of combining the contents of multiple - * surfaces into one displayable output. - * @section page_iface_wl_compositor_api API - * See @ref iface_wl_compositor. - */ -/** - * @defgroup iface_wl_compositor The wl_compositor interface - * - * A compositor. This object is a singleton global. The - * compositor is in charge of combining the contents of multiple - * surfaces into one displayable output. - */ -extern const struct wl_interface wl_compositor_interface; -/** - * @page page_iface_wl_shm_pool wl_shm_pool - * @section page_iface_wl_shm_pool_desc Description - * - * The wl_shm_pool object encapsulates a piece of memory shared - * between the compositor and client. Through the wl_shm_pool - * object, the client can allocate shared memory wl_buffer objects. - * All objects created through the same pool share the same - * underlying mapped memory. Reusing the mapped memory avoids the - * setup/teardown overhead and is useful when interactively resizing - * a surface or for many small buffers. - * @section page_iface_wl_shm_pool_api API - * See @ref iface_wl_shm_pool. - */ -/** - * @defgroup iface_wl_shm_pool The wl_shm_pool interface - * - * The wl_shm_pool object encapsulates a piece of memory shared - * between the compositor and client. Through the wl_shm_pool - * object, the client can allocate shared memory wl_buffer objects. - * All objects created through the same pool share the same - * underlying mapped memory. Reusing the mapped memory avoids the - * setup/teardown overhead and is useful when interactively resizing - * a surface or for many small buffers. - */ -extern const struct wl_interface wl_shm_pool_interface; -/** - * @page page_iface_wl_shm wl_shm - * @section page_iface_wl_shm_desc Description - * - * A singleton global object that provides support for shared - * memory. - * - * Clients can create wl_shm_pool objects using the create_pool - * request. - * - * At connection setup time, the wl_shm object emits one or more - * format events to inform clients about the valid pixel formats - * that can be used for buffers. - * @section page_iface_wl_shm_api API - * See @ref iface_wl_shm. - */ -/** - * @defgroup iface_wl_shm The wl_shm interface - * - * A singleton global object that provides support for shared - * memory. - * - * Clients can create wl_shm_pool objects using the create_pool - * request. - * - * At connection setup time, the wl_shm object emits one or more - * format events to inform clients about the valid pixel formats - * that can be used for buffers. - */ -extern const struct wl_interface wl_shm_interface; -/** - * @page page_iface_wl_buffer wl_buffer - * @section page_iface_wl_buffer_desc Description - * - * A buffer provides the content for a wl_surface. Buffers are - * created through factory interfaces such as wl_drm, wl_shm or - * similar. It has a width and a height and can be attached to a - * wl_surface, but the mechanism by which a client provides and - * updates the contents is defined by the buffer factory interface. - * @section page_iface_wl_buffer_api API - * See @ref iface_wl_buffer. - */ -/** - * @defgroup iface_wl_buffer The wl_buffer interface - * - * A buffer provides the content for a wl_surface. Buffers are - * created through factory interfaces such as wl_drm, wl_shm or - * similar. It has a width and a height and can be attached to a - * wl_surface, but the mechanism by which a client provides and - * updates the contents is defined by the buffer factory interface. - */ -extern const struct wl_interface wl_buffer_interface; -/** - * @page page_iface_wl_data_offer wl_data_offer - * @section page_iface_wl_data_offer_desc Description - * - * A wl_data_offer represents a piece of data offered for transfer - * by another client (the source client). It is used by the - * copy-and-paste and drag-and-drop mechanisms. 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. - * @section page_iface_wl_data_offer_api API - * See @ref iface_wl_data_offer. - */ -/** - * @defgroup iface_wl_data_offer The wl_data_offer interface - * - * A wl_data_offer represents a piece of data offered for transfer - * by another client (the source client). It is used by the - * copy-and-paste and drag-and-drop mechanisms. 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. - */ -extern const struct wl_interface wl_data_offer_interface; -/** - * @page page_iface_wl_data_source wl_data_source - * @section page_iface_wl_data_source_desc Description - * - * The wl_data_source object is the source side of a wl_data_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. - * @section page_iface_wl_data_source_api API - * See @ref iface_wl_data_source. - */ -/** - * @defgroup iface_wl_data_source The wl_data_source interface - * - * The wl_data_source object is the source side of a wl_data_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. - */ -extern const struct wl_interface wl_data_source_interface; -/** - * @page page_iface_wl_data_device wl_data_device - * @section page_iface_wl_data_device_desc Description - * - * There is one wl_data_device per seat which can be obtained - * from the global wl_data_device_manager singleton. - * - * A wl_data_device provides access to inter-client data transfer - * mechanisms such as copy-and-paste and drag-and-drop. - * @section page_iface_wl_data_device_api API - * See @ref iface_wl_data_device. - */ -/** - * @defgroup iface_wl_data_device The wl_data_device interface - * - * There is one wl_data_device per seat which can be obtained - * from the global wl_data_device_manager singleton. - * - * A wl_data_device provides access to inter-client data transfer - * mechanisms such as copy-and-paste and drag-and-drop. - */ -extern const struct wl_interface wl_data_device_interface; -/** - * @page page_iface_wl_data_device_manager wl_data_device_manager - * @section page_iface_wl_data_device_manager_desc Description - * - * The wl_data_device_manager is a singleton global object that - * provides access to inter-client data transfer mechanisms such as - * copy-and-paste and drag-and-drop. These mechanisms are tied to - * a wl_seat and this interface lets a client get a wl_data_device - * corresponding to a wl_seat. - * - * Depending on the version bound, the objects created from the bound - * wl_data_device_manager object will have different requirements for - * functioning properly. See wl_data_source.set_actions, - * wl_data_offer.accept and wl_data_offer.finish for details. - * @section page_iface_wl_data_device_manager_api API - * See @ref iface_wl_data_device_manager. - */ -/** - * @defgroup iface_wl_data_device_manager The wl_data_device_manager interface - * - * The wl_data_device_manager is a singleton global object that - * provides access to inter-client data transfer mechanisms such as - * copy-and-paste and drag-and-drop. These mechanisms are tied to - * a wl_seat and this interface lets a client get a wl_data_device - * corresponding to a wl_seat. - * - * Depending on the version bound, the objects created from the bound - * wl_data_device_manager object will have different requirements for - * functioning properly. See wl_data_source.set_actions, - * wl_data_offer.accept and wl_data_offer.finish for details. - */ -extern const struct wl_interface wl_data_device_manager_interface; -/** - * @page page_iface_wl_shell wl_shell - * @section page_iface_wl_shell_desc Description - * - * This interface is implemented by servers that provide - * desktop-style user interfaces. - * - * It allows clients to associate a wl_shell_surface with - * a basic surface. - * @section page_iface_wl_shell_api API - * See @ref iface_wl_shell. - */ -/** - * @defgroup iface_wl_shell The wl_shell interface - * - * This interface is implemented by servers that provide - * desktop-style user interfaces. - * - * It allows clients to associate a wl_shell_surface with - * a basic surface. - */ -extern const struct wl_interface wl_shell_interface; -/** - * @page page_iface_wl_shell_surface wl_shell_surface - * @section page_iface_wl_shell_surface_desc Description - * - * 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 toplevel, fullscreen - * or popup windows, move, resize or maximize them, associate - * metadata like title and class, etc. - * - * On the server side the object is automatically destroyed when - * the related wl_surface is destroyed. On the client side, - * wl_shell_surface_destroy() must be called before destroying - * the wl_surface object. - * @section page_iface_wl_shell_surface_api API - * See @ref iface_wl_shell_surface. - */ -/** - * @defgroup iface_wl_shell_surface The wl_shell_surface interface - * - * 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 toplevel, fullscreen - * or popup windows, move, resize or maximize them, associate - * metadata like title and class, etc. - * - * On the server side the object is automatically destroyed when - * the related wl_surface is destroyed. On the client side, - * wl_shell_surface_destroy() must be called before destroying - * the wl_surface object. - */ -extern const struct wl_interface wl_shell_surface_interface; -/** - * @page page_iface_wl_surface wl_surface - * @section page_iface_wl_surface_desc Description - * - * A surface is a rectangular area that is displayed on the screen. - * It has a location, size and pixel contents. - * - * The size of a surface (and relative positions on it) is described - * in surface-local coordinates, which may differ from the buffer - * coordinates of the pixel content, in case a buffer_transform - * or a buffer_scale is used. - * - * A surface without a "role" is fairly useless: a compositor does - * not know where, when or how to present it. The role is the - * purpose of a wl_surface. Examples of roles are a cursor for a - * pointer (as set by wl_pointer.set_cursor), a drag icon - * (wl_data_device.start_drag), a sub-surface - * (wl_subcompositor.get_subsurface), and a window as defined by a - * shell protocol (e.g. wl_shell.get_shell_surface). - * - * A surface can have only one role at a time. Initially a - * wl_surface does not have a role. Once a wl_surface is given a - * role, it is set permanently for the whole lifetime of the - * wl_surface object. Giving the current role again is allowed, - * unless explicitly forbidden by the relevant interface - * specification. - * - * Surface roles are given by requests in other interfaces such as - * wl_pointer.set_cursor. The request should explicitly mention - * that this request gives a role to a wl_surface. Often, this - * request also creates a new protocol object that represents the - * role and adds additional functionality to wl_surface. When a - * client wants to destroy a wl_surface, they must destroy this 'role - * object' before the wl_surface. - * - * Destroying the role object does not remove the role from the - * wl_surface, but it may stop the wl_surface from "playing the role". - * For instance, if a wl_subsurface object is destroyed, the wl_surface - * it was created for will be unmapped and forget its position and - * z-order. It is allowed to create a wl_subsurface for the same - * wl_surface again, but it is not allowed to use the wl_surface as - * a cursor (cursor is a different role than sub-surface, and role - * switching is not allowed). - * @section page_iface_wl_surface_api API - * See @ref iface_wl_surface. - */ -/** - * @defgroup iface_wl_surface The wl_surface interface - * - * A surface is a rectangular area that is displayed on the screen. - * It has a location, size and pixel contents. - * - * The size of a surface (and relative positions on it) is described - * in surface-local coordinates, which may differ from the buffer - * coordinates of the pixel content, in case a buffer_transform - * or a buffer_scale is used. - * - * A surface without a "role" is fairly useless: a compositor does - * not know where, when or how to present it. The role is the - * purpose of a wl_surface. Examples of roles are a cursor for a - * pointer (as set by wl_pointer.set_cursor), a drag icon - * (wl_data_device.start_drag), a sub-surface - * (wl_subcompositor.get_subsurface), and a window as defined by a - * shell protocol (e.g. wl_shell.get_shell_surface). - * - * A surface can have only one role at a time. Initially a - * wl_surface does not have a role. Once a wl_surface is given a - * role, it is set permanently for the whole lifetime of the - * wl_surface object. Giving the current role again is allowed, - * unless explicitly forbidden by the relevant interface - * specification. - * - * Surface roles are given by requests in other interfaces such as - * wl_pointer.set_cursor. The request should explicitly mention - * that this request gives a role to a wl_surface. Often, this - * request also creates a new protocol object that represents the - * role and adds additional functionality to wl_surface. When a - * client wants to destroy a wl_surface, they must destroy this 'role - * object' before the wl_surface. - * - * Destroying the role object does not remove the role from the - * wl_surface, but it may stop the wl_surface from "playing the role". - * For instance, if a wl_subsurface object is destroyed, the wl_surface - * it was created for will be unmapped and forget its position and - * z-order. It is allowed to create a wl_subsurface for the same - * wl_surface again, but it is not allowed to use the wl_surface as - * a cursor (cursor is a different role than sub-surface, and role - * switching is not allowed). - */ -extern const struct wl_interface wl_surface_interface; -/** - * @page page_iface_wl_seat wl_seat - * @section page_iface_wl_seat_desc Description - * - * A seat is a group of keyboards, pointer and touch devices. This - * object is published as a global during start up, or when such a - * device is hot plugged. A seat typically has a pointer and - * maintains a keyboard focus and a pointer focus. - * @section page_iface_wl_seat_api API - * See @ref iface_wl_seat. - */ -/** - * @defgroup iface_wl_seat The wl_seat interface - * - * A seat is a group of keyboards, pointer and touch devices. This - * object is published as a global during start up, or when such a - * device is hot plugged. A seat typically has a pointer and - * maintains a keyboard focus and a pointer focus. - */ -extern const struct wl_interface wl_seat_interface; -/** - * @page page_iface_wl_pointer wl_pointer - * @section page_iface_wl_pointer_desc Description - * - * The wl_pointer interface represents one or more input devices, - * such as mice, which control the pointer location and pointer_focus - * of a seat. - * - * The wl_pointer interface generates motion, enter and leave - * events for the surfaces that the pointer is located over, - * and button and axis events for button presses, button releases - * and scrolling. - * @section page_iface_wl_pointer_api API - * See @ref iface_wl_pointer. - */ -/** - * @defgroup iface_wl_pointer The wl_pointer interface - * - * The wl_pointer interface represents one or more input devices, - * such as mice, which control the pointer location and pointer_focus - * of a seat. - * - * The wl_pointer interface generates motion, enter and leave - * events for the surfaces that the pointer is located over, - * and button and axis events for button presses, button releases - * and scrolling. - */ -extern const struct wl_interface wl_pointer_interface; -/** - * @page page_iface_wl_keyboard wl_keyboard - * @section page_iface_wl_keyboard_desc Description - * - * The wl_keyboard interface represents one or more keyboards - * associated with a seat. - * @section page_iface_wl_keyboard_api API - * See @ref iface_wl_keyboard. - */ -/** - * @defgroup iface_wl_keyboard The wl_keyboard interface - * - * The wl_keyboard interface represents one or more keyboards - * associated with a seat. - */ -extern const struct wl_interface wl_keyboard_interface; -/** - * @page page_iface_wl_touch wl_touch - * @section page_iface_wl_touch_desc Description - * - * The wl_touch interface represents a touchscreen - * associated with a seat. - * - * Touch interactions can consist of one or more contacts. - * For each contact, a series of events is generated, starting - * with a down event, followed by zero or more motion events, - * and ending with an up event. Events relating to the same - * contact point can be identified by the ID of the sequence. - * @section page_iface_wl_touch_api API - * See @ref iface_wl_touch. - */ -/** - * @defgroup iface_wl_touch The wl_touch interface - * - * The wl_touch interface represents a touchscreen - * associated with a seat. - * - * Touch interactions can consist of one or more contacts. - * For each contact, a series of events is generated, starting - * with a down event, followed by zero or more motion events, - * and ending with an up event. Events relating to the same - * contact point can be identified by the ID of the sequence. - */ -extern const struct wl_interface wl_touch_interface; -/** - * @page page_iface_wl_output wl_output - * @section page_iface_wl_output_desc Description - * - * An output describes part of the compositor geometry. The - * compositor works in the 'compositor coordinate system' and an - * output corresponds to a rectangular area in that space that is - * actually visible. This typically corresponds to a monitor that - * displays part of the compositor space. This object is published - * as global during start up, or when a monitor is hotplugged. - * @section page_iface_wl_output_api API - * See @ref iface_wl_output. - */ -/** - * @defgroup iface_wl_output The wl_output interface - * - * An output describes part of the compositor geometry. The - * compositor works in the 'compositor coordinate system' and an - * output corresponds to a rectangular area in that space that is - * actually visible. This typically corresponds to a monitor that - * displays part of the compositor space. This object is published - * as global during start up, or when a monitor is hotplugged. - */ -extern const struct wl_interface wl_output_interface; -/** - * @page page_iface_wl_region wl_region - * @section page_iface_wl_region_desc Description - * - * A region object describes an area. - * - * Region objects are used to describe the opaque and input - * regions of a surface. - * @section page_iface_wl_region_api API - * See @ref iface_wl_region. - */ -/** - * @defgroup iface_wl_region The wl_region interface - * - * A region object describes an area. - * - * Region objects are used to describe the opaque and input - * regions of a surface. - */ -extern const struct wl_interface wl_region_interface; -/** - * @page page_iface_wl_subcompositor wl_subcompositor - * @section page_iface_wl_subcompositor_desc Description - * - * The global interface exposing sub-surface compositing capabilities. - * A wl_surface, that has sub-surfaces associated, is called the - * parent surface. Sub-surfaces can be arbitrarily nested and create - * a tree of sub-surfaces. - * - * The root surface in a tree of sub-surfaces is the main - * surface. The main surface cannot be a sub-surface, because - * sub-surfaces must always have a parent. - * - * A main surface with its sub-surfaces forms a (compound) window. - * For window management purposes, this set of wl_surface objects is - * to be considered as a single window, and it should also behave as - * such. - * - * The aim of sub-surfaces is to offload some of the compositing work - * within a window from clients to the compositor. A prime example is - * a video player with decorations and video in separate wl_surface - * objects. This should allow the compositor to pass YUV video buffer - * processing to dedicated overlay hardware when possible. - * @section page_iface_wl_subcompositor_api API - * See @ref iface_wl_subcompositor. - */ -/** - * @defgroup iface_wl_subcompositor The wl_subcompositor interface - * - * The global interface exposing sub-surface compositing capabilities. - * A wl_surface, that has sub-surfaces associated, is called the - * parent surface. Sub-surfaces can be arbitrarily nested and create - * a tree of sub-surfaces. - * - * The root surface in a tree of sub-surfaces is the main - * surface. The main surface cannot be a sub-surface, because - * sub-surfaces must always have a parent. - * - * A main surface with its sub-surfaces forms a (compound) window. - * For window management purposes, this set of wl_surface objects is - * to be considered as a single window, and it should also behave as - * such. - * - * The aim of sub-surfaces is to offload some of the compositing work - * within a window from clients to the compositor. A prime example is - * a video player with decorations and video in separate wl_surface - * objects. This should allow the compositor to pass YUV video buffer - * processing to dedicated overlay hardware when possible. - */ -extern const struct wl_interface wl_subcompositor_interface; -/** - * @page page_iface_wl_subsurface wl_subsurface - * @section page_iface_wl_subsurface_desc Description - * - * An additional interface to a wl_surface object, which has been - * made a sub-surface. A sub-surface has one parent surface. A - * sub-surface's size and position are not limited to that of the parent. - * Particularly, a sub-surface is not automatically clipped to its - * parent's area. - * - * A sub-surface becomes mapped, when a non-NULL wl_buffer is applied - * and the parent surface is mapped. The order of which one happens - * first is irrelevant. A sub-surface is hidden if the parent becomes - * hidden, or if a NULL wl_buffer is applied. These rules apply - * recursively through the tree of surfaces. - * - * The behaviour of a wl_surface.commit request on a sub-surface - * depends on the sub-surface's mode. The possible modes are - * synchronized and desynchronized, see methods - * wl_subsurface.set_sync and wl_subsurface.set_desync. Synchronized - * mode caches the wl_surface state to be applied when the parent's - * state gets applied, and desynchronized mode applies the pending - * wl_surface state directly. A sub-surface is initially in the - * synchronized mode. - * - * Sub-surfaces have also other kind of state, which is managed by - * wl_subsurface requests, as opposed to wl_surface requests. This - * state includes the sub-surface position relative to the parent - * surface (wl_subsurface.set_position), and the stacking order of - * the parent and its sub-surfaces (wl_subsurface.place_above and - * .place_below). This state is applied when the parent surface's - * wl_surface state is applied, regardless of the sub-surface's mode. - * As the exception, set_sync and set_desync are effective immediately. - * - * The main surface can be thought to be always in desynchronized mode, - * since it does not have a parent in the sub-surfaces sense. - * - * Even if a sub-surface is in desynchronized mode, it will behave as - * in synchronized mode, if its parent surface behaves as in - * synchronized mode. This rule is applied recursively throughout the - * tree of surfaces. This means, that one can set a sub-surface into - * synchronized mode, and then assume that all its child and grand-child - * sub-surfaces are synchronized, too, without explicitly setting them. - * - * If the wl_surface associated with the wl_subsurface is destroyed, the - * wl_subsurface object becomes inert. Note, that destroying either object - * takes effect immediately. If you need to synchronize the removal - * of a sub-surface to the parent surface update, unmap the sub-surface - * first by attaching a NULL wl_buffer, update parent, and then destroy - * the sub-surface. - * - * If the parent wl_surface object is destroyed, the sub-surface is - * unmapped. - * @section page_iface_wl_subsurface_api API - * See @ref iface_wl_subsurface. - */ -/** - * @defgroup iface_wl_subsurface The wl_subsurface interface - * - * An additional interface to a wl_surface object, which has been - * made a sub-surface. A sub-surface has one parent surface. A - * sub-surface's size and position are not limited to that of the parent. - * Particularly, a sub-surface is not automatically clipped to its - * parent's area. - * - * A sub-surface becomes mapped, when a non-NULL wl_buffer is applied - * and the parent surface is mapped. The order of which one happens - * first is irrelevant. A sub-surface is hidden if the parent becomes - * hidden, or if a NULL wl_buffer is applied. These rules apply - * recursively through the tree of surfaces. - * - * The behaviour of a wl_surface.commit request on a sub-surface - * depends on the sub-surface's mode. The possible modes are - * synchronized and desynchronized, see methods - * wl_subsurface.set_sync and wl_subsurface.set_desync. Synchronized - * mode caches the wl_surface state to be applied when the parent's - * state gets applied, and desynchronized mode applies the pending - * wl_surface state directly. A sub-surface is initially in the - * synchronized mode. - * - * Sub-surfaces have also other kind of state, which is managed by - * wl_subsurface requests, as opposed to wl_surface requests. This - * state includes the sub-surface position relative to the parent - * surface (wl_subsurface.set_position), and the stacking order of - * the parent and its sub-surfaces (wl_subsurface.place_above and - * .place_below). This state is applied when the parent surface's - * wl_surface state is applied, regardless of the sub-surface's mode. - * As the exception, set_sync and set_desync are effective immediately. - * - * The main surface can be thought to be always in desynchronized mode, - * since it does not have a parent in the sub-surfaces sense. - * - * Even if a sub-surface is in desynchronized mode, it will behave as - * in synchronized mode, if its parent surface behaves as in - * synchronized mode. This rule is applied recursively throughout the - * tree of surfaces. This means, that one can set a sub-surface into - * synchronized mode, and then assume that all its child and grand-child - * sub-surfaces are synchronized, too, without explicitly setting them. - * - * If the wl_surface associated with the wl_subsurface is destroyed, the - * wl_subsurface object becomes inert. Note, that destroying either object - * takes effect immediately. If you need to synchronize the removal - * of a sub-surface to the parent surface update, unmap the sub-surface - * first by attaching a NULL wl_buffer, update parent, and then destroy - * the sub-surface. - * - * If the parent wl_surface object is destroyed, the sub-surface is - * unmapped. - */ -extern const struct wl_interface wl_subsurface_interface; - -#ifndef WL_DISPLAY_ERROR_ENUM -#define WL_DISPLAY_ERROR_ENUM -/** - * @ingroup iface_wl_display - * global error values - * - * These errors are global and can be emitted in response to any - * server request. - */ -enum wl_display_error { - /** - * server couldn't find object - */ - WL_DISPLAY_ERROR_INVALID_OBJECT = 0, - /** - * method doesn't exist on the specified interface - */ - WL_DISPLAY_ERROR_INVALID_METHOD = 1, - /** - * server is out of memory - */ - WL_DISPLAY_ERROR_NO_MEMORY = 2, -}; -#endif /* WL_DISPLAY_ERROR_ENUM */ - -/** - * @ingroup iface_wl_display - * @struct wl_display_listener - */ -struct wl_display_listener { - /** - * fatal error event - * - * The error event is sent out when a fatal (non-recoverable) - * error has occurred. The object_id argument is the object where - * the error occurred, most often in response to a request to that - * object. The code identifies the error and is defined by the - * object interface. As such, each interface defines its own set of - * error codes. The message is a brief description of the error, - * for (debugging) convenience. - * @param object_id object where the error occurred - * @param code error code - * @param message error description - */ - void (*error)(void *data, - struct wl_display *wl_display, - void *object_id, - uint32_t code, - const char *message); - /** - * acknowledge object ID deletion - * - * This event is used internally by the object ID management - * logic. When a client deletes an object, the server will send - * this event to acknowledge that it has seen the delete request. - * When the client receives this event, it will know that it can - * safely reuse the object ID. - * @param id deleted object ID - */ - void (*delete_id)(void *data, - struct wl_display *wl_display, - uint32_t id); -}; - -/** - * @ingroup iface_wl_display - */ -static inline int -wl_display_add_listener(struct wl_display *wl_display, - const struct wl_display_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_display, - (void (**)(void)) listener, data); -} - -#define WL_DISPLAY_SYNC 0 -#define WL_DISPLAY_GET_REGISTRY 1 - -/** - * @ingroup iface_wl_display - */ -#define WL_DISPLAY_ERROR_SINCE_VERSION 1 -/** - * @ingroup iface_wl_display - */ -#define WL_DISPLAY_DELETE_ID_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_display - */ -#define WL_DISPLAY_SYNC_SINCE_VERSION 1 -/** - * @ingroup iface_wl_display - */ -#define WL_DISPLAY_GET_REGISTRY_SINCE_VERSION 1 - -/** @ingroup iface_wl_display */ -static inline void -wl_display_set_user_data(struct wl_display *wl_display, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_display, user_data); -} - -/** @ingroup iface_wl_display */ -static inline void * -wl_display_get_user_data(struct wl_display *wl_display) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_display); -} - -static inline uint32_t -wl_display_get_version(struct wl_display *wl_display) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_display); -} - -/** - * @ingroup iface_wl_display - * - * The sync request asks the server to emit the 'done' event - * on the returned wl_callback object. Since requests are - * handled in-order and events are delivered in-order, this can - * be used as a barrier to ensure all previous requests and the - * resulting events have been handled. - * - * The object returned by this request will be destroyed by the - * compositor after the callback is fired and as such the client must not - * attempt to use it after that point. - * - * The callback_data passed in the callback is the event serial. - */ -static inline struct wl_callback * -wl_display_sync(struct wl_display *wl_display) -{ - struct wl_proxy *callback; - - callback = wl_proxy_marshal_constructor((struct wl_proxy *) wl_display, - WL_DISPLAY_SYNC, &wl_callback_interface, NULL); - - return (struct wl_callback *) callback; -} - -/** - * @ingroup iface_wl_display - * - * This request creates a registry object that allows the client - * to list and bind the global objects available from the - * compositor. - */ -static inline struct wl_registry * -wl_display_get_registry(struct wl_display *wl_display) -{ - struct wl_proxy *registry; - - registry = wl_proxy_marshal_constructor((struct wl_proxy *) wl_display, - WL_DISPLAY_GET_REGISTRY, &wl_registry_interface, NULL); - - return (struct wl_registry *) registry; -} - -/** - * @ingroup iface_wl_registry - * @struct wl_registry_listener - */ -struct wl_registry_listener { - /** - * announce global object - * - * Notify the client of global objects. - * - * The event notifies the client that a global object with the - * given name is now available, and it implements the given version - * of the given interface. - * @param name numeric name of the global object - * @param interface interface implemented by the object - * @param version interface version - */ - void (*global)(void *data, - struct wl_registry *wl_registry, - uint32_t name, - const char *interface, - uint32_t version); - /** - * announce removal of global object - * - * Notify the client of removed global objects. - * - * This event notifies the client that the global identified by - * name is no longer available. If the client bound to the global - * using the bind request, the client should now destroy that - * object. - * - * The object remains valid and requests to the object will be - * ignored until the client destroys it, to avoid races between the - * global going away and a client sending a request to it. - * @param name numeric name of the global object - */ - void (*global_remove)(void *data, - struct wl_registry *wl_registry, - uint32_t name); -}; - -/** - * @ingroup iface_wl_registry - */ -static inline int -wl_registry_add_listener(struct wl_registry *wl_registry, - const struct wl_registry_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_registry, - (void (**)(void)) listener, data); -} - -#define WL_REGISTRY_BIND 0 - -/** - * @ingroup iface_wl_registry - */ -#define WL_REGISTRY_GLOBAL_SINCE_VERSION 1 -/** - * @ingroup iface_wl_registry - */ -#define WL_REGISTRY_GLOBAL_REMOVE_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_registry - */ -#define WL_REGISTRY_BIND_SINCE_VERSION 1 - -/** @ingroup iface_wl_registry */ -static inline void -wl_registry_set_user_data(struct wl_registry *wl_registry, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_registry, user_data); -} - -/** @ingroup iface_wl_registry */ -static inline void * -wl_registry_get_user_data(struct wl_registry *wl_registry) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_registry); -} - -static inline uint32_t -wl_registry_get_version(struct wl_registry *wl_registry) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_registry); -} - -/** @ingroup iface_wl_registry */ -static inline void -wl_registry_destroy(struct wl_registry *wl_registry) -{ - wl_proxy_destroy((struct wl_proxy *) wl_registry); -} - -/** - * @ingroup iface_wl_registry - * - * Binds a new, client-created object to the server using the - * specified name as the identifier. - */ -static inline void * -wl_registry_bind(struct wl_registry *wl_registry, uint32_t name, const struct wl_interface *interface, uint32_t version) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor_versioned((struct wl_proxy *) wl_registry, - WL_REGISTRY_BIND, interface, version, name, interface->name, version, NULL); - - return (void *) id; -} - -/** - * @ingroup iface_wl_callback - * @struct wl_callback_listener - */ -struct wl_callback_listener { - /** - * done event - * - * Notify the client when the related request is done. - * @param callback_data request-specific data for the callback - */ - void (*done)(void *data, - struct wl_callback *wl_callback, - uint32_t callback_data); -}; - -/** - * @ingroup iface_wl_callback - */ -static inline int -wl_callback_add_listener(struct wl_callback *wl_callback, - const struct wl_callback_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_callback, - (void (**)(void)) listener, data); -} - -/** - * @ingroup iface_wl_callback - */ -#define WL_CALLBACK_DONE_SINCE_VERSION 1 - - -/** @ingroup iface_wl_callback */ -static inline void -wl_callback_set_user_data(struct wl_callback *wl_callback, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_callback, user_data); -} - -/** @ingroup iface_wl_callback */ -static inline void * -wl_callback_get_user_data(struct wl_callback *wl_callback) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_callback); -} - -static inline uint32_t -wl_callback_get_version(struct wl_callback *wl_callback) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_callback); -} - -/** @ingroup iface_wl_callback */ -static inline void -wl_callback_destroy(struct wl_callback *wl_callback) -{ - wl_proxy_destroy((struct wl_proxy *) wl_callback); -} - -#define WL_COMPOSITOR_CREATE_SURFACE 0 -#define WL_COMPOSITOR_CREATE_REGION 1 - - -/** - * @ingroup iface_wl_compositor - */ -#define WL_COMPOSITOR_CREATE_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_compositor - */ -#define WL_COMPOSITOR_CREATE_REGION_SINCE_VERSION 1 - -/** @ingroup iface_wl_compositor */ -static inline void -wl_compositor_set_user_data(struct wl_compositor *wl_compositor, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_compositor, user_data); -} - -/** @ingroup iface_wl_compositor */ -static inline void * -wl_compositor_get_user_data(struct wl_compositor *wl_compositor) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_compositor); -} - -static inline uint32_t -wl_compositor_get_version(struct wl_compositor *wl_compositor) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_compositor); -} - -/** @ingroup iface_wl_compositor */ -static inline void -wl_compositor_destroy(struct wl_compositor *wl_compositor) -{ - wl_proxy_destroy((struct wl_proxy *) wl_compositor); -} - -/** - * @ingroup iface_wl_compositor - * - * Ask the compositor to create a new surface. - */ -static inline struct wl_surface * -wl_compositor_create_surface(struct wl_compositor *wl_compositor) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_compositor, - WL_COMPOSITOR_CREATE_SURFACE, &wl_surface_interface, NULL); - - return (struct wl_surface *) id; -} - -/** - * @ingroup iface_wl_compositor - * - * Ask the compositor to create a new region. - */ -static inline struct wl_region * -wl_compositor_create_region(struct wl_compositor *wl_compositor) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_compositor, - WL_COMPOSITOR_CREATE_REGION, &wl_region_interface, NULL); - - return (struct wl_region *) id; -} - -#define WL_SHM_POOL_CREATE_BUFFER 0 -#define WL_SHM_POOL_DESTROY 1 -#define WL_SHM_POOL_RESIZE 2 - - -/** - * @ingroup iface_wl_shm_pool - */ -#define WL_SHM_POOL_CREATE_BUFFER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shm_pool - */ -#define WL_SHM_POOL_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shm_pool - */ -#define WL_SHM_POOL_RESIZE_SINCE_VERSION 1 - -/** @ingroup iface_wl_shm_pool */ -static inline void -wl_shm_pool_set_user_data(struct wl_shm_pool *wl_shm_pool, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_shm_pool, user_data); -} - -/** @ingroup iface_wl_shm_pool */ -static inline void * -wl_shm_pool_get_user_data(struct wl_shm_pool *wl_shm_pool) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_shm_pool); -} - -static inline uint32_t -wl_shm_pool_get_version(struct wl_shm_pool *wl_shm_pool) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_shm_pool); -} - -/** - * @ingroup iface_wl_shm_pool - * - * Create a wl_buffer object from the pool. - * - * The buffer is created offset bytes into the pool and has - * width and height as specified. The stride argument specifies - * the number of bytes from the beginning of one row to the beginning - * of the next. The format is the pixel format of the buffer and - * must be one of those advertised through the wl_shm.format event. - * - * A buffer will keep a reference to the pool it was created from - * so it is valid to destroy the pool immediately after creating - * a buffer from it. - */ -static inline struct wl_buffer * -wl_shm_pool_create_buffer(struct wl_shm_pool *wl_shm_pool, int32_t offset, int32_t width, int32_t height, int32_t stride, uint32_t format) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_shm_pool, - WL_SHM_POOL_CREATE_BUFFER, &wl_buffer_interface, NULL, offset, width, height, stride, format); - - return (struct wl_buffer *) id; -} - -/** - * @ingroup iface_wl_shm_pool - * - * Destroy the shared memory pool. - * - * The mmapped memory will be released when all - * buffers that have been created from this pool - * are gone. - */ -static inline void -wl_shm_pool_destroy(struct wl_shm_pool *wl_shm_pool) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shm_pool, - WL_SHM_POOL_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wl_shm_pool); -} - -/** - * @ingroup iface_wl_shm_pool - * - * This request will cause the server to remap the backing memory - * for the pool from the file descriptor passed when the pool was - * created, but using the new size. This request can only be - * used to make the pool bigger. - */ -static inline void -wl_shm_pool_resize(struct wl_shm_pool *wl_shm_pool, int32_t size) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shm_pool, - WL_SHM_POOL_RESIZE, size); -} - -#ifndef WL_SHM_ERROR_ENUM -#define WL_SHM_ERROR_ENUM -/** - * @ingroup iface_wl_shm - * wl_shm error values - * - * These errors can be emitted in response to wl_shm requests. - */ -enum wl_shm_error { - /** - * buffer format is not known - */ - WL_SHM_ERROR_INVALID_FORMAT = 0, - /** - * invalid size or stride during pool or buffer creation - */ - WL_SHM_ERROR_INVALID_STRIDE = 1, - /** - * mmapping the file descriptor failed - */ - WL_SHM_ERROR_INVALID_FD = 2, -}; -#endif /* WL_SHM_ERROR_ENUM */ - -#ifndef WL_SHM_FORMAT_ENUM -#define WL_SHM_FORMAT_ENUM -/** - * @ingroup iface_wl_shm - * pixel formats - * - * This describes the memory layout of an individual pixel. - * - * All renderers should support argb8888 and xrgb8888 but any other - * formats are optional and may not be supported by the particular - * renderer in use. - * - * The drm format codes match the macros defined in drm_fourcc.h. - * The formats actually supported by the compositor will be - * reported by the format event. - */ -enum wl_shm_format { - /** - * 32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian - */ - WL_SHM_FORMAT_ARGB8888 = 0, - /** - * 32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian - */ - WL_SHM_FORMAT_XRGB8888 = 1, - /** - * 8-bit color index format, [7:0] C - */ - WL_SHM_FORMAT_C8 = 0x20203843, - /** - * 8-bit RGB format, [7:0] R:G:B 3:3:2 - */ - WL_SHM_FORMAT_RGB332 = 0x38424752, - /** - * 8-bit BGR format, [7:0] B:G:R 2:3:3 - */ - WL_SHM_FORMAT_BGR233 = 0x38524742, - /** - * 16-bit xRGB format, [15:0] x:R:G:B 4:4:4:4 little endian - */ - WL_SHM_FORMAT_XRGB4444 = 0x32315258, - /** - * 16-bit xBGR format, [15:0] x:B:G:R 4:4:4:4 little endian - */ - WL_SHM_FORMAT_XBGR4444 = 0x32314258, - /** - * 16-bit RGBx format, [15:0] R:G:B:x 4:4:4:4 little endian - */ - WL_SHM_FORMAT_RGBX4444 = 0x32315852, - /** - * 16-bit BGRx format, [15:0] B:G:R:x 4:4:4:4 little endian - */ - WL_SHM_FORMAT_BGRX4444 = 0x32315842, - /** - * 16-bit ARGB format, [15:0] A:R:G:B 4:4:4:4 little endian - */ - WL_SHM_FORMAT_ARGB4444 = 0x32315241, - /** - * 16-bit ABGR format, [15:0] A:B:G:R 4:4:4:4 little endian - */ - WL_SHM_FORMAT_ABGR4444 = 0x32314241, - /** - * 16-bit RBGA format, [15:0] R:G:B:A 4:4:4:4 little endian - */ - WL_SHM_FORMAT_RGBA4444 = 0x32314152, - /** - * 16-bit BGRA format, [15:0] B:G:R:A 4:4:4:4 little endian - */ - WL_SHM_FORMAT_BGRA4444 = 0x32314142, - /** - * 16-bit xRGB format, [15:0] x:R:G:B 1:5:5:5 little endian - */ - WL_SHM_FORMAT_XRGB1555 = 0x35315258, - /** - * 16-bit xBGR 1555 format, [15:0] x:B:G:R 1:5:5:5 little endian - */ - WL_SHM_FORMAT_XBGR1555 = 0x35314258, - /** - * 16-bit RGBx 5551 format, [15:0] R:G:B:x 5:5:5:1 little endian - */ - WL_SHM_FORMAT_RGBX5551 = 0x35315852, - /** - * 16-bit BGRx 5551 format, [15:0] B:G:R:x 5:5:5:1 little endian - */ - WL_SHM_FORMAT_BGRX5551 = 0x35315842, - /** - * 16-bit ARGB 1555 format, [15:0] A:R:G:B 1:5:5:5 little endian - */ - WL_SHM_FORMAT_ARGB1555 = 0x35315241, - /** - * 16-bit ABGR 1555 format, [15:0] A:B:G:R 1:5:5:5 little endian - */ - WL_SHM_FORMAT_ABGR1555 = 0x35314241, - /** - * 16-bit RGBA 5551 format, [15:0] R:G:B:A 5:5:5:1 little endian - */ - WL_SHM_FORMAT_RGBA5551 = 0x35314152, - /** - * 16-bit BGRA 5551 format, [15:0] B:G:R:A 5:5:5:1 little endian - */ - WL_SHM_FORMAT_BGRA5551 = 0x35314142, - /** - * 16-bit RGB 565 format, [15:0] R:G:B 5:6:5 little endian - */ - WL_SHM_FORMAT_RGB565 = 0x36314752, - /** - * 16-bit BGR 565 format, [15:0] B:G:R 5:6:5 little endian - */ - WL_SHM_FORMAT_BGR565 = 0x36314742, - /** - * 24-bit RGB format, [23:0] R:G:B little endian - */ - WL_SHM_FORMAT_RGB888 = 0x34324752, - /** - * 24-bit BGR format, [23:0] B:G:R little endian - */ - WL_SHM_FORMAT_BGR888 = 0x34324742, - /** - * 32-bit xBGR format, [31:0] x:B:G:R 8:8:8:8 little endian - */ - WL_SHM_FORMAT_XBGR8888 = 0x34324258, - /** - * 32-bit RGBx format, [31:0] R:G:B:x 8:8:8:8 little endian - */ - WL_SHM_FORMAT_RGBX8888 = 0x34325852, - /** - * 32-bit BGRx format, [31:0] B:G:R:x 8:8:8:8 little endian - */ - WL_SHM_FORMAT_BGRX8888 = 0x34325842, - /** - * 32-bit ABGR format, [31:0] A:B:G:R 8:8:8:8 little endian - */ - WL_SHM_FORMAT_ABGR8888 = 0x34324241, - /** - * 32-bit RGBA format, [31:0] R:G:B:A 8:8:8:8 little endian - */ - WL_SHM_FORMAT_RGBA8888 = 0x34324152, - /** - * 32-bit BGRA format, [31:0] B:G:R:A 8:8:8:8 little endian - */ - WL_SHM_FORMAT_BGRA8888 = 0x34324142, - /** - * 32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian - */ - WL_SHM_FORMAT_XRGB2101010 = 0x30335258, - /** - * 32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian - */ - WL_SHM_FORMAT_XBGR2101010 = 0x30334258, - /** - * 32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian - */ - WL_SHM_FORMAT_RGBX1010102 = 0x30335852, - /** - * 32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian - */ - WL_SHM_FORMAT_BGRX1010102 = 0x30335842, - /** - * 32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian - */ - WL_SHM_FORMAT_ARGB2101010 = 0x30335241, - /** - * 32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian - */ - WL_SHM_FORMAT_ABGR2101010 = 0x30334241, - /** - * 32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian - */ - WL_SHM_FORMAT_RGBA1010102 = 0x30334152, - /** - * 32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian - */ - WL_SHM_FORMAT_BGRA1010102 = 0x30334142, - /** - * packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian - */ - WL_SHM_FORMAT_YUYV = 0x56595559, - /** - * packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian - */ - WL_SHM_FORMAT_YVYU = 0x55595659, - /** - * packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian - */ - WL_SHM_FORMAT_UYVY = 0x59565955, - /** - * packed YCbCr format, [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian - */ - WL_SHM_FORMAT_VYUY = 0x59555956, - /** - * packed AYCbCr format, [31:0] A:Y:Cb:Cr 8:8:8:8 little endian - */ - WL_SHM_FORMAT_AYUV = 0x56555941, - /** - * 2 plane YCbCr Cr:Cb format, 2x2 subsampled Cr:Cb plane - */ - WL_SHM_FORMAT_NV12 = 0x3231564e, - /** - * 2 plane YCbCr Cb:Cr format, 2x2 subsampled Cb:Cr plane - */ - WL_SHM_FORMAT_NV21 = 0x3132564e, - /** - * 2 plane YCbCr Cr:Cb format, 2x1 subsampled Cr:Cb plane - */ - WL_SHM_FORMAT_NV16 = 0x3631564e, - /** - * 2 plane YCbCr Cb:Cr format, 2x1 subsampled Cb:Cr plane - */ - WL_SHM_FORMAT_NV61 = 0x3136564e, - /** - * 3 plane YCbCr format, 4x4 subsampled Cb (1) and Cr (2) planes - */ - WL_SHM_FORMAT_YUV410 = 0x39565559, - /** - * 3 plane YCbCr format, 4x4 subsampled Cr (1) and Cb (2) planes - */ - WL_SHM_FORMAT_YVU410 = 0x39555659, - /** - * 3 plane YCbCr format, 4x1 subsampled Cb (1) and Cr (2) planes - */ - WL_SHM_FORMAT_YUV411 = 0x31315559, - /** - * 3 plane YCbCr format, 4x1 subsampled Cr (1) and Cb (2) planes - */ - WL_SHM_FORMAT_YVU411 = 0x31315659, - /** - * 3 plane YCbCr format, 2x2 subsampled Cb (1) and Cr (2) planes - */ - WL_SHM_FORMAT_YUV420 = 0x32315559, - /** - * 3 plane YCbCr format, 2x2 subsampled Cr (1) and Cb (2) planes - */ - WL_SHM_FORMAT_YVU420 = 0x32315659, - /** - * 3 plane YCbCr format, 2x1 subsampled Cb (1) and Cr (2) planes - */ - WL_SHM_FORMAT_YUV422 = 0x36315559, - /** - * 3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes - */ - WL_SHM_FORMAT_YVU422 = 0x36315659, - /** - * 3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes - */ - WL_SHM_FORMAT_YUV444 = 0x34325559, - /** - * 3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes - */ - WL_SHM_FORMAT_YVU444 = 0x34325659, -}; -#endif /* WL_SHM_FORMAT_ENUM */ - -/** - * @ingroup iface_wl_shm - * @struct wl_shm_listener - */ -struct wl_shm_listener { - /** - * pixel format description - * - * Informs the client about a valid pixel format that can be used - * for buffers. Known formats include argb8888 and xrgb8888. - * @param format buffer pixel format - */ - void (*format)(void *data, - struct wl_shm *wl_shm, - uint32_t format); -}; - -/** - * @ingroup iface_wl_shm - */ -static inline int -wl_shm_add_listener(struct wl_shm *wl_shm, - const struct wl_shm_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_shm, - (void (**)(void)) listener, data); -} - -#define WL_SHM_CREATE_POOL 0 - -/** - * @ingroup iface_wl_shm - */ -#define WL_SHM_FORMAT_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_shm - */ -#define WL_SHM_CREATE_POOL_SINCE_VERSION 1 - -/** @ingroup iface_wl_shm */ -static inline void -wl_shm_set_user_data(struct wl_shm *wl_shm, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_shm, user_data); -} - -/** @ingroup iface_wl_shm */ -static inline void * -wl_shm_get_user_data(struct wl_shm *wl_shm) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_shm); -} - -static inline uint32_t -wl_shm_get_version(struct wl_shm *wl_shm) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_shm); -} - -/** @ingroup iface_wl_shm */ -static inline void -wl_shm_destroy(struct wl_shm *wl_shm) -{ - wl_proxy_destroy((struct wl_proxy *) wl_shm); -} - -/** - * @ingroup iface_wl_shm - * - * Create a new wl_shm_pool object. - * - * The pool can be used to create shared memory based buffer - * objects. The server will mmap size bytes of the passed file - * descriptor, to use as backing memory for the pool. - */ -static inline struct wl_shm_pool * -wl_shm_create_pool(struct wl_shm *wl_shm, int32_t fd, int32_t size) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_shm, - WL_SHM_CREATE_POOL, &wl_shm_pool_interface, NULL, fd, size); - - return (struct wl_shm_pool *) id; -} - -/** - * @ingroup iface_wl_buffer - * @struct wl_buffer_listener - */ -struct wl_buffer_listener { - /** - * compositor releases buffer - * - * Sent when this wl_buffer is no longer used by the compositor. - * The client is now free to reuse or destroy this buffer and its - * backing storage. - * - * If a client receives a release event before the frame callback - * requested in the same wl_surface.commit that attaches this - * wl_buffer to a surface, then the client is immediately free to - * reuse the buffer and its backing storage, and does not need a - * second buffer for the next surface content update. Typically - * this is possible, when the compositor maintains a copy of the - * wl_surface contents, e.g. as a GL texture. This is an important - * optimization for GL(ES) compositors with wl_shm clients. - */ - void (*release)(void *data, - struct wl_buffer *wl_buffer); -}; - -/** - * @ingroup iface_wl_buffer - */ -static inline int -wl_buffer_add_listener(struct wl_buffer *wl_buffer, - const struct wl_buffer_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_buffer, - (void (**)(void)) listener, data); -} - -#define WL_BUFFER_DESTROY 0 - -/** - * @ingroup iface_wl_buffer - */ -#define WL_BUFFER_RELEASE_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_buffer - */ -#define WL_BUFFER_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_wl_buffer */ -static inline void -wl_buffer_set_user_data(struct wl_buffer *wl_buffer, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_buffer, user_data); -} - -/** @ingroup iface_wl_buffer */ -static inline void * -wl_buffer_get_user_data(struct wl_buffer *wl_buffer) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_buffer); -} - -static inline uint32_t -wl_buffer_get_version(struct wl_buffer *wl_buffer) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_buffer); -} - -/** - * @ingroup iface_wl_buffer - * - * Destroy a buffer. If and how you need to release the backing - * storage is defined by the buffer factory interface. - * - * For possible side-effects to a surface, see wl_surface.attach. - */ -static inline void -wl_buffer_destroy(struct wl_buffer *wl_buffer) -{ - wl_proxy_marshal((struct wl_proxy *) wl_buffer, - WL_BUFFER_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wl_buffer); -} - -#ifndef WL_DATA_OFFER_ERROR_ENUM -#define WL_DATA_OFFER_ERROR_ENUM -enum wl_data_offer_error { - /** - * finish request was called untimely - */ - WL_DATA_OFFER_ERROR_INVALID_FINISH = 0, - /** - * action mask contains invalid values - */ - WL_DATA_OFFER_ERROR_INVALID_ACTION_MASK = 1, - /** - * action argument has an invalid value - */ - WL_DATA_OFFER_ERROR_INVALID_ACTION = 2, - /** - * offer doesn't accept this request - */ - WL_DATA_OFFER_ERROR_INVALID_OFFER = 3, -}; -#endif /* WL_DATA_OFFER_ERROR_ENUM */ - -/** - * @ingroup iface_wl_data_offer - * @struct wl_data_offer_listener - */ -struct wl_data_offer_listener { - /** - * advertise offered mime type - * - * Sent immediately after creating the wl_data_offer object. One - * event per offered mime type. - * @param mime_type offered mime type - */ - void (*offer)(void *data, - struct wl_data_offer *wl_data_offer, - const char *mime_type); - /** - * notify the source-side available actions - * - * This event indicates the actions offered by the data source. - * It will be sent right after wl_data_device.enter, or anytime the - * source side changes its offered actions through - * wl_data_source.set_actions. - * @param source_actions actions offered by the data source - * @since 3 - */ - void (*source_actions)(void *data, - struct wl_data_offer *wl_data_offer, - uint32_t source_actions); - /** - * notify the selected action - * - * This event indicates the action selected by the compositor - * after matching the source/destination side actions. Only one - * action (or none) will be offered here. - * - * This event can be emitted multiple times during the - * drag-and-drop operation in response to destination side action - * changes through wl_data_offer.set_actions. - * - * This event will no longer be emitted after wl_data_device.drop - * happened on the drag-and-drop destination, the client must honor - * the last action received, or the last preferred one set through - * wl_data_offer.set_actions when handling an "ask" action. - * - * Compositors may also change the selected action on the fly, - * mainly in response to keyboard modifier changes during the - * drag-and-drop operation. - * - * The most recent action received is always the valid one. Prior - * to receiving wl_data_device.drop, the chosen action may change - * (e.g. due to keyboard modifiers being pressed). At the time of - * receiving wl_data_device.drop the drag-and-drop destination must - * honor the last action received. - * - * Action changes may still happen after wl_data_device.drop, - * especially on "ask" actions, where the drag-and-drop destination - * may choose another action afterwards. Action changes happening - * at this stage are always the result of inter-client negotiation, - * the compositor shall no longer be able to induce a different - * action. - * - * Upon "ask" actions, it is expected that the drag-and-drop - * destination may potentially choose a different action and/or - * mime type, based on wl_data_offer.source_actions and finally - * chosen by the user (e.g. popping up a menu with the available - * options). The final wl_data_offer.set_actions and - * wl_data_offer.accept requests must happen before the call to - * wl_data_offer.finish. - * @param dnd_action action selected by the compositor - * @since 3 - */ - void (*action)(void *data, - struct wl_data_offer *wl_data_offer, - uint32_t dnd_action); -}; - -/** - * @ingroup iface_wl_data_offer - */ -static inline int -wl_data_offer_add_listener(struct wl_data_offer *wl_data_offer, - const struct wl_data_offer_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_data_offer, - (void (**)(void)) listener, data); -} - -#define WL_DATA_OFFER_ACCEPT 0 -#define WL_DATA_OFFER_RECEIVE 1 -#define WL_DATA_OFFER_DESTROY 2 -#define WL_DATA_OFFER_FINISH 3 -#define WL_DATA_OFFER_SET_ACTIONS 4 - -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_OFFER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_SOURCE_ACTIONS_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_ACTION_SINCE_VERSION 3 - -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_ACCEPT_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_RECEIVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_FINISH_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_SET_ACTIONS_SINCE_VERSION 3 - -/** @ingroup iface_wl_data_offer */ -static inline void -wl_data_offer_set_user_data(struct wl_data_offer *wl_data_offer, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_data_offer, user_data); -} - -/** @ingroup iface_wl_data_offer */ -static inline void * -wl_data_offer_get_user_data(struct wl_data_offer *wl_data_offer) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_data_offer); -} - -static inline uint32_t -wl_data_offer_get_version(struct wl_data_offer *wl_data_offer) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_data_offer); -} - -/** - * @ingroup iface_wl_data_offer - * - * Indicate that the client can accept the given mime type, or - * NULL for not accepted. - * - * For objects of version 2 or older, this request is used by the - * client to give feedback whether the client can receive the given - * mime type, or NULL if none is accepted; the feedback does not - * determine whether the drag-and-drop operation succeeds or not. - * - * For objects of version 3 or newer, this request determines the - * final result of the drag-and-drop operation. If the end result - * is that no mime types were accepted, the drag-and-drop operation - * will be cancelled and the corresponding drag source will receive - * wl_data_source.cancelled. Clients may still use this event in - * conjunction with wl_data_source.action for feedback. - */ -static inline void -wl_data_offer_accept(struct wl_data_offer *wl_data_offer, uint32_t serial, const char *mime_type) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_offer, - WL_DATA_OFFER_ACCEPT, serial, mime_type); -} - -/** - * @ingroup iface_wl_data_offer - * - * 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, - * both before and after wl_data_device.drop. Drag-and-drop destination - * clients may preemptively fetch data or examine it more closely to - * determine acceptance. - */ -static inline void -wl_data_offer_receive(struct wl_data_offer *wl_data_offer, const char *mime_type, int32_t fd) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_offer, - WL_DATA_OFFER_RECEIVE, mime_type, fd); -} - -/** - * @ingroup iface_wl_data_offer - * - * Destroy the data offer. - */ -static inline void -wl_data_offer_destroy(struct wl_data_offer *wl_data_offer) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_offer, - WL_DATA_OFFER_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wl_data_offer); -} - -/** - * @ingroup iface_wl_data_offer - * - * Notifies the compositor that the drag destination successfully - * finished the drag-and-drop operation. - * - * Upon receiving this request, the compositor will emit - * wl_data_source.dnd_finished on the drag source client. - * - * It is a client error to perform other requests than - * wl_data_offer.destroy after this one. It is also an error to perform - * this request after a NULL mime type has been set in - * wl_data_offer.accept or no action was received through - * wl_data_offer.action. - */ -static inline void -wl_data_offer_finish(struct wl_data_offer *wl_data_offer) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_offer, - WL_DATA_OFFER_FINISH); -} - -/** - * @ingroup iface_wl_data_offer - * - * Sets the actions that the destination side client supports for - * this operation. This request may trigger the emission of - * wl_data_source.action and wl_data_offer.action events if the compositor - * needs to change the selected action. - * - * This request can be called multiple times throughout the - * drag-and-drop operation, typically in response to wl_data_device.enter - * or wl_data_device.motion events. - * - * This request determines the final result of the drag-and-drop - * operation. If the end result is that no action is accepted, - * the drag source will receive wl_drag_source.cancelled. - * - * The dnd_actions argument must contain only values expressed in the - * wl_data_device_manager.dnd_actions enum, and the preferred_action - * argument must only contain one of those values set, otherwise it - * will result in a protocol error. - * - * While managing an "ask" action, the destination drag-and-drop client - * may perform further wl_data_offer.receive requests, and is expected - * to perform one last wl_data_offer.set_actions request with a preferred - * action other than "ask" (and optionally wl_data_offer.accept) before - * requesting wl_data_offer.finish, in order to convey the action selected - * by the user. If the preferred action is not in the - * wl_data_offer.source_actions mask, an error will be raised. - * - * If the "ask" action is dismissed (e.g. user cancellation), the client - * is expected to perform wl_data_offer.destroy right away. - * - * This request can only be made on drag-and-drop offers, a protocol error - * will be raised otherwise. - */ -static inline void -wl_data_offer_set_actions(struct wl_data_offer *wl_data_offer, uint32_t dnd_actions, uint32_t preferred_action) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_offer, - WL_DATA_OFFER_SET_ACTIONS, dnd_actions, preferred_action); -} - -#ifndef WL_DATA_SOURCE_ERROR_ENUM -#define WL_DATA_SOURCE_ERROR_ENUM -enum wl_data_source_error { - /** - * action mask contains invalid values - */ - WL_DATA_SOURCE_ERROR_INVALID_ACTION_MASK = 0, - /** - * source doesn't accept this request - */ - WL_DATA_SOURCE_ERROR_INVALID_SOURCE = 1, -}; -#endif /* WL_DATA_SOURCE_ERROR_ENUM */ - -/** - * @ingroup iface_wl_data_source - * @struct wl_data_source_listener - */ -struct wl_data_source_listener { - /** - * a target accepts an offered mime type - * - * Sent when a target accepts pointer_focus or motion events. If - * a target does not accept any of the offered types, type is NULL. - * - * Used for feedback during drag-and-drop. - * @param mime_type mime type accepted by the target - */ - void (*target)(void *data, - struct wl_data_source *wl_data_source, - const char *mime_type); - /** - * send the data - * - * Request for data from the client. Send the data as the - * specified mime type over the passed file descriptor, then close - * it. - * @param mime_type mime type for the data - * @param fd file descriptor for the data - */ - void (*send)(void *data, - struct wl_data_source *wl_data_source, - const char *mime_type, - int32_t fd); - /** - * selection was cancelled - * - * This data source is no longer valid. There are several reasons - * why this could happen: - * - * - The data source has been replaced by another data source. - - * The drag-and-drop operation was performed, but the drop - * destination did not accept any of the mime types offered through - * wl_data_source.target. - The drag-and-drop operation was - * performed, but the drop destination did not select any of the - * actions present in the mask offered through - * wl_data_source.action. - The drag-and-drop operation was - * performed but didn't happen over a surface. - The compositor - * cancelled the drag-and-drop operation (e.g. compositor dependent - * timeouts to avoid stale drag-and-drop transfers). - * - * The client should clean up and destroy this data source. - * - * For objects of version 2 or older, wl_data_source.cancelled will - * only be emitted if the data source was replaced by another data - * source. - */ - void (*cancelled)(void *data, - struct wl_data_source *wl_data_source); - /** - * the drag-and-drop operation physically finished - * - * The user performed the drop action. This event does not - * indicate acceptance, wl_data_source.cancelled may still be - * emitted afterwards if the drop destination does not accept any - * mime type. - * - * However, this event might however not be received if the - * compositor cancelled the drag-and-drop operation before this - * event could happen. - * - * Note that the data_source may still be used in the future and - * should not be destroyed here. - * @since 3 - */ - void (*dnd_drop_performed)(void *data, - struct wl_data_source *wl_data_source); - /** - * the drag-and-drop operation concluded - * - * The drop destination finished interoperating with this data - * source, so the client is now free to destroy this data source - * and free all associated data. - * - * If the action used to perform the operation was "move", the - * source can now delete the transferred data. - * @since 3 - */ - void (*dnd_finished)(void *data, - struct wl_data_source *wl_data_source); - /** - * notify the selected action - * - * This event indicates the action selected by the compositor - * after matching the source/destination side actions. Only one - * action (or none) will be offered here. - * - * This event can be emitted multiple times during the - * drag-and-drop operation, mainly in response to destination side - * changes through wl_data_offer.set_actions, and as the data - * device enters/leaves surfaces. - * - * It is only possible to receive this event after - * wl_data_source.dnd_drop_performed if the drag-and-drop operation - * ended in an "ask" action, in which case the final - * wl_data_source.action event will happen immediately before - * wl_data_source.dnd_finished. - * - * Compositors may also change the selected action on the fly, - * mainly in response to keyboard modifier changes during the - * drag-and-drop operation. - * - * The most recent action received is always the valid one. The - * chosen action may change alongside negotiation (e.g. an "ask" - * action can turn into a "move" operation), so the effects of the - * final action must always be applied in - * wl_data_offer.dnd_finished. - * - * Clients can trigger cursor surface changes from this point, so - * they reflect the current action. - * @param dnd_action action selected by the compositor - * @since 3 - */ - void (*action)(void *data, - struct wl_data_source *wl_data_source, - uint32_t dnd_action); -}; - -/** - * @ingroup iface_wl_data_source - */ -static inline int -wl_data_source_add_listener(struct wl_data_source *wl_data_source, - const struct wl_data_source_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_data_source, - (void (**)(void)) listener, data); -} - -#define WL_DATA_SOURCE_OFFER 0 -#define WL_DATA_SOURCE_DESTROY 1 -#define WL_DATA_SOURCE_SET_ACTIONS 2 - -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_TARGET_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_SEND_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_CANCELLED_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_DND_DROP_PERFORMED_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_DND_FINISHED_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_ACTION_SINCE_VERSION 3 - -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_OFFER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_SET_ACTIONS_SINCE_VERSION 3 - -/** @ingroup iface_wl_data_source */ -static inline void -wl_data_source_set_user_data(struct wl_data_source *wl_data_source, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_data_source, user_data); -} - -/** @ingroup iface_wl_data_source */ -static inline void * -wl_data_source_get_user_data(struct wl_data_source *wl_data_source) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_data_source); -} - -static inline uint32_t -wl_data_source_get_version(struct wl_data_source *wl_data_source) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_data_source); -} - -/** - * @ingroup iface_wl_data_source - * - * This request adds a mime type to the set of mime types - * advertised to targets. Can be called several times to offer - * multiple types. - */ -static inline void -wl_data_source_offer(struct wl_data_source *wl_data_source, const char *mime_type) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_source, - WL_DATA_SOURCE_OFFER, mime_type); -} - -/** - * @ingroup iface_wl_data_source - * - * Destroy the data source. - */ -static inline void -wl_data_source_destroy(struct wl_data_source *wl_data_source) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_source, - WL_DATA_SOURCE_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wl_data_source); -} - -/** - * @ingroup iface_wl_data_source - * - * Sets the actions that the source side client supports for this - * operation. This request may trigger wl_data_source.action and - * wl_data_offer.action events if the compositor needs to change the - * selected action. - * - * The dnd_actions argument must contain only values expressed in the - * wl_data_device_manager.dnd_actions enum, otherwise it will result - * in a protocol error. - * - * This request must be made once only, and 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 will raise a protocol error. - */ -static inline void -wl_data_source_set_actions(struct wl_data_source *wl_data_source, uint32_t dnd_actions) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_source, - WL_DATA_SOURCE_SET_ACTIONS, dnd_actions); -} - -#ifndef WL_DATA_DEVICE_ERROR_ENUM -#define WL_DATA_DEVICE_ERROR_ENUM -enum wl_data_device_error { - /** - * given wl_surface has another role - */ - WL_DATA_DEVICE_ERROR_ROLE = 0, -}; -#endif /* WL_DATA_DEVICE_ERROR_ENUM */ - -/** - * @ingroup iface_wl_data_device - * @struct wl_data_device_listener - */ -struct wl_data_device_listener { - /** - * introduce a new wl_data_offer - * - * The data_offer event introduces a new wl_data_offer object, - * which will subsequently be used in either the data_device.enter - * event (for drag-and-drop) or the data_device.selection event - * (for selections). Immediately following the - * data_device_data_offer event, the new data_offer object will - * send out data_offer.offer events to describe the mime types it - * offers. - * @param id the new data_offer object - */ - void (*data_offer)(void *data, - struct wl_data_device *wl_data_device, - struct wl_data_offer *id); - /** - * initiate drag-and-drop session - * - * This event is sent when an active drag-and-drop pointer enters - * a surface owned by the client. The position of the pointer at - * enter time is provided by the x and y arguments, in - * surface-local coordinates. - * @param serial serial number of the enter event - * @param surface client surface entered - * @param x surface-local x coordinate - * @param y surface-local y coordinate - * @param id source data_offer object - */ - void (*enter)(void *data, - struct wl_data_device *wl_data_device, - uint32_t serial, - struct wl_surface *surface, - wl_fixed_t x, - wl_fixed_t y, - struct wl_data_offer *id); - /** - * end drag-and-drop session - * - * This event is sent when the drag-and-drop pointer leaves the - * surface and the session ends. The client must destroy the - * wl_data_offer introduced at enter time at this point. - */ - void (*leave)(void *data, - struct wl_data_device *wl_data_device); - /** - * drag-and-drop session motion - * - * This event is sent when the drag-and-drop pointer moves within - * the currently focused surface. The new position of the pointer - * is provided by the x and y arguments, in surface-local - * coordinates. - * @param time timestamp with millisecond granularity - * @param x surface-local x coordinate - * @param y surface-local y coordinate - */ - void (*motion)(void *data, - struct wl_data_device *wl_data_device, - uint32_t time, - wl_fixed_t x, - wl_fixed_t y); - /** - * end drag-and-drop session successfully - * - * The event is sent when a drag-and-drop operation is ended - * because the implicit grab is removed. - * - * The drag-and-drop destination is expected to honor the last - * action received through wl_data_offer.action, if the resulting - * action is "copy" or "move", the destination can still perform - * wl_data_offer.receive requests, and is expected to end all - * transfers with a wl_data_offer.finish request. - * - * If the resulting action is "ask", the action will not be - * considered final. The drag-and-drop destination is expected to - * perform one last wl_data_offer.set_actions request, or - * wl_data_offer.destroy in order to cancel the operation. - */ - void (*drop)(void *data, - struct wl_data_device *wl_data_device); - /** - * advertise new selection - * - * The selection event is sent out to notify the client of a new - * wl_data_offer for the selection for this device. The - * data_device.data_offer and the data_offer.offer events are sent - * out immediately before this event to introduce the data offer - * object. The selection event is sent to a client immediately - * before receiving keyboard focus and when a new selection is set - * while the client has keyboard focus. The data_offer is valid - * until a new data_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. - * @param id selection data_offer object - */ - void (*selection)(void *data, - struct wl_data_device *wl_data_device, - struct wl_data_offer *id); -}; - -/** - * @ingroup iface_wl_data_device - */ -static inline int -wl_data_device_add_listener(struct wl_data_device *wl_data_device, - const struct wl_data_device_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_data_device, - (void (**)(void)) listener, data); -} - -#define WL_DATA_DEVICE_START_DRAG 0 -#define WL_DATA_DEVICE_SET_SELECTION 1 -#define WL_DATA_DEVICE_RELEASE 2 - -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_DATA_OFFER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_LEAVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_MOTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_DROP_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_SELECTION_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_START_DRAG_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_SET_SELECTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_RELEASE_SINCE_VERSION 2 - -/** @ingroup iface_wl_data_device */ -static inline void -wl_data_device_set_user_data(struct wl_data_device *wl_data_device, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_data_device, user_data); -} - -/** @ingroup iface_wl_data_device */ -static inline void * -wl_data_device_get_user_data(struct wl_data_device *wl_data_device) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_data_device); -} - -static inline uint32_t -wl_data_device_get_version(struct wl_data_device *wl_data_device) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_data_device); -} - -/** @ingroup iface_wl_data_device */ -static inline void -wl_data_device_destroy(struct wl_data_device *wl_data_device) -{ - wl_proxy_destroy((struct wl_proxy *) wl_data_device); -} - -/** - * @ingroup iface_wl_data_device - * - * This request asks the compositor to start a drag-and-drop - * operation on behalf of the client. - * - * The source argument is the data source that provides the data - * for the eventual data transfer. If source is NULL, enter, leave - * and motion events are sent only to the client that initiated the - * drag and the client is expected to handle the data passing - * internally. - * - * The origin surface is the surface where the drag originates and - * the client must have an active implicit grab that matches the - * serial. - * - * The icon surface is an optional (can be NULL) surface that - * provides an icon to be moved around with the cursor. Initially, - * the top-left corner of the icon surface is placed at the cursor - * hotspot, but subsequent wl_surface.attach request can move the - * relative position. Attach requests must be confirmed with - * wl_surface.commit as usual. The icon surface is given the role of - * a drag-and-drop icon. If the icon surface already has another role, - * it raises a protocol error. - * - * The current and pending input regions of the icon wl_surface are - * cleared, and wl_surface.set_input_region is ignored until the - * wl_surface is no longer used as the icon surface. When the use - * as an icon ends, the current and pending input regions become - * undefined, and the wl_surface is unmapped. - */ -static inline void -wl_data_device_start_drag(struct wl_data_device *wl_data_device, struct wl_data_source *source, struct wl_surface *origin, struct wl_surface *icon, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_device, - WL_DATA_DEVICE_START_DRAG, source, origin, icon, serial); -} - -/** - * @ingroup iface_wl_data_device - * - * This request asks the compositor to set the selection - * to the data from the source on behalf of the client. - * - * To unset the selection, set the source to NULL. - */ -static inline void -wl_data_device_set_selection(struct wl_data_device *wl_data_device, struct wl_data_source *source, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_device, - WL_DATA_DEVICE_SET_SELECTION, source, serial); -} - -/** - * @ingroup iface_wl_data_device - * - * This request destroys the data device. - */ -static inline void -wl_data_device_release(struct wl_data_device *wl_data_device) -{ - wl_proxy_marshal((struct wl_proxy *) wl_data_device, - WL_DATA_DEVICE_RELEASE); - - wl_proxy_destroy((struct wl_proxy *) wl_data_device); -} - -#ifndef WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM -#define WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM -/** - * @ingroup iface_wl_data_device_manager - * drag and drop actions - * - * This is a bitmask of the available/preferred actions in a - * drag-and-drop operation. - * - * In the compositor, the selected action is a result of matching the - * actions offered by the source and destination sides. "action" events - * with a "none" action will be sent to both source and destination if - * there is no match. All further checks will effectively happen on - * (source actions ∩ destination actions). - * - * In addition, compositors may also pick different actions in - * reaction to key modifiers being pressed. One common design that - * is used in major toolkits (and the behavior recommended for - * compositors) is: - * - * - If no modifiers are pressed, the first match (in bit order) - * will be used. - * - Pressing Shift selects "move", if enabled in the mask. - * - Pressing Control selects "copy", if enabled in the mask. - * - * Behavior beyond that is considered implementation-dependent. - * Compositors may for example bind other modifiers (like Alt/Meta) - * or drags initiated with other buttons than BTN_LEFT to specific - * actions (e.g. "ask"). - */ -enum wl_data_device_manager_dnd_action { - /** - * no action - */ - WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE = 0, - /** - * copy action - */ - WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY = 1, - /** - * move action - */ - WL_DATA_DEVICE_MANAGER_DND_ACTION_MOVE = 2, - /** - * ask action - */ - WL_DATA_DEVICE_MANAGER_DND_ACTION_ASK = 4, -}; -#endif /* WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM */ - -#define WL_DATA_DEVICE_MANAGER_CREATE_DATA_SOURCE 0 -#define WL_DATA_DEVICE_MANAGER_GET_DATA_DEVICE 1 - - -/** - * @ingroup iface_wl_data_device_manager - */ -#define WL_DATA_DEVICE_MANAGER_CREATE_DATA_SOURCE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device_manager - */ -#define WL_DATA_DEVICE_MANAGER_GET_DATA_DEVICE_SINCE_VERSION 1 - -/** @ingroup iface_wl_data_device_manager */ -static inline void -wl_data_device_manager_set_user_data(struct wl_data_device_manager *wl_data_device_manager, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_data_device_manager, user_data); -} - -/** @ingroup iface_wl_data_device_manager */ -static inline void * -wl_data_device_manager_get_user_data(struct wl_data_device_manager *wl_data_device_manager) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_data_device_manager); -} - -static inline uint32_t -wl_data_device_manager_get_version(struct wl_data_device_manager *wl_data_device_manager) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_data_device_manager); -} - -/** @ingroup iface_wl_data_device_manager */ -static inline void -wl_data_device_manager_destroy(struct wl_data_device_manager *wl_data_device_manager) -{ - wl_proxy_destroy((struct wl_proxy *) wl_data_device_manager); -} - -/** - * @ingroup iface_wl_data_device_manager - * - * Create a new data source. - */ -static inline struct wl_data_source * -wl_data_device_manager_create_data_source(struct wl_data_device_manager *wl_data_device_manager) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_data_device_manager, - WL_DATA_DEVICE_MANAGER_CREATE_DATA_SOURCE, &wl_data_source_interface, NULL); - - return (struct wl_data_source *) id; -} - -/** - * @ingroup iface_wl_data_device_manager - * - * Create a new data device for a given seat. - */ -static inline struct wl_data_device * -wl_data_device_manager_get_data_device(struct wl_data_device_manager *wl_data_device_manager, struct wl_seat *seat) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_data_device_manager, - WL_DATA_DEVICE_MANAGER_GET_DATA_DEVICE, &wl_data_device_interface, NULL, seat); - - return (struct wl_data_device *) id; -} - -#ifndef WL_SHELL_ERROR_ENUM -#define WL_SHELL_ERROR_ENUM -enum wl_shell_error { - /** - * given wl_surface has another role - */ - WL_SHELL_ERROR_ROLE = 0, -}; -#endif /* WL_SHELL_ERROR_ENUM */ - -#define WL_SHELL_GET_SHELL_SURFACE 0 - - -/** - * @ingroup iface_wl_shell - */ -#define WL_SHELL_GET_SHELL_SURFACE_SINCE_VERSION 1 - -/** @ingroup iface_wl_shell */ -static inline void -wl_shell_set_user_data(struct wl_shell *wl_shell, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_shell, user_data); -} - -/** @ingroup iface_wl_shell */ -static inline void * -wl_shell_get_user_data(struct wl_shell *wl_shell) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_shell); -} - -static inline uint32_t -wl_shell_get_version(struct wl_shell *wl_shell) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_shell); -} - -/** @ingroup iface_wl_shell */ -static inline void -wl_shell_destroy(struct wl_shell *wl_shell) -{ - wl_proxy_destroy((struct wl_proxy *) wl_shell); -} - -/** - * @ingroup iface_wl_shell - * - * Create a shell surface for an existing surface. This gives - * the wl_surface the role of a shell surface. If the wl_surface - * already has another role, it raises a protocol error. - * - * Only one shell surface can be associated with a given surface. - */ -static inline struct wl_shell_surface * -wl_shell_get_shell_surface(struct wl_shell *wl_shell, struct wl_surface *surface) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_shell, - WL_SHELL_GET_SHELL_SURFACE, &wl_shell_surface_interface, NULL, surface); - - return (struct wl_shell_surface *) id; -} - -#ifndef WL_SHELL_SURFACE_RESIZE_ENUM -#define WL_SHELL_SURFACE_RESIZE_ENUM -/** - * @ingroup iface_wl_shell_surface - * edge values for resizing - * - * These values are used to indicate which edge of a surface - * is being dragged in a resize operation. The server may - * use this information to adapt its behavior, e.g. choose - * an appropriate cursor image. - */ -enum wl_shell_surface_resize { - /** - * no edge - */ - WL_SHELL_SURFACE_RESIZE_NONE = 0, - /** - * top edge - */ - WL_SHELL_SURFACE_RESIZE_TOP = 1, - /** - * bottom edge - */ - WL_SHELL_SURFACE_RESIZE_BOTTOM = 2, - /** - * left edge - */ - WL_SHELL_SURFACE_RESIZE_LEFT = 4, - /** - * top and left edges - */ - WL_SHELL_SURFACE_RESIZE_TOP_LEFT = 5, - /** - * bottom and left edges - */ - WL_SHELL_SURFACE_RESIZE_BOTTOM_LEFT = 6, - /** - * right edge - */ - WL_SHELL_SURFACE_RESIZE_RIGHT = 8, - /** - * top and right edges - */ - WL_SHELL_SURFACE_RESIZE_TOP_RIGHT = 9, - /** - * bottom and right edges - */ - WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT = 10, -}; -#endif /* WL_SHELL_SURFACE_RESIZE_ENUM */ - -#ifndef WL_SHELL_SURFACE_TRANSIENT_ENUM -#define WL_SHELL_SURFACE_TRANSIENT_ENUM -/** - * @ingroup iface_wl_shell_surface - * details of transient behaviour - * - * These flags specify details of the expected behaviour - * of transient surfaces. Used in the set_transient request. - */ -enum wl_shell_surface_transient { - /** - * do not set keyboard focus - */ - WL_SHELL_SURFACE_TRANSIENT_INACTIVE = 0x1, -}; -#endif /* WL_SHELL_SURFACE_TRANSIENT_ENUM */ - -#ifndef WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM -#define WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM -/** - * @ingroup iface_wl_shell_surface - * different method to set the surface fullscreen - * - * 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. - */ -enum wl_shell_surface_fullscreen_method { - /** - * no preference, apply default policy - */ - WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT = 0, - /** - * scale, preserve the surface's aspect ratio and center on output - */ - WL_SHELL_SURFACE_FULLSCREEN_METHOD_SCALE = 1, - /** - * switch output mode to the smallest mode that can fit the surface, add black borders to compensate size mismatch - */ - WL_SHELL_SURFACE_FULLSCREEN_METHOD_DRIVER = 2, - /** - * no upscaling, center on output and add black borders to compensate size mismatch - */ - WL_SHELL_SURFACE_FULLSCREEN_METHOD_FILL = 3, -}; -#endif /* WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM */ - -/** - * @ingroup iface_wl_shell_surface - * @struct wl_shell_surface_listener - */ -struct wl_shell_surface_listener { - /** - * ping client - * - * Ping a client to check if it is receiving events and sending - * requests. A client is expected to reply with a pong request. - * @param serial serial number of the ping - */ - void (*ping)(void *data, - struct wl_shell_surface *wl_shell_surface, - uint32_t serial); - /** - * suggest resize - * - * The configure event asks the client to resize its surface. - * - * The size is a hint, in the sense that the client is free to - * ignore it if it doesn't resize, pick a smaller size (to satisfy - * aspect ratio or resize in steps of NxM pixels). - * - * The edges parameter provides a hint about how the surface was - * resized. The client may use this information to decide how to - * adjust its content to the new size (e.g. a scrolling area might - * adjust its content position to leave the viewable content - * unmoved). - * - * The client is free to dismiss all but the last configure event - * it received. - * - * The width and height arguments specify the size of the window in - * surface-local coordinates. - * @param edges how the surface was resized - * @param width new width of the surface - * @param height new height of the surface - */ - void (*configure)(void *data, - struct wl_shell_surface *wl_shell_surface, - uint32_t edges, - int32_t width, - int32_t height); - /** - * popup interaction is done - * - * The popup_done event is sent out when a popup grab is broken, - * that is, when the user clicks a surface that doesn't belong to - * the client owning the popup surface. - */ - void (*popup_done)(void *data, - struct wl_shell_surface *wl_shell_surface); -}; - -/** - * @ingroup iface_wl_shell_surface - */ -static inline int -wl_shell_surface_add_listener(struct wl_shell_surface *wl_shell_surface, - const struct wl_shell_surface_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_shell_surface, - (void (**)(void)) listener, data); -} - -#define WL_SHELL_SURFACE_PONG 0 -#define WL_SHELL_SURFACE_MOVE 1 -#define WL_SHELL_SURFACE_RESIZE 2 -#define WL_SHELL_SURFACE_SET_TOPLEVEL 3 -#define WL_SHELL_SURFACE_SET_TRANSIENT 4 -#define WL_SHELL_SURFACE_SET_FULLSCREEN 5 -#define WL_SHELL_SURFACE_SET_POPUP 6 -#define WL_SHELL_SURFACE_SET_MAXIMIZED 7 -#define WL_SHELL_SURFACE_SET_TITLE 8 -#define WL_SHELL_SURFACE_SET_CLASS 9 - -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_PING_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_POPUP_DONE_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_PONG_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_MOVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_RESIZE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_TOPLEVEL_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_TRANSIENT_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_POPUP_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_TITLE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_CLASS_SINCE_VERSION 1 - -/** @ingroup iface_wl_shell_surface */ -static inline void -wl_shell_surface_set_user_data(struct wl_shell_surface *wl_shell_surface, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_shell_surface, user_data); -} - -/** @ingroup iface_wl_shell_surface */ -static inline void * -wl_shell_surface_get_user_data(struct wl_shell_surface *wl_shell_surface) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_shell_surface); -} - -static inline uint32_t -wl_shell_surface_get_version(struct wl_shell_surface *wl_shell_surface) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_shell_surface); -} - -/** @ingroup iface_wl_shell_surface */ -static inline void -wl_shell_surface_destroy(struct wl_shell_surface *wl_shell_surface) -{ - wl_proxy_destroy((struct wl_proxy *) wl_shell_surface); -} - -/** - * @ingroup iface_wl_shell_surface - * - * A client must respond to a ping event with a pong request or - * the client may be deemed unresponsive. - */ -static inline void -wl_shell_surface_pong(struct wl_shell_surface *wl_shell_surface, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shell_surface, - WL_SHELL_SURFACE_PONG, serial); -} - -/** - * @ingroup iface_wl_shell_surface - * - * Start a pointer-driven move of the surface. - * - * This request must be used in response to a button press event. - * The server may ignore move requests depending on the state of - * the surface (e.g. fullscreen or maximized). - */ -static inline void -wl_shell_surface_move(struct wl_shell_surface *wl_shell_surface, struct wl_seat *seat, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shell_surface, - WL_SHELL_SURFACE_MOVE, seat, serial); -} - -/** - * @ingroup iface_wl_shell_surface - * - * Start a pointer-driven resizing of the surface. - * - * This request must be used in response to a button press event. - * The server may ignore resize requests depending on the state of - * the surface (e.g. fullscreen or maximized). - */ -static inline void -wl_shell_surface_resize(struct wl_shell_surface *wl_shell_surface, struct wl_seat *seat, uint32_t serial, uint32_t edges) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shell_surface, - WL_SHELL_SURFACE_RESIZE, seat, serial, edges); -} - -/** - * @ingroup iface_wl_shell_surface - * - * Map the surface as a toplevel surface. - * - * A toplevel surface is not fullscreen, maximized or transient. - */ -static inline void -wl_shell_surface_set_toplevel(struct wl_shell_surface *wl_shell_surface) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shell_surface, - WL_SHELL_SURFACE_SET_TOPLEVEL); -} - -/** - * @ingroup iface_wl_shell_surface - * - * Map the surface relative to an existing surface. - * - * The x and y arguments specify the location of the upper left - * corner of the surface relative to the upper left corner of the - * parent surface, in surface-local coordinates. - * - * The flags argument controls details of the transient behaviour. - */ -static inline void -wl_shell_surface_set_transient(struct wl_shell_surface *wl_shell_surface, struct wl_surface *parent, int32_t x, int32_t y, uint32_t flags) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shell_surface, - WL_SHELL_SURFACE_SET_TRANSIENT, parent, x, y, flags); -} - -/** - * @ingroup iface_wl_shell_surface - * - * Map the surface as a fullscreen surface. - * - * If an output parameter is given then the surface will be made - * fullscreen on that output. If the client does not specify the - * output then the compositor will apply its policy - usually - * choosing the output on which the surface has the biggest surface - * area. - * - * The client may specify a method to resolve a size conflict - * between the output size and the surface size - this is provided - * through the method parameter. - * - * The framerate parameter is used only when the method is set - * to "driver", to indicate the preferred framerate. A value of 0 - * indicates that the client does not care about framerate. The - * framerate is specified in mHz, that is framerate of 60000 is 60Hz. - * - * A method of "scale" or "driver" implies a scaling operation of - * the surface, either via a direct scaling operation or a change of - * the output mode. This will override any kind of output scaling, so - * that mapping a surface with a buffer size equal to the mode can - * fill the screen independent of buffer_scale. - * - * A method of "fill" means we don't scale up the buffer, however - * any output scale is applied. This means that you may run into - * an edge case where the application maps a buffer with the same - * size of the output mode but buffer_scale 1 (thus making a - * surface larger than the output). In this case it is allowed to - * downscale the results to fit the screen. - * - * The compositor must reply to this request with a configure event - * with the dimensions for the output on which the surface will - * be made fullscreen. - */ -static inline void -wl_shell_surface_set_fullscreen(struct wl_shell_surface *wl_shell_surface, uint32_t method, uint32_t framerate, struct wl_output *output) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shell_surface, - WL_SHELL_SURFACE_SET_FULLSCREEN, method, framerate, output); -} - -/** - * @ingroup iface_wl_shell_surface - * - * Map the surface as a popup. - * - * A popup surface is a transient surface with an added pointer - * grab. - * - * An existing implicit grab will be changed to owner-events mode, - * and the popup grab will continue after the implicit grab ends - * (i.e. releasing the mouse button does not cause the popup to - * be unmapped). - * - * The popup grab continues until the window is destroyed or a - * mouse button is pressed in any other client's window. A click - * in any of the client's surfaces is reported as normal, however, - * clicks in other clients' surfaces will be discarded and trigger - * the callback. - * - * The x and y arguments specify the location of the upper left - * corner of the surface relative to the upper left corner of the - * parent surface, in surface-local coordinates. - */ -static inline void -wl_shell_surface_set_popup(struct wl_shell_surface *wl_shell_surface, struct wl_seat *seat, uint32_t serial, struct wl_surface *parent, int32_t x, int32_t y, uint32_t flags) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shell_surface, - WL_SHELL_SURFACE_SET_POPUP, seat, serial, parent, x, y, flags); -} - -/** - * @ingroup iface_wl_shell_surface - * - * Map the surface as a maximized surface. - * - * If an output parameter is given then the surface will be - * maximized on that output. If the client does not specify the - * output then the compositor will apply its policy - usually - * choosing the output on which the surface has the biggest surface - * area. - * - * The compositor will reply with a configure event telling - * the expected new surface size. The operation is completed - * on the next buffer attach to this surface. - * - * A maximized surface typically fills the entire output it is - * bound to, except for desktop elements such as panels. This is - * the main difference between a maximized shell surface and a - * fullscreen shell surface. - * - * The details depend on the compositor implementation. - */ -static inline void -wl_shell_surface_set_maximized(struct wl_shell_surface *wl_shell_surface, struct wl_output *output) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shell_surface, - WL_SHELL_SURFACE_SET_MAXIMIZED, output); -} - -/** - * @ingroup iface_wl_shell_surface - * - * Set a short title for the surface. - * - * This string may be used to identify the surface in a task bar, - * window list, or other user interface elements provided by the - * compositor. - * - * The string must be encoded in UTF-8. - */ -static inline void -wl_shell_surface_set_title(struct wl_shell_surface *wl_shell_surface, const char *title) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shell_surface, - WL_SHELL_SURFACE_SET_TITLE, title); -} - -/** - * @ingroup iface_wl_shell_surface - * - * Set a class for the surface. - * - * The surface class identifies the general class of applications - * to which the surface belongs. A common convention is to use the - * file name (or the full path if it is a non-standard location) of - * the application's .desktop file as the class. - */ -static inline void -wl_shell_surface_set_class(struct wl_shell_surface *wl_shell_surface, const char *class_) -{ - wl_proxy_marshal((struct wl_proxy *) wl_shell_surface, - WL_SHELL_SURFACE_SET_CLASS, class_); -} - -#ifndef WL_SURFACE_ERROR_ENUM -#define WL_SURFACE_ERROR_ENUM -/** - * @ingroup iface_wl_surface - * wl_surface error values - * - * These errors can be emitted in response to wl_surface requests. - */ -enum wl_surface_error { - /** - * buffer scale value is invalid - */ - WL_SURFACE_ERROR_INVALID_SCALE = 0, - /** - * buffer transform value is invalid - */ - WL_SURFACE_ERROR_INVALID_TRANSFORM = 1, -}; -#endif /* WL_SURFACE_ERROR_ENUM */ - -/** - * @ingroup iface_wl_surface - * @struct wl_surface_listener - */ -struct wl_surface_listener { - /** - * surface enters an output - * - * This is emitted whenever a surface's creation, movement, or - * resizing results in some part of it being within the scanout - * region of an output. - * - * Note that a surface may be overlapping with zero or more - * outputs. - * @param output output entered by the surface - */ - void (*enter)(void *data, - struct wl_surface *wl_surface, - struct wl_output *output); - /** - * surface leaves an output - * - * This is emitted whenever a surface's creation, movement, or - * resizing results in it no longer having any part of it within - * the scanout region of an output. - * @param output output left by the surface - */ - void (*leave)(void *data, - struct wl_surface *wl_surface, - struct wl_output *output); -}; - -/** - * @ingroup iface_wl_surface - */ -static inline int -wl_surface_add_listener(struct wl_surface *wl_surface, - const struct wl_surface_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_surface, - (void (**)(void)) listener, data); -} - -#define WL_SURFACE_DESTROY 0 -#define WL_SURFACE_ATTACH 1 -#define WL_SURFACE_DAMAGE 2 -#define WL_SURFACE_FRAME 3 -#define WL_SURFACE_SET_OPAQUE_REGION 4 -#define WL_SURFACE_SET_INPUT_REGION 5 -#define WL_SURFACE_COMMIT 6 -#define WL_SURFACE_SET_BUFFER_TRANSFORM 7 -#define WL_SURFACE_SET_BUFFER_SCALE 8 -#define WL_SURFACE_DAMAGE_BUFFER 9 - -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_LEAVE_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_ATTACH_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_DAMAGE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_FRAME_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_SET_OPAQUE_REGION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_SET_INPUT_REGION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_COMMIT_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_SET_BUFFER_TRANSFORM_SINCE_VERSION 2 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_SET_BUFFER_SCALE_SINCE_VERSION 3 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION 4 - -/** @ingroup iface_wl_surface */ -static inline void -wl_surface_set_user_data(struct wl_surface *wl_surface, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_surface, user_data); -} - -/** @ingroup iface_wl_surface */ -static inline void * -wl_surface_get_user_data(struct wl_surface *wl_surface) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_surface); -} - -static inline uint32_t -wl_surface_get_version(struct wl_surface *wl_surface) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_surface); -} - -/** - * @ingroup iface_wl_surface - * - * Deletes the surface and invalidates its object ID. - */ -static inline void -wl_surface_destroy(struct wl_surface *wl_surface) -{ - wl_proxy_marshal((struct wl_proxy *) wl_surface, - WL_SURFACE_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wl_surface); -} - -/** - * @ingroup iface_wl_surface - * - * Set a buffer as the content of this surface. - * - * The new size of the surface is calculated based on the buffer - * size transformed by the inverse buffer_transform and the - * inverse buffer_scale. This means that the supplied buffer - * must be an integer multiple of the buffer_scale. - * - * The x and y arguments specify the location of the new pending - * buffer's upper left corner, relative to the current buffer's upper - * left corner, in surface-local coordinates. In other words, the - * x and y, combined with the new surface size define in which - * directions the surface's size changes. - * - * Surface contents are double-buffered state, see wl_surface.commit. - * - * The initial surface contents are void; there is no content. - * wl_surface.attach assigns the given wl_buffer as the pending - * wl_buffer. wl_surface.commit makes the pending wl_buffer the new - * surface contents, and the size of the surface becomes the size - * calculated from the wl_buffer, as described above. After commit, - * there is no pending buffer until the next attach. - * - * Committing a pending wl_buffer allows the compositor to read the - * pixels in the wl_buffer. The compositor may access the pixels at - * any time after the wl_surface.commit request. When the compositor - * will not access the pixels anymore, it will send the - * wl_buffer.release event. Only after receiving wl_buffer.release, - * the client may reuse the wl_buffer. A wl_buffer that has been - * attached and then replaced by another attach instead of committed - * will not receive a release event, and is not used by the - * compositor. - * - * Destroying the wl_buffer after wl_buffer.release does not change - * the surface contents. However, if the client destroys the - * wl_buffer before receiving the wl_buffer.release event, the surface - * contents become undefined immediately. - * - * If wl_surface.attach is sent with a NULL wl_buffer, the - * following wl_surface.commit will remove the surface content. - */ -static inline void -wl_surface_attach(struct wl_surface *wl_surface, struct wl_buffer *buffer, int32_t x, int32_t y) -{ - wl_proxy_marshal((struct wl_proxy *) wl_surface, - WL_SURFACE_ATTACH, buffer, x, y); -} - -/** - * @ingroup iface_wl_surface - * - * This request is used to describe the regions where the pending - * buffer is different from the current surface contents, and where - * the surface therefore needs to be repainted. The compositor - * ignores the parts of the damage that fall outside of the surface. - * - * Damage is double-buffered state, see wl_surface.commit. - * - * The damage rectangle is specified in surface-local coordinates, - * where x and y specify the upper left corner of the damage rectangle. - * - * The initial value for pending damage is empty: no damage. - * wl_surface.damage adds pending damage: the new pending damage - * is the union of old pending damage and the given rectangle. - * - * wl_surface.commit assigns pending damage as the current damage, - * and clears pending damage. The server will clear the current - * damage as it repaints the surface. - * - * Alternatively, damage can be posted with wl_surface.damage_buffer - * which uses buffer coordinates instead of surface coordinates, - * and is probably the preferred and intuitive way of doing this. - */ -static inline void -wl_surface_damage(struct wl_surface *wl_surface, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) wl_surface, - WL_SURFACE_DAMAGE, x, y, width, height); -} - -/** - * @ingroup iface_wl_surface - * - * Request a notification when it is a good time to start drawing a new - * frame, by creating a frame callback. This is useful for throttling - * redrawing operations, and driving animations. - * - * When a client is animating on a wl_surface, it can use the 'frame' - * request to get notified when it is a good time to draw and commit the - * next frame of animation. If the client commits an update earlier than - * that, it is likely that some updates will not make it to the display, - * and the client is wasting resources by drawing too often. - * - * The frame request will take effect on the next wl_surface.commit. - * The notification will only be posted for one frame unless - * requested again. For a wl_surface, the notifications are posted in - * the order the frame requests were committed. - * - * The server must send the notifications so that a client - * will not send excessive updates, while still allowing - * the highest possible update rate for clients that wait for the reply - * before drawing again. The server should give some time for the client - * to draw and commit after sending the frame callback events to let it - * hit the next output refresh. - * - * A server should avoid signaling the frame callbacks if the - * surface is not visible in any way, e.g. the surface is off-screen, - * or completely obscured by other opaque surfaces. - * - * The object returned by this request will be destroyed by the - * compositor after the callback is fired and as such the client must not - * attempt to use it after that point. - * - * The callback_data passed in the callback is the current time, in - * milliseconds, with an undefined base. - */ -static inline struct wl_callback * -wl_surface_frame(struct wl_surface *wl_surface) -{ - struct wl_proxy *callback; - - callback = wl_proxy_marshal_constructor((struct wl_proxy *) wl_surface, - WL_SURFACE_FRAME, &wl_callback_interface, NULL); - - return (struct wl_callback *) callback; -} - -/** - * @ingroup iface_wl_surface - * - * This request sets the region of the surface that contains - * opaque content. - * - * The opaque region is an optimization hint for the compositor - * that lets it optimize the redrawing of content behind opaque - * regions. Setting an opaque region is not required for correct - * behaviour, but marking transparent content as opaque will result - * in repaint artifacts. - * - * The opaque region is specified in surface-local coordinates. - * - * The compositor ignores the parts of the opaque region that fall - * outside of the surface. - * - * Opaque region is double-buffered state, see wl_surface.commit. - * - * wl_surface.set_opaque_region changes the pending opaque region. - * wl_surface.commit copies the pending region to the current region. - * Otherwise, the pending and current regions are never changed. - * - * The initial value for an opaque region is empty. Setting the pending - * opaque region has copy semantics, and the wl_region object can be - * destroyed immediately. A NULL wl_region causes the pending opaque - * region to be set to empty. - */ -static inline void -wl_surface_set_opaque_region(struct wl_surface *wl_surface, struct wl_region *region) -{ - wl_proxy_marshal((struct wl_proxy *) wl_surface, - WL_SURFACE_SET_OPAQUE_REGION, region); -} - -/** - * @ingroup iface_wl_surface - * - * This request sets the region of the surface that can receive - * pointer and touch events. - * - * Input events happening outside of this region will try the next - * surface in the server surface stack. The compositor ignores the - * parts of the input region that fall outside of the surface. - * - * The input region is specified in surface-local coordinates. - * - * Input region is double-buffered state, see wl_surface.commit. - * - * wl_surface.set_input_region changes the pending input region. - * wl_surface.commit copies the pending region to the current region. - * Otherwise the pending and current regions are never changed, - * except cursor and icon surfaces are special cases, see - * wl_pointer.set_cursor and wl_data_device.start_drag. - * - * The initial value for an input region is infinite. That means the - * whole surface will accept input. Setting the pending input region - * has copy semantics, and the wl_region object can be destroyed - * immediately. A NULL wl_region causes the input region to be set - * to infinite. - */ -static inline void -wl_surface_set_input_region(struct wl_surface *wl_surface, struct wl_region *region) -{ - wl_proxy_marshal((struct wl_proxy *) wl_surface, - WL_SURFACE_SET_INPUT_REGION, region); -} - -/** - * @ingroup iface_wl_surface - * - * Surface state (input, opaque, and damage regions, attached buffers, - * etc.) is double-buffered. Protocol requests modify the pending state, - * as opposed to the current state in use by the compositor. 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. - * - * On commit, a pending wl_buffer is applied first, and all other state - * second. This means that all coordinates in double-buffered state are - * relative to the new wl_buffer coming into use, except for - * wl_surface.attach itself. If there is no pending wl_buffer, the - * coordinates are relative to the current surface contents. - * - * All requests that need a commit to become effective are documented - * to affect double-buffered state. - * - * Other interfaces may add further double-buffered surface state. - */ -static inline void -wl_surface_commit(struct wl_surface *wl_surface) -{ - wl_proxy_marshal((struct wl_proxy *) wl_surface, - WL_SURFACE_COMMIT); -} - -/** - * @ingroup iface_wl_surface - * - * This request sets an optional transformation on how the compositor - * interprets the contents of the buffer attached to the surface. The - * accepted values for the transform parameter are the values for - * wl_output.transform. - * - * Buffer transform is double-buffered state, see wl_surface.commit. - * - * A newly created surface has its buffer transformation set to normal. - * - * wl_surface.set_buffer_transform changes the pending buffer - * transformation. wl_surface.commit copies the pending buffer - * transformation to the current one. Otherwise, the pending and current - * values are never changed. - * - * The purpose of this request is to allow clients to render content - * according to the output transform, thus permitting the compositor to - * use certain optimizations even if the display is rotated. Using - * hardware overlays and scanning out a client buffer for fullscreen - * surfaces are examples of such optimizations. Those optimizations are - * highly dependent on the compositor implementation, so the use of this - * request should be considered on a case-by-case basis. - * - * Note that if the transform value includes 90 or 270 degree rotation, - * the width of the buffer will become the surface height and the height - * of the buffer will become the surface width. - * - * If transform is not one of the values from the - * wl_output.transform enum the invalid_transform protocol error - * is raised. - */ -static inline void -wl_surface_set_buffer_transform(struct wl_surface *wl_surface, int32_t transform) -{ - wl_proxy_marshal((struct wl_proxy *) wl_surface, - WL_SURFACE_SET_BUFFER_TRANSFORM, transform); -} - -/** - * @ingroup iface_wl_surface - * - * This request sets an optional scaling factor on how the compositor - * interprets the contents of the buffer attached to the window. - * - * Buffer scale is double-buffered state, see wl_surface.commit. - * - * A newly created surface has its buffer scale set to 1. - * - * wl_surface.set_buffer_scale changes the pending buffer scale. - * wl_surface.commit copies the pending buffer scale to the current one. - * Otherwise, the pending and current values are never changed. - * - * The purpose of this request is to allow clients to supply higher - * resolution buffer data for use on high resolution outputs. It is - * intended that you pick the same buffer scale as the scale of the - * output that the surface is displayed on. This means the compositor - * can avoid scaling when rendering the surface on that output. - * - * Note that if the scale is larger than 1, then you have to attach - * a buffer that is larger (by a factor of scale in each dimension) - * than the desired surface size. - * - * If scale is not positive the invalid_scale protocol error is - * raised. - */ -static inline void -wl_surface_set_buffer_scale(struct wl_surface *wl_surface, int32_t scale) -{ - wl_proxy_marshal((struct wl_proxy *) wl_surface, - WL_SURFACE_SET_BUFFER_SCALE, scale); -} - -/** - * @ingroup iface_wl_surface - * - * This request is used to describe the regions where the pending - * buffer is different from the current surface contents, and where - * the surface therefore needs to be repainted. The compositor - * ignores the parts of the damage that fall outside of the surface. - * - * Damage is double-buffered state, see wl_surface.commit. - * - * The damage rectangle is specified in buffer coordinates, - * where x and y specify the upper left corner of the damage rectangle. - * - * The initial value for pending damage is empty: no damage. - * wl_surface.damage_buffer adds pending damage: the new pending - * damage is the union of old pending damage and the given rectangle. - * - * wl_surface.commit assigns pending damage as the current damage, - * and clears pending damage. The server will clear the current - * damage as it repaints the surface. - * - * This request differs from wl_surface.damage in only one way - it - * takes damage in buffer coordinates instead of surface-local - * coordinates. While this generally is more intuitive than surface - * coordinates, it is especially desirable when using wp_viewport - * or when a drawing library (like EGL) is unaware of buffer scale - * and buffer transform. - * - * Note: Because buffer transformation changes and damage requests may - * be interleaved in the protocol stream, it is impossible to determine - * the actual mapping between surface and buffer damage until - * wl_surface.commit time. Therefore, compositors wishing to take both - * kinds of damage into account will have to accumulate damage from the - * two requests separately and only transform from one to the other - * after receiving the wl_surface.commit. - */ -static inline void -wl_surface_damage_buffer(struct wl_surface *wl_surface, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) wl_surface, - WL_SURFACE_DAMAGE_BUFFER, x, y, width, height); -} - -#ifndef WL_SEAT_CAPABILITY_ENUM -#define WL_SEAT_CAPABILITY_ENUM -/** - * @ingroup iface_wl_seat - * seat capability bitmask - * - * This is a bitmask of capabilities this seat has; if a member is - * set, then it is present on the seat. - */ -enum wl_seat_capability { - /** - * the seat has pointer devices - */ - WL_SEAT_CAPABILITY_POINTER = 1, - /** - * the seat has one or more keyboards - */ - WL_SEAT_CAPABILITY_KEYBOARD = 2, - /** - * the seat has touch devices - */ - WL_SEAT_CAPABILITY_TOUCH = 4, -}; -#endif /* WL_SEAT_CAPABILITY_ENUM */ - -/** - * @ingroup iface_wl_seat - * @struct wl_seat_listener - */ -struct wl_seat_listener { - /** - * seat capabilities changed - * - * This is emitted whenever a seat gains or loses the pointer, - * keyboard or touch capabilities. The argument is a capability - * enum containing the complete set of capabilities this seat has. - * - * When the pointer capability is added, a client may create a - * wl_pointer object using the wl_seat.get_pointer request. This - * object will receive pointer events until the capability is - * removed in the future. - * - * When the pointer capability is removed, a client should destroy - * the wl_pointer objects associated with the seat where the - * capability was removed, using the wl_pointer.release request. No - * further pointer events will be received on these objects. - * - * In some compositors, if a seat regains the pointer capability - * and a client has a previously obtained wl_pointer object of - * version 4 or less, that object may start sending pointer events - * again. This behavior is considered a misinterpretation of the - * intended behavior and must not be relied upon by the client. - * wl_pointer objects of version 5 or later must not send events if - * created before the most recent event notifying the client of an - * added pointer capability. - * - * The above behavior also applies to wl_keyboard and wl_touch with - * the keyboard and touch capabilities, respectively. - * @param capabilities capabilities of the seat - */ - void (*capabilities)(void *data, - struct wl_seat *wl_seat, - uint32_t capabilities); - /** - * unique identifier for this seat - * - * In a multiseat configuration this can be used by the client to - * help identify which physical devices the seat represents. Based - * on the seat configuration used by the compositor. - * @param name seat identifier - * @since 2 - */ - void (*name)(void *data, - struct wl_seat *wl_seat, - const char *name); -}; - -/** - * @ingroup iface_wl_seat - */ -static inline int -wl_seat_add_listener(struct wl_seat *wl_seat, - const struct wl_seat_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_seat, - (void (**)(void)) listener, data); -} - -#define WL_SEAT_GET_POINTER 0 -#define WL_SEAT_GET_KEYBOARD 1 -#define WL_SEAT_GET_TOUCH 2 -#define WL_SEAT_RELEASE 3 - -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_CAPABILITIES_SINCE_VERSION 1 -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_NAME_SINCE_VERSION 2 - -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_GET_POINTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_GET_KEYBOARD_SINCE_VERSION 1 -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_GET_TOUCH_SINCE_VERSION 1 -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_RELEASE_SINCE_VERSION 5 - -/** @ingroup iface_wl_seat */ -static inline void -wl_seat_set_user_data(struct wl_seat *wl_seat, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_seat, user_data); -} - -/** @ingroup iface_wl_seat */ -static inline void * -wl_seat_get_user_data(struct wl_seat *wl_seat) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_seat); -} - -static inline uint32_t -wl_seat_get_version(struct wl_seat *wl_seat) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_seat); -} - -/** @ingroup iface_wl_seat */ -static inline void -wl_seat_destroy(struct wl_seat *wl_seat) -{ - wl_proxy_destroy((struct wl_proxy *) wl_seat); -} - -/** - * @ingroup iface_wl_seat - * - * The ID provided will be initialized to the wl_pointer interface - * for this seat. - * - * This request only takes effect if the seat has the pointer - * capability, or has had the pointer capability in the past. - * It is a protocol violation to issue this request on a seat that has - * never had the pointer capability. - */ -static inline struct wl_pointer * -wl_seat_get_pointer(struct wl_seat *wl_seat) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_seat, - WL_SEAT_GET_POINTER, &wl_pointer_interface, NULL); - - return (struct wl_pointer *) id; -} - -/** - * @ingroup iface_wl_seat - * - * The ID provided will be initialized to the wl_keyboard interface - * for this seat. - * - * This request only takes effect if the seat has the keyboard - * capability, or has had the keyboard capability in the past. - * It is a protocol violation to issue this request on a seat that has - * never had the keyboard capability. - */ -static inline struct wl_keyboard * -wl_seat_get_keyboard(struct wl_seat *wl_seat) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_seat, - WL_SEAT_GET_KEYBOARD, &wl_keyboard_interface, NULL); - - return (struct wl_keyboard *) id; -} - -/** - * @ingroup iface_wl_seat - * - * The ID provided will be initialized to the wl_touch interface - * for this seat. - * - * This request only takes effect if the seat has the touch - * capability, or has had the touch capability in the past. - * It is a protocol violation to issue this request on a seat that has - * never had the touch capability. - */ -static inline struct wl_touch * -wl_seat_get_touch(struct wl_seat *wl_seat) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_seat, - WL_SEAT_GET_TOUCH, &wl_touch_interface, NULL); - - return (struct wl_touch *) id; -} - -/** - * @ingroup iface_wl_seat - * - * Using this request a client can tell the server that it is not going to - * use the seat object anymore. - */ -static inline void -wl_seat_release(struct wl_seat *wl_seat) -{ - wl_proxy_marshal((struct wl_proxy *) wl_seat, - WL_SEAT_RELEASE); - - wl_proxy_destroy((struct wl_proxy *) wl_seat); -} - -#ifndef WL_POINTER_ERROR_ENUM -#define WL_POINTER_ERROR_ENUM -enum wl_pointer_error { - /** - * given wl_surface has another role - */ - WL_POINTER_ERROR_ROLE = 0, -}; -#endif /* WL_POINTER_ERROR_ENUM */ - -#ifndef WL_POINTER_BUTTON_STATE_ENUM -#define WL_POINTER_BUTTON_STATE_ENUM -/** - * @ingroup iface_wl_pointer - * physical button state - * - * Describes the physical state of a button that produced the button - * event. - */ -enum wl_pointer_button_state { - /** - * the button is not pressed - */ - WL_POINTER_BUTTON_STATE_RELEASED = 0, - /** - * the button is pressed - */ - WL_POINTER_BUTTON_STATE_PRESSED = 1, -}; -#endif /* WL_POINTER_BUTTON_STATE_ENUM */ - -#ifndef WL_POINTER_AXIS_ENUM -#define WL_POINTER_AXIS_ENUM -/** - * @ingroup iface_wl_pointer - * axis types - * - * Describes the axis types of scroll events. - */ -enum wl_pointer_axis { - /** - * vertical axis - */ - WL_POINTER_AXIS_VERTICAL_SCROLL = 0, - /** - * horizontal axis - */ - WL_POINTER_AXIS_HORIZONTAL_SCROLL = 1, -}; -#endif /* WL_POINTER_AXIS_ENUM */ - -#ifndef WL_POINTER_AXIS_SOURCE_ENUM -#define WL_POINTER_AXIS_SOURCE_ENUM -/** - * @ingroup iface_wl_pointer - * axis source types - * - * Describes the source types for axis events. This indicates to the - * client how an axis event was physically generated; a client may - * adjust the user interface accordingly. For example, scroll events - * from a "finger" source may be in a smooth coordinate space with - * kinetic scrolling whereas a "wheel" source may be in discrete steps - * of a number of lines. - * - * The "continuous" axis source is a device generating events in a - * continuous coordinate space, but using something other than a - * finger. One example for this source is button-based scrolling where - * the vertical motion of a device is converted to scroll events while - * a button is held down. - * - * The "wheel tilt" axis source indicates that the actual device is a - * wheel but the scroll event is not caused by a rotation but a - * (usually sideways) tilt of the wheel. - */ -enum wl_pointer_axis_source { - /** - * a physical wheel rotation - */ - WL_POINTER_AXIS_SOURCE_WHEEL = 0, - /** - * finger on a touch surface - */ - WL_POINTER_AXIS_SOURCE_FINGER = 1, - /** - * continuous coordinate space - */ - WL_POINTER_AXIS_SOURCE_CONTINUOUS = 2, - /** - * a physical wheel tilt - * @since 6 - */ - WL_POINTER_AXIS_SOURCE_WHEEL_TILT = 3, -}; -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_AXIS_SOURCE_WHEEL_TILT_SINCE_VERSION 6 -#endif /* WL_POINTER_AXIS_SOURCE_ENUM */ - -/** - * @ingroup iface_wl_pointer - * @struct wl_pointer_listener - */ -struct wl_pointer_listener { - /** - * enter event - * - * Notification that this seat's pointer is focused on a certain - * surface. - * - * When a seat's focus enters a surface, the pointer image is - * undefined and a client should respond to this event by setting - * an appropriate pointer image with the set_cursor request. - * @param serial serial number of the enter event - * @param surface surface entered by the pointer - * @param surface_x surface-local x coordinate - * @param surface_y surface-local y coordinate - */ - void (*enter)(void *data, - struct wl_pointer *wl_pointer, - uint32_t serial, - struct wl_surface *surface, - wl_fixed_t surface_x, - wl_fixed_t surface_y); - /** - * leave event - * - * Notification that this seat's pointer is no longer focused on - * a certain surface. - * - * The leave notification is sent before the enter notification for - * the new focus. - * @param serial serial number of the leave event - * @param surface surface left by the pointer - */ - void (*leave)(void *data, - struct wl_pointer *wl_pointer, - uint32_t serial, - struct wl_surface *surface); - /** - * pointer motion event - * - * Notification of pointer location change. The arguments - * surface_x and surface_y are the location relative to the focused - * surface. - * @param time timestamp with millisecond granularity - * @param surface_x surface-local x coordinate - * @param surface_y surface-local y coordinate - */ - void (*motion)(void *data, - struct wl_pointer *wl_pointer, - uint32_t time, - wl_fixed_t surface_x, - wl_fixed_t surface_y); - /** - * pointer button event - * - * Mouse button click and release notifications. - * - * The location of the click is given by the last motion or enter - * event. The time argument is a timestamp with millisecond - * granularity, with an undefined base. - * - * The button is a button code as defined in the Linux kernel's - * linux/input-event-codes.h header file, e.g. BTN_LEFT. - * - * Any 16-bit button code value is reserved for future additions to - * the kernel's event code list. All other button codes above - * 0xFFFF are currently undefined but may be used in future - * versions of this protocol. - * @param serial serial number of the button event - * @param time timestamp with millisecond granularity - * @param button button that produced the event - * @param state physical state of the button - */ - void (*button)(void *data, - struct wl_pointer *wl_pointer, - uint32_t serial, - uint32_t time, - uint32_t button, - uint32_t state); - /** - * axis event - * - * Scroll and other axis notifications. - * - * For scroll events (vertical and horizontal scroll axes), the - * value parameter is the length of a vector along the specified - * axis in a coordinate space identical to those of motion events, - * representing a relative movement along the specified axis. - * - * For devices that support movements non-parallel to axes multiple - * axis events will be emitted. - * - * When applicable, for example for touch pads, the server can - * choose to emit scroll events where the motion vector is - * equivalent to a motion event vector. - * - * When applicable, a client can transform its content relative to - * the scroll distance. - * @param time timestamp with millisecond granularity - * @param axis axis type - * @param value length of vector in surface-local coordinate space - */ - void (*axis)(void *data, - struct wl_pointer *wl_pointer, - uint32_t time, - uint32_t axis, - wl_fixed_t value); - /** - * end of a pointer event sequence - * - * Indicates the end of a set of events that logically belong - * together. A client is expected to accumulate the data in all - * events within the frame before proceeding. - * - * All wl_pointer events before a wl_pointer.frame event belong - * logically together. For example, in a diagonal scroll motion the - * compositor will send an optional wl_pointer.axis_source event, - * two wl_pointer.axis events (horizontal and vertical) and finally - * a wl_pointer.frame event. The client may use this information to - * calculate a diagonal vector for scrolling. - * - * When multiple wl_pointer.axis events occur within the same - * frame, the motion vector is the combined motion of all events. - * When a wl_pointer.axis and a wl_pointer.axis_stop event occur - * within the same frame, this indicates that axis movement in one - * axis has stopped but continues in the other axis. When multiple - * wl_pointer.axis_stop events occur within the same frame, this - * indicates that these axes stopped in the same instance. - * - * A wl_pointer.frame event is sent for every logical event group, - * even if the group only contains a single wl_pointer event. - * Specifically, a client may get a sequence: motion, frame, - * button, frame, axis, frame, axis_stop, frame. - * - * The wl_pointer.enter and wl_pointer.leave events are logical - * events generated by the compositor and not the hardware. These - * events are also grouped by a wl_pointer.frame. When a pointer - * moves from one surface to another, a compositor should group the - * wl_pointer.leave event within the same wl_pointer.frame. - * However, a client must not rely on wl_pointer.leave and - * wl_pointer.enter being in the same wl_pointer.frame. - * Compositor-specific policies may require the wl_pointer.leave - * and wl_pointer.enter event being split across multiple - * wl_pointer.frame groups. - * @since 5 - */ - void (*frame)(void *data, - struct wl_pointer *wl_pointer); - /** - * axis source event - * - * Source information for scroll and other axes. - * - * This event does not occur on its own. It is sent before a - * wl_pointer.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 wl_pointer.axis_source.finger, a wl_pointer.axis_stop event - * will be sent when the user lifts the finger off the device. - * - * If the source is wl_pointer.axis_source.wheel, - * wl_pointer.axis_source.wheel_tilt or - * wl_pointer.axis_source.continuous, a wl_pointer.axis_stop event - * may or may not be sent. Whether a compositor sends an axis_stop - * event for these sources is hardware-specific and - * implementation-dependent; clients must not rely on receiving an - * axis_stop event for these scroll sources and should treat scroll - * sequences from these scroll sources as unterminated by default. - * - * This event is optional. If the source is unknown for a - * particular axis event sequence, no event is sent. Only one - * wl_pointer.axis_source event is permitted per frame. - * - * The order of wl_pointer.axis_discrete and wl_pointer.axis_source - * is not guaranteed. - * @param axis_source source of the axis event - * @since 5 - */ - void (*axis_source)(void *data, - struct wl_pointer *wl_pointer, - uint32_t axis_source); - /** - * axis stop event - * - * Stop notification for scroll and other axes. - * - * For some wl_pointer.axis_source types, a wl_pointer.axis_stop - * event is sent to notify a client that the axis sequence has - * terminated. This enables the client to implement kinetic - * scrolling. See the wl_pointer.axis_source documentation for - * information on when this event may be generated. - * - * Any wl_pointer.axis events with the same axis_source after this - * event should be considered as the start of a new axis motion. - * - * The timestamp is to be interpreted identical to the timestamp in - * the wl_pointer.axis event. The timestamp value may be the same - * as a preceding wl_pointer.axis event. - * @param time timestamp with millisecond granularity - * @param axis the axis stopped with this event - * @since 5 - */ - void (*axis_stop)(void *data, - struct wl_pointer *wl_pointer, - uint32_t time, - uint32_t axis); - /** - * axis click event - * - * Discrete step information for scroll and other axes. - * - * This event carries the axis value of the wl_pointer.axis event - * in discrete steps (e.g. mouse wheel clicks). - * - * This event does not occur on its own, it is coupled with a - * wl_pointer.axis event that represents this axis value on a - * continuous scale. The protocol guarantees that each - * axis_discrete event is always followed by exactly one axis event - * with the same axis number within the same wl_pointer.frame. Note - * that the protocol allows for other events to occur between the - * axis_discrete and its coupled axis event, including other - * axis_discrete or axis events. - * - * This event is optional; continuous scrolling devices like - * two-finger scrolling on touchpads do not have discrete steps and - * do not generate this event. - * - * The discrete value carries the directional information. e.g. a - * value of -2 is two steps towards the negative direction of this - * axis. - * - * The axis number is identical to the axis number in the - * associated axis event. - * - * The order of wl_pointer.axis_discrete and wl_pointer.axis_source - * is not guaranteed. - * @param axis axis type - * @param discrete number of steps - * @since 5 - */ - void (*axis_discrete)(void *data, - struct wl_pointer *wl_pointer, - uint32_t axis, - int32_t discrete); -}; - -/** - * @ingroup iface_wl_pointer - */ -static inline int -wl_pointer_add_listener(struct wl_pointer *wl_pointer, - const struct wl_pointer_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_pointer, - (void (**)(void)) listener, data); -} - -#define WL_POINTER_SET_CURSOR 0 -#define WL_POINTER_RELEASE 1 - -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_LEAVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_MOTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_BUTTON_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_AXIS_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_FRAME_SINCE_VERSION 5 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_AXIS_SOURCE_SINCE_VERSION 5 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_AXIS_STOP_SINCE_VERSION 5 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_AXIS_DISCRETE_SINCE_VERSION 5 - -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_SET_CURSOR_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_RELEASE_SINCE_VERSION 3 - -/** @ingroup iface_wl_pointer */ -static inline void -wl_pointer_set_user_data(struct wl_pointer *wl_pointer, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_pointer, user_data); -} - -/** @ingroup iface_wl_pointer */ -static inline void * -wl_pointer_get_user_data(struct wl_pointer *wl_pointer) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_pointer); -} - -static inline uint32_t -wl_pointer_get_version(struct wl_pointer *wl_pointer) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_pointer); -} - -/** @ingroup iface_wl_pointer */ -static inline void -wl_pointer_destroy(struct wl_pointer *wl_pointer) -{ - wl_proxy_destroy((struct wl_proxy *) wl_pointer); -} - -/** - * @ingroup iface_wl_pointer - * - * Set the pointer surface, i.e., the surface that contains the - * pointer image (cursor). This request gives the surface the role - * of a cursor. If the surface already has another role, it raises - * a protocol error. - * - * The cursor actually changes only if the pointer - * focus for this device is 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 pointer 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. - */ -static inline void -wl_pointer_set_cursor(struct wl_pointer *wl_pointer, uint32_t serial, struct wl_surface *surface, int32_t hotspot_x, int32_t hotspot_y) -{ - wl_proxy_marshal((struct wl_proxy *) wl_pointer, - WL_POINTER_SET_CURSOR, serial, surface, hotspot_x, hotspot_y); -} - -/** - * @ingroup iface_wl_pointer - * - * Using this request a client can tell the server that it is not going to - * use the pointer object anymore. - * - * This request destroys the pointer proxy object, so clients must not call - * wl_pointer_destroy() after using this request. - */ -static inline void -wl_pointer_release(struct wl_pointer *wl_pointer) -{ - wl_proxy_marshal((struct wl_proxy *) wl_pointer, - WL_POINTER_RELEASE); - - wl_proxy_destroy((struct wl_proxy *) wl_pointer); -} - -#ifndef WL_KEYBOARD_KEYMAP_FORMAT_ENUM -#define WL_KEYBOARD_KEYMAP_FORMAT_ENUM -/** - * @ingroup iface_wl_keyboard - * keyboard mapping format - * - * This specifies the format of the keymap provided to the - * client with the wl_keyboard.keymap event. - */ -enum wl_keyboard_keymap_format { - /** - * no keymap; client must understand how to interpret the raw keycode - */ - WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP = 0, - /** - * libxkbcommon compatible; to determine the xkb keycode, clients must add 8 to the key event keycode - */ - WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1 = 1, -}; -#endif /* WL_KEYBOARD_KEYMAP_FORMAT_ENUM */ - -#ifndef WL_KEYBOARD_KEY_STATE_ENUM -#define WL_KEYBOARD_KEY_STATE_ENUM -/** - * @ingroup iface_wl_keyboard - * physical key state - * - * Describes the physical state of a key that produced the key event. - */ -enum wl_keyboard_key_state { - /** - * key is not pressed - */ - WL_KEYBOARD_KEY_STATE_RELEASED = 0, - /** - * key is pressed - */ - WL_KEYBOARD_KEY_STATE_PRESSED = 1, -}; -#endif /* WL_KEYBOARD_KEY_STATE_ENUM */ - -/** - * @ingroup iface_wl_keyboard - * @struct wl_keyboard_listener - */ -struct wl_keyboard_listener { - /** - * keyboard mapping - * - * This event provides a file descriptor to the client which can - * be memory-mapped to provide a keyboard mapping description. - * @param format keymap format - * @param fd keymap file descriptor - * @param size keymap size, in bytes - */ - void (*keymap)(void *data, - struct wl_keyboard *wl_keyboard, - uint32_t format, - int32_t fd, - uint32_t size); - /** - * enter event - * - * Notification that this seat's keyboard focus is on a certain - * surface. - * @param serial serial number of the enter event - * @param surface surface gaining keyboard focus - * @param keys the currently pressed keys - */ - void (*enter)(void *data, - struct wl_keyboard *wl_keyboard, - uint32_t serial, - struct wl_surface *surface, - struct wl_array *keys); - /** - * leave event - * - * Notification that this seat's keyboard focus is no longer on a - * certain surface. - * - * The leave notification is sent before the enter notification for - * the new focus. - * @param serial serial number of the leave event - * @param surface surface that lost keyboard focus - */ - void (*leave)(void *data, - struct wl_keyboard *wl_keyboard, - uint32_t serial, - struct wl_surface *surface); - /** - * key event - * - * A key was pressed or released. The time argument is a - * timestamp with millisecond granularity, with an undefined base. - * @param serial serial number of the key event - * @param time timestamp with millisecond granularity - * @param key key that produced the event - * @param state physical state of the key - */ - void (*key)(void *data, - struct wl_keyboard *wl_keyboard, - uint32_t serial, - uint32_t time, - uint32_t key, - uint32_t state); - /** - * modifier and group state - * - * Notifies clients that the modifier and/or group state has - * changed, and it should update its local state. - * @param serial serial number of the modifiers event - * @param mods_depressed depressed modifiers - * @param mods_latched latched modifiers - * @param mods_locked locked modifiers - * @param group keyboard layout - */ - void (*modifiers)(void *data, - struct wl_keyboard *wl_keyboard, - uint32_t serial, - uint32_t mods_depressed, - uint32_t mods_latched, - uint32_t mods_locked, - uint32_t group); - /** - * repeat rate and delay - * - * Informs the client about the keyboard's repeat rate and delay. - * - * This event is sent as soon as the wl_keyboard object has been - * created, and is guaranteed to be received by the client before - * any key press event. - * - * Negative values for either rate or delay are illegal. A rate of - * zero will disable any repeating (regardless of the value of - * delay). - * - * This event can be sent later on as well with a new value if - * necessary, so clients should continue listening for the event - * past the creation of wl_keyboard. - * @param rate the rate of repeating keys in characters per second - * @param delay delay in milliseconds since key down until repeating starts - * @since 4 - */ - void (*repeat_info)(void *data, - struct wl_keyboard *wl_keyboard, - int32_t rate, - int32_t delay); -}; - -/** - * @ingroup iface_wl_keyboard - */ -static inline int -wl_keyboard_add_listener(struct wl_keyboard *wl_keyboard, - const struct wl_keyboard_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_keyboard, - (void (**)(void)) listener, data); -} - -#define WL_KEYBOARD_RELEASE 0 - -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_KEYMAP_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_LEAVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_KEY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_MODIFIERS_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION 4 - -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_RELEASE_SINCE_VERSION 3 - -/** @ingroup iface_wl_keyboard */ -static inline void -wl_keyboard_set_user_data(struct wl_keyboard *wl_keyboard, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_keyboard, user_data); -} - -/** @ingroup iface_wl_keyboard */ -static inline void * -wl_keyboard_get_user_data(struct wl_keyboard *wl_keyboard) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_keyboard); -} - -static inline uint32_t -wl_keyboard_get_version(struct wl_keyboard *wl_keyboard) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_keyboard); -} - -/** @ingroup iface_wl_keyboard */ -static inline void -wl_keyboard_destroy(struct wl_keyboard *wl_keyboard) -{ - wl_proxy_destroy((struct wl_proxy *) wl_keyboard); -} - -/** - * @ingroup iface_wl_keyboard - */ -static inline void -wl_keyboard_release(struct wl_keyboard *wl_keyboard) -{ - wl_proxy_marshal((struct wl_proxy *) wl_keyboard, - WL_KEYBOARD_RELEASE); - - wl_proxy_destroy((struct wl_proxy *) wl_keyboard); -} - -/** - * @ingroup iface_wl_touch - * @struct wl_touch_listener - */ -struct wl_touch_listener { - /** - * touch down event and beginning of a touch sequence - * - * A new touch point has appeared on the surface. This touch - * point is assigned a unique ID. Future events from this touch - * point reference this ID. The ID ceases to be valid after a touch - * up event and may be reused in the future. - * @param serial serial number of the touch down event - * @param time timestamp with millisecond granularity - * @param surface surface touched - * @param id the unique ID of this touch point - * @param x surface-local x coordinate - * @param y surface-local y coordinate - */ - void (*down)(void *data, - struct wl_touch *wl_touch, - uint32_t serial, - uint32_t time, - struct wl_surface *surface, - int32_t id, - wl_fixed_t x, - wl_fixed_t y); - /** - * end of a touch event sequence - * - * The touch point has disappeared. No further events will be - * sent for this touch point and the touch point's ID is released - * and may be reused in a future touch down event. - * @param serial serial number of the touch up event - * @param time timestamp with millisecond granularity - * @param id the unique ID of this touch point - */ - void (*up)(void *data, - struct wl_touch *wl_touch, - uint32_t serial, - uint32_t time, - int32_t id); - /** - * update of touch point coordinates - * - * A touch point has changed coordinates. - * @param time timestamp with millisecond granularity - * @param id the unique ID of this touch point - * @param x surface-local x coordinate - * @param y surface-local y coordinate - */ - void (*motion)(void *data, - struct wl_touch *wl_touch, - uint32_t time, - int32_t id, - wl_fixed_t x, - wl_fixed_t y); - /** - * end of touch frame event - * - * Indicates the end of a set of events that logically belong - * together. A client is expected to accumulate the data in all - * events within the frame before proceeding. - * - * A wl_touch.frame terminates at least one event but otherwise no - * guarantee is provided about the set of events within a frame. A - * client must assume that any state not updated in a frame is - * unchanged from the previously known state. - */ - void (*frame)(void *data, - struct wl_touch *wl_touch); - /** - * touch session cancelled - * - * Sent if the compositor decides the touch stream is a global - * gesture. No further events are sent to the clients from that - * particular gesture. Touch cancellation applies to all touch - * points currently active on this client's surface. The client is - * responsible for finalizing the touch points, future touch points - * on this surface may reuse the touch point ID. - */ - void (*cancel)(void *data, - struct wl_touch *wl_touch); - /** - * update shape of touch point - * - * Sent when a touchpoint has changed its shape. - * - * This event does not occur on its own. It is sent before a - * wl_touch.frame event and carries the new shape information for - * any previously reported, or new touch points of that frame. - * - * Other events describing the touch point such as wl_touch.down, - * wl_touch.motion or wl_touch.orientation may be sent within the - * same wl_touch.frame. A client should treat these events as a - * single logical touch point update. The order of wl_touch.shape, - * wl_touch.orientation and wl_touch.motion is not guaranteed. A - * wl_touch.down event is guaranteed to occur before the first - * wl_touch.shape event for this touch ID but both events may occur - * within the same wl_touch.frame. - * - * A touchpoint shape is approximated by an ellipse through the - * major and minor axis length. The major axis length describes the - * longer diameter of the ellipse, while the minor axis length - * describes the shorter diameter. Major and minor are orthogonal - * and both are specified in surface-local coordinates. The center - * of the ellipse is always at the touchpoint location as reported - * by wl_touch.down or wl_touch.move. - * - * This event is only sent by the compositor if the touch device - * supports shape reports. The client has to make reasonable - * assumptions about the shape if it did not receive this event. - * @param id the unique ID of this touch point - * @param major length of the major axis in surface-local coordinates - * @param minor length of the minor axis in surface-local coordinates - * @since 6 - */ - void (*shape)(void *data, - struct wl_touch *wl_touch, - int32_t id, - wl_fixed_t major, - wl_fixed_t minor); - /** - * update orientation of touch point - * - * Sent when a touchpoint has changed its orientation. - * - * This event does not occur on its own. It is sent before a - * wl_touch.frame event and carries the new shape information for - * any previously reported, or new touch points of that frame. - * - * Other events describing the touch point such as wl_touch.down, - * wl_touch.motion or wl_touch.shape may be sent within the same - * wl_touch.frame. A client should treat these events as a single - * logical touch point update. The order of wl_touch.shape, - * wl_touch.orientation and wl_touch.motion is not guaranteed. A - * wl_touch.down event is guaranteed to occur before the first - * wl_touch.orientation event for this touch ID but both events may - * occur within the same wl_touch.frame. - * - * The orientation describes the clockwise angle of a touchpoint's - * major axis to the positive surface y-axis and is normalized to - * the -180 to +180 degree range. The granularity of orientation - * depends on the touch device, some devices only support binary - * rotation values between 0 and 90 degrees. - * - * This event is only sent by the compositor if the touch device - * supports orientation reports. - * @param id the unique ID of this touch point - * @param orientation angle between major axis and positive surface y-axis in degrees - * @since 6 - */ - void (*orientation)(void *data, - struct wl_touch *wl_touch, - int32_t id, - wl_fixed_t orientation); -}; - -/** - * @ingroup iface_wl_touch - */ -static inline int -wl_touch_add_listener(struct wl_touch *wl_touch, - const struct wl_touch_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_touch, - (void (**)(void)) listener, data); -} - -#define WL_TOUCH_RELEASE 0 - -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_DOWN_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_UP_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_MOTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_FRAME_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_CANCEL_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_SHAPE_SINCE_VERSION 6 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_ORIENTATION_SINCE_VERSION 6 - -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_RELEASE_SINCE_VERSION 3 - -/** @ingroup iface_wl_touch */ -static inline void -wl_touch_set_user_data(struct wl_touch *wl_touch, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_touch, user_data); -} - -/** @ingroup iface_wl_touch */ -static inline void * -wl_touch_get_user_data(struct wl_touch *wl_touch) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_touch); -} - -static inline uint32_t -wl_touch_get_version(struct wl_touch *wl_touch) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_touch); -} - -/** @ingroup iface_wl_touch */ -static inline void -wl_touch_destroy(struct wl_touch *wl_touch) -{ - wl_proxy_destroy((struct wl_proxy *) wl_touch); -} - -/** - * @ingroup iface_wl_touch - */ -static inline void -wl_touch_release(struct wl_touch *wl_touch) -{ - wl_proxy_marshal((struct wl_proxy *) wl_touch, - WL_TOUCH_RELEASE); - - wl_proxy_destroy((struct wl_proxy *) wl_touch); -} - -#ifndef WL_OUTPUT_SUBPIXEL_ENUM -#define WL_OUTPUT_SUBPIXEL_ENUM -/** - * @ingroup iface_wl_output - * subpixel geometry information - * - * This enumeration describes how the physical - * pixels on an output are laid out. - */ -enum wl_output_subpixel { - /** - * unknown geometry - */ - WL_OUTPUT_SUBPIXEL_UNKNOWN = 0, - /** - * no geometry - */ - WL_OUTPUT_SUBPIXEL_NONE = 1, - /** - * horizontal RGB - */ - WL_OUTPUT_SUBPIXEL_HORIZONTAL_RGB = 2, - /** - * horizontal BGR - */ - WL_OUTPUT_SUBPIXEL_HORIZONTAL_BGR = 3, - /** - * vertical RGB - */ - WL_OUTPUT_SUBPIXEL_VERTICAL_RGB = 4, - /** - * vertical BGR - */ - WL_OUTPUT_SUBPIXEL_VERTICAL_BGR = 5, -}; -#endif /* WL_OUTPUT_SUBPIXEL_ENUM */ - -#ifndef WL_OUTPUT_TRANSFORM_ENUM -#define WL_OUTPUT_TRANSFORM_ENUM -/** - * @ingroup iface_wl_output - * transform from framebuffer to output - * - * This describes the transform that a compositor will apply to a - * surface to compensate for the rotation or mirroring of an - * output device. - * - * The flipped values correspond to an initial flip around a - * vertical axis followed by rotation. - * - * The purpose is mainly to allow clients to render accordingly and - * tell the compositor, so that for fullscreen surfaces, the - * compositor will still be able to scan out directly from client - * surfaces. - */ -enum wl_output_transform { - /** - * no transform - */ - WL_OUTPUT_TRANSFORM_NORMAL = 0, - /** - * 90 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_90 = 1, - /** - * 180 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_180 = 2, - /** - * 270 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_270 = 3, - /** - * 180 degree flip around a vertical axis - */ - WL_OUTPUT_TRANSFORM_FLIPPED = 4, - /** - * flip and rotate 90 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_FLIPPED_90 = 5, - /** - * flip and rotate 180 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_FLIPPED_180 = 6, - /** - * flip and rotate 270 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_FLIPPED_270 = 7, -}; -#endif /* WL_OUTPUT_TRANSFORM_ENUM */ - -#ifndef WL_OUTPUT_MODE_ENUM -#define WL_OUTPUT_MODE_ENUM -/** - * @ingroup iface_wl_output - * mode information - * - * These flags describe properties of an output mode. - * They are used in the flags bitfield of the mode event. - */ -enum wl_output_mode { - /** - * indicates this is the current mode - */ - WL_OUTPUT_MODE_CURRENT = 0x1, - /** - * indicates this is the preferred mode - */ - WL_OUTPUT_MODE_PREFERRED = 0x2, -}; -#endif /* WL_OUTPUT_MODE_ENUM */ - -/** - * @ingroup iface_wl_output - * @struct wl_output_listener - */ -struct wl_output_listener { - /** - * properties of the output - * - * The geometry event describes geometric properties of the - * output. The event is sent when binding to the output object and - * whenever any of the properties change. - * @param x x position within the global compositor space - * @param y y position within the global compositor space - * @param physical_width width in millimeters of the output - * @param physical_height height in millimeters of the output - * @param subpixel subpixel orientation of the output - * @param make textual description of the manufacturer - * @param model textual description of the model - * @param transform transform that maps framebuffer to output - */ - void (*geometry)(void *data, - struct wl_output *wl_output, - int32_t x, - int32_t y, - int32_t physical_width, - int32_t physical_height, - int32_t subpixel, - const char *make, - const char *model, - int32_t transform); - /** - * advertise available modes for the output - * - * The mode event describes an available mode for the output. - * - * The event is sent when binding to the output object and there - * will always be one mode, the current mode. The event is sent - * again if an output changes mode, for the mode that is now - * current. In other words, the current mode is always the last - * mode that was received with the current flag set. - * - * The size of a mode is given in physical hardware units of the - * output device. This is not necessarily the same as the output - * size in the global compositor space. For instance, the output - * may be scaled, as described in wl_output.scale, or transformed, - * as described in wl_output.transform. - * @param flags bitfield of mode flags - * @param width width of the mode in hardware units - * @param height height of the mode in hardware units - * @param refresh vertical refresh rate in mHz - */ - void (*mode)(void *data, - struct wl_output *wl_output, - uint32_t flags, - int32_t width, - int32_t height, - int32_t refresh); - /** - * sent all information about output - * - * This event is sent after all other properties have been sent - * after binding to the output object and after any other property - * changes done after that. This allows changes to the output - * properties to be seen as atomic, even if they happen via - * multiple events. - * @since 2 - */ - void (*done)(void *data, - struct wl_output *wl_output); - /** - * output scaling properties - * - * This event contains scaling geometry information that is not - * in the geometry event. It may be sent after binding the output - * object or if the output scale changes later. If it is not sent, - * the client should assume a scale of 1. - * - * A scale larger than 1 means that the compositor will - * automatically scale surface buffers by this amount when - * rendering. This is used for very high resolution displays where - * applications rendering at the native resolution would be too - * small to be legible. - * - * It is intended that scaling aware clients track the current - * output of a surface, and if it is on a scaled output it should - * use wl_surface.set_buffer_scale with the scale of the output. - * That way the compositor can avoid scaling the surface, and the - * client can supply a higher detail image. - * @param factor scaling factor of output - * @since 2 - */ - void (*scale)(void *data, - struct wl_output *wl_output, - int32_t factor); -}; - -/** - * @ingroup iface_wl_output - */ -static inline int -wl_output_add_listener(struct wl_output *wl_output, - const struct wl_output_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wl_output, - (void (**)(void)) listener, data); -} - -#define WL_OUTPUT_RELEASE 0 - -/** - * @ingroup iface_wl_output - */ -#define WL_OUTPUT_GEOMETRY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_output - */ -#define WL_OUTPUT_MODE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_output - */ -#define WL_OUTPUT_DONE_SINCE_VERSION 2 -/** - * @ingroup iface_wl_output - */ -#define WL_OUTPUT_SCALE_SINCE_VERSION 2 - -/** - * @ingroup iface_wl_output - */ -#define WL_OUTPUT_RELEASE_SINCE_VERSION 3 - -/** @ingroup iface_wl_output */ -static inline void -wl_output_set_user_data(struct wl_output *wl_output, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_output, user_data); -} - -/** @ingroup iface_wl_output */ -static inline void * -wl_output_get_user_data(struct wl_output *wl_output) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_output); -} - -static inline uint32_t -wl_output_get_version(struct wl_output *wl_output) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_output); -} - -/** @ingroup iface_wl_output */ -static inline void -wl_output_destroy(struct wl_output *wl_output) -{ - wl_proxy_destroy((struct wl_proxy *) wl_output); -} - -/** - * @ingroup iface_wl_output - * - * Using this request a client can tell the server that it is not going to - * use the output object anymore. - */ -static inline void -wl_output_release(struct wl_output *wl_output) -{ - wl_proxy_marshal((struct wl_proxy *) wl_output, - WL_OUTPUT_RELEASE); - - wl_proxy_destroy((struct wl_proxy *) wl_output); -} - -#define WL_REGION_DESTROY 0 -#define WL_REGION_ADD 1 -#define WL_REGION_SUBTRACT 2 - - -/** - * @ingroup iface_wl_region - */ -#define WL_REGION_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_region - */ -#define WL_REGION_ADD_SINCE_VERSION 1 -/** - * @ingroup iface_wl_region - */ -#define WL_REGION_SUBTRACT_SINCE_VERSION 1 - -/** @ingroup iface_wl_region */ -static inline void -wl_region_set_user_data(struct wl_region *wl_region, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_region, user_data); -} - -/** @ingroup iface_wl_region */ -static inline void * -wl_region_get_user_data(struct wl_region *wl_region) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_region); -} - -static inline uint32_t -wl_region_get_version(struct wl_region *wl_region) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_region); -} - -/** - * @ingroup iface_wl_region - * - * Destroy the region. This will invalidate the object ID. - */ -static inline void -wl_region_destroy(struct wl_region *wl_region) -{ - wl_proxy_marshal((struct wl_proxy *) wl_region, - WL_REGION_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wl_region); -} - -/** - * @ingroup iface_wl_region - * - * Add the specified rectangle to the region. - */ -static inline void -wl_region_add(struct wl_region *wl_region, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) wl_region, - WL_REGION_ADD, x, y, width, height); -} - -/** - * @ingroup iface_wl_region - * - * Subtract the specified rectangle from the region. - */ -static inline void -wl_region_subtract(struct wl_region *wl_region, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) wl_region, - WL_REGION_SUBTRACT, x, y, width, height); -} - -#ifndef WL_SUBCOMPOSITOR_ERROR_ENUM -#define WL_SUBCOMPOSITOR_ERROR_ENUM -enum wl_subcompositor_error { - /** - * the to-be sub-surface is invalid - */ - WL_SUBCOMPOSITOR_ERROR_BAD_SURFACE = 0, -}; -#endif /* WL_SUBCOMPOSITOR_ERROR_ENUM */ - -#define WL_SUBCOMPOSITOR_DESTROY 0 -#define WL_SUBCOMPOSITOR_GET_SUBSURFACE 1 - - -/** - * @ingroup iface_wl_subcompositor - */ -#define WL_SUBCOMPOSITOR_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subcompositor - */ -#define WL_SUBCOMPOSITOR_GET_SUBSURFACE_SINCE_VERSION 1 - -/** @ingroup iface_wl_subcompositor */ -static inline void -wl_subcompositor_set_user_data(struct wl_subcompositor *wl_subcompositor, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_subcompositor, user_data); -} - -/** @ingroup iface_wl_subcompositor */ -static inline void * -wl_subcompositor_get_user_data(struct wl_subcompositor *wl_subcompositor) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_subcompositor); -} - -static inline uint32_t -wl_subcompositor_get_version(struct wl_subcompositor *wl_subcompositor) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_subcompositor); -} - -/** - * @ingroup iface_wl_subcompositor - * - * Informs the server that the client will not be using this - * protocol object anymore. This does not affect any other - * objects, wl_subsurface objects included. - */ -static inline void -wl_subcompositor_destroy(struct wl_subcompositor *wl_subcompositor) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subcompositor, - WL_SUBCOMPOSITOR_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wl_subcompositor); -} - -/** - * @ingroup iface_wl_subcompositor - * - * Create a sub-surface interface for the given surface, and - * associate it with the given parent surface. This turns a - * plain wl_surface into a sub-surface. - * - * The to-be sub-surface must not already have another role, and it - * must not have an existing wl_subsurface object. Otherwise a protocol - * error is raised. - */ -static inline struct wl_subsurface * -wl_subcompositor_get_subsurface(struct wl_subcompositor *wl_subcompositor, struct wl_surface *surface, struct wl_surface *parent) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_subcompositor, - WL_SUBCOMPOSITOR_GET_SUBSURFACE, &wl_subsurface_interface, NULL, surface, parent); - - return (struct wl_subsurface *) id; -} - -#ifndef WL_SUBSURFACE_ERROR_ENUM -#define WL_SUBSURFACE_ERROR_ENUM -enum wl_subsurface_error { - /** - * wl_surface is not a sibling or the parent - */ - WL_SUBSURFACE_ERROR_BAD_SURFACE = 0, -}; -#endif /* WL_SUBSURFACE_ERROR_ENUM */ - -#define WL_SUBSURFACE_DESTROY 0 -#define WL_SUBSURFACE_SET_POSITION 1 -#define WL_SUBSURFACE_PLACE_ABOVE 2 -#define WL_SUBSURFACE_PLACE_BELOW 3 -#define WL_SUBSURFACE_SET_SYNC 4 -#define WL_SUBSURFACE_SET_DESYNC 5 - - -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_SET_POSITION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_PLACE_ABOVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_PLACE_BELOW_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_SET_SYNC_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_SET_DESYNC_SINCE_VERSION 1 - -/** @ingroup iface_wl_subsurface */ -static inline void -wl_subsurface_set_user_data(struct wl_subsurface *wl_subsurface, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_subsurface, user_data); -} - -/** @ingroup iface_wl_subsurface */ -static inline void * -wl_subsurface_get_user_data(struct wl_subsurface *wl_subsurface) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_subsurface); -} - -static inline uint32_t -wl_subsurface_get_version(struct wl_subsurface *wl_subsurface) -{ - return wl_proxy_get_version((struct wl_proxy *) wl_subsurface); -} - -/** - * @ingroup iface_wl_subsurface - * - * The sub-surface interface is removed from the wl_surface object - * that was turned into a sub-surface with a - * wl_subcompositor.get_subsurface request. The wl_surface's association - * to the parent is deleted, and the wl_surface loses its role as - * a sub-surface. The wl_surface is unmapped. - */ -static inline void -wl_subsurface_destroy(struct wl_subsurface *wl_subsurface) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subsurface, - WL_SUBSURFACE_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wl_subsurface); -} - -/** - * @ingroup iface_wl_subsurface - * - * This schedules a sub-surface position change. - * The sub-surface will be moved so that its origin (top left - * corner pixel) will be at the location x, y of the parent surface - * coordinate system. The coordinates are not restricted to the parent - * surface area. Negative values are allowed. - * - * The scheduled coordinates will take effect whenever the state of the - * parent surface is applied. When this happens depends on whether the - * parent surface is in synchronized mode or not. See - * wl_subsurface.set_sync and wl_subsurface.set_desync for details. - * - * If more than one set_position request is invoked by the client before - * the commit of the parent surface, the position of a new request always - * replaces the scheduled position from any previous request. - * - * The initial position is 0, 0. - */ -static inline void -wl_subsurface_set_position(struct wl_subsurface *wl_subsurface, int32_t x, int32_t y) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subsurface, - WL_SUBSURFACE_SET_POSITION, x, y); -} - -/** - * @ingroup iface_wl_subsurface - * - * This sub-surface is taken from the stack, and put back just - * above the reference surface, changing the z-order of the sub-surfaces. - * The reference surface must be one of the sibling surfaces, or the - * parent surface. Using any other surface, including this sub-surface, - * will cause a protocol error. - * - * The z-order is double-buffered. Requests are handled in order and - * applied immediately to a pending state. The final pending state is - * copied to the active state the next time the state of the parent - * surface is applied. When this happens depends on whether the parent - * surface is in synchronized mode or not. See wl_subsurface.set_sync and - * wl_subsurface.set_desync for details. - * - * A new sub-surface is initially added as the top-most in the stack - * of its siblings and parent. - */ -static inline void -wl_subsurface_place_above(struct wl_subsurface *wl_subsurface, struct wl_surface *sibling) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subsurface, - WL_SUBSURFACE_PLACE_ABOVE, sibling); -} - -/** - * @ingroup iface_wl_subsurface - * - * The sub-surface is placed just below the reference surface. - * See wl_subsurface.place_above. - */ -static inline void -wl_subsurface_place_below(struct wl_subsurface *wl_subsurface, struct wl_surface *sibling) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subsurface, - WL_SUBSURFACE_PLACE_BELOW, sibling); -} - -/** - * @ingroup iface_wl_subsurface - * - * Change the commit behaviour of the sub-surface to synchronized - * mode, also described as the parent dependent mode. - * - * In synchronized mode, wl_surface.commit on a sub-surface will - * accumulate the committed state in a cache, but the state will - * not be applied and hence will not change the compositor output. - * The cached state is applied to the sub-surface immediately after - * the parent surface's state is applied. This ensures atomic - * updates of the parent and all its synchronized sub-surfaces. - * Applying the cached state will invalidate the cache, so further - * parent surface commits do not (re-)apply old state. - * - * See wl_subsurface for the recursive effect of this mode. - */ -static inline void -wl_subsurface_set_sync(struct wl_subsurface *wl_subsurface) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subsurface, - WL_SUBSURFACE_SET_SYNC); -} - -/** - * @ingroup iface_wl_subsurface - * - * Change the commit behaviour of the sub-surface to desynchronized - * mode, also described as independent or freely running mode. - * - * In desynchronized mode, wl_surface.commit on a sub-surface will - * apply the pending state directly, without caching, as happens - * normally with a wl_surface. Calling wl_surface.commit on the - * parent surface has no effect on the sub-surface's wl_surface - * state. This mode allows a sub-surface to be updated on its own. - * - * If cached state exists when wl_surface.commit is called in - * desynchronized mode, the pending state is added to the cached - * state, and applied as a whole. This invalidates the cache. - * - * Note: even if a sub-surface is set to desynchronized, a parent - * sub-surface may override it to behave as synchronized. For details, - * see wl_subsurface. - * - * If a surface's parent surface behaves as desynchronized, then - * the cached state is applied on set_desync. - */ -static inline void -wl_subsurface_set_desync(struct wl_subsurface *wl_subsurface) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subsurface, - WL_SUBSURFACE_SET_DESYNC); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland/include/protocol/wayland-server-protocol-core.h b/chromium/third_party/wayland/include/protocol/wayland-server-protocol-core.h deleted file mode 100644 index df439c944e0..00000000000 --- a/chromium/third_party/wayland/include/protocol/wayland-server-protocol-core.h +++ /dev/null @@ -1,4335 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef WAYLAND_SERVER_PROTOCOL_H -#define WAYLAND_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server-core.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_wayland The wayland protocol - * @section page_ifaces_wayland Interfaces - * - @subpage page_iface_wl_display - core global object - * - @subpage page_iface_wl_registry - global registry object - * - @subpage page_iface_wl_callback - callback object - * - @subpage page_iface_wl_compositor - the compositor singleton - * - @subpage page_iface_wl_shm_pool - a shared memory pool - * - @subpage page_iface_wl_shm - shared memory support - * - @subpage page_iface_wl_buffer - content for a wl_surface - * - @subpage page_iface_wl_data_offer - offer to transfer data - * - @subpage page_iface_wl_data_source - offer to transfer data - * - @subpage page_iface_wl_data_device - data transfer device - * - @subpage page_iface_wl_data_device_manager - data transfer interface - * - @subpage page_iface_wl_shell - create desktop-style surfaces - * - @subpage page_iface_wl_shell_surface - desktop-style metadata interface - * - @subpage page_iface_wl_surface - an onscreen surface - * - @subpage page_iface_wl_seat - group of input devices - * - @subpage page_iface_wl_pointer - pointer input device - * - @subpage page_iface_wl_keyboard - keyboard input device - * - @subpage page_iface_wl_touch - touchscreen input device - * - @subpage page_iface_wl_output - compositor output region - * - @subpage page_iface_wl_region - region interface - * - @subpage page_iface_wl_subcompositor - sub-surface compositing - * - @subpage page_iface_wl_subsurface - sub-surface interface to a wl_surface - * @section page_copyright_wayland Copyright - * <pre> - * - * Copyright © 2008-2011 Kristian Høgsberg - * Copyright © 2010-2011 Intel Corporation - * Copyright © 2012-2013 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. - * </pre> - */ -struct wl_buffer; -struct wl_callback; -struct wl_compositor; -struct wl_data_device; -struct wl_data_device_manager; -struct wl_data_offer; -struct wl_data_source; -struct wl_display; -struct wl_keyboard; -struct wl_output; -struct wl_pointer; -struct wl_region; -struct wl_registry; -struct wl_seat; -struct wl_shell; -struct wl_shell_surface; -struct wl_shm; -struct wl_shm_pool; -struct wl_subcompositor; -struct wl_subsurface; -struct wl_surface; -struct wl_touch; - -/** - * @page page_iface_wl_display wl_display - * @section page_iface_wl_display_desc Description - * - * The core global object. This is a special singleton object. It - * is used for internal Wayland protocol features. - * @section page_iface_wl_display_api API - * See @ref iface_wl_display. - */ -/** - * @defgroup iface_wl_display The wl_display interface - * - * The core global object. This is a special singleton object. It - * is used for internal Wayland protocol features. - */ -extern const struct wl_interface wl_display_interface; -/** - * @page page_iface_wl_registry wl_registry - * @section page_iface_wl_registry_desc Description - * - * The singleton global registry object. The server has a number of - * global objects that are available to all clients. These objects - * typically represent an actual object in the server (for example, - * an input device) or they are singleton objects that provide - * extension functionality. - * - * When a client creates a registry object, the registry object - * will emit a global event for each global currently in the - * registry. Globals come and go as a result of device or - * monitor hotplugs, reconfiguration or other events, and the - * registry will send out global and global_remove events to - * keep the client up to date with the changes. To mark the end - * of the initial burst of events, the client can use the - * wl_display.sync request immediately after calling - * wl_display.get_registry. - * - * A client can bind to a global object by using the bind - * request. This creates a client-side handle that lets the object - * emit events to the client and lets the client invoke requests on - * the object. - * @section page_iface_wl_registry_api API - * See @ref iface_wl_registry. - */ -/** - * @defgroup iface_wl_registry The wl_registry interface - * - * The singleton global registry object. The server has a number of - * global objects that are available to all clients. These objects - * typically represent an actual object in the server (for example, - * an input device) or they are singleton objects that provide - * extension functionality. - * - * When a client creates a registry object, the registry object - * will emit a global event for each global currently in the - * registry. Globals come and go as a result of device or - * monitor hotplugs, reconfiguration or other events, and the - * registry will send out global and global_remove events to - * keep the client up to date with the changes. To mark the end - * of the initial burst of events, the client can use the - * wl_display.sync request immediately after calling - * wl_display.get_registry. - * - * A client can bind to a global object by using the bind - * request. This creates a client-side handle that lets the object - * emit events to the client and lets the client invoke requests on - * the object. - */ -extern const struct wl_interface wl_registry_interface; -/** - * @page page_iface_wl_callback wl_callback - * @section page_iface_wl_callback_desc Description - * - * Clients can handle the 'done' event to get notified when - * the related request is done. - * @section page_iface_wl_callback_api API - * See @ref iface_wl_callback. - */ -/** - * @defgroup iface_wl_callback The wl_callback interface - * - * Clients can handle the 'done' event to get notified when - * the related request is done. - */ -extern const struct wl_interface wl_callback_interface; -/** - * @page page_iface_wl_compositor wl_compositor - * @section page_iface_wl_compositor_desc Description - * - * A compositor. This object is a singleton global. The - * compositor is in charge of combining the contents of multiple - * surfaces into one displayable output. - * @section page_iface_wl_compositor_api API - * See @ref iface_wl_compositor. - */ -/** - * @defgroup iface_wl_compositor The wl_compositor interface - * - * A compositor. This object is a singleton global. The - * compositor is in charge of combining the contents of multiple - * surfaces into one displayable output. - */ -extern const struct wl_interface wl_compositor_interface; -/** - * @page page_iface_wl_shm_pool wl_shm_pool - * @section page_iface_wl_shm_pool_desc Description - * - * The wl_shm_pool object encapsulates a piece of memory shared - * between the compositor and client. Through the wl_shm_pool - * object, the client can allocate shared memory wl_buffer objects. - * All objects created through the same pool share the same - * underlying mapped memory. Reusing the mapped memory avoids the - * setup/teardown overhead and is useful when interactively resizing - * a surface or for many small buffers. - * @section page_iface_wl_shm_pool_api API - * See @ref iface_wl_shm_pool. - */ -/** - * @defgroup iface_wl_shm_pool The wl_shm_pool interface - * - * The wl_shm_pool object encapsulates a piece of memory shared - * between the compositor and client. Through the wl_shm_pool - * object, the client can allocate shared memory wl_buffer objects. - * All objects created through the same pool share the same - * underlying mapped memory. Reusing the mapped memory avoids the - * setup/teardown overhead and is useful when interactively resizing - * a surface or for many small buffers. - */ -extern const struct wl_interface wl_shm_pool_interface; -/** - * @page page_iface_wl_shm wl_shm - * @section page_iface_wl_shm_desc Description - * - * A singleton global object that provides support for shared - * memory. - * - * Clients can create wl_shm_pool objects using the create_pool - * request. - * - * At connection setup time, the wl_shm object emits one or more - * format events to inform clients about the valid pixel formats - * that can be used for buffers. - * @section page_iface_wl_shm_api API - * See @ref iface_wl_shm. - */ -/** - * @defgroup iface_wl_shm The wl_shm interface - * - * A singleton global object that provides support for shared - * memory. - * - * Clients can create wl_shm_pool objects using the create_pool - * request. - * - * At connection setup time, the wl_shm object emits one or more - * format events to inform clients about the valid pixel formats - * that can be used for buffers. - */ -extern const struct wl_interface wl_shm_interface; -/** - * @page page_iface_wl_buffer wl_buffer - * @section page_iface_wl_buffer_desc Description - * - * A buffer provides the content for a wl_surface. Buffers are - * created through factory interfaces such as wl_drm, wl_shm or - * similar. It has a width and a height and can be attached to a - * wl_surface, but the mechanism by which a client provides and - * updates the contents is defined by the buffer factory interface. - * @section page_iface_wl_buffer_api API - * See @ref iface_wl_buffer. - */ -/** - * @defgroup iface_wl_buffer The wl_buffer interface - * - * A buffer provides the content for a wl_surface. Buffers are - * created through factory interfaces such as wl_drm, wl_shm or - * similar. It has a width and a height and can be attached to a - * wl_surface, but the mechanism by which a client provides and - * updates the contents is defined by the buffer factory interface. - */ -extern const struct wl_interface wl_buffer_interface; -/** - * @page page_iface_wl_data_offer wl_data_offer - * @section page_iface_wl_data_offer_desc Description - * - * A wl_data_offer represents a piece of data offered for transfer - * by another client (the source client). It is used by the - * copy-and-paste and drag-and-drop mechanisms. 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. - * @section page_iface_wl_data_offer_api API - * See @ref iface_wl_data_offer. - */ -/** - * @defgroup iface_wl_data_offer The wl_data_offer interface - * - * A wl_data_offer represents a piece of data offered for transfer - * by another client (the source client). It is used by the - * copy-and-paste and drag-and-drop mechanisms. 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. - */ -extern const struct wl_interface wl_data_offer_interface; -/** - * @page page_iface_wl_data_source wl_data_source - * @section page_iface_wl_data_source_desc Description - * - * The wl_data_source object is the source side of a wl_data_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. - * @section page_iface_wl_data_source_api API - * See @ref iface_wl_data_source. - */ -/** - * @defgroup iface_wl_data_source The wl_data_source interface - * - * The wl_data_source object is the source side of a wl_data_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. - */ -extern const struct wl_interface wl_data_source_interface; -/** - * @page page_iface_wl_data_device wl_data_device - * @section page_iface_wl_data_device_desc Description - * - * There is one wl_data_device per seat which can be obtained - * from the global wl_data_device_manager singleton. - * - * A wl_data_device provides access to inter-client data transfer - * mechanisms such as copy-and-paste and drag-and-drop. - * @section page_iface_wl_data_device_api API - * See @ref iface_wl_data_device. - */ -/** - * @defgroup iface_wl_data_device The wl_data_device interface - * - * There is one wl_data_device per seat which can be obtained - * from the global wl_data_device_manager singleton. - * - * A wl_data_device provides access to inter-client data transfer - * mechanisms such as copy-and-paste and drag-and-drop. - */ -extern const struct wl_interface wl_data_device_interface; -/** - * @page page_iface_wl_data_device_manager wl_data_device_manager - * @section page_iface_wl_data_device_manager_desc Description - * - * The wl_data_device_manager is a singleton global object that - * provides access to inter-client data transfer mechanisms such as - * copy-and-paste and drag-and-drop. These mechanisms are tied to - * a wl_seat and this interface lets a client get a wl_data_device - * corresponding to a wl_seat. - * - * Depending on the version bound, the objects created from the bound - * wl_data_device_manager object will have different requirements for - * functioning properly. See wl_data_source.set_actions, - * wl_data_offer.accept and wl_data_offer.finish for details. - * @section page_iface_wl_data_device_manager_api API - * See @ref iface_wl_data_device_manager. - */ -/** - * @defgroup iface_wl_data_device_manager The wl_data_device_manager interface - * - * The wl_data_device_manager is a singleton global object that - * provides access to inter-client data transfer mechanisms such as - * copy-and-paste and drag-and-drop. These mechanisms are tied to - * a wl_seat and this interface lets a client get a wl_data_device - * corresponding to a wl_seat. - * - * Depending on the version bound, the objects created from the bound - * wl_data_device_manager object will have different requirements for - * functioning properly. See wl_data_source.set_actions, - * wl_data_offer.accept and wl_data_offer.finish for details. - */ -extern const struct wl_interface wl_data_device_manager_interface; -/** - * @page page_iface_wl_shell wl_shell - * @section page_iface_wl_shell_desc Description - * - * This interface is implemented by servers that provide - * desktop-style user interfaces. - * - * It allows clients to associate a wl_shell_surface with - * a basic surface. - * @section page_iface_wl_shell_api API - * See @ref iface_wl_shell. - */ -/** - * @defgroup iface_wl_shell The wl_shell interface - * - * This interface is implemented by servers that provide - * desktop-style user interfaces. - * - * It allows clients to associate a wl_shell_surface with - * a basic surface. - */ -extern const struct wl_interface wl_shell_interface; -/** - * @page page_iface_wl_shell_surface wl_shell_surface - * @section page_iface_wl_shell_surface_desc Description - * - * 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 toplevel, fullscreen - * or popup windows, move, resize or maximize them, associate - * metadata like title and class, etc. - * - * On the server side the object is automatically destroyed when - * the related wl_surface is destroyed. On the client side, - * wl_shell_surface_destroy() must be called before destroying - * the wl_surface object. - * @section page_iface_wl_shell_surface_api API - * See @ref iface_wl_shell_surface. - */ -/** - * @defgroup iface_wl_shell_surface The wl_shell_surface interface - * - * 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 toplevel, fullscreen - * or popup windows, move, resize or maximize them, associate - * metadata like title and class, etc. - * - * On the server side the object is automatically destroyed when - * the related wl_surface is destroyed. On the client side, - * wl_shell_surface_destroy() must be called before destroying - * the wl_surface object. - */ -extern const struct wl_interface wl_shell_surface_interface; -/** - * @page page_iface_wl_surface wl_surface - * @section page_iface_wl_surface_desc Description - * - * A surface is a rectangular area that is displayed on the screen. - * It has a location, size and pixel contents. - * - * The size of a surface (and relative positions on it) is described - * in surface-local coordinates, which may differ from the buffer - * coordinates of the pixel content, in case a buffer_transform - * or a buffer_scale is used. - * - * A surface without a "role" is fairly useless: a compositor does - * not know where, when or how to present it. The role is the - * purpose of a wl_surface. Examples of roles are a cursor for a - * pointer (as set by wl_pointer.set_cursor), a drag icon - * (wl_data_device.start_drag), a sub-surface - * (wl_subcompositor.get_subsurface), and a window as defined by a - * shell protocol (e.g. wl_shell.get_shell_surface). - * - * A surface can have only one role at a time. Initially a - * wl_surface does not have a role. Once a wl_surface is given a - * role, it is set permanently for the whole lifetime of the - * wl_surface object. Giving the current role again is allowed, - * unless explicitly forbidden by the relevant interface - * specification. - * - * Surface roles are given by requests in other interfaces such as - * wl_pointer.set_cursor. The request should explicitly mention - * that this request gives a role to a wl_surface. Often, this - * request also creates a new protocol object that represents the - * role and adds additional functionality to wl_surface. When a - * client wants to destroy a wl_surface, they must destroy this 'role - * object' before the wl_surface. - * - * Destroying the role object does not remove the role from the - * wl_surface, but it may stop the wl_surface from "playing the role". - * For instance, if a wl_subsurface object is destroyed, the wl_surface - * it was created for will be unmapped and forget its position and - * z-order. It is allowed to create a wl_subsurface for the same - * wl_surface again, but it is not allowed to use the wl_surface as - * a cursor (cursor is a different role than sub-surface, and role - * switching is not allowed). - * @section page_iface_wl_surface_api API - * See @ref iface_wl_surface. - */ -/** - * @defgroup iface_wl_surface The wl_surface interface - * - * A surface is a rectangular area that is displayed on the screen. - * It has a location, size and pixel contents. - * - * The size of a surface (and relative positions on it) is described - * in surface-local coordinates, which may differ from the buffer - * coordinates of the pixel content, in case a buffer_transform - * or a buffer_scale is used. - * - * A surface without a "role" is fairly useless: a compositor does - * not know where, when or how to present it. The role is the - * purpose of a wl_surface. Examples of roles are a cursor for a - * pointer (as set by wl_pointer.set_cursor), a drag icon - * (wl_data_device.start_drag), a sub-surface - * (wl_subcompositor.get_subsurface), and a window as defined by a - * shell protocol (e.g. wl_shell.get_shell_surface). - * - * A surface can have only one role at a time. Initially a - * wl_surface does not have a role. Once a wl_surface is given a - * role, it is set permanently for the whole lifetime of the - * wl_surface object. Giving the current role again is allowed, - * unless explicitly forbidden by the relevant interface - * specification. - * - * Surface roles are given by requests in other interfaces such as - * wl_pointer.set_cursor. The request should explicitly mention - * that this request gives a role to a wl_surface. Often, this - * request also creates a new protocol object that represents the - * role and adds additional functionality to wl_surface. When a - * client wants to destroy a wl_surface, they must destroy this 'role - * object' before the wl_surface. - * - * Destroying the role object does not remove the role from the - * wl_surface, but it may stop the wl_surface from "playing the role". - * For instance, if a wl_subsurface object is destroyed, the wl_surface - * it was created for will be unmapped and forget its position and - * z-order. It is allowed to create a wl_subsurface for the same - * wl_surface again, but it is not allowed to use the wl_surface as - * a cursor (cursor is a different role than sub-surface, and role - * switching is not allowed). - */ -extern const struct wl_interface wl_surface_interface; -/** - * @page page_iface_wl_seat wl_seat - * @section page_iface_wl_seat_desc Description - * - * A seat is a group of keyboards, pointer and touch devices. This - * object is published as a global during start up, or when such a - * device is hot plugged. A seat typically has a pointer and - * maintains a keyboard focus and a pointer focus. - * @section page_iface_wl_seat_api API - * See @ref iface_wl_seat. - */ -/** - * @defgroup iface_wl_seat The wl_seat interface - * - * A seat is a group of keyboards, pointer and touch devices. This - * object is published as a global during start up, or when such a - * device is hot plugged. A seat typically has a pointer and - * maintains a keyboard focus and a pointer focus. - */ -extern const struct wl_interface wl_seat_interface; -/** - * @page page_iface_wl_pointer wl_pointer - * @section page_iface_wl_pointer_desc Description - * - * The wl_pointer interface represents one or more input devices, - * such as mice, which control the pointer location and pointer_focus - * of a seat. - * - * The wl_pointer interface generates motion, enter and leave - * events for the surfaces that the pointer is located over, - * and button and axis events for button presses, button releases - * and scrolling. - * @section page_iface_wl_pointer_api API - * See @ref iface_wl_pointer. - */ -/** - * @defgroup iface_wl_pointer The wl_pointer interface - * - * The wl_pointer interface represents one or more input devices, - * such as mice, which control the pointer location and pointer_focus - * of a seat. - * - * The wl_pointer interface generates motion, enter and leave - * events for the surfaces that the pointer is located over, - * and button and axis events for button presses, button releases - * and scrolling. - */ -extern const struct wl_interface wl_pointer_interface; -/** - * @page page_iface_wl_keyboard wl_keyboard - * @section page_iface_wl_keyboard_desc Description - * - * The wl_keyboard interface represents one or more keyboards - * associated with a seat. - * @section page_iface_wl_keyboard_api API - * See @ref iface_wl_keyboard. - */ -/** - * @defgroup iface_wl_keyboard The wl_keyboard interface - * - * The wl_keyboard interface represents one or more keyboards - * associated with a seat. - */ -extern const struct wl_interface wl_keyboard_interface; -/** - * @page page_iface_wl_touch wl_touch - * @section page_iface_wl_touch_desc Description - * - * The wl_touch interface represents a touchscreen - * associated with a seat. - * - * Touch interactions can consist of one or more contacts. - * For each contact, a series of events is generated, starting - * with a down event, followed by zero or more motion events, - * and ending with an up event. Events relating to the same - * contact point can be identified by the ID of the sequence. - * @section page_iface_wl_touch_api API - * See @ref iface_wl_touch. - */ -/** - * @defgroup iface_wl_touch The wl_touch interface - * - * The wl_touch interface represents a touchscreen - * associated with a seat. - * - * Touch interactions can consist of one or more contacts. - * For each contact, a series of events is generated, starting - * with a down event, followed by zero or more motion events, - * and ending with an up event. Events relating to the same - * contact point can be identified by the ID of the sequence. - */ -extern const struct wl_interface wl_touch_interface; -/** - * @page page_iface_wl_output wl_output - * @section page_iface_wl_output_desc Description - * - * An output describes part of the compositor geometry. The - * compositor works in the 'compositor coordinate system' and an - * output corresponds to a rectangular area in that space that is - * actually visible. This typically corresponds to a monitor that - * displays part of the compositor space. This object is published - * as global during start up, or when a monitor is hotplugged. - * @section page_iface_wl_output_api API - * See @ref iface_wl_output. - */ -/** - * @defgroup iface_wl_output The wl_output interface - * - * An output describes part of the compositor geometry. The - * compositor works in the 'compositor coordinate system' and an - * output corresponds to a rectangular area in that space that is - * actually visible. This typically corresponds to a monitor that - * displays part of the compositor space. This object is published - * as global during start up, or when a monitor is hotplugged. - */ -extern const struct wl_interface wl_output_interface; -/** - * @page page_iface_wl_region wl_region - * @section page_iface_wl_region_desc Description - * - * A region object describes an area. - * - * Region objects are used to describe the opaque and input - * regions of a surface. - * @section page_iface_wl_region_api API - * See @ref iface_wl_region. - */ -/** - * @defgroup iface_wl_region The wl_region interface - * - * A region object describes an area. - * - * Region objects are used to describe the opaque and input - * regions of a surface. - */ -extern const struct wl_interface wl_region_interface; -/** - * @page page_iface_wl_subcompositor wl_subcompositor - * @section page_iface_wl_subcompositor_desc Description - * - * The global interface exposing sub-surface compositing capabilities. - * A wl_surface, that has sub-surfaces associated, is called the - * parent surface. Sub-surfaces can be arbitrarily nested and create - * a tree of sub-surfaces. - * - * The root surface in a tree of sub-surfaces is the main - * surface. The main surface cannot be a sub-surface, because - * sub-surfaces must always have a parent. - * - * A main surface with its sub-surfaces forms a (compound) window. - * For window management purposes, this set of wl_surface objects is - * to be considered as a single window, and it should also behave as - * such. - * - * The aim of sub-surfaces is to offload some of the compositing work - * within a window from clients to the compositor. A prime example is - * a video player with decorations and video in separate wl_surface - * objects. This should allow the compositor to pass YUV video buffer - * processing to dedicated overlay hardware when possible. - * @section page_iface_wl_subcompositor_api API - * See @ref iface_wl_subcompositor. - */ -/** - * @defgroup iface_wl_subcompositor The wl_subcompositor interface - * - * The global interface exposing sub-surface compositing capabilities. - * A wl_surface, that has sub-surfaces associated, is called the - * parent surface. Sub-surfaces can be arbitrarily nested and create - * a tree of sub-surfaces. - * - * The root surface in a tree of sub-surfaces is the main - * surface. The main surface cannot be a sub-surface, because - * sub-surfaces must always have a parent. - * - * A main surface with its sub-surfaces forms a (compound) window. - * For window management purposes, this set of wl_surface objects is - * to be considered as a single window, and it should also behave as - * such. - * - * The aim of sub-surfaces is to offload some of the compositing work - * within a window from clients to the compositor. A prime example is - * a video player with decorations and video in separate wl_surface - * objects. This should allow the compositor to pass YUV video buffer - * processing to dedicated overlay hardware when possible. - */ -extern const struct wl_interface wl_subcompositor_interface; -/** - * @page page_iface_wl_subsurface wl_subsurface - * @section page_iface_wl_subsurface_desc Description - * - * An additional interface to a wl_surface object, which has been - * made a sub-surface. A sub-surface has one parent surface. A - * sub-surface's size and position are not limited to that of the parent. - * Particularly, a sub-surface is not automatically clipped to its - * parent's area. - * - * A sub-surface becomes mapped, when a non-NULL wl_buffer is applied - * and the parent surface is mapped. The order of which one happens - * first is irrelevant. A sub-surface is hidden if the parent becomes - * hidden, or if a NULL wl_buffer is applied. These rules apply - * recursively through the tree of surfaces. - * - * The behaviour of a wl_surface.commit request on a sub-surface - * depends on the sub-surface's mode. The possible modes are - * synchronized and desynchronized, see methods - * wl_subsurface.set_sync and wl_subsurface.set_desync. Synchronized - * mode caches the wl_surface state to be applied when the parent's - * state gets applied, and desynchronized mode applies the pending - * wl_surface state directly. A sub-surface is initially in the - * synchronized mode. - * - * Sub-surfaces have also other kind of state, which is managed by - * wl_subsurface requests, as opposed to wl_surface requests. This - * state includes the sub-surface position relative to the parent - * surface (wl_subsurface.set_position), and the stacking order of - * the parent and its sub-surfaces (wl_subsurface.place_above and - * .place_below). This state is applied when the parent surface's - * wl_surface state is applied, regardless of the sub-surface's mode. - * As the exception, set_sync and set_desync are effective immediately. - * - * The main surface can be thought to be always in desynchronized mode, - * since it does not have a parent in the sub-surfaces sense. - * - * Even if a sub-surface is in desynchronized mode, it will behave as - * in synchronized mode, if its parent surface behaves as in - * synchronized mode. This rule is applied recursively throughout the - * tree of surfaces. This means, that one can set a sub-surface into - * synchronized mode, and then assume that all its child and grand-child - * sub-surfaces are synchronized, too, without explicitly setting them. - * - * If the wl_surface associated with the wl_subsurface is destroyed, the - * wl_subsurface object becomes inert. Note, that destroying either object - * takes effect immediately. If you need to synchronize the removal - * of a sub-surface to the parent surface update, unmap the sub-surface - * first by attaching a NULL wl_buffer, update parent, and then destroy - * the sub-surface. - * - * If the parent wl_surface object is destroyed, the sub-surface is - * unmapped. - * @section page_iface_wl_subsurface_api API - * See @ref iface_wl_subsurface. - */ -/** - * @defgroup iface_wl_subsurface The wl_subsurface interface - * - * An additional interface to a wl_surface object, which has been - * made a sub-surface. A sub-surface has one parent surface. A - * sub-surface's size and position are not limited to that of the parent. - * Particularly, a sub-surface is not automatically clipped to its - * parent's area. - * - * A sub-surface becomes mapped, when a non-NULL wl_buffer is applied - * and the parent surface is mapped. The order of which one happens - * first is irrelevant. A sub-surface is hidden if the parent becomes - * hidden, or if a NULL wl_buffer is applied. These rules apply - * recursively through the tree of surfaces. - * - * The behaviour of a wl_surface.commit request on a sub-surface - * depends on the sub-surface's mode. The possible modes are - * synchronized and desynchronized, see methods - * wl_subsurface.set_sync and wl_subsurface.set_desync. Synchronized - * mode caches the wl_surface state to be applied when the parent's - * state gets applied, and desynchronized mode applies the pending - * wl_surface state directly. A sub-surface is initially in the - * synchronized mode. - * - * Sub-surfaces have also other kind of state, which is managed by - * wl_subsurface requests, as opposed to wl_surface requests. This - * state includes the sub-surface position relative to the parent - * surface (wl_subsurface.set_position), and the stacking order of - * the parent and its sub-surfaces (wl_subsurface.place_above and - * .place_below). This state is applied when the parent surface's - * wl_surface state is applied, regardless of the sub-surface's mode. - * As the exception, set_sync and set_desync are effective immediately. - * - * The main surface can be thought to be always in desynchronized mode, - * since it does not have a parent in the sub-surfaces sense. - * - * Even if a sub-surface is in desynchronized mode, it will behave as - * in synchronized mode, if its parent surface behaves as in - * synchronized mode. This rule is applied recursively throughout the - * tree of surfaces. This means, that one can set a sub-surface into - * synchronized mode, and then assume that all its child and grand-child - * sub-surfaces are synchronized, too, without explicitly setting them. - * - * If the wl_surface associated with the wl_subsurface is destroyed, the - * wl_subsurface object becomes inert. Note, that destroying either object - * takes effect immediately. If you need to synchronize the removal - * of a sub-surface to the parent surface update, unmap the sub-surface - * first by attaching a NULL wl_buffer, update parent, and then destroy - * the sub-surface. - * - * If the parent wl_surface object is destroyed, the sub-surface is - * unmapped. - */ -extern const struct wl_interface wl_subsurface_interface; - -#ifndef WL_DISPLAY_ERROR_ENUM -#define WL_DISPLAY_ERROR_ENUM -/** - * @ingroup iface_wl_display - * global error values - * - * These errors are global and can be emitted in response to any - * server request. - */ -enum wl_display_error { - /** - * server couldn't find object - */ - WL_DISPLAY_ERROR_INVALID_OBJECT = 0, - /** - * method doesn't exist on the specified interface - */ - WL_DISPLAY_ERROR_INVALID_METHOD = 1, - /** - * server is out of memory - */ - WL_DISPLAY_ERROR_NO_MEMORY = 2, -}; -#endif /* WL_DISPLAY_ERROR_ENUM */ - -/** - * @ingroup iface_wl_display - * @struct wl_display_interface - */ -struct wl_display_interface { - /** - * asynchronous roundtrip - * - * The sync request asks the server to emit the 'done' event on - * the returned wl_callback object. Since requests are handled - * in-order and events are delivered in-order, this can be used as - * a barrier to ensure all previous requests and the resulting - * events have been handled. - * - * The object returned by this request will be destroyed by the - * compositor after the callback is fired and as such the client - * must not attempt to use it after that point. - * - * The callback_data passed in the callback is the event serial. - * @param callback callback object for the sync request - */ - void (*sync)(struct wl_client *client, - struct wl_resource *resource, - uint32_t callback); - /** - * get global registry object - * - * This request creates a registry object that allows the client - * to list and bind the global objects available from the - * compositor. - * @param registry global registry object - */ - void (*get_registry)(struct wl_client *client, - struct wl_resource *resource, - uint32_t registry); -}; - -#define WL_DISPLAY_ERROR 0 -#define WL_DISPLAY_DELETE_ID 1 - -/** - * @ingroup iface_wl_display - */ -#define WL_DISPLAY_ERROR_SINCE_VERSION 1 -/** - * @ingroup iface_wl_display - */ -#define WL_DISPLAY_DELETE_ID_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_display - */ -#define WL_DISPLAY_SYNC_SINCE_VERSION 1 -/** - * @ingroup iface_wl_display - */ -#define WL_DISPLAY_GET_REGISTRY_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_registry - * @struct wl_registry_interface - */ -struct wl_registry_interface { - /** - * bind an object to the display - * - * Binds a new, client-created object to the server using the - * specified name as the identifier. - * @param name unique numeric name of the object - * @param interface name of the objects interface - * @param version version of the objects interface - * @param id bounded object - */ - void (*bind)(struct wl_client *client, - struct wl_resource *resource, - uint32_t name, - const char *interface, uint32_t version, uint32_t id); -}; - -#define WL_REGISTRY_GLOBAL 0 -#define WL_REGISTRY_GLOBAL_REMOVE 1 - -/** - * @ingroup iface_wl_registry - */ -#define WL_REGISTRY_GLOBAL_SINCE_VERSION 1 -/** - * @ingroup iface_wl_registry - */ -#define WL_REGISTRY_GLOBAL_REMOVE_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_registry - */ -#define WL_REGISTRY_BIND_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_registry - * Sends an global event to the client owning the resource. - * @param resource_ The client's resource - * @param name numeric name of the global object - * @param interface interface implemented by the object - * @param version interface version - */ -static inline void -wl_registry_send_global(struct wl_resource *resource_, uint32_t name, const char *interface, uint32_t version) -{ - wl_resource_post_event(resource_, WL_REGISTRY_GLOBAL, name, interface, version); -} - -/** - * @ingroup iface_wl_registry - * Sends an global_remove event to the client owning the resource. - * @param resource_ The client's resource - * @param name numeric name of the global object - */ -static inline void -wl_registry_send_global_remove(struct wl_resource *resource_, uint32_t name) -{ - wl_resource_post_event(resource_, WL_REGISTRY_GLOBAL_REMOVE, name); -} - -#define WL_CALLBACK_DONE 0 - -/** - * @ingroup iface_wl_callback - */ -#define WL_CALLBACK_DONE_SINCE_VERSION 1 - - -/** - * @ingroup iface_wl_callback - * Sends an done event to the client owning the resource. - * @param resource_ The client's resource - * @param callback_data request-specific data for the callback - */ -static inline void -wl_callback_send_done(struct wl_resource *resource_, uint32_t callback_data) -{ - wl_resource_post_event(resource_, WL_CALLBACK_DONE, callback_data); -} - -/** - * @ingroup iface_wl_compositor - * @struct wl_compositor_interface - */ -struct wl_compositor_interface { - /** - * create new surface - * - * Ask the compositor to create a new surface. - * @param id the new surface - */ - void (*create_surface)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id); - /** - * create new region - * - * Ask the compositor to create a new region. - * @param id the new region - */ - void (*create_region)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id); -}; - - -/** - * @ingroup iface_wl_compositor - */ -#define WL_COMPOSITOR_CREATE_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_compositor - */ -#define WL_COMPOSITOR_CREATE_REGION_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_shm_pool - * @struct wl_shm_pool_interface - */ -struct wl_shm_pool_interface { - /** - * create a buffer from the pool - * - * Create a wl_buffer object from the pool. - * - * The buffer is created offset bytes into the pool and has width - * and height as specified. The stride argument specifies the - * number of bytes from the beginning of one row to the beginning - * of the next. The format is the pixel format of the buffer and - * must be one of those advertised through the wl_shm.format event. - * - * A buffer will keep a reference to the pool it was created from - * so it is valid to destroy the pool immediately after creating a - * buffer from it. - * @param id buffer to create - * @param offset buffer byte offset within the pool - * @param width buffer width, in pixels - * @param height buffer height, in pixels - * @param stride number of bytes from the beginning of one row to the beginning of the next row - * @param format buffer pixel format - */ - void (*create_buffer)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - int32_t offset, - int32_t width, - int32_t height, - int32_t stride, - uint32_t format); - /** - * destroy the pool - * - * Destroy the shared memory pool. - * - * The mmapped memory will be released when all buffers that have - * been created from this pool are gone. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * change the size of the pool mapping - * - * This request will cause the server to remap the backing memory - * for the pool from the file descriptor passed when the pool was - * created, but using the new size. This request can only be used - * to make the pool bigger. - * @param size new size of the pool, in bytes - */ - void (*resize)(struct wl_client *client, - struct wl_resource *resource, - int32_t size); -}; - - -/** - * @ingroup iface_wl_shm_pool - */ -#define WL_SHM_POOL_CREATE_BUFFER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shm_pool - */ -#define WL_SHM_POOL_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shm_pool - */ -#define WL_SHM_POOL_RESIZE_SINCE_VERSION 1 - -#ifndef WL_SHM_ERROR_ENUM -#define WL_SHM_ERROR_ENUM -/** - * @ingroup iface_wl_shm - * wl_shm error values - * - * These errors can be emitted in response to wl_shm requests. - */ -enum wl_shm_error { - /** - * buffer format is not known - */ - WL_SHM_ERROR_INVALID_FORMAT = 0, - /** - * invalid size or stride during pool or buffer creation - */ - WL_SHM_ERROR_INVALID_STRIDE = 1, - /** - * mmapping the file descriptor failed - */ - WL_SHM_ERROR_INVALID_FD = 2, -}; -#endif /* WL_SHM_ERROR_ENUM */ - -#ifndef WL_SHM_FORMAT_ENUM -#define WL_SHM_FORMAT_ENUM -/** - * @ingroup iface_wl_shm - * pixel formats - * - * This describes the memory layout of an individual pixel. - * - * All renderers should support argb8888 and xrgb8888 but any other - * formats are optional and may not be supported by the particular - * renderer in use. - * - * The drm format codes match the macros defined in drm_fourcc.h. - * The formats actually supported by the compositor will be - * reported by the format event. - */ -enum wl_shm_format { - /** - * 32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian - */ - WL_SHM_FORMAT_ARGB8888 = 0, - /** - * 32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian - */ - WL_SHM_FORMAT_XRGB8888 = 1, - /** - * 8-bit color index format, [7:0] C - */ - WL_SHM_FORMAT_C8 = 0x20203843, - /** - * 8-bit RGB format, [7:0] R:G:B 3:3:2 - */ - WL_SHM_FORMAT_RGB332 = 0x38424752, - /** - * 8-bit BGR format, [7:0] B:G:R 2:3:3 - */ - WL_SHM_FORMAT_BGR233 = 0x38524742, - /** - * 16-bit xRGB format, [15:0] x:R:G:B 4:4:4:4 little endian - */ - WL_SHM_FORMAT_XRGB4444 = 0x32315258, - /** - * 16-bit xBGR format, [15:0] x:B:G:R 4:4:4:4 little endian - */ - WL_SHM_FORMAT_XBGR4444 = 0x32314258, - /** - * 16-bit RGBx format, [15:0] R:G:B:x 4:4:4:4 little endian - */ - WL_SHM_FORMAT_RGBX4444 = 0x32315852, - /** - * 16-bit BGRx format, [15:0] B:G:R:x 4:4:4:4 little endian - */ - WL_SHM_FORMAT_BGRX4444 = 0x32315842, - /** - * 16-bit ARGB format, [15:0] A:R:G:B 4:4:4:4 little endian - */ - WL_SHM_FORMAT_ARGB4444 = 0x32315241, - /** - * 16-bit ABGR format, [15:0] A:B:G:R 4:4:4:4 little endian - */ - WL_SHM_FORMAT_ABGR4444 = 0x32314241, - /** - * 16-bit RBGA format, [15:0] R:G:B:A 4:4:4:4 little endian - */ - WL_SHM_FORMAT_RGBA4444 = 0x32314152, - /** - * 16-bit BGRA format, [15:0] B:G:R:A 4:4:4:4 little endian - */ - WL_SHM_FORMAT_BGRA4444 = 0x32314142, - /** - * 16-bit xRGB format, [15:0] x:R:G:B 1:5:5:5 little endian - */ - WL_SHM_FORMAT_XRGB1555 = 0x35315258, - /** - * 16-bit xBGR 1555 format, [15:0] x:B:G:R 1:5:5:5 little endian - */ - WL_SHM_FORMAT_XBGR1555 = 0x35314258, - /** - * 16-bit RGBx 5551 format, [15:0] R:G:B:x 5:5:5:1 little endian - */ - WL_SHM_FORMAT_RGBX5551 = 0x35315852, - /** - * 16-bit BGRx 5551 format, [15:0] B:G:R:x 5:5:5:1 little endian - */ - WL_SHM_FORMAT_BGRX5551 = 0x35315842, - /** - * 16-bit ARGB 1555 format, [15:0] A:R:G:B 1:5:5:5 little endian - */ - WL_SHM_FORMAT_ARGB1555 = 0x35315241, - /** - * 16-bit ABGR 1555 format, [15:0] A:B:G:R 1:5:5:5 little endian - */ - WL_SHM_FORMAT_ABGR1555 = 0x35314241, - /** - * 16-bit RGBA 5551 format, [15:0] R:G:B:A 5:5:5:1 little endian - */ - WL_SHM_FORMAT_RGBA5551 = 0x35314152, - /** - * 16-bit BGRA 5551 format, [15:0] B:G:R:A 5:5:5:1 little endian - */ - WL_SHM_FORMAT_BGRA5551 = 0x35314142, - /** - * 16-bit RGB 565 format, [15:0] R:G:B 5:6:5 little endian - */ - WL_SHM_FORMAT_RGB565 = 0x36314752, - /** - * 16-bit BGR 565 format, [15:0] B:G:R 5:6:5 little endian - */ - WL_SHM_FORMAT_BGR565 = 0x36314742, - /** - * 24-bit RGB format, [23:0] R:G:B little endian - */ - WL_SHM_FORMAT_RGB888 = 0x34324752, - /** - * 24-bit BGR format, [23:0] B:G:R little endian - */ - WL_SHM_FORMAT_BGR888 = 0x34324742, - /** - * 32-bit xBGR format, [31:0] x:B:G:R 8:8:8:8 little endian - */ - WL_SHM_FORMAT_XBGR8888 = 0x34324258, - /** - * 32-bit RGBx format, [31:0] R:G:B:x 8:8:8:8 little endian - */ - WL_SHM_FORMAT_RGBX8888 = 0x34325852, - /** - * 32-bit BGRx format, [31:0] B:G:R:x 8:8:8:8 little endian - */ - WL_SHM_FORMAT_BGRX8888 = 0x34325842, - /** - * 32-bit ABGR format, [31:0] A:B:G:R 8:8:8:8 little endian - */ - WL_SHM_FORMAT_ABGR8888 = 0x34324241, - /** - * 32-bit RGBA format, [31:0] R:G:B:A 8:8:8:8 little endian - */ - WL_SHM_FORMAT_RGBA8888 = 0x34324152, - /** - * 32-bit BGRA format, [31:0] B:G:R:A 8:8:8:8 little endian - */ - WL_SHM_FORMAT_BGRA8888 = 0x34324142, - /** - * 32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian - */ - WL_SHM_FORMAT_XRGB2101010 = 0x30335258, - /** - * 32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian - */ - WL_SHM_FORMAT_XBGR2101010 = 0x30334258, - /** - * 32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian - */ - WL_SHM_FORMAT_RGBX1010102 = 0x30335852, - /** - * 32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian - */ - WL_SHM_FORMAT_BGRX1010102 = 0x30335842, - /** - * 32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian - */ - WL_SHM_FORMAT_ARGB2101010 = 0x30335241, - /** - * 32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian - */ - WL_SHM_FORMAT_ABGR2101010 = 0x30334241, - /** - * 32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian - */ - WL_SHM_FORMAT_RGBA1010102 = 0x30334152, - /** - * 32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian - */ - WL_SHM_FORMAT_BGRA1010102 = 0x30334142, - /** - * packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian - */ - WL_SHM_FORMAT_YUYV = 0x56595559, - /** - * packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian - */ - WL_SHM_FORMAT_YVYU = 0x55595659, - /** - * packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian - */ - WL_SHM_FORMAT_UYVY = 0x59565955, - /** - * packed YCbCr format, [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian - */ - WL_SHM_FORMAT_VYUY = 0x59555956, - /** - * packed AYCbCr format, [31:0] A:Y:Cb:Cr 8:8:8:8 little endian - */ - WL_SHM_FORMAT_AYUV = 0x56555941, - /** - * 2 plane YCbCr Cr:Cb format, 2x2 subsampled Cr:Cb plane - */ - WL_SHM_FORMAT_NV12 = 0x3231564e, - /** - * 2 plane YCbCr Cb:Cr format, 2x2 subsampled Cb:Cr plane - */ - WL_SHM_FORMAT_NV21 = 0x3132564e, - /** - * 2 plane YCbCr Cr:Cb format, 2x1 subsampled Cr:Cb plane - */ - WL_SHM_FORMAT_NV16 = 0x3631564e, - /** - * 2 plane YCbCr Cb:Cr format, 2x1 subsampled Cb:Cr plane - */ - WL_SHM_FORMAT_NV61 = 0x3136564e, - /** - * 3 plane YCbCr format, 4x4 subsampled Cb (1) and Cr (2) planes - */ - WL_SHM_FORMAT_YUV410 = 0x39565559, - /** - * 3 plane YCbCr format, 4x4 subsampled Cr (1) and Cb (2) planes - */ - WL_SHM_FORMAT_YVU410 = 0x39555659, - /** - * 3 plane YCbCr format, 4x1 subsampled Cb (1) and Cr (2) planes - */ - WL_SHM_FORMAT_YUV411 = 0x31315559, - /** - * 3 plane YCbCr format, 4x1 subsampled Cr (1) and Cb (2) planes - */ - WL_SHM_FORMAT_YVU411 = 0x31315659, - /** - * 3 plane YCbCr format, 2x2 subsampled Cb (1) and Cr (2) planes - */ - WL_SHM_FORMAT_YUV420 = 0x32315559, - /** - * 3 plane YCbCr format, 2x2 subsampled Cr (1) and Cb (2) planes - */ - WL_SHM_FORMAT_YVU420 = 0x32315659, - /** - * 3 plane YCbCr format, 2x1 subsampled Cb (1) and Cr (2) planes - */ - WL_SHM_FORMAT_YUV422 = 0x36315559, - /** - * 3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes - */ - WL_SHM_FORMAT_YVU422 = 0x36315659, - /** - * 3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes - */ - WL_SHM_FORMAT_YUV444 = 0x34325559, - /** - * 3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes - */ - WL_SHM_FORMAT_YVU444 = 0x34325659, -}; -#endif /* WL_SHM_FORMAT_ENUM */ - -/** - * @ingroup iface_wl_shm - * @struct wl_shm_interface - */ -struct wl_shm_interface { - /** - * create a shm pool - * - * Create a new wl_shm_pool object. - * - * The pool can be used to create shared memory based buffer - * objects. The server will mmap size bytes of the passed file - * descriptor, to use as backing memory for the pool. - * @param id pool to create - * @param fd file descriptor for the pool - * @param size pool size, in bytes - */ - void (*create_pool)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - int32_t fd, - int32_t size); -}; - -#define WL_SHM_FORMAT 0 - -/** - * @ingroup iface_wl_shm - */ -#define WL_SHM_FORMAT_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_shm - */ -#define WL_SHM_CREATE_POOL_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_shm - * Sends an format event to the client owning the resource. - * @param resource_ The client's resource - * @param format buffer pixel format - */ -static inline void -wl_shm_send_format(struct wl_resource *resource_, uint32_t format) -{ - wl_resource_post_event(resource_, WL_SHM_FORMAT, format); -} - -/** - * @ingroup iface_wl_buffer - * @struct wl_buffer_interface - */ -struct wl_buffer_interface { - /** - * destroy a buffer - * - * Destroy a buffer. If and how you need to release the backing - * storage is defined by the buffer factory interface. - * - * For possible side-effects to a surface, see wl_surface.attach. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define WL_BUFFER_RELEASE 0 - -/** - * @ingroup iface_wl_buffer - */ -#define WL_BUFFER_RELEASE_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_buffer - */ -#define WL_BUFFER_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_buffer - * Sends an release event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_buffer_send_release(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_BUFFER_RELEASE); -} - -#ifndef WL_DATA_OFFER_ERROR_ENUM -#define WL_DATA_OFFER_ERROR_ENUM -enum wl_data_offer_error { - /** - * finish request was called untimely - */ - WL_DATA_OFFER_ERROR_INVALID_FINISH = 0, - /** - * action mask contains invalid values - */ - WL_DATA_OFFER_ERROR_INVALID_ACTION_MASK = 1, - /** - * action argument has an invalid value - */ - WL_DATA_OFFER_ERROR_INVALID_ACTION = 2, - /** - * offer doesn't accept this request - */ - WL_DATA_OFFER_ERROR_INVALID_OFFER = 3, -}; -#endif /* WL_DATA_OFFER_ERROR_ENUM */ - -/** - * @ingroup iface_wl_data_offer - * @struct wl_data_offer_interface - */ -struct wl_data_offer_interface { - /** - * accept one of the offered mime types - * - * Indicate that the client can accept the given mime type, or - * NULL for not accepted. - * - * For objects of version 2 or older, this request is used by the - * client to give feedback whether the client can receive the given - * mime type, or NULL if none is accepted; the feedback does not - * determine whether the drag-and-drop operation succeeds or not. - * - * For objects of version 3 or newer, this request determines the - * final result of the drag-and-drop operation. If the end result - * is that no mime types were accepted, the drag-and-drop operation - * will be cancelled and the corresponding drag source will receive - * wl_data_source.cancelled. Clients may still use this event in - * conjunction with wl_data_source.action for feedback. - * @param serial serial number of the accept request - * @param mime_type mime type accepted by the client - */ - void (*accept)(struct wl_client *client, - struct wl_resource *resource, - uint32_t serial, - const char *mime_type); - /** - * request that the data is transferred - * - * 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, - * both before and after wl_data_device.drop. Drag-and-drop - * destination clients may preemptively fetch data or examine it - * more closely to determine acceptance. - * @param mime_type mime type desired by receiver - * @param fd file descriptor for data transfer - */ - void (*receive)(struct wl_client *client, - struct wl_resource *resource, - const char *mime_type, - int32_t fd); - /** - * destroy data offer - * - * Destroy the data offer. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * the offer will no longer be used - * - * Notifies the compositor that the drag destination successfully - * finished the drag-and-drop operation. - * - * Upon receiving this request, the compositor will emit - * wl_data_source.dnd_finished on the drag source client. - * - * It is a client error to perform other requests than - * wl_data_offer.destroy after this one. It is also an error to - * perform this request after a NULL mime type has been set in - * wl_data_offer.accept or no action was received through - * wl_data_offer.action. - * @since 3 - */ - void (*finish)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the available/preferred drag-and-drop actions - * - * Sets the actions that the destination side client supports for - * this operation. This request may trigger the emission of - * wl_data_source.action and wl_data_offer.action events if the - * compositor needs to change the selected action. - * - * This request can be called multiple times throughout the - * drag-and-drop operation, typically in response to - * wl_data_device.enter or wl_data_device.motion events. - * - * This request determines the final result of the drag-and-drop - * operation. If the end result is that no action is accepted, the - * drag source will receive wl_drag_source.cancelled. - * - * The dnd_actions argument must contain only values expressed in - * the wl_data_device_manager.dnd_actions enum, and the - * preferred_action argument must only contain one of those values - * set, otherwise it will result in a protocol error. - * - * While managing an "ask" action, the destination drag-and-drop - * client may perform further wl_data_offer.receive requests, and - * is expected to perform one last wl_data_offer.set_actions - * request with a preferred action other than "ask" (and optionally - * wl_data_offer.accept) before requesting wl_data_offer.finish, in - * order to convey the action selected by the user. If the - * preferred action is not in the wl_data_offer.source_actions - * mask, an error will be raised. - * - * If the "ask" action is dismissed (e.g. user cancellation), the - * client is expected to perform wl_data_offer.destroy right away. - * - * This request can only be made on drag-and-drop offers, a - * protocol error will be raised otherwise. - * @param dnd_actions actions supported by the destination client - * @param preferred_action action preferred by the destination client - * @since 3 - */ - void (*set_actions)(struct wl_client *client, - struct wl_resource *resource, - uint32_t dnd_actions, - uint32_t preferred_action); -}; - -#define WL_DATA_OFFER_OFFER 0 -#define WL_DATA_OFFER_SOURCE_ACTIONS 1 -#define WL_DATA_OFFER_ACTION 2 - -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_OFFER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_SOURCE_ACTIONS_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_ACTION_SINCE_VERSION 3 - -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_ACCEPT_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_RECEIVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_FINISH_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_SET_ACTIONS_SINCE_VERSION 3 - -/** - * @ingroup iface_wl_data_offer - * Sends an offer event to the client owning the resource. - * @param resource_ The client's resource - * @param mime_type offered mime type - */ -static inline void -wl_data_offer_send_offer(struct wl_resource *resource_, const char *mime_type) -{ - wl_resource_post_event(resource_, WL_DATA_OFFER_OFFER, mime_type); -} - -/** - * @ingroup iface_wl_data_offer - * Sends an source_actions event to the client owning the resource. - * @param resource_ The client's resource - * @param source_actions actions offered by the data source - */ -static inline void -wl_data_offer_send_source_actions(struct wl_resource *resource_, uint32_t source_actions) -{ - wl_resource_post_event(resource_, WL_DATA_OFFER_SOURCE_ACTIONS, source_actions); -} - -/** - * @ingroup iface_wl_data_offer - * Sends an action event to the client owning the resource. - * @param resource_ The client's resource - * @param dnd_action action selected by the compositor - */ -static inline void -wl_data_offer_send_action(struct wl_resource *resource_, uint32_t dnd_action) -{ - wl_resource_post_event(resource_, WL_DATA_OFFER_ACTION, dnd_action); -} - -#ifndef WL_DATA_SOURCE_ERROR_ENUM -#define WL_DATA_SOURCE_ERROR_ENUM -enum wl_data_source_error { - /** - * action mask contains invalid values - */ - WL_DATA_SOURCE_ERROR_INVALID_ACTION_MASK = 0, - /** - * source doesn't accept this request - */ - WL_DATA_SOURCE_ERROR_INVALID_SOURCE = 1, -}; -#endif /* WL_DATA_SOURCE_ERROR_ENUM */ - -/** - * @ingroup iface_wl_data_source - * @struct wl_data_source_interface - */ -struct wl_data_source_interface { - /** - * add an offered mime type - * - * This request adds a mime type to the set of mime types - * advertised to targets. Can be called several times to offer - * multiple types. - * @param mime_type mime type offered by the data source - */ - void (*offer)(struct wl_client *client, - struct wl_resource *resource, - const char *mime_type); - /** - * destroy the data source - * - * Destroy the data source. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the available drag-and-drop actions - * - * Sets the actions that the source side client supports for this - * operation. This request may trigger wl_data_source.action and - * wl_data_offer.action events if the compositor needs to change - * the selected action. - * - * The dnd_actions argument must contain only values expressed in - * the wl_data_device_manager.dnd_actions enum, otherwise it will - * result in a protocol error. - * - * This request must be made once only, and 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 will raise a protocol error. - * @param dnd_actions actions supported by the data source - * @since 3 - */ - void (*set_actions)(struct wl_client *client, - struct wl_resource *resource, - uint32_t dnd_actions); -}; - -#define WL_DATA_SOURCE_TARGET 0 -#define WL_DATA_SOURCE_SEND 1 -#define WL_DATA_SOURCE_CANCELLED 2 -#define WL_DATA_SOURCE_DND_DROP_PERFORMED 3 -#define WL_DATA_SOURCE_DND_FINISHED 4 -#define WL_DATA_SOURCE_ACTION 5 - -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_TARGET_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_SEND_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_CANCELLED_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_DND_DROP_PERFORMED_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_DND_FINISHED_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_ACTION_SINCE_VERSION 3 - -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_OFFER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_SET_ACTIONS_SINCE_VERSION 3 - -/** - * @ingroup iface_wl_data_source - * Sends an target event to the client owning the resource. - * @param resource_ The client's resource - * @param mime_type mime type accepted by the target - */ -static inline void -wl_data_source_send_target(struct wl_resource *resource_, const char *mime_type) -{ - wl_resource_post_event(resource_, WL_DATA_SOURCE_TARGET, mime_type); -} - -/** - * @ingroup iface_wl_data_source - * Sends an send event to the client owning the resource. - * @param resource_ The client's resource - * @param mime_type mime type for the data - * @param fd file descriptor for the data - */ -static inline void -wl_data_source_send_send(struct wl_resource *resource_, const char *mime_type, int32_t fd) -{ - wl_resource_post_event(resource_, WL_DATA_SOURCE_SEND, mime_type, fd); -} - -/** - * @ingroup iface_wl_data_source - * Sends an cancelled event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_data_source_send_cancelled(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_DATA_SOURCE_CANCELLED); -} - -/** - * @ingroup iface_wl_data_source - * Sends an dnd_drop_performed event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_data_source_send_dnd_drop_performed(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_DATA_SOURCE_DND_DROP_PERFORMED); -} - -/** - * @ingroup iface_wl_data_source - * Sends an dnd_finished event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_data_source_send_dnd_finished(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_DATA_SOURCE_DND_FINISHED); -} - -/** - * @ingroup iface_wl_data_source - * Sends an action event to the client owning the resource. - * @param resource_ The client's resource - * @param dnd_action action selected by the compositor - */ -static inline void -wl_data_source_send_action(struct wl_resource *resource_, uint32_t dnd_action) -{ - wl_resource_post_event(resource_, WL_DATA_SOURCE_ACTION, dnd_action); -} - -#ifndef WL_DATA_DEVICE_ERROR_ENUM -#define WL_DATA_DEVICE_ERROR_ENUM -enum wl_data_device_error { - /** - * given wl_surface has another role - */ - WL_DATA_DEVICE_ERROR_ROLE = 0, -}; -#endif /* WL_DATA_DEVICE_ERROR_ENUM */ - -/** - * @ingroup iface_wl_data_device - * @struct wl_data_device_interface - */ -struct wl_data_device_interface { - /** - * start drag-and-drop operation - * - * This request asks the compositor to start a drag-and-drop - * operation on behalf of the client. - * - * The source argument is the data source that provides the data - * for the eventual data transfer. If source is NULL, enter, leave - * and motion events are sent only to the client that initiated the - * drag and the client is expected to handle the data passing - * internally. - * - * The origin surface is the surface where the drag originates and - * the client must have an active implicit grab that matches the - * serial. - * - * The icon surface is an optional (can be NULL) surface that - * provides an icon to be moved around with the cursor. Initially, - * the top-left corner of the icon surface is placed at the cursor - * hotspot, but subsequent wl_surface.attach request can move the - * relative position. Attach requests must be confirmed with - * wl_surface.commit as usual. The icon surface is given the role - * of a drag-and-drop icon. If the icon surface already has another - * role, it raises a protocol error. - * - * The current and pending input regions of the icon wl_surface are - * cleared, and wl_surface.set_input_region is ignored until the - * wl_surface is no longer used as the icon surface. When the use - * as an icon ends, the current and pending input regions become - * undefined, and the wl_surface is unmapped. - * @param source data source for the eventual transfer - * @param origin surface where the drag originates - * @param icon drag-and-drop icon surface - * @param serial serial number of the implicit grab on the origin - */ - void (*start_drag)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *source, - struct wl_resource *origin, - struct wl_resource *icon, - uint32_t serial); - /** - * copy data to the selection - * - * This request asks the compositor to set the selection to the - * data from the source on behalf of the client. - * - * To unset the selection, set the source to NULL. - * @param source data source for the selection - * @param serial serial number of the event that triggered this request - */ - void (*set_selection)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *source, - uint32_t serial); - /** - * destroy data device - * - * This request destroys the data device. - * @since 2 - */ - void (*release)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define WL_DATA_DEVICE_DATA_OFFER 0 -#define WL_DATA_DEVICE_ENTER 1 -#define WL_DATA_DEVICE_LEAVE 2 -#define WL_DATA_DEVICE_MOTION 3 -#define WL_DATA_DEVICE_DROP 4 -#define WL_DATA_DEVICE_SELECTION 5 - -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_DATA_OFFER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_LEAVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_MOTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_DROP_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_SELECTION_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_START_DRAG_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_SET_SELECTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_RELEASE_SINCE_VERSION 2 - -/** - * @ingroup iface_wl_data_device - * Sends an data_offer event to the client owning the resource. - * @param resource_ The client's resource - * @param id the new data_offer object - */ -static inline void -wl_data_device_send_data_offer(struct wl_resource *resource_, struct wl_resource *id) -{ - wl_resource_post_event(resource_, WL_DATA_DEVICE_DATA_OFFER, id); -} - -/** - * @ingroup iface_wl_data_device - * Sends an enter event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the enter event - * @param surface client surface entered - * @param x surface-local x coordinate - * @param y surface-local y coordinate - * @param id source data_offer object - */ -static inline void -wl_data_device_send_enter(struct wl_resource *resource_, uint32_t serial, struct wl_resource *surface, wl_fixed_t x, wl_fixed_t y, struct wl_resource *id) -{ - wl_resource_post_event(resource_, WL_DATA_DEVICE_ENTER, serial, surface, x, y, id); -} - -/** - * @ingroup iface_wl_data_device - * Sends an leave event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_data_device_send_leave(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_DATA_DEVICE_LEAVE); -} - -/** - * @ingroup iface_wl_data_device - * Sends an motion event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param x surface-local x coordinate - * @param y surface-local y coordinate - */ -static inline void -wl_data_device_send_motion(struct wl_resource *resource_, uint32_t time, wl_fixed_t x, wl_fixed_t y) -{ - wl_resource_post_event(resource_, WL_DATA_DEVICE_MOTION, time, x, y); -} - -/** - * @ingroup iface_wl_data_device - * Sends an drop event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_data_device_send_drop(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_DATA_DEVICE_DROP); -} - -/** - * @ingroup iface_wl_data_device - * Sends an selection event to the client owning the resource. - * @param resource_ The client's resource - * @param id selection data_offer object - */ -static inline void -wl_data_device_send_selection(struct wl_resource *resource_, struct wl_resource *id) -{ - wl_resource_post_event(resource_, WL_DATA_DEVICE_SELECTION, id); -} - -#ifndef WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM -#define WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM -/** - * @ingroup iface_wl_data_device_manager - * drag and drop actions - * - * This is a bitmask of the available/preferred actions in a - * drag-and-drop operation. - * - * In the compositor, the selected action is a result of matching the - * actions offered by the source and destination sides. "action" events - * with a "none" action will be sent to both source and destination if - * there is no match. All further checks will effectively happen on - * (source actions ∩ destination actions). - * - * In addition, compositors may also pick different actions in - * reaction to key modifiers being pressed. One common design that - * is used in major toolkits (and the behavior recommended for - * compositors) is: - * - * - If no modifiers are pressed, the first match (in bit order) - * will be used. - * - Pressing Shift selects "move", if enabled in the mask. - * - Pressing Control selects "copy", if enabled in the mask. - * - * Behavior beyond that is considered implementation-dependent. - * Compositors may for example bind other modifiers (like Alt/Meta) - * or drags initiated with other buttons than BTN_LEFT to specific - * actions (e.g. "ask"). - */ -enum wl_data_device_manager_dnd_action { - /** - * no action - */ - WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE = 0, - /** - * copy action - */ - WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY = 1, - /** - * move action - */ - WL_DATA_DEVICE_MANAGER_DND_ACTION_MOVE = 2, - /** - * ask action - */ - WL_DATA_DEVICE_MANAGER_DND_ACTION_ASK = 4, -}; -#endif /* WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM */ - -/** - * @ingroup iface_wl_data_device_manager - * @struct wl_data_device_manager_interface - */ -struct wl_data_device_manager_interface { - /** - * create a new data source - * - * Create a new data source. - * @param id data source to create - */ - void (*create_data_source)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id); - /** - * create a new data device - * - * Create a new data device for a given seat. - * @param id data device to create - * @param seat seat associated with the data device - */ - void (*get_data_device)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *seat); -}; - - -/** - * @ingroup iface_wl_data_device_manager - */ -#define WL_DATA_DEVICE_MANAGER_CREATE_DATA_SOURCE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device_manager - */ -#define WL_DATA_DEVICE_MANAGER_GET_DATA_DEVICE_SINCE_VERSION 1 - -#ifndef WL_SHELL_ERROR_ENUM -#define WL_SHELL_ERROR_ENUM -enum wl_shell_error { - /** - * given wl_surface has another role - */ - WL_SHELL_ERROR_ROLE = 0, -}; -#endif /* WL_SHELL_ERROR_ENUM */ - -/** - * @ingroup iface_wl_shell - * @struct wl_shell_interface - */ -struct wl_shell_interface { - /** - * create a shell surface from a surface - * - * Create a shell surface for an existing surface. This gives the - * wl_surface the role of a shell surface. If the wl_surface - * already has another role, it raises a protocol error. - * - * Only one shell surface can be associated with a given surface. - * @param id shell surface to create - * @param surface surface to be given the shell surface role - */ - void (*get_shell_surface)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface); -}; - - -/** - * @ingroup iface_wl_shell - */ -#define WL_SHELL_GET_SHELL_SURFACE_SINCE_VERSION 1 - -#ifndef WL_SHELL_SURFACE_RESIZE_ENUM -#define WL_SHELL_SURFACE_RESIZE_ENUM -/** - * @ingroup iface_wl_shell_surface - * edge values for resizing - * - * These values are used to indicate which edge of a surface - * is being dragged in a resize operation. The server may - * use this information to adapt its behavior, e.g. choose - * an appropriate cursor image. - */ -enum wl_shell_surface_resize { - /** - * no edge - */ - WL_SHELL_SURFACE_RESIZE_NONE = 0, - /** - * top edge - */ - WL_SHELL_SURFACE_RESIZE_TOP = 1, - /** - * bottom edge - */ - WL_SHELL_SURFACE_RESIZE_BOTTOM = 2, - /** - * left edge - */ - WL_SHELL_SURFACE_RESIZE_LEFT = 4, - /** - * top and left edges - */ - WL_SHELL_SURFACE_RESIZE_TOP_LEFT = 5, - /** - * bottom and left edges - */ - WL_SHELL_SURFACE_RESIZE_BOTTOM_LEFT = 6, - /** - * right edge - */ - WL_SHELL_SURFACE_RESIZE_RIGHT = 8, - /** - * top and right edges - */ - WL_SHELL_SURFACE_RESIZE_TOP_RIGHT = 9, - /** - * bottom and right edges - */ - WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT = 10, -}; -#endif /* WL_SHELL_SURFACE_RESIZE_ENUM */ - -#ifndef WL_SHELL_SURFACE_TRANSIENT_ENUM -#define WL_SHELL_SURFACE_TRANSIENT_ENUM -/** - * @ingroup iface_wl_shell_surface - * details of transient behaviour - * - * These flags specify details of the expected behaviour - * of transient surfaces. Used in the set_transient request. - */ -enum wl_shell_surface_transient { - /** - * do not set keyboard focus - */ - WL_SHELL_SURFACE_TRANSIENT_INACTIVE = 0x1, -}; -#endif /* WL_SHELL_SURFACE_TRANSIENT_ENUM */ - -#ifndef WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM -#define WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM -/** - * @ingroup iface_wl_shell_surface - * different method to set the surface fullscreen - * - * 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. - */ -enum wl_shell_surface_fullscreen_method { - /** - * no preference, apply default policy - */ - WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT = 0, - /** - * scale, preserve the surface's aspect ratio and center on output - */ - WL_SHELL_SURFACE_FULLSCREEN_METHOD_SCALE = 1, - /** - * switch output mode to the smallest mode that can fit the surface, add black borders to compensate size mismatch - */ - WL_SHELL_SURFACE_FULLSCREEN_METHOD_DRIVER = 2, - /** - * no upscaling, center on output and add black borders to compensate size mismatch - */ - WL_SHELL_SURFACE_FULLSCREEN_METHOD_FILL = 3, -}; -#endif /* WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM */ - -/** - * @ingroup iface_wl_shell_surface - * @struct wl_shell_surface_interface - */ -struct wl_shell_surface_interface { - /** - * respond to a ping event - * - * A client must respond to a ping event with a pong request or - * the client may be deemed unresponsive. - * @param serial serial number of the ping event - */ - void (*pong)(struct wl_client *client, - struct wl_resource *resource, - uint32_t serial); - /** - * start an interactive move - * - * Start a pointer-driven move of the surface. - * - * This request must be used in response to a button press event. - * The server may ignore move requests depending on the state of - * the surface (e.g. fullscreen or maximized). - * @param seat seat whose pointer is used - * @param serial serial number of the implicit grab on the pointer - */ - void (*move)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *seat, - uint32_t serial); - /** - * start an interactive resize - * - * Start a pointer-driven resizing of the surface. - * - * This request must be used in response to a button press event. - * The server may ignore resize requests depending on the state of - * the surface (e.g. fullscreen or maximized). - * @param seat seat whose pointer is used - * @param serial serial number of the implicit grab on the pointer - * @param edges which edge or corner is being dragged - */ - void (*resize)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *seat, - uint32_t serial, - uint32_t edges); - /** - * make the surface a toplevel surface - * - * Map the surface as a toplevel surface. - * - * A toplevel surface is not fullscreen, maximized or transient. - */ - void (*set_toplevel)(struct wl_client *client, - struct wl_resource *resource); - /** - * make the surface a transient surface - * - * Map the surface relative to an existing surface. - * - * The x and y arguments specify the location of the upper left - * corner of the surface relative to the upper left corner of the - * parent surface, in surface-local coordinates. - * - * The flags argument controls details of the transient behaviour. - * @param parent parent surface - * @param x surface-local x coordinate - * @param y surface-local y coordinate - * @param flags transient surface behavior - */ - void (*set_transient)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *parent, - int32_t x, - int32_t y, - uint32_t flags); - /** - * make the surface a fullscreen surface - * - * Map the surface as a fullscreen surface. - * - * If an output parameter is given then the surface will be made - * fullscreen on that output. If the client does not specify the - * output then the compositor will apply its policy - usually - * choosing the output on which the surface has the biggest surface - * area. - * - * The client may specify a method to resolve a size conflict - * between the output size and the surface size - this is provided - * through the method parameter. - * - * The framerate parameter is used only when the method is set to - * "driver", to indicate the preferred framerate. A value of 0 - * indicates that the client does not care about framerate. The - * framerate is specified in mHz, that is framerate of 60000 is - * 60Hz. - * - * A method of "scale" or "driver" implies a scaling operation of - * the surface, either via a direct scaling operation or a change - * of the output mode. This will override any kind of output - * scaling, so that mapping a surface with a buffer size equal to - * the mode can fill the screen independent of buffer_scale. - * - * A method of "fill" means we don't scale up the buffer, however - * any output scale is applied. This means that you may run into an - * edge case where the application maps a buffer with the same size - * of the output mode but buffer_scale 1 (thus making a surface - * larger than the output). In this case it is allowed to downscale - * the results to fit the screen. - * - * The compositor must reply to this request with a configure event - * with the dimensions for the output on which the surface will be - * made fullscreen. - * @param method method for resolving size conflict - * @param framerate framerate in mHz - * @param output output on which the surface is to be fullscreen - */ - void (*set_fullscreen)(struct wl_client *client, - struct wl_resource *resource, - uint32_t method, - uint32_t framerate, - struct wl_resource *output); - /** - * make the surface a popup surface - * - * Map the surface as a popup. - * - * A popup surface is a transient surface with an added pointer - * grab. - * - * An existing implicit grab will be changed to owner-events mode, - * and the popup grab will continue after the implicit grab ends - * (i.e. releasing the mouse button does not cause the popup to be - * unmapped). - * - * The popup grab continues until the window is destroyed or a - * mouse button is pressed in any other client's window. A click in - * any of the client's surfaces is reported as normal, however, - * clicks in other clients' surfaces will be discarded and trigger - * the callback. - * - * The x and y arguments specify the location of the upper left - * corner of the surface relative to the upper left corner of the - * parent surface, in surface-local coordinates. - * @param seat seat whose pointer is used - * @param serial serial number of the implicit grab on the pointer - * @param parent parent surface - * @param x surface-local x coordinate - * @param y surface-local y coordinate - * @param flags transient surface behavior - */ - void (*set_popup)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *seat, - uint32_t serial, - struct wl_resource *parent, - int32_t x, - int32_t y, - uint32_t flags); - /** - * make the surface a maximized surface - * - * Map the surface as a maximized surface. - * - * If an output parameter is given then the surface will be - * maximized on that output. If the client does not specify the - * output then the compositor will apply its policy - usually - * choosing the output on which the surface has the biggest surface - * area. - * - * The compositor will reply with a configure event telling the - * expected new surface size. The operation is completed on the - * next buffer attach to this surface. - * - * A maximized surface typically fills the entire output it is - * bound to, except for desktop elements such as panels. This is - * the main difference between a maximized shell surface and a - * fullscreen shell surface. - * - * The details depend on the compositor implementation. - * @param output output on which the surface is to be maximized - */ - void (*set_maximized)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *output); - /** - * set surface title - * - * 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. - * @param title surface title - */ - void (*set_title)(struct wl_client *client, - struct wl_resource *resource, - const char *title); - /** - * set surface class - * - * Set a class for the surface. - * - * The surface class identifies the general class of applications - * to which the surface belongs. A common convention is to use the - * file name (or the full path if it is a non-standard location) of - * the application's .desktop file as the class. - * @param class_ surface class - */ - void (*set_class)(struct wl_client *client, - struct wl_resource *resource, - const char *class_); -}; - -#define WL_SHELL_SURFACE_PING 0 -#define WL_SHELL_SURFACE_CONFIGURE 1 -#define WL_SHELL_SURFACE_POPUP_DONE 2 - -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_PING_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_POPUP_DONE_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_PONG_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_MOVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_RESIZE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_TOPLEVEL_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_TRANSIENT_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_POPUP_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_TITLE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_CLASS_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_shell_surface - * Sends an ping event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the ping - */ -static inline void -wl_shell_surface_send_ping(struct wl_resource *resource_, uint32_t serial) -{ - wl_resource_post_event(resource_, WL_SHELL_SURFACE_PING, serial); -} - -/** - * @ingroup iface_wl_shell_surface - * Sends an configure event to the client owning the resource. - * @param resource_ The client's resource - * @param edges how the surface was resized - * @param width new width of the surface - * @param height new height of the surface - */ -static inline void -wl_shell_surface_send_configure(struct wl_resource *resource_, uint32_t edges, int32_t width, int32_t height) -{ - wl_resource_post_event(resource_, WL_SHELL_SURFACE_CONFIGURE, edges, width, height); -} - -/** - * @ingroup iface_wl_shell_surface - * Sends an popup_done event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_shell_surface_send_popup_done(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_SHELL_SURFACE_POPUP_DONE); -} - -#ifndef WL_SURFACE_ERROR_ENUM -#define WL_SURFACE_ERROR_ENUM -/** - * @ingroup iface_wl_surface - * wl_surface error values - * - * These errors can be emitted in response to wl_surface requests. - */ -enum wl_surface_error { - /** - * buffer scale value is invalid - */ - WL_SURFACE_ERROR_INVALID_SCALE = 0, - /** - * buffer transform value is invalid - */ - WL_SURFACE_ERROR_INVALID_TRANSFORM = 1, -}; -#endif /* WL_SURFACE_ERROR_ENUM */ - -/** - * @ingroup iface_wl_surface - * @struct wl_surface_interface - */ -struct wl_surface_interface { - /** - * delete surface - * - * Deletes the surface and invalidates its object ID. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the surface contents - * - * Set a buffer as the content of this surface. - * - * The new size of the surface is calculated based on the buffer - * size transformed by the inverse buffer_transform and the inverse - * buffer_scale. This means that the supplied buffer must be an - * integer multiple of the buffer_scale. - * - * The x and y arguments specify the location of the new pending - * buffer's upper left corner, relative to the current buffer's - * upper left corner, in surface-local coordinates. In other words, - * the x and y, combined with the new surface size define in which - * directions the surface's size changes. - * - * Surface contents are double-buffered state, see - * wl_surface.commit. - * - * The initial surface contents are void; there is no content. - * wl_surface.attach assigns the given wl_buffer as the pending - * wl_buffer. wl_surface.commit makes the pending wl_buffer the new - * surface contents, and the size of the surface becomes the size - * calculated from the wl_buffer, as described above. After commit, - * there is no pending buffer until the next attach. - * - * Committing a pending wl_buffer allows the compositor to read the - * pixels in the wl_buffer. The compositor may access the pixels at - * any time after the wl_surface.commit request. When the - * compositor will not access the pixels anymore, it will send the - * wl_buffer.release event. Only after receiving wl_buffer.release, - * the client may reuse the wl_buffer. A wl_buffer that has been - * attached and then replaced by another attach instead of - * committed will not receive a release event, and is not used by - * the compositor. - * - * Destroying the wl_buffer after wl_buffer.release does not change - * the surface contents. However, if the client destroys the - * wl_buffer before receiving the wl_buffer.release event, the - * surface contents become undefined immediately. - * - * If wl_surface.attach is sent with a NULL wl_buffer, the - * following wl_surface.commit will remove the surface content. - * @param buffer buffer of surface contents - * @param x surface-local x coordinate - * @param y surface-local y coordinate - */ - void (*attach)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *buffer, - int32_t x, - int32_t y); - /** - * mark part of the surface damaged - * - * This request is used to describe the regions where the pending - * buffer is different from the current surface contents, and where - * the surface therefore needs to be repainted. The compositor - * ignores the parts of the damage that fall outside of the - * surface. - * - * Damage is double-buffered state, see wl_surface.commit. - * - * The damage rectangle is specified in surface-local coordinates, - * where x and y specify the upper left corner of the damage - * rectangle. - * - * The initial value for pending damage is empty: no damage. - * wl_surface.damage adds pending damage: the new pending damage is - * the union of old pending damage and the given rectangle. - * - * wl_surface.commit assigns pending damage as the current damage, - * and clears pending damage. The server will clear the current - * damage as it repaints the surface. - * - * Alternatively, damage can be posted with - * wl_surface.damage_buffer which uses buffer coordinates instead - * of surface coordinates, and is probably the preferred and - * intuitive way of doing this. - * @param x surface-local x coordinate - * @param y surface-local y coordinate - * @param width width of damage rectangle - * @param height height of damage rectangle - */ - void (*damage)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height); - /** - * request a frame throttling hint - * - * Request a notification when it is a good time to start drawing - * a new frame, by creating a frame callback. This is useful for - * throttling redrawing operations, and driving animations. - * - * When a client is animating on a wl_surface, it can use the - * 'frame' request to get notified when it is a good time to draw - * and commit the next frame of animation. If the client commits an - * update earlier than that, it is likely that some updates will - * not make it to the display, and the client is wasting resources - * by drawing too often. - * - * The frame request will take effect on the next - * wl_surface.commit. The notification will only be posted for one - * frame unless requested again. For a wl_surface, the - * notifications are posted in the order the frame requests were - * committed. - * - * The server must send the notifications so that a client will not - * send excessive updates, while still allowing the highest - * possible update rate for clients that wait for the reply before - * drawing again. The server should give some time for the client - * to draw and commit after sending the frame callback events to - * let it hit the next output refresh. - * - * A server should avoid signaling the frame callbacks if the - * surface is not visible in any way, e.g. the surface is - * off-screen, or completely obscured by other opaque surfaces. - * - * The object returned by this request will be destroyed by the - * compositor after the callback is fired and as such the client - * must not attempt to use it after that point. - * - * The callback_data passed in the callback is the current time, in - * milliseconds, with an undefined base. - * @param callback callback object for the frame request - */ - void (*frame)(struct wl_client *client, - struct wl_resource *resource, - uint32_t callback); - /** - * set opaque region - * - * This request sets the region of the surface that contains - * opaque content. - * - * The opaque region is an optimization hint for the compositor - * that lets it optimize the redrawing of content behind opaque - * regions. Setting an opaque region is not required for correct - * behaviour, but marking transparent content as opaque will result - * in repaint artifacts. - * - * The opaque region is specified in surface-local coordinates. - * - * The compositor ignores the parts of the opaque region that fall - * outside of the surface. - * - * Opaque region is double-buffered state, see wl_surface.commit. - * - * wl_surface.set_opaque_region changes the pending opaque region. - * wl_surface.commit copies the pending region to the current - * region. Otherwise, the pending and current regions are never - * changed. - * - * The initial value for an opaque region is empty. Setting the - * pending opaque region has copy semantics, and the wl_region - * object can be destroyed immediately. A NULL wl_region causes the - * pending opaque region to be set to empty. - * @param region opaque region of the surface - */ - void (*set_opaque_region)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *region); - /** - * set input region - * - * This request sets the region of the surface that can receive - * pointer and touch events. - * - * Input events happening outside of this region will try the next - * surface in the server surface stack. The compositor ignores the - * parts of the input region that fall outside of the surface. - * - * The input region is specified in surface-local coordinates. - * - * Input region is double-buffered state, see wl_surface.commit. - * - * wl_surface.set_input_region changes the pending input region. - * wl_surface.commit copies the pending region to the current - * region. Otherwise the pending and current regions are never - * changed, except cursor and icon surfaces are special cases, see - * wl_pointer.set_cursor and wl_data_device.start_drag. - * - * The initial value for an input region is infinite. That means - * the whole surface will accept input. Setting the pending input - * region has copy semantics, and the wl_region object can be - * destroyed immediately. A NULL wl_region causes the input region - * to be set to infinite. - * @param region input region of the surface - */ - void (*set_input_region)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *region); - /** - * commit pending surface state - * - * Surface state (input, opaque, and damage regions, attached - * buffers, etc.) is double-buffered. Protocol requests modify the - * pending state, as opposed to the current state in use by the - * compositor. 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. - * - * On commit, a pending wl_buffer is applied first, and all other - * state second. This means that all coordinates in double-buffered - * state are relative to the new wl_buffer coming into use, except - * for wl_surface.attach itself. If there is no pending wl_buffer, - * the coordinates are relative to the current surface contents. - * - * All requests that need a commit to become effective are - * documented to affect double-buffered state. - * - * Other interfaces may add further double-buffered surface state. - */ - void (*commit)(struct wl_client *client, - struct wl_resource *resource); - /** - * sets the buffer transformation - * - * This request sets an optional transformation on how the - * compositor interprets the contents of the buffer attached to the - * surface. The accepted values for the transform parameter are the - * values for wl_output.transform. - * - * Buffer transform is double-buffered state, see - * wl_surface.commit. - * - * A newly created surface has its buffer transformation set to - * normal. - * - * wl_surface.set_buffer_transform changes the pending buffer - * transformation. wl_surface.commit copies the pending buffer - * transformation to the current one. Otherwise, the pending and - * current values are never changed. - * - * The purpose of this request is to allow clients to render - * content according to the output transform, thus permitting the - * compositor to use certain optimizations even if the display is - * rotated. Using hardware overlays and scanning out a client - * buffer for fullscreen surfaces are examples of such - * optimizations. Those optimizations are highly dependent on the - * compositor implementation, so the use of this request should be - * considered on a case-by-case basis. - * - * Note that if the transform value includes 90 or 270 degree - * rotation, the width of the buffer will become the surface height - * and the height of the buffer will become the surface width. - * - * If transform is not one of the values from the - * wl_output.transform enum the invalid_transform protocol error is - * raised. - * @param transform transform for interpreting buffer contents - * @since 2 - */ - void (*set_buffer_transform)(struct wl_client *client, - struct wl_resource *resource, - int32_t transform); - /** - * sets the buffer scaling factor - * - * This request sets an optional scaling factor on how the - * compositor interprets the contents of the buffer attached to the - * window. - * - * Buffer scale is double-buffered state, see wl_surface.commit. - * - * A newly created surface has its buffer scale set to 1. - * - * wl_surface.set_buffer_scale changes the pending buffer scale. - * wl_surface.commit copies the pending buffer scale to the current - * one. Otherwise, the pending and current values are never - * changed. - * - * The purpose of this request is to allow clients to supply higher - * resolution buffer data for use on high resolution outputs. It is - * intended that you pick the same buffer scale as the scale of the - * output that the surface is displayed on. This means the - * compositor can avoid scaling when rendering the surface on that - * output. - * - * Note that if the scale is larger than 1, then you have to attach - * a buffer that is larger (by a factor of scale in each dimension) - * than the desired surface size. - * - * If scale is not positive the invalid_scale protocol error is - * raised. - * @param scale positive scale for interpreting buffer contents - * @since 3 - */ - void (*set_buffer_scale)(struct wl_client *client, - struct wl_resource *resource, - int32_t scale); - /** - * mark part of the surface damaged using buffer coordinates - * - * This request is used to describe the regions where the pending - * buffer is different from the current surface contents, and where - * the surface therefore needs to be repainted. The compositor - * ignores the parts of the damage that fall outside of the - * surface. - * - * Damage is double-buffered state, see wl_surface.commit. - * - * The damage rectangle is specified in buffer coordinates, where x - * and y specify the upper left corner of the damage rectangle. - * - * The initial value for pending damage is empty: no damage. - * wl_surface.damage_buffer adds pending damage: the new pending - * damage is the union of old pending damage and the given - * rectangle. - * - * wl_surface.commit assigns pending damage as the current damage, - * and clears pending damage. The server will clear the current - * damage as it repaints the surface. - * - * This request differs from wl_surface.damage in only one way - it - * takes damage in buffer coordinates instead of surface-local - * coordinates. While this generally is more intuitive than surface - * coordinates, it is especially desirable when using wp_viewport - * or when a drawing library (like EGL) is unaware of buffer scale - * and buffer transform. - * - * Note: Because buffer transformation changes and damage requests - * may be interleaved in the protocol stream, it is impossible to - * determine the actual mapping between surface and buffer damage - * until wl_surface.commit time. Therefore, compositors wishing to - * take both kinds of damage into account will have to accumulate - * damage from the two requests separately and only transform from - * one to the other after receiving the wl_surface.commit. - * @param x buffer-local x coordinate - * @param y buffer-local y coordinate - * @param width width of damage rectangle - * @param height height of damage rectangle - * @since 4 - */ - void (*damage_buffer)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height); -}; - -#define WL_SURFACE_ENTER 0 -#define WL_SURFACE_LEAVE 1 - -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_LEAVE_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_ATTACH_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_DAMAGE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_FRAME_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_SET_OPAQUE_REGION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_SET_INPUT_REGION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_COMMIT_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_SET_BUFFER_TRANSFORM_SINCE_VERSION 2 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_SET_BUFFER_SCALE_SINCE_VERSION 3 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION 4 - -/** - * @ingroup iface_wl_surface - * Sends an enter event to the client owning the resource. - * @param resource_ The client's resource - * @param output output entered by the surface - */ -static inline void -wl_surface_send_enter(struct wl_resource *resource_, struct wl_resource *output) -{ - wl_resource_post_event(resource_, WL_SURFACE_ENTER, output); -} - -/** - * @ingroup iface_wl_surface - * Sends an leave event to the client owning the resource. - * @param resource_ The client's resource - * @param output output left by the surface - */ -static inline void -wl_surface_send_leave(struct wl_resource *resource_, struct wl_resource *output) -{ - wl_resource_post_event(resource_, WL_SURFACE_LEAVE, output); -} - -#ifndef WL_SEAT_CAPABILITY_ENUM -#define WL_SEAT_CAPABILITY_ENUM -/** - * @ingroup iface_wl_seat - * seat capability bitmask - * - * This is a bitmask of capabilities this seat has; if a member is - * set, then it is present on the seat. - */ -enum wl_seat_capability { - /** - * the seat has pointer devices - */ - WL_SEAT_CAPABILITY_POINTER = 1, - /** - * the seat has one or more keyboards - */ - WL_SEAT_CAPABILITY_KEYBOARD = 2, - /** - * the seat has touch devices - */ - WL_SEAT_CAPABILITY_TOUCH = 4, -}; -#endif /* WL_SEAT_CAPABILITY_ENUM */ - -/** - * @ingroup iface_wl_seat - * @struct wl_seat_interface - */ -struct wl_seat_interface { - /** - * return pointer object - * - * The ID provided will be initialized to the wl_pointer - * interface for this seat. - * - * This request only takes effect if the seat has the pointer - * capability, or has had the pointer capability in the past. It is - * a protocol violation to issue this request on a seat that has - * never had the pointer capability. - * @param id seat pointer - */ - void (*get_pointer)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id); - /** - * return keyboard object - * - * The ID provided will be initialized to the wl_keyboard - * interface for this seat. - * - * This request only takes effect if the seat has the keyboard - * capability, or has had the keyboard capability in the past. It - * is a protocol violation to issue this request on a seat that has - * never had the keyboard capability. - * @param id seat keyboard - */ - void (*get_keyboard)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id); - /** - * return touch object - * - * The ID provided will be initialized to the wl_touch interface - * for this seat. - * - * This request only takes effect if the seat has the touch - * capability, or has had the touch capability in the past. It is a - * protocol violation to issue this request on a seat that has - * never had the touch capability. - * @param id seat touch interface - */ - void (*get_touch)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id); - /** - * release the seat object - * - * Using this request a client can tell the server that it is not - * going to use the seat object anymore. - * @since 5 - */ - void (*release)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define WL_SEAT_CAPABILITIES 0 -#define WL_SEAT_NAME 1 - -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_CAPABILITIES_SINCE_VERSION 1 -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_NAME_SINCE_VERSION 2 - -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_GET_POINTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_GET_KEYBOARD_SINCE_VERSION 1 -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_GET_TOUCH_SINCE_VERSION 1 -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_RELEASE_SINCE_VERSION 5 - -/** - * @ingroup iface_wl_seat - * Sends an capabilities event to the client owning the resource. - * @param resource_ The client's resource - * @param capabilities capabilities of the seat - */ -static inline void -wl_seat_send_capabilities(struct wl_resource *resource_, uint32_t capabilities) -{ - wl_resource_post_event(resource_, WL_SEAT_CAPABILITIES, capabilities); -} - -/** - * @ingroup iface_wl_seat - * Sends an name event to the client owning the resource. - * @param resource_ The client's resource - * @param name seat identifier - */ -static inline void -wl_seat_send_name(struct wl_resource *resource_, const char *name) -{ - wl_resource_post_event(resource_, WL_SEAT_NAME, name); -} - -#ifndef WL_POINTER_ERROR_ENUM -#define WL_POINTER_ERROR_ENUM -enum wl_pointer_error { - /** - * given wl_surface has another role - */ - WL_POINTER_ERROR_ROLE = 0, -}; -#endif /* WL_POINTER_ERROR_ENUM */ - -#ifndef WL_POINTER_BUTTON_STATE_ENUM -#define WL_POINTER_BUTTON_STATE_ENUM -/** - * @ingroup iface_wl_pointer - * physical button state - * - * Describes the physical state of a button that produced the button - * event. - */ -enum wl_pointer_button_state { - /** - * the button is not pressed - */ - WL_POINTER_BUTTON_STATE_RELEASED = 0, - /** - * the button is pressed - */ - WL_POINTER_BUTTON_STATE_PRESSED = 1, -}; -#endif /* WL_POINTER_BUTTON_STATE_ENUM */ - -#ifndef WL_POINTER_AXIS_ENUM -#define WL_POINTER_AXIS_ENUM -/** - * @ingroup iface_wl_pointer - * axis types - * - * Describes the axis types of scroll events. - */ -enum wl_pointer_axis { - /** - * vertical axis - */ - WL_POINTER_AXIS_VERTICAL_SCROLL = 0, - /** - * horizontal axis - */ - WL_POINTER_AXIS_HORIZONTAL_SCROLL = 1, -}; -#endif /* WL_POINTER_AXIS_ENUM */ - -#ifndef WL_POINTER_AXIS_SOURCE_ENUM -#define WL_POINTER_AXIS_SOURCE_ENUM -/** - * @ingroup iface_wl_pointer - * axis source types - * - * Describes the source types for axis events. This indicates to the - * client how an axis event was physically generated; a client may - * adjust the user interface accordingly. For example, scroll events - * from a "finger" source may be in a smooth coordinate space with - * kinetic scrolling whereas a "wheel" source may be in discrete steps - * of a number of lines. - * - * The "continuous" axis source is a device generating events in a - * continuous coordinate space, but using something other than a - * finger. One example for this source is button-based scrolling where - * the vertical motion of a device is converted to scroll events while - * a button is held down. - * - * The "wheel tilt" axis source indicates that the actual device is a - * wheel but the scroll event is not caused by a rotation but a - * (usually sideways) tilt of the wheel. - */ -enum wl_pointer_axis_source { - /** - * a physical wheel rotation - */ - WL_POINTER_AXIS_SOURCE_WHEEL = 0, - /** - * finger on a touch surface - */ - WL_POINTER_AXIS_SOURCE_FINGER = 1, - /** - * continuous coordinate space - */ - WL_POINTER_AXIS_SOURCE_CONTINUOUS = 2, - /** - * a physical wheel tilt - * @since 6 - */ - WL_POINTER_AXIS_SOURCE_WHEEL_TILT = 3, -}; -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_AXIS_SOURCE_WHEEL_TILT_SINCE_VERSION 6 -#endif /* WL_POINTER_AXIS_SOURCE_ENUM */ - -/** - * @ingroup iface_wl_pointer - * @struct wl_pointer_interface - */ -struct wl_pointer_interface { - /** - * set the pointer surface - * - * Set the pointer surface, i.e., the surface that contains the - * pointer image (cursor). This request gives the surface the role - * of a cursor. If the surface already has another role, it raises - * a protocol error. - * - * The cursor actually changes only if the pointer focus for this - * device is 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 pointer 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. - * @param serial serial number of the enter event - * @param surface pointer surface - * @param hotspot_x surface-local x coordinate - * @param hotspot_y surface-local y coordinate - */ - void (*set_cursor)(struct wl_client *client, - struct wl_resource *resource, - uint32_t serial, - struct wl_resource *surface, - int32_t hotspot_x, - int32_t hotspot_y); - /** - * release the pointer object - * - * Using this request a client can tell the server that it is not - * going to use the pointer object anymore. - * - * This request destroys the pointer proxy object, so clients must - * not call wl_pointer_destroy() after using this request. - * @since 3 - */ - void (*release)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define WL_POINTER_ENTER 0 -#define WL_POINTER_LEAVE 1 -#define WL_POINTER_MOTION 2 -#define WL_POINTER_BUTTON 3 -#define WL_POINTER_AXIS 4 -#define WL_POINTER_FRAME 5 -#define WL_POINTER_AXIS_SOURCE 6 -#define WL_POINTER_AXIS_STOP 7 -#define WL_POINTER_AXIS_DISCRETE 8 - -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_LEAVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_MOTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_BUTTON_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_AXIS_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_FRAME_SINCE_VERSION 5 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_AXIS_SOURCE_SINCE_VERSION 5 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_AXIS_STOP_SINCE_VERSION 5 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_AXIS_DISCRETE_SINCE_VERSION 5 - -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_SET_CURSOR_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_RELEASE_SINCE_VERSION 3 - -/** - * @ingroup iface_wl_pointer - * Sends an enter event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the enter event - * @param surface surface entered by the pointer - * @param surface_x surface-local x coordinate - * @param surface_y surface-local y coordinate - */ -static inline void -wl_pointer_send_enter(struct wl_resource *resource_, uint32_t serial, struct wl_resource *surface, wl_fixed_t surface_x, wl_fixed_t surface_y) -{ - wl_resource_post_event(resource_, WL_POINTER_ENTER, serial, surface, surface_x, surface_y); -} - -/** - * @ingroup iface_wl_pointer - * Sends an leave event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the leave event - * @param surface surface left by the pointer - */ -static inline void -wl_pointer_send_leave(struct wl_resource *resource_, uint32_t serial, struct wl_resource *surface) -{ - wl_resource_post_event(resource_, WL_POINTER_LEAVE, serial, surface); -} - -/** - * @ingroup iface_wl_pointer - * Sends an motion event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param surface_x surface-local x coordinate - * @param surface_y surface-local y coordinate - */ -static inline void -wl_pointer_send_motion(struct wl_resource *resource_, uint32_t time, wl_fixed_t surface_x, wl_fixed_t surface_y) -{ - wl_resource_post_event(resource_, WL_POINTER_MOTION, time, surface_x, surface_y); -} - -/** - * @ingroup iface_wl_pointer - * Sends an button event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the button event - * @param time timestamp with millisecond granularity - * @param button button that produced the event - * @param state physical state of the button - */ -static inline void -wl_pointer_send_button(struct wl_resource *resource_, uint32_t serial, uint32_t time, uint32_t button, uint32_t state) -{ - wl_resource_post_event(resource_, WL_POINTER_BUTTON, serial, time, button, state); -} - -/** - * @ingroup iface_wl_pointer - * Sends an axis event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param axis axis type - * @param value length of vector in surface-local coordinate space - */ -static inline void -wl_pointer_send_axis(struct wl_resource *resource_, uint32_t time, uint32_t axis, wl_fixed_t value) -{ - wl_resource_post_event(resource_, WL_POINTER_AXIS, time, axis, value); -} - -/** - * @ingroup iface_wl_pointer - * Sends an frame event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_pointer_send_frame(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_POINTER_FRAME); -} - -/** - * @ingroup iface_wl_pointer - * Sends an axis_source event to the client owning the resource. - * @param resource_ The client's resource - * @param axis_source source of the axis event - */ -static inline void -wl_pointer_send_axis_source(struct wl_resource *resource_, uint32_t axis_source) -{ - wl_resource_post_event(resource_, WL_POINTER_AXIS_SOURCE, axis_source); -} - -/** - * @ingroup iface_wl_pointer - * Sends an axis_stop event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param axis the axis stopped with this event - */ -static inline void -wl_pointer_send_axis_stop(struct wl_resource *resource_, uint32_t time, uint32_t axis) -{ - wl_resource_post_event(resource_, WL_POINTER_AXIS_STOP, time, axis); -} - -/** - * @ingroup iface_wl_pointer - * Sends an axis_discrete event to the client owning the resource. - * @param resource_ The client's resource - * @param axis axis type - * @param discrete number of steps - */ -static inline void -wl_pointer_send_axis_discrete(struct wl_resource *resource_, uint32_t axis, int32_t discrete) -{ - wl_resource_post_event(resource_, WL_POINTER_AXIS_DISCRETE, axis, discrete); -} - -#ifndef WL_KEYBOARD_KEYMAP_FORMAT_ENUM -#define WL_KEYBOARD_KEYMAP_FORMAT_ENUM -/** - * @ingroup iface_wl_keyboard - * keyboard mapping format - * - * This specifies the format of the keymap provided to the - * client with the wl_keyboard.keymap event. - */ -enum wl_keyboard_keymap_format { - /** - * no keymap; client must understand how to interpret the raw keycode - */ - WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP = 0, - /** - * libxkbcommon compatible; to determine the xkb keycode, clients must add 8 to the key event keycode - */ - WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1 = 1, -}; -#endif /* WL_KEYBOARD_KEYMAP_FORMAT_ENUM */ - -#ifndef WL_KEYBOARD_KEY_STATE_ENUM -#define WL_KEYBOARD_KEY_STATE_ENUM -/** - * @ingroup iface_wl_keyboard - * physical key state - * - * Describes the physical state of a key that produced the key event. - */ -enum wl_keyboard_key_state { - /** - * key is not pressed - */ - WL_KEYBOARD_KEY_STATE_RELEASED = 0, - /** - * key is pressed - */ - WL_KEYBOARD_KEY_STATE_PRESSED = 1, -}; -#endif /* WL_KEYBOARD_KEY_STATE_ENUM */ - -/** - * @ingroup iface_wl_keyboard - * @struct wl_keyboard_interface - */ -struct wl_keyboard_interface { - /** - * release the keyboard object - * - * - * @since 3 - */ - void (*release)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define WL_KEYBOARD_KEYMAP 0 -#define WL_KEYBOARD_ENTER 1 -#define WL_KEYBOARD_LEAVE 2 -#define WL_KEYBOARD_KEY 3 -#define WL_KEYBOARD_MODIFIERS 4 -#define WL_KEYBOARD_REPEAT_INFO 5 - -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_KEYMAP_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_LEAVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_KEY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_MODIFIERS_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION 4 - -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_RELEASE_SINCE_VERSION 3 - -/** - * @ingroup iface_wl_keyboard - * Sends an keymap event to the client owning the resource. - * @param resource_ The client's resource - * @param format keymap format - * @param fd keymap file descriptor - * @param size keymap size, in bytes - */ -static inline void -wl_keyboard_send_keymap(struct wl_resource *resource_, uint32_t format, int32_t fd, uint32_t size) -{ - wl_resource_post_event(resource_, WL_KEYBOARD_KEYMAP, format, fd, size); -} - -/** - * @ingroup iface_wl_keyboard - * Sends an enter event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the enter event - * @param surface surface gaining keyboard focus - * @param keys the currently pressed keys - */ -static inline void -wl_keyboard_send_enter(struct wl_resource *resource_, uint32_t serial, struct wl_resource *surface, struct wl_array *keys) -{ - wl_resource_post_event(resource_, WL_KEYBOARD_ENTER, serial, surface, keys); -} - -/** - * @ingroup iface_wl_keyboard - * Sends an leave event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the leave event - * @param surface surface that lost keyboard focus - */ -static inline void -wl_keyboard_send_leave(struct wl_resource *resource_, uint32_t serial, struct wl_resource *surface) -{ - wl_resource_post_event(resource_, WL_KEYBOARD_LEAVE, serial, surface); -} - -/** - * @ingroup iface_wl_keyboard - * Sends an key event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the key event - * @param time timestamp with millisecond granularity - * @param key key that produced the event - * @param state physical state of the key - */ -static inline void -wl_keyboard_send_key(struct wl_resource *resource_, uint32_t serial, uint32_t time, uint32_t key, uint32_t state) -{ - wl_resource_post_event(resource_, WL_KEYBOARD_KEY, serial, time, key, state); -} - -/** - * @ingroup iface_wl_keyboard - * Sends an modifiers event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the modifiers event - * @param mods_depressed depressed modifiers - * @param mods_latched latched modifiers - * @param mods_locked locked modifiers - * @param group keyboard layout - */ -static inline void -wl_keyboard_send_modifiers(struct wl_resource *resource_, uint32_t serial, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group) -{ - wl_resource_post_event(resource_, WL_KEYBOARD_MODIFIERS, serial, mods_depressed, mods_latched, mods_locked, group); -} - -/** - * @ingroup iface_wl_keyboard - * Sends an repeat_info event to the client owning the resource. - * @param resource_ The client's resource - * @param rate the rate of repeating keys in characters per second - * @param delay delay in milliseconds since key down until repeating starts - */ -static inline void -wl_keyboard_send_repeat_info(struct wl_resource *resource_, int32_t rate, int32_t delay) -{ - wl_resource_post_event(resource_, WL_KEYBOARD_REPEAT_INFO, rate, delay); -} - -/** - * @ingroup iface_wl_touch - * @struct wl_touch_interface - */ -struct wl_touch_interface { - /** - * release the touch object - * - * - * @since 3 - */ - void (*release)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define WL_TOUCH_DOWN 0 -#define WL_TOUCH_UP 1 -#define WL_TOUCH_MOTION 2 -#define WL_TOUCH_FRAME 3 -#define WL_TOUCH_CANCEL 4 -#define WL_TOUCH_SHAPE 5 -#define WL_TOUCH_ORIENTATION 6 - -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_DOWN_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_UP_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_MOTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_FRAME_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_CANCEL_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_SHAPE_SINCE_VERSION 6 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_ORIENTATION_SINCE_VERSION 6 - -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_RELEASE_SINCE_VERSION 3 - -/** - * @ingroup iface_wl_touch - * Sends an down event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the touch down event - * @param time timestamp with millisecond granularity - * @param surface surface touched - * @param id the unique ID of this touch point - * @param x surface-local x coordinate - * @param y surface-local y coordinate - */ -static inline void -wl_touch_send_down(struct wl_resource *resource_, uint32_t serial, uint32_t time, struct wl_resource *surface, int32_t id, wl_fixed_t x, wl_fixed_t y) -{ - wl_resource_post_event(resource_, WL_TOUCH_DOWN, serial, time, surface, id, x, y); -} - -/** - * @ingroup iface_wl_touch - * Sends an up event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the touch up event - * @param time timestamp with millisecond granularity - * @param id the unique ID of this touch point - */ -static inline void -wl_touch_send_up(struct wl_resource *resource_, uint32_t serial, uint32_t time, int32_t id) -{ - wl_resource_post_event(resource_, WL_TOUCH_UP, serial, time, id); -} - -/** - * @ingroup iface_wl_touch - * Sends an motion event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param id the unique ID of this touch point - * @param x surface-local x coordinate - * @param y surface-local y coordinate - */ -static inline void -wl_touch_send_motion(struct wl_resource *resource_, uint32_t time, int32_t id, wl_fixed_t x, wl_fixed_t y) -{ - wl_resource_post_event(resource_, WL_TOUCH_MOTION, time, id, x, y); -} - -/** - * @ingroup iface_wl_touch - * Sends an frame event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_touch_send_frame(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_TOUCH_FRAME); -} - -/** - * @ingroup iface_wl_touch - * Sends an cancel event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_touch_send_cancel(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_TOUCH_CANCEL); -} - -/** - * @ingroup iface_wl_touch - * Sends an shape event to the client owning the resource. - * @param resource_ The client's resource - * @param id the unique ID of this touch point - * @param major length of the major axis in surface-local coordinates - * @param minor length of the minor axis in surface-local coordinates - */ -static inline void -wl_touch_send_shape(struct wl_resource *resource_, int32_t id, wl_fixed_t major, wl_fixed_t minor) -{ - wl_resource_post_event(resource_, WL_TOUCH_SHAPE, id, major, minor); -} - -/** - * @ingroup iface_wl_touch - * Sends an orientation event to the client owning the resource. - * @param resource_ The client's resource - * @param id the unique ID of this touch point - * @param orientation angle between major axis and positive surface y-axis in degrees - */ -static inline void -wl_touch_send_orientation(struct wl_resource *resource_, int32_t id, wl_fixed_t orientation) -{ - wl_resource_post_event(resource_, WL_TOUCH_ORIENTATION, id, orientation); -} - -#ifndef WL_OUTPUT_SUBPIXEL_ENUM -#define WL_OUTPUT_SUBPIXEL_ENUM -/** - * @ingroup iface_wl_output - * subpixel geometry information - * - * This enumeration describes how the physical - * pixels on an output are laid out. - */ -enum wl_output_subpixel { - /** - * unknown geometry - */ - WL_OUTPUT_SUBPIXEL_UNKNOWN = 0, - /** - * no geometry - */ - WL_OUTPUT_SUBPIXEL_NONE = 1, - /** - * horizontal RGB - */ - WL_OUTPUT_SUBPIXEL_HORIZONTAL_RGB = 2, - /** - * horizontal BGR - */ - WL_OUTPUT_SUBPIXEL_HORIZONTAL_BGR = 3, - /** - * vertical RGB - */ - WL_OUTPUT_SUBPIXEL_VERTICAL_RGB = 4, - /** - * vertical BGR - */ - WL_OUTPUT_SUBPIXEL_VERTICAL_BGR = 5, -}; -#endif /* WL_OUTPUT_SUBPIXEL_ENUM */ - -#ifndef WL_OUTPUT_TRANSFORM_ENUM -#define WL_OUTPUT_TRANSFORM_ENUM -/** - * @ingroup iface_wl_output - * transform from framebuffer to output - * - * This describes the transform that a compositor will apply to a - * surface to compensate for the rotation or mirroring of an - * output device. - * - * The flipped values correspond to an initial flip around a - * vertical axis followed by rotation. - * - * The purpose is mainly to allow clients to render accordingly and - * tell the compositor, so that for fullscreen surfaces, the - * compositor will still be able to scan out directly from client - * surfaces. - */ -enum wl_output_transform { - /** - * no transform - */ - WL_OUTPUT_TRANSFORM_NORMAL = 0, - /** - * 90 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_90 = 1, - /** - * 180 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_180 = 2, - /** - * 270 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_270 = 3, - /** - * 180 degree flip around a vertical axis - */ - WL_OUTPUT_TRANSFORM_FLIPPED = 4, - /** - * flip and rotate 90 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_FLIPPED_90 = 5, - /** - * flip and rotate 180 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_FLIPPED_180 = 6, - /** - * flip and rotate 270 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_FLIPPED_270 = 7, -}; -#endif /* WL_OUTPUT_TRANSFORM_ENUM */ - -#ifndef WL_OUTPUT_MODE_ENUM -#define WL_OUTPUT_MODE_ENUM -/** - * @ingroup iface_wl_output - * mode information - * - * These flags describe properties of an output mode. - * They are used in the flags bitfield of the mode event. - */ -enum wl_output_mode { - /** - * indicates this is the current mode - */ - WL_OUTPUT_MODE_CURRENT = 0x1, - /** - * indicates this is the preferred mode - */ - WL_OUTPUT_MODE_PREFERRED = 0x2, -}; -#endif /* WL_OUTPUT_MODE_ENUM */ - -/** - * @ingroup iface_wl_output - * @struct wl_output_interface - */ -struct wl_output_interface { - /** - * release the output object - * - * Using this request a client can tell the server that it is not - * going to use the output object anymore. - * @since 3 - */ - void (*release)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define WL_OUTPUT_GEOMETRY 0 -#define WL_OUTPUT_MODE 1 -#define WL_OUTPUT_DONE 2 -#define WL_OUTPUT_SCALE 3 - -/** - * @ingroup iface_wl_output - */ -#define WL_OUTPUT_GEOMETRY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_output - */ -#define WL_OUTPUT_MODE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_output - */ -#define WL_OUTPUT_DONE_SINCE_VERSION 2 -/** - * @ingroup iface_wl_output - */ -#define WL_OUTPUT_SCALE_SINCE_VERSION 2 - -/** - * @ingroup iface_wl_output - */ -#define WL_OUTPUT_RELEASE_SINCE_VERSION 3 - -/** - * @ingroup iface_wl_output - * Sends an geometry event to the client owning the resource. - * @param resource_ The client's resource - * @param x x position within the global compositor space - * @param y y position within the global compositor space - * @param physical_width width in millimeters of the output - * @param physical_height height in millimeters of the output - * @param subpixel subpixel orientation of the output - * @param make textual description of the manufacturer - * @param model textual description of the model - * @param transform transform that maps framebuffer to output - */ -static inline void -wl_output_send_geometry(struct wl_resource *resource_, int32_t x, int32_t y, int32_t physical_width, int32_t physical_height, int32_t subpixel, const char *make, const char *model, int32_t transform) -{ - wl_resource_post_event(resource_, WL_OUTPUT_GEOMETRY, x, y, physical_width, physical_height, subpixel, make, model, transform); -} - -/** - * @ingroup iface_wl_output - * Sends an mode event to the client owning the resource. - * @param resource_ The client's resource - * @param flags bitfield of mode flags - * @param width width of the mode in hardware units - * @param height height of the mode in hardware units - * @param refresh vertical refresh rate in mHz - */ -static inline void -wl_output_send_mode(struct wl_resource *resource_, uint32_t flags, int32_t width, int32_t height, int32_t refresh) -{ - wl_resource_post_event(resource_, WL_OUTPUT_MODE, flags, width, height, refresh); -} - -/** - * @ingroup iface_wl_output - * Sends an done event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_output_send_done(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_OUTPUT_DONE); -} - -/** - * @ingroup iface_wl_output - * Sends an scale event to the client owning the resource. - * @param resource_ The client's resource - * @param factor scaling factor of output - */ -static inline void -wl_output_send_scale(struct wl_resource *resource_, int32_t factor) -{ - wl_resource_post_event(resource_, WL_OUTPUT_SCALE, factor); -} - -/** - * @ingroup iface_wl_region - * @struct wl_region_interface - */ -struct wl_region_interface { - /** - * destroy region - * - * Destroy the region. This will invalidate the object ID. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * add rectangle to region - * - * Add the specified rectangle to the region. - * @param x region-local x coordinate - * @param y region-local y coordinate - * @param width rectangle width - * @param height rectangle height - */ - void (*add)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height); - /** - * subtract rectangle from region - * - * Subtract the specified rectangle from the region. - * @param x region-local x coordinate - * @param y region-local y coordinate - * @param width rectangle width - * @param height rectangle height - */ - void (*subtract)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height); -}; - - -/** - * @ingroup iface_wl_region - */ -#define WL_REGION_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_region - */ -#define WL_REGION_ADD_SINCE_VERSION 1 -/** - * @ingroup iface_wl_region - */ -#define WL_REGION_SUBTRACT_SINCE_VERSION 1 - -#ifndef WL_SUBCOMPOSITOR_ERROR_ENUM -#define WL_SUBCOMPOSITOR_ERROR_ENUM -enum wl_subcompositor_error { - /** - * the to-be sub-surface is invalid - */ - WL_SUBCOMPOSITOR_ERROR_BAD_SURFACE = 0, -}; -#endif /* WL_SUBCOMPOSITOR_ERROR_ENUM */ - -/** - * @ingroup iface_wl_subcompositor - * @struct wl_subcompositor_interface - */ -struct wl_subcompositor_interface { - /** - * unbind from the subcompositor interface - * - * Informs the server that the client will not be using this - * protocol object anymore. This does not affect any other objects, - * wl_subsurface objects included. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * give a surface the role sub-surface - * - * Create a sub-surface interface for the given surface, and - * associate it with the given parent surface. This turns a plain - * wl_surface into a sub-surface. - * - * The to-be sub-surface must not already have another role, and it - * must not have an existing wl_subsurface object. Otherwise a - * protocol error is raised. - * @param id the new sub-surface object ID - * @param surface the surface to be turned into a sub-surface - * @param parent the parent surface - */ - void (*get_subsurface)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface, - struct wl_resource *parent); -}; - - -/** - * @ingroup iface_wl_subcompositor - */ -#define WL_SUBCOMPOSITOR_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subcompositor - */ -#define WL_SUBCOMPOSITOR_GET_SUBSURFACE_SINCE_VERSION 1 - -#ifndef WL_SUBSURFACE_ERROR_ENUM -#define WL_SUBSURFACE_ERROR_ENUM -enum wl_subsurface_error { - /** - * wl_surface is not a sibling or the parent - */ - WL_SUBSURFACE_ERROR_BAD_SURFACE = 0, -}; -#endif /* WL_SUBSURFACE_ERROR_ENUM */ - -/** - * @ingroup iface_wl_subsurface - * @struct wl_subsurface_interface - */ -struct wl_subsurface_interface { - /** - * remove sub-surface interface - * - * The sub-surface interface is removed from the wl_surface - * object that was turned into a sub-surface with a - * wl_subcompositor.get_subsurface request. The wl_surface's - * association to the parent is deleted, and the wl_surface loses - * its role as a sub-surface. The wl_surface is unmapped. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * reposition the sub-surface - * - * This schedules a sub-surface position change. The sub-surface - * will be moved so that its origin (top left corner pixel) will be - * at the location x, y of the parent surface coordinate system. - * The coordinates are not restricted to the parent surface area. - * Negative values are allowed. - * - * The scheduled coordinates will take effect whenever the state of - * the parent surface is applied. When this happens depends on - * whether the parent surface is in synchronized mode or not. See - * wl_subsurface.set_sync and wl_subsurface.set_desync for details. - * - * If more than one set_position request is invoked by the client - * before the commit of the parent surface, the position of a new - * request always replaces the scheduled position from any previous - * request. - * - * The initial position is 0, 0. - * @param x x coordinate in the parent surface - * @param y y coordinate in the parent surface - */ - void (*set_position)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y); - /** - * restack the sub-surface - * - * This sub-surface is taken from the stack, and put back just - * above the reference surface, changing the z-order of the - * sub-surfaces. The reference surface must be one of the sibling - * surfaces, or the parent surface. Using any other surface, - * including this sub-surface, will cause a protocol error. - * - * The z-order is double-buffered. Requests are handled in order - * and applied immediately to a pending state. The final pending - * state is copied to the active state the next time the state of - * the parent surface is applied. When this happens depends on - * whether the parent surface is in synchronized mode or not. See - * wl_subsurface.set_sync and wl_subsurface.set_desync for details. - * - * A new sub-surface is initially added as the top-most in the - * stack of its siblings and parent. - * @param sibling the reference surface - */ - void (*place_above)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *sibling); - /** - * restack the sub-surface - * - * The sub-surface is placed just below the reference surface. - * See wl_subsurface.place_above. - * @param sibling the reference surface - */ - void (*place_below)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *sibling); - /** - * set sub-surface to synchronized mode - * - * Change the commit behaviour of the sub-surface to synchronized - * mode, also described as the parent dependent mode. - * - * In synchronized mode, wl_surface.commit on a sub-surface will - * accumulate the committed state in a cache, but the state will - * not be applied and hence will not change the compositor output. - * The cached state is applied to the sub-surface immediately after - * the parent surface's state is applied. This ensures atomic - * updates of the parent and all its synchronized sub-surfaces. - * Applying the cached state will invalidate the cache, so further - * parent surface commits do not (re-)apply old state. - * - * See wl_subsurface for the recursive effect of this mode. - */ - void (*set_sync)(struct wl_client *client, - struct wl_resource *resource); - /** - * set sub-surface to desynchronized mode - * - * Change the commit behaviour of the sub-surface to - * desynchronized mode, also described as independent or freely - * running mode. - * - * In desynchronized mode, wl_surface.commit on a sub-surface will - * apply the pending state directly, without caching, as happens - * normally with a wl_surface. Calling wl_surface.commit on the - * parent surface has no effect on the sub-surface's wl_surface - * state. This mode allows a sub-surface to be updated on its own. - * - * If cached state exists when wl_surface.commit is called in - * desynchronized mode, the pending state is added to the cached - * state, and applied as a whole. This invalidates the cache. - * - * Note: even if a sub-surface is set to desynchronized, a parent - * sub-surface may override it to behave as synchronized. For - * details, see wl_subsurface. - * - * If a surface's parent surface behaves as desynchronized, then - * the cached state is applied on set_desync. - */ - void (*set_desync)(struct wl_client *client, - struct wl_resource *resource); -}; - - -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_SET_POSITION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_PLACE_ABOVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_PLACE_BELOW_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_SET_SYNC_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_SET_DESYNC_SINCE_VERSION 1 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland/include/protocol/wayland-server-protocol.h b/chromium/third_party/wayland/include/protocol/wayland-server-protocol.h deleted file mode 100644 index 9c6b1e08e96..00000000000 --- a/chromium/third_party/wayland/include/protocol/wayland-server-protocol.h +++ /dev/null @@ -1,4335 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef WAYLAND_SERVER_PROTOCOL_H -#define WAYLAND_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_wayland The wayland protocol - * @section page_ifaces_wayland Interfaces - * - @subpage page_iface_wl_display - core global object - * - @subpage page_iface_wl_registry - global registry object - * - @subpage page_iface_wl_callback - callback object - * - @subpage page_iface_wl_compositor - the compositor singleton - * - @subpage page_iface_wl_shm_pool - a shared memory pool - * - @subpage page_iface_wl_shm - shared memory support - * - @subpage page_iface_wl_buffer - content for a wl_surface - * - @subpage page_iface_wl_data_offer - offer to transfer data - * - @subpage page_iface_wl_data_source - offer to transfer data - * - @subpage page_iface_wl_data_device - data transfer device - * - @subpage page_iface_wl_data_device_manager - data transfer interface - * - @subpage page_iface_wl_shell - create desktop-style surfaces - * - @subpage page_iface_wl_shell_surface - desktop-style metadata interface - * - @subpage page_iface_wl_surface - an onscreen surface - * - @subpage page_iface_wl_seat - group of input devices - * - @subpage page_iface_wl_pointer - pointer input device - * - @subpage page_iface_wl_keyboard - keyboard input device - * - @subpage page_iface_wl_touch - touchscreen input device - * - @subpage page_iface_wl_output - compositor output region - * - @subpage page_iface_wl_region - region interface - * - @subpage page_iface_wl_subcompositor - sub-surface compositing - * - @subpage page_iface_wl_subsurface - sub-surface interface to a wl_surface - * @section page_copyright_wayland Copyright - * <pre> - * - * Copyright © 2008-2011 Kristian Høgsberg - * Copyright © 2010-2011 Intel Corporation - * Copyright © 2012-2013 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. - * </pre> - */ -struct wl_buffer; -struct wl_callback; -struct wl_compositor; -struct wl_data_device; -struct wl_data_device_manager; -struct wl_data_offer; -struct wl_data_source; -struct wl_display; -struct wl_keyboard; -struct wl_output; -struct wl_pointer; -struct wl_region; -struct wl_registry; -struct wl_seat; -struct wl_shell; -struct wl_shell_surface; -struct wl_shm; -struct wl_shm_pool; -struct wl_subcompositor; -struct wl_subsurface; -struct wl_surface; -struct wl_touch; - -/** - * @page page_iface_wl_display wl_display - * @section page_iface_wl_display_desc Description - * - * The core global object. This is a special singleton object. It - * is used for internal Wayland protocol features. - * @section page_iface_wl_display_api API - * See @ref iface_wl_display. - */ -/** - * @defgroup iface_wl_display The wl_display interface - * - * The core global object. This is a special singleton object. It - * is used for internal Wayland protocol features. - */ -extern const struct wl_interface wl_display_interface; -/** - * @page page_iface_wl_registry wl_registry - * @section page_iface_wl_registry_desc Description - * - * The singleton global registry object. The server has a number of - * global objects that are available to all clients. These objects - * typically represent an actual object in the server (for example, - * an input device) or they are singleton objects that provide - * extension functionality. - * - * When a client creates a registry object, the registry object - * will emit a global event for each global currently in the - * registry. Globals come and go as a result of device or - * monitor hotplugs, reconfiguration or other events, and the - * registry will send out global and global_remove events to - * keep the client up to date with the changes. To mark the end - * of the initial burst of events, the client can use the - * wl_display.sync request immediately after calling - * wl_display.get_registry. - * - * A client can bind to a global object by using the bind - * request. This creates a client-side handle that lets the object - * emit events to the client and lets the client invoke requests on - * the object. - * @section page_iface_wl_registry_api API - * See @ref iface_wl_registry. - */ -/** - * @defgroup iface_wl_registry The wl_registry interface - * - * The singleton global registry object. The server has a number of - * global objects that are available to all clients. These objects - * typically represent an actual object in the server (for example, - * an input device) or they are singleton objects that provide - * extension functionality. - * - * When a client creates a registry object, the registry object - * will emit a global event for each global currently in the - * registry. Globals come and go as a result of device or - * monitor hotplugs, reconfiguration or other events, and the - * registry will send out global and global_remove events to - * keep the client up to date with the changes. To mark the end - * of the initial burst of events, the client can use the - * wl_display.sync request immediately after calling - * wl_display.get_registry. - * - * A client can bind to a global object by using the bind - * request. This creates a client-side handle that lets the object - * emit events to the client and lets the client invoke requests on - * the object. - */ -extern const struct wl_interface wl_registry_interface; -/** - * @page page_iface_wl_callback wl_callback - * @section page_iface_wl_callback_desc Description - * - * Clients can handle the 'done' event to get notified when - * the related request is done. - * @section page_iface_wl_callback_api API - * See @ref iface_wl_callback. - */ -/** - * @defgroup iface_wl_callback The wl_callback interface - * - * Clients can handle the 'done' event to get notified when - * the related request is done. - */ -extern const struct wl_interface wl_callback_interface; -/** - * @page page_iface_wl_compositor wl_compositor - * @section page_iface_wl_compositor_desc Description - * - * A compositor. This object is a singleton global. The - * compositor is in charge of combining the contents of multiple - * surfaces into one displayable output. - * @section page_iface_wl_compositor_api API - * See @ref iface_wl_compositor. - */ -/** - * @defgroup iface_wl_compositor The wl_compositor interface - * - * A compositor. This object is a singleton global. The - * compositor is in charge of combining the contents of multiple - * surfaces into one displayable output. - */ -extern const struct wl_interface wl_compositor_interface; -/** - * @page page_iface_wl_shm_pool wl_shm_pool - * @section page_iface_wl_shm_pool_desc Description - * - * The wl_shm_pool object encapsulates a piece of memory shared - * between the compositor and client. Through the wl_shm_pool - * object, the client can allocate shared memory wl_buffer objects. - * All objects created through the same pool share the same - * underlying mapped memory. Reusing the mapped memory avoids the - * setup/teardown overhead and is useful when interactively resizing - * a surface or for many small buffers. - * @section page_iface_wl_shm_pool_api API - * See @ref iface_wl_shm_pool. - */ -/** - * @defgroup iface_wl_shm_pool The wl_shm_pool interface - * - * The wl_shm_pool object encapsulates a piece of memory shared - * between the compositor and client. Through the wl_shm_pool - * object, the client can allocate shared memory wl_buffer objects. - * All objects created through the same pool share the same - * underlying mapped memory. Reusing the mapped memory avoids the - * setup/teardown overhead and is useful when interactively resizing - * a surface or for many small buffers. - */ -extern const struct wl_interface wl_shm_pool_interface; -/** - * @page page_iface_wl_shm wl_shm - * @section page_iface_wl_shm_desc Description - * - * A singleton global object that provides support for shared - * memory. - * - * Clients can create wl_shm_pool objects using the create_pool - * request. - * - * At connection setup time, the wl_shm object emits one or more - * format events to inform clients about the valid pixel formats - * that can be used for buffers. - * @section page_iface_wl_shm_api API - * See @ref iface_wl_shm. - */ -/** - * @defgroup iface_wl_shm The wl_shm interface - * - * A singleton global object that provides support for shared - * memory. - * - * Clients can create wl_shm_pool objects using the create_pool - * request. - * - * At connection setup time, the wl_shm object emits one or more - * format events to inform clients about the valid pixel formats - * that can be used for buffers. - */ -extern const struct wl_interface wl_shm_interface; -/** - * @page page_iface_wl_buffer wl_buffer - * @section page_iface_wl_buffer_desc Description - * - * A buffer provides the content for a wl_surface. Buffers are - * created through factory interfaces such as wl_drm, wl_shm or - * similar. It has a width and a height and can be attached to a - * wl_surface, but the mechanism by which a client provides and - * updates the contents is defined by the buffer factory interface. - * @section page_iface_wl_buffer_api API - * See @ref iface_wl_buffer. - */ -/** - * @defgroup iface_wl_buffer The wl_buffer interface - * - * A buffer provides the content for a wl_surface. Buffers are - * created through factory interfaces such as wl_drm, wl_shm or - * similar. It has a width and a height and can be attached to a - * wl_surface, but the mechanism by which a client provides and - * updates the contents is defined by the buffer factory interface. - */ -extern const struct wl_interface wl_buffer_interface; -/** - * @page page_iface_wl_data_offer wl_data_offer - * @section page_iface_wl_data_offer_desc Description - * - * A wl_data_offer represents a piece of data offered for transfer - * by another client (the source client). It is used by the - * copy-and-paste and drag-and-drop mechanisms. 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. - * @section page_iface_wl_data_offer_api API - * See @ref iface_wl_data_offer. - */ -/** - * @defgroup iface_wl_data_offer The wl_data_offer interface - * - * A wl_data_offer represents a piece of data offered for transfer - * by another client (the source client). It is used by the - * copy-and-paste and drag-and-drop mechanisms. 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. - */ -extern const struct wl_interface wl_data_offer_interface; -/** - * @page page_iface_wl_data_source wl_data_source - * @section page_iface_wl_data_source_desc Description - * - * The wl_data_source object is the source side of a wl_data_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. - * @section page_iface_wl_data_source_api API - * See @ref iface_wl_data_source. - */ -/** - * @defgroup iface_wl_data_source The wl_data_source interface - * - * The wl_data_source object is the source side of a wl_data_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. - */ -extern const struct wl_interface wl_data_source_interface; -/** - * @page page_iface_wl_data_device wl_data_device - * @section page_iface_wl_data_device_desc Description - * - * There is one wl_data_device per seat which can be obtained - * from the global wl_data_device_manager singleton. - * - * A wl_data_device provides access to inter-client data transfer - * mechanisms such as copy-and-paste and drag-and-drop. - * @section page_iface_wl_data_device_api API - * See @ref iface_wl_data_device. - */ -/** - * @defgroup iface_wl_data_device The wl_data_device interface - * - * There is one wl_data_device per seat which can be obtained - * from the global wl_data_device_manager singleton. - * - * A wl_data_device provides access to inter-client data transfer - * mechanisms such as copy-and-paste and drag-and-drop. - */ -extern const struct wl_interface wl_data_device_interface; -/** - * @page page_iface_wl_data_device_manager wl_data_device_manager - * @section page_iface_wl_data_device_manager_desc Description - * - * The wl_data_device_manager is a singleton global object that - * provides access to inter-client data transfer mechanisms such as - * copy-and-paste and drag-and-drop. These mechanisms are tied to - * a wl_seat and this interface lets a client get a wl_data_device - * corresponding to a wl_seat. - * - * Depending on the version bound, the objects created from the bound - * wl_data_device_manager object will have different requirements for - * functioning properly. See wl_data_source.set_actions, - * wl_data_offer.accept and wl_data_offer.finish for details. - * @section page_iface_wl_data_device_manager_api API - * See @ref iface_wl_data_device_manager. - */ -/** - * @defgroup iface_wl_data_device_manager The wl_data_device_manager interface - * - * The wl_data_device_manager is a singleton global object that - * provides access to inter-client data transfer mechanisms such as - * copy-and-paste and drag-and-drop. These mechanisms are tied to - * a wl_seat and this interface lets a client get a wl_data_device - * corresponding to a wl_seat. - * - * Depending on the version bound, the objects created from the bound - * wl_data_device_manager object will have different requirements for - * functioning properly. See wl_data_source.set_actions, - * wl_data_offer.accept and wl_data_offer.finish for details. - */ -extern const struct wl_interface wl_data_device_manager_interface; -/** - * @page page_iface_wl_shell wl_shell - * @section page_iface_wl_shell_desc Description - * - * This interface is implemented by servers that provide - * desktop-style user interfaces. - * - * It allows clients to associate a wl_shell_surface with - * a basic surface. - * @section page_iface_wl_shell_api API - * See @ref iface_wl_shell. - */ -/** - * @defgroup iface_wl_shell The wl_shell interface - * - * This interface is implemented by servers that provide - * desktop-style user interfaces. - * - * It allows clients to associate a wl_shell_surface with - * a basic surface. - */ -extern const struct wl_interface wl_shell_interface; -/** - * @page page_iface_wl_shell_surface wl_shell_surface - * @section page_iface_wl_shell_surface_desc Description - * - * 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 toplevel, fullscreen - * or popup windows, move, resize or maximize them, associate - * metadata like title and class, etc. - * - * On the server side the object is automatically destroyed when - * the related wl_surface is destroyed. On the client side, - * wl_shell_surface_destroy() must be called before destroying - * the wl_surface object. - * @section page_iface_wl_shell_surface_api API - * See @ref iface_wl_shell_surface. - */ -/** - * @defgroup iface_wl_shell_surface The wl_shell_surface interface - * - * 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 toplevel, fullscreen - * or popup windows, move, resize or maximize them, associate - * metadata like title and class, etc. - * - * On the server side the object is automatically destroyed when - * the related wl_surface is destroyed. On the client side, - * wl_shell_surface_destroy() must be called before destroying - * the wl_surface object. - */ -extern const struct wl_interface wl_shell_surface_interface; -/** - * @page page_iface_wl_surface wl_surface - * @section page_iface_wl_surface_desc Description - * - * A surface is a rectangular area that is displayed on the screen. - * It has a location, size and pixel contents. - * - * The size of a surface (and relative positions on it) is described - * in surface-local coordinates, which may differ from the buffer - * coordinates of the pixel content, in case a buffer_transform - * or a buffer_scale is used. - * - * A surface without a "role" is fairly useless: a compositor does - * not know where, when or how to present it. The role is the - * purpose of a wl_surface. Examples of roles are a cursor for a - * pointer (as set by wl_pointer.set_cursor), a drag icon - * (wl_data_device.start_drag), a sub-surface - * (wl_subcompositor.get_subsurface), and a window as defined by a - * shell protocol (e.g. wl_shell.get_shell_surface). - * - * A surface can have only one role at a time. Initially a - * wl_surface does not have a role. Once a wl_surface is given a - * role, it is set permanently for the whole lifetime of the - * wl_surface object. Giving the current role again is allowed, - * unless explicitly forbidden by the relevant interface - * specification. - * - * Surface roles are given by requests in other interfaces such as - * wl_pointer.set_cursor. The request should explicitly mention - * that this request gives a role to a wl_surface. Often, this - * request also creates a new protocol object that represents the - * role and adds additional functionality to wl_surface. When a - * client wants to destroy a wl_surface, they must destroy this 'role - * object' before the wl_surface. - * - * Destroying the role object does not remove the role from the - * wl_surface, but it may stop the wl_surface from "playing the role". - * For instance, if a wl_subsurface object is destroyed, the wl_surface - * it was created for will be unmapped and forget its position and - * z-order. It is allowed to create a wl_subsurface for the same - * wl_surface again, but it is not allowed to use the wl_surface as - * a cursor (cursor is a different role than sub-surface, and role - * switching is not allowed). - * @section page_iface_wl_surface_api API - * See @ref iface_wl_surface. - */ -/** - * @defgroup iface_wl_surface The wl_surface interface - * - * A surface is a rectangular area that is displayed on the screen. - * It has a location, size and pixel contents. - * - * The size of a surface (and relative positions on it) is described - * in surface-local coordinates, which may differ from the buffer - * coordinates of the pixel content, in case a buffer_transform - * or a buffer_scale is used. - * - * A surface without a "role" is fairly useless: a compositor does - * not know where, when or how to present it. The role is the - * purpose of a wl_surface. Examples of roles are a cursor for a - * pointer (as set by wl_pointer.set_cursor), a drag icon - * (wl_data_device.start_drag), a sub-surface - * (wl_subcompositor.get_subsurface), and a window as defined by a - * shell protocol (e.g. wl_shell.get_shell_surface). - * - * A surface can have only one role at a time. Initially a - * wl_surface does not have a role. Once a wl_surface is given a - * role, it is set permanently for the whole lifetime of the - * wl_surface object. Giving the current role again is allowed, - * unless explicitly forbidden by the relevant interface - * specification. - * - * Surface roles are given by requests in other interfaces such as - * wl_pointer.set_cursor. The request should explicitly mention - * that this request gives a role to a wl_surface. Often, this - * request also creates a new protocol object that represents the - * role and adds additional functionality to wl_surface. When a - * client wants to destroy a wl_surface, they must destroy this 'role - * object' before the wl_surface. - * - * Destroying the role object does not remove the role from the - * wl_surface, but it may stop the wl_surface from "playing the role". - * For instance, if a wl_subsurface object is destroyed, the wl_surface - * it was created for will be unmapped and forget its position and - * z-order. It is allowed to create a wl_subsurface for the same - * wl_surface again, but it is not allowed to use the wl_surface as - * a cursor (cursor is a different role than sub-surface, and role - * switching is not allowed). - */ -extern const struct wl_interface wl_surface_interface; -/** - * @page page_iface_wl_seat wl_seat - * @section page_iface_wl_seat_desc Description - * - * A seat is a group of keyboards, pointer and touch devices. This - * object is published as a global during start up, or when such a - * device is hot plugged. A seat typically has a pointer and - * maintains a keyboard focus and a pointer focus. - * @section page_iface_wl_seat_api API - * See @ref iface_wl_seat. - */ -/** - * @defgroup iface_wl_seat The wl_seat interface - * - * A seat is a group of keyboards, pointer and touch devices. This - * object is published as a global during start up, or when such a - * device is hot plugged. A seat typically has a pointer and - * maintains a keyboard focus and a pointer focus. - */ -extern const struct wl_interface wl_seat_interface; -/** - * @page page_iface_wl_pointer wl_pointer - * @section page_iface_wl_pointer_desc Description - * - * The wl_pointer interface represents one or more input devices, - * such as mice, which control the pointer location and pointer_focus - * of a seat. - * - * The wl_pointer interface generates motion, enter and leave - * events for the surfaces that the pointer is located over, - * and button and axis events for button presses, button releases - * and scrolling. - * @section page_iface_wl_pointer_api API - * See @ref iface_wl_pointer. - */ -/** - * @defgroup iface_wl_pointer The wl_pointer interface - * - * The wl_pointer interface represents one or more input devices, - * such as mice, which control the pointer location and pointer_focus - * of a seat. - * - * The wl_pointer interface generates motion, enter and leave - * events for the surfaces that the pointer is located over, - * and button and axis events for button presses, button releases - * and scrolling. - */ -extern const struct wl_interface wl_pointer_interface; -/** - * @page page_iface_wl_keyboard wl_keyboard - * @section page_iface_wl_keyboard_desc Description - * - * The wl_keyboard interface represents one or more keyboards - * associated with a seat. - * @section page_iface_wl_keyboard_api API - * See @ref iface_wl_keyboard. - */ -/** - * @defgroup iface_wl_keyboard The wl_keyboard interface - * - * The wl_keyboard interface represents one or more keyboards - * associated with a seat. - */ -extern const struct wl_interface wl_keyboard_interface; -/** - * @page page_iface_wl_touch wl_touch - * @section page_iface_wl_touch_desc Description - * - * The wl_touch interface represents a touchscreen - * associated with a seat. - * - * Touch interactions can consist of one or more contacts. - * For each contact, a series of events is generated, starting - * with a down event, followed by zero or more motion events, - * and ending with an up event. Events relating to the same - * contact point can be identified by the ID of the sequence. - * @section page_iface_wl_touch_api API - * See @ref iface_wl_touch. - */ -/** - * @defgroup iface_wl_touch The wl_touch interface - * - * The wl_touch interface represents a touchscreen - * associated with a seat. - * - * Touch interactions can consist of one or more contacts. - * For each contact, a series of events is generated, starting - * with a down event, followed by zero or more motion events, - * and ending with an up event. Events relating to the same - * contact point can be identified by the ID of the sequence. - */ -extern const struct wl_interface wl_touch_interface; -/** - * @page page_iface_wl_output wl_output - * @section page_iface_wl_output_desc Description - * - * An output describes part of the compositor geometry. The - * compositor works in the 'compositor coordinate system' and an - * output corresponds to a rectangular area in that space that is - * actually visible. This typically corresponds to a monitor that - * displays part of the compositor space. This object is published - * as global during start up, or when a monitor is hotplugged. - * @section page_iface_wl_output_api API - * See @ref iface_wl_output. - */ -/** - * @defgroup iface_wl_output The wl_output interface - * - * An output describes part of the compositor geometry. The - * compositor works in the 'compositor coordinate system' and an - * output corresponds to a rectangular area in that space that is - * actually visible. This typically corresponds to a monitor that - * displays part of the compositor space. This object is published - * as global during start up, or when a monitor is hotplugged. - */ -extern const struct wl_interface wl_output_interface; -/** - * @page page_iface_wl_region wl_region - * @section page_iface_wl_region_desc Description - * - * A region object describes an area. - * - * Region objects are used to describe the opaque and input - * regions of a surface. - * @section page_iface_wl_region_api API - * See @ref iface_wl_region. - */ -/** - * @defgroup iface_wl_region The wl_region interface - * - * A region object describes an area. - * - * Region objects are used to describe the opaque and input - * regions of a surface. - */ -extern const struct wl_interface wl_region_interface; -/** - * @page page_iface_wl_subcompositor wl_subcompositor - * @section page_iface_wl_subcompositor_desc Description - * - * The global interface exposing sub-surface compositing capabilities. - * A wl_surface, that has sub-surfaces associated, is called the - * parent surface. Sub-surfaces can be arbitrarily nested and create - * a tree of sub-surfaces. - * - * The root surface in a tree of sub-surfaces is the main - * surface. The main surface cannot be a sub-surface, because - * sub-surfaces must always have a parent. - * - * A main surface with its sub-surfaces forms a (compound) window. - * For window management purposes, this set of wl_surface objects is - * to be considered as a single window, and it should also behave as - * such. - * - * The aim of sub-surfaces is to offload some of the compositing work - * within a window from clients to the compositor. A prime example is - * a video player with decorations and video in separate wl_surface - * objects. This should allow the compositor to pass YUV video buffer - * processing to dedicated overlay hardware when possible. - * @section page_iface_wl_subcompositor_api API - * See @ref iface_wl_subcompositor. - */ -/** - * @defgroup iface_wl_subcompositor The wl_subcompositor interface - * - * The global interface exposing sub-surface compositing capabilities. - * A wl_surface, that has sub-surfaces associated, is called the - * parent surface. Sub-surfaces can be arbitrarily nested and create - * a tree of sub-surfaces. - * - * The root surface in a tree of sub-surfaces is the main - * surface. The main surface cannot be a sub-surface, because - * sub-surfaces must always have a parent. - * - * A main surface with its sub-surfaces forms a (compound) window. - * For window management purposes, this set of wl_surface objects is - * to be considered as a single window, and it should also behave as - * such. - * - * The aim of sub-surfaces is to offload some of the compositing work - * within a window from clients to the compositor. A prime example is - * a video player with decorations and video in separate wl_surface - * objects. This should allow the compositor to pass YUV video buffer - * processing to dedicated overlay hardware when possible. - */ -extern const struct wl_interface wl_subcompositor_interface; -/** - * @page page_iface_wl_subsurface wl_subsurface - * @section page_iface_wl_subsurface_desc Description - * - * An additional interface to a wl_surface object, which has been - * made a sub-surface. A sub-surface has one parent surface. A - * sub-surface's size and position are not limited to that of the parent. - * Particularly, a sub-surface is not automatically clipped to its - * parent's area. - * - * A sub-surface becomes mapped, when a non-NULL wl_buffer is applied - * and the parent surface is mapped. The order of which one happens - * first is irrelevant. A sub-surface is hidden if the parent becomes - * hidden, or if a NULL wl_buffer is applied. These rules apply - * recursively through the tree of surfaces. - * - * The behaviour of a wl_surface.commit request on a sub-surface - * depends on the sub-surface's mode. The possible modes are - * synchronized and desynchronized, see methods - * wl_subsurface.set_sync and wl_subsurface.set_desync. Synchronized - * mode caches the wl_surface state to be applied when the parent's - * state gets applied, and desynchronized mode applies the pending - * wl_surface state directly. A sub-surface is initially in the - * synchronized mode. - * - * Sub-surfaces have also other kind of state, which is managed by - * wl_subsurface requests, as opposed to wl_surface requests. This - * state includes the sub-surface position relative to the parent - * surface (wl_subsurface.set_position), and the stacking order of - * the parent and its sub-surfaces (wl_subsurface.place_above and - * .place_below). This state is applied when the parent surface's - * wl_surface state is applied, regardless of the sub-surface's mode. - * As the exception, set_sync and set_desync are effective immediately. - * - * The main surface can be thought to be always in desynchronized mode, - * since it does not have a parent in the sub-surfaces sense. - * - * Even if a sub-surface is in desynchronized mode, it will behave as - * in synchronized mode, if its parent surface behaves as in - * synchronized mode. This rule is applied recursively throughout the - * tree of surfaces. This means, that one can set a sub-surface into - * synchronized mode, and then assume that all its child and grand-child - * sub-surfaces are synchronized, too, without explicitly setting them. - * - * If the wl_surface associated with the wl_subsurface is destroyed, the - * wl_subsurface object becomes inert. Note, that destroying either object - * takes effect immediately. If you need to synchronize the removal - * of a sub-surface to the parent surface update, unmap the sub-surface - * first by attaching a NULL wl_buffer, update parent, and then destroy - * the sub-surface. - * - * If the parent wl_surface object is destroyed, the sub-surface is - * unmapped. - * @section page_iface_wl_subsurface_api API - * See @ref iface_wl_subsurface. - */ -/** - * @defgroup iface_wl_subsurface The wl_subsurface interface - * - * An additional interface to a wl_surface object, which has been - * made a sub-surface. A sub-surface has one parent surface. A - * sub-surface's size and position are not limited to that of the parent. - * Particularly, a sub-surface is not automatically clipped to its - * parent's area. - * - * A sub-surface becomes mapped, when a non-NULL wl_buffer is applied - * and the parent surface is mapped. The order of which one happens - * first is irrelevant. A sub-surface is hidden if the parent becomes - * hidden, or if a NULL wl_buffer is applied. These rules apply - * recursively through the tree of surfaces. - * - * The behaviour of a wl_surface.commit request on a sub-surface - * depends on the sub-surface's mode. The possible modes are - * synchronized and desynchronized, see methods - * wl_subsurface.set_sync and wl_subsurface.set_desync. Synchronized - * mode caches the wl_surface state to be applied when the parent's - * state gets applied, and desynchronized mode applies the pending - * wl_surface state directly. A sub-surface is initially in the - * synchronized mode. - * - * Sub-surfaces have also other kind of state, which is managed by - * wl_subsurface requests, as opposed to wl_surface requests. This - * state includes the sub-surface position relative to the parent - * surface (wl_subsurface.set_position), and the stacking order of - * the parent and its sub-surfaces (wl_subsurface.place_above and - * .place_below). This state is applied when the parent surface's - * wl_surface state is applied, regardless of the sub-surface's mode. - * As the exception, set_sync and set_desync are effective immediately. - * - * The main surface can be thought to be always in desynchronized mode, - * since it does not have a parent in the sub-surfaces sense. - * - * Even if a sub-surface is in desynchronized mode, it will behave as - * in synchronized mode, if its parent surface behaves as in - * synchronized mode. This rule is applied recursively throughout the - * tree of surfaces. This means, that one can set a sub-surface into - * synchronized mode, and then assume that all its child and grand-child - * sub-surfaces are synchronized, too, without explicitly setting them. - * - * If the wl_surface associated with the wl_subsurface is destroyed, the - * wl_subsurface object becomes inert. Note, that destroying either object - * takes effect immediately. If you need to synchronize the removal - * of a sub-surface to the parent surface update, unmap the sub-surface - * first by attaching a NULL wl_buffer, update parent, and then destroy - * the sub-surface. - * - * If the parent wl_surface object is destroyed, the sub-surface is - * unmapped. - */ -extern const struct wl_interface wl_subsurface_interface; - -#ifndef WL_DISPLAY_ERROR_ENUM -#define WL_DISPLAY_ERROR_ENUM -/** - * @ingroup iface_wl_display - * global error values - * - * These errors are global and can be emitted in response to any - * server request. - */ -enum wl_display_error { - /** - * server couldn't find object - */ - WL_DISPLAY_ERROR_INVALID_OBJECT = 0, - /** - * method doesn't exist on the specified interface - */ - WL_DISPLAY_ERROR_INVALID_METHOD = 1, - /** - * server is out of memory - */ - WL_DISPLAY_ERROR_NO_MEMORY = 2, -}; -#endif /* WL_DISPLAY_ERROR_ENUM */ - -/** - * @ingroup iface_wl_display - * @struct wl_display_interface - */ -struct wl_display_interface { - /** - * asynchronous roundtrip - * - * The sync request asks the server to emit the 'done' event on - * the returned wl_callback object. Since requests are handled - * in-order and events are delivered in-order, this can be used as - * a barrier to ensure all previous requests and the resulting - * events have been handled. - * - * The object returned by this request will be destroyed by the - * compositor after the callback is fired and as such the client - * must not attempt to use it after that point. - * - * The callback_data passed in the callback is the event serial. - * @param callback callback object for the sync request - */ - void (*sync)(struct wl_client *client, - struct wl_resource *resource, - uint32_t callback); - /** - * get global registry object - * - * This request creates a registry object that allows the client - * to list and bind the global objects available from the - * compositor. - * @param registry global registry object - */ - void (*get_registry)(struct wl_client *client, - struct wl_resource *resource, - uint32_t registry); -}; - -#define WL_DISPLAY_ERROR 0 -#define WL_DISPLAY_DELETE_ID 1 - -/** - * @ingroup iface_wl_display - */ -#define WL_DISPLAY_ERROR_SINCE_VERSION 1 -/** - * @ingroup iface_wl_display - */ -#define WL_DISPLAY_DELETE_ID_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_display - */ -#define WL_DISPLAY_SYNC_SINCE_VERSION 1 -/** - * @ingroup iface_wl_display - */ -#define WL_DISPLAY_GET_REGISTRY_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_registry - * @struct wl_registry_interface - */ -struct wl_registry_interface { - /** - * bind an object to the display - * - * Binds a new, client-created object to the server using the - * specified name as the identifier. - * @param name unique numeric name of the object - * @param interface name of the objects interface - * @param version version of the objects interface - * @param id bounded object - */ - void (*bind)(struct wl_client *client, - struct wl_resource *resource, - uint32_t name, - const char *interface, uint32_t version, uint32_t id); -}; - -#define WL_REGISTRY_GLOBAL 0 -#define WL_REGISTRY_GLOBAL_REMOVE 1 - -/** - * @ingroup iface_wl_registry - */ -#define WL_REGISTRY_GLOBAL_SINCE_VERSION 1 -/** - * @ingroup iface_wl_registry - */ -#define WL_REGISTRY_GLOBAL_REMOVE_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_registry - */ -#define WL_REGISTRY_BIND_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_registry - * Sends an global event to the client owning the resource. - * @param resource_ The client's resource - * @param name numeric name of the global object - * @param interface interface implemented by the object - * @param version interface version - */ -static inline void -wl_registry_send_global(struct wl_resource *resource_, uint32_t name, const char *interface, uint32_t version) -{ - wl_resource_post_event(resource_, WL_REGISTRY_GLOBAL, name, interface, version); -} - -/** - * @ingroup iface_wl_registry - * Sends an global_remove event to the client owning the resource. - * @param resource_ The client's resource - * @param name numeric name of the global object - */ -static inline void -wl_registry_send_global_remove(struct wl_resource *resource_, uint32_t name) -{ - wl_resource_post_event(resource_, WL_REGISTRY_GLOBAL_REMOVE, name); -} - -#define WL_CALLBACK_DONE 0 - -/** - * @ingroup iface_wl_callback - */ -#define WL_CALLBACK_DONE_SINCE_VERSION 1 - - -/** - * @ingroup iface_wl_callback - * Sends an done event to the client owning the resource. - * @param resource_ The client's resource - * @param callback_data request-specific data for the callback - */ -static inline void -wl_callback_send_done(struct wl_resource *resource_, uint32_t callback_data) -{ - wl_resource_post_event(resource_, WL_CALLBACK_DONE, callback_data); -} - -/** - * @ingroup iface_wl_compositor - * @struct wl_compositor_interface - */ -struct wl_compositor_interface { - /** - * create new surface - * - * Ask the compositor to create a new surface. - * @param id the new surface - */ - void (*create_surface)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id); - /** - * create new region - * - * Ask the compositor to create a new region. - * @param id the new region - */ - void (*create_region)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id); -}; - - -/** - * @ingroup iface_wl_compositor - */ -#define WL_COMPOSITOR_CREATE_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_compositor - */ -#define WL_COMPOSITOR_CREATE_REGION_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_shm_pool - * @struct wl_shm_pool_interface - */ -struct wl_shm_pool_interface { - /** - * create a buffer from the pool - * - * Create a wl_buffer object from the pool. - * - * The buffer is created offset bytes into the pool and has width - * and height as specified. The stride argument specifies the - * number of bytes from the beginning of one row to the beginning - * of the next. The format is the pixel format of the buffer and - * must be one of those advertised through the wl_shm.format event. - * - * A buffer will keep a reference to the pool it was created from - * so it is valid to destroy the pool immediately after creating a - * buffer from it. - * @param id buffer to create - * @param offset buffer byte offset within the pool - * @param width buffer width, in pixels - * @param height buffer height, in pixels - * @param stride number of bytes from the beginning of one row to the beginning of the next row - * @param format buffer pixel format - */ - void (*create_buffer)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - int32_t offset, - int32_t width, - int32_t height, - int32_t stride, - uint32_t format); - /** - * destroy the pool - * - * Destroy the shared memory pool. - * - * The mmapped memory will be released when all buffers that have - * been created from this pool are gone. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * change the size of the pool mapping - * - * This request will cause the server to remap the backing memory - * for the pool from the file descriptor passed when the pool was - * created, but using the new size. This request can only be used - * to make the pool bigger. - * @param size new size of the pool, in bytes - */ - void (*resize)(struct wl_client *client, - struct wl_resource *resource, - int32_t size); -}; - - -/** - * @ingroup iface_wl_shm_pool - */ -#define WL_SHM_POOL_CREATE_BUFFER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shm_pool - */ -#define WL_SHM_POOL_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shm_pool - */ -#define WL_SHM_POOL_RESIZE_SINCE_VERSION 1 - -#ifndef WL_SHM_ERROR_ENUM -#define WL_SHM_ERROR_ENUM -/** - * @ingroup iface_wl_shm - * wl_shm error values - * - * These errors can be emitted in response to wl_shm requests. - */ -enum wl_shm_error { - /** - * buffer format is not known - */ - WL_SHM_ERROR_INVALID_FORMAT = 0, - /** - * invalid size or stride during pool or buffer creation - */ - WL_SHM_ERROR_INVALID_STRIDE = 1, - /** - * mmapping the file descriptor failed - */ - WL_SHM_ERROR_INVALID_FD = 2, -}; -#endif /* WL_SHM_ERROR_ENUM */ - -#ifndef WL_SHM_FORMAT_ENUM -#define WL_SHM_FORMAT_ENUM -/** - * @ingroup iface_wl_shm - * pixel formats - * - * This describes the memory layout of an individual pixel. - * - * All renderers should support argb8888 and xrgb8888 but any other - * formats are optional and may not be supported by the particular - * renderer in use. - * - * The drm format codes match the macros defined in drm_fourcc.h. - * The formats actually supported by the compositor will be - * reported by the format event. - */ -enum wl_shm_format { - /** - * 32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian - */ - WL_SHM_FORMAT_ARGB8888 = 0, - /** - * 32-bit RGB format, [31:0] x:R:G:B 8:8:8:8 little endian - */ - WL_SHM_FORMAT_XRGB8888 = 1, - /** - * 8-bit color index format, [7:0] C - */ - WL_SHM_FORMAT_C8 = 0x20203843, - /** - * 8-bit RGB format, [7:0] R:G:B 3:3:2 - */ - WL_SHM_FORMAT_RGB332 = 0x38424752, - /** - * 8-bit BGR format, [7:0] B:G:R 2:3:3 - */ - WL_SHM_FORMAT_BGR233 = 0x38524742, - /** - * 16-bit xRGB format, [15:0] x:R:G:B 4:4:4:4 little endian - */ - WL_SHM_FORMAT_XRGB4444 = 0x32315258, - /** - * 16-bit xBGR format, [15:0] x:B:G:R 4:4:4:4 little endian - */ - WL_SHM_FORMAT_XBGR4444 = 0x32314258, - /** - * 16-bit RGBx format, [15:0] R:G:B:x 4:4:4:4 little endian - */ - WL_SHM_FORMAT_RGBX4444 = 0x32315852, - /** - * 16-bit BGRx format, [15:0] B:G:R:x 4:4:4:4 little endian - */ - WL_SHM_FORMAT_BGRX4444 = 0x32315842, - /** - * 16-bit ARGB format, [15:0] A:R:G:B 4:4:4:4 little endian - */ - WL_SHM_FORMAT_ARGB4444 = 0x32315241, - /** - * 16-bit ABGR format, [15:0] A:B:G:R 4:4:4:4 little endian - */ - WL_SHM_FORMAT_ABGR4444 = 0x32314241, - /** - * 16-bit RBGA format, [15:0] R:G:B:A 4:4:4:4 little endian - */ - WL_SHM_FORMAT_RGBA4444 = 0x32314152, - /** - * 16-bit BGRA format, [15:0] B:G:R:A 4:4:4:4 little endian - */ - WL_SHM_FORMAT_BGRA4444 = 0x32314142, - /** - * 16-bit xRGB format, [15:0] x:R:G:B 1:5:5:5 little endian - */ - WL_SHM_FORMAT_XRGB1555 = 0x35315258, - /** - * 16-bit xBGR 1555 format, [15:0] x:B:G:R 1:5:5:5 little endian - */ - WL_SHM_FORMAT_XBGR1555 = 0x35314258, - /** - * 16-bit RGBx 5551 format, [15:0] R:G:B:x 5:5:5:1 little endian - */ - WL_SHM_FORMAT_RGBX5551 = 0x35315852, - /** - * 16-bit BGRx 5551 format, [15:0] B:G:R:x 5:5:5:1 little endian - */ - WL_SHM_FORMAT_BGRX5551 = 0x35315842, - /** - * 16-bit ARGB 1555 format, [15:0] A:R:G:B 1:5:5:5 little endian - */ - WL_SHM_FORMAT_ARGB1555 = 0x35315241, - /** - * 16-bit ABGR 1555 format, [15:0] A:B:G:R 1:5:5:5 little endian - */ - WL_SHM_FORMAT_ABGR1555 = 0x35314241, - /** - * 16-bit RGBA 5551 format, [15:0] R:G:B:A 5:5:5:1 little endian - */ - WL_SHM_FORMAT_RGBA5551 = 0x35314152, - /** - * 16-bit BGRA 5551 format, [15:0] B:G:R:A 5:5:5:1 little endian - */ - WL_SHM_FORMAT_BGRA5551 = 0x35314142, - /** - * 16-bit RGB 565 format, [15:0] R:G:B 5:6:5 little endian - */ - WL_SHM_FORMAT_RGB565 = 0x36314752, - /** - * 16-bit BGR 565 format, [15:0] B:G:R 5:6:5 little endian - */ - WL_SHM_FORMAT_BGR565 = 0x36314742, - /** - * 24-bit RGB format, [23:0] R:G:B little endian - */ - WL_SHM_FORMAT_RGB888 = 0x34324752, - /** - * 24-bit BGR format, [23:0] B:G:R little endian - */ - WL_SHM_FORMAT_BGR888 = 0x34324742, - /** - * 32-bit xBGR format, [31:0] x:B:G:R 8:8:8:8 little endian - */ - WL_SHM_FORMAT_XBGR8888 = 0x34324258, - /** - * 32-bit RGBx format, [31:0] R:G:B:x 8:8:8:8 little endian - */ - WL_SHM_FORMAT_RGBX8888 = 0x34325852, - /** - * 32-bit BGRx format, [31:0] B:G:R:x 8:8:8:8 little endian - */ - WL_SHM_FORMAT_BGRX8888 = 0x34325842, - /** - * 32-bit ABGR format, [31:0] A:B:G:R 8:8:8:8 little endian - */ - WL_SHM_FORMAT_ABGR8888 = 0x34324241, - /** - * 32-bit RGBA format, [31:0] R:G:B:A 8:8:8:8 little endian - */ - WL_SHM_FORMAT_RGBA8888 = 0x34324152, - /** - * 32-bit BGRA format, [31:0] B:G:R:A 8:8:8:8 little endian - */ - WL_SHM_FORMAT_BGRA8888 = 0x34324142, - /** - * 32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian - */ - WL_SHM_FORMAT_XRGB2101010 = 0x30335258, - /** - * 32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian - */ - WL_SHM_FORMAT_XBGR2101010 = 0x30334258, - /** - * 32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian - */ - WL_SHM_FORMAT_RGBX1010102 = 0x30335852, - /** - * 32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian - */ - WL_SHM_FORMAT_BGRX1010102 = 0x30335842, - /** - * 32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian - */ - WL_SHM_FORMAT_ARGB2101010 = 0x30335241, - /** - * 32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian - */ - WL_SHM_FORMAT_ABGR2101010 = 0x30334241, - /** - * 32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian - */ - WL_SHM_FORMAT_RGBA1010102 = 0x30334152, - /** - * 32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian - */ - WL_SHM_FORMAT_BGRA1010102 = 0x30334142, - /** - * packed YCbCr format, [31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian - */ - WL_SHM_FORMAT_YUYV = 0x56595559, - /** - * packed YCbCr format, [31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian - */ - WL_SHM_FORMAT_YVYU = 0x55595659, - /** - * packed YCbCr format, [31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian - */ - WL_SHM_FORMAT_UYVY = 0x59565955, - /** - * packed YCbCr format, [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian - */ - WL_SHM_FORMAT_VYUY = 0x59555956, - /** - * packed AYCbCr format, [31:0] A:Y:Cb:Cr 8:8:8:8 little endian - */ - WL_SHM_FORMAT_AYUV = 0x56555941, - /** - * 2 plane YCbCr Cr:Cb format, 2x2 subsampled Cr:Cb plane - */ - WL_SHM_FORMAT_NV12 = 0x3231564e, - /** - * 2 plane YCbCr Cb:Cr format, 2x2 subsampled Cb:Cr plane - */ - WL_SHM_FORMAT_NV21 = 0x3132564e, - /** - * 2 plane YCbCr Cr:Cb format, 2x1 subsampled Cr:Cb plane - */ - WL_SHM_FORMAT_NV16 = 0x3631564e, - /** - * 2 plane YCbCr Cb:Cr format, 2x1 subsampled Cb:Cr plane - */ - WL_SHM_FORMAT_NV61 = 0x3136564e, - /** - * 3 plane YCbCr format, 4x4 subsampled Cb (1) and Cr (2) planes - */ - WL_SHM_FORMAT_YUV410 = 0x39565559, - /** - * 3 plane YCbCr format, 4x4 subsampled Cr (1) and Cb (2) planes - */ - WL_SHM_FORMAT_YVU410 = 0x39555659, - /** - * 3 plane YCbCr format, 4x1 subsampled Cb (1) and Cr (2) planes - */ - WL_SHM_FORMAT_YUV411 = 0x31315559, - /** - * 3 plane YCbCr format, 4x1 subsampled Cr (1) and Cb (2) planes - */ - WL_SHM_FORMAT_YVU411 = 0x31315659, - /** - * 3 plane YCbCr format, 2x2 subsampled Cb (1) and Cr (2) planes - */ - WL_SHM_FORMAT_YUV420 = 0x32315559, - /** - * 3 plane YCbCr format, 2x2 subsampled Cr (1) and Cb (2) planes - */ - WL_SHM_FORMAT_YVU420 = 0x32315659, - /** - * 3 plane YCbCr format, 2x1 subsampled Cb (1) and Cr (2) planes - */ - WL_SHM_FORMAT_YUV422 = 0x36315559, - /** - * 3 plane YCbCr format, 2x1 subsampled Cr (1) and Cb (2) planes - */ - WL_SHM_FORMAT_YVU422 = 0x36315659, - /** - * 3 plane YCbCr format, non-subsampled Cb (1) and Cr (2) planes - */ - WL_SHM_FORMAT_YUV444 = 0x34325559, - /** - * 3 plane YCbCr format, non-subsampled Cr (1) and Cb (2) planes - */ - WL_SHM_FORMAT_YVU444 = 0x34325659, -}; -#endif /* WL_SHM_FORMAT_ENUM */ - -/** - * @ingroup iface_wl_shm - * @struct wl_shm_interface - */ -struct wl_shm_interface { - /** - * create a shm pool - * - * Create a new wl_shm_pool object. - * - * The pool can be used to create shared memory based buffer - * objects. The server will mmap size bytes of the passed file - * descriptor, to use as backing memory for the pool. - * @param id pool to create - * @param fd file descriptor for the pool - * @param size pool size, in bytes - */ - void (*create_pool)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - int32_t fd, - int32_t size); -}; - -#define WL_SHM_FORMAT 0 - -/** - * @ingroup iface_wl_shm - */ -#define WL_SHM_FORMAT_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_shm - */ -#define WL_SHM_CREATE_POOL_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_shm - * Sends an format event to the client owning the resource. - * @param resource_ The client's resource - * @param format buffer pixel format - */ -static inline void -wl_shm_send_format(struct wl_resource *resource_, uint32_t format) -{ - wl_resource_post_event(resource_, WL_SHM_FORMAT, format); -} - -/** - * @ingroup iface_wl_buffer - * @struct wl_buffer_interface - */ -struct wl_buffer_interface { - /** - * destroy a buffer - * - * Destroy a buffer. If and how you need to release the backing - * storage is defined by the buffer factory interface. - * - * For possible side-effects to a surface, see wl_surface.attach. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define WL_BUFFER_RELEASE 0 - -/** - * @ingroup iface_wl_buffer - */ -#define WL_BUFFER_RELEASE_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_buffer - */ -#define WL_BUFFER_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_buffer - * Sends an release event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_buffer_send_release(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_BUFFER_RELEASE); -} - -#ifndef WL_DATA_OFFER_ERROR_ENUM -#define WL_DATA_OFFER_ERROR_ENUM -enum wl_data_offer_error { - /** - * finish request was called untimely - */ - WL_DATA_OFFER_ERROR_INVALID_FINISH = 0, - /** - * action mask contains invalid values - */ - WL_DATA_OFFER_ERROR_INVALID_ACTION_MASK = 1, - /** - * action argument has an invalid value - */ - WL_DATA_OFFER_ERROR_INVALID_ACTION = 2, - /** - * offer doesn't accept this request - */ - WL_DATA_OFFER_ERROR_INVALID_OFFER = 3, -}; -#endif /* WL_DATA_OFFER_ERROR_ENUM */ - -/** - * @ingroup iface_wl_data_offer - * @struct wl_data_offer_interface - */ -struct wl_data_offer_interface { - /** - * accept one of the offered mime types - * - * Indicate that the client can accept the given mime type, or - * NULL for not accepted. - * - * For objects of version 2 or older, this request is used by the - * client to give feedback whether the client can receive the given - * mime type, or NULL if none is accepted; the feedback does not - * determine whether the drag-and-drop operation succeeds or not. - * - * For objects of version 3 or newer, this request determines the - * final result of the drag-and-drop operation. If the end result - * is that no mime types were accepted, the drag-and-drop operation - * will be cancelled and the corresponding drag source will receive - * wl_data_source.cancelled. Clients may still use this event in - * conjunction with wl_data_source.action for feedback. - * @param serial serial number of the accept request - * @param mime_type mime type accepted by the client - */ - void (*accept)(struct wl_client *client, - struct wl_resource *resource, - uint32_t serial, - const char *mime_type); - /** - * request that the data is transferred - * - * 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, - * both before and after wl_data_device.drop. Drag-and-drop - * destination clients may preemptively fetch data or examine it - * more closely to determine acceptance. - * @param mime_type mime type desired by receiver - * @param fd file descriptor for data transfer - */ - void (*receive)(struct wl_client *client, - struct wl_resource *resource, - const char *mime_type, - int32_t fd); - /** - * destroy data offer - * - * Destroy the data offer. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * the offer will no longer be used - * - * Notifies the compositor that the drag destination successfully - * finished the drag-and-drop operation. - * - * Upon receiving this request, the compositor will emit - * wl_data_source.dnd_finished on the drag source client. - * - * It is a client error to perform other requests than - * wl_data_offer.destroy after this one. It is also an error to - * perform this request after a NULL mime type has been set in - * wl_data_offer.accept or no action was received through - * wl_data_offer.action. - * @since 3 - */ - void (*finish)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the available/preferred drag-and-drop actions - * - * Sets the actions that the destination side client supports for - * this operation. This request may trigger the emission of - * wl_data_source.action and wl_data_offer.action events if the - * compositor needs to change the selected action. - * - * This request can be called multiple times throughout the - * drag-and-drop operation, typically in response to - * wl_data_device.enter or wl_data_device.motion events. - * - * This request determines the final result of the drag-and-drop - * operation. If the end result is that no action is accepted, the - * drag source will receive wl_drag_source.cancelled. - * - * The dnd_actions argument must contain only values expressed in - * the wl_data_device_manager.dnd_actions enum, and the - * preferred_action argument must only contain one of those values - * set, otherwise it will result in a protocol error. - * - * While managing an "ask" action, the destination drag-and-drop - * client may perform further wl_data_offer.receive requests, and - * is expected to perform one last wl_data_offer.set_actions - * request with a preferred action other than "ask" (and optionally - * wl_data_offer.accept) before requesting wl_data_offer.finish, in - * order to convey the action selected by the user. If the - * preferred action is not in the wl_data_offer.source_actions - * mask, an error will be raised. - * - * If the "ask" action is dismissed (e.g. user cancellation), the - * client is expected to perform wl_data_offer.destroy right away. - * - * This request can only be made on drag-and-drop offers, a - * protocol error will be raised otherwise. - * @param dnd_actions actions supported by the destination client - * @param preferred_action action preferred by the destination client - * @since 3 - */ - void (*set_actions)(struct wl_client *client, - struct wl_resource *resource, - uint32_t dnd_actions, - uint32_t preferred_action); -}; - -#define WL_DATA_OFFER_OFFER 0 -#define WL_DATA_OFFER_SOURCE_ACTIONS 1 -#define WL_DATA_OFFER_ACTION 2 - -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_OFFER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_SOURCE_ACTIONS_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_ACTION_SINCE_VERSION 3 - -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_ACCEPT_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_RECEIVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_FINISH_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_offer - */ -#define WL_DATA_OFFER_SET_ACTIONS_SINCE_VERSION 3 - -/** - * @ingroup iface_wl_data_offer - * Sends an offer event to the client owning the resource. - * @param resource_ The client's resource - * @param mime_type offered mime type - */ -static inline void -wl_data_offer_send_offer(struct wl_resource *resource_, const char *mime_type) -{ - wl_resource_post_event(resource_, WL_DATA_OFFER_OFFER, mime_type); -} - -/** - * @ingroup iface_wl_data_offer - * Sends an source_actions event to the client owning the resource. - * @param resource_ The client's resource - * @param source_actions actions offered by the data source - */ -static inline void -wl_data_offer_send_source_actions(struct wl_resource *resource_, uint32_t source_actions) -{ - wl_resource_post_event(resource_, WL_DATA_OFFER_SOURCE_ACTIONS, source_actions); -} - -/** - * @ingroup iface_wl_data_offer - * Sends an action event to the client owning the resource. - * @param resource_ The client's resource - * @param dnd_action action selected by the compositor - */ -static inline void -wl_data_offer_send_action(struct wl_resource *resource_, uint32_t dnd_action) -{ - wl_resource_post_event(resource_, WL_DATA_OFFER_ACTION, dnd_action); -} - -#ifndef WL_DATA_SOURCE_ERROR_ENUM -#define WL_DATA_SOURCE_ERROR_ENUM -enum wl_data_source_error { - /** - * action mask contains invalid values - */ - WL_DATA_SOURCE_ERROR_INVALID_ACTION_MASK = 0, - /** - * source doesn't accept this request - */ - WL_DATA_SOURCE_ERROR_INVALID_SOURCE = 1, -}; -#endif /* WL_DATA_SOURCE_ERROR_ENUM */ - -/** - * @ingroup iface_wl_data_source - * @struct wl_data_source_interface - */ -struct wl_data_source_interface { - /** - * add an offered mime type - * - * This request adds a mime type to the set of mime types - * advertised to targets. Can be called several times to offer - * multiple types. - * @param mime_type mime type offered by the data source - */ - void (*offer)(struct wl_client *client, - struct wl_resource *resource, - const char *mime_type); - /** - * destroy the data source - * - * Destroy the data source. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the available drag-and-drop actions - * - * Sets the actions that the source side client supports for this - * operation. This request may trigger wl_data_source.action and - * wl_data_offer.action events if the compositor needs to change - * the selected action. - * - * The dnd_actions argument must contain only values expressed in - * the wl_data_device_manager.dnd_actions enum, otherwise it will - * result in a protocol error. - * - * This request must be made once only, and 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 will raise a protocol error. - * @param dnd_actions actions supported by the data source - * @since 3 - */ - void (*set_actions)(struct wl_client *client, - struct wl_resource *resource, - uint32_t dnd_actions); -}; - -#define WL_DATA_SOURCE_TARGET 0 -#define WL_DATA_SOURCE_SEND 1 -#define WL_DATA_SOURCE_CANCELLED 2 -#define WL_DATA_SOURCE_DND_DROP_PERFORMED 3 -#define WL_DATA_SOURCE_DND_FINISHED 4 -#define WL_DATA_SOURCE_ACTION 5 - -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_TARGET_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_SEND_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_CANCELLED_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_DND_DROP_PERFORMED_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_DND_FINISHED_SINCE_VERSION 3 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_ACTION_SINCE_VERSION 3 - -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_OFFER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_source - */ -#define WL_DATA_SOURCE_SET_ACTIONS_SINCE_VERSION 3 - -/** - * @ingroup iface_wl_data_source - * Sends an target event to the client owning the resource. - * @param resource_ The client's resource - * @param mime_type mime type accepted by the target - */ -static inline void -wl_data_source_send_target(struct wl_resource *resource_, const char *mime_type) -{ - wl_resource_post_event(resource_, WL_DATA_SOURCE_TARGET, mime_type); -} - -/** - * @ingroup iface_wl_data_source - * Sends an send event to the client owning the resource. - * @param resource_ The client's resource - * @param mime_type mime type for the data - * @param fd file descriptor for the data - */ -static inline void -wl_data_source_send_send(struct wl_resource *resource_, const char *mime_type, int32_t fd) -{ - wl_resource_post_event(resource_, WL_DATA_SOURCE_SEND, mime_type, fd); -} - -/** - * @ingroup iface_wl_data_source - * Sends an cancelled event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_data_source_send_cancelled(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_DATA_SOURCE_CANCELLED); -} - -/** - * @ingroup iface_wl_data_source - * Sends an dnd_drop_performed event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_data_source_send_dnd_drop_performed(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_DATA_SOURCE_DND_DROP_PERFORMED); -} - -/** - * @ingroup iface_wl_data_source - * Sends an dnd_finished event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_data_source_send_dnd_finished(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_DATA_SOURCE_DND_FINISHED); -} - -/** - * @ingroup iface_wl_data_source - * Sends an action event to the client owning the resource. - * @param resource_ The client's resource - * @param dnd_action action selected by the compositor - */ -static inline void -wl_data_source_send_action(struct wl_resource *resource_, uint32_t dnd_action) -{ - wl_resource_post_event(resource_, WL_DATA_SOURCE_ACTION, dnd_action); -} - -#ifndef WL_DATA_DEVICE_ERROR_ENUM -#define WL_DATA_DEVICE_ERROR_ENUM -enum wl_data_device_error { - /** - * given wl_surface has another role - */ - WL_DATA_DEVICE_ERROR_ROLE = 0, -}; -#endif /* WL_DATA_DEVICE_ERROR_ENUM */ - -/** - * @ingroup iface_wl_data_device - * @struct wl_data_device_interface - */ -struct wl_data_device_interface { - /** - * start drag-and-drop operation - * - * This request asks the compositor to start a drag-and-drop - * operation on behalf of the client. - * - * The source argument is the data source that provides the data - * for the eventual data transfer. If source is NULL, enter, leave - * and motion events are sent only to the client that initiated the - * drag and the client is expected to handle the data passing - * internally. - * - * The origin surface is the surface where the drag originates and - * the client must have an active implicit grab that matches the - * serial. - * - * The icon surface is an optional (can be NULL) surface that - * provides an icon to be moved around with the cursor. Initially, - * the top-left corner of the icon surface is placed at the cursor - * hotspot, but subsequent wl_surface.attach request can move the - * relative position. Attach requests must be confirmed with - * wl_surface.commit as usual. The icon surface is given the role - * of a drag-and-drop icon. If the icon surface already has another - * role, it raises a protocol error. - * - * The current and pending input regions of the icon wl_surface are - * cleared, and wl_surface.set_input_region is ignored until the - * wl_surface is no longer used as the icon surface. When the use - * as an icon ends, the current and pending input regions become - * undefined, and the wl_surface is unmapped. - * @param source data source for the eventual transfer - * @param origin surface where the drag originates - * @param icon drag-and-drop icon surface - * @param serial serial number of the implicit grab on the origin - */ - void (*start_drag)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *source, - struct wl_resource *origin, - struct wl_resource *icon, - uint32_t serial); - /** - * copy data to the selection - * - * This request asks the compositor to set the selection to the - * data from the source on behalf of the client. - * - * To unset the selection, set the source to NULL. - * @param source data source for the selection - * @param serial serial number of the event that triggered this request - */ - void (*set_selection)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *source, - uint32_t serial); - /** - * destroy data device - * - * This request destroys the data device. - * @since 2 - */ - void (*release)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define WL_DATA_DEVICE_DATA_OFFER 0 -#define WL_DATA_DEVICE_ENTER 1 -#define WL_DATA_DEVICE_LEAVE 2 -#define WL_DATA_DEVICE_MOTION 3 -#define WL_DATA_DEVICE_DROP 4 -#define WL_DATA_DEVICE_SELECTION 5 - -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_DATA_OFFER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_LEAVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_MOTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_DROP_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_SELECTION_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_START_DRAG_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_SET_SELECTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device - */ -#define WL_DATA_DEVICE_RELEASE_SINCE_VERSION 2 - -/** - * @ingroup iface_wl_data_device - * Sends an data_offer event to the client owning the resource. - * @param resource_ The client's resource - * @param id the new data_offer object - */ -static inline void -wl_data_device_send_data_offer(struct wl_resource *resource_, struct wl_resource *id) -{ - wl_resource_post_event(resource_, WL_DATA_DEVICE_DATA_OFFER, id); -} - -/** - * @ingroup iface_wl_data_device - * Sends an enter event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the enter event - * @param surface client surface entered - * @param x surface-local x coordinate - * @param y surface-local y coordinate - * @param id source data_offer object - */ -static inline void -wl_data_device_send_enter(struct wl_resource *resource_, uint32_t serial, struct wl_resource *surface, wl_fixed_t x, wl_fixed_t y, struct wl_resource *id) -{ - wl_resource_post_event(resource_, WL_DATA_DEVICE_ENTER, serial, surface, x, y, id); -} - -/** - * @ingroup iface_wl_data_device - * Sends an leave event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_data_device_send_leave(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_DATA_DEVICE_LEAVE); -} - -/** - * @ingroup iface_wl_data_device - * Sends an motion event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param x surface-local x coordinate - * @param y surface-local y coordinate - */ -static inline void -wl_data_device_send_motion(struct wl_resource *resource_, uint32_t time, wl_fixed_t x, wl_fixed_t y) -{ - wl_resource_post_event(resource_, WL_DATA_DEVICE_MOTION, time, x, y); -} - -/** - * @ingroup iface_wl_data_device - * Sends an drop event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_data_device_send_drop(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_DATA_DEVICE_DROP); -} - -/** - * @ingroup iface_wl_data_device - * Sends an selection event to the client owning the resource. - * @param resource_ The client's resource - * @param id selection data_offer object - */ -static inline void -wl_data_device_send_selection(struct wl_resource *resource_, struct wl_resource *id) -{ - wl_resource_post_event(resource_, WL_DATA_DEVICE_SELECTION, id); -} - -#ifndef WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM -#define WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM -/** - * @ingroup iface_wl_data_device_manager - * drag and drop actions - * - * This is a bitmask of the available/preferred actions in a - * drag-and-drop operation. - * - * In the compositor, the selected action is a result of matching the - * actions offered by the source and destination sides. "action" events - * with a "none" action will be sent to both source and destination if - * there is no match. All further checks will effectively happen on - * (source actions ∩ destination actions). - * - * In addition, compositors may also pick different actions in - * reaction to key modifiers being pressed. One common design that - * is used in major toolkits (and the behavior recommended for - * compositors) is: - * - * - If no modifiers are pressed, the first match (in bit order) - * will be used. - * - Pressing Shift selects "move", if enabled in the mask. - * - Pressing Control selects "copy", if enabled in the mask. - * - * Behavior beyond that is considered implementation-dependent. - * Compositors may for example bind other modifiers (like Alt/Meta) - * or drags initiated with other buttons than BTN_LEFT to specific - * actions (e.g. "ask"). - */ -enum wl_data_device_manager_dnd_action { - /** - * no action - */ - WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE = 0, - /** - * copy action - */ - WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY = 1, - /** - * move action - */ - WL_DATA_DEVICE_MANAGER_DND_ACTION_MOVE = 2, - /** - * ask action - */ - WL_DATA_DEVICE_MANAGER_DND_ACTION_ASK = 4, -}; -#endif /* WL_DATA_DEVICE_MANAGER_DND_ACTION_ENUM */ - -/** - * @ingroup iface_wl_data_device_manager - * @struct wl_data_device_manager_interface - */ -struct wl_data_device_manager_interface { - /** - * create a new data source - * - * Create a new data source. - * @param id data source to create - */ - void (*create_data_source)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id); - /** - * create a new data device - * - * Create a new data device for a given seat. - * @param id data device to create - * @param seat seat associated with the data device - */ - void (*get_data_device)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *seat); -}; - - -/** - * @ingroup iface_wl_data_device_manager - */ -#define WL_DATA_DEVICE_MANAGER_CREATE_DATA_SOURCE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_data_device_manager - */ -#define WL_DATA_DEVICE_MANAGER_GET_DATA_DEVICE_SINCE_VERSION 1 - -#ifndef WL_SHELL_ERROR_ENUM -#define WL_SHELL_ERROR_ENUM -enum wl_shell_error { - /** - * given wl_surface has another role - */ - WL_SHELL_ERROR_ROLE = 0, -}; -#endif /* WL_SHELL_ERROR_ENUM */ - -/** - * @ingroup iface_wl_shell - * @struct wl_shell_interface - */ -struct wl_shell_interface { - /** - * create a shell surface from a surface - * - * Create a shell surface for an existing surface. This gives the - * wl_surface the role of a shell surface. If the wl_surface - * already has another role, it raises a protocol error. - * - * Only one shell surface can be associated with a given surface. - * @param id shell surface to create - * @param surface surface to be given the shell surface role - */ - void (*get_shell_surface)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface); -}; - - -/** - * @ingroup iface_wl_shell - */ -#define WL_SHELL_GET_SHELL_SURFACE_SINCE_VERSION 1 - -#ifndef WL_SHELL_SURFACE_RESIZE_ENUM -#define WL_SHELL_SURFACE_RESIZE_ENUM -/** - * @ingroup iface_wl_shell_surface - * edge values for resizing - * - * These values are used to indicate which edge of a surface - * is being dragged in a resize operation. The server may - * use this information to adapt its behavior, e.g. choose - * an appropriate cursor image. - */ -enum wl_shell_surface_resize { - /** - * no edge - */ - WL_SHELL_SURFACE_RESIZE_NONE = 0, - /** - * top edge - */ - WL_SHELL_SURFACE_RESIZE_TOP = 1, - /** - * bottom edge - */ - WL_SHELL_SURFACE_RESIZE_BOTTOM = 2, - /** - * left edge - */ - WL_SHELL_SURFACE_RESIZE_LEFT = 4, - /** - * top and left edges - */ - WL_SHELL_SURFACE_RESIZE_TOP_LEFT = 5, - /** - * bottom and left edges - */ - WL_SHELL_SURFACE_RESIZE_BOTTOM_LEFT = 6, - /** - * right edge - */ - WL_SHELL_SURFACE_RESIZE_RIGHT = 8, - /** - * top and right edges - */ - WL_SHELL_SURFACE_RESIZE_TOP_RIGHT = 9, - /** - * bottom and right edges - */ - WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT = 10, -}; -#endif /* WL_SHELL_SURFACE_RESIZE_ENUM */ - -#ifndef WL_SHELL_SURFACE_TRANSIENT_ENUM -#define WL_SHELL_SURFACE_TRANSIENT_ENUM -/** - * @ingroup iface_wl_shell_surface - * details of transient behaviour - * - * These flags specify details of the expected behaviour - * of transient surfaces. Used in the set_transient request. - */ -enum wl_shell_surface_transient { - /** - * do not set keyboard focus - */ - WL_SHELL_SURFACE_TRANSIENT_INACTIVE = 0x1, -}; -#endif /* WL_SHELL_SURFACE_TRANSIENT_ENUM */ - -#ifndef WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM -#define WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM -/** - * @ingroup iface_wl_shell_surface - * different method to set the surface fullscreen - * - * 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. - */ -enum wl_shell_surface_fullscreen_method { - /** - * no preference, apply default policy - */ - WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT = 0, - /** - * scale, preserve the surface's aspect ratio and center on output - */ - WL_SHELL_SURFACE_FULLSCREEN_METHOD_SCALE = 1, - /** - * switch output mode to the smallest mode that can fit the surface, add black borders to compensate size mismatch - */ - WL_SHELL_SURFACE_FULLSCREEN_METHOD_DRIVER = 2, - /** - * no upscaling, center on output and add black borders to compensate size mismatch - */ - WL_SHELL_SURFACE_FULLSCREEN_METHOD_FILL = 3, -}; -#endif /* WL_SHELL_SURFACE_FULLSCREEN_METHOD_ENUM */ - -/** - * @ingroup iface_wl_shell_surface - * @struct wl_shell_surface_interface - */ -struct wl_shell_surface_interface { - /** - * respond to a ping event - * - * A client must respond to a ping event with a pong request or - * the client may be deemed unresponsive. - * @param serial serial number of the ping event - */ - void (*pong)(struct wl_client *client, - struct wl_resource *resource, - uint32_t serial); - /** - * start an interactive move - * - * Start a pointer-driven move of the surface. - * - * This request must be used in response to a button press event. - * The server may ignore move requests depending on the state of - * the surface (e.g. fullscreen or maximized). - * @param seat seat whose pointer is used - * @param serial serial number of the implicit grab on the pointer - */ - void (*move)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *seat, - uint32_t serial); - /** - * start an interactive resize - * - * Start a pointer-driven resizing of the surface. - * - * This request must be used in response to a button press event. - * The server may ignore resize requests depending on the state of - * the surface (e.g. fullscreen or maximized). - * @param seat seat whose pointer is used - * @param serial serial number of the implicit grab on the pointer - * @param edges which edge or corner is being dragged - */ - void (*resize)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *seat, - uint32_t serial, - uint32_t edges); - /** - * make the surface a toplevel surface - * - * Map the surface as a toplevel surface. - * - * A toplevel surface is not fullscreen, maximized or transient. - */ - void (*set_toplevel)(struct wl_client *client, - struct wl_resource *resource); - /** - * make the surface a transient surface - * - * Map the surface relative to an existing surface. - * - * The x and y arguments specify the location of the upper left - * corner of the surface relative to the upper left corner of the - * parent surface, in surface-local coordinates. - * - * The flags argument controls details of the transient behaviour. - * @param parent parent surface - * @param x surface-local x coordinate - * @param y surface-local y coordinate - * @param flags transient surface behavior - */ - void (*set_transient)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *parent, - int32_t x, - int32_t y, - uint32_t flags); - /** - * make the surface a fullscreen surface - * - * Map the surface as a fullscreen surface. - * - * If an output parameter is given then the surface will be made - * fullscreen on that output. If the client does not specify the - * output then the compositor will apply its policy - usually - * choosing the output on which the surface has the biggest surface - * area. - * - * The client may specify a method to resolve a size conflict - * between the output size and the surface size - this is provided - * through the method parameter. - * - * The framerate parameter is used only when the method is set to - * "driver", to indicate the preferred framerate. A value of 0 - * indicates that the client does not care about framerate. The - * framerate is specified in mHz, that is framerate of 60000 is - * 60Hz. - * - * A method of "scale" or "driver" implies a scaling operation of - * the surface, either via a direct scaling operation or a change - * of the output mode. This will override any kind of output - * scaling, so that mapping a surface with a buffer size equal to - * the mode can fill the screen independent of buffer_scale. - * - * A method of "fill" means we don't scale up the buffer, however - * any output scale is applied. This means that you may run into an - * edge case where the application maps a buffer with the same size - * of the output mode but buffer_scale 1 (thus making a surface - * larger than the output). In this case it is allowed to downscale - * the results to fit the screen. - * - * The compositor must reply to this request with a configure event - * with the dimensions for the output on which the surface will be - * made fullscreen. - * @param method method for resolving size conflict - * @param framerate framerate in mHz - * @param output output on which the surface is to be fullscreen - */ - void (*set_fullscreen)(struct wl_client *client, - struct wl_resource *resource, - uint32_t method, - uint32_t framerate, - struct wl_resource *output); - /** - * make the surface a popup surface - * - * Map the surface as a popup. - * - * A popup surface is a transient surface with an added pointer - * grab. - * - * An existing implicit grab will be changed to owner-events mode, - * and the popup grab will continue after the implicit grab ends - * (i.e. releasing the mouse button does not cause the popup to be - * unmapped). - * - * The popup grab continues until the window is destroyed or a - * mouse button is pressed in any other client's window. A click in - * any of the client's surfaces is reported as normal, however, - * clicks in other clients' surfaces will be discarded and trigger - * the callback. - * - * The x and y arguments specify the location of the upper left - * corner of the surface relative to the upper left corner of the - * parent surface, in surface-local coordinates. - * @param seat seat whose pointer is used - * @param serial serial number of the implicit grab on the pointer - * @param parent parent surface - * @param x surface-local x coordinate - * @param y surface-local y coordinate - * @param flags transient surface behavior - */ - void (*set_popup)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *seat, - uint32_t serial, - struct wl_resource *parent, - int32_t x, - int32_t y, - uint32_t flags); - /** - * make the surface a maximized surface - * - * Map the surface as a maximized surface. - * - * If an output parameter is given then the surface will be - * maximized on that output. If the client does not specify the - * output then the compositor will apply its policy - usually - * choosing the output on which the surface has the biggest surface - * area. - * - * The compositor will reply with a configure event telling the - * expected new surface size. The operation is completed on the - * next buffer attach to this surface. - * - * A maximized surface typically fills the entire output it is - * bound to, except for desktop elements such as panels. This is - * the main difference between a maximized shell surface and a - * fullscreen shell surface. - * - * The details depend on the compositor implementation. - * @param output output on which the surface is to be maximized - */ - void (*set_maximized)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *output); - /** - * set surface title - * - * 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. - * @param title surface title - */ - void (*set_title)(struct wl_client *client, - struct wl_resource *resource, - const char *title); - /** - * set surface class - * - * Set a class for the surface. - * - * The surface class identifies the general class of applications - * to which the surface belongs. A common convention is to use the - * file name (or the full path if it is a non-standard location) of - * the application's .desktop file as the class. - * @param class_ surface class - */ - void (*set_class)(struct wl_client *client, - struct wl_resource *resource, - const char *class_); -}; - -#define WL_SHELL_SURFACE_PING 0 -#define WL_SHELL_SURFACE_CONFIGURE 1 -#define WL_SHELL_SURFACE_POPUP_DONE 2 - -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_PING_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_POPUP_DONE_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_PONG_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_MOVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_RESIZE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_TOPLEVEL_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_TRANSIENT_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_POPUP_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_TITLE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_shell_surface - */ -#define WL_SHELL_SURFACE_SET_CLASS_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_shell_surface - * Sends an ping event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the ping - */ -static inline void -wl_shell_surface_send_ping(struct wl_resource *resource_, uint32_t serial) -{ - wl_resource_post_event(resource_, WL_SHELL_SURFACE_PING, serial); -} - -/** - * @ingroup iface_wl_shell_surface - * Sends an configure event to the client owning the resource. - * @param resource_ The client's resource - * @param edges how the surface was resized - * @param width new width of the surface - * @param height new height of the surface - */ -static inline void -wl_shell_surface_send_configure(struct wl_resource *resource_, uint32_t edges, int32_t width, int32_t height) -{ - wl_resource_post_event(resource_, WL_SHELL_SURFACE_CONFIGURE, edges, width, height); -} - -/** - * @ingroup iface_wl_shell_surface - * Sends an popup_done event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_shell_surface_send_popup_done(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_SHELL_SURFACE_POPUP_DONE); -} - -#ifndef WL_SURFACE_ERROR_ENUM -#define WL_SURFACE_ERROR_ENUM -/** - * @ingroup iface_wl_surface - * wl_surface error values - * - * These errors can be emitted in response to wl_surface requests. - */ -enum wl_surface_error { - /** - * buffer scale value is invalid - */ - WL_SURFACE_ERROR_INVALID_SCALE = 0, - /** - * buffer transform value is invalid - */ - WL_SURFACE_ERROR_INVALID_TRANSFORM = 1, -}; -#endif /* WL_SURFACE_ERROR_ENUM */ - -/** - * @ingroup iface_wl_surface - * @struct wl_surface_interface - */ -struct wl_surface_interface { - /** - * delete surface - * - * Deletes the surface and invalidates its object ID. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the surface contents - * - * Set a buffer as the content of this surface. - * - * The new size of the surface is calculated based on the buffer - * size transformed by the inverse buffer_transform and the inverse - * buffer_scale. This means that the supplied buffer must be an - * integer multiple of the buffer_scale. - * - * The x and y arguments specify the location of the new pending - * buffer's upper left corner, relative to the current buffer's - * upper left corner, in surface-local coordinates. In other words, - * the x and y, combined with the new surface size define in which - * directions the surface's size changes. - * - * Surface contents are double-buffered state, see - * wl_surface.commit. - * - * The initial surface contents are void; there is no content. - * wl_surface.attach assigns the given wl_buffer as the pending - * wl_buffer. wl_surface.commit makes the pending wl_buffer the new - * surface contents, and the size of the surface becomes the size - * calculated from the wl_buffer, as described above. After commit, - * there is no pending buffer until the next attach. - * - * Committing a pending wl_buffer allows the compositor to read the - * pixels in the wl_buffer. The compositor may access the pixels at - * any time after the wl_surface.commit request. When the - * compositor will not access the pixels anymore, it will send the - * wl_buffer.release event. Only after receiving wl_buffer.release, - * the client may reuse the wl_buffer. A wl_buffer that has been - * attached and then replaced by another attach instead of - * committed will not receive a release event, and is not used by - * the compositor. - * - * Destroying the wl_buffer after wl_buffer.release does not change - * the surface contents. However, if the client destroys the - * wl_buffer before receiving the wl_buffer.release event, the - * surface contents become undefined immediately. - * - * If wl_surface.attach is sent with a NULL wl_buffer, the - * following wl_surface.commit will remove the surface content. - * @param buffer buffer of surface contents - * @param x surface-local x coordinate - * @param y surface-local y coordinate - */ - void (*attach)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *buffer, - int32_t x, - int32_t y); - /** - * mark part of the surface damaged - * - * This request is used to describe the regions where the pending - * buffer is different from the current surface contents, and where - * the surface therefore needs to be repainted. The compositor - * ignores the parts of the damage that fall outside of the - * surface. - * - * Damage is double-buffered state, see wl_surface.commit. - * - * The damage rectangle is specified in surface-local coordinates, - * where x and y specify the upper left corner of the damage - * rectangle. - * - * The initial value for pending damage is empty: no damage. - * wl_surface.damage adds pending damage: the new pending damage is - * the union of old pending damage and the given rectangle. - * - * wl_surface.commit assigns pending damage as the current damage, - * and clears pending damage. The server will clear the current - * damage as it repaints the surface. - * - * Alternatively, damage can be posted with - * wl_surface.damage_buffer which uses buffer coordinates instead - * of surface coordinates, and is probably the preferred and - * intuitive way of doing this. - * @param x surface-local x coordinate - * @param y surface-local y coordinate - * @param width width of damage rectangle - * @param height height of damage rectangle - */ - void (*damage)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height); - /** - * request a frame throttling hint - * - * Request a notification when it is a good time to start drawing - * a new frame, by creating a frame callback. This is useful for - * throttling redrawing operations, and driving animations. - * - * When a client is animating on a wl_surface, it can use the - * 'frame' request to get notified when it is a good time to draw - * and commit the next frame of animation. If the client commits an - * update earlier than that, it is likely that some updates will - * not make it to the display, and the client is wasting resources - * by drawing too often. - * - * The frame request will take effect on the next - * wl_surface.commit. The notification will only be posted for one - * frame unless requested again. For a wl_surface, the - * notifications are posted in the order the frame requests were - * committed. - * - * The server must send the notifications so that a client will not - * send excessive updates, while still allowing the highest - * possible update rate for clients that wait for the reply before - * drawing again. The server should give some time for the client - * to draw and commit after sending the frame callback events to - * let it hit the next output refresh. - * - * A server should avoid signaling the frame callbacks if the - * surface is not visible in any way, e.g. the surface is - * off-screen, or completely obscured by other opaque surfaces. - * - * The object returned by this request will be destroyed by the - * compositor after the callback is fired and as such the client - * must not attempt to use it after that point. - * - * The callback_data passed in the callback is the current time, in - * milliseconds, with an undefined base. - * @param callback callback object for the frame request - */ - void (*frame)(struct wl_client *client, - struct wl_resource *resource, - uint32_t callback); - /** - * set opaque region - * - * This request sets the region of the surface that contains - * opaque content. - * - * The opaque region is an optimization hint for the compositor - * that lets it optimize the redrawing of content behind opaque - * regions. Setting an opaque region is not required for correct - * behaviour, but marking transparent content as opaque will result - * in repaint artifacts. - * - * The opaque region is specified in surface-local coordinates. - * - * The compositor ignores the parts of the opaque region that fall - * outside of the surface. - * - * Opaque region is double-buffered state, see wl_surface.commit. - * - * wl_surface.set_opaque_region changes the pending opaque region. - * wl_surface.commit copies the pending region to the current - * region. Otherwise, the pending and current regions are never - * changed. - * - * The initial value for an opaque region is empty. Setting the - * pending opaque region has copy semantics, and the wl_region - * object can be destroyed immediately. A NULL wl_region causes the - * pending opaque region to be set to empty. - * @param region opaque region of the surface - */ - void (*set_opaque_region)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *region); - /** - * set input region - * - * This request sets the region of the surface that can receive - * pointer and touch events. - * - * Input events happening outside of this region will try the next - * surface in the server surface stack. The compositor ignores the - * parts of the input region that fall outside of the surface. - * - * The input region is specified in surface-local coordinates. - * - * Input region is double-buffered state, see wl_surface.commit. - * - * wl_surface.set_input_region changes the pending input region. - * wl_surface.commit copies the pending region to the current - * region. Otherwise the pending and current regions are never - * changed, except cursor and icon surfaces are special cases, see - * wl_pointer.set_cursor and wl_data_device.start_drag. - * - * The initial value for an input region is infinite. That means - * the whole surface will accept input. Setting the pending input - * region has copy semantics, and the wl_region object can be - * destroyed immediately. A NULL wl_region causes the input region - * to be set to infinite. - * @param region input region of the surface - */ - void (*set_input_region)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *region); - /** - * commit pending surface state - * - * Surface state (input, opaque, and damage regions, attached - * buffers, etc.) is double-buffered. Protocol requests modify the - * pending state, as opposed to the current state in use by the - * compositor. 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. - * - * On commit, a pending wl_buffer is applied first, and all other - * state second. This means that all coordinates in double-buffered - * state are relative to the new wl_buffer coming into use, except - * for wl_surface.attach itself. If there is no pending wl_buffer, - * the coordinates are relative to the current surface contents. - * - * All requests that need a commit to become effective are - * documented to affect double-buffered state. - * - * Other interfaces may add further double-buffered surface state. - */ - void (*commit)(struct wl_client *client, - struct wl_resource *resource); - /** - * sets the buffer transformation - * - * This request sets an optional transformation on how the - * compositor interprets the contents of the buffer attached to the - * surface. The accepted values for the transform parameter are the - * values for wl_output.transform. - * - * Buffer transform is double-buffered state, see - * wl_surface.commit. - * - * A newly created surface has its buffer transformation set to - * normal. - * - * wl_surface.set_buffer_transform changes the pending buffer - * transformation. wl_surface.commit copies the pending buffer - * transformation to the current one. Otherwise, the pending and - * current values are never changed. - * - * The purpose of this request is to allow clients to render - * content according to the output transform, thus permitting the - * compositor to use certain optimizations even if the display is - * rotated. Using hardware overlays and scanning out a client - * buffer for fullscreen surfaces are examples of such - * optimizations. Those optimizations are highly dependent on the - * compositor implementation, so the use of this request should be - * considered on a case-by-case basis. - * - * Note that if the transform value includes 90 or 270 degree - * rotation, the width of the buffer will become the surface height - * and the height of the buffer will become the surface width. - * - * If transform is not one of the values from the - * wl_output.transform enum the invalid_transform protocol error is - * raised. - * @param transform transform for interpreting buffer contents - * @since 2 - */ - void (*set_buffer_transform)(struct wl_client *client, - struct wl_resource *resource, - int32_t transform); - /** - * sets the buffer scaling factor - * - * This request sets an optional scaling factor on how the - * compositor interprets the contents of the buffer attached to the - * window. - * - * Buffer scale is double-buffered state, see wl_surface.commit. - * - * A newly created surface has its buffer scale set to 1. - * - * wl_surface.set_buffer_scale changes the pending buffer scale. - * wl_surface.commit copies the pending buffer scale to the current - * one. Otherwise, the pending and current values are never - * changed. - * - * The purpose of this request is to allow clients to supply higher - * resolution buffer data for use on high resolution outputs. It is - * intended that you pick the same buffer scale as the scale of the - * output that the surface is displayed on. This means the - * compositor can avoid scaling when rendering the surface on that - * output. - * - * Note that if the scale is larger than 1, then you have to attach - * a buffer that is larger (by a factor of scale in each dimension) - * than the desired surface size. - * - * If scale is not positive the invalid_scale protocol error is - * raised. - * @param scale positive scale for interpreting buffer contents - * @since 3 - */ - void (*set_buffer_scale)(struct wl_client *client, - struct wl_resource *resource, - int32_t scale); - /** - * mark part of the surface damaged using buffer coordinates - * - * This request is used to describe the regions where the pending - * buffer is different from the current surface contents, and where - * the surface therefore needs to be repainted. The compositor - * ignores the parts of the damage that fall outside of the - * surface. - * - * Damage is double-buffered state, see wl_surface.commit. - * - * The damage rectangle is specified in buffer coordinates, where x - * and y specify the upper left corner of the damage rectangle. - * - * The initial value for pending damage is empty: no damage. - * wl_surface.damage_buffer adds pending damage: the new pending - * damage is the union of old pending damage and the given - * rectangle. - * - * wl_surface.commit assigns pending damage as the current damage, - * and clears pending damage. The server will clear the current - * damage as it repaints the surface. - * - * This request differs from wl_surface.damage in only one way - it - * takes damage in buffer coordinates instead of surface-local - * coordinates. While this generally is more intuitive than surface - * coordinates, it is especially desirable when using wp_viewport - * or when a drawing library (like EGL) is unaware of buffer scale - * and buffer transform. - * - * Note: Because buffer transformation changes and damage requests - * may be interleaved in the protocol stream, it is impossible to - * determine the actual mapping between surface and buffer damage - * until wl_surface.commit time. Therefore, compositors wishing to - * take both kinds of damage into account will have to accumulate - * damage from the two requests separately and only transform from - * one to the other after receiving the wl_surface.commit. - * @param x buffer-local x coordinate - * @param y buffer-local y coordinate - * @param width width of damage rectangle - * @param height height of damage rectangle - * @since 4 - */ - void (*damage_buffer)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height); -}; - -#define WL_SURFACE_ENTER 0 -#define WL_SURFACE_LEAVE 1 - -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_LEAVE_SINCE_VERSION 1 - -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_ATTACH_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_DAMAGE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_FRAME_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_SET_OPAQUE_REGION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_SET_INPUT_REGION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_COMMIT_SINCE_VERSION 1 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_SET_BUFFER_TRANSFORM_SINCE_VERSION 2 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_SET_BUFFER_SCALE_SINCE_VERSION 3 -/** - * @ingroup iface_wl_surface - */ -#define WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION 4 - -/** - * @ingroup iface_wl_surface - * Sends an enter event to the client owning the resource. - * @param resource_ The client's resource - * @param output output entered by the surface - */ -static inline void -wl_surface_send_enter(struct wl_resource *resource_, struct wl_resource *output) -{ - wl_resource_post_event(resource_, WL_SURFACE_ENTER, output); -} - -/** - * @ingroup iface_wl_surface - * Sends an leave event to the client owning the resource. - * @param resource_ The client's resource - * @param output output left by the surface - */ -static inline void -wl_surface_send_leave(struct wl_resource *resource_, struct wl_resource *output) -{ - wl_resource_post_event(resource_, WL_SURFACE_LEAVE, output); -} - -#ifndef WL_SEAT_CAPABILITY_ENUM -#define WL_SEAT_CAPABILITY_ENUM -/** - * @ingroup iface_wl_seat - * seat capability bitmask - * - * This is a bitmask of capabilities this seat has; if a member is - * set, then it is present on the seat. - */ -enum wl_seat_capability { - /** - * the seat has pointer devices - */ - WL_SEAT_CAPABILITY_POINTER = 1, - /** - * the seat has one or more keyboards - */ - WL_SEAT_CAPABILITY_KEYBOARD = 2, - /** - * the seat has touch devices - */ - WL_SEAT_CAPABILITY_TOUCH = 4, -}; -#endif /* WL_SEAT_CAPABILITY_ENUM */ - -/** - * @ingroup iface_wl_seat - * @struct wl_seat_interface - */ -struct wl_seat_interface { - /** - * return pointer object - * - * The ID provided will be initialized to the wl_pointer - * interface for this seat. - * - * This request only takes effect if the seat has the pointer - * capability, or has had the pointer capability in the past. It is - * a protocol violation to issue this request on a seat that has - * never had the pointer capability. - * @param id seat pointer - */ - void (*get_pointer)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id); - /** - * return keyboard object - * - * The ID provided will be initialized to the wl_keyboard - * interface for this seat. - * - * This request only takes effect if the seat has the keyboard - * capability, or has had the keyboard capability in the past. It - * is a protocol violation to issue this request on a seat that has - * never had the keyboard capability. - * @param id seat keyboard - */ - void (*get_keyboard)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id); - /** - * return touch object - * - * The ID provided will be initialized to the wl_touch interface - * for this seat. - * - * This request only takes effect if the seat has the touch - * capability, or has had the touch capability in the past. It is a - * protocol violation to issue this request on a seat that has - * never had the touch capability. - * @param id seat touch interface - */ - void (*get_touch)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id); - /** - * release the seat object - * - * Using this request a client can tell the server that it is not - * going to use the seat object anymore. - * @since 5 - */ - void (*release)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define WL_SEAT_CAPABILITIES 0 -#define WL_SEAT_NAME 1 - -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_CAPABILITIES_SINCE_VERSION 1 -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_NAME_SINCE_VERSION 2 - -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_GET_POINTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_GET_KEYBOARD_SINCE_VERSION 1 -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_GET_TOUCH_SINCE_VERSION 1 -/** - * @ingroup iface_wl_seat - */ -#define WL_SEAT_RELEASE_SINCE_VERSION 5 - -/** - * @ingroup iface_wl_seat - * Sends an capabilities event to the client owning the resource. - * @param resource_ The client's resource - * @param capabilities capabilities of the seat - */ -static inline void -wl_seat_send_capabilities(struct wl_resource *resource_, uint32_t capabilities) -{ - wl_resource_post_event(resource_, WL_SEAT_CAPABILITIES, capabilities); -} - -/** - * @ingroup iface_wl_seat - * Sends an name event to the client owning the resource. - * @param resource_ The client's resource - * @param name seat identifier - */ -static inline void -wl_seat_send_name(struct wl_resource *resource_, const char *name) -{ - wl_resource_post_event(resource_, WL_SEAT_NAME, name); -} - -#ifndef WL_POINTER_ERROR_ENUM -#define WL_POINTER_ERROR_ENUM -enum wl_pointer_error { - /** - * given wl_surface has another role - */ - WL_POINTER_ERROR_ROLE = 0, -}; -#endif /* WL_POINTER_ERROR_ENUM */ - -#ifndef WL_POINTER_BUTTON_STATE_ENUM -#define WL_POINTER_BUTTON_STATE_ENUM -/** - * @ingroup iface_wl_pointer - * physical button state - * - * Describes the physical state of a button that produced the button - * event. - */ -enum wl_pointer_button_state { - /** - * the button is not pressed - */ - WL_POINTER_BUTTON_STATE_RELEASED = 0, - /** - * the button is pressed - */ - WL_POINTER_BUTTON_STATE_PRESSED = 1, -}; -#endif /* WL_POINTER_BUTTON_STATE_ENUM */ - -#ifndef WL_POINTER_AXIS_ENUM -#define WL_POINTER_AXIS_ENUM -/** - * @ingroup iface_wl_pointer - * axis types - * - * Describes the axis types of scroll events. - */ -enum wl_pointer_axis { - /** - * vertical axis - */ - WL_POINTER_AXIS_VERTICAL_SCROLL = 0, - /** - * horizontal axis - */ - WL_POINTER_AXIS_HORIZONTAL_SCROLL = 1, -}; -#endif /* WL_POINTER_AXIS_ENUM */ - -#ifndef WL_POINTER_AXIS_SOURCE_ENUM -#define WL_POINTER_AXIS_SOURCE_ENUM -/** - * @ingroup iface_wl_pointer - * axis source types - * - * Describes the source types for axis events. This indicates to the - * client how an axis event was physically generated; a client may - * adjust the user interface accordingly. For example, scroll events - * from a "finger" source may be in a smooth coordinate space with - * kinetic scrolling whereas a "wheel" source may be in discrete steps - * of a number of lines. - * - * The "continuous" axis source is a device generating events in a - * continuous coordinate space, but using something other than a - * finger. One example for this source is button-based scrolling where - * the vertical motion of a device is converted to scroll events while - * a button is held down. - * - * The "wheel tilt" axis source indicates that the actual device is a - * wheel but the scroll event is not caused by a rotation but a - * (usually sideways) tilt of the wheel. - */ -enum wl_pointer_axis_source { - /** - * a physical wheel rotation - */ - WL_POINTER_AXIS_SOURCE_WHEEL = 0, - /** - * finger on a touch surface - */ - WL_POINTER_AXIS_SOURCE_FINGER = 1, - /** - * continuous coordinate space - */ - WL_POINTER_AXIS_SOURCE_CONTINUOUS = 2, - /** - * a physical wheel tilt - * @since 6 - */ - WL_POINTER_AXIS_SOURCE_WHEEL_TILT = 3, -}; -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_AXIS_SOURCE_WHEEL_TILT_SINCE_VERSION 6 -#endif /* WL_POINTER_AXIS_SOURCE_ENUM */ - -/** - * @ingroup iface_wl_pointer - * @struct wl_pointer_interface - */ -struct wl_pointer_interface { - /** - * set the pointer surface - * - * Set the pointer surface, i.e., the surface that contains the - * pointer image (cursor). This request gives the surface the role - * of a cursor. If the surface already has another role, it raises - * a protocol error. - * - * The cursor actually changes only if the pointer focus for this - * device is 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 pointer 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. - * @param serial serial number of the enter event - * @param surface pointer surface - * @param hotspot_x surface-local x coordinate - * @param hotspot_y surface-local y coordinate - */ - void (*set_cursor)(struct wl_client *client, - struct wl_resource *resource, - uint32_t serial, - struct wl_resource *surface, - int32_t hotspot_x, - int32_t hotspot_y); - /** - * release the pointer object - * - * Using this request a client can tell the server that it is not - * going to use the pointer object anymore. - * - * This request destroys the pointer proxy object, so clients must - * not call wl_pointer_destroy() after using this request. - * @since 3 - */ - void (*release)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define WL_POINTER_ENTER 0 -#define WL_POINTER_LEAVE 1 -#define WL_POINTER_MOTION 2 -#define WL_POINTER_BUTTON 3 -#define WL_POINTER_AXIS 4 -#define WL_POINTER_FRAME 5 -#define WL_POINTER_AXIS_SOURCE 6 -#define WL_POINTER_AXIS_STOP 7 -#define WL_POINTER_AXIS_DISCRETE 8 - -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_LEAVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_MOTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_BUTTON_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_AXIS_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_FRAME_SINCE_VERSION 5 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_AXIS_SOURCE_SINCE_VERSION 5 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_AXIS_STOP_SINCE_VERSION 5 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_AXIS_DISCRETE_SINCE_VERSION 5 - -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_SET_CURSOR_SINCE_VERSION 1 -/** - * @ingroup iface_wl_pointer - */ -#define WL_POINTER_RELEASE_SINCE_VERSION 3 - -/** - * @ingroup iface_wl_pointer - * Sends an enter event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the enter event - * @param surface surface entered by the pointer - * @param surface_x surface-local x coordinate - * @param surface_y surface-local y coordinate - */ -static inline void -wl_pointer_send_enter(struct wl_resource *resource_, uint32_t serial, struct wl_resource *surface, wl_fixed_t surface_x, wl_fixed_t surface_y) -{ - wl_resource_post_event(resource_, WL_POINTER_ENTER, serial, surface, surface_x, surface_y); -} - -/** - * @ingroup iface_wl_pointer - * Sends an leave event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the leave event - * @param surface surface left by the pointer - */ -static inline void -wl_pointer_send_leave(struct wl_resource *resource_, uint32_t serial, struct wl_resource *surface) -{ - wl_resource_post_event(resource_, WL_POINTER_LEAVE, serial, surface); -} - -/** - * @ingroup iface_wl_pointer - * Sends an motion event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param surface_x surface-local x coordinate - * @param surface_y surface-local y coordinate - */ -static inline void -wl_pointer_send_motion(struct wl_resource *resource_, uint32_t time, wl_fixed_t surface_x, wl_fixed_t surface_y) -{ - wl_resource_post_event(resource_, WL_POINTER_MOTION, time, surface_x, surface_y); -} - -/** - * @ingroup iface_wl_pointer - * Sends an button event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the button event - * @param time timestamp with millisecond granularity - * @param button button that produced the event - * @param state physical state of the button - */ -static inline void -wl_pointer_send_button(struct wl_resource *resource_, uint32_t serial, uint32_t time, uint32_t button, uint32_t state) -{ - wl_resource_post_event(resource_, WL_POINTER_BUTTON, serial, time, button, state); -} - -/** - * @ingroup iface_wl_pointer - * Sends an axis event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param axis axis type - * @param value length of vector in surface-local coordinate space - */ -static inline void -wl_pointer_send_axis(struct wl_resource *resource_, uint32_t time, uint32_t axis, wl_fixed_t value) -{ - wl_resource_post_event(resource_, WL_POINTER_AXIS, time, axis, value); -} - -/** - * @ingroup iface_wl_pointer - * Sends an frame event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_pointer_send_frame(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_POINTER_FRAME); -} - -/** - * @ingroup iface_wl_pointer - * Sends an axis_source event to the client owning the resource. - * @param resource_ The client's resource - * @param axis_source source of the axis event - */ -static inline void -wl_pointer_send_axis_source(struct wl_resource *resource_, uint32_t axis_source) -{ - wl_resource_post_event(resource_, WL_POINTER_AXIS_SOURCE, axis_source); -} - -/** - * @ingroup iface_wl_pointer - * Sends an axis_stop event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param axis the axis stopped with this event - */ -static inline void -wl_pointer_send_axis_stop(struct wl_resource *resource_, uint32_t time, uint32_t axis) -{ - wl_resource_post_event(resource_, WL_POINTER_AXIS_STOP, time, axis); -} - -/** - * @ingroup iface_wl_pointer - * Sends an axis_discrete event to the client owning the resource. - * @param resource_ The client's resource - * @param axis axis type - * @param discrete number of steps - */ -static inline void -wl_pointer_send_axis_discrete(struct wl_resource *resource_, uint32_t axis, int32_t discrete) -{ - wl_resource_post_event(resource_, WL_POINTER_AXIS_DISCRETE, axis, discrete); -} - -#ifndef WL_KEYBOARD_KEYMAP_FORMAT_ENUM -#define WL_KEYBOARD_KEYMAP_FORMAT_ENUM -/** - * @ingroup iface_wl_keyboard - * keyboard mapping format - * - * This specifies the format of the keymap provided to the - * client with the wl_keyboard.keymap event. - */ -enum wl_keyboard_keymap_format { - /** - * no keymap; client must understand how to interpret the raw keycode - */ - WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP = 0, - /** - * libxkbcommon compatible; to determine the xkb keycode, clients must add 8 to the key event keycode - */ - WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1 = 1, -}; -#endif /* WL_KEYBOARD_KEYMAP_FORMAT_ENUM */ - -#ifndef WL_KEYBOARD_KEY_STATE_ENUM -#define WL_KEYBOARD_KEY_STATE_ENUM -/** - * @ingroup iface_wl_keyboard - * physical key state - * - * Describes the physical state of a key that produced the key event. - */ -enum wl_keyboard_key_state { - /** - * key is not pressed - */ - WL_KEYBOARD_KEY_STATE_RELEASED = 0, - /** - * key is pressed - */ - WL_KEYBOARD_KEY_STATE_PRESSED = 1, -}; -#endif /* WL_KEYBOARD_KEY_STATE_ENUM */ - -/** - * @ingroup iface_wl_keyboard - * @struct wl_keyboard_interface - */ -struct wl_keyboard_interface { - /** - * release the keyboard object - * - * - * @since 3 - */ - void (*release)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define WL_KEYBOARD_KEYMAP 0 -#define WL_KEYBOARD_ENTER 1 -#define WL_KEYBOARD_LEAVE 2 -#define WL_KEYBOARD_KEY 3 -#define WL_KEYBOARD_MODIFIERS 4 -#define WL_KEYBOARD_REPEAT_INFO 5 - -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_KEYMAP_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_ENTER_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_LEAVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_KEY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_MODIFIERS_SINCE_VERSION 1 -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION 4 - -/** - * @ingroup iface_wl_keyboard - */ -#define WL_KEYBOARD_RELEASE_SINCE_VERSION 3 - -/** - * @ingroup iface_wl_keyboard - * Sends an keymap event to the client owning the resource. - * @param resource_ The client's resource - * @param format keymap format - * @param fd keymap file descriptor - * @param size keymap size, in bytes - */ -static inline void -wl_keyboard_send_keymap(struct wl_resource *resource_, uint32_t format, int32_t fd, uint32_t size) -{ - wl_resource_post_event(resource_, WL_KEYBOARD_KEYMAP, format, fd, size); -} - -/** - * @ingroup iface_wl_keyboard - * Sends an enter event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the enter event - * @param surface surface gaining keyboard focus - * @param keys the currently pressed keys - */ -static inline void -wl_keyboard_send_enter(struct wl_resource *resource_, uint32_t serial, struct wl_resource *surface, struct wl_array *keys) -{ - wl_resource_post_event(resource_, WL_KEYBOARD_ENTER, serial, surface, keys); -} - -/** - * @ingroup iface_wl_keyboard - * Sends an leave event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the leave event - * @param surface surface that lost keyboard focus - */ -static inline void -wl_keyboard_send_leave(struct wl_resource *resource_, uint32_t serial, struct wl_resource *surface) -{ - wl_resource_post_event(resource_, WL_KEYBOARD_LEAVE, serial, surface); -} - -/** - * @ingroup iface_wl_keyboard - * Sends an key event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the key event - * @param time timestamp with millisecond granularity - * @param key key that produced the event - * @param state physical state of the key - */ -static inline void -wl_keyboard_send_key(struct wl_resource *resource_, uint32_t serial, uint32_t time, uint32_t key, uint32_t state) -{ - wl_resource_post_event(resource_, WL_KEYBOARD_KEY, serial, time, key, state); -} - -/** - * @ingroup iface_wl_keyboard - * Sends an modifiers event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the modifiers event - * @param mods_depressed depressed modifiers - * @param mods_latched latched modifiers - * @param mods_locked locked modifiers - * @param group keyboard layout - */ -static inline void -wl_keyboard_send_modifiers(struct wl_resource *resource_, uint32_t serial, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group) -{ - wl_resource_post_event(resource_, WL_KEYBOARD_MODIFIERS, serial, mods_depressed, mods_latched, mods_locked, group); -} - -/** - * @ingroup iface_wl_keyboard - * Sends an repeat_info event to the client owning the resource. - * @param resource_ The client's resource - * @param rate the rate of repeating keys in characters per second - * @param delay delay in milliseconds since key down until repeating starts - */ -static inline void -wl_keyboard_send_repeat_info(struct wl_resource *resource_, int32_t rate, int32_t delay) -{ - wl_resource_post_event(resource_, WL_KEYBOARD_REPEAT_INFO, rate, delay); -} - -/** - * @ingroup iface_wl_touch - * @struct wl_touch_interface - */ -struct wl_touch_interface { - /** - * release the touch object - * - * - * @since 3 - */ - void (*release)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define WL_TOUCH_DOWN 0 -#define WL_TOUCH_UP 1 -#define WL_TOUCH_MOTION 2 -#define WL_TOUCH_FRAME 3 -#define WL_TOUCH_CANCEL 4 -#define WL_TOUCH_SHAPE 5 -#define WL_TOUCH_ORIENTATION 6 - -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_DOWN_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_UP_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_MOTION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_FRAME_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_CANCEL_SINCE_VERSION 1 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_SHAPE_SINCE_VERSION 6 -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_ORIENTATION_SINCE_VERSION 6 - -/** - * @ingroup iface_wl_touch - */ -#define WL_TOUCH_RELEASE_SINCE_VERSION 3 - -/** - * @ingroup iface_wl_touch - * Sends an down event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the touch down event - * @param time timestamp with millisecond granularity - * @param surface surface touched - * @param id the unique ID of this touch point - * @param x surface-local x coordinate - * @param y surface-local y coordinate - */ -static inline void -wl_touch_send_down(struct wl_resource *resource_, uint32_t serial, uint32_t time, struct wl_resource *surface, int32_t id, wl_fixed_t x, wl_fixed_t y) -{ - wl_resource_post_event(resource_, WL_TOUCH_DOWN, serial, time, surface, id, x, y); -} - -/** - * @ingroup iface_wl_touch - * Sends an up event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial number of the touch up event - * @param time timestamp with millisecond granularity - * @param id the unique ID of this touch point - */ -static inline void -wl_touch_send_up(struct wl_resource *resource_, uint32_t serial, uint32_t time, int32_t id) -{ - wl_resource_post_event(resource_, WL_TOUCH_UP, serial, time, id); -} - -/** - * @ingroup iface_wl_touch - * Sends an motion event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param id the unique ID of this touch point - * @param x surface-local x coordinate - * @param y surface-local y coordinate - */ -static inline void -wl_touch_send_motion(struct wl_resource *resource_, uint32_t time, int32_t id, wl_fixed_t x, wl_fixed_t y) -{ - wl_resource_post_event(resource_, WL_TOUCH_MOTION, time, id, x, y); -} - -/** - * @ingroup iface_wl_touch - * Sends an frame event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_touch_send_frame(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_TOUCH_FRAME); -} - -/** - * @ingroup iface_wl_touch - * Sends an cancel event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_touch_send_cancel(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_TOUCH_CANCEL); -} - -/** - * @ingroup iface_wl_touch - * Sends an shape event to the client owning the resource. - * @param resource_ The client's resource - * @param id the unique ID of this touch point - * @param major length of the major axis in surface-local coordinates - * @param minor length of the minor axis in surface-local coordinates - */ -static inline void -wl_touch_send_shape(struct wl_resource *resource_, int32_t id, wl_fixed_t major, wl_fixed_t minor) -{ - wl_resource_post_event(resource_, WL_TOUCH_SHAPE, id, major, minor); -} - -/** - * @ingroup iface_wl_touch - * Sends an orientation event to the client owning the resource. - * @param resource_ The client's resource - * @param id the unique ID of this touch point - * @param orientation angle between major axis and positive surface y-axis in degrees - */ -static inline void -wl_touch_send_orientation(struct wl_resource *resource_, int32_t id, wl_fixed_t orientation) -{ - wl_resource_post_event(resource_, WL_TOUCH_ORIENTATION, id, orientation); -} - -#ifndef WL_OUTPUT_SUBPIXEL_ENUM -#define WL_OUTPUT_SUBPIXEL_ENUM -/** - * @ingroup iface_wl_output - * subpixel geometry information - * - * This enumeration describes how the physical - * pixels on an output are laid out. - */ -enum wl_output_subpixel { - /** - * unknown geometry - */ - WL_OUTPUT_SUBPIXEL_UNKNOWN = 0, - /** - * no geometry - */ - WL_OUTPUT_SUBPIXEL_NONE = 1, - /** - * horizontal RGB - */ - WL_OUTPUT_SUBPIXEL_HORIZONTAL_RGB = 2, - /** - * horizontal BGR - */ - WL_OUTPUT_SUBPIXEL_HORIZONTAL_BGR = 3, - /** - * vertical RGB - */ - WL_OUTPUT_SUBPIXEL_VERTICAL_RGB = 4, - /** - * vertical BGR - */ - WL_OUTPUT_SUBPIXEL_VERTICAL_BGR = 5, -}; -#endif /* WL_OUTPUT_SUBPIXEL_ENUM */ - -#ifndef WL_OUTPUT_TRANSFORM_ENUM -#define WL_OUTPUT_TRANSFORM_ENUM -/** - * @ingroup iface_wl_output - * transform from framebuffer to output - * - * This describes the transform that a compositor will apply to a - * surface to compensate for the rotation or mirroring of an - * output device. - * - * The flipped values correspond to an initial flip around a - * vertical axis followed by rotation. - * - * The purpose is mainly to allow clients to render accordingly and - * tell the compositor, so that for fullscreen surfaces, the - * compositor will still be able to scan out directly from client - * surfaces. - */ -enum wl_output_transform { - /** - * no transform - */ - WL_OUTPUT_TRANSFORM_NORMAL = 0, - /** - * 90 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_90 = 1, - /** - * 180 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_180 = 2, - /** - * 270 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_270 = 3, - /** - * 180 degree flip around a vertical axis - */ - WL_OUTPUT_TRANSFORM_FLIPPED = 4, - /** - * flip and rotate 90 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_FLIPPED_90 = 5, - /** - * flip and rotate 180 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_FLIPPED_180 = 6, - /** - * flip and rotate 270 degrees counter-clockwise - */ - WL_OUTPUT_TRANSFORM_FLIPPED_270 = 7, -}; -#endif /* WL_OUTPUT_TRANSFORM_ENUM */ - -#ifndef WL_OUTPUT_MODE_ENUM -#define WL_OUTPUT_MODE_ENUM -/** - * @ingroup iface_wl_output - * mode information - * - * These flags describe properties of an output mode. - * They are used in the flags bitfield of the mode event. - */ -enum wl_output_mode { - /** - * indicates this is the current mode - */ - WL_OUTPUT_MODE_CURRENT = 0x1, - /** - * indicates this is the preferred mode - */ - WL_OUTPUT_MODE_PREFERRED = 0x2, -}; -#endif /* WL_OUTPUT_MODE_ENUM */ - -/** - * @ingroup iface_wl_output - * @struct wl_output_interface - */ -struct wl_output_interface { - /** - * release the output object - * - * Using this request a client can tell the server that it is not - * going to use the output object anymore. - * @since 3 - */ - void (*release)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define WL_OUTPUT_GEOMETRY 0 -#define WL_OUTPUT_MODE 1 -#define WL_OUTPUT_DONE 2 -#define WL_OUTPUT_SCALE 3 - -/** - * @ingroup iface_wl_output - */ -#define WL_OUTPUT_GEOMETRY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_output - */ -#define WL_OUTPUT_MODE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_output - */ -#define WL_OUTPUT_DONE_SINCE_VERSION 2 -/** - * @ingroup iface_wl_output - */ -#define WL_OUTPUT_SCALE_SINCE_VERSION 2 - -/** - * @ingroup iface_wl_output - */ -#define WL_OUTPUT_RELEASE_SINCE_VERSION 3 - -/** - * @ingroup iface_wl_output - * Sends an geometry event to the client owning the resource. - * @param resource_ The client's resource - * @param x x position within the global compositor space - * @param y y position within the global compositor space - * @param physical_width width in millimeters of the output - * @param physical_height height in millimeters of the output - * @param subpixel subpixel orientation of the output - * @param make textual description of the manufacturer - * @param model textual description of the model - * @param transform transform that maps framebuffer to output - */ -static inline void -wl_output_send_geometry(struct wl_resource *resource_, int32_t x, int32_t y, int32_t physical_width, int32_t physical_height, int32_t subpixel, const char *make, const char *model, int32_t transform) -{ - wl_resource_post_event(resource_, WL_OUTPUT_GEOMETRY, x, y, physical_width, physical_height, subpixel, make, model, transform); -} - -/** - * @ingroup iface_wl_output - * Sends an mode event to the client owning the resource. - * @param resource_ The client's resource - * @param flags bitfield of mode flags - * @param width width of the mode in hardware units - * @param height height of the mode in hardware units - * @param refresh vertical refresh rate in mHz - */ -static inline void -wl_output_send_mode(struct wl_resource *resource_, uint32_t flags, int32_t width, int32_t height, int32_t refresh) -{ - wl_resource_post_event(resource_, WL_OUTPUT_MODE, flags, width, height, refresh); -} - -/** - * @ingroup iface_wl_output - * Sends an done event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wl_output_send_done(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WL_OUTPUT_DONE); -} - -/** - * @ingroup iface_wl_output - * Sends an scale event to the client owning the resource. - * @param resource_ The client's resource - * @param factor scaling factor of output - */ -static inline void -wl_output_send_scale(struct wl_resource *resource_, int32_t factor) -{ - wl_resource_post_event(resource_, WL_OUTPUT_SCALE, factor); -} - -/** - * @ingroup iface_wl_region - * @struct wl_region_interface - */ -struct wl_region_interface { - /** - * destroy region - * - * Destroy the region. This will invalidate the object ID. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * add rectangle to region - * - * Add the specified rectangle to the region. - * @param x region-local x coordinate - * @param y region-local y coordinate - * @param width rectangle width - * @param height rectangle height - */ - void (*add)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height); - /** - * subtract rectangle from region - * - * Subtract the specified rectangle from the region. - * @param x region-local x coordinate - * @param y region-local y coordinate - * @param width rectangle width - * @param height rectangle height - */ - void (*subtract)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height); -}; - - -/** - * @ingroup iface_wl_region - */ -#define WL_REGION_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_region - */ -#define WL_REGION_ADD_SINCE_VERSION 1 -/** - * @ingroup iface_wl_region - */ -#define WL_REGION_SUBTRACT_SINCE_VERSION 1 - -#ifndef WL_SUBCOMPOSITOR_ERROR_ENUM -#define WL_SUBCOMPOSITOR_ERROR_ENUM -enum wl_subcompositor_error { - /** - * the to-be sub-surface is invalid - */ - WL_SUBCOMPOSITOR_ERROR_BAD_SURFACE = 0, -}; -#endif /* WL_SUBCOMPOSITOR_ERROR_ENUM */ - -/** - * @ingroup iface_wl_subcompositor - * @struct wl_subcompositor_interface - */ -struct wl_subcompositor_interface { - /** - * unbind from the subcompositor interface - * - * Informs the server that the client will not be using this - * protocol object anymore. This does not affect any other objects, - * wl_subsurface objects included. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * give a surface the role sub-surface - * - * Create a sub-surface interface for the given surface, and - * associate it with the given parent surface. This turns a plain - * wl_surface into a sub-surface. - * - * The to-be sub-surface must not already have another role, and it - * must not have an existing wl_subsurface object. Otherwise a - * protocol error is raised. - * @param id the new sub-surface object ID - * @param surface the surface to be turned into a sub-surface - * @param parent the parent surface - */ - void (*get_subsurface)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface, - struct wl_resource *parent); -}; - - -/** - * @ingroup iface_wl_subcompositor - */ -#define WL_SUBCOMPOSITOR_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subcompositor - */ -#define WL_SUBCOMPOSITOR_GET_SUBSURFACE_SINCE_VERSION 1 - -#ifndef WL_SUBSURFACE_ERROR_ENUM -#define WL_SUBSURFACE_ERROR_ENUM -enum wl_subsurface_error { - /** - * wl_surface is not a sibling or the parent - */ - WL_SUBSURFACE_ERROR_BAD_SURFACE = 0, -}; -#endif /* WL_SUBSURFACE_ERROR_ENUM */ - -/** - * @ingroup iface_wl_subsurface - * @struct wl_subsurface_interface - */ -struct wl_subsurface_interface { - /** - * remove sub-surface interface - * - * The sub-surface interface is removed from the wl_surface - * object that was turned into a sub-surface with a - * wl_subcompositor.get_subsurface request. The wl_surface's - * association to the parent is deleted, and the wl_surface loses - * its role as a sub-surface. The wl_surface is unmapped. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * reposition the sub-surface - * - * This schedules a sub-surface position change. The sub-surface - * will be moved so that its origin (top left corner pixel) will be - * at the location x, y of the parent surface coordinate system. - * The coordinates are not restricted to the parent surface area. - * Negative values are allowed. - * - * The scheduled coordinates will take effect whenever the state of - * the parent surface is applied. When this happens depends on - * whether the parent surface is in synchronized mode or not. See - * wl_subsurface.set_sync and wl_subsurface.set_desync for details. - * - * If more than one set_position request is invoked by the client - * before the commit of the parent surface, the position of a new - * request always replaces the scheduled position from any previous - * request. - * - * The initial position is 0, 0. - * @param x x coordinate in the parent surface - * @param y y coordinate in the parent surface - */ - void (*set_position)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y); - /** - * restack the sub-surface - * - * This sub-surface is taken from the stack, and put back just - * above the reference surface, changing the z-order of the - * sub-surfaces. The reference surface must be one of the sibling - * surfaces, or the parent surface. Using any other surface, - * including this sub-surface, will cause a protocol error. - * - * The z-order is double-buffered. Requests are handled in order - * and applied immediately to a pending state. The final pending - * state is copied to the active state the next time the state of - * the parent surface is applied. When this happens depends on - * whether the parent surface is in synchronized mode or not. See - * wl_subsurface.set_sync and wl_subsurface.set_desync for details. - * - * A new sub-surface is initially added as the top-most in the - * stack of its siblings and parent. - * @param sibling the reference surface - */ - void (*place_above)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *sibling); - /** - * restack the sub-surface - * - * The sub-surface is placed just below the reference surface. - * See wl_subsurface.place_above. - * @param sibling the reference surface - */ - void (*place_below)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *sibling); - /** - * set sub-surface to synchronized mode - * - * Change the commit behaviour of the sub-surface to synchronized - * mode, also described as the parent dependent mode. - * - * In synchronized mode, wl_surface.commit on a sub-surface will - * accumulate the committed state in a cache, but the state will - * not be applied and hence will not change the compositor output. - * The cached state is applied to the sub-surface immediately after - * the parent surface's state is applied. This ensures atomic - * updates of the parent and all its synchronized sub-surfaces. - * Applying the cached state will invalidate the cache, so further - * parent surface commits do not (re-)apply old state. - * - * See wl_subsurface for the recursive effect of this mode. - */ - void (*set_sync)(struct wl_client *client, - struct wl_resource *resource); - /** - * set sub-surface to desynchronized mode - * - * Change the commit behaviour of the sub-surface to - * desynchronized mode, also described as independent or freely - * running mode. - * - * In desynchronized mode, wl_surface.commit on a sub-surface will - * apply the pending state directly, without caching, as happens - * normally with a wl_surface. Calling wl_surface.commit on the - * parent surface has no effect on the sub-surface's wl_surface - * state. This mode allows a sub-surface to be updated on its own. - * - * If cached state exists when wl_surface.commit is called in - * desynchronized mode, the pending state is added to the cached - * state, and applied as a whole. This invalidates the cache. - * - * Note: even if a sub-surface is set to desynchronized, a parent - * sub-surface may override it to behave as synchronized. For - * details, see wl_subsurface. - * - * If a surface's parent surface behaves as desynchronized, then - * the cached state is applied on set_desync. - */ - void (*set_desync)(struct wl_client *client, - struct wl_resource *resource); -}; - - -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_SET_POSITION_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_PLACE_ABOVE_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_PLACE_BELOW_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_SET_SYNC_SINCE_VERSION 1 -/** - * @ingroup iface_wl_subsurface - */ -#define WL_SUBSURFACE_SET_DESYNC_SINCE_VERSION 1 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland/include/src/wayland-version.h b/chromium/third_party/wayland/include/src/wayland-version.h deleted file mode 100644 index 4ab635eb81c..00000000000 --- a/chromium/third_party/wayland/include/src/wayland-version.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright © 2012 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. - */ - -#ifndef WAYLAND_VERSION_H -#define WAYLAND_VERSION_H - -#define WAYLAND_VERSION_MAJOR 1 -#define WAYLAND_VERSION_MINOR 13 -#define WAYLAND_VERSION_MICRO 0 -#define WAYLAND_VERSION "1.13.0" - -#endif diff --git a/chromium/third_party/wayland/protocol/wayland-protocol.c b/chromium/third_party/wayland/protocol/wayland-protocol.c deleted file mode 100644 index f5f49088876..00000000000 --- a/chromium/third_party/wayland/protocol/wayland-protocol.c +++ /dev/null @@ -1,507 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -/* - * Copyright © 2008-2011 Kristian Høgsberg - * Copyright © 2010-2011 Intel Corporation - * Copyright © 2012-2013 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. - */ - -#include <stdlib.h> -#include <stdint.h> -#include "wayland-util.h" - -extern const struct wl_interface wl_buffer_interface; -extern const struct wl_interface wl_callback_interface; -extern const struct wl_interface wl_data_device_interface; -extern const struct wl_interface wl_data_offer_interface; -extern const struct wl_interface wl_data_source_interface; -extern const struct wl_interface wl_keyboard_interface; -extern const struct wl_interface wl_output_interface; -extern const struct wl_interface wl_pointer_interface; -extern const struct wl_interface wl_region_interface; -extern const struct wl_interface wl_registry_interface; -extern const struct wl_interface wl_seat_interface; -extern const struct wl_interface wl_shell_surface_interface; -extern const struct wl_interface wl_shm_pool_interface; -extern const struct wl_interface wl_subsurface_interface; -extern const struct wl_interface wl_surface_interface; -extern const struct wl_interface wl_touch_interface; - -static const struct wl_interface *types[] = { - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - &wl_callback_interface, - &wl_registry_interface, - &wl_surface_interface, - &wl_region_interface, - &wl_buffer_interface, - NULL, - NULL, - NULL, - NULL, - NULL, - &wl_shm_pool_interface, - NULL, - NULL, - &wl_data_source_interface, - &wl_surface_interface, - &wl_surface_interface, - NULL, - &wl_data_source_interface, - NULL, - &wl_data_offer_interface, - NULL, - &wl_surface_interface, - NULL, - NULL, - &wl_data_offer_interface, - &wl_data_offer_interface, - &wl_data_source_interface, - &wl_data_device_interface, - &wl_seat_interface, - &wl_shell_surface_interface, - &wl_surface_interface, - &wl_seat_interface, - NULL, - &wl_seat_interface, - NULL, - NULL, - &wl_surface_interface, - NULL, - NULL, - NULL, - NULL, - NULL, - &wl_output_interface, - &wl_seat_interface, - NULL, - &wl_surface_interface, - NULL, - NULL, - NULL, - &wl_output_interface, - &wl_buffer_interface, - NULL, - NULL, - &wl_callback_interface, - &wl_region_interface, - &wl_region_interface, - &wl_output_interface, - &wl_output_interface, - &wl_pointer_interface, - &wl_keyboard_interface, - &wl_touch_interface, - NULL, - &wl_surface_interface, - NULL, - NULL, - NULL, - &wl_surface_interface, - NULL, - NULL, - NULL, - &wl_surface_interface, - NULL, - &wl_surface_interface, - NULL, - NULL, - &wl_surface_interface, - NULL, - NULL, - &wl_surface_interface, - NULL, - NULL, - NULL, - &wl_subsurface_interface, - &wl_surface_interface, - &wl_surface_interface, - &wl_surface_interface, - &wl_surface_interface, -}; - -static const struct wl_message wl_display_requests[] = { - { "sync", "n", types + 8 }, - { "get_registry", "n", types + 9 }, -}; - -static const struct wl_message wl_display_events[] = { - { "error", "ous", types + 0 }, - { "delete_id", "u", types + 0 }, -}; - -WL_EXPORT const struct wl_interface wl_display_interface = { - "wl_display", 1, - 2, wl_display_requests, - 2, wl_display_events, -}; - -static const struct wl_message wl_registry_requests[] = { - { "bind", "usun", types + 0 }, -}; - -static const struct wl_message wl_registry_events[] = { - { "global", "usu", types + 0 }, - { "global_remove", "u", types + 0 }, -}; - -WL_EXPORT const struct wl_interface wl_registry_interface = { - "wl_registry", 1, - 1, wl_registry_requests, - 2, wl_registry_events, -}; - -static const struct wl_message wl_callback_events[] = { - { "done", "u", types + 0 }, -}; - -WL_EXPORT const struct wl_interface wl_callback_interface = { - "wl_callback", 1, - 0, NULL, - 1, wl_callback_events, -}; - -static const struct wl_message wl_compositor_requests[] = { - { "create_surface", "n", types + 10 }, - { "create_region", "n", types + 11 }, -}; - -WL_EXPORT const struct wl_interface wl_compositor_interface = { - "wl_compositor", 4, - 2, wl_compositor_requests, - 0, NULL, -}; - -static const struct wl_message wl_shm_pool_requests[] = { - { "create_buffer", "niiiiu", types + 12 }, - { "destroy", "", types + 0 }, - { "resize", "i", types + 0 }, -}; - -WL_EXPORT const struct wl_interface wl_shm_pool_interface = { - "wl_shm_pool", 1, - 3, wl_shm_pool_requests, - 0, NULL, -}; - -static const struct wl_message wl_shm_requests[] = { - { "create_pool", "nhi", types + 18 }, -}; - -static const struct wl_message wl_shm_events[] = { - { "format", "u", types + 0 }, -}; - -WL_EXPORT const struct wl_interface wl_shm_interface = { - "wl_shm", 1, - 1, wl_shm_requests, - 1, wl_shm_events, -}; - -static const struct wl_message wl_buffer_requests[] = { - { "destroy", "", types + 0 }, -}; - -static const struct wl_message wl_buffer_events[] = { - { "release", "", types + 0 }, -}; - -WL_EXPORT const struct wl_interface wl_buffer_interface = { - "wl_buffer", 1, - 1, wl_buffer_requests, - 1, wl_buffer_events, -}; - -static const struct wl_message wl_data_offer_requests[] = { - { "accept", "u?s", types + 0 }, - { "receive", "sh", types + 0 }, - { "destroy", "", types + 0 }, - { "finish", "3", types + 0 }, - { "set_actions", "3uu", types + 0 }, -}; - -static const struct wl_message wl_data_offer_events[] = { - { "offer", "s", types + 0 }, - { "source_actions", "3u", types + 0 }, - { "action", "3u", types + 0 }, -}; - -WL_EXPORT const struct wl_interface wl_data_offer_interface = { - "wl_data_offer", 3, - 5, wl_data_offer_requests, - 3, wl_data_offer_events, -}; - -static const struct wl_message wl_data_source_requests[] = { - { "offer", "s", types + 0 }, - { "destroy", "", types + 0 }, - { "set_actions", "3u", types + 0 }, -}; - -static const struct wl_message wl_data_source_events[] = { - { "target", "?s", types + 0 }, - { "send", "sh", types + 0 }, - { "cancelled", "", types + 0 }, - { "dnd_drop_performed", "3", types + 0 }, - { "dnd_finished", "3", types + 0 }, - { "action", "3u", types + 0 }, -}; - -WL_EXPORT const struct wl_interface wl_data_source_interface = { - "wl_data_source", 3, - 3, wl_data_source_requests, - 6, wl_data_source_events, -}; - -static const struct wl_message wl_data_device_requests[] = { - { "start_drag", "?oo?ou", types + 21 }, - { "set_selection", "?ou", types + 25 }, - { "release", "2", types + 0 }, -}; - -static const struct wl_message wl_data_device_events[] = { - { "data_offer", "n", types + 27 }, - { "enter", "uoff?o", types + 28 }, - { "leave", "", types + 0 }, - { "motion", "uff", types + 0 }, - { "drop", "", types + 0 }, - { "selection", "?o", types + 33 }, -}; - -WL_EXPORT const struct wl_interface wl_data_device_interface = { - "wl_data_device", 3, - 3, wl_data_device_requests, - 6, wl_data_device_events, -}; - -static const struct wl_message wl_data_device_manager_requests[] = { - { "create_data_source", "n", types + 34 }, - { "get_data_device", "no", types + 35 }, -}; - -WL_EXPORT const struct wl_interface wl_data_device_manager_interface = { - "wl_data_device_manager", 3, - 2, wl_data_device_manager_requests, - 0, NULL, -}; - -static const struct wl_message wl_shell_requests[] = { - { "get_shell_surface", "no", types + 37 }, -}; - -WL_EXPORT const struct wl_interface wl_shell_interface = { - "wl_shell", 1, - 1, wl_shell_requests, - 0, NULL, -}; - -static const struct wl_message wl_shell_surface_requests[] = { - { "pong", "u", types + 0 }, - { "move", "ou", types + 39 }, - { "resize", "ouu", types + 41 }, - { "set_toplevel", "", types + 0 }, - { "set_transient", "oiiu", types + 44 }, - { "set_fullscreen", "uu?o", types + 48 }, - { "set_popup", "ouoiiu", types + 51 }, - { "set_maximized", "?o", types + 57 }, - { "set_title", "s", types + 0 }, - { "set_class", "s", types + 0 }, -}; - -static const struct wl_message wl_shell_surface_events[] = { - { "ping", "u", types + 0 }, - { "configure", "uii", types + 0 }, - { "popup_done", "", types + 0 }, -}; - -WL_EXPORT const struct wl_interface wl_shell_surface_interface = { - "wl_shell_surface", 1, - 10, wl_shell_surface_requests, - 3, wl_shell_surface_events, -}; - -static const struct wl_message wl_surface_requests[] = { - { "destroy", "", types + 0 }, - { "attach", "?oii", types + 58 }, - { "damage", "iiii", types + 0 }, - { "frame", "n", types + 61 }, - { "set_opaque_region", "?o", types + 62 }, - { "set_input_region", "?o", types + 63 }, - { "commit", "", types + 0 }, - { "set_buffer_transform", "2i", types + 0 }, - { "set_buffer_scale", "3i", types + 0 }, - { "damage_buffer", "4iiii", types + 0 }, -}; - -static const struct wl_message wl_surface_events[] = { - { "enter", "o", types + 64 }, - { "leave", "o", types + 65 }, -}; - -WL_EXPORT const struct wl_interface wl_surface_interface = { - "wl_surface", 4, - 10, wl_surface_requests, - 2, wl_surface_events, -}; - -static const struct wl_message wl_seat_requests[] = { - { "get_pointer", "n", types + 66 }, - { "get_keyboard", "n", types + 67 }, - { "get_touch", "n", types + 68 }, - { "release", "5", types + 0 }, -}; - -static const struct wl_message wl_seat_events[] = { - { "capabilities", "u", types + 0 }, - { "name", "2s", types + 0 }, -}; - -WL_EXPORT const struct wl_interface wl_seat_interface = { - "wl_seat", 6, - 4, wl_seat_requests, - 2, wl_seat_events, -}; - -static const struct wl_message wl_pointer_requests[] = { - { "set_cursor", "u?oii", types + 69 }, - { "release", "3", types + 0 }, -}; - -static const struct wl_message wl_pointer_events[] = { - { "enter", "uoff", types + 73 }, - { "leave", "uo", types + 77 }, - { "motion", "uff", types + 0 }, - { "button", "uuuu", types + 0 }, - { "axis", "uuf", types + 0 }, - { "frame", "5", types + 0 }, - { "axis_source", "5u", types + 0 }, - { "axis_stop", "5uu", types + 0 }, - { "axis_discrete", "5ui", types + 0 }, -}; - -WL_EXPORT const struct wl_interface wl_pointer_interface = { - "wl_pointer", 6, - 2, wl_pointer_requests, - 9, wl_pointer_events, -}; - -static const struct wl_message wl_keyboard_requests[] = { - { "release", "3", types + 0 }, -}; - -static const struct wl_message wl_keyboard_events[] = { - { "keymap", "uhu", types + 0 }, - { "enter", "uoa", types + 79 }, - { "leave", "uo", types + 82 }, - { "key", "uuuu", types + 0 }, - { "modifiers", "uuuuu", types + 0 }, - { "repeat_info", "4ii", types + 0 }, -}; - -WL_EXPORT const struct wl_interface wl_keyboard_interface = { - "wl_keyboard", 6, - 1, wl_keyboard_requests, - 6, wl_keyboard_events, -}; - -static const struct wl_message wl_touch_requests[] = { - { "release", "3", types + 0 }, -}; - -static const struct wl_message wl_touch_events[] = { - { "down", "uuoiff", types + 84 }, - { "up", "uui", types + 0 }, - { "motion", "uiff", types + 0 }, - { "frame", "", types + 0 }, - { "cancel", "", types + 0 }, - { "shape", "6iff", types + 0 }, - { "orientation", "6if", types + 0 }, -}; - -WL_EXPORT const struct wl_interface wl_touch_interface = { - "wl_touch", 6, - 1, wl_touch_requests, - 7, wl_touch_events, -}; - -static const struct wl_message wl_output_requests[] = { - { "release", "3", types + 0 }, -}; - -static const struct wl_message wl_output_events[] = { - { "geometry", "iiiiissi", types + 0 }, - { "mode", "uiii", types + 0 }, - { "done", "2", types + 0 }, - { "scale", "2i", types + 0 }, -}; - -WL_EXPORT const struct wl_interface wl_output_interface = { - "wl_output", 3, - 1, wl_output_requests, - 4, wl_output_events, -}; - -static const struct wl_message wl_region_requests[] = { - { "destroy", "", types + 0 }, - { "add", "iiii", types + 0 }, - { "subtract", "iiii", types + 0 }, -}; - -WL_EXPORT const struct wl_interface wl_region_interface = { - "wl_region", 1, - 3, wl_region_requests, - 0, NULL, -}; - -static const struct wl_message wl_subcompositor_requests[] = { - { "destroy", "", types + 0 }, - { "get_subsurface", "noo", types + 90 }, -}; - -WL_EXPORT const struct wl_interface wl_subcompositor_interface = { - "wl_subcompositor", 1, - 2, wl_subcompositor_requests, - 0, NULL, -}; - -static const struct wl_message wl_subsurface_requests[] = { - { "destroy", "", types + 0 }, - { "set_position", "ii", types + 0 }, - { "place_above", "o", types + 93 }, - { "place_below", "o", types + 94 }, - { "set_sync", "", types + 0 }, - { "set_desync", "", types + 0 }, -}; - -WL_EXPORT const struct wl_interface wl_subsurface_interface = { - "wl_subsurface", 1, - 6, wl_subsurface_requests, - 0, NULL, -}; - diff --git a/chromium/v8/include/v8-version.h b/chromium/v8/include/v8-version.h index 4e347c79ffe..3e703039517 100644 --- a/chromium/v8/include/v8-version.h +++ b/chromium/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 6 #define V8_MINOR_VERSION 9 #define V8_BUILD_NUMBER 427 -#define V8_PATCH_LEVEL 29 +#define V8_PATCH_LEVEL 31 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/chromium/v8/src/compiler/bytecode-graph-builder.cc b/chromium/v8/src/compiler/bytecode-graph-builder.cc index 2d16ba525c4..51456a5b87f 100644 --- a/chromium/v8/src/compiler/bytecode-graph-builder.cc +++ b/chromium/v8/src/compiler/bytecode-graph-builder.cc @@ -514,7 +514,7 @@ Node* BytecodeGraphBuilder::Environment::Checkpoint( BytecodeGraphBuilder::BytecodeGraphBuilder( Zone* local_zone, Handle<SharedFunctionInfo> shared_info, Handle<FeedbackVector> feedback_vector, BailoutId osr_offset, - JSGraph* jsgraph, CallFrequency invocation_frequency, + JSGraph* jsgraph, CallFrequency& invocation_frequency, SourcePositionTable* source_positions, Handle<Context> native_context, int inlining_id, JSTypeHintLowering::Flags flags, bool stack_check, bool analyze_environment_liveness) diff --git a/chromium/v8/src/compiler/bytecode-graph-builder.h b/chromium/v8/src/compiler/bytecode-graph-builder.h index a94a3d79afe..94a695704e5 100644 --- a/chromium/v8/src/compiler/bytecode-graph-builder.h +++ b/chromium/v8/src/compiler/bytecode-graph-builder.h @@ -31,7 +31,7 @@ class BytecodeGraphBuilder { BytecodeGraphBuilder( Zone* local_zone, Handle<SharedFunctionInfo> shared, Handle<FeedbackVector> feedback_vector, BailoutId osr_offset, - JSGraph* jsgraph, CallFrequency invocation_frequency, + JSGraph* jsgraph, CallFrequency& invocation_frequency, SourcePositionTable* source_positions, Handle<Context> native_context, int inlining_id = SourcePosition::kNotInlined, JSTypeHintLowering::Flags flags = JSTypeHintLowering::kNoFlags, diff --git a/chromium/v8/src/compiler/js-inlining.cc b/chromium/v8/src/compiler/js-inlining.cc index 247e36d5b39..2f317728831 100644 --- a/chromium/v8/src/compiler/js-inlining.cc +++ b/chromium/v8/src/compiler/js-inlining.cc @@ -485,9 +485,10 @@ Reduction JSInliner::ReduceJSCall(Node* node) { if (info_->is_bailout_on_uninitialized()) { flags |= JSTypeHintLowering::kBailoutOnUninitialized; } + CallFrequency frequency = call.frequency(); BytecodeGraphBuilder graph_builder( zone(), shared_info, feedback_vector, BailoutId::None(), jsgraph(), - call.frequency(), source_positions_, native_context(), inlining_id, + frequency, source_positions_, native_context(), inlining_id, flags, false, info_->is_analyze_environment_liveness()); graph_builder.CreateGraph(); diff --git a/chromium/v8/src/compiler/js-operator.cc b/chromium/v8/src/compiler/js-operator.cc index 5d45bb7f954..f42d4b58fbd 100644 --- a/chromium/v8/src/compiler/js-operator.cc +++ b/chromium/v8/src/compiler/js-operator.cc @@ -598,7 +598,7 @@ CompareOperationHint CompareOperationHintOf(const Operator* op) { V(CreateKeyValueArray, Operator::kEliminatable, 2, 1) \ V(CreatePromise, Operator::kEliminatable, 0, 1) \ V(CreateTypedArray, Operator::kNoProperties, 5, 1) \ - V(CreateObject, Operator::kNoWrite, 1, 1) \ + V(CreateObject, Operator::kNoProperties, 1, 1) \ V(ObjectIsArray, Operator::kNoProperties, 1, 1) \ V(HasProperty, Operator::kNoProperties, 2, 1) \ V(HasInPrototypeChain, Operator::kNoProperties, 2, 1) \ @@ -795,7 +795,8 @@ const Operator* JSOperatorBuilder::CallForwardVarargs(size_t arity, parameters); // parameter } -const Operator* JSOperatorBuilder::Call(size_t arity, CallFrequency frequency, +const Operator* JSOperatorBuilder::Call(size_t arity, + CallFrequency const& frequency, VectorSlotPair const& feedback, ConvertReceiverMode convert_mode, SpeculationMode speculation_mode) { @@ -819,8 +820,8 @@ const Operator* JSOperatorBuilder::CallWithArrayLike(CallFrequency frequency) { } const Operator* JSOperatorBuilder::CallWithSpread( - uint32_t arity, CallFrequency frequency, VectorSlotPair const& feedback, - SpeculationMode speculation_mode) { + uint32_t arity, CallFrequency const& frequency, + VectorSlotPair const& feedback, SpeculationMode speculation_mode) { DCHECK_IMPLIES(speculation_mode == SpeculationMode::kAllowSpeculation, feedback.IsValid()); CallParameters parameters(arity, frequency, feedback, diff --git a/chromium/v8/src/compiler/js-operator.h b/chromium/v8/src/compiler/js-operator.h index f73aca819f5..38e077694e4 100644 --- a/chromium/v8/src/compiler/js-operator.h +++ b/chromium/v8/src/compiler/js-operator.h @@ -160,7 +160,7 @@ CallForwardVarargsParameters const& CallForwardVarargsParametersOf( // used as a parameter by JSCall and JSCallWithSpread operators. class CallParameters final { public: - CallParameters(size_t arity, CallFrequency frequency, + CallParameters(size_t arity, CallFrequency const& frequency, VectorSlotPair const& feedback, ConvertReceiverMode convert_mode, SpeculationMode speculation_mode) @@ -171,7 +171,7 @@ class CallParameters final { feedback_(feedback) {} size_t arity() const { return ArityField::decode(bit_field_); } - CallFrequency frequency() const { return frequency_; } + CallFrequency const& frequency() const { return frequency_; } ConvertReceiverMode convert_mode() const { return ConvertReceiverModeField::decode(bit_field_); } @@ -722,13 +722,13 @@ class V8_EXPORT_PRIVATE JSOperatorBuilder final const Operator* CallForwardVarargs(size_t arity, uint32_t start_index); const Operator* Call( - size_t arity, CallFrequency frequency = CallFrequency(), + size_t arity, CallFrequency const& frequency = CallFrequency(), VectorSlotPair const& feedback = VectorSlotPair(), ConvertReceiverMode convert_mode = ConvertReceiverMode::kAny, SpeculationMode speculation_mode = SpeculationMode::kDisallowSpeculation); const Operator* CallWithArrayLike(CallFrequency frequency); const Operator* CallWithSpread( - uint32_t arity, CallFrequency frequency = CallFrequency(), + uint32_t arity, CallFrequency const& frequency = CallFrequency(), VectorSlotPair const& feedback = VectorSlotPair(), SpeculationMode speculation_mode = SpeculationMode::kDisallowSpeculation); const Operator* CallRuntime(Runtime::FunctionId id); diff --git a/chromium/v8/src/compiler/pipeline.cc b/chromium/v8/src/compiler/pipeline.cc index 3366d1db949..f84fb65f556 100644 --- a/chromium/v8/src/compiler/pipeline.cc +++ b/chromium/v8/src/compiler/pipeline.cc @@ -1143,10 +1143,11 @@ struct GraphBuilderPhase { if (data->info()->is_bailout_on_uninitialized()) { flags |= JSTypeHintLowering::kBailoutOnUninitialized; } + CallFrequency frequency = CallFrequency(1.0f); BytecodeGraphBuilder graph_builder( temp_zone, data->info()->shared_info(), handle(data->info()->closure()->feedback_vector(), data->isolate()), - data->info()->osr_offset(), data->jsgraph(), CallFrequency(1.0f), + data->info()->osr_offset(), data->jsgraph(), frequency, data->source_positions(), data->native_context(), SourcePosition::kNotInlined, flags, true, data->info()->is_analyze_environment_liveness()); |