Guiliani  Version 2.6 revision 7293 (documentation build 12)
CGUIInputMedia Class Reference

#include <GUIInputMedia.h>

Inheritance diagram for CGUIInputMedia:

Public Types

enum  AcquisitionType_t { Polling , Callback }
 how events are collected
 
enum  Rotation_t { ROTATION_0 , ROTATION_90 , ROTATION_180 , ROTATION_270 }
 rotation of input-device
 

Public Member Functions

void AddEvent (CGUIEvent *pkEvent)
 
eC_Bool GetDebugMode () const
 
CGUIEventGetEvent (eC_UInt uiIdleTime)
 
eC_UInt GetMaxEventThreshold () const
 
eC_UInt GetMinEventThreshold () const
 
virtual eC_Bool GetMulitpleTouches () const
 
virtual void GetOffset (eC_Int &riOffsetX, eC_Int &riOffsetY) const
 
Rotation_t GetRotation () const
 
virtual void GetSize (eC_Int &riSizeX, eC_Int &riSizeY) const
 
eC_UInt GetSleepInterval () const
 
virtual void PollEvent ()
 
CGUIEventRetrieveEvent ()
 
void SetDebugMode (const eC_Bool &bDebugMode)
 
void SetMaxEventThreshold (const eC_UInt &uiMaxEventThreshold)
 
void SetMinEventThreshold (const eC_UInt &uiMinEventThreshold)
 
virtual void SetMultipleTouches (const eC_Bool &bMultipleTouches)
 
virtual void SetOffset (const eC_Int &iOffsetX, const eC_Int &iOffsetY)
 
void SetRotation (const Rotation_t &eRotation)
 
virtual void SetSize (const eC_Int &iSizeX, const eC_Int &iSizeY)
 
void SetSleepInterval (const eC_UInt &uiInterval)
 
virtual void StopIdle ()
 

Static Public Member Functions

static void DeleteInstance ()
 

Protected Member Functions

 CGUIInputMedia (const eC_Bool &bQueuedEvents=false, const AcquisitionType_t &eType=Polling)
 
virtual ~CGUIInputMedia ()
 

Protected Attributes

eC_Bool m_bDebugMode
 debug-mode for input-device
 
eC_Bool m_bMultipleTouches
 supports multiple touches
 
eC_Bool m_bStopIdle
 stop idle when waiting for events
 
Rotation_t m_eRotation
 current rotation used for input-device
 
eC_Int m_iOffsetX
 x-offset
 
eC_Int m_iOffsetY
 y-offset
 
eC_Int m_iSizeX
 width
 
eC_Int m_iSizeY
 height
 
eC_UInt m_uiIdleTime
 maximum time to spend
 
eC_UInt m_uiSleepInterval
 sleep interval
 

Friends

class CGUIComponentManager
 

Detailed Description

Base-class for all input devices that are attachable to the GUI.

See also
Porting User Input for Guiliani

Constructor & Destructor Documentation

◆ CGUIInputMedia()

CGUIInputMedia::CGUIInputMedia ( const eC_Bool &  bQueuedEvents = false,
const AcquisitionType_t eType = Polling 
)
protected

constructor

Parameters
bQueuedEventsif true an internal list will be used to save events, otherwise only the last acquired event will be saved
eTypeacquisition type can be POLLING or CALLBACK

◆ ~CGUIInputMedia()

virtual CGUIInputMedia::~CGUIInputMedia ( )
protectedvirtual

destructor

Member Function Documentation

◆ AddEvent()

void CGUIInputMedia::AddEvent ( CGUIEvent pkEvent)

add a new event into the queue (if used)

Parameters
pkEventevent

◆ DeleteInstance()

static void CGUIInputMedia::DeleteInstance ( )
static

Delete Instance

◆ GetDebugMode()

eC_Bool CGUIInputMedia::GetDebugMode ( ) const

Return if debug-mode for input-device is active

Returns
true if active

◆ GetEvent()

CGUIEvent * CGUIInputMedia::GetEvent ( eC_UInt  uiIdleTime)

Retrieves a platform-specific event and creates an appropriate Guiliani event. The supplied parameter specifies the time in milliseconds until the next processing of animation timers or commands is required. An input media may use this to avoid unnecessary event polling. It MUST return from GetEvent after the specified time, though.

Parameters
uiIdleTimespecifies the maximum idle time in ms.
Returns
Pointer to a newly generated Guiliani event, or NULL if nothing happened.

◆ GetMaxEventThreshold()

eC_UInt CGUIInputMedia::GetMaxEventThreshold ( ) const

get the maximum number of events

Returns
maximum number of events

◆ GetMinEventThreshold()

eC_UInt CGUIInputMedia::GetMinEventThreshold ( ) const

get the minimum number of events

Returns
minimum number of events

◆ GetMulitpleTouches()

virtual eC_Bool CGUIInputMedia::GetMulitpleTouches ( ) const
virtual

get if multiple touches supported

Returns
true if multiple touches supported

Reimplemented in CGUIPlaybackInput.

◆ GetOffset()

virtual void CGUIInputMedia::GetOffset ( eC_Int &  riOffsetX,
eC_Int &  riOffsetY 
) const
virtual

get the offset of the input-device

Parameters
riOffsetXx-offset
riOffsetYy-offset

Reimplemented in CGUIPlaybackInput.

◆ GetRotation()

Rotation_t CGUIInputMedia::GetRotation ( ) const

Get the rotation of the input-device

Returns
rotation

◆ GetSize()

virtual void CGUIInputMedia::GetSize ( eC_Int &  riSizeX,
eC_Int &  riSizeY 
) const
virtual

get the size of the input-device

Parameters
riSizeXwidth
riSizeYheight

Reimplemented in CGUIPlaybackInput.

◆ GetSleepInterval()

eC_UInt CGUIInputMedia::GetSleepInterval ( ) const

get the current sleep-interval

Returns
interval

◆ PollEvent()

virtual void CGUIInputMedia::PollEvent ( )
inlinevirtual

this method will be called if the input device uses polling to receive events

Reimplemented in CGUIPlaybackInput, CGUIScriptedInput, CGUIInputDirectFb, CGUIInputDeviceUnix, CGUIInputDeviceUnix_Powermate, CGUIInputUnixMouse, CGUIInputWayland, CGUIInputSDL, CGUIInputSDL2, and CGUIInputWindows.

◆ RetrieveEvent()

CGUIEvent * CGUIInputMedia::RetrieveEvent ( )

retrieve and remove an event from the queue (if used)

Returns
event

◆ SetDebugMode()

void CGUIInputMedia::SetDebugMode ( const eC_Bool &  bDebugMode)

Activates debug-mode for input-device Will output messages for every input and can be used for calibrating input-device

Parameters
bDebugModetrue for active debug-mode

◆ SetMaxEventThreshold()

void CGUIInputMedia::SetMaxEventThreshold ( const eC_UInt &  uiMaxEventThreshold)

set the maximum number of events in the list before events are dropped

Parameters
uiMaxEventThreshold

◆ SetMinEventThreshold()

void CGUIInputMedia::SetMinEventThreshold ( const eC_UInt &  uiMinEventThreshold)

set the minimum number of events in the list before event dropping is disabled

Parameters
uiMinEventThreshold

◆ SetMultipleTouches()

virtual void CGUIInputMedia::SetMultipleTouches ( const eC_Bool &  bMultipleTouches)
virtual

set multiple touches supported

Parameters
bMultipleTouches

◆ SetOffset()

virtual void CGUIInputMedia::SetOffset ( const eC_Int &  iOffsetX,
const eC_Int &  iOffsetY 
)
virtual

set the offset for the input-device

Parameters
iOffsetXx-offset
iOffsetYy-offset

Reimplemented in CGUIPlaybackInput, and CGUIInputDeviceUnix.

◆ SetRotation()

void CGUIInputMedia::SetRotation ( const Rotation_t eRotation)

Set the rotation of the input-device

Parameters
eRotation

◆ SetSize()

virtual void CGUIInputMedia::SetSize ( const eC_Int &  iSizeX,
const eC_Int &  iSizeY 
)
virtual

set the size for the input-device if negative values are used the axis is inverted

Parameters
iSizeXwidth
iSizeYheight

Reimplemented in CGUIPlaybackInput, CGUIInputDeviceUnix, and CGUIInputUnixMouse.

◆ SetSleepInterval()

void CGUIInputMedia::SetSleepInterval ( const eC_UInt &  uiInterval)

set the interval used for internal sleep

Parameters
uiInterval

◆ StopIdle()

virtual void CGUIInputMedia::StopIdle ( )
virtual

Forces the input media to quit idling immediately. Called by the framework if the input media is requested to stop idling immediately. Classes derived from GUIInputMedia should implement StopIdle in such a way, that it interrupts any idling/sleeping code in GetEvent(). virtual is needed if sub-classes need to do extra stuff

Reimplemented in CGUINullInput, CGUIPlaybackInput, CGUIScriptedInput, CGUIInputDirectFb, CGUIInputDeviceUnix, CGUIInputDeviceUnix_Powermate, CGUIInputUnixMouse, CGUIInputWayland, CGUIInputSDL, CGUIInputSDL2, and CGUIInputWindows.

Friends And Related Function Documentation

◆ CGUIComponentManager

friend class CGUIComponentManager
friend

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