| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
#pragma once |
| 8 |
|
| 9 |
#include "seat.h" |
| 10 |
#include "surface.h" |
| 11 |
|
| 12 |
#include <QObject> |
| 13 |
|
| 14 |
namespace KWin |
| 15 |
{ |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
class KeyboardShortcutsInhibitManagerV1Interface; |
| 25 |
class KeyboardShortcutsInhibitorV1InterfacePrivate; |
| 26 |
class KeyboardShortcutsInhibitManagerV1InterfacePrivate; |
| 27 |
|
| 28 |
class KWIN_EXPORT KeyboardShortcutsInhibitorV1Interface : public QObject |
| 29 |
{ |
| 30 |
Q_OBJECT |
| 31 |
|
| 32 |
public: |
| 33 |
~KeyboardShortcutsInhibitorV1Interface() override; |
| 34 |
|
| 35 |
SurfaceInterface *surface() const; |
| 36 |
SeatInterface *seat() const; |
| 37 |
void setActive(bool active); |
| 38 |
bool isActive() const; |
| 39 |
|
| 40 |
private: |
| 41 |
friend class KeyboardShortcutsInhibitManagerV1InterfacePrivate; |
| 42 |
explicit KeyboardShortcutsInhibitorV1Interface(SurfaceInterface *surface, |
| 43 |
SeatInterface *seat, |
| 44 |
KeyboardShortcutsInhibitManagerV1Interface *manager, |
| 45 |
wl_resource *resource); |
| 46 |
std::unique_ptr<KeyboardShortcutsInhibitorV1InterfacePrivate> d; |
| 47 |
}; |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
class KWIN_EXPORT KeyboardShortcutsInhibitManagerV1Interface : public QObject |
| 55 |
{ |
| 56 |
Q_OBJECT |
| 57 |
|
| 58 |
public: |
| 59 |
explicit KeyboardShortcutsInhibitManagerV1Interface(Display *d, QObject *parent = nullptr); |
| 60 |
~KeyboardShortcutsInhibitManagerV1Interface() override; |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
KeyboardShortcutsInhibitorV1Interface *findInhibitor(SurfaceInterface *surface, SeatInterface *seat) const; |
| 66 |
|
| 67 |
Q_SIGNALS: |
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
void inhibitorCreated(KeyboardShortcutsInhibitorV1Interface *inhibitor); |
| 72 |
|
| 73 |
private: |
| 74 |
friend class KeyboardShortcutsInhibitorV1InterfacePrivate; |
| 75 |
void removeInhibitor(SurfaceInterface *const surface, SeatInterface *const seat); |
| 76 |
std::unique_ptr<KeyboardShortcutsInhibitManagerV1InterfacePrivate> d; |
| 77 |
}; |
| 78 |
|
| 79 |
} |