Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qwaylandsurfacegrabber.cpp
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
5
6#include <QtCore/private/qobject_p.h>
7#include <QtWaylandCompositor/qwaylandsurface.h>
8#include <QtWaylandCompositor/qwaylandcompositor.h>
9#include <QtWaylandCompositor/private/qwaylandsurface_p.h>
10
12
37{
38 Q_DECLARE_PUBLIC(QWaylandSurfaceGrabber)
39
40 QWaylandSurface *surface = nullptr;
41};
42
52
57{
58 Q_D(const QWaylandSurfaceGrabber);
59 return d->surface;
60}
61
68{
70 if (!d->surface) {
72 return;
73 }
74
76 QWaylandBufferRef buf = surf->bufferRef;
77 if (!buf.hasBuffer()) {
79 return;
80 }
81
82 d->surface->compositor()->grabSurface(this, buf);
83}
84
86
87#include "moc_qwaylandsurfacegrabber.cpp"
\inmodule QtCore
Definition qobject.h:103
\inmodule QtWaylandCompositor
\inmodule QtWaylandCompositor
void grab()
Grab the content of the surface set on this object.
QWaylandSurfaceGrabber(QWaylandSurface *surface, QObject *parent=nullptr)
Create a QWaylandSurfaceGrabber object with the given surface and parent.
QWaylandSurface * surface() const
Returns the surface set on this object.
void failed(Error error)
static QWaylandSurfacePrivate * get(QWaylandSurface *surface)
\qmltype WaylandSurface \instantiates QWaylandSurface \inqmlmodule QtWayland.Compositor
Combined button and popup list for selecting options.
GLenum GLuint GLenum GLsizei const GLchar * buf
#define emit