aboutsummaryrefslogtreecommitdiff
path: root/xbmc/input/keymaps/KeymapTypes.h
blob: 501766cf181c95e7f4a64d4bb3fcda2070b59c8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 *  Copyright (C) 2014-2024 Team Kodi
 *  This file is part of Kodi - https://kodi.tv
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 *  See LICENSES/README.md for more information.
 */

#pragma once

#include <set>
#include <string>

namespace KODI
{
namespace KEYMAP
{
/*!
 * \ingroup keymap
 *
 * \brief Action entry in joystick.xml
 */
struct KeymapAction
{
  unsigned int actionId;
  std::string actionString;
  unsigned int holdTimeMs;
  std::set<std::string> hotkeys;

  bool operator<(const KeymapAction& rhs) const { return holdTimeMs < rhs.holdTimeMs; }
};

/*!
 * \ingroup keymap
 *
 * \brief Container that sorts action entries by their holdtime
 */
struct KeymapActionGroup
{
  int windowId = -1;
  std::set<KeymapAction> actions;
};
} // namespace KEYMAP
} // namespace KODI