Joystick operations to handle control about.
More...
|
virtual PERIPHERAL_ERROR | kodi::addon::CInstancePeripheral::GetJoystickInfo (unsigned int index, kodi::addon::Joystick &info) |
| Get extended info about an attached joystick.
|
|
virtual PERIPHERAL_ERROR | kodi::addon::CInstancePeripheral::GetAppearance (const kodi::addon::Joystick &joystick, std::string &controllerId) |
| Get the ID of the controller that best represents the peripheral's appearance.
|
|
virtual PERIPHERAL_ERROR | kodi::addon::CInstancePeripheral::SetAppearance (const kodi::addon::Joystick &joystick, const std::string &controllerId) |
| Set the ID of the controller that best represents the peripheral's appearance.
|
|
virtual PERIPHERAL_ERROR | kodi::addon::CInstancePeripheral::GetFeatures (const kodi::addon::Joystick &joystick, const std::string &controller_id, std::vector< kodi::addon::JoystickFeature > &features) |
| Get the features that allow translating the joystick into the controller profile.
|
|
virtual PERIPHERAL_ERROR | kodi::addon::CInstancePeripheral::MapFeatures (const kodi::addon::Joystick &joystick, const std::string &controller_id, const std::vector< kodi::addon::JoystickFeature > &features) |
| Add or update joystick features.
|
|
virtual PERIPHERAL_ERROR | kodi::addon::CInstancePeripheral::GetIgnoredPrimitives (const kodi::addon::Joystick &joystick, std::vector< kodi::addon::DriverPrimitive > &primitives) |
| Get the driver primitives that should be ignored while mapping the device.
|
|
virtual PERIPHERAL_ERROR | kodi::addon::CInstancePeripheral::SetIgnoredPrimitives (const kodi::addon::Joystick &joystick, const std::vector< kodi::addon::DriverPrimitive > &primitives) |
| Set the list of driver primitives that are ignored for the device.
|
|
virtual void | kodi::addon::CInstancePeripheral::SaveButtonMap (const kodi::addon::Joystick &joystick) |
| Save the button map for the given joystick.
|
|
virtual void | kodi::addon::CInstancePeripheral::RevertButtonMap (const kodi::addon::Joystick &joystick) |
| Revert the button map to the last time it was loaded or committed to disk.
|
|
virtual void | kodi::addon::CInstancePeripheral::ResetButtonMap (const kodi::addon::Joystick &joystick, const std::string &controller_id) |
| Reset the button map for the given joystick and controller profile ID.
|
|
virtual void | kodi::addon::CInstancePeripheral::PowerOffJoystick (unsigned int index) |
| Powers off the given joystick if supported.
|
|
Joystick operations to handle control about.
Joystick parts in interface:
Copy this to your project and extend with your parts or leave functions complete away where not used or supported.
◆ GetAppearance()
Get the ID of the controller that best represents the peripheral's appearance.
- Parameters
-
[in] | joystick | The device's joystick properties; unknown values may be left at their default |
[out] | controllerId | The controller ID of the appearance, or empty if the appearance is unknown |
- Returns
- PERIPHERAL_NO_ERROR if successful
◆ GetFeatures()
Get the features that allow translating the joystick into the controller profile.
- Parameters
-
[in] | joystick | The device's joystick properties; unknown values may be left at their default |
[in] | controller_id | The controller profile being requested, e.g. game.controller.default |
[out] | features | The array of allocated features |
- Returns
- PERIPHERAL_NO_ERROR if successful
◆ GetIgnoredPrimitives()
Get the driver primitives that should be ignored while mapping the device.
- Parameters
-
[in] | joystick | The device's joystick properties; unknown values may be left at their default |
[out] | primitives | The array of allocated driver primitives to be ignored |
- Returns
- PERIPHERAL_NO_ERROR if successful
◆ GetJoystickInfo()
Get extended info about an attached joystick.
- Parameters
-
[in] | index | The joystick's driver index |
[out] | info | The container for the allocated joystick info |
- Returns
- PERIPHERAL_NO_ERROR if successful
@ingroup cpp_kodi_addon_peripheral_Defs_Joystick_Joystick
The following table contains values that can be set with class Joystick :
Further are following included:
◆ MapFeatures()
Add or update joystick features.
- Parameters
-
[in] | joystick | The device's joystick properties; unknown values may be left at their default |
[in] | controller_id | The game controller profile being updated |
[in] | features | The array of features |
- Returns
- PERIPHERAL_NO_ERROR if successful
◆ PowerOffJoystick()
virtual void kodi::addon::CInstancePeripheral::PowerOffJoystick |
( |
unsigned int | index | ) |
|
|
inlinevirtual |
Powers off the given joystick if supported.
- Parameters
-
[in] | index | The joystick's driver index |
◆ ResetButtonMap()
virtual void kodi::addon::CInstancePeripheral::ResetButtonMap |
( |
const kodi::addon::Joystick & | joystick, |
|
|
const std::string & | controller_id ) |
|
inlinevirtual |
Reset the button map for the given joystick and controller profile ID.
- Parameters
-
[in] | joystick | The device's joystick properties |
[in] | controller_id | The game controller profile being reset |
◆ RevertButtonMap()
Revert the button map to the last time it was loaded or committed to disk.
- Parameters
-
[in] | joystick | The device's joystick properties |
◆ SaveButtonMap()
Save the button map for the given joystick.
- Parameters
-
[in] | joystick | The device's joystick properties |
◆ SetAppearance()
Set the ID of the controller that best represents the peripheral's appearance.
- Parameters
-
[in] | joystick | The device's joystick properties; unknown values may be left at their default |
[in] | controllerId | The controller ID of the appearance |
- Returns
- PERIPHERAL_NO_ERROR if successful
◆ SetIgnoredPrimitives()
Set the list of driver primitives that are ignored for the device.
- Parameters
-
[in] | joystick | The device's joystick properties; unknown values may be left at their default |
[in] | primitives | The array of driver primitives to ignore |
- Returns
- PERIPHERAL_NO_ERROR if successful