KWin
Loading...
Searching...
No Matches
keyboard_shortcuts_inhibit_v1.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2020 Benjamin Port <benjamin.port@enioka.com>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#pragma once
8
9#include "seat.h"
10#include "surface.h"
11
12#include <QObject>
13
14namespace KWin
15{
23class KeyboardShortcutsInhibitManagerV1Interface;
24class KeyboardShortcutsInhibitorV1InterfacePrivate;
25class KeyboardShortcutsInhibitManagerV1InterfacePrivate;
26
27class KWIN_EXPORT KeyboardShortcutsInhibitorV1Interface : public QObject
28{
29 Q_OBJECT
30
31public:
33
34 SurfaceInterface *surface() const;
35 SeatInterface *seat() const;
36 void setActive(bool active);
37 bool isActive() const;
38
39private:
42 SeatInterface *seat,
44 wl_resource *resource);
45 std::unique_ptr<KeyboardShortcutsInhibitorV1InterfacePrivate> d;
46};
47
53class KWIN_EXPORT KeyboardShortcutsInhibitManagerV1Interface : public QObject
54{
55 Q_OBJECT
56
57public:
58 explicit KeyboardShortcutsInhibitManagerV1Interface(Display *d, QObject *parent = nullptr);
60
64 KeyboardShortcutsInhibitorV1Interface *findInhibitor(SurfaceInterface *surface, SeatInterface *seat) const;
65
66Q_SIGNALS:
71
72private:
74 void removeInhibitor(SurfaceInterface *const surface, SeatInterface *const seat);
75 std::unique_ptr<KeyboardShortcutsInhibitManagerV1InterfacePrivate> d;
76};
77
78}
Class holding the Wayland server display loop.
Definition display.h:34
void inhibitorCreated(KeyboardShortcutsInhibitorV1Interface *inhibitor)
Represents a Seat on the Wayland Display.
Definition seat.h:134
Resource representing a wl_surface.
Definition surface.h:80