Gainput  v1.0.0
GainputGestures.h
1 
2 #ifndef GAINPUTGESTURES_H_
3 #define GAINPUTGESTURES_H_
4 
5 #ifdef GAINPUT_ENABLE_ALL_GESTURES
6 #define GAINPUT_ENABLE_BUTTON_STICK_GESTURE
7 #define GAINPUT_ENABLE_DOUBLE_CLICK_GESTURE
8 #define GAINPUT_ENABLE_HOLD_GESTURE
9 #define GAINPUT_ENABLE_PINCH_GESTURE
10 #define GAINPUT_ENABLE_ROTATE_GESTURE
11 #define GAINPUT_ENABLE_SIMULTANEOUSLY_DOWN_GESTURE
12 #define GAINPUT_ENABLE_TAP_GESTURE
13 #endif
14 
15 
16 namespace gainput
17 {
18 
20 
41 class GAINPUT_LIBEXPORT InputGesture : public InputDevice
42 {
43 public:
45  DeviceType GetType() const { return DT_GESTURE; }
46  const char* GetTypeName() const { return "gesture"; }
47  bool IsLateUpdate() const { return true; }
48 
49 protected:
51  InputGesture(InputManager& manager, DeviceId device, unsigned index) : InputDevice(manager, device, index == InputDevice::AutoIndex ? manager.GetDeviceCountByType(DT_GESTURE) : 0) { }
52 
53  DeviceState InternalGetState() const { return DS_OK; }
54 
55 };
56 
57 }
58 
59 
60 #include <gainput/gestures/GainputButtonStickGesture.h>
61 #include <gainput/gestures/GainputDoubleClickGesture.h>
62 #include <gainput/gestures/GainputHoldGesture.h>
63 #include <gainput/gestures/GainputPinchGesture.h>
64 #include <gainput/gestures/GainputRotateGesture.h>
65 #include <gainput/gestures/GainputSimultaneouslyDownGesture.h>
66 #include <gainput/gestures/GainputTapGesture.h>
67 
68 #endif
69 
InputGesture(InputManager &manager, DeviceId device, unsigned index)
Gesture base constructor.
Definition: GainputGestures.h:51
DeviceState InternalGetState() const
Implementation of the device&#39;s GetState function.
Definition: GainputGestures.h:53
Manages all input devices and some other helpful stuff.
Definition: GainputInputManager.h:24
const char * GetTypeName() const
Returns the device type&#39;s name.
Definition: GainputGestures.h:46
unsigned int DeviceId
ID of an input device.
Definition: gainput.h:107
DeviceState
State of an input device.
Definition: GainputInputDevice.h:59
bool IsLateUpdate() const
Returns if this device should be updated after other devices.
Definition: GainputGestures.h:47
Base class for all input gestures.
Definition: GainputGestures.h:41
DeviceType GetType() const
Returns DT_GESTURE.
Definition: GainputGestures.h:45
DeviceType
Type of an input device.
Definition: GainputInputDevice.h:37
Interface for anything that provides device inputs.
Definition: GainputInputDevice.h:33
Contains all Gainput related classes, types, and functions.
Definition: gainput.h:103