Initial code release
[adaptation/xorg-drv-mtev.git] / src / caps.h
1 /***************************************************************************
2  *
3  * Multitouch protocol X driver
4  * Copyright (C) 2008 Henrik Rydberg <rydberg@euromail.se>
5  * Copyright (C) 2009,2010 Nokia Corporation
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20  *
21  **************************************************************************/
22
23 #ifndef CAPABILITIES_H
24 #define CAPABILITIES_H
25
26 #include "common.h"
27 #include <linux/input.h>
28
29 struct mtev_caps {
30         bool has_left, has_middle;
31         bool has_right, has_mtdata;
32         bool has_touch_major, has_touch_minor;
33         bool has_width_major, has_width_minor;
34         bool has_orientation, has_tracking_id;
35         bool has_position_x, has_position_y;
36         struct input_absinfo abs_touch_major;
37         struct input_absinfo abs_touch_minor;
38         struct input_absinfo abs_width_major;
39         struct input_absinfo abs_width_minor;
40         struct input_absinfo abs_orientation;
41         struct input_absinfo abs_position_x;
42         struct input_absinfo abs_position_y;
43         struct input_absinfo abs_tracking_id;
44 };
45
46 int caps_read(struct mtev_caps *caps, int fd);
47 void caps_output(const struct mtev_caps *caps);
48
49 #endif