Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches

Detailed Description

Base class for joystick driver primitives

A driver primitive can be:

  1. a button
  2. a hat direction
  3. a semiaxis (either the positive or negative half of an axis)
  4. a motor
  5. a keyboard key
  6. a mouse button
  7. a relative pointer direction

The type determines the fields in use:

Button:

Hat direction:

Semiaxis:

Motor:

Key:

Mouse button:

Relative pointer direction:

Function Documentation

◆ DriverPrimitive() [1/5]

DriverPrimitive ( void )
default

Construct an invalid driver primitive.

◆ CreateButton()

static DriverPrimitive CreateButton ( unsigned int buttonIndex)
inlinestatic

Construct a driver primitive representing a joystick button.

Parameters
[in]buttonIndexIndex
Returns
Created class

◆ DriverPrimitive() [2/5]

DriverPrimitive ( unsigned int hatIndex,
JOYSTICK_DRIVER_HAT_DIRECTION direction )
inline

Construct a driver primitive representing one of the four direction arrows on a dpad.

Parameters
[in]hatIndexHat index
[in]directionWith JOYSTICK_DRIVER_HAT_DIRECTION defined direction

◆ DriverPrimitive() [3/5]

DriverPrimitive ( unsigned int axisIndex,
int center,
JOYSTICK_DRIVER_SEMIAXIS_DIRECTION direction,
unsigned int range )
inline

Construct a driver primitive representing the positive or negative half of an axis.

Parameters
[in]axisIndexAxis index
[in]centerCenter
[in]directionWith JOYSTICK_DRIVER_HAT_DIRECTION defined direction
[in]rangeRange

◆ CreateMotor()

static DriverPrimitive CreateMotor ( unsigned int motorIndex)
inlinestatic

Construct a driver primitive representing a motor.

Parameters
[in]motorIndexMotor index number
Returns
Constructed driver primitive representing a motor

◆ DriverPrimitive() [4/5]

DriverPrimitive ( std::string keycode)
inline

Construct a driver primitive representing a key on a keyboard.

Parameters
[in]keycodeKeycode to use

◆ CreateMouseButton()

static DriverPrimitive CreateMouseButton ( JOYSTICK_DRIVER_MOUSE_INDEX buttonIndex)
inlinestatic

Construct a driver primitive representing a mouse button.

Parameters
[in]buttonIndexIndex
Returns
Constructed driver primitive representing a mouse button

◆ DriverPrimitive() [5/5]

Construct a driver primitive representing one of the four direction in which a relative pointer can move.

Parameters
[in]directionWith JOYSTICK_DRIVER_RELPOINTER_DIRECTION defined direction

◆ Type()

JOYSTICK_DRIVER_PRIMITIVE_TYPE Type ( void ) const
inline

Get type of primitive.

Returns
The with JOYSTICK_DRIVER_PRIMITIVE_TYPE defined type

◆ DriverIndex()

unsigned int DriverIndex ( void ) const
inline

Get driver index.

Returns
Index number

◆ HatDirection()

JOYSTICK_DRIVER_HAT_DIRECTION HatDirection ( void ) const
inline

Get hat direction.

Returns
The with JOYSTICK_DRIVER_HAT_DIRECTION defined direction

◆ Center()

int Center ( void ) const
inline

Get center.

Returns
Center

◆ SemiAxisDirection()

JOYSTICK_DRIVER_SEMIAXIS_DIRECTION SemiAxisDirection ( void ) const
inline

Get semi axis direction.

Returns
With JOYSTICK_DRIVER_SEMIAXIS_DIRECTION defined direction

◆ Range()

unsigned int Range ( void ) const
inline

Get range.

Returns
Range

◆ Keycode()

const std::string & Keycode ( void ) const
inline

Get key code as string.

Returns
Key code

◆ MouseIndex()

JOYSTICK_DRIVER_MOUSE_INDEX MouseIndex ( void ) const
inline

Get mouse index.

Returns
With JOYSTICK_DRIVER_MOUSE_INDEX defined mouse index

◆ RelPointerDirection()

JOYSTICK_DRIVER_RELPOINTER_DIRECTION RelPointerDirection ( void ) const
inline

Get relative pointer direction.

Returns
With JOYSTICK_DRIVER_RELPOINTER_DIRECTION defined direction

◆ operator==()

bool operator== ( const DriverPrimitive & other) const
inline

Compare this with another class of this type.

Parameters
[in]otherOther class to compare
Returns
True if they are equal, false otherwise