KWaylandServer

shmclientbuffer.h
1 /*
2  SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 
7 #pragma once
8 
9 #include "clientbuffer.h"
10 #include "clientbufferintegration.h"
11 
12 namespace KWaylandServer
13 {
14 class ShmClientBufferPrivate;
15 
16 /**
17  * The ShmClientBuffer class represents a wl_shm_buffer client buffer.
18  *
19  * The buffer's data can be accessed using the data() function. Note that it is not allowed
20  * to access data of several shared memory buffers simultaneously.
21  */
22 class KWAYLANDSERVER_EXPORT ShmClientBuffer : public ClientBuffer
23 {
24  Q_OBJECT
25  Q_DECLARE_PRIVATE(ShmClientBuffer)
26 
27 public:
28  explicit ShmClientBuffer(wl_resource *resource);
29 
30  QImage data() const;
31 
32  QSize size() const override;
33  bool hasAlphaChannel() const override;
34  Origin origin() const override;
35 };
36 
37 /**
38  * The ShmClientBufferIntegration class provides support for wl_shm_buffer buffers.
39  */
40 class ShmClientBufferIntegration : public ClientBufferIntegration
41 {
42  Q_OBJECT
43 
44 public:
45  explicit ShmClientBufferIntegration(Display *display);
46 
47  ClientBuffer *createBuffer(::wl_resource *resource) override;
48 };
49 
50 } // namespace KWaylandServer
Class holding the Wayland server display loop.
Definition: display.h:47
The ShmClientBufferIntegration class provides support for wl_shm_buffer buffers.
Origin
This enum type is used to specify the corner where the origin is.
Definition: clientbuffer.h:41
The ShmClientBuffer class represents a wl_shm_buffer client buffer.
The ClientBuffer class represents a client buffer.
Definition: clientbuffer.h:29
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Oct 25 2021 23:08:44 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.