Polyphase Game Engine
Loading...
Searching...
No Matches
Input.h File Reference
#include "PolyphaseAPI.h"
#include "InputConstants.h"
#include "InputTypes.h"
#include <stdint.h>

Go to the source code of this file.

Functions

void INP_Initialize ()
 
void INP_Shutdown ()
 
void INP_Update ()
 
void INP_SetCursorPos (int32_t x, int32_t y)
 
POLYPHASE_API void INP_ShowCursor (bool show)
 
void INP_LockCursor (bool lock)
 
void INP_TrapCursor (bool trap)
 
void INP_TrapCursorToRect (int32_t x, int32_t y, int32_t w, int32_t h)
 
const char * INP_ShowSoftKeyboard (bool show)
 
bool INP_IsSoftKeyboardShown ()
 
void INP_SetKey (int32_t key)
 
void INP_ClearKey (int32_t key)
 
void INP_ClearAllKeys ()
 
POLYPHASE_API bool INP_IsKeyDown (int32_t key)
 
POLYPHASE_API bool INP_IsKeyJustDownRepeat (int32_t key)
 
POLYPHASE_API bool INP_IsKeyJustDown (int32_t key)
 
POLYPHASE_API bool INP_IsKeyJustUp (int32_t key)
 
POLYPHASE_API char INP_ConvertKeyCodeToChar (int32_t key)
 
void INP_SetMouseButton (int32_t button)
 
void INP_ClearMouseButton (int32_t button)
 
void INP_SetScrollWheelDelta (int32_t delta)
 
POLYPHASE_API bool INP_IsMouseButtonDown (int32_t button)
 
POLYPHASE_API bool INP_IsMouseButtonJustDown (int32_t button)
 
POLYPHASE_API bool INP_IsMouseButtonJustUp (int32_t button)
 
POLYPHASE_API int32_t INP_GetScrollWheelDelta ()
 
void INP_ClearAllMouseButtons ()
 
void INP_SetTouch (int32_t touch)
 
void INP_ClearTouch (int32_t touch)
 
POLYPHASE_API bool INP_IsTouchDown (int32_t touch)
 
POLYPHASE_API bool INP_IsPointerJustUp (int32_t pointer=0)
 
POLYPHASE_API bool INP_IsPointerJustDown (int32_t pointer=0)
 
POLYPHASE_API bool INP_IsPointerDown (int32_t pointer=0)
 
void INP_SetMousePosition (int32_t mouseX, int32_t mouseY)
 
void INP_SetTouchPosition (int32_t touchX, int32_t touchY, int32_t touch=0)
 
POLYPHASE_API void INP_GetMousePosition (int32_t &mouseX, int32_t &mouseY)
 
POLYPHASE_API void INP_GetTouchPosition (int32_t &touchX, int32_t &touchY, int32_t touch)
 
POLYPHASE_API void INP_GetTouchPositionNormalized (float &touchX, float &touchY, int32_t touch)
 
POLYPHASE_API void INP_GetPointerPosition (int32_t &pointerX, int32_t &pointerY, int32_t pointer=0)
 
POLYPHASE_API void INP_GetPointerPositionNormalized (float &pointerX, float &pointerY, int32_t pointer=0)
 
POLYPHASE_API void INP_GetMouseDelta (int32_t &deltaX, int32_t &deltaY)
 
bool INP_IsGamepadButtonDown (int32_t gamepadButton, int32_t gamepadIndex)
 
bool INP_IsGamepadButtonJustDown (int32_t gamepadButton, int32_t gamepadIndex)
 
bool INP_IsGamepadButtonJustUp (int32_t gamepadButton, int32_t gamepadIndex)
 
float INP_GetGamepadAxisValue (int32_t gamepadAxis, int32_t gamepadIndex)
 
GamepadType INP_GetGamepadType (int32_t gamepadIndex)
 
bool INP_IsGamepadConnected (int32_t gamepadIndex)
 
int32_t INP_GetGamepadIndex (int32_t inputDevice)
 
void INP_SetGamepadAxisValue (GamepadAxisCode axisCode, float axisValue, int32_t gamepadIndex)
 
void INP_SetGamepadButton (GamepadButtonCode buttonCode, int32_t gamepadIndex)
 
void INP_ClearGamepadButton (GamepadButtonCode buttonCode, int32_t gamepadIndex)
 
void INP_GetGamepadGyro (float &x, float &y, float &z, int32_t gamepadIndex)
 
void INP_GetGamepadAcceleration (float &x, float &y, float &z, int32_t gamepadIndex)
 
void INP_GetGamepadOrientation (float &pitch, float &yaw, float &roll, int32_t gamepadIndex)
 
bool INP_IsCursorLocked ()
 
bool INP_IsCursorTrapped ()
 
bool INP_IsCursorShown ()
 

Function Documentation

◆ INP_ClearAllKeys()

void INP_ClearAllKeys ( )

◆ INP_ClearAllMouseButtons()

void INP_ClearAllMouseButtons ( )

◆ INP_ClearGamepadButton()

void INP_ClearGamepadButton ( GamepadButtonCode  buttonCode,
int32_t  gamepadIndex 
)

◆ INP_ClearKey()

void INP_ClearKey ( int32_t  key)

◆ INP_ClearMouseButton()

void INP_ClearMouseButton ( int32_t  button)

◆ INP_ClearTouch()

void INP_ClearTouch ( int32_t  touch)

◆ INP_ConvertKeyCodeToChar()

POLYPHASE_API char INP_ConvertKeyCodeToChar ( int32_t  key)

◆ INP_GetGamepadAcceleration()

void INP_GetGamepadAcceleration ( float &  x,
float &  y,
float &  z,
int32_t  gamepadIndex 
)

◆ INP_GetGamepadAxisValue()

float INP_GetGamepadAxisValue ( int32_t  gamepadAxis,
int32_t  gamepadIndex 
)

◆ INP_GetGamepadGyro()

void INP_GetGamepadGyro ( float &  x,
float &  y,
float &  z,
int32_t  gamepadIndex 
)

◆ INP_GetGamepadIndex()

int32_t INP_GetGamepadIndex ( int32_t  inputDevice)

◆ INP_GetGamepadOrientation()

void INP_GetGamepadOrientation ( float &  pitch,
float &  yaw,
float &  roll,
int32_t  gamepadIndex 
)

◆ INP_GetGamepadType()

GamepadType INP_GetGamepadType ( int32_t  gamepadIndex)

◆ INP_GetMouseDelta()

POLYPHASE_API void INP_GetMouseDelta ( int32_t &  deltaX,
int32_t &  deltaY 
)

◆ INP_GetMousePosition()

POLYPHASE_API void INP_GetMousePosition ( int32_t &  mouseX,
int32_t &  mouseY 
)

◆ INP_GetPointerPosition()

POLYPHASE_API void INP_GetPointerPosition ( int32_t &  pointerX,
int32_t &  pointerY,
int32_t  pointer = 0 
)

◆ INP_GetPointerPositionNormalized()

POLYPHASE_API void INP_GetPointerPositionNormalized ( float &  pointerX,
float &  pointerY,
int32_t  pointer = 0 
)

◆ INP_GetScrollWheelDelta()

POLYPHASE_API int32_t INP_GetScrollWheelDelta ( )

◆ INP_GetTouchPosition()

POLYPHASE_API void INP_GetTouchPosition ( int32_t &  touchX,
int32_t &  touchY,
int32_t  touch 
)

◆ INP_GetTouchPositionNormalized()

POLYPHASE_API void INP_GetTouchPositionNormalized ( float &  touchX,
float &  touchY,
int32_t  touch 
)

◆ INP_Initialize()

void INP_Initialize ( )

◆ INP_IsCursorLocked()

bool INP_IsCursorLocked ( )

◆ INP_IsCursorShown()

bool INP_IsCursorShown ( )

◆ INP_IsCursorTrapped()

bool INP_IsCursorTrapped ( )

◆ INP_IsGamepadButtonDown()

bool INP_IsGamepadButtonDown ( int32_t  gamepadButton,
int32_t  gamepadIndex 
)

◆ INP_IsGamepadButtonJustDown()

bool INP_IsGamepadButtonJustDown ( int32_t  gamepadButton,
int32_t  gamepadIndex 
)

◆ INP_IsGamepadButtonJustUp()

bool INP_IsGamepadButtonJustUp ( int32_t  gamepadButton,
int32_t  gamepadIndex 
)

◆ INP_IsGamepadConnected()

bool INP_IsGamepadConnected ( int32_t  gamepadIndex)

◆ INP_IsKeyDown()

POLYPHASE_API bool INP_IsKeyDown ( int32_t  key)

◆ INP_IsKeyJustDown()

POLYPHASE_API bool INP_IsKeyJustDown ( int32_t  key)

◆ INP_IsKeyJustDownRepeat()

POLYPHASE_API bool INP_IsKeyJustDownRepeat ( int32_t  key)

◆ INP_IsKeyJustUp()

POLYPHASE_API bool INP_IsKeyJustUp ( int32_t  key)

◆ INP_IsMouseButtonDown()

POLYPHASE_API bool INP_IsMouseButtonDown ( int32_t  button)

◆ INP_IsMouseButtonJustDown()

POLYPHASE_API bool INP_IsMouseButtonJustDown ( int32_t  button)

◆ INP_IsMouseButtonJustUp()

POLYPHASE_API bool INP_IsMouseButtonJustUp ( int32_t  button)

◆ INP_IsPointerDown()

POLYPHASE_API bool INP_IsPointerDown ( int32_t  pointer = 0)

◆ INP_IsPointerJustDown()

POLYPHASE_API bool INP_IsPointerJustDown ( int32_t  pointer = 0)

◆ INP_IsPointerJustUp()

POLYPHASE_API bool INP_IsPointerJustUp ( int32_t  pointer = 0)

◆ INP_IsSoftKeyboardShown()

bool INP_IsSoftKeyboardShown ( )

◆ INP_IsTouchDown()

POLYPHASE_API bool INP_IsTouchDown ( int32_t  touch)

◆ INP_LockCursor()

void INP_LockCursor ( bool  lock)

◆ INP_SetCursorPos()

void INP_SetCursorPos ( int32_t  x,
int32_t  y 
)

◆ INP_SetGamepadAxisValue()

void INP_SetGamepadAxisValue ( GamepadAxisCode  axisCode,
float  axisValue,
int32_t  gamepadIndex 
)

◆ INP_SetGamepadButton()

void INP_SetGamepadButton ( GamepadButtonCode  buttonCode,
int32_t  gamepadIndex 
)

◆ INP_SetKey()

void INP_SetKey ( int32_t  key)

◆ INP_SetMouseButton()

void INP_SetMouseButton ( int32_t  button)

◆ INP_SetMousePosition()

void INP_SetMousePosition ( int32_t  mouseX,
int32_t  mouseY 
)

◆ INP_SetScrollWheelDelta()

void INP_SetScrollWheelDelta ( int32_t  delta)

◆ INP_SetTouch()

void INP_SetTouch ( int32_t  touch)

◆ INP_SetTouchPosition()

void INP_SetTouchPosition ( int32_t  touchX,
int32_t  touchY,
int32_t  touch = 0 
)

◆ INP_ShowCursor()

POLYPHASE_API void INP_ShowCursor ( bool  show)

◆ INP_ShowSoftKeyboard()

const char * INP_ShowSoftKeyboard ( bool  show)

◆ INP_Shutdown()

void INP_Shutdown ( )

◆ INP_TrapCursor()

void INP_TrapCursor ( bool  trap)

◆ INP_TrapCursorToRect()

void INP_TrapCursorToRect ( int32_t  x,
int32_t  y,
int32_t  w,
int32_t  h 
)

◆ INP_Update()

void INP_Update ( )