kodi
IDriverHandler.h
1 /*
2  * Copyright (C) 2014-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 #include "input/joysticks/JoystickTypes.h"
12 
13 namespace KODI
14 {
15 namespace JOYSTICK
16 {
24 {
25 public:
26  virtual ~IDriverHandler() = default;
27 
36  virtual bool OnButtonMotion(unsigned int buttonIndex, bool bPressed) = 0;
37 
46  virtual bool OnHatMotion(unsigned int hatIndex, HAT_STATE state) = 0;
47 
61  virtual bool OnAxisMotion(unsigned int axisIndex,
62  float position,
63  int center,
64  unsigned int range) = 0;
65 
76  virtual void OnInputFrame(void) = 0;
77 };
78 } // namespace JOYSTICK
79 } // 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:23
virtual bool OnAxisMotion(unsigned int axisIndex, float position, int center, unsigned int range)=0
Handle axis motion.
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.