Guiliani  Version 2.5 revision 7293 (documentation build 13)
CGUIInputWindows Class Reference

Standard input Wrapper for systems running a windows OS. More...

#include <GUIInputWindows.h>

Inheritance diagram for CGUIInputWindows:

Public Member Functions

eC_Bool GetEmulateTouchScreen () const
 
virtual CGUIEventGetEvent (eC_UInt uiIdleTime)
 
void SetEmulateTouchScreen (const eC_Bool &bEmulateTouchScreen)
 
virtual void StopIdle ()
 
- Public Member Functions inherited from CGUIInputMedia
eC_Bool GetDebugMode () const
 
virtual CGUIEventGetEvent (eC_UInt uiIdleTime)=0
 
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
 
void SetDebugMode (const eC_Bool &bDebugMode)
 
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 HWND &hWnd, const eC_Bool &bEmulateTouchScreen=false)
 
- Static Public Member Functions inherited from CGUIInputMedia
static void DeleteInstance ()
 

Protected Member Functions

 CGUIInputWindows (const HWND &hWnd, const eC_Bool &bEmulateTouchScreen=false)
 
virtual CGUIEventCreateGuilianiEventFromWindowsMessage (MSG &kMsg)
 
GUIKeyIdentifier_t GetKeyID (UINT virtualKeyCode, eC_UInt uiModifiers)
 
eC_Int GetXPosition (const LPARAM &lParam)
 
eC_Int GetYPosition (const LPARAM &lParam)
 
virtual BOOL ReadMessageFromWindowsQueue (MSG &kMsg, eC_UInt uiIdleTime)
 
- Protected Member Functions inherited from CGUIInputMedia
 CGUIInputMedia ()
 
virtual ~CGUIInputMedia ()
 

Protected Attributes

eC_Bool m_bEmulateTouchScreen
 if this is true the moving of mouse will only create ET_MOUSEMOVE while a mouse-button is pressed
 
eC_Bool m_bLeftButtonPressed
 Indicate that the left mouse button is currently pressed.
 
eC_Bool m_bRightButtonPressed
 Indicate that the right mouse button is currently pressed.
 
eC_Bool m_bStopIdle
 Set to True if StopIdle() was called, reset to False by GetEvent()
 
HWND m_hWnd
 Handle to associated window.
 
int m_iLastX
 last mouse-position x
 
int m_iLastY
 last mouse-position y
 
- Protected Attributes inherited from CGUIInputMedia
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
 

Additional Inherited Members

- Public Types inherited from CGUIInputMedia
enum  Rotation_t { ROTATION_0 , ROTATION_90 , ROTATION_180 , ROTATION_270 }
 rotation of input-device
 

Detailed Description

Standard input Wrapper for systems running a windows OS.

Constructor & Destructor Documentation

◆ CGUIInputWindows()

CGUIInputWindows::CGUIInputWindows ( const HWND &  hWnd,
const eC_Bool &  bEmulateTouchScreen = false 
)
protected

Constructor

Parameters
hWndWindow handle
bEmulateTouchScreentrue if touch-screen-like behaviour should be forced

Member Function Documentation

◆ CreateGuilianiEventFromWindowsMessage()

virtual CGUIEvent * CGUIInputWindows::CreateGuilianiEventFromWindowsMessage ( MSG &  kMsg)
protectedvirtual

Creates a Guiliani Event from the given windows message

Parameters
kMsgWindows message for which a corresponding Guiliani event shall be created
Returns
Newly created Guiliani event (or NULL)

◆ CreateInstance()

static void CGUIInputWindows::CreateInstance ( const HWND &  hWnd,
const eC_Bool &  bEmulateTouchScreen = false 
)
static

Creates the singleton instance.

Parameters
hWndhandle to window
bEmulateTouchScreenif true mouse-move without pressed button will not result in any action

◆ GetEmulateTouchScreen()

eC_Bool CGUIInputWindows::GetEmulateTouchScreen ( ) const

get emulate touchscreen-setting

Returns
true if active

◆ GetEvent()

virtual CGUIEvent * CGUIInputWindows::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
uiIdleTimespecifies the maximum idle time in ms.
Returns
Pointer to a newly generated Guiliani event, or NULL if nothing happened.

Implements CGUIInputMedia.

◆ GetKeyID()

GUIKeyIdentifier_t CGUIInputWindows::GetKeyID ( UINT  virtualKeyCode,
eC_UInt  uiModifiers 
)
protected

Helper for translating Windows VK codes into Guiliani key IDs.

Parameters
virtualKeyCodeThe key code to be translated. This should be the wParam of the WM_KEYDOWN or WM_KEYUP message.
uiModifiersThe current modifiers state.
Returns
The translated Guiliani key ID. GK_NONE if VK is not handled.

◆ GetXPosition()

eC_Int CGUIInputWindows::GetXPosition ( const LPARAM &  lParam)
protected

Get x-position according to rotation

Parameters
lParammessage-content
Returns
the x-position

◆ GetYPosition()

eC_Int CGUIInputWindows::GetYPosition ( const LPARAM &  lParam)
protected

Get y-position according to rotation

Parameters
lParammessage-content
Returns
the y-position

◆ ReadMessageFromWindowsQueue()

virtual BOOL CGUIInputWindows::ReadMessageFromWindowsQueue ( MSG &  kMsg,
eC_UInt  uiIdleTime 
)
protectedvirtual

Reads an event from the windows message queue.

Parameters
kMsgWindows message which was read from the message queue
uiIdleTimeMaximum allowed idle time (in millisec) after which the method must return
Returns
True if a message was read, False otherwise

◆ SetEmulateTouchScreen()

void CGUIInputWindows::SetEmulateTouchScreen ( const eC_Bool &  bEmulateTouchScreen)

set emulate touchscreen

Parameters
bEmulateTouchScreenif set to true ET_MOUSEMOVE is only created while a mouse-button is pressed

◆ StopIdle()

virtual void CGUIInputWindows::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.


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