Base class for joystick driver primitives
More...
Base class for joystick driver primitives
A driver primitive can be:
- a button
- a hat direction
- a semiaxis (either the positive or negative half of an axis)
- a motor
- a keyboard key
- a mouse button
- a relative pointer direction
The type determines the fields in use:
Button:
Hat direction:
- driver index
- hat direction
Semiaxis:
- driver index
- center
- semiaxis direction
- range
Motor:
Key:
Mouse button:
Relative pointer direction:
- relative pointer direction
◆ Center()
int kodi::addon::DriverPrimitive::Center |
( |
void | | ) |
const |
|
inline |
Get center.
- Returns
- Center
◆ CreateButton()
static DriverPrimitive kodi::addon::DriverPrimitive::CreateButton |
( |
unsigned int | buttonIndex | ) |
|
|
inlinestatic |
Construct a driver primitive representing a joystick button.
- Parameters
-
- Returns
- Created class
◆ CreateMotor()
static DriverPrimitive kodi::addon::DriverPrimitive::CreateMotor |
( |
unsigned int | motorIndex | ) |
|
|
inlinestatic |
Construct a driver primitive representing a motor.
- Parameters
-
[in] | motorIndex | Motor index number |
- Returns
- Constructed driver primitive representing a motor
◆ CreateMouseButton()
Construct a driver primitive representing a mouse button.
- Parameters
-
- Returns
- Constructed driver primitive representing a mouse button
◆ DriverIndex()
unsigned int kodi::addon::DriverPrimitive::DriverIndex |
( |
void | | ) |
const |
|
inline |
Get driver index.
- Returns
- Index number
◆ DriverPrimitive() [1/5]
Construct a driver primitive representing one of the four direction in which a relative pointer can move.
- Parameters
-
◆ DriverPrimitive() [2/5]
kodi::addon::DriverPrimitive::DriverPrimitive |
( |
std::string | keycode | ) |
|
|
inline |
Construct a driver primitive representing a key on a keyboard.
- Parameters
-
[in] | keycode | Keycode to use |
◆ DriverPrimitive() [3/5]
Construct a driver primitive representing the positive or negative half of an axis.
- Parameters
-
◆ DriverPrimitive() [4/5]
Construct a driver primitive representing one of the four direction arrows on a dpad.
- Parameters
-
◆ DriverPrimitive() [5/5]
kodi::addon::DriverPrimitive::DriverPrimitive |
( |
void | | ) |
|
|
default |
Construct an invalid driver primitive.
◆ HatDirection()
◆ Keycode()
const std::string & kodi::addon::DriverPrimitive::Keycode |
( |
void | | ) |
const |
|
inline |
Get key code as string.
- Returns
- Key code
◆ MouseIndex()
◆ operator==()
Compare this with another class of this type.
- Parameters
-
[in] | other | Other class to compare |
- Returns
- True if they are equal, false otherwise
◆ Range()
unsigned int kodi::addon::DriverPrimitive::Range |
( |
void | | ) |
const |
|
inline |
◆ RelPointerDirection()
◆ SemiAxisDirection()
◆ Type()