Debian Codegraph @

xbmc/input/keymaps/KeymapTypes.h

raw
1 /*
2 * Copyright (C) 2014-2024 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9 #pragma once
10
11 #include <set>
12 #include <string>
13
14 namespace KODI
15 {
16 namespace KEYMAP
17 {
18 /*!
19 * \ingroup keymap
20 *
21 * \brief Action entry in joystick.xml
22 */
23 struct KeymapAction
24 {
25 unsigned int actionId;
26 std::string actionString;
27 unsigned int holdTimeMs;
28 std::set<std::string> hotkeys;
29
30 bool operator<(const KeymapAction& rhs) const { return holdTimeMs < rhs.holdTimeMs; }
31 };
32
33 /*!
34 * \ingroup keymap
35 *
36 * \brief Container that sorts action entries by their holdtime
37 */
38 struct KeymapActionGroup
39 {
40 int windowId = -1;
41 std::set<KeymapAction> actions;
42 };
43 } // namespace KEYMAP
44 } // namespace KODI