Gesture Library
double.h File Reference
#include "gesturelib.h"
#include "gestureparams.h"
#include "math.h"
#include "multistroke.h"
#include "recognizer.h"
#include "stroke.h"
#include "tap.h"

Go to the source code of this file.

Data Structures

struct  double_tap
 holds the state, last location, and timestamp of a double tap instance More...
 

Macros

#define DIST_X   20
 
#define DIST_Y   20
 

Typedefs

typedef struct double_tap double_tap_t
 holds the state, last location, and timestamp of a double tap instance More...
 

Functions

void init_double_tap ()
 initializes the data array by setting all field to 0/NULL More...
 
void recognize_double_tap (const touch_event_t *event)
 reads the last tap and stroke data and determines whethers this new stroke is part of a double_tap event More...
 
const double_tap_tget_double_tap ()
 returns an array of the ongoing double_touch data for each finger More...
 
int set_on_double_tap (void(*listener)(const double_tap_t *))
 Listen to double_tap events. More...
 

Macro Definition Documentation

◆ DIST_X

#define DIST_X   20

Definition at line 12 of file double.h.

◆ DIST_Y

#define DIST_Y   20

Definition at line 13 of file double.h.

Typedef Documentation

◆ double_tap_t

typedef struct double_tap double_tap_t

holds the state, last location, and timestamp of a double tap instance

Function Documentation

◆ get_double_tap()

const double_tap_t* get_double_tap ( )

returns an array of the ongoing double_touch data for each finger

Returns
array of size MAX_TOUCHES of double_touch data

Definition at line 186 of file double.c.

◆ init_double_tap()

void init_double_tap ( )

initializes the data array by setting all field to 0/NULL

Definition at line 11 of file double.c.

◆ recognize_double_tap()

void recognize_double_tap ( const touch_event_t event)

reads the last tap and stroke data and determines whethers this new stroke is part of a double_tap event

Parameters
eventtouch event

Definition at line 30 of file double.c.

◆ set_on_double_tap()

int set_on_double_tap ( void(*)(const double_tap_t *)  listener)

Listen to double_tap events.

Parameters
listeneraccepts a const double_tap_t*
Returns
0 if first listener, 1 if replacing existing listener

Definition at line 52 of file double.c.