| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- $#include "Input.h"
- struct TouchState
- {
- int touchID_ @ touchID;
- IntVector2 position_ @ position;
- IntVector2 lastPosition_ @ lastPosition;
- IntVector2 delta_ @ delta;
- float pressure_ @ pressure;
- };
- struct JoystickState
- {
- unsigned GetNumButtons() const;
- unsigned GetNumAxes() const;
- unsigned GetNumHats() const;
- bool GetButtonDown(unsigned index) const;
- bool GetButtonPress(unsigned index) const;
- float GetAxisPosition(unsigned index) const;
- int GetHatPosition(unsigned index) const;
- tolua_readonly tolua_property__get_set unsigned numButtons;
- tolua_readonly tolua_property__get_set unsigned numAxes;
- tolua_readonly tolua_property__get_set unsigned numHats;
- };
- class Input : public Object
- {
- void SetToggleFullscreen(bool enable);
- void SetMouseVisible(bool enable);
- bool OpenJoystick(unsigned index);
- void CloseJoystick(unsigned index);
- bool DetectJoysticks();
- void SetScreenKeyboardVisible(bool enable);
- bool GetKeyDown(int key) const;
- bool GetKeyPress(int key) const;
- bool GetMouseButtonDown(int button) const;
- bool GetMouseButtonPress(int button) const;
- bool GetQualifierDown(int qualifier) const;
- bool GetQualifierPress(int qualifier) const;
- int GetQualifiers() const;
- IntVector2 GetMousePosition() const;
- const IntVector2& GetMouseMove() const;
- int GetMouseMoveX() const;
- int GetMouseMoveY() const;
- int GetMouseMoveWheel() const;
- unsigned GetNumTouches() const;
- TouchState* GetTouch(unsigned index) const;
- unsigned GetNumJoysticks() const;
- const String GetJoystickName(unsigned index) const;
- JoystickState* GetJoystick(unsigned index);
- bool GetToggleFullscreen() const;
- bool GetScreenKeyboardSupport() const;
- bool IsScreenKeyboardVisible() const;
- bool IsMouseVisible() const;
- bool HasFocus();
- bool IsMinimized() const;
- tolua_readonly tolua_property__get_set int qualifiers;
- tolua_readonly tolua_property__get_set IntVector2 mousePosition;
- tolua_readonly tolua_property__get_set IntVector2& mouseMove;
- tolua_readonly tolua_property__get_set int mouseMoveX;
- tolua_readonly tolua_property__get_set int mouseMoveY;
- tolua_readonly tolua_property__get_set int mouseMoveWheel;
- tolua_readonly tolua_property__get_set unsigned numTouches;
- tolua_readonly tolua_property__get_set unsigned numJoysticks;
- tolua_readonly tolua_property__get_set bool toggleFullscreen;
- tolua_readonly tolua_property__get_set bool screenKeyboardSupport;
- tolua_property__is_set bool screenKeyboardVisible;
- tolua_property__is_set bool mouseVisible;
- tolua_readonly tolua_property__has_set bool focus;
- tolua_readonly tolua_property__is_set bool minimized;
- };
- Input* GetInput();
- tolua_readonly tolua_property__get_set Input* input;
- ${
- #define TOLUA_DISABLE_tolua_InputLuaAPI_GetInput00
- static int tolua_InputLuaAPI_GetInput00(lua_State* tolua_S)
- {
- return ToluaGetSubsystem<Input>(tolua_S);
- }
- #define TOLUA_DISABLE_tolua_get_input_ptr
- #define tolua_get_input_ptr tolua_InputLuaAPI_GetInput00
- $}
|