chiark / gitweb /
Offsets: Introduce cfg->pad_xmin and ymin, and cap_get_xmin, ymin
[xf86-input-mtrack.git] / include / mprops.h
1 /***************************************************************************
2  *
3  * Multitouch X driver
4  * Copyright (C) 2011 Ryan Bourgeois <bluedragonx@gmail.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  **************************************************************************/
21
22 #ifndef MTRACK_PROPS_H
23 #define MTRACK_PROPS_H
24
25 #include <xorg-server.h>
26 #include <xf86Module.h>
27
28 #include <X11/Xatom.h>
29 #include <xf86.h>
30 #include <xf86Xinput.h>
31 #include <exevents.h>
32
33 #include "mconfig.h"
34
35 #ifndef XATOM_FLOAT
36 #define XATOM_FLOAT "FLOAT"
37 #endif
38
39 // int, 1 value
40 #define MTRACK_PROP_TRACKPAD_DISABLE "Trackpad Disable Input"
41 // float, 1 value
42 #define MTRACK_PROP_SENSITIVITY "Trackpad Sensitivity"
43 // int, 2 values - finger low, finger high
44 #define MTRACK_PROP_PRESSURE "Trackpad Touch Pressure"
45 // int, 2 values - enable buttons, has integrated button
46 #define MTRACK_PROP_BUTTON_SETTINGS "Trackpad Button Settings"
47 // int, 3-4 values - enable button zones, button move emulation, emulation touch expiration[, enable bottom edge zones]
48 #define MTRACK_PROP_BUTTON_EMULATE_SETTINGS "Trackpad Button Emulation Settings"
49 // int, 3 values - button to emulate with 1 touch, 2 touches, 3 touches
50 #define MTRACK_PROP_BUTTON_EMULATE_VALUES "Trackpad Button Emulation Values"
51 // int, 3 values - click time, touch timeout, invalidate distance
52 #define MTRACK_PROP_TAP_SETTINGS "Trackpad Tap Settings"
53 // int, 3 values - 1 touch button, 2 touch button, 3 touch button, 4 touch button
54 #define MTRACK_PROP_TAP_EMULATE "Trackpad Tap Button Emulation"
55 // int, 2 values - ignore thumb touches, disable trackpad on thumb touches
56 #define MTRACK_PROP_THUMB_DETECT "Trackpad Thumb Detection"
57 // int, 2 values - size, width to length ratio
58 #define MTRACK_PROP_THUMB_SIZE "Trackpad Thumb Size"
59 // int, 2 values - ignore palm touches, disable trackpad on palm touches
60 #define MTRACK_PROP_PALM_DETECT "Trackpad Palm Detection"
61 // int, 1 value - size
62 #define MTRACK_PROP_PALM_SIZE "Trackpad Palm Size"
63 // int, 2 value - button hold, wait time
64 #define MTRACK_PROP_GESTURE_SETTINGS "Trackpad Gesture Settings"
65 // int, 1 value - distance before a scroll event is triggered
66 #define MTRACK_PROP_SCROLL_DIST "Trackpad Scroll Distance"
67 // int, 4 values - up button, down button, left button, right button
68 #define MTRACK_PROP_SCROLL_BUTTONS "Trackpad Scroll Buttons"
69 // int, 1 value - distance before a swipe event is triggered
70 #define MTRACK_PROP_SWIPE_DIST "Trackpad Swipe Distance"
71 // int, 4 values - up button, down button, left button, right button
72 #define MTRACK_PROP_SWIPE_BUTTONS "Trackpad Swipe Buttons"
73 // int, 1 value - distance before a swipe event is triggered
74 #define MTRACK_PROP_SWIPE4_DIST "Trackpad Swipe4 Distance"
75 // int, 4 values - up button, down button, left button, right button
76 #define MTRACK_PROP_SWIPE4_BUTTONS "Trackpad Swipe4 Buttons"
77 // int, 1 value - distance before a scale event is triggered
78 #define MTRACK_PROP_SCALE_DIST "Trackpad Scale Distance"
79 // int, 2 values - up button, down button
80 #define MTRACK_PROP_SCALE_BUTTONS "Trackpad Scale Buttons"
81 // int, 1 value - distance before a rotate event is triggered
82 #define MTRACK_PROP_ROTATE_DIST "Trackpad Rotate Distance"
83 // int, 2 values - left button, right button
84 #define MTRACK_PROP_ROTATE_BUTTONS "Trackpad Rotate Buttons"
85 // int, 4 values - enable, timeout, wait, dist
86 #define MTRACK_PROP_DRAG_SETTINGS "Trackpad Drag Settings"
87 // int, 2 values - invert x axis, invert y axis
88 #define MTRACK_PROP_AXIS_INVERT "Trackpad Axis Inversion"
89
90 struct MProps {
91         // Properties Config
92         Atom float_type;
93
94         // Adjustable Properties
95         Atom api;
96         Atom trackpad_disable;
97         Atom sensitivity;
98         Atom pressure;
99         Atom button_settings;
100         Atom button_emulate_settings;
101         Atom button_emulate_values;
102         Atom tap_settings;
103         Atom tap_emulate;
104         Atom thumb_detect;
105         Atom thumb_size;
106         Atom palm_detect;
107         Atom palm_size;
108         Atom gesture_settings;
109         Atom scroll_dist;
110         Atom scroll_buttons;
111         Atom swipe_dist;
112         Atom swipe_buttons;
113         Atom swipe4_dist;
114         Atom swipe4_buttons;
115         Atom scale_dist;
116         Atom scale_buttons;
117         Atom rotate_dist;
118         Atom rotate_buttons;
119         Atom drag_settings;
120         Atom axis_invert;
121 };
122
123 void mprops_init(struct MConfig* cfg, InputInfoPtr local);
124 int mprops_set_property(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, BOOL checkonly);
125
126 #endif
127