Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
rynbrd committed Apr 14, 2011
0 parents commit 2f06c7b
Show file tree
Hide file tree
Showing 33 changed files with 3,422 additions and 0 deletions.
340 changes: 340 additions & 0 deletions COPYING

Large diffs are not rendered by default.

62 changes: 62 additions & 0 deletions CREDITS
@@ -0,0 +1,62 @@
Multitouch X driver (GPL license)

Copyright (C) 2008 Henrik Rydberg <rydberg@euromail.se>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

---

The Multitouch X driver extracts a lot of X knowledge from the
synaptics X driver (MIT license)

Copyright (C) 1997 C. Scott Ananian
Copyright (C) 1998-2000 Bruce Kalk
Copyright (C) 1999 Henry Davies
Copyright (C) 2001 Stefan Gmeiner
Copyright (C) 2002 Linuxcare Inc. David Kennedy
Copyright (C) 2003 Fred Hucht
Copyright (C) 2003 Neil Brown
Copyright (C) 2003 Jörg Bösner
Copyright (C) 2003 Hartwig Felger
Copyright (C) 2002-2007 Peter Osterlund
Copyright (C) 2004 Arne Schwabe
Copyright (C) 2004 Matthias Ihmig
Copyright (C) 2004 Alexei Gilchrist
Copyright (C) 2006-2007 Christian Thaeter
Copyright (C) 2006 Stefan Bethge
Copyright (C) 2007 Joseph P. Skudlarek
Copyright (C) 2007 Florian Loitsch
Copyright (C) 2008 Fedor P. Goncharov
Copyright (C) 2008-2009 Red Hat, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

---
63 changes: 63 additions & 0 deletions Makefile
@@ -0,0 +1,63 @@
VERSION = 1
PATCHLEVEL = 0
EXTRAVERSION = rc2

LIBRARY = multitouch.so
MODULES = src
XMODULES = driver

o_src = capabilities hwstate mtstate gestures mconfig mtouch trig

o_driver= multitouch

TARGETS += src/test

OBJECTS = $(addsuffix .o,\
$(foreach mod,$(MODULES),\
$(addprefix $(mod)/,$(o_$(mod)))))
XOBJECTS= $(addsuffix .o,\
$(foreach mod,$(XMODULES),\
$(addprefix $(mod)/,$(o_$(mod)))))

TBIN = $(addprefix bin/,$(TARGETS))
TLIB = $(addprefix obj/,$(LIBRARY))
TOBJ = $(addprefix obj/,$(addsuffix .o,$(TARGETS)))
OBJS = $(addprefix obj/,$(OBJECTS))
XOBJS = $(addprefix obj/,$(XOBJECTS))
LIBS = -lmtdev -lm

DLIB = usr/lib/xorg/modules/input

INCLUDE = -Iinclude -I/usr/include/xorg -I/usr/include/pixman-1
OPTS = $(CFLAGS) -O3 -fPIC

.PHONY: all clean
.PRECIOUS: obj/%.o

all: $(OBJS) $(TLIB) $(TOBJ) $(TBIN)

bin/%: obj/%.o $(OBJS)
@mkdir -p $(@D)
gcc $< -o $@ $(OBJS) $(LIBS)

$(TLIB): $(OBJS) $(XOBJS)
@rm -f $(TLIB)
gcc -shared $(OBJS) $(XOBJS) $(LIBS) -Wl,-soname -Wl,$(LIBRARY) -o $@

obj/%.o: %.c
@mkdir -p $(@D)
gcc $(INCLUDE) $(OPTS) -c $< -o $@

obj/%.o: %.cc
@mkdir -p $(@D)
gcc $(INCLUDE) $(OPTS) -c $< -o $@

clean:
rm -rf bin obj

distclean: clean
rm -rf debian/*.log debian/files debian/xf86-input-multitouch*

install: $(TLIB)
install -d "$(DESTDIR)/$(DLIB)"
install -m 755 $(TLIB) "$(DESTDIR)/$(DLIB)"
200 changes: 200 additions & 0 deletions README
@@ -0,0 +1,200 @@
xf86-input-multitouch

The Multitouch X Driver provides gestures support for multitouch
touchpads, in particular those with integrated button.

Copyright
-----------------------------------------------------------
Copyright (C) 2008 Henrik Rydberg <rydberg@euromail.se>
Copyright (C) 2011 Ryan Bourgeois <bluedragonx@gmail.com>


Configuration
-----------------------------------------------------------
The following is a minimal working InputClass section for xorg.conf:

Section "InputClass"
MatchIsTouchpad "on"
Identifier "Touchpads"
Driver "multitouch"
EndSection

Configuration options may be defined inside the InputClass section
to configure the driver. Available options and their defaults are:

FingerHigh
Defines the pressure at which a finger is detected as a touch.
This is a percentage represented as an integer. Default is 5.

FingerLow
Defines the pressure at which a finger is detected as a release.
This is a percentage represented as an integer. Default is 5.

IgnoreThumb
Whether or not to ignore touches that are determined to be thumbs.
Boolean value. Defaults to true.

IgnorePalm
Whether or not to ignore touches that are determined to be palms.
Boolean value. Defaults to true.

DisableOnThumb
Whether or not to disable the entire trackpad when a thumb is touching.
Boolean value. Defaults to false.

DisableOnPalm
Whether or not to disable the entire trackpad when a palm is touching.
Boolean value. Defaults to true.

ThumbRatio
The width/length ratio of what's considered a thumb. It is expected
that a thumb is longer than it is wide. This tells the driver how much
longer. Percentage represented by an integer. Defaults to 70.

ThumbSize
The minimum size of what's considered a thumb. It is expected that a
thumb will be larger than other fingers. This is represented as a
percentage of the touchpad height. Integer value. Defaults to 25.

PalmSize
The minimum size of what's considered a palm. Palms are expected to
be very large on the trackpad. This is an integer value representing
a percentage of the height of the trackpad. Defaults to 40.

ButtonEnable
Whether or not to enable the physical buttons on or near the trackpad.
Boolean value. Defaults to true.

ButtonIntegrated
Whether or not the physical buttons are integrated with the trackpad.
If you have a one-piece trackpad like on newer MacBooks, this should
be set to true. Button emulation depends on this value being correct.
Boolean value. Defaults to true.

ClickFinger1
Which button to emulate when one finger is touching the trackpad during
a click. Integer value. A value of 0 disables one-touch emulation.
Defaults to 3.

ClickFinger2
Which button to emulate when two fingers are touching the trackpad
during a click. Integer value. A value of 0 disabled one-touch emulation.
Defaults to 2.

TapButton1
Which button to emulate for one-finger tapping. Integer value. A value of
0 disables one-finger tapping. Defaults to 1.

TapButton2
Which button to emulate for two-finger tapping. Integer value. A value of
0 disabled two-finger tapping. Defaults to 3.

TapButton3
Which button to emulate for three-finger tapping. Integer value. A value
of 0 disabled three-finger tapping. Defaults to 2.

ClickTime
When tapping, how much time to hold down the emulated button. Integer
value representing milliseconds. Defaults to 100.

MaxTapTime
The amount of time to wait for a tap to release before counting it as a
move. Integer value representing milliseconds. Defaults to 120.

MaxTapMove
How far a touch is allowed to move before counting it is no longer
considered a tap. Integer value. Defaults to 400.

GestureClickTime
When a gesture triggers a click, how much time to hold down the emulated
button. Integer value representing milliseconds. Defaults to 10.

GestureWaitTime
Touches are allowed to transition from one gesture to another. For
example, you may go from scrolling to swiping without releasing your
fingers from the pad. This value is the amount of time you must be
performing the new gesture before it is triggered. This prevents
accidental touches from triggering other gestures. Integer value
representing milliseconds. Defaults to 100.

ScrollDistance
For two finger scrolling. How far you must move your fingers before
a button click is triggered. Integer value. Defaults to 400.

ScrollUpButton
For two finger scrolling. The button that is triggered by scrolling
up. Integer value. A value of 0 disables scrolling up. Defaults to 4.

ScrollDownButton
For two finger scrolling. The button that is triggered by scrolling
down. Integer value. A value of 0 disables scrolling down. Defaults
to 5.

ScrollLeftButton
For two finger scrolling. The button that is triggered by scrolling
left. Integer value. A value of 0 disables scrolling left. Defaults
to 6.

ScrollDownButton
For two finger scrolling. The button that is triggered by scrolling
right. Integer value. A value of 0 disables scrolling right. Defaults
to 7.

SwipeDistance
For three finger swiping. How far you must move your fingers before
a button click is triggered. Integer value. Defaults to 700.

SwipeUpButton
For three finger swiping. The button that is triggered by swiping
up. Integer value. A value of 0 disables swiping up. Defaults to 8.

SwipeDownButton
For three finger swiping. The button that is triggered by swiping
down. Integer value. A value of 0 disables swiping down. Defaults
to 9.

SwipeLeftButton
For three finger swiping. The button that is triggered by swiping
left. Integer value. A value of 0 disables swiping left. Defaults
to 10.

SwipeRightButton
For three finger swiping. The button that is triggered by swiping
right. Integer value. A value of 0 disables swiping right. Defaults
to 11.

ScaleDistance
For pinch scaling. How far you must move your fingers before a
button click is triggered. Integer value. Defaults to 150.

ScaleUpButton
For pinch scaling. The button that is triggered by scaling up.
Integer value. A value of 0 disables scaling up. Defaults to 12.

ScaleDownButton
For pinch scaling. The button that is triggered by scaling down.
Integer value. A value of 0 disables scaling down. Defaults to 13.

RotateDistance
For two finger rotation. How far you must move your fingers before
a button click is triggered. Integer value. Defaults to 150.

RotateLeftButton
For two finger rotation. The button that is triggered by rotating
left. Integer value. A value of 0 disables rotation left. Defaults
to 14.

RotateRightButton
For two finger rotation. The button that is triggered by rotating
right. Integer value. A value of 0 disables rotation right. Defaults
to 14.

TapDragEnable
Whether or not to enable tap-to-drag functionality. Boolean value.
Defaults to true.

TapDragTime
The tap-to-drag timeout. This is how long the driver will wait
after a single tap for a movement event before sending the click.
Integer value representing milliseconds. Defaults to 200.

9 changes: 9 additions & 0 deletions debian/README.Debian
@@ -0,0 +1,9 @@
xf86-input-multitouch Xorg driver

* Install the debian package

* Restart X

Enjoy!

Henrik Rydberg <rydberg@euromail.se>
6 changes: 6 additions & 0 deletions debian/changelog
@@ -0,0 +1,6 @@
xf86-input-multitouch (1.0~rc2-mactel1) unstable; urgency=low

* Introducing the multitouch Xorg input driver

-- Henrik Rydberg <rydberg@euromail.se> Thu, 21 Oct 2010 19:30:17 +0200

1 change: 1 addition & 0 deletions debian/compat
@@ -0,0 +1 @@
5
17 changes: 17 additions & 0 deletions debian/control
@@ -0,0 +1,17 @@
Source: xf86-input-multitouch
Section: misc
Priority: optional
Maintainer: Henrik Rydberg <rydberg@euromail.se>
Build-Depends:
debhelper (>= 5),
xserver-xorg-dev (>= 2:1.7.6.901),
libmtdev-dev (>= 1.0.10)
Standards-Version: 3.7.2
Homepage: http://bitmath.org/code/multitouch/

Package: xf86-input-multitouch
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libmtdev1 (>= 1.0)
Description: Multitouch X input driver
This X input driver provides gestures support for multitouch touchpads,
in particular those with integrated button.
27 changes: 27 additions & 0 deletions debian/copyright
@@ -0,0 +1,27 @@
Source URL: http://bitmath.org/code/multitouch/

Upstream Author: Henrik Rydberg <rydberg@euromail.se>

Copyright:
Copyright (C) 2008 Henrik Rydberg (rydberg@euromail.se)

License:

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Packaging:
Copyright (C) 2008 by Henrik Rydberg <rydberg@euromail.se>
released under GPL 2

1 change: 1 addition & 0 deletions debian/dirs
@@ -0,0 +1 @@

0 comments on commit 2f06c7b

Please sign in to comment.