Gateware Libraries  R6.5A
Beta Build
GW::SYSTEM::GInput Class Referenceabstract

A single threaded input library. More...

#include <GInput.h>

Inheritance diagram for GW::SYSTEM::GInput:
Collaboration diagram for GW::SYSTEM::GInput:

Public Member Functions

virtual GReturn GetState (int _keyCode, float &_outState)=0
 Get the current state of any key. More...
 
virtual GReturn GetMouseDelta (float &_x, float &_y)=0
 Get the change in mouse position. More...
 
virtual GReturn GetMousePosition (float &_x, float &_y)=0
 Get the most recent mouse position. More...
 
virtual GReturn GetKeyMask (unsigned int &_outKeyMask)=0
 Get the key mask. More...
 
- Public Member Functions inherited from GW::CORE::GInterface
virtual GReturn GetCount (unsigned int &_outCount)=0
 Return the total number of active references to this object. More...
 
virtual GReturn IncrementCount ()=0
 Increase the total number of active references to this object. More...
 
virtual GReturn DecrementCount ()=0
 Decrease the total number of active references to this object. More...
 
virtual GReturn RequestInterface (const GUUIID &_interfaceID, void **_outputInterface)=0
 Requests an interface that may or may not be supported by this object. More...
 

Detailed Description

A single threaded input library.

The single thread input library is used for high speed game input. You can use this library to get any mouse or keyboard input.

Member Function Documentation

◆ GetKeyMask()

virtual GReturn GW::SYSTEM::GInput::GetKeyMask ( unsigned int &  _outKeyMask)
pure virtual

Get the key mask.

The key mask lets the input object know which of the functions below are

active by manipulating individual bits of an unsigned int. Values for G_MASK can be found in GKeyDefines.

Return values
G_MASK(_SHIFT, _CONTROL, _CAPS_LOCK, _NUM_LOCK, _SCROLL_LOCK).

◆ GetMouseDelta()

virtual GReturn GW::SYSTEM::GInput::GetMouseDelta ( float &  _x,
float &  _y 
)
pure virtual

Get the change in mouse position.

Parameters
[out]_xa reference to a float to store the mouse delta position x.
[out]_ya reference to a float to store the mouse delta position y.
Return values
SUCCESSno problems found. Values stored in _x and _y.

◆ GetMousePosition()

virtual GReturn GW::SYSTEM::GInput::GetMousePosition ( float &  _x,
float &  _y 
)
pure virtual

Get the most recent mouse position.

Parameters
[out]_xa reference to a float to store the mouse position x.
[out]_ya reference to a float to store the mouse position y.
Return values
SUCCESSno problems found. Values stored in _x and _y.

◆ GetState()

virtual GReturn GW::SYSTEM::GInput::GetState ( int  _keyCode,
float &  _outState 
)
pure virtual

Get the current state of any key.

Use keycodes in GKeyDefines as input to this function to check the state of a particular key or button.

Parameters
[in]_keyCodeThe key code of the key to check.
[out]_errorCodeIf function fails this will hold the errorCode. (optional)
Return values
0The Key is not pressed.
1The Key is pressed.

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