summaryrefslogtreecommitdiffstats
path: root/xbmc/input/joysticks/interfaces/IButtonMapCallback.h
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/input/joysticks/interfaces/IButtonMapCallback.h')
-rw-r--r--xbmc/input/joysticks/interfaces/IButtonMapCallback.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/xbmc/input/joysticks/interfaces/IButtonMapCallback.h b/xbmc/input/joysticks/interfaces/IButtonMapCallback.h
new file mode 100644
index 0000000..40744f8
--- /dev/null
+++ b/xbmc/input/joysticks/interfaces/IButtonMapCallback.h
@@ -0,0 +1,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