Debian Codegraph @

xbmc/input/joysticks/interfaces/IButtonMapCallback.h

raw
1 /*
2 * Copyright (C) 2016-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 namespace KODI
12 {
13 namespace JOYSTICK
14 {
15 /*!
16 * \ingroup joystick
17 *
18 * \brief Interface for handling button maps
19 */
20 class IButtonMapCallback
21 {
22 public:
23 virtual ~IButtonMapCallback() = default;
24
25 /*!
26 * \brief Save the button map
27 */
28 virtual void SaveButtonMap() = 0;
29
30 /*!
31 * \brief Clear the list of ignored driver primitives
32 *
33 * Called if the user begins capturing primitives to be ignored, and
34 * no primitives are captured before the dialog is accepted by the user.
35 *
36 * In this case, the button mapper won't have been given access to the
37 * button map, so a callback is needed to indicate that no primitives were
38 * captured and the user accepted this.
39 */
40 virtual void ResetIgnoredPrimitives() = 0;
41
42 /*!
43 * \brief Revert changes to the button map since the last time it was loaded
44 * or committed to disk
45 */
46 virtual void RevertButtonMap() = 0;
47 };
48 } // namespace JOYSTICK
49 } // namespace KODI