Introduction
Downloads
Documentation
Tutorials
Pixie Lite
Forum

Home

Platform_Input Class Reference
[Platform]

Platform independent abstraction of input devices. More...

Inheritance diagram for Platform_Input:

Platform_NULL_Input Platform_Win32_Input

List of all members.


Public Member Functions

virtual ~Platform_Input ()
virtual const
Platform_Input_KeyboardDevice
GetKeyboardDevice ()=0
virtual const
Platform_Input_MouseDevice
GetMouseDevice ()=0
virtual int CreateMouseCursor (int width, int height, int hotspotX, int hotspotY, unsigned short *colorData, unsigned char *alphaData)=0
virtual void SetMouseCursor (int handle)=0
virtual void SetDefaultMouseCursor ()=0

Detailed Description

Platform independent abstraction of input devices.

Author:
Mattias Gustavsson
Provides platform independent access to input keyboard and mouse.

Definition at line 22 of file Platform_Input.h.


Constructor & Destructor Documentation

virtual Platform_Input::~Platform_Input (  )  [virtual]

Destructor

Definition at line 28 of file Platform_Input.h.


Member Function Documentation

virtual const Platform_Input_KeyboardDevice* Platform_Input::GetKeyboardDevice (  )  [pure virtual]

Retrieves the keyboard device instance. This pointer is owned and managed by Platform_Input, and should not be deleted by the caller.

Returns:
The keyboard device for the platform

Implemented in Platform_NULL_Input, and Platform_Win32_Input.

virtual const Platform_Input_MouseDevice* Platform_Input::GetMouseDevice (  )  [pure virtual]

Retrieves the mouse device instance. This pointer is owned and managed by Platform_Input, and should not be deleted by the caller.

Returns:
The mouse device for the platform

Implemented in Platform_NULL_Input, and Platform_Win32_Input.

virtual int Platform_Input::CreateMouseCursor ( int  width,
int  height,
int  hotspotX,
int  hotspotY,
unsigned short *  colorData,
unsigned char *  alphaData 
) [pure virtual]

Creates a system mouse cursor from the specified bitmap data. Different systems might support different number of colors and transparency, so it is not guaranteed that the cursor will look identical to to the specified bitmap data.

Returns:
A handle to the new cursor, to be used with SetMouseCursor or 0 if it couldn't be created
Parameters:
width Width of the bitmap data
height Height of the bitmap data
hotspotX Horizontal offset indicating cursor center
hotspotY Vertical offset indicating cursor center
colorData 16-bit color bitmap data
alphaData 8-bit alpha (transparency) bitmap data

Implemented in Platform_NULL_Input, and Platform_Win32_Input.

virtual void Platform_Input::SetMouseCursor ( int  handle  )  [pure virtual]

Tells the system to use the specified mouse cursor, created through a call to CreateMouseCursor. Can also be used to hide the mouse cursor, by passing a value of 0 for handle.

Parameters:
handle Handle of mouse cursor to use, or 0 to hide cursor

Implemented in Platform_NULL_Input, and Platform_Win32_Input.

virtual void Platform_Input::SetDefaultMouseCursor (  )  [pure virtual]

Tells the system to use the default mouse cursor for the system (the standard arrow for windows)

Implemented in Platform_NULL_Input, and Platform_Win32_Input.



Pixie University and the Pixie Game Engine is created and managed by Mattias Gustavsson.
Reproduction/republishing of any material on this site without permission is strictly prohibited.