kwin/src/wayland/keystate_interface.h
Alexander Lohnau 525d12bee5 Run clang-format
If you want git blame to ignore formatting revisions run:
git config blame.ignoreRevsFile .git-blame-ignore-revs
2021-08-29 07:11:06 +02:00

47 lines
902 B
C++

/*
SPDX-FileCopyrightText: 2019 Aleix Pol Gonzalez <aleixpol@kde.org>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#pragma once
#include <KWaylandServer/kwaylandserver_export.h>
#include <QObject>
namespace KWaylandServer
{
class Display;
class KeyStateInterfacePrivate;
/**
* @brief Exposes key states to wayland clients
*/
class KWAYLANDSERVER_EXPORT KeyStateInterface : public QObject
{
Q_OBJECT
public:
explicit KeyStateInterface(Display *display, QObject *parent = nullptr);
virtual ~KeyStateInterface();
enum class Key {
CapsLock = 0,
NumLock = 1,
ScrollLock = 2,
};
Q_ENUM(Key);
enum State {
Unlocked = 0,
Latched = 1,
Locked = 2,
};
Q_ENUM(State)
void setState(Key k, State s);
private:
QScopedPointer<KeyStateInterfacePrivate> d;
};
}