45 Q_DECLARE_PRIVATE(QWaylandSurface)
46 Q_PROPERTY(QWaylandClient *client READ client CONSTANT)
47 Q_PROPERTY(QRectF sourceGeometry READ sourceGeometry NOTIFY sourceGeometryChanged REVISION(1, 13))
48 Q_PROPERTY(QSize destinationSize READ destinationSize NOTIFY destinationSizeChanged REVISION(1, 13))
49 Q_PROPERTY(QSize bufferSize READ bufferSize NOTIFY bufferSizeChanged REVISION(1, 13))
50 Q_PROPERTY(
int bufferScale READ bufferScale NOTIFY bufferScaleChanged)
51 Q_PROPERTY(Qt::ScreenOrientation contentOrientation READ contentOrientation NOTIFY contentOrientationChanged)
52 Q_PROPERTY(QWaylandSurface::Origin origin READ origin NOTIFY originChanged)
53 Q_PROPERTY(
bool hasContent READ hasContent NOTIFY hasContentChanged)
54 Q_PROPERTY(
bool cursorSurface READ isCursorSurface WRITE markAsCursorSurface NOTIFY cursorSurfaceChanged)
55 Q_PROPERTY(
bool inhibitsIdle READ inhibitsIdle NOTIFY inhibitsIdleChanged REVISION(1, 14))
56 Q_PROPERTY(
bool isOpaque READ isOpaque NOTIFY isOpaqueChanged REVISION(6, 4))
57 Q_MOC_INCLUDE(
"qwaylanddrag.h")
58 Q_MOC_INCLUDE(
"qwaylandcompositor.h")
60 QML_NAMED_ELEMENT(WaylandSurfaceBase)
61 QML_ADDED_IN_VERSION(1, 0)
62 QML_UNCREATABLE(
"Cannot create instance of WaylandSurfaceBase, use WaylandSurface instead")
71 QWaylandSurface(QWaylandCompositor *compositor, QWaylandClient *client, uint id,
int version);
72 ~QWaylandSurface() override;
74 Q_INVOKABLE
void initialize(QWaylandCompositor *compositor, QWaylandClient *client, uint id,
int version);
75 bool isInitialized()
const;
77 QWaylandClient *client()
const;
78 ::wl_client *waylandClient()
const;
80 bool setRole(QWaylandSurfaceRole *role, wl_resource *errorResource, uint32_t errorCode);
81 QWaylandSurfaceRole *role()
const;
83 bool hasContent()
const;
85 QRectF sourceGeometry()
const;
86 QSize destinationSize()
const;
87 QSize bufferSize()
const;
88 int bufferScale()
const;
90 Qt::ScreenOrientation contentOrientation()
const;
92 Origin origin()
const;
94 QWaylandCompositor *compositor()
const;
96 bool inputRegionContains(
const QPoint &p)
const;
97 bool inputRegionContains(
const QPointF &position)
const;
99 Q_INVOKABLE
void destroy();
100 Q_INVOKABLE
bool isDestroyed()
const;
102 Q_INVOKABLE
void frameStarted();
103 Q_INVOKABLE
void sendFrameCallbacks();
105 QWaylandView *primaryView()
const;
106 void setPrimaryView(QWaylandView *view);
108 QList<QWaylandView *> views()
const;
110 static QWaylandSurface *fromResource(::wl_resource *resource);
111 struct wl_resource *resource()
const;
113 void markAsCursorSurface(
bool cursorSurface);
114 bool isCursorSurface()
const;
116 bool inhibitsIdle()
const;
117 bool isOpaque()
const;
120 QWaylandInputMethodControl *inputMethodControl()
const;
124#if QT_CONFIG(clipboard)
125 void updateSelection();
129 QWaylandSurface(QWaylandSurfacePrivate &dptr);
132 void hasContentChanged();
133 void damaged(
const QRegion &rect);
134 void parentChanged(QWaylandSurface *newParent, QWaylandSurface *oldParent);
135 void childAdded(QWaylandSurface *child);
136 Q_REVISION(1, 13)
void sourceGeometryChanged();
137 Q_REVISION(1, 13)
void destinationSizeChanged();
138 Q_REVISION(1, 13)
void bufferSizeChanged();
139 void bufferScaleChanged();
140 void offsetForNextFrame(
const QPoint &offset);
141 void contentOrientationChanged();
142 void surfaceDestroyed();
143 void originChanged();
144 void subsurfacePositionChanged(
const QPoint &position);
145 void subsurfacePlaceAbove(QWaylandSurface *sibling);
146 void subsurfacePlaceBelow(QWaylandSurface *sibling);
147 void dragStarted(QWaylandDrag *drag);
148 void cursorSurfaceChanged();
149 Q_REVISION(14)
void inhibitsIdleChanged();
150 Q_REVISION(6, 4)
void isOpaqueChanged();
152 void configure(
bool hasBuffer);