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

Go to the source code of this file.

Data Structures

struct  hold
 Data structure for hold data. More...
 

Typedefs

typedef struct hold hold_t
 Data structure for hold data. More...
 

Functions

void init_hold ()
 Initialize hold data structures. More...
 
void recognize_hold (const touch_event_t *event)
 Recognize hold gesture. More...
 
const hold_tget_hold ()
 Access hold data array of size MAX_TOUCHES. More...
 
int set_on_hold (void(*listener)(const hold_t *))
 Listen to hold events. More...
 

Typedef Documentation

◆ hold_t

typedef struct hold hold_t

Data structure for hold data.

Function Documentation

◆ get_hold()

const hold_t* get_hold ( )

Access hold data array of size MAX_TOUCHES.

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

Definition at line 44 of file hold.c.

◆ init_hold()

void init_hold ( )

Initialize hold data structures.

Definition at line 12 of file hold.c.

◆ recognize_hold()

void recognize_hold ( const touch_event_t event)

Recognize hold gesture.

Parameters
eventtouch event to recognize

Definition at line 27 of file hold.c.

◆ set_on_hold()

int set_on_hold ( void(*)(const hold_t *)  listener)

Listen to hold events.

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

Definition at line 34 of file hold.c.