Gesture Library
double.c File Reference
#include "double.h"
#include "gestureparams.h"
#include "utils.h"

Go to the source code of this file.

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...
 
int set_on_double_tap (void(*listener)(const double_tap_t *))
 Listen to double_tap events. More...
 
const double_tap_tget_double_tap ()
 returns an array of the ongoing double_touch data for each finger More...
 

Variables

double_tap_t double_tap_d [MAX_TOUCHES]
 
void(* on_double_tap )(const double_tap_t *)=0
 

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.

Variable Documentation

◆ double_tap_d

double_tap_t double_tap_d[MAX_TOUCHES]

Definition at line 8 of file double.c.

◆ on_double_tap

void(* on_double_tap) (const double_tap_t *)=0 ( const double_tap_t )

Definition at line 9 of file double.c.