DDraceNetwork Docs
|
#include <input.h>
Classes | |
class | CJoystick |
Public Member Functions | |
CInput () | |
void | Init () override |
int | Update () override |
void | Shutdown () override |
void | ConsumeEvents (std::function< void(const CEvent &Event)> Consumer) const override |
void | Clear () override |
float | GetUpdateTime () const override |
bool | ModifierIsPressed () const override |
bool | ShiftIsPressed () const override |
bool | AltIsPressed () const override |
bool | KeyIsPressed (int Key) const override |
bool | KeyPress (int Key, bool CheckCounter) const override |
int | FindKeyByName (const char *pKeyName) const override |
size_t | NumJoysticks () const override |
CJoystick * | GetJoystick (size_t Index) override |
CJoystick * | GetActiveJoystick () override |
void | SetActiveJoystick (size_t Index) override |
bool | MouseRelative (float *pX, float *pY) override |
void | MouseModeAbsolute () override |
void | MouseModeRelative () override |
vec2 | NativeMousePos () const override |
bool | NativeMousePressed (int Index) const override |
const std::vector< CTouchFingerState > & | TouchFingerStates () const override |
std::string | GetClipboardText () override |
void | SetClipboardText (const char *pText) override |
void | StartTextInput () override |
void | StopTextInput () override |
const char * | GetComposition () const override |
bool | HasComposition () const override |
int | GetCompositionCursor () const override |
int | GetCompositionLength () const override |
const char * | GetCandidate (int Index) const override |
int | GetCandidateCount () const override |
int | GetCandidateSelectedIndex () const override |
void | SetCompositionWindowPosition (float X, float Y, float H) override |
bool | GetDropFile (char *aBuf, int Len) override |
virtual void | Init ()=0 |
virtual void | Shutdown () override=0 |
virtual int | Update ()=0 |
Public Member Functions inherited from IInput | |
virtual void | ConsumeEvents (std::function< void(const CEvent &Event)> Consumer) const =0 |
virtual void | Clear ()=0 |
virtual float | GetUpdateTime () const =0 |
virtual bool | ModifierIsPressed () const =0 |
virtual bool | ShiftIsPressed () const =0 |
virtual bool | AltIsPressed () const =0 |
virtual bool | KeyIsPressed (int Key) const =0 |
virtual bool | KeyPress (int Key, bool CheckCounter=false) const =0 |
const char * | KeyName (int Key) const |
virtual int | FindKeyByName (const char *pKeyName) const =0 |
virtual size_t | NumJoysticks () const =0 |
virtual IJoystick * | GetJoystick (size_t Index)=0 |
virtual IJoystick * | GetActiveJoystick ()=0 |
virtual void | SetActiveJoystick (size_t Index)=0 |
virtual vec2 | NativeMousePos () const =0 |
virtual bool | NativeMousePressed (int Index) const =0 |
virtual void | MouseModeRelative ()=0 |
virtual void | MouseModeAbsolute ()=0 |
virtual bool | MouseRelative (float *pX, float *pY)=0 |
virtual const std::vector< CTouchFingerState > & | TouchFingerStates () const =0 |
virtual std::string | GetClipboardText ()=0 |
virtual void | SetClipboardText (const char *pText)=0 |
virtual void | StartTextInput ()=0 |
virtual void | StopTextInput ()=0 |
virtual const char * | GetComposition () const =0 |
virtual bool | HasComposition () const =0 |
virtual int | GetCompositionCursor () const =0 |
virtual int | GetCompositionLength () const =0 |
virtual const char * | GetCandidate (int Index) const =0 |
virtual int | GetCandidateCount () const =0 |
virtual int | GetCandidateSelectedIndex () const =0 |
virtual void | SetCompositionWindowPosition (float X, float Y, float H)=0 |
virtual bool | GetDropFile (char *aBuf, int Len)=0 |
ECursorType | CursorRelative (float *pX, float *pY) |
Public Member Functions inherited from IInterface | |
IInterface () | |
virtual void | Shutdown () |
virtual | ~IInterface () |
Private Member Functions | |
IEngineGraphics * | Graphics () const |
IConsole * | Console () const |
void | InitJoysticks () |
bool | OpenJoystick (int JoystickIndex) |
void | CloseJoysticks () |
void | UpdateActiveJoystick () |
float | GetJoystickDeadzone () |
void | AddKeyEvent (int Key, int Flags) |
void | AddTextEvent (const char *pText) |
void | UpdateMouseState () |
void | UpdateJoystickState () |
void | HandleJoystickAxisMotionEvent (const SDL_JoyAxisEvent &Event) |
void | HandleJoystickButtonEvent (const SDL_JoyButtonEvent &Event) |
void | HandleJoystickHatMotionEvent (const SDL_JoyHatEvent &Event) |
void | HandleJoystickAddedEvent (const SDL_JoyDeviceEvent &Event) |
void | HandleJoystickRemovedEvent (const SDL_JoyDeviceEvent &Event) |
void | HandleTouchDownEvent (const SDL_TouchFingerEvent &Event) |
void | HandleTouchUpEvent (const SDL_TouchFingerEvent &Event) |
void | HandleTouchMotionEvent (const SDL_TouchFingerEvent &Event) |
void | HandleTextEditingEvent (const char *pText, int Start, int Length) |
bool | KeyState (int Key) const |
void | ProcessSystemMessage (SDL_SysWMmsg *pMsg) |
Static Private Member Functions | |
static void | ConchainJoystickGuidChanged (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData) |
Private Attributes | |
IEngineGraphics * | m_pGraphics |
IConsole * | m_pConsole |
IConfigManager * | m_pConfigManager |
std::vector< CJoystick > | m_vJoysticks |
CJoystick * | m_pActiveJoystick = nullptr |
bool | m_InputGrabbed |
bool | m_MouseFocus |
std::string | m_CompositionString |
int | m_CompositionCursor |
std::vector< std::string > | m_vCandidates |
int | m_CandidateSelectedIndex |
std::vector< CEvent > | m_vInputEvents |
int64_t | m_LastUpdate |
float | m_UpdateTime |
uint32_t | m_aInputCount [g_MaxKeys] |
unsigned char | m_aInputState [g_MaxKeys] |
uint32_t | m_InputCounter |
std::vector< CTouchFingerState > | m_vTouchFingerStates |
char | m_aDropFile [IO_MAX_PATH_LENGTH] |
Additional Inherited Members | |
Public Types inherited from IInput | |
enum | { FLAG_PRESS = 1 << 0 , FLAG_RELEASE = 1 << 1 , FLAG_TEXT = 1 << 2 } |
enum | ECursorType { CURSOR_NONE , CURSOR_MOUSE , CURSOR_JOYSTICK } |
Static Public Member Functions inherited from IEngineInput | |
static const char * | InterfaceName () |
Static Public Member Functions inherited from IInput | |
static const char * | InterfaceName () |
Protected Member Functions inherited from IInterface | |
IKernel * | Kernel () |
CInput::CInput | ( | ) |
|
private |
|
private |
|
inlineoverridevirtual |
Implements IInput.
|
overridevirtual |
Implements IInput.
|
private |
|
staticprivate |
|
inlineprivate |
|
overridevirtual |
Implements IInput.
|
overridevirtual |
Implements IInput.
|
inlineoverridevirtual |
Implements IInput.
|
inlineoverridevirtual |
Implements IInput.
|
inlineoverridevirtual |
Implements IInput.
|
overridevirtual |
Implements IInput.
|
inlineoverridevirtual |
Implements IInput.
|
inlineoverridevirtual |
Implements IInput.
|
inlineoverridevirtual |
Implements IInput.
|
overridevirtual |
Implements IInput.
|
private |
|
overridevirtual |
Implements IInput.
|
inlineprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inlineoverridevirtual |
Implements IInput.
|
overridevirtual |
Implements IEngineInput.
|
private |
|
inlineoverridevirtual |
Implements IInput.
|
inlineoverridevirtual |
Implements IInput.
|
private |
|
inlineoverridevirtual |
Implements IInput.
|
overridevirtual |
Implements IInput.
|
overridevirtual |
Implements IInput.
|
overridevirtual |
Implements IInput.
|
overridevirtual |
Implements IInput.
|
inlineoverridevirtual |
Implements IInput.
|
private |
|
private |
|
overridevirtual |
Implements IInput.
|
overridevirtual |
Implements IInput.
|
overridevirtual |
Implements IInput.
|
inlineoverridevirtual |
Implements IInput.
|
overridevirtual |
Implements IEngineInput.
|
overridevirtual |
Implements IInput.
|
overridevirtual |
Implements IInput.
|
overridevirtual |
Returns a vector of the states of all touch fingers currently being pressed down on touch devices. Note that this only contains fingers which are pressed down, i.e. released fingers are never stored. The order of the fingers in this vector is based on the order in which the fingers where pressed.
Implements IInput.
|
overridevirtual |
Implements IEngineInput.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |