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

#include <GUIDialogAxisDetection.h>

Inheritance diagram for KODI::GAME::CGUIDialogAxisDetection:
KODI::GAME::CGUIDialogButtonCapture KODI::JOYSTICK::IButtonMapper Observer CThread

Public Member Functions

 CGUIDialogAxisDetection ()=default
 
 ~CGUIDialogAxisDetection () override=default
 
bool AcceptsPrimitive (JOYSTICK::PRIMITIVE_TYPE type) const override
 Return true if the button mapper accepts primitives of the given type.
 
void OnLateAxis (const JOYSTICK::IButtonMap *buttonMap, unsigned int axisIndex) override
 Called when an axis has been detected after mapping began.
 
- Public Member Functions inherited from KODI::GAME::CGUIDialogButtonCapture
 CGUIDialogButtonCapture ()
 
 ~CGUIDialogButtonCapture () override=default
 
std::string ControllerID () const override
 The add-on ID of the game controller associated with this button mapper.
 
bool NeedsCooldown () const override
 Return true if the button mapper wants a cooldown between button mapping commands.
 
bool MapPrimitive (JOYSTICK::IButtonMap *buttonMap, KEYMAP::IKeymap *keymap, const JOYSTICK::CDriverPrimitive &primitive) override
 Handle button/hat press or axis threshold.
 
void OnEventFrame (const JOYSTICK::IButtonMap *buttonMap, bool bMotion) override
 Called once per event frame to notify the implementation of motion status.
 
void OnLateAxis (const JOYSTICK::IButtonMap *buttonMap, unsigned int axisIndex) override
 Called when an axis has been detected after mapping began.
 
void Notify (const Observable &obs, const ObservableMessage msg) override
 Process a message from an observable.
 
void Show ()
 Show the dialog.
 
- Public Member Functions inherited from KODI::JOYSTICK::IButtonMapper
 IButtonMapper ()=default
 
virtual ~IButtonMapper ()=default
 
void SetButtonMapCallback (const std::string &deviceLocation, IButtonMapCallback *callback)
 
void ResetButtonMapCallbacks (void)
 
std::map< std::string, IButtonMapCallback * > & ButtonMapCallbacks (void)
 
- Public Member Functions inherited from Observer
 Observer ()=default
 
virtual ~Observer ()=default
 

Protected Member Functions

std::string GetDialogText () override
 
std::string GetDialogHeader () override
 
bool MapPrimitiveInternal (JOYSTICK::IButtonMap *buttonMap, KEYMAP::IKeymap *keymap, const JOYSTICK::CDriverPrimitive &primitive) override
 
void OnClose (bool bAccepted) override
 
- Protected Member Functions inherited from KODI::GAME::CGUIDialogButtonCapture
void Process () override
 
- Protected Member Functions inherited from CThread
 CThread (const char *ThreadName)
 
virtual void OnStartup ()
 
virtual void OnExit ()
 
WaitResponse AbortableWait (CEvent &event, std::chrono::milliseconds duration=std::chrono::milliseconds(-1))
 
 CThread (IRunnable *pRunnable, const char *ThreadName)
 
virtual ~CThread ()
 
void Create (bool bAutoDelete=false)
 
template<typename Rep , typename Period >
void Sleep (std::chrono::duration< Rep, Period > duration)
 
bool IsAutoDelete () const
 
virtual void StopThread (bool bWait=true)
 
bool IsRunning () const
 
bool IsCurrentThread () const
 
bool Join (std::chrono::milliseconds duration)
 
bool SetPriority (const ThreadPriority &priority)
 Set the threads priority. This uses the platforms native threading library to do so.
 
virtual void OnException ()
 

Additional Inherited Members

- Protected Types inherited from CThread
enum  WaitResponse { WAIT_INTERRUPTED = -1 , WAIT_SIGNALED = 0 , WAIT_TIMEDOUT = 1 }
 
- Static Protected Member Functions inherited from CThread
static const std::thread::id GetCurrentThreadId ()
 
static CThreadGetCurrentThread ()
 
- Protected Attributes inherited from KODI::GAME::CGUIDialogButtonCapture
CEvent m_captureEvent
 
- Protected Attributes inherited from CThread
std::atomic< boolm_bStop
 

Constructor & Destructor Documentation

◆ CGUIDialogAxisDetection()

KODI::GAME::CGUIDialogAxisDetection::CGUIDialogAxisDetection ( )
default

◆ ~CGUIDialogAxisDetection()

KODI::GAME::CGUIDialogAxisDetection::~CGUIDialogAxisDetection ( )
overridedefault

Member Function Documentation

◆ AcceptsPrimitive()

bool CGUIDialogAxisDetection::AcceptsPrimitive ( JOYSTICK::PRIMITIVE_TYPE type) const
overridevirtual

Return true if the button mapper accepts primitives of the given type.

Parameters
typeThe primitive type
Returns
True if the button mapper can map the primitive type, false otherwise

Implements KODI::JOYSTICK::IButtonMapper.

◆ GetDialogHeader()

std::string CGUIDialogAxisDetection::GetDialogHeader ( )
overrideprotectedvirtual

◆ GetDialogText()

std::string CGUIDialogAxisDetection::GetDialogText ( )
overrideprotectedvirtual

◆ MapPrimitiveInternal()

bool CGUIDialogAxisDetection::MapPrimitiveInternal ( JOYSTICK::IButtonMap * buttonMap,
KEYMAP::IKeymap * keymap,
const JOYSTICK::CDriverPrimitive & primitive )
overrideprotectedvirtual

◆ OnClose()

void KODI::GAME::CGUIDialogAxisDetection::OnClose ( bool bAccepted)
inlineoverrideprotectedvirtual

◆ OnLateAxis()

void CGUIDialogAxisDetection::OnLateAxis ( const JOYSTICK::IButtonMap * buttonMap,
unsigned int axisIndex )
overridevirtual

Called when an axis has been detected after mapping began.

Parameters
axisIndexThe index of the axis being discovered

Some joystick drivers don't report an initial value for analog axes.

Called in the same thread as IButtonMapper::MapPrimitive.

Implements KODI::JOYSTICK::IButtonMapper.


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