long_press_gesture_alloc()

Updated: April 19, 2023

Allocate a new long press gesture

Synopsis:

#include <gestures/long_press.h>
gesture_long_press_t* long_press_gesture_alloc(long_press_params_t *params,
                                               gesture_callback_f callback,
                                               struct gestures_set *set)

Arguments:

params
A pointer to the long press gesture parameters.
callback
The function to invoke when the long press gesture changes state.
set
A pointer to the gesture set to add this long press gesture to.

Library:

libgestures

Description:

This function allocates a new long press gesture data structure and initializes it with the specified parameters and callback function, and adds it to the specified gesture set.

Returns:

A pointer to an initialized pinch gesture.