Changeset View
Changeset View
Standalone View
Standalone View
waylandclient.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright (C) 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org> | ||||
3 | * | ||||
4 | * This program is free software; you can redistribute it and/or modify | ||||
5 | * it under the terms of the GNU General Public License as published by | ||||
6 | * the Free Software Foundation; either version 2 of the License, or | ||||
7 | * (at your option) any later version. | ||||
8 | * | ||||
9 | * This program is distributed in the hope that it will be useful, | ||||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
12 | * GNU General Public License for more details. | ||||
13 | * | ||||
14 | * You should have received a copy of the GNU General Public License | ||||
15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
16 | */ | ||||
17 | | ||||
18 | #pragma once | ||||
19 | | ||||
20 | #include "abstract_client.h" | ||||
21 | | ||||
22 | namespace KWin | ||||
23 | { | ||||
24 | | ||||
25 | class WaylandClient : public AbstractClient | ||||
26 | { | ||||
27 | Q_OBJECT | ||||
28 | | ||||
29 | public: | ||||
30 | WaylandClient(KWaylandServer::SurfaceInterface *surface); | ||||
31 | | ||||
32 | QString captionNormal() const override; | ||||
33 | QString captionSuffix() const override; | ||||
34 | QStringList activities() const override; | ||||
35 | void setOnAllActivities(bool set) override; | ||||
36 | void blockActivityUpdates(bool b = true) override; | ||||
37 | QPoint clientContentPos() const override; | ||||
38 | QRect transparentRect() const override; | ||||
39 | quint32 windowId() const override; | ||||
40 | pid_t pid() const override; | ||||
41 | bool isLockScreen() const override; | ||||
42 | bool isInputMethod() const override; | ||||
43 | bool isLocalhost() const override; | ||||
44 | double opacity() const override; | ||||
45 | void setOpacity(double opacity) override; | ||||
46 | AbstractClient *findModal(bool allow_itself = false) override; | ||||
47 | void resizeWithChecks(const QSize &size, ForceGeometry_t force = NormalGeometrySet) override; | ||||
48 | void killWindow() override; | ||||
49 | QByteArray windowRole() const override; | ||||
50 | | ||||
51 | void setCaption(const QString &caption); | ||||
52 | | ||||
53 | protected: | ||||
54 | bool belongsToSameApplication(const AbstractClient *other, SameApplicationChecks checks) const override; | ||||
55 | bool belongsToDesktop() const override; | ||||
56 | void updateCaption() override; | ||||
57 | | ||||
58 | private: | ||||
59 | void updateClientArea(); | ||||
60 | void updateClientOutputs(); | ||||
61 | void updateIcon(); | ||||
62 | void updateResourceName(); | ||||
63 | | ||||
64 | QString m_captionNormal; | ||||
65 | QString m_captionSuffix; | ||||
66 | double m_opacity = 1.0; | ||||
67 | quint32 m_windowId; | ||||
68 | }; | ||||
69 | | ||||
70 | } // namespace KWin |