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

Reads input of the touchscreen, keyboard and remote. More...

#include <GUIInputDeviceUnix.h>

Inheritance diagram for CGUIInputDeviceUnix:

Public Member Functions

eC_TListDoubleLinked< CGUIEvent * > & GetEventQueue ()
 
pthread_cond_t * GetInputEventCond ()
 
void LockSemaphore ()
 
virtual void PollEvent ()
 
virtual void SetOffset (const eC_Int &iOffsetX, const eC_Int &iOffsetY)
 
virtual void SetSize (const eC_Int &iSizeX, const eC_Int &iSizeY)
 
virtual void StopIdle ()
 
void UnlockSemaphore ()
 
- Public Member Functions inherited from CGUIInputMedia
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 CreateInstance (const char *pcKeyboardDevice, const char *pcTouchscreenDevice, const char *pcRemoteDevice, const eC_Int &iTouchScreenX=0, const eC_Int &iTouchScreenY=0, const eC_Int &iTouchscreenWidth=0, const eC_Int &iTouchscreenHeight=0, const eC_Int &iTSFilterDelta=10)
 
- Static Public Member Functions inherited from CGUIInputMedia
static void DeleteInstance ()
 

Protected Member Functions

 CGUIInputDeviceUnix (const char *pcKeyboardDevice, const char *pcTouchscreenDevice, const char *pcRemoteDevice, const eC_Int &iTouchscreenFilterDelta)
 
- Protected Member Functions inherited from CGUIInputMedia
 CGUIInputMedia (const eC_Bool &bQueuedEvents=false, const AcquisitionType_t &eType=Polling)
 
virtual ~CGUIInputMedia ()
 

Additional Inherited Members

- Public Types inherited from CGUIInputMedia
enum  AcquisitionType_t { Polling , Callback }
 how events are collected
 
enum  Rotation_t { ROTATION_0 , ROTATION_90 , ROTATION_180 , ROTATION_270 }
 rotation of input-device
 
- Protected Attributes inherited from CGUIInputMedia
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
 

Detailed Description

Reads input of the touchscreen, keyboard and remote.

This input wrapper starts a thread (CGUIInputThreadDeviceUnix) which reads input of the touchscreen, keyboard and remote GUIEvents are created and added to an event queue. The input wrapper reads those events from the queue to handle them.

Constructor & Destructor Documentation

◆ CGUIInputDeviceUnix()

CGUIInputDeviceUnix::CGUIInputDeviceUnix ( const char *  pcKeyboardDevice,
const char *  pcTouchscreenDevice,
const char *  pcRemoteDevice,
const eC_Int &  iTouchscreenFilterDelta 
)
protected

constructor

Parameters
pcKeyboardDevice
pcTouchscreenDevice
pcRemoteDevice
iTouchscreenFilterDelta

Member Function Documentation

◆ CreateInstance()

static void CGUIInputDeviceUnix::CreateInstance ( const char *  pcKeyboardDevice,
const char *  pcTouchscreenDevice,
const char *  pcRemoteDevice,
const eC_Int &  iTouchScreenX = 0,
const eC_Int &  iTouchScreenY = 0,
const eC_Int &  iTouchscreenWidth = 0,
const eC_Int &  iTouchscreenHeight = 0,
const eC_Int &  iTSFilterDelta = 10 
)
static

Creates the singleton instance.

Parameters
pcKeyboardDevicePath to keyboard input device. If NULL device will not be used.
pcTouchscreenDevicePath to touchscreen input device. If NULL device will not be used.
pcRemoteDevicePath to remote control input device. If NULL device will not be used.
iTouchScreenXValue moves the touch event in X direction (value in touchscreen pixel
See also
iTouchScreenWidth,
iTouchScreenHeight).
Parameters
iTouchScreenYValue moves the touch event in Y direction (value in touchscreen pixel
See also
iTouchScreenWidth,
iTouchScreenHeight).
Parameters
iTouchscreenWidthMaximum x value returned by touchscreen device. If not set screen width will be used instead. Use a negative value to invert the touchscreen X-axis.
iTouchscreenHeightMaximum y value returned by touchscreen device. If not set screen height will be used instead. Use a negative value to invert the touchscreen Y-axis.
iTSFilterDeltaNumber of pixel of a mouse drag that need to be exceeded before an event is generated.

◆ GetEventQueue()

eC_TListDoubleLinked< CGUIEvent * > & CGUIInputDeviceUnix::GetEventQueue ( )

get the event queue

Returns
queue

◆ GetInputEventCond()

pthread_cond_t * CGUIInputDeviceUnix::GetInputEventCond ( )

get the condition variable

Returns
condition

◆ LockSemaphore()

void CGUIInputDeviceUnix::LockSemaphore ( )

lock the semaphore

◆ PollEvent()

virtual void CGUIInputDeviceUnix::PollEvent ( )
virtual

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

Reimplemented from CGUIInputMedia.

◆ SetOffset()

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

set the offset for the input-device

Parameters
iOffsetXx-offset
iOffsetYy-offset

Reimplemented from CGUIInputMedia.

◆ SetSize()

virtual void CGUIInputDeviceUnix::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 from CGUIInputMedia.

◆ StopIdle()

virtual void CGUIInputDeviceUnix::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 from CGUIInputMedia.

◆ UnlockSemaphore()

void CGUIInputDeviceUnix::UnlockSemaphore ( )

unlock the semaphore


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