project for a (works on my devices) demo
This commit is contained in:
30
headers/input/touch/touch_data.h
Normal file
30
headers/input/touch/touch_data.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
int64_t x; /* touch horizontal center */
|
||||
int64_t y; /* touch vertical center */
|
||||
} touch_coordinates;
|
||||
|
||||
/* using ultrawide ints (narrowing later) */
|
||||
typedef struct {
|
||||
uint64_t slot_number;
|
||||
uint64_t tracking_id; /* this increases with each new touch */
|
||||
touch_coordinates position;
|
||||
/* ignoring ABS_MT_TOUCH_MAJOR
|
||||
and ABS_MT_WIDTH_MAJOR
|
||||
*/
|
||||
} touch_event;
|
||||
|
||||
touch_event* touch_event_new();
|
||||
|
||||
void touch_event_copy( touch_event *dst, touch_event *src);
|
||||
|
||||
touch_coordinates* new_touch_coordinates_buffer( uint8_t count);
|
||||
|
||||
void free_touch_coordinates_buffer( touch_coordinates* buffer);
|
||||
|
||||
void touch_events_array_copy( touch_event ***dst, touch_event **src, uint8_t count);
|
||||
|
||||
void free_touch_events_array( touch_event **buffer, uint8_t count);
|
||||
Reference in New Issue
Block a user