Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include <GameClientInput.h>
Public Types | |
using | PortAddress = std::string |
using | JoystickMap = std::map<PortAddress, std::shared_ptr<CGameClientJoystick>> |
Public Member Functions | |
CGameClientInput (CGameClient &gameClient, AddonInstance_Game &addonStruct, CCriticalSection &clientAccess) | |
~CGameClientInput () override | |
void | Initialize () |
void | Deinitialize () |
void | Start (IGameInputCallback *input) |
void | Stop () |
bool | HasFeature (const std::string &controllerId, const std::string &featureName) const |
bool | AcceptsInput () const |
bool | InputEvent (const game_input_event &event) |
float | GetPortActivation (const std::string &portAddress) |
const CControllerTree & | GetDefaultControllerTree () const |
CControllerTree | GetActiveControllerTree () const |
bool | SupportsKeyboard () const |
bool | SupportsMouse () const |
int | GetPlayerLimit () const |
bool | ConnectController (const std::string &portAddress, const ControllerPtr &controller) |
bool | DisconnectController (const std::string &portAddress) |
void | SavePorts () |
void | ResetPorts () |
const JoystickMap & | GetJoystickMap () const |
void | CloseJoysticks (PERIPHERALS::EventLockHandlePtr &inputHandlingLock) |
bool | OpenKeyboard (const ControllerPtr &controller, const PERIPHERALS::PeripheralPtr &keyboard) |
bool | IsKeyboardOpen () const |
void | CloseKeyboard () |
bool | OpenMouse (const ControllerPtr &controller, const PERIPHERALS::PeripheralPtr &mouse) |
bool | IsMouseOpen () const |
void | CloseMouse () |
bool | HasAgent () const |
void | HardwareReset () |
bool | ReceiveInputEvent (const game_input_event &eventStruct) |
Public Member Functions inherited from Observable | |
Observable ()=default | |
virtual | ~Observable ()=default |
Observable & | operator= (const Observable &observable) |
virtual void | RegisterObserver (Observer *obs) |
Register an observer. | |
virtual void | UnregisterObserver (Observer *obs) |
Unregister an observer. | |
virtual void | NotifyObservers (const ObservableMessage message=ObservableMessageNone) |
Send a message to all observers when m_bObservableChanged is true. | |
virtual void | SetChanged (bool bSetTo=true) |
Mark an observable changed. | |
virtual bool | IsObserving (const Observer &obs) const |
Check whether this observable is being observed by an observer. | |
Additional Inherited Members | |
Protected Member Functions inherited from KODI::GAME::CGameClientSubsystem | |
CGameClientSubsystem (CGameClient &gameClient, AddonInstance_Game &addonStruct, CCriticalSection &clientAccess) | |
virtual | ~CGameClientSubsystem () |
CGameClientCheevos & | Cheevos () const |
CGameClientInput & | Input () const |
CGameClientProperties & | AddonProperties () const |
CGameClientStreams & | Streams () const |
Protected Member Functions inherited from Observable | |
void | SendMessage (const ObservableMessage message) |
Send a message to all observer when m_bObservableChanged is true. | |
Observable ()=default | |
virtual | ~Observable ()=default |
Observable & | operator= (const Observable &observable) |
virtual void | RegisterObserver (Observer *obs) |
Register an observer. | |
virtual void | UnregisterObserver (Observer *obs) |
Unregister an observer. | |
virtual void | NotifyObservers (const ObservableMessage message=ObservableMessageNone) |
Send a message to all observers when m_bObservableChanged is true. | |
virtual void | SetChanged (bool bSetTo=true) |
Mark an observable changed. | |
virtual bool | IsObserving (const Observer &obs) const |
Check whether this observable is being observed by an observer. | |
Static Protected Member Functions inherited from KODI::GAME::CGameClientSubsystem | |
static GameClientSubsystems | CreateSubsystems (CGameClient &gameClient, AddonInstance_Game &gameStruct, CCriticalSection &clientAccess) |
Create a struct with the allocated subsystems. | |
static void | DestroySubsystems (GameClientSubsystems &subsystems) |
Deallocate subsystems. | |
Protected Attributes inherited from KODI::GAME::CGameClientSubsystem | |
CGameClient & | m_gameClient |
AddonInstance_Game & | m_struct |
CCriticalSection & | m_clientAccess |
Protected Attributes inherited from Observable | |
std::atomic< bool > | m_bObservableChanged {false} |
std::vector< Observer * > | m_observers |
CCriticalSection | m_obsCritSection |
using KODI::GAME::CGameClientInput::JoystickMap = std::map<PortAddress, std::shared_ptr<CGameClientJoystick>> |
using KODI::GAME::CGameClientInput::PortAddress = std::string |
CGameClientInput::CGameClientInput | ( | CGameClient & | gameClient, |
AddonInstance_Game & | addonStruct, | ||
CCriticalSection & | clientAccess ) |
|
override |
bool CGameClientInput::AcceptsInput | ( | ) | const |
void CGameClientInput::CloseJoysticks | ( | PERIPHERALS::EventLockHandlePtr & | inputHandlingLock | ) |
void CGameClientInput::CloseKeyboard | ( | ) |
void CGameClientInput::CloseMouse | ( | ) |
bool CGameClientInput::ConnectController | ( | const std::string & | portAddress, |
const ControllerPtr & | controller ) |
void CGameClientInput::Deinitialize | ( | ) |
bool CGameClientInput::DisconnectController | ( | const std::string & | portAddress | ) |
CControllerTree CGameClientInput::GetActiveControllerTree | ( | ) | const |
const CControllerTree & CGameClientInput::GetDefaultControllerTree | ( | ) | const |
|
inline |
int CGameClientInput::GetPlayerLimit | ( | ) | const |
float CGameClientInput::GetPortActivation | ( | const std::string & | portAddress | ) |
void CGameClientInput::HardwareReset | ( | ) |
bool CGameClientInput::HasAgent | ( | ) | const |
bool CGameClientInput::HasFeature | ( | const std::string & | controllerId, |
const std::string & | featureName ) const |
void CGameClientInput::Initialize | ( | ) |
bool CGameClientInput::InputEvent | ( | const game_input_event & | event | ) |
bool CGameClientInput::IsKeyboardOpen | ( | ) | const |
bool CGameClientInput::IsMouseOpen | ( | ) | const |
bool CGameClientInput::OpenKeyboard | ( | const ControllerPtr & | controller, |
const PERIPHERALS::PeripheralPtr & | keyboard ) |
bool CGameClientInput::OpenMouse | ( | const ControllerPtr & | controller, |
const PERIPHERALS::PeripheralPtr & | mouse ) |
bool CGameClientInput::ReceiveInputEvent | ( | const game_input_event & | eventStruct | ) |
void CGameClientInput::ResetPorts | ( | ) |
void CGameClientInput::SavePorts | ( | ) |
void CGameClientInput::Start | ( | IGameInputCallback * | input | ) |
void CGameClientInput::Stop | ( | ) |
bool CGameClientInput::SupportsKeyboard | ( | ) | const |
bool CGameClientInput::SupportsMouse | ( | ) | const |