KWaylandServer

keystate_interface.h
1 /*
2  SPDX-FileCopyrightText: 2019 Aleix Pol Gonzalez <[email protected]>
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 <KWaylandServer/kwaylandserver_export.h>
10 #include <QObject>
11 
12 namespace KWaylandServer
13 {
14 class Display;
15 class KeyStateInterfacePrivate;
16 
17 /**
18  * @brief Exposes key states to wayland clients
19  */
20 class KWAYLANDSERVER_EXPORT KeyStateInterface : public QObject
21 {
22  Q_OBJECT
23 
24 public:
25  explicit KeyStateInterface(Display *display, QObject *parent = nullptr);
26  virtual ~KeyStateInterface();
27 
28  enum class Key {
29  CapsLock = 0,
30  NumLock = 1,
31  ScrollLock = 2,
32  };
33  Q_ENUM(Key);
34  enum State {
35  Unlocked = 0,
36  Latched = 1,
37  Locked = 2,
38  };
39  Q_ENUM(State)
40 
41  void setState(Key k, State s);
42 
43 private:
45 };
46 
47 }
Class holding the Wayland server display loop.
Definition: display.h:47
Exposes key states to wayland clients.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 23 2021 23:08:27 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.