event_list_alloc()

Updated: May 06, 2022

Allocate and initialize an event list

Synopsis:

#include <gestures/event_list.h>
struct event_list* event_list_alloc(unsigned init_size,
                                    unsigned grow_size,
                                    unsigned max_size,
                                    int allow_compress)

Arguments:

init_size
The initial size of the list, in number of events.
grow_size
The size by which a list is to be grown when full, in number of events.
max_size
The maximum size a list will be allowed to grow to, in number of events.
allow_compress
Allow move events to be dropped to make room in the list.

Library:

libgestures

Description:

This function allocates and initializes a new event list. If init_size, grow_size and max_size are all zero, the defaults values of 256, 128 and 1024, respectively, are used. If the allow_compress parameter is non-zero, touch events of type INPUT_EVENT_MTOUCH_MOVE will be deleted from the list when it is full to make room for more items.

Returns:

The newly allocated event list on success, NULL on failure