History

hacking on controller events

ZappoMan committed 12 years ago

Commit 5addc351 parent 64afd173 files · +61 −0Browse files

Showing the changes to libraries/script-engine/src/AbstractControllerScriptingInterface.h (1 of 3 files). Show all

Unified · Split

libraries/script-engine/src/AbstractControllerScriptingInterface.h+19−0
@@ -10,8 +10,12 @@ · 9 unmodified lines
1010 #define __hifi__AbstractControllerScriptingInterface__
1111
1212 #include <QtCore/QObject>
13+
1314 #include <glm/glm.hpp>
1415
16+#include "EventTypes.h"
17+
18+
1519 /// handles scripting of input controller commands from JS
1620 class AbstractControllerScriptingInterface : public QObject {
1721 Q_OBJECT
@@ -33,6 +37,21 @@ public slots: · 15 unmodified lines
3337 virtual glm::vec3 getSpatialControlPosition(int controlIndex) const = 0;
3438 virtual glm::vec3 getSpatialControlVelocity(int controlIndex) const = 0;
3539 virtual glm::vec3 getSpatialControlNormal(int controlIndex) const = 0;
40+
41+signals:
42+ void keyPressEvent(const KeyEvent& event);
43+ void keyReleaseEvent(const KeyEvent& event);
44+
45+ void mouseMoveEvent(const MouseEvent& event);
46+ void mousePressEvent(const MouseEvent& event);
47+ void mouseReleaseEvent(const MouseEvent& event);
48+
49+ void touchBeginEvent(const TouchEvent& event);
50+ void touchEndEvent(const TouchEvent& event);
51+ void touchUpdateEvent(const TouchEvent& event);
52+
53+ void wheelEvent(const WheelEvent& event);
54+
3655 };
3756
3857 #endif /* defined(__hifi__AbstractControllerScriptingInterface__) */