wayland/qtwayland-dev/5.15.1/QtWaylandClient/private/wayland-server-buffer-extension-client-protocol.h
raw symbols SCIP| 1 | /* Generated by wayland-scanner 1.16.0 */ |
| 2 | |
| 3 | #ifndef SERVER_BUFFER_EXTENSION_CLIENT_PROTOCOL_H |
| 4 | #define SERVER_BUFFER_EXTENSION_CLIENT_PROTOCOL_H |
| 5 | |
| 6 | #include <stdint.h> |
| 7 | #include <stddef.h> |
| 8 | #include "wayland-client.h" |
| 9 | |
| 10 | #ifdef __cplusplus |
| 11 | extern "C" { |
| 12 | #endif |
| 13 | |
| 14 | /** |
| 15 | * @page page_server_buffer_extension The server_buffer_extension protocol |
| 16 | * @section page_ifaces_server_buffer_extension Interfaces |
| 17 | * - @subpage page_iface_qt_server_buffer - buffers managed by the compositor |
| 18 | * @section page_copyright_server_buffer_extension Copyright |
| 19 | * <pre> |
| 20 | * |
| 21 | * Copyright (C) 2015 The Qt Company Ltd. |
| 22 | * Contact: http://www.qt.io/licensing/ |
| 23 | * |
| 24 | * This file is part of the plugins of the Qt Toolkit. |
| 25 | * |
| 26 | * $QT_BEGIN_LICENSE:BSD$ |
| 27 | * You may use this file under the terms of the BSD license as follows: |
| 28 | * |
| 29 | * "Redistribution and use in source and binary forms, with or without |
| 30 | * modification, are permitted provided that the following conditions are |
| 31 | * met: |
| 32 | * * Redistributions of source code must retain the above copyright |
| 33 | * notice, this list of conditions and the following disclaimer. |
| 34 | * * Redistributions in binary form must reproduce the above copyright |
| 35 | * notice, this list of conditions and the following disclaimer in |
| 36 | * the documentation and/or other materials provided with the |
| 37 | * distribution. |
| 38 | * * Neither the name of The Qt Company Ltd nor the names of its |
| 39 | * contributors may be used to endorse or promote products derived |
| 40 | * from this software without specific prior written permission. |
| 41 | * |
| 42 | * |
| 43 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 44 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 45 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 46 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 47 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 48 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 49 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 50 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 51 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 52 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 53 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." |
| 54 | * |
| 55 | * $QT_END_LICENSE$ |
| 56 | * </pre> |
| 57 | */ |
| 58 | struct qt_server_buffer; |
| 59 | |
| 60 | /** |
| 61 | * @page page_iface_qt_server_buffer qt_server_buffer |
| 62 | * @section page_iface_qt_server_buffer_desc Description |
| 63 | * |
| 64 | * Server buffer is an extension which makes it possible to share a |
| 65 | * buffer created by the compositor to share it with arbitrary |
| 66 | * clients. These types of buffers are intended to be read only |
| 67 | * buffers for clients, but this is an implementation detail. |
| 68 | * |
| 69 | * Server buffers main purpose is to help implement caches |
| 70 | * @section page_iface_qt_server_buffer_api API |
| 71 | * See @ref iface_qt_server_buffer. |
| 72 | */ |
| 73 | /** |
| 74 | * @defgroup iface_qt_server_buffer The qt_server_buffer interface |
| 75 | * |
| 76 | * Server buffer is an extension which makes it possible to share a |
| 77 | * buffer created by the compositor to share it with arbitrary |
| 78 | * clients. These types of buffers are intended to be read only |
| 79 | * buffers for clients, but this is an implementation detail. |
| 80 | * |
| 81 | * Server buffers main purpose is to help implement caches |
| 82 | */ |
| 83 | extern const struct wl_interface qt_server_buffer_interface; |
| 84 | |
| 85 | #define QT_SERVER_BUFFER_RELEASE 0 |
| 86 | |
| 87 | |
| 88 | /** |
| 89 | * @ingroup iface_qt_server_buffer |
| 90 | */ |
| 91 | #define QT_SERVER_BUFFER_RELEASE_SINCE_VERSION 1 |
| 92 | |
| 93 | /** @ingroup iface_qt_server_buffer */ |
| 94 | static inline void |
| 95 | qt_server_buffer_set_user_data(struct qt_server_buffer *qt_server_buffer, void *user_data) |
| 96 | { |
| 97 | wl_proxy_set_user_data((struct wl_proxy *) qt_server_buffer, user_data); |
| 98 | } |
| 99 | |
| 100 | /** @ingroup iface_qt_server_buffer */ |
| 101 | static inline void * |
| 102 | qt_server_buffer_get_user_data(struct qt_server_buffer *qt_server_buffer) |
| 103 | { |
| 104 | return wl_proxy_get_user_data((struct wl_proxy *) qt_server_buffer); |
| 105 | } |
| 106 | |
| 107 | static inline uint32_t |
| 108 | qt_server_buffer_get_version(struct qt_server_buffer *qt_server_buffer) |
| 109 | { |
| 110 | return wl_proxy_get_version((struct wl_proxy *) qt_server_buffer); |
| 111 | } |
| 112 | |
| 113 | /** @ingroup iface_qt_server_buffer */ |
| 114 | static inline void |
| 115 | qt_server_buffer_destroy(struct qt_server_buffer *qt_server_buffer) |
| 116 | { |
| 117 | wl_proxy_destroy((struct wl_proxy *) qt_server_buffer); |
| 118 | } |
| 119 | |
| 120 | /** |
| 121 | * @ingroup iface_qt_server_buffer |
| 122 | */ |
| 123 | static inline void |
| 124 | qt_server_buffer_release(struct qt_server_buffer *qt_server_buffer) |
| 125 | { |
| 126 | wl_proxy_marshal((struct wl_proxy *) qt_server_buffer, |
| 127 | QT_SERVER_BUFFER_RELEASE); |
| 128 | } |
| 129 | |
| 130 | #ifdef __cplusplus |
| 131 | } |
| 132 | #endif |
| 133 | |
| 134 | #endif |