summaryrefslogtreecommitdiffstats
path: root/xbmc/input/joysticks/interfaces/IButtonMapCallback.h
blob: 40744f8a1f7b69f6dfb17ed8681a99f2f7eb54ef (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
45
46
47
/*
 *  Copyright (C) 2016-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

namespace KODI
{
namespace JOYSTICK
{
/*!
 * \brief Interface for handling button maps
 */
class IButtonMapCallback
{
public:
  virtual ~IButtonMapCallback() = default;

  /*!
   * \brief Save the button map
   */
  virtual void SaveButtonMap() = 0;

  /*!
   * \brief Clear the list of ignored driver primitives
   *
   * Called if the user begins capturing primitives to be ignored, and
   * no primitives are captured before the dialog is accepted by the user.
   *
   * In this case, the button mapper won't have been given access to the
   * button map, so a callback is needed to indicate that no primitives were
   * captured and the user accepted this.
   */
  virtual void ResetIgnoredPrimitives() = 0;

  /*!
   * \brief Revert changes to the button map since the last time it was loaded
   *        or committed to disk
   */
  virtual void RevertButtonMap() = 0;
};
} // namespace JOYSTICK
} // namespace KODI