Gesture Library
tap.h File Reference
#include "gesturelib.h"
#include "gestureparams.h"
#include "recognizer.h"

Go to the source code of this file.

Data Structures

struct  tap
 Data structure for tap data. More...
 

Typedefs

typedef struct tap tap_t
 Data structure for tap data. More...
 

Functions

void init_tap ()
 Initialize tap data structures. More...
 
void recognize_tap (const touch_event_t *event)
 Recognize tap gesture. More...
 
const tap_tget_tap ()
 Access tap data array of size MAX_TOUCHES. More...
 
int set_on_tap (void(*listener)(const tap_t *))
 Subscribe listener to tap gesture updates. More...
 

Typedef Documentation

◆ tap_t

typedef struct tap tap_t

Data structure for tap data.

Function Documentation

◆ get_tap()

const tap_t* get_tap ( )

Access tap data array of size MAX_TOUCHES.

Returns
Address of first element of tap data array of size MAX_TOUCHES

Definition at line 34 of file tap.c.

◆ init_tap()

void init_tap ( )

Initialize tap data structures.

Definition at line 12 of file tap.c.

◆ recognize_tap()

void recognize_tap ( const touch_event_t event)

Recognize tap gesture.

Parameters
eventtouch event to recognize

Definition at line 27 of file tap.c.

◆ set_on_tap()

int set_on_tap ( void(*)(const tap_t *)  listener)

Subscribe listener to tap gesture updates.

Parameters
Listeneraccepts a const tap_t*
Returns
0 if first listener, 1 if replacing existing listener

Definition at line 38 of file tap.c.