Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches

#include <PeripheralUtils.h>

Public Member Functions

 DriverPrimitive (void)=default
 Construct an invalid driver primitive.
 
 DriverPrimitive (unsigned int hatIndex, JOYSTICK_DRIVER_HAT_DIRECTION direction)
 Construct a driver primitive representing one of the four direction arrows on a dpad.
 
 DriverPrimitive (unsigned int axisIndex, int center, JOYSTICK_DRIVER_SEMIAXIS_DIRECTION direction, unsigned int range)
 Construct a driver primitive representing the positive or negative half of an axis.
 
 DriverPrimitive (std::string keycode)
 Construct a driver primitive representing a key on a keyboard.
 
 DriverPrimitive (JOYSTICK_DRIVER_RELPOINTER_DIRECTION direction)
 Construct a driver primitive representing one of the four direction in which a relative pointer can move.
 
JOYSTICK_DRIVER_PRIMITIVE_TYPE Type (void) const
 Get type of primitive.
 
unsigned int DriverIndex (void) const
 Get driver index.
 
JOYSTICK_DRIVER_HAT_DIRECTION HatDirection (void) const
 Get hat direction.
 
int Center (void) const
 Get center.
 
JOYSTICK_DRIVER_SEMIAXIS_DIRECTION SemiAxisDirection (void) const
 Get semi axis direction.
 
unsigned int Range (void) const
 Get range.
 
const std::string & Keycode (void) const
 Get key code as string.
 
JOYSTICK_DRIVER_MOUSE_INDEX MouseIndex (void) const
 Get mouse index.
 
JOYSTICK_DRIVER_RELPOINTER_DIRECTION RelPointerDirection (void) const
 Get relative pointer direction.
 
bool operator== (const DriverPrimitive &other) const
 Compare this with another class of this type.
 
 DriverPrimitive (const JOYSTICK_DRIVER_PRIMITIVE &primitive)
 
void ToStruct (JOYSTICK_DRIVER_PRIMITIVE &driver_primitive) const
 

Static Public Member Functions

static DriverPrimitive CreateButton (unsigned int buttonIndex)
 Construct a driver primitive representing a joystick button.
 
static DriverPrimitive CreateMotor (unsigned int motorIndex)
 Construct a driver primitive representing a motor.
 
static DriverPrimitive CreateMouseButton (JOYSTICK_DRIVER_MOUSE_INDEX buttonIndex)
 Construct a driver primitive representing a mouse button.
 
static void FreeStruct (JOYSTICK_DRIVER_PRIMITIVE &primitive)
 

Protected Member Functions

 DriverPrimitive (JOYSTICK_DRIVER_PRIMITIVE_TYPE type, unsigned int driverIndex)
 Construct a driver primitive of the specified type.
 

Constructor & Destructor Documentation

◆ DriverPrimitive() [1/2]

kodi::addon::DriverPrimitive::DriverPrimitive ( JOYSTICK_DRIVER_PRIMITIVE_TYPE type,
unsigned int driverIndex )
inlineprotected

Construct a driver primitive of the specified type.

◆ DriverPrimitive() [2/2]

kodi::addon::DriverPrimitive::DriverPrimitive ( const JOYSTICK_DRIVER_PRIMITIVE & primitive)
inlineexplicit

Member Function Documentation

◆ FreeStruct()

static void kodi::addon::DriverPrimitive::FreeStruct ( JOYSTICK_DRIVER_PRIMITIVE & primitive)
inlinestatic

◆ ToStruct()

void kodi::addon::DriverPrimitive::ToStruct ( JOYSTICK_DRIVER_PRIMITIVE & driver_primitive) const
inline

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