Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
kodi::addon::JoystickFeature Class Reference

#include <PeripheralUtils.h>

Public Member Functions

 JoystickFeature (const std::string &name="", JOYSTICK_FEATURE_TYPE type=JOYSTICK_FEATURE_TYPE_UNKNOWN)
 
 JoystickFeature (const JoystickFeature &other)
 
 JoystickFeature (const JOYSTICK_FEATURE &feature)
 
JoystickFeatureoperator= (const JoystickFeature &rhs)
 
bool operator== (const JoystickFeature &other) const
 
const std::string & Name (void) const
 
JOYSTICK_FEATURE_TYPE Type (void) const
 
bool IsValid () const
 
void SetName (const std::string &name)
 
void SetType (JOYSTICK_FEATURE_TYPE type)
 
void SetInvalid (void)
 
const DriverPrimitivePrimitive (JOYSTICK_FEATURE_PRIMITIVE which) const
 
void SetPrimitive (JOYSTICK_FEATURE_PRIMITIVE which, const DriverPrimitive &primitive)
 
std::array< DriverPrimitive, JOYSTICK_PRIMITIVE_MAX > & Primitives ()
 
const std::array< DriverPrimitive, JOYSTICK_PRIMITIVE_MAX > & Primitives () const
 
void ToStruct (JOYSTICK_FEATURE &feature) const
 

Static Public Member Functions

static void FreeStruct (JOYSTICK_FEATURE &feature)
 

Detailed Description

kodi::addon::JoystickFeature

Class for joystick features. A feature can be:

1) scalar[1] 2) analog stick 3) accelerometer 4) motor 5) relative pointer[2] 6) absolute pointer 7) wheel 8) throttle 9) keyboard key

[1] All three driver primitives (buttons, hats and axes) have a state that can be represented using a single scalar value. For this reason, features that map to a single primitive are called "scalar features".

[2] Relative pointers are similar to analog sticks, but they use relative distances instead of positions.

Constructor & Destructor Documentation

◆ JoystickFeature() [1/3]

kodi::addon::JoystickFeature::JoystickFeature ( const std::string &  name = "",
JOYSTICK_FEATURE_TYPE  type = JOYSTICK_FEATURE_TYPE_UNKNOWN 
)
inline

◆ JoystickFeature() [2/3]

kodi::addon::JoystickFeature::JoystickFeature ( const JoystickFeature other)
inline

◆ JoystickFeature() [3/3]

kodi::addon::JoystickFeature::JoystickFeature ( const JOYSTICK_FEATURE feature)
inlineexplicit

Member Function Documentation

◆ FreeStruct()

static void kodi::addon::JoystickFeature::FreeStruct ( JOYSTICK_FEATURE feature)
inlinestatic

◆ IsValid()

bool kodi::addon::JoystickFeature::IsValid ( ) const
inline

◆ Name()

const std::string & kodi::addon::JoystickFeature::Name ( void  ) const
inline

◆ operator=()

JoystickFeature & kodi::addon::JoystickFeature::operator= ( const JoystickFeature rhs)
inline

◆ operator==()

bool kodi::addon::JoystickFeature::operator== ( const JoystickFeature other) const
inline

◆ Primitive()

const DriverPrimitive & kodi::addon::JoystickFeature::Primitive ( JOYSTICK_FEATURE_PRIMITIVE  which) const
inline

◆ Primitives() [1/2]

std::array< DriverPrimitive, JOYSTICK_PRIMITIVE_MAX > & kodi::addon::JoystickFeature::Primitives ( )
inline

◆ Primitives() [2/2]

const std::array< DriverPrimitive, JOYSTICK_PRIMITIVE_MAX > & kodi::addon::JoystickFeature::Primitives ( ) const
inline

◆ SetInvalid()

void kodi::addon::JoystickFeature::SetInvalid ( void  )
inline

◆ SetName()

void kodi::addon::JoystickFeature::SetName ( const std::string &  name)
inline

◆ SetPrimitive()

void kodi::addon::JoystickFeature::SetPrimitive ( JOYSTICK_FEATURE_PRIMITIVE  which,
const DriverPrimitive primitive 
)
inline

◆ SetType()

void kodi::addon::JoystickFeature::SetType ( JOYSTICK_FEATURE_TYPE  type)
inline

◆ ToStruct()

void kodi::addon::JoystickFeature::ToStruct ( JOYSTICK_FEATURE feature) const
inline

◆ Type()

JOYSTICK_FEATURE_TYPE kodi::addon::JoystickFeature::Type ( void  ) const
inline

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