-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtouch.h
More file actions
29 lines (25 loc) · 807 Bytes
/
touch.h
File metadata and controls
29 lines (25 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <libinput.h>
#include "matrix.h"
#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
/* Our points for the calibration must be not be on a line */
static const struct {
float x_ratio, y_ratio;
} test_ratios[] = {
{ 0.20, 0.40 },
{ 0.80, 0.60 },
{ 0.40, 0.80 }
};
struct calibrator {
struct tests {
double drawn_x, drawn_y;
double clicked_x, clicked_y;
} tests[ARRAY_LENGTH(test_ratios)];
int current_test;
};
void print_touch_event_with_coords(struct libinput_event *);
int handle_events(struct libinput *, struct calibrator *);
int open_restricted(const char *, int, void *);
void close_restricted(int , void *);
int open_udev(struct libinput **);
void finish_calibration (struct calibrator *, struct weston_matrix *);
void rotate_calibration_matrix(struct weston_matrix *, int );