Reads input of the touchscreen, keyboard and remote.
More...
#include <GUIInputDeviceUnix.h>
|
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 void | DeleteInstance () |
|
|
enum | Rotation_t { ROTATION_0
, ROTATION_90
, ROTATION_180
, ROTATION_270
} |
| rotation of input-device
|
|
eC_Bool | m_bDebugMode |
| debug-mode for input-device
|
|
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_uiSleepInterval |
| sleep interval
|
|
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.
◆ CGUIInputDeviceUnix()
CGUIInputDeviceUnix::CGUIInputDeviceUnix |
( |
const char * |
pcKeyboardDevice, |
|
|
const char * |
pcTouchscreenDevice, |
|
|
const char * |
pcRemoteDevice, |
|
|
const eC_Int & |
iTouchscreenFilterDelta |
|
) |
| |
|
protected |
constructor
- Parameters
-
pcKeyboardDevice | |
pcTouchscreenDevice | |
pcRemoteDevice | |
iTouchscreenFilterDelta | |
◆ 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
-
pcKeyboardDevice | Path to keyboard input device. If NULL device will not be used. |
pcTouchscreenDevice | Path to touchscreen input device. If NULL device will not be used. |
pcRemoteDevice | Path to remote control input device. If NULL device will not be used. |
iTouchScreenX | Value moves the touch event in X direction (value in touchscreen pixel |
- See also
- iTouchScreenWidth,
-
iTouchScreenHeight).
- Parameters
-
iTouchScreenY | Value moves the touch event in Y direction (value in touchscreen pixel |
- See also
- iTouchScreenWidth,
-
iTouchScreenHeight).
- Parameters
-
iTouchscreenWidth | Maximum 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. |
iTouchscreenHeight | Maximum 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. |
iTSFilterDelta | Number of pixel of a mouse drag that need to be exceeded before an event is generated. |
◆ GetEvent()
CGUIEvent * CGUIInputDeviceUnix::GetEvent |
( |
eC_UInt |
uiIdleTime | ) |
|
|
virtual |
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
-
uiIdleTime | specifies the maximum idle time in ms. |
- Returns
- Pointer to a newly generated Guiliani event, or NULL if nothing happened.
Implements CGUIInputMedia.
◆ GetEventQueue()
get the event queue
- Returns
- queue
◆ GetInputEventCond()
pthread_cond_t * CGUIInputDeviceUnix::GetInputEventCond |
( |
| ) |
|
get the condition variable
- Returns
- condition
◆ LockSemaphore()
void CGUIInputDeviceUnix::LockSemaphore |
( |
| ) |
|
◆ SetOffset()
virtual void CGUIInputDeviceUnix::SetOffset |
( |
const eC_Int & |
iOffsetX, |
|
|
const eC_Int & |
iOffsetY |
|
) |
| |
|
virtual |
set the offset for the input-device
- Parameters
-
iOffsetX | x-offset |
iOffsetY | y-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
- Parameters
-
Reimplemented from CGUIInputMedia.
◆ StopIdle()
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 |
( |
| ) |
|
The documentation for this class was generated from the following file: