6 #include "xdgshell_p.h" 7 #include "event_queue.h" 8 #include "wayland_pointer_p.h" 12 #include "../compat/wayland-xdg-shell-v5-client-protocol.h" 19 XdgShell::Private::~Private() =
default;
21 XdgShell::XdgShell(Private *p,
QObject *parent)
32 void XdgShell::setup(xdg_shell *xdgshellv5)
34 d->setupV5(xdgshellv5);
37 void XdgShell::setup(zxdg_shell_v6 *xdgshellv6)
39 d->setupV6(xdgshellv6);
42 void XdgShell::setup(xdg_wm_base *xdg_wm_base)
44 d->setup(xdg_wm_base);
47 void XdgShell::release()
52 void XdgShell::destroy()
67 XdgShell::operator xdg_shell*() {
71 XdgShell::operator xdg_shell*()
const {
75 XdgShell::operator zxdg_shell_v6*() {
79 XdgShell::operator zxdg_shell_v6*()
const {
83 XdgShell::operator xdg_wm_base*() {
87 XdgShell::operator xdg_wm_base*()
const {
92 bool XdgShell::isValid()
const 99 return d->getXdgSurface(surface, parent);
104 return d->getXdgPopup(surface, parentSurface, seat, serial, parentPos, parent);
109 return d->getXdgPopup(surface, parentSurface, positioner, parent);
114 return d->getXdgPopup(surface, parentSurface, positioner, parent);
122 XdgShellSurface::Private::~Private() =
default;
124 XdgShellSurface::XdgShellSurface(Private *p,
QObject *
parent)
130 XdgShellSurface::~XdgShellSurface()
135 void XdgShellSurface::setup(xdg_surface *xdgsurfacev5)
137 d->setupV5(xdgsurfacev5);
140 void XdgShellSurface::setup(zxdg_surface_v6 *xdgsurfacev6, zxdg_toplevel_v6 *xdgtoplevelv6)
142 d->setupV6(xdgsurfacev6, xdgtoplevelv6);
145 void XdgShellSurface::setup(xdg_surface *xdgsurface, xdg_toplevel *xdgtoplevel)
147 d->setup(xdgsurface, xdgtoplevel);
151 void XdgShellSurface::release()
156 void XdgShellSurface::destroy()
171 XdgShellSurface::operator xdg_surface*() {
175 XdgShellSurface::operator xdg_surface*()
const {
179 XdgShellSurface::operator xdg_toplevel*() {
183 XdgShellSurface::operator xdg_toplevel*()
const {
187 XdgShellSurface::operator zxdg_surface_v6*() {
191 XdgShellSurface::operator zxdg_surface_v6*()
const {
195 XdgShellSurface::operator zxdg_toplevel_v6*() {
199 XdgShellSurface::operator zxdg_toplevel_v6*()
const {
203 bool XdgShellSurface::isValid()
const 210 d->setTransientFor(parent);
213 void XdgShellSurface::setTitle(
const QString &title)
223 void XdgShellSurface::requestShowWindowMenu(
Seat *seat, quint32 serial,
const QPoint &pos)
225 d->showWindowMenu(seat, serial, pos.
x(), pos.
y());
228 void XdgShellSurface::requestMove(
Seat *seat, quint32 serial)
230 d->move(seat, serial);
233 void XdgShellSurface::requestResize(
Seat *seat, quint32 serial,
Qt::Edges edges)
235 d->resize(seat, serial, edges);
238 void XdgShellSurface::ackConfigure(quint32 serial)
240 d->ackConfigure(serial);
243 void XdgShellSurface::setMaximized(
bool set)
252 void XdgShellSurface::setFullscreen(
bool set,
Output *output)
255 d->setFullscreen(output);
257 d->unsetFullscreen();
261 void XdgShellSurface::setMaxSize(
const QSize &size)
266 void XdgShellSurface::setMinSize(
const QSize &size)
271 void XdgShellSurface::setWindowGeometry(
const QRect &windowGeometry)
273 d->setWindowGeometry(windowGeometry);
276 void XdgShellSurface::requestMinimize()
281 void XdgShellSurface::setSize(
const QSize &size)
283 if (d->size == size) {
295 XdgShellPopup::Private::~Private() =
default;
303 XdgShellPopup::XdgShellPopup(Private *p,
QObject *parent)
309 XdgShellPopup::~XdgShellPopup()
314 void XdgShellPopup::setup(xdg_popup *xdgpopupv5)
316 d->setupV5(xdgpopupv5);
319 void XdgShellPopup::setup(zxdg_surface_v6 *xdgsurfacev6, zxdg_popup_v6 *xdgpopupv6)
321 d->setupV6(xdgsurfacev6, xdgpopupv6);
324 void XdgShellPopup::setup(xdg_surface *surface, xdg_popup *popup)
326 d->setup(surface, popup);
329 void XdgShellPopup::release()
334 void XdgShellPopup::destroy()
351 d->requestGrab(seat, serial);
354 void XdgShellPopup::ackConfigure(quint32 serial)
356 d->ackConfigure(serial);
359 void XdgShellPopup::setWindowGeometry(
const QRect &windowGeometry)
361 d->setWindowGeometry(windowGeometry);
364 XdgShellPopup::operator xdg_surface*() {
368 XdgShellPopup::operator xdg_surface*()
const {
372 XdgShellPopup::operator xdg_popup*() {
376 XdgShellPopup::operator xdg_popup*()
const {
380 XdgShellPopup::operator zxdg_surface_v6*() {
384 XdgShellPopup::operator zxdg_surface_v6*()
const {
388 XdgShellPopup::operator zxdg_popup_v6*() {
392 XdgShellPopup::operator zxdg_popup_v6*()
const {
396 bool XdgShellPopup::isValid()
const 401 XdgPositioner::XdgPositioner(
const QSize& initialSize,
const QRect& anchor)
404 d->initialSize = initialSize;
405 d->anchorRect = anchor;
415 XdgPositioner::~XdgPositioner()
419 void XdgPositioner::setInitialSize(
const QSize& size)
421 d->initialSize = size;
424 QSize XdgPositioner::initialSize()
const 426 return d->initialSize;
429 void XdgPositioner::setAnchorRect(
const QRect& anchor)
431 d->anchorRect = anchor;
434 QRect XdgPositioner::anchorRect()
const 436 return d->anchorRect;
439 void XdgPositioner::setAnchorEdge(
Qt::Edges edge)
441 d->anchorEdge = edge;
446 return d->anchorEdge;
449 void XdgPositioner::setAnchorOffset(
const QPoint& offset)
451 d->anchorOffset = offset;
454 QPoint XdgPositioner::anchorOffset()
const 456 return d->anchorOffset;
459 void XdgPositioner::setGravity(
Qt::Edges edge)
469 void XdgPositioner::setConstraints(
Constraints constraints)
471 d->constraints = constraints;
476 return d->constraints;
Builder class describing how a popup should be positioned when created.
Wrapper class for wl_event_queue interface.
A XdgShellPopup is a short-lived, temporary surface that can be used to implement menus...
Wrapper for the wl_seat interface.
Wrapper for the wl_output interface.
Wrapper for the wl_surface interface.
QObject * parent() const const