Gesture Library
zoom.h File Reference
#include "gesturelib.h"
#include "recognizer.h"

Go to the source code of this file.

Data Structures

struct  zoom
 Data structure for zoom gesture data. More...
 

Typedefs

typedef struct zoom zoom_t
 Data structure for zoom gesture data. More...
 

Functions

void init_zoom ()
 Initialize zoom data structures. More...
 
void recognize_zoom (const touch_event_t *event)
 Recognize zoom gesture. This gesture locks the number of fingers once any finger starts moving. More...
 
const zoom_tget_zoom ()
 Access array of zoom_t of size MAX_TOUCHES. More...
 
int set_on_zoom (void(*listener)(const zoom_t *))
 Subscribe listener to zoom gesture updates. More...
 

Typedef Documentation

◆ zoom_t

typedef struct zoom zoom_t

Data structure for zoom gesture data.

Function Documentation

◆ get_zoom()

const zoom_t* get_zoom ( )

Access array of zoom_t of size MAX_TOUCHES.

Returns
Pointer to first element of array of zoom_t of size MAX_TOUCHES

Definition at line 54 of file zoom.c.

◆ init_zoom()

void init_zoom ( )

Initialize zoom data structures.

Definition at line 9 of file zoom.c.

◆ recognize_zoom()

void recognize_zoom ( const touch_event_t event)

Recognize zoom gesture. This gesture locks the number of fingers once any finger starts moving.

Parameters
eventtouch event to recognize

Definition at line 19 of file zoom.c.

◆ set_on_zoom()

int set_on_zoom ( void(*)(const zoom_t *)  listener)

Subscribe listener to zoom gesture updates.

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

Definition at line 58 of file zoom.c.