2
* Permission to use, copy, modify, distribute, and sell this software
3
* and its documentation for any purpose is hereby granted without
4
* fee, provided that the above copyright notice appear in all copies
5
* and that both that copyright notice and this permission notice
6
* appear in supporting documentation, and that the name of Red Hat
7
* not be used in advertising or publicity pertaining to distribution
8
* of the software without specific, written prior permission. Red
9
* Hat makes no representations about the suitability of this software
10
* for any purpose. It is provided "as is" without express or implied
13
* THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
14
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
15
* NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
16
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
17
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
18
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
19
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
25
#include <X11/Xdefs.h>
27
/******************************************************************************
29
* Used by driver and the shared memory configurator
30
*****************************************************************************/
32
RT_TAP = 0, /* Right top corner */
33
RB_TAP, /* Right bottom corner */
34
LT_TAP, /* Left top corner */
35
LB_TAP, /* Left bottom corner */
36
F1_TAP, /* Non-corner tap, one finger */
37
F2_TAP, /* Non-corner tap, two fingers */
38
F3_TAP, /* Non-corner tap, three fingers */
43
F1_CLICK1 = 0, /* Click left, one finger */
44
F2_CLICK1, /* Click left, two fingers */
45
F3_CLICK1, /* Click left, three fingers */
49
#define SYN_MAX_BUTTONS 12 /* Max number of mouse buttons */
51
struct SynapticsHwInfo {
52
unsigned int model_id; /* Model-ID */
53
unsigned int capabilities; /* Capabilities */
54
unsigned int ext_cap; /* Extended Capabilities */
55
unsigned int identity; /* Identification */
56
Bool hasGuest; /* Has a guest mouse */
60
#define SHM_SYNAPTICS 23947
61
typedef struct _SynapticsSHM
63
int version; /* Driver version */
65
/* Current device state */
66
int x, y; /* actual x, y coordinates */
67
int z; /* pressure value */
68
int numFingers; /* number of fingers */
69
int fingerWidth; /* finger width value */
70
int left, right, up, down; /* left/right/up/down buttons */
73
int guest_left, guest_mid, guest_right; /* guest device buttons */
74
int guest_dx, guest_dy; /* guest device movement */
76
/* Probed hardware properties */
77
struct SynapticsHwInfo synhw;
80
int left_edge, right_edge, top_edge, bottom_edge; /* edge coordinates absolute */
81
int finger_low, finger_high, finger_press; /* finger detection values in Z-values */
83
int tap_move; /* max. tapping time and movement in packets and coord. */
84
int single_tap_timeout; /* timeout to recognize a single tap */
85
int tap_time_2; /* max. tapping time for double taps */
86
int click_time; /* The duration of a single click */
87
Bool fast_taps; /* Faster reaction to single taps */
88
int emulate_mid_button_time; /* Max time between left and right button presses to
89
emulate a middle button press. */
90
int emulate_twofinger_z; /* pressure threshold to emulate two finger touch (for Alps) */
91
int scroll_dist_vert; /* Scrolling distance in absolute coordinates */
92
int scroll_dist_horiz; /* Scrolling distance in absolute coordinates */
93
Bool scroll_edge_vert; /* Enable/disable vertical scrolling on right edge */
94
Bool scroll_edge_horiz; /* Enable/disable horizontal scrolling on left edge */
95
Bool scroll_edge_corner; /* Enable/disable continuous edge scrolling when in the corner */
96
Bool scroll_twofinger_vert; /* Enable/disable vertical two-finger scrolling */
97
Bool scroll_twofinger_horiz; /* Enable/disable horizontal two-finger scrolling */
98
Bool special_scroll_area_right; /* Enable/disable autodetection right special scroll area */
99
double min_speed, max_speed, accl; /* movement parameters */
100
double trackstick_speed; /* trackstick mode speed */
101
int edge_motion_min_z; /* finger pressure at which minimum edge motion speed is set */
102
int edge_motion_max_z; /* finger pressure at which maximum edge motion speed is set */
103
int edge_motion_min_speed; /* slowest setting for edge motion speed */
104
int edge_motion_max_speed; /* fastest setting for edge motion speed */
105
Bool edge_motion_use_always; /* If false, egde motion is used only when dragging */
107
Bool updown_button_scrolling; /* Up/Down-Button scrolling or middle/double-click */
108
Bool leftright_button_scrolling; /* Left/right-button scrolling, or two lots of middle button */
109
Bool updown_button_repeat; /* If up/down button being used to scroll, auto-repeat?*/
110
Bool leftright_button_repeat; /* If left/right button being used to scroll, auto-repeat? */
111
int scroll_button_repeat; /* time, in milliseconds, between scroll events being
112
* sent when holding down scroll buttons */
113
int touchpad_off; /* Switches the touchpad off
116
* 2 : Only tapping and scrolling off
118
Bool guestmouse_off; /* Switches the guest mouse off */
119
Bool locked_drags; /* Enable locked drags */
120
int locked_drag_time; /* timeout for locked drags */
121
int tap_action[MAX_TAP]; /* Button to report on tap events */
122
int click_action[MAX_CLICK]; /* Button to report on click with fingers */
123
Bool circular_scrolling; /* Enable circular scrolling */
124
double scroll_dist_circ; /* Scrolling angle radians */
125
int circular_trigger; /* Trigger area for circular scrolling */
126
Bool circular_pad; /* Edge has an oval or circular shape */
127
Bool palm_detect; /* Enable Palm Detection */
128
int palm_min_width; /* Palm detection width */
129
int palm_min_z; /* Palm detection depth */
130
double coasting_speed; /* Coasting threshold scrolling speed */
131
int press_motion_min_z; /* finger pressure at which minimum pressure motion factor is applied */
132
int press_motion_max_z; /* finger pressure at which maximum pressure motion factor is applied */
133
double press_motion_min_factor; /* factor applied on speed when finger pressure is at minimum */
134
double press_motion_max_factor; /* factor applied on speed when finger pressure is at minimum */
135
Bool grab_event_device; /* grab event device for exclusive use? */
139
* Minimum and maximum values for scroll_button_repeat
145
* The x/y limits are taken from the Synaptics TouchPad interfacing Guide,
146
* section 2.3.2, which says that they should be valid regardless of the
147
* actual size of the sensor.
149
#define XMIN_NOMINAL 1472
150
#define XMAX_NOMINAL 5472
151
#define YMIN_NOMINAL 1408
152
#define YMAX_NOMINAL 4448
154
#define XMAX_VALID 6143
156
#endif /* _SYNAPTICS_H_ */