Comments review
This commit is contained in:
parent
67d8b43b0e
commit
2e8299742b
1 changed files with 10 additions and 11 deletions
|
@ -154,7 +154,6 @@ float GetGesturePinchAngle(void); // Get gesture pinch ang
|
||||||
|
|
||||||
#include <math.h> // Required for: sqrtf(), atan2f()
|
#include <math.h> // Required for: sqrtf(), atan2f()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__APPLE__) // macOS also defines __MACH__
|
#if defined(__APPLE__) // macOS also defines __MACH__
|
||||||
#include <mach/clock.h> // Required for: clock_get_time()
|
#include <mach/clock.h> // Required for: clock_get_time()
|
||||||
#include <mach/mach.h> // Required for: mach_timespec_t
|
#include <mach/mach.h> // Required for: mach_timespec_t
|
||||||
|
@ -163,20 +162,20 @@ float GetGesturePinchAngle(void); // Get gesture pinch ang
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Defines and Macros
|
// Defines and Macros
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
#define FORCE_TO_SWIPE 0.0005f // Measured in normalized screen units/time
|
#define FORCE_TO_SWIPE 0.0005f // Swipe force, measured in normalized screen units/time
|
||||||
#define MINIMUM_DRAG 0.015f // Measured in normalized screen units (0.0f to 1.0f)
|
#define MINIMUM_DRAG 0.015f // Drag minimum force, measured in normalized screen units (0.0f to 1.0f)
|
||||||
#define MINIMUM_PINCH 0.005f // Measured in normalized screen units (0.0f to 1.0f)
|
#define MINIMUM_PINCH 0.005f // Pinch minimum force, measured in normalized screen units (0.0f to 1.0f)
|
||||||
#define TAP_TIMEOUT 300 // Time in milliseconds
|
#define TAP_TIMEOUT 300 // Tap minimum time, measured in milliseconds
|
||||||
#define PINCH_TIMEOUT 300 // Time in milliseconds
|
#define PINCH_TIMEOUT 300 // Pinch minimum time, measured in milliseconds
|
||||||
#define DOUBLETAP_RANGE 0.03f // Measured in normalized screen units (0.0f to 1.0f)
|
#define DOUBLETAP_RANGE 0.03f // DoubleTap range, measured in normalized screen units (0.0f to 1.0f)
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Types and Structures Definition
|
// Types and Structures Definition
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Gestures module state context
|
// Gestures module state context [136 bytes]
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int current; // Current detected gesture
|
unsigned int current; // Current detected gesture
|
||||||
unsigned int enabledFlags; // Enabled gestures flags
|
unsigned int enabledFlags; // Enabled gestures flags
|
||||||
struct {
|
struct {
|
||||||
int firstId; // Touch id for first touch point
|
int firstId; // Touch id for first touch point
|
||||||
|
@ -216,8 +215,8 @@ typedef struct {
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
static GesturesData GESTURES = {
|
static GesturesData GESTURES = {
|
||||||
.Touch.firstId = -1,
|
.Touch.firstId = -1,
|
||||||
.current = GESTURE_NONE,
|
.current = GESTURE_NONE, // No current gesture detected
|
||||||
.enabledFlags = 0b0000001111111111 // All gestures enabled by default
|
.enabledFlags = 0b0000001111111111 // All gestures supported by default
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue