xbmc
IDriverHandler.h
1 /*
2  * Copyright (C) 2014-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 
12 
13 namespace KODI
14 {
15 namespace JOYSTICK
16 {
22 {
23 public:
24  virtual ~IDriverHandler() = default;
25 
34  virtual bool OnButtonMotion(unsigned int buttonIndex, bool bPressed) = 0;
35 
44  virtual bool OnHatMotion(unsigned int hatIndex, HAT_STATE state) = 0;
45 
59  virtual bool OnAxisMotion(unsigned int axisIndex,
60  float position,
61  int center,
62  unsigned int range) = 0;
63 
74  virtual void OnInputFrame(void) = 0;
75 };
76 } // namespace JOYSTICK
77 } // namespace KODI
virtual void OnInputFrame(void)=0
Handle buffered input motion for features that require multiple axes.
Interface defining methods to handle joystick events for raw driver elements (buttons, hats, axes)
Definition: IDriverHandler.h:21
virtual bool OnAxisMotion(unsigned int axisIndex, float position, int center, unsigned int range)=0
Handle axis motion.
Controller configuration window.
Definition: AudioDecoder.h:18
virtual bool OnButtonMotion(unsigned int buttonIndex, bool bPressed)=0
Handle button motion.
virtual bool OnHatMotion(unsigned int hatIndex, HAT_STATE state)=0
Handle hat motion.