KWin
Loading...
Searching...
No Matches
plasmashell.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2015 Martin Gräßlin <mgraesslin@kde.org>
3 SPDX-FileCopyrightText: 2020 David Edmundson <davidedmundson@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7#pragma once
8
9#include "kwin_export.h"
10
11#include <QObject>
12#include <memory>
13
14class QSize;
15struct wl_resource;
16
17namespace KWin
18{
19class Display;
20class SurfaceInterface;
21class PlasmaShellSurfaceInterface;
22
23class PlasmaShellInterfacePrivate;
24class PlasmaShellSurfaceInterfacePrivate;
25
36class KWIN_EXPORT PlasmaShellInterface : public QObject
37{
38 Q_OBJECT
39
40public:
41 explicit PlasmaShellInterface(Display *display, QObject *parent);
43
44Q_SIGNALS:
49
50private:
51 std::unique_ptr<PlasmaShellInterfacePrivate> d;
52};
53
59class KWIN_EXPORT PlasmaShellSurfaceInterface : public QObject
60{
61 Q_OBJECT
62public:
64
68 SurfaceInterface *surface() const;
72 QPoint position() const;
76 bool isPositionSet() const;
77
81 bool wantsOpenUnderCursor() const;
82
87 enum class Role {
88 Normal,
89 Desktop,
90 Panel,
91 OnScreenDisplay,
92 Notification,
93 ToolTip,
94 CriticalNotification,
95 AppletPopup,
96 };
100 Role role() const;
106 enum class PanelBehavior {
107 AlwaysVisible,
108 AutoHide,
109 WindowsCanCover,
110 WindowsGoBelow,
111 };
118 PanelBehavior panelBehavior() const;
119
124 bool skipTaskbar() const;
125
130 bool skipSwitcher() const;
131
140 void hideAutoHidingPanel();
141
150 void showAutoHidingPanel();
151
159 // TODO KF6 rename to something generic
160 bool panelTakesFocus() const;
161
165 static PlasmaShellSurfaceInterface *get(wl_resource *native);
166 static PlasmaShellSurfaceInterface *get(SurfaceInterface *surface);
167
168Q_SIGNALS:
173
195
210
222
223 /*
224 * Emitted when panelTakesFocus changes
225 * @see panelTakesFocus
226 */
228
229private:
231 explicit PlasmaShellSurfaceInterface(SurfaceInterface *surface, wl_resource *resource);
232 std::unique_ptr<PlasmaShellSurfaceInterfacePrivate> d;
233};
234
235}
236
Class holding the Wayland server display loop.
Definition display.h:34
Global for the org_kde_plasma_shell interface.
Definition plasmashell.h:37
void surfaceCreated(KWin::PlasmaShellSurfaceInterface *)
Resource for the org_kde_plasma_shell_surface interface.
Definition plasmashell.h:60
Resource representing a wl_surface.
Definition surface.h:80
Q_DECLARE_METATYPE(KWin::SwitchEvent::State)
struct _XDisplay Display