Libplasma

plasmashellwaylandintegration.h
1/*
2 SPDX-FileCopyrightText: 2023 David Edmundson <davidedmundson@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#ifndef PLASMASHELLWAYLANDINTEGRATION_P_H
8#define PLASMASHELLWAYLANDINTEGRATION_P_H
9
10#include <QObject>
11#include <QPoint>
12#include <memory>
13
14#include "qwayland-plasma-shell.h"
15
16#include <plasmaquick/plasmaquick_export.h>
17
18class QWindow;
19
20class PlasmaShellSurface;
21class PlasmaShellWaylandIntegrationPrivate;
22
23/**
24 * @brief The PlasmaWaylandShellIntegration class exposes Plasma specific
25 * specific wayland extensions for
26 *
27 * The class abstracts the wayland protocol tasks, automatically sending
28 * cached metadata when the underlying platform surfaces are created.
29 */
30
31class PLASMAQUICK_EXPORT PlasmaShellWaylandIntegration : public QObject
32{
33 Q_OBJECT
34public:
35 /**
36 * Returns the relevant PlasmaWaylandShellIntegration instance for this window
37 * creating one if needed.
38 *
39 * A valid instance will always returned, it will no-op on unsupported platforms
40 */
41 static PlasmaShellWaylandIntegration *get(QWindow *window);
43
44 void setPosition(const QPoint &position);
45 void setPanelBehavior(QtWayland::org_kde_plasma_surface::panel_behavior panelBehavior);
46 void setRole(QtWayland::org_kde_plasma_surface::role role);
47 void setTakesFocus(bool takesFocus);
48 bool eventFilter(QObject *watched, QEvent *event) override;
49
50private:
52
53 Q_PRIVATE_SLOT(d, void platformSurfaceCreated(QWindow *window))
54 Q_PRIVATE_SLOT(d, void surfaceCreated())
55 Q_PRIVATE_SLOT(d, void surfaceDestroyed())
56
57 const std::unique_ptr<PlasmaShellWaylandIntegrationPrivate> d;
58};
59
60#endif // PLASMASHELLWAYLANDINTEGRATION_P_H
The PlasmaWaylandShellIntegration class exposes Plasma specific specific wayland extensions for.
virtual bool eventFilter(QObject *watched, QEvent *event)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:10:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.