xbmc
IKeyHandler.h
1 /*
2  * Copyright (C) 2015-2018 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 {
23 {
24 public:
25  virtual ~IKeyHandler() = default;
26 
33  virtual bool IsPressed() const = 0;
34 
43  virtual bool OnDigitalMotion(bool bPressed, unsigned int holdTimeMs) = 0;
44 
53  virtual bool OnAnalogMotion(float magnitude, unsigned int motionTimeMs) = 0;
54 };
55 } // namespace JOYSTICK
56 } // namespace KODI
Interface for handling keymap keys.
Definition: IKeyHandler.h:22
Controller configuration window.
Definition: AudioDecoder.h:18
virtual bool OnAnalogMotion(float magnitude, unsigned int motionTimeMs)=0
Callback for keys mapped to analog features.
virtual bool OnDigitalMotion(bool bPressed, unsigned int holdTimeMs)=0
A key mapped to a digital feature has been pressed or released.
virtual bool IsPressed() const =0
Return true if the key is "pressed" (has a magnitude greater than 0.5)