Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
No Matches
KODI::GAME::CControllerActivity Class Reference

Class to hold state about the current activity of a controller. More...

#include <ControllerActivity.h>

Public Member Functions

 CControllerActivity ()=default
 ~CControllerActivity ()=default
float GetActivation () const
void ClearButtonState ()
void OnButtonPress (bool pressed)
void OnButtonMotion (float magnitude)
void OnAnalogStickMotion (float x, float y)
void OnWheelMotion (float position)
void OnThrottleMotion (float position)
void OnKeyPress (const KEYBOARD::KeyName &key)
void OnKeyRelease (const KEYBOARD::KeyName &key)
void OnMouseMotion (const MOUSE::PointerName &relpointer, int differenceX, int differenceY)
void OnMouseButtonPress (const MOUSE::ButtonName &button)
void OnMouseButtonRelease (const MOUSE::ButtonName &button)
void OnInputFrame ()

Detailed Description

Class to hold state about the current activity of a controller.

The state is held as a single float value, which is updated by the various On*() methods. The activity is the maximum value on a single input frame. The value is saved to m_lastActivity on each call to OnInputFrame().

Constructor & Destructor Documentation

◆ CControllerActivity()

KODI::GAME::CControllerActivity::CControllerActivity ( )

◆ ~CControllerActivity()

KODI::GAME::CControllerActivity::~CControllerActivity ( )

Member Function Documentation

◆ ClearButtonState()

void CControllerActivity::ClearButtonState ( )

◆ GetActivation()

float KODI::GAME::CControllerActivity::GetActivation ( ) const

◆ OnAnalogStickMotion()

void CControllerActivity::OnAnalogStickMotion ( float x,
float y )

◆ OnButtonMotion()

void CControllerActivity::OnButtonMotion ( float magnitude)

◆ OnButtonPress()

void CControllerActivity::OnButtonPress ( bool pressed)

◆ OnInputFrame()

void CControllerActivity::OnInputFrame ( )

◆ OnKeyPress()

void CControllerActivity::OnKeyPress ( const KEYBOARD::KeyName & key)

◆ OnKeyRelease()

void CControllerActivity::OnKeyRelease ( const KEYBOARD::KeyName & key)

◆ OnMouseButtonPress()

void CControllerActivity::OnMouseButtonPress ( const MOUSE::ButtonName & button)

◆ OnMouseButtonRelease()

void CControllerActivity::OnMouseButtonRelease ( const MOUSE::ButtonName & button)

◆ OnMouseMotion()

void CControllerActivity::OnMouseMotion ( const MOUSE::PointerName & relpointer,
int differenceX,
int differenceY )
Fix mouse pointer handling
Handle multiple pointers

◆ OnThrottleMotion()

void CControllerActivity::OnThrottleMotion ( float position)

◆ OnWheelMotion()

void CControllerActivity::OnWheelMotion ( float position)

The documentation for this class was generated from the following files: