KWindowSystem

shm.h
1/*
2 SPDX-FileCopyrightText: 2013 Martin Gräßlin <mgraesslin@kde.org>
3 SPDX-FileCopyrightText: 2023 David Redondo <kde@david-redondo.de>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7
8#pragma once
9
10#include "logging.h"
11
12#include <qwayland-wayland.h>
13
14#include <QSize>
15#include <QWaylandClientExtensionTemplate>
16
17#include <memory>
18
19class ShmBuffer : public QtWayland::wl_buffer
20{
21public:
22 ShmBuffer(::wl_buffer *buffer);
23 ~ShmBuffer();
24};
25
26class Shm : public QWaylandClientExtensionTemplate<Shm>, public QtWayland::wl_shm
27{
28public:
29 static Shm *instance();
30 ~Shm();
31 std::unique_ptr<ShmBuffer> createBuffer(const QImage &image);
32
33private:
34 Shm(QObject *parent);
35};
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:10:18 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.