summaryrefslogtreecommitdiffstats
path: root/xbmc/input/Keymap.h
blob: 822ed67d3d944aaaacd54f104578b5782143d371 (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
/*
 *  Copyright (C) 2017-2018 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 "IKeymap.h"

#include <memory>

class IKeymapEnvironment;

class CKeymap : public IKeymap
{
public:
  CKeymap(std::shared_ptr<const IWindowKeymap> keymap, const IKeymapEnvironment* environment);

  // implementation of IKeymap
  std::string ControllerID() const override;
  const IKeymapEnvironment* Environment() const override { return m_environment; }
  const KODI::JOYSTICK::KeymapActionGroup& GetActions(const std::string& keyName) const override;

private:
  // Construction parameters
  const std::shared_ptr<const IWindowKeymap> m_keymap;
  const IKeymapEnvironment* const m_environment;
};