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
qwaylandview.h
Go to the documentation of this file.
1// Copyright (C) 2017 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWAYLANDSURFACEVIEW_H
5#define QWAYLANDSURFACEVIEW_H
6
7#include <QtWaylandCompositor/QWaylandBufferRef>
8#include <QtWaylandCompositor/qtwaylandcompositorglobal.h>
9
10#include <QtCore/QPointF>
11#include <QtCore/QObject>
12
14
15class QWaylandSurface;
17class QWaylandOutput;
18
19class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandView : public QObject
20{
21 Q_OBJECT
22 Q_DECLARE_PRIVATE(QWaylandView)
23 Q_PROPERTY(QObject *renderObject READ renderObject CONSTANT)
24 Q_PROPERTY(QWaylandSurface *surface READ surface WRITE setSurface NOTIFY surfaceChanged)
25 Q_PROPERTY(QWaylandOutput *output READ output WRITE setOutput NOTIFY outputChanged)
26 Q_PROPERTY(bool bufferLocked READ isBufferLocked WRITE setBufferLocked NOTIFY bufferLockedChanged)
27 Q_PROPERTY(bool allowDiscardFrontBuffer READ allowDiscardFrontBuffer WRITE setAllowDiscardFrontBuffer NOTIFY allowDiscardFrontBufferChanged)
28 Q_MOC_INCLUDE("qwaylandoutput.h")
29public:
30 QWaylandView(QObject *renderObject = nullptr, QObject *parent = nullptr);
31 ~QWaylandView() override;
32
33 QObject *renderObject() const;
34
35 QWaylandSurface *surface() const;
36 void setSurface(QWaylandSurface *surface);
37
38 QWaylandOutput *output() const;
39 void setOutput(QWaylandOutput *output);
40
41 virtual void bufferCommitted(const QWaylandBufferRef &buffer, const QRegion &damage);
42 virtual bool advance();
43 virtual void discardCurrentBuffer();
44 virtual QWaylandBufferRef currentBuffer();
45 virtual QRegion currentDamage();
46
47 bool isBufferLocked() const;
48 void setBufferLocked(bool locked);
49
50 bool allowDiscardFrontBuffer() const;
51 void setAllowDiscardFrontBuffer(bool discard);
52
53 void setPrimary();
54 bool isPrimary() const;
55
56 struct wl_resource *surfaceResource() const;
57
58Q_SIGNALS:
59 void surfaceChanged();
60 void surfaceDestroyed();
61 void outputChanged();
62 void bufferLockedChanged();
63 void allowDiscardFrontBufferChanged();
64};
65
66QT_END_NAMESPACE
67
68#endif
Qt::InputMethodQueries mergeChanged(const QWaylandTextInputV3ClientState &other)
Qt::InputMethodQueries updatedQueries(const QWaylandTextInputV3ClientState &other) const
static const struct wl_interface * interface()
void surfaceEnabled(QWaylandSurface *surface)
QVariant inputMethodQuery(Qt::InputMethodQuery property, QVariant argument) const
void sendInputMethodEvent(QInputMethodEvent *event)
void surfaceDisabled(QWaylandSurface *surface)
static QByteArray interfaceName()
void setFocus(QWaylandSurface *surface)
void add(::wl_client *client, uint32_t id, int version)
QWaylandSurface * focus() const
void sendKeyEvent(QKeyEvent *event)
bool isSurfaceEnabled(QWaylandSurface *surface) const
\qmltype WaylandView \nativetype QWaylandView \inqmlmodule QtWayland.Compositor
Combined button and popup list for selecting options.