25class Q_WAYLANDCOMPOSITOR_EXPORT
QWaylandQtShell :
public QWaylandCompositorExtensionTemplate<QWaylandQtShell>
28 Q_DECLARE_PRIVATE(QWaylandQtShell)
32 QWaylandQtShell(QWaylandCompositor *compositor);
34 void initialize() override;
36 static const struct wl_interface *interface();
37 static QByteArray interfaceName();
39 void registerChrome(QWaylandQtShellChrome *chrome);
40 void unregisterChrome(QWaylandQtShellChrome *chrome);
43 void chromeActivated();
44 void chromeDeactivated();
47 void qtShellSurfaceRequested(QWaylandSurface *surface,
const QWaylandResource &resource);
48 void qtShellSurfaceCreated(QWaylandQtShellSurface *qtShellSurface);
51 bool moveChromeToFront(QWaylandQtShellChrome *chrome);
64 QML_NAMED_ELEMENT(QtShellSurface)
65 QML_ADDED_IN_VERSION(1, 0)
66 Q_DECLARE_PRIVATE(QWaylandQtShellSurface)
67 Q_WAYLAND_COMPOSITOR_DECLARE_QUICK_CHILDREN(QWaylandQtShellSurface)
68 Q_PROPERTY(QWaylandSurface *surface READ surface NOTIFY surfaceChanged)
69 Q_PROPERTY(uint windowFlags READ windowFlags NOTIFY windowFlagsChanged)
70 Q_PROPERTY(uint windowState READ windowState NOTIFY windowStateChanged)
71 Q_PROPERTY(QString windowTitle READ windowTitle READ windowTitle NOTIFY windowTitleChanged)
72 Q_PROPERTY(QRect windowGeometry READ windowGeometry NOTIFY windowGeometryChanged)
73 Q_PROPERTY(QPoint windowPosition READ windowPosition WRITE setWindowPosition NOTIFY windowGeometryChanged)
74 Q_PROPERTY(
bool positionAutomatic READ positionAutomatic NOTIFY positionAutomaticChanged)
75 Q_PROPERTY(QSize minimumSize READ minimumSize NOTIFY minimumSizeChanged)
76 Q_PROPERTY(QSize maximumSize READ maximumSize NOTIFY maximumSizeChanged)
77 Q_PROPERTY(
int frameMarginLeft READ frameMarginLeft WRITE setFrameMarginLeft NOTIFY frameMarginChanged)
78 Q_PROPERTY(
int frameMarginRight READ frameMarginRight WRITE setFrameMarginRight NOTIFY frameMarginChanged)
79 Q_PROPERTY(
int frameMarginTop READ frameMarginTop WRITE setFrameMarginTop NOTIFY frameMarginChanged)
80 Q_PROPERTY(
int frameMarginBottom READ frameMarginBottom WRITE setFrameMarginBottom NOTIFY frameMarginChanged)
81 Q_PROPERTY(
bool active READ active WRITE setActive NOTIFY activeChanged)
82 Q_PROPERTY(CapabilityFlags capabilities READ capabilities WRITE setCapabilities NOTIFY capabilitiesChanged)
83 Q_MOC_INCLUDE(
"qwaylandsurface.h")
91 Q_DECLARE_FLAGS(CapabilityFlags, CapabilityFlag)
92 Q_ENUM(CapabilityFlag)
94 QWaylandQtShellSurface();
95 QWaylandQtShellSurface(QWaylandQtShell *application, QWaylandSurface *surface,
const QWaylandResource &resource);
97 void initialize(QWaylandQtShell *qtShell, QWaylandSurface *surface,
98 const QWaylandResource &resource);
100 QWaylandSurface *surface()
const;
102 static const wl_interface *interface();
103 static QByteArray interfaceName();
104 static QWaylandSurfaceRole *role();
105 static QWaylandQtShellSurface *fromResource(::wl_resource *resource);
107 QRect windowGeometry()
const;
109 void setWindowPosition(
const QPoint &position);
110 QPoint windowPosition()
const;
112 Q_INVOKABLE
void requestWindowGeometry(uint windowState,
const QRect &windowGeometry);
114 QSize minimumSize()
const;
115 QSize maximumSize()
const;
117 void setFrameMargins(
const QMargins &margins);
119 int frameMarginLeft()
const;
120 void setFrameMarginLeft(
int left);
122 int frameMarginRight()
const;
123 void setFrameMarginRight(
int right);
125 int frameMarginTop()
const;
126 void setFrameMarginTop(
int top);
128 int frameMarginBottom()
const;
129 void setFrameMarginBottom(
int bottom);
131 bool positionAutomatic()
const;
134 void setActive(
bool active);
136 QString windowTitle()
const;
138 uint windowFlags()
const;
140 Q_INVOKABLE
void sendClose();
142 uint windowState()
const;
143 void setWindowState(uint windowState);
144#if QT_CONFIG(wayland_compositor_quick)
145 QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) override;
148 CapabilityFlags capabilities()
const;
149 void setCapabilities(CapabilityFlags capabilities);
152 void surfaceChanged();
153 void windowFlagsChanged();
154 void windowStateChanged();
155 void windowGeometryChanged();
156 void minimumSizeChanged();
157 void maximumSizeChanged();
158 void positionAutomaticChanged();
160 void startResize(Qt::Edges edges);
161 void windowTitleChanged();
162 void frameMarginChanged();
163 void raiseRequested();
164 void lowerRequested();
165 void activeChanged();
166 void capabilitiesChanged();
169 void surfaceCommitted();
172 friend class QWaylandQtShellChrome;
174 void initialize() override;
176 QWaylandQtShell *shell()
const;