Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
No Matches
KODI::JOYSTICK::CAxisFeature Class Reference

#include <FeatureHandling.h>

Inheritance diagram for KODI::JOYSTICK::CAxisFeature:

Public Member Functions

 CAxisFeature (const FeatureName &name, IInputHandler *handler, IButtonMap *buttonMap)
 ~CAxisFeature () override=default
bool OnDigitalMotion (const CDriverPrimitive &source, bool bPressed) override
 A digital motion has occurred.
void ProcessMotions () override
 Process the motions that have occurred since the last invocation.
- Public Member Functions inherited from KODI::JOYSTICK::CJoystickFeature
 CJoystickFeature (const FeatureName &name, IInputHandler *handler, IButtonMap *buttonMap)
virtual ~CJoystickFeature ()=default
virtual bool OnAnalogMotion (const CDriverPrimitive &source, float magnitude)=0
 An analog motion has occurred.
bool AcceptsInput (bool bActivation)
 Check if the input handler is accepting input.

Protected Attributes

CFeatureAxis m_axis
float m_state = 0.0f
- Protected Attributes inherited from KODI::JOYSTICK::CJoystickFeature
const FeatureName m_name
IInputHandler *const m_handler
IButtonMap *const m_buttonMap
const bool m_bEnabled

Additional Inherited Members

- Protected Member Functions inherited from KODI::JOYSTICK::CJoystickFeature
void ResetMotion ()
 Reset motion timer.
void StartMotion ()
 Start the motion timer.
bool InMotion () const
 Check if the feature is in motion.
unsigned int MotionTimeMs () const
 Get the time for which the feature has been in motion.

Constructor & Destructor Documentation

◆ CAxisFeature()

CAxisFeature::CAxisFeature ( const FeatureName & name,
IInputHandler * handler,
IButtonMap * buttonMap )

◆ ~CAxisFeature()

KODI::JOYSTICK::CAxisFeature::~CAxisFeature ( )

Member Function Documentation

◆ OnDigitalMotion()

bool CAxisFeature::OnDigitalMotion ( const CDriverPrimitive & source,
bool bPressed )

A digital motion has occurred.

sourceThe source of the motion. Must be digital (button or hat)
bPressedTrue for press motion, false for release motion
true if the motion was handled, false otherwise

Implements KODI::JOYSTICK::CJoystickFeature.

◆ ProcessMotions()

void CAxisFeature::ProcessMotions ( )

Process the motions that have occurred since the last invocation.

This allows features with motion on multiple driver primitives to call their handler once all driver primitives are accounted for.

Implements KODI::JOYSTICK::CJoystickFeature.

Member Data Documentation

◆ m_axis

CFeatureAxis KODI::JOYSTICK::CAxisFeature::m_axis

◆ m_state

float KODI::JOYSTICK::CAxisFeature::m_state = 0.0f

The documentation for this class was generated from the following files: