Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwaylandsurfacegrabber.h
Go to the documentation of this file.
1// Copyright (C) 2017 Klarälvdalens Datakonsult AB (KDAB).
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWAYLANDSURFACEGRABBER_H
5#define QWAYLANDSURFACEGRABBER_H
6
7#include <QtWaylandCompositor/qtwaylandcompositorglobal.h>
8#include <QtCore/QObject>
9
11
12class QWaylandSurface;
14
15class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandSurfaceGrabber : public QObject
16{
17 Q_OBJECT
18 Q_DECLARE_PRIVATE(QWaylandSurfaceGrabber)
19public:
20 enum Error {
21 InvalidSurface,
22 NoBufferAttached,
23 UnknownBufferType,
24 RendererNotReady,
25 };
26 Q_ENUM(Error)
27 explicit QWaylandSurfaceGrabber(QWaylandSurface *surface, QObject *parent = nullptr);
28
29 QWaylandSurface *surface() const;
30 void grab();
31
32Q_SIGNALS:
33 void success(const QImage &image);
34 void failed(Error error);
35};
36
37QT_END_NAMESPACE
38
39#endif // QWAYLANDSURFACEGRABBER_H
QWaylandSurface * createDefaultSurface() override
QWaylandQuickCompositorPrivate(QWaylandCompositor *compositor)
\qmltype WaylandQuickItem \nativetype QWaylandQuickItem \inqmlmodule QtWayland.Compositor
\inmodule QtWaylandCompositor
QT_REQUIRE_CONFIG(animation)
QT_REQUIRE_CONFIG(thread)
QT_REQUIRE_CONFIG(wayland_compositor_quick)