KWayland

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 #ifndef KWAYLAND_KEYSTATE_INTERFACE_H
8 #define KWAYLAND_KEYSTATE_INTERFACE_H
9 
10 #include <KWayland/Server/kwaylandserver_export.h>
11 #include "global.h"
12 #include "resource.h"
13 
14 namespace KWayland
15 {
16 namespace Server
17 {
18 
19 class Display;
20 
26 class KWAYLANDSERVER_EXPORT KeyStateInterface : public Global
27 {
28  Q_OBJECT
29 public:
30  virtual ~KeyStateInterface();
31 
32  enum class Key {
33  CapsLock = 0,
34  NumLock = 1,
35  ScrollLock = 2,
36  };
37  Q_ENUM(Key);
38  enum State {
39  Unlocked = 0,
40  Latched = 1,
41  Locked = 2,
42  };
43  Q_ENUM(State)
44 
45  void setState(Key k, State s);
46 
47 private:
48  explicit KeyStateInterface(Display *display, QObject *parent = nullptr);
49  friend class Display;
50 
51  class Private;
52 };
53 
54 }
55 }
56 
57 #endif
State
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Aug 7 2020 22:48:18 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.