4#ifndef QWAYLANDWINDOW_H
5#define QWAYLANDWINDOW_H
18#include <QtCore/QWaitCondition>
19#include <QtCore/QMutex>
20#include <QtCore/QReadWriteLock>
23#include <QtGui/QEventPoint>
24#include <QtCore/QVariant>
25#include <QtCore/QLoggingCategory>
26#include <QtCore/QElapsedTimer>
27#include <QtCore/QList>
30#include <qpa/qplatformwindow.h>
31#include <qpa/qplatformwindow_p.h>
33#include <QtWaylandClient/private/qwayland-wayland.h>
34#include <QtWaylandClient/private/qwaylanddisplay_p.h>
35#include <QtWaylandClient/qtwaylandclientglobal.h>
36#include <QtWaylandClient/private/qwaylandshellsurface_p.h>
49class QWaylandSubSurface;
50class QWaylandAbstractDecoration;
51class QWaylandInputDevice;
53class QWaylandShellIntegration;
54class QWaylandShmBackingStore;
55class QWaylandPointerEvent;
56class QWaylandPointerGestureSwipeEvent;
57class QWaylandPointerGesturePinchEvent;
59class QWaylandFractionalScale;
60class QWaylandViewport;
62class Q_WAYLANDCLIENT_EXPORT
QWaylandWindow :
public QNativeInterface::Private::QWaylandWindow,
86 static inline bool fixedToplevelPositions =
true;
89 virtual void ensureSize();
90 WId winId()
const override;
91 void setVisible(
bool visible)
override;
96 inline QIcon windowIcon()
const;
97 void setWindowIcon(
const QIcon &
icon)
override;
99 void setGeometry(
const QRect &
rect)
override;
100 void resizeFromApplyConfigure(
const QSize &sizeWithMargins,
const QPoint &
offset = {0, 0});
102 void setGeometryFromApplyConfigure(
const QPoint &globalPosition,
const QSize &sizeWithMargins);
104 void applyConfigureWhenPossible();
108 QPoint attachOffset()
const;
113 void handleExpose(
const QRegion ®ion);
118 bool waitForFrameSync(
int timeout);
120 QMargins frameMargins()
const override;
122 void setCustomMargins(
const QMargins &margins)
override;
123 QSize surfaceSize()
const;
124 QMargins windowContentMargins()
const;
125 QRect windowContentGeometry()
const;
129 ::wl_surface *wlSurface();
138 std::any _surfaceRole()
const override;
143 void setOrientationMask(Qt::ScreenOrientations
mask);
145 ToplevelWindowTilingStates toplevelWindowTilingStates()
const;
146 void handleToplevelWindowTilingStatesChanged(ToplevelWindowTilingStates
states);
148 Qt::WindowStates windowStates()
const;
150 void setWindowFlags(Qt::WindowFlags
flags)
override;
151 void handleWindowStatesChanged(Qt::WindowStates
states);
153 void raise()
override;
154 void lower()
override;
156 void setMask(
const QRegion ®ion)
override;
158 void setAlertState(
bool enabled)
override;
159 bool isAlertState()
const override;
162 qreal devicePixelRatio()
const override;
164 void requestActivateWindow()
override;
165 bool isExposed()
const override;
171#ifndef QT_NO_GESTURES
181 bool createDecoration();
191 void doApplyConfigure();
192 void setCanResize(
bool canResize);
194 bool setMouseGrabEnabled(
bool grab)
override;
211 void propagateSizeHints()
override;
212 void addAttachOffset(
const QPoint point);
214 bool startSystemResize(Qt::Edges edges)
override;
215 bool startSystemMove()
override;
218 void requestUpdate()
override;
220 void deliverUpdateRequest()
override;
223 void requestXdgActivationToken(
uint serial)
override;
228 void closeChildPopups();
230 virtual void reinit();
234 void applyConfigure();
241 virtual void doHandleFrameCallback();
242 virtual QRect defaultGeometry()
const;
259 bool mWindowDecorationEnabled =
false;
260 bool mMouseEventsInContentArea =
false;
263#ifndef QT_NO_GESTURES
267 GestureActiveInDecoration
281 bool mFrameCallbackTimedOut =
false;
282 int mFrameCallbackCheckIntervalTimerId = -1;
285 bool mWaitingForFrameCallback =
false;
287 struct ::wl_callback *mFrameCallback =
nullptr;
292 bool mWaitingForUpdate =
false;
295 bool mWaitingToApplyConfigure =
false;
296 bool mCanResize =
true;
297 bool mResizeDirty =
false;
299 int mFrameCallbackTimeout = 100;
302 bool mSentInitialResize =
false;
313 ToplevelWindowTilingStates mLastReportedToplevelWindowTilingStates = WindowNoState;
325 void doApplyConfigureFromOtherThread();
328 void setGeometry_helper(
const QRect &
rect);
330 void initializeWlSurface();
331 bool shouldCreateShellSurface()
const;
332 bool shouldCreateSubSurface()
const;
334 void setOpaqueArea(
const QRegion &opaqueArea);
335 bool isOpaque()
const;
336 void updateViewport();
339 void handleScreensChanged();
340 void sendRecursiveExposeEvent();
346 bool mInResizeFromApplyConfigure =
false;
347 bool lastVisible =
false;
348 QRect mLastExposeGeometry;
350 static const wl_callback_listener callbackListener;
351 void handleFrameCallback(struct ::wl_callback* callback);
IOBluetoothDevice * device
The QCursor class provides a mouse cursor with an arbitrary shape.
State
Specifies the state of this event point.
The QIcon class provides scalable icons in different modes and states.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
The QRegion class specifies a clip region for a painter.
\macro QT_RESTRICTED_CAST_FROM_ASCII
\qmltype ShellSurface \instantiates QWaylandShellSurface \inqmlmodule QtWayland.Compositor
\qmltype WaylandSurface \instantiates QWaylandSurface \inqmlmodule QtWayland.Compositor
void setBackingStore(QWaylandShmBackingStore *backingStore)
QRegion mQueuedBufferDamage
void wlSurfaceDestroyed()
QReadWriteLock mSurfaceLock
QScopedPointer< QWaylandViewport > mViewport
@ GestureActiveInContentArea
QWaitCondition mFrameSyncWait
QElapsedTimer mFrameCallbackElapsedTimer
QList< QPointer< QWaylandWindow > > mChildPopups
QScopedPointer< QWaylandSurface > mSurface
QWaylandDisplay * display() const
QWaylandShmBackingStore * backingStore() const
QPointer< QWaylandWindow > mTransientParent
QScopedPointer< QWaylandFractionalScale > mFractionalScale
virtual WindowType windowType() const =0
ToplevelWindowTilingState
QPoint attachOffset() const
QWaylandSurface * waylandSurface() const
QList< QWaylandSubSurface * > mChildren
QWaylandShellIntegration * shellIntegration() const
static QWaylandWindow * mouseGrab()
::wl_surface * surface() const override
bool setKeyboardGrabEnabled(bool) override
object setProperty("down", true)
struct wl_display * display
Combined button and popup list for selecting options.
static const QCssKnownValue properties[NumProperties - 1]
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
#define Q_DECLARE_LOGGING_CATEGORY(name)
GLint GLint GLint GLint GLint x
[0]
GLint GLint GLint GLint GLsizei GLsizei GLsizei GLboolean commit
GLbitfield GLuint64 timeout
[4]
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLenum GLuint GLintptr offset
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
GLenum GLenum GLenum GLenum GLenum scale
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
file setParent(multiPart)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent