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

KDE's Doxygen guidelines are available online.