1 /***************************************************************************
4 * Copyright (C) 2011 Ryan Bourgeois <bluedragonx@gmail.com>
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.
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.
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
20 **************************************************************************/
22 #ifndef MTRACK_PROPS_H
23 #define MTRACK_PROPS_H
25 #include <xorg-server.h>
26 #include <xf86Module.h>
28 #include <X11/Xatom.h>
30 #include <xf86Xinput.h>
36 #define XATOM_FLOAT "FLOAT"
40 #define MTRACK_PROP_TRACKPAD_DISABLE "Trackpad Disable Input"
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"
94 // Adjustable Properties
96 Atom trackpad_disable;
100 Atom button_emulate_settings;
101 Atom button_emulate_values;
108 Atom gesture_settings;
123 void mprops_init(struct MConfig* cfg, InputInfoPtr local);
124 int mprops_set_property(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, BOOL checkonly);