kwin/src/wayland/keystate_interface.h
Vlad Zahorodnii bdb138bdcd Remove @since version tags
Currently, we have a mix of Frameworks versions and Plasma versions in
@since tags, which leads to some confusion. Since this is an unstable
library, one cannot rely on since version tags, we are free to add,
change, and remove apis to serve best to kwin requirements. Thus, we can
simply remove all since version tags to fix mixing up different product
versions.
2021-03-16 10:08:21 +02:00

48 lines
904 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;
};
}