Date: Sun, 8 Jun 2014 09:49:43 +0000 (UTC) From: Jakub Wojciech Klama <jceel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r267222 - in user/jceel/soc2014_evdev/contrib: . xf86-input-evdev xf86-input-evdev/include xf86-input-evdev/man xf86-input-evdev/src Message-ID: <201406080949.s589nhJ9071271@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jceel Date: Sun Jun 8 09:49:42 2014 New Revision: 267222 URL: http://svnweb.freebsd.org/changeset/base/267222 Log: Import xf86-input-evdev 2.3.3. Added: user/jceel/soc2014_evdev/contrib/ user/jceel/soc2014_evdev/contrib/xf86-input-evdev/ user/jceel/soc2014_evdev/contrib/xf86-input-evdev/.gitignore user/jceel/soc2014_evdev/contrib/xf86-input-evdev/COPYING user/jceel/soc2014_evdev/contrib/xf86-input-evdev/Makefile.am (contents, props changed) user/jceel/soc2014_evdev/contrib/xf86-input-evdev/README user/jceel/soc2014_evdev/contrib/xf86-input-evdev/autogen.sh (contents, props changed) user/jceel/soc2014_evdev/contrib/xf86-input-evdev/configure.ac user/jceel/soc2014_evdev/contrib/xf86-input-evdev/include/ user/jceel/soc2014_evdev/contrib/xf86-input-evdev/include/Makefile.am (contents, props changed) user/jceel/soc2014_evdev/contrib/xf86-input-evdev/include/evdev-properties.h (contents, props changed) user/jceel/soc2014_evdev/contrib/xf86-input-evdev/man/ user/jceel/soc2014_evdev/contrib/xf86-input-evdev/man/Makefile.am (contents, props changed) user/jceel/soc2014_evdev/contrib/xf86-input-evdev/man/evdev.man user/jceel/soc2014_evdev/contrib/xf86-input-evdev/src/ user/jceel/soc2014_evdev/contrib/xf86-input-evdev/src/Makefile.am (contents, props changed) user/jceel/soc2014_evdev/contrib/xf86-input-evdev/src/draglock.c (contents, props changed) user/jceel/soc2014_evdev/contrib/xf86-input-evdev/src/emuMB.c (contents, props changed) user/jceel/soc2014_evdev/contrib/xf86-input-evdev/src/emuWheel.c (contents, props changed) user/jceel/soc2014_evdev/contrib/xf86-input-evdev/src/evdev.c (contents, props changed) user/jceel/soc2014_evdev/contrib/xf86-input-evdev/src/evdev.h (contents, props changed) user/jceel/soc2014_evdev/contrib/xf86-input-evdev/xorg-evdev.pc.in (contents, props changed) Added: user/jceel/soc2014_evdev/contrib/xf86-input-evdev/.gitignore ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/jceel/soc2014_evdev/contrib/xf86-input-evdev/.gitignore Sun Jun 8 09:49:42 2014 (r267222) @@ -0,0 +1,28 @@ +*.patch +ChangeLog +Makefile +Makefile.in +aclocal.m4 +autom4te.cache +config.guess +config.h +config.h.in +config.log +config.status +config.sub +configure +depcomp +install-sh +libtool +ltmain.sh +man/evdev.4 +missing +.deps +.libs +*.lo +*.la +stamp-h1 +xf86-input-evdev-*.tar.* +*.pc +*~ +tags Added: user/jceel/soc2014_evdev/contrib/xf86-input-evdev/COPYING ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/jceel/soc2014_evdev/contrib/xf86-input-evdev/COPYING Sun Jun 8 09:49:42 2014 (r267222) @@ -0,0 +1,95 @@ +Various copyright notices found in this driver: + +Copyright © 2004-2008 Red Hat, Inc. + +Permission to use, copy, modify, distribute, and sell this software +and its documentation for any purpose is hereby granted without +fee, provided that the above copyright notice appear in all copies +and that both that copyright notice and this permission notice +appear in supporting documentation, and that the name of Red Hat +not be used in advertising or publicity pertaining to distribution +of the software without specific, written prior permission. Red +Hat makes no representations about the suitability of this software +for any purpose. It is provided "as is" without express or implied +warranty. + +THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN +NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Copyright 2005 Sun Microsystems, Inc. All rights reserved. + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +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 OPEN GROUP 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. + +Except as contained in this notice, the name of the copyright holders shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the copyright holders. + +Copyright © 2008 University of South Australia +copyrights taken from xf86-input-mouse, partly valid for this driver. +Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. +Copyright 1993 by David Dawes <dawes@xfree86.org> +Copyright 2002 by SuSE Linux AG, Author: Egbert Eich +Copyright 1994-2002 by The XFree86 Project, Inc. +Copyright 2002 by Paul Elliott + +Permission to use, copy, modify, distribute, and sell this software +and its documentation for any purpose is hereby granted without +fee, provided that the above copyright notice appear in all copies +and that both that copyright notice and this permission notice +appear in supporting documentation, and that the name of the authors +not be used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. The authors make no +representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied +warranty. + +THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN +NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +Copyright 2005 Adam Jackson. + +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 +on the rights to use, copy, modify, merge, publish, distribute, sub +license, 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 (including the next +paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL +ADAM JACKSON 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. + Added: user/jceel/soc2014_evdev/contrib/xf86-input-evdev/Makefile.am ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/jceel/soc2014_evdev/contrib/xf86-input-evdev/Makefile.am Sun Jun 8 09:49:42 2014 (r267222) @@ -0,0 +1,40 @@ +# Copyright 2005 Adam Jackson. +# +# 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 +# on the rights to use, copy, modify, merge, publish, distribute, sub +# license, 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 (including the next +# paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL +# ADAM JACKSON 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. + +AUTOMAKE_OPTIONS = foreign + +# Ensure headers are installed below $(prefix) for distcheck +DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir='$${includedir}/xorg' + +SUBDIRS = src man include + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = xorg-evdev.pc + +EXTRA_DIST = ChangeLog + +MAINTAINERCLEANFILES=ChangeLog + +.PHONY: ChangeLog + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog Added: user/jceel/soc2014_evdev/contrib/xf86-input-evdev/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/jceel/soc2014_evdev/contrib/xf86-input-evdev/README Sun Jun 8 09:49:42 2014 (r267222) @@ -0,0 +1,20 @@ +xf86-input-evdev - Generic Linux input driver for the Xorg X server + +Please submit bugs & patches to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/driver/xf86-input-evdev + + http://cgit.freedesktop.org/xorg/driver/xf86-input-evdev + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage Added: user/jceel/soc2014_evdev/contrib/xf86-input-evdev/autogen.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/jceel/soc2014_evdev/contrib/xf86-input-evdev/autogen.sh Sun Jun 8 09:49:42 2014 (r267222) @@ -0,0 +1,12 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +$srcdir/configure --enable-maintainer-mode "$@" Added: user/jceel/soc2014_evdev/contrib/xf86-input-evdev/configure.ac ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/jceel/soc2014_evdev/contrib/xf86-input-evdev/configure.ac Sun Jun 8 09:49:42 2014 (r267222) @@ -0,0 +1,77 @@ +# Copyright 2005 Adam Jackson. +# +# 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 +# on the rights to use, copy, modify, merge, publish, distribute, sub +# license, 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 (including the next +# paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL +# ADAM JACKSON 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. +# +# Process this file with autoconf to produce a configure script + +AC_PREREQ(2.57) +AC_INIT([xf86-input-evdev], + 2.3.3, + [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], + xf86-input-evdev) + +AC_CONFIG_SRCDIR([Makefile.am]) +AC_CONFIG_AUX_DIR(.) +AM_INIT_AUTOMAKE([dist-bzip2]) + +AM_MAINTAINER_MODE + +# Require xorg-macros: XORG_DEFAULT_OPTIONS +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.3 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.3) +AM_CONFIG_HEADER([config.h]) + +# Checks for programs. +AC_DISABLE_STATIC +AC_PROG_LIBTOOL +AC_PROG_CC +XORG_DEFAULT_OPTIONS + +AH_TOP([#include "xorg-server.h"]) + +AC_ARG_WITH(xorg-module-dir, + AC_HELP_STRING([--with-xorg-module-dir=DIR], + [Default xorg module directory [[default=$libdir/xorg/modules]]]), + [moduledir="$withval"], + [moduledir="$libdir/xorg/modules"]) +inputdir=${moduledir}/input +AC_SUBST(inputdir) + +# Checks for pkg-config packages. We need to be able to override sdkdir +# to satisfy silly distcheck requirements. +PKG_CHECK_MODULES(XORG, xorg-server xproto $REQUIRED_MODULES) +XORG_CFLAGS="$CWARNFLAGS $XORG_CFLAGS" +AC_ARG_WITH([sdkdir], [], + [sdkdir="$withval"], + [sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`]) +AC_SUBST([sdkdir]) + +# Checks for libraries. + +# Checks for header files. +AC_HEADER_STDC + +DRIVER_NAME=evdev +AC_SUBST([DRIVER_NAME]) + +AC_OUTPUT([Makefile + src/Makefile + man/Makefile + include/Makefile + xorg-evdev.pc]) Added: user/jceel/soc2014_evdev/contrib/xf86-input-evdev/include/Makefile.am ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/jceel/soc2014_evdev/contrib/xf86-input-evdev/include/Makefile.am Sun Jun 8 09:49:42 2014 (r267222) @@ -0,0 +1,2 @@ +EXTRA_DIST = evdev-properties.h +sdk_HEADERS = evdev-properties.h Added: user/jceel/soc2014_evdev/contrib/xf86-input-evdev/include/evdev-properties.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/jceel/soc2014_evdev/contrib/xf86-input-evdev/include/evdev-properties.h Sun Jun 8 09:49:42 2014 (r267222) @@ -0,0 +1,69 @@ +/* + * Copyright © 2008 Red Hat, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without + * fee, provided that the above copyright notice appear in all copies + * and that both that copyright notice and this permission notice + * appear in supporting documentation, and that the name of Red Hat + * not be used in advertising or publicity pertaining to distribution + * of the software without specific, written prior permission. Red + * Hat makes no representations about the suitability of this software + * for any purpose. It is provided "as is" without express or implied + * warranty. + * + * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN + * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Authors: + * Peter Hutterer (peter.hutterer@redhat.com) + */ + + +#ifndef _EVDEV_PROPERTIES_H_ +#define _EVDEV_PROPERTIES_H_ + +/* Middle mouse button emulation */ +/* BOOL */ +#define EVDEV_PROP_MIDBUTTON "Evdev Middle Button Emulation" +/* CARD32 */ +#define EVDEV_PROP_MIDBUTTON_TIMEOUT "Evdev Middle Button Timeout" + +/* Wheel emulation */ +/* BOOL */ +#define EVDEV_PROP_WHEEL "Evdev Wheel Emulation" +/* CARD8, 4 values [x up, x down, y up, y down], 0 to disable a value*/ +#define EVDEV_PROP_WHEEL_AXES "Evdev Wheel Emulation Axes" +/* CARD16 */ +#define EVDEV_PROP_WHEEL_INERTIA "Evdev Wheel Emulation Inertia" +/* CARD16 */ +#define EVDEV_PROP_WHEEL_TIMEOUT "Evdev Wheel Emulation Timeout" +/* CARD8, value range 0-32, 0 to always scroll */ +#define EVDEV_PROP_WHEEL_BUTTON "Evdev Wheel Emulation Button" + +/* Drag lock */ +/* CARD8, either 1 value or pairs, value range 0-32, 0 to disable a value*/ +#define EVDEV_PROP_DRAGLOCK "Evdev Drag Lock Buttons" + +/* Axis inversion */ +/* BOOL, 2 values [x, y], 1 inverts axis */ +#define EVDEV_PROP_INVERT_AXES "Evdev Axis Inversion" + +/* Reopen attempts. */ +/* CARD8 */ +#define EVDEV_PROP_REOPEN "Evdev Reopen Attempts" + +/* Run-time calibration */ +/* CARD32, 4 values [minx, maxx, miny, maxy], or no values for unset */ +#define EVDEV_PROP_CALIBRATION "Evdev Axis Calibration" + +/* Swap x and y axis. */ +/* BOOL */ +#define EVDEV_PROP_SWAP_AXES "Evdev Axes Swap" + +#endif Added: user/jceel/soc2014_evdev/contrib/xf86-input-evdev/man/Makefile.am ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/jceel/soc2014_evdev/contrib/xf86-input-evdev/man/Makefile.am Sun Jun 8 09:49:42 2014 (r267222) @@ -0,0 +1,57 @@ +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation. +# +# 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 OPEN GROUP 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. +# +# Except as contained in this notice, the name of the copyright holders shall +# not be used in advertising or otherwise to promote the sale, use or +# other dealings in this Software without prior written authorization +# from the copyright holders. +# + +drivermandir = $(DRIVER_MAN_DIR) + +driverman_PRE = @DRIVER_NAME@.man + +driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@) + +EXTRA_DIST = @DRIVER_NAME@.man + +CLEANFILES = $(driverman_DATA) + +SED = sed + +# Strings to replace in man pages +XORGRELSTRING = @PACKAGE_STRING@ + XORGMANNAME = X Version 11 + +MAN_SUBSTS = \ + -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ + -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ + -e 's|__xservername__|Xorg|g' \ + -e 's|__xconfigfile__|xorg.conf|g' \ + -e 's|__projectroot__|$(prefix)|g' \ + -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \ + -e 's|__drivermansuffix__|$(DRIVER_MAN_SUFFIX)|g' \ + -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \ + -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \ + -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' + +SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man + +.man.$(DRIVER_MAN_SUFFIX): + sed $(MAN_SUBSTS) < $< > $@ Added: user/jceel/soc2014_evdev/contrib/xf86-input-evdev/man/evdev.man ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/jceel/soc2014_evdev/contrib/xf86-input-evdev/man/evdev.man Sun Jun 8 09:49:42 2014 (r267222) @@ -0,0 +1,232 @@ +.\" shorthand for double quote that works everywhere. +.ds q \N'34' +.TH EVDEV __drivermansuffix__ __vendorversion__ +.SH NAME +evdev \- Generic Linux input driver +.SH SYNOPSIS +.nf +.B "Section \*qInputDevice\*q" +.BI " Identifier \*q" devname \*q +.B " Driver \*qevdev\*q" +.BI " Option \*qDevice\*q \*q" devpath \*q +.BI " Option \*qEmulate3Buttons\*q \*q" True \*q +.BI " Option \*qEmulate3Timeout\*q \*q" 50 \*q +.BI " Option \*qGrabDevice\*q \*q" False \*q +\ \ ... +.B EndSection +.fi +.SH DESCRIPTION +.B evdev +is an __xservername__ input driver for Linux\'s generic event devices. It +therefore supports all input devices that the kernel knows about, including +most mice and keyboards. +.PP +The +.B evdev +driver can serve as both a pointer and a keyboard input device, and may be +used as both the core keyboard and the core pointer. Multiple input devices +are supported by multiple instances of this driver, with one Load +directive for evdev in the Module section of your __xconfigfile__ for each +input device that will use this driver. +.PP +.SH SUPPORTED HARDWARE +In general, any input device that the kernel has a driver for can be accessed +through the +.B evdev +driver. See the Linux kernel documentation for a complete list. +.PP +.SH CONFIGURATION DETAILS +Please refer to __xconfigfile__(__filemansuffix__) for general configuration +details and for options that can be used with all input drivers. This +section only covers configuration details specific to this driver. +.PP +The following driver +.B Options +are supported: +.TP 7 +.BI "Option \*qButtonMapping\*q \*q" string \*q +Sets the button mapping for this device. The mapping is a space-separated list +of button mappings that correspond in order to the physical buttons on the +device (i.e. the first number is the mapping for button 1, etc.). The default +mapping is "1 2 3 ... 32". A mapping of 0 deactivates the button. Multiple +buttons can have the same mapping. +For example, a left-handed mouse with deactivated scroll-wheel would use a +mapping of "3 2 1 0 0". Invalid mappings are ignored and the default mapping +is used. Buttons not specified in the user's mapping use the default mapping. +.TP 7 +.BI "Option \*qDevice\*q \*q" string \*q +Specifies the device through which the device can be accessed. This will +generally be of the form \*q/dev/input/eventX\*q, where X is some integer. +The mapping from device node to hardware is system-dependent. +.TP 7 +.BI "Option \*qDragLockButtons\*q \*q" "L1 B2 L3 B4" \*q +Sets \*qdrag lock buttons\*q that simulate holding a button down, so +that low dexterity people do not have to hold a button down at the +same time they move a mouse cursor. Button numbers occur in pairs, +with the lock button number occurring first, followed by the button +number that is the target of the lock button. Property: "Evdev +Drag Lock Buttons". +.TP 7 +.BI "Option \*qDragLockButtons\*q \*q" "M1" \*q +Sets a \*qmaster drag lock button\*q that acts as a \*qMeta Key\*q +indicating that the next button pressed is to be +\*qdrag locked\*q. Property: "Evdev Drag Lock Buttons". +.TP 7 +.TP 7 +.BI "Option \*qEmulate3Buttons\*q \*q" boolean \*q +Enable/disable the emulation of the third (middle) mouse button for mice +which only have two physical buttons. The third button is emulated by +pressing both buttons simultaneously. Default: on, until a middle mouse +button event is registered. Property: "Evdev Middle Button Emulation". +.TP 7 +.BI "Option \*qEmulate3Timeout\*q \*q" integer \*q +Sets the timeout (in milliseconds) that the driver waits before deciding +if two buttons where pressed "simultaneously" when 3 button emulation is +enabled. Default: 50. Property: "Evdev Middle Button Timeout". +.TP 7 +.BI "Option \*qEmulateWheel\*q \*q" boolean \*q +Enable/disable "wheel" emulation. Wheel emulation means emulating button +press/release events when the mouse is moved while a specific real button +is pressed. Wheel button events (typically buttons 4 and 5) are +usually used for scrolling. Wheel emulation is useful for getting wheel-like +behaviour with trackballs. It can also be useful for mice with 4 or +more buttons but no wheel. See the description of the +.BR EmulateWheelButton , +.BR EmulateWheelInertia , +.BR EmulateWheelTimeout , +.BR XAxisMapping , +and +.B YAxisMapping +options. Default: off. Property "Evdev Wheel Emulation". +.TP 7 +.BI "Option \*qEmulateWheelButton\*q \*q" integer \*q +Specifies which button must be held down to enable wheel emulation mode. +While this button is down, X and/or Y pointer movement will generate button +press/release events as specified for the +.B XAxisMapping +and +.B YAxisMapping +settings. If the button is 0 and +.BR EmulateWheel +is on, any motion of the device is converted into wheel events. Default: 4. +Property: "Evdev Wheel Emulation Button". +.TP 7 +.BI "Option \*qEmulateWheelInertia\*q \*q" integer \*q +Specifies how far (in pixels) the pointer must move to generate button +press/release events in wheel emulation mode. Default: 10. Property: "Evdev +Wheel Emulation Inertia". +.TP 7 +.BI "Option \*qEmulateWheelTimeout\*q \*q" integer \*q +Specifies the time in milliseconds the +.BR EmulateWheelButton +must be pressed before wheel emulation is started. If the +.BR EmulateWheelButton +is released before this timeout, the original button press/release event +is sent. Default: 200. Property: "Evdev Wheel Emulation Timeout". +.TP 7 +.BI "Option \*qGrabDevice\*q \*q" boolean \*q +Force a grab on the event device. Doing so will ensure that no other driver +can initialise the same device and it will also stop the device from sending +events to /dev/kbd or /dev/input/mice. Events from this device will not be +sent to virtual devices (e.g. rfkill or the Macintosh mouse button emulation). +Default: disabled. +.TP 7 +.BI "Option \*qInvertX\*q \*q" Bool \*q +.TP 7 +.BI "Option \*qInvertY\*q \*q" Bool \*q +Invert the given axis. Default: off. Property: "Evdev Axis Inversion". +.TP 7 +.BI "Option \*qIgnoreRelativeAxes\*q \*q" Bool \*q +.TP 7 +.BI "Option \*qIgnoreAbsoluteAxes\*q \*q" Bool \*q +Ignore the specified type of axis. Default: unset. The X server cannot deal +with devices that have both relative and absolute axes. Evdev tries to guess +wich axes to ignore given the device type and disables absolute axes for +mice and relative axes for tablets, touchscreens and touchpad. These options +allow to forcibly disable an axis type. Mouse wheel axes are exempt and will +work even if relative axes are ignored. No property, this configuration must +be set in the configuration. +.br +If either option is set to False, the driver will not ignore the specified +axes regardless of the presence of other axes. This may trigger buggy +behavior and events from this axis are always forwarded. Users are +discouraged from setting this option. +.TP 7 +.BI "Option \*qReopenAttempts\*q \*q" integer \*q +Number of reopen attempts after a read error occurs on the device (e.g. after +waking up from suspend). In between each attempt is a 100ms wait. Default: 10. +.TP 7 +.BI "Option \*qCalibration\*q \*q" "min-x max-x min-y max-y" \*q +Calibrates the X and Y axes for devices that need to scale to a different +coordinate system than reported to the X server. This feature is required +for devices that need to scale to a different coordinate system than +originally reported by the kernel (e.g. touchscreens). The scaling to the +custom coordinate system is done in-driver and the X server is unaware of +the transformation. Property: "Evdev Axis Calibration". +.TP 7 +.BI "Option \*qSwapAxes\*q \*q" Bool \*q +Swap x/y axes. Default: off. Property: "Evdev Axes Swap". +.TP 7 +.BI "Option \*qXAxisMapping\*q \*q" "N1 N2" \*q +Specifies which buttons are mapped to motion in the X direction in wheel +emulation mode. Button number +.I N1 +is mapped to the negative X axis motion and button number +.I N2 +is mapped to the positive X axis motion. Default: no mapping. Property: +"Evdev Wheel Emulation Axes". +.TP 7 +.BI "Option \*qYAxisMapping\*q \*q" "N1 N2" \*q +Specifies which buttons are mapped to motion in the Y direction in wheel +emulation mode. Button number +.I N1 +is mapped to the negative Y axis motion and button number +.I N2 +is mapped to the positive Y axis motion. Default: "4 5". Property: +"Evdev Wheel Emulation Axes". + +.SH SUPPORTED PROPERTIES +The following properties are provided by the +.B evdev +driver. +.TP 7 +.BI "Evdev Axis Calibration" +4 32-bit values, order min-x, max-x, min-y, max-y or 0 values to disable +in-driver axis calibration. +.TP 7 +.BI "Evdev Axis Inversion" +2 boolean values (8 bit, 0 or 1), order X, Y. 1 inverts the axis. +.TP 7 +.BI "Evdev Axes Swap" +1 boolean value (8 bit, 0 or 1). 1 swaps x/y axes. +.TP 7 +.BI "Evdev Drag Lock Buttons" +8-bit. Either 1 value or pairs of values. Value range 0-32, 0 disables a +value. +.TP 7 +.BI "Evdev Middle Button Emulation" +1 boolean value (8 bit, 0 or 1). +.TP 7 +.BI "Evdev Middle Button Timeout" +1 16-bit positive value. +.TP 7 +.BI "Evdev Wheel Emulation" +1 boolean value (8 bit, 0 or 1). +.TP 7 +.BI "Evdev Wheel Emulation Axes" +4 8-bit values, order X up, X down, Y up, Y down. 0 disables a value. +.TP 7 +.BI "Evdev Wheel Emulation Button" +1 8-bit value, allowed range 0-32, 0 disables the button. +.TP 7 +.BI "Evdev Wheel Emulation Inertia" +1 16-bit positive value. +.TP 7 +.BI "Evdev Wheel Emulation Timeout" +1 16-bit positive value. + +.SH AUTHORS +Kristian Høgsberg. +.SH "SEE ALSO" +__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__), +README.mouse. Added: user/jceel/soc2014_evdev/contrib/xf86-input-evdev/src/Makefile.am ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/jceel/soc2014_evdev/contrib/xf86-input-evdev/src/Makefile.am Sun Jun 8 09:49:42 2014 (r267222) @@ -0,0 +1,40 @@ +# Copyright 2005 Adam Jackson. +# +# 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 +# on the rights to use, copy, modify, merge, publish, distribute, sub +# license, 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 (including the next +# paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL +# ADAM JACKSON 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. + + +# this is obnoxious: +# -module lets us name the module exactly how we want +# -avoid-version prevents gratuitous .0.0.0 version numbers on the end +# _ladir passes a dummy rpath to libtool so the thing will actually link +# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. +AM_CFLAGS = $(XORG_CFLAGS) + +@DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la +@DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version +@DRIVER_NAME@_drv_ladir = @inputdir@ + +INCLUDES=-I$(top_srcdir)/include/ + +@DRIVER_NAME@_drv_la_SOURCES = @DRIVER_NAME@.c \ + @DRIVER_NAME@.h \ + emuMB.c \ + emuWheel.c \ + draglock.c + Added: user/jceel/soc2014_evdev/contrib/xf86-input-evdev/src/draglock.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/jceel/soc2014_evdev/contrib/xf86-input-evdev/src/draglock.c Sun Jun 8 09:49:42 2014 (r267222) @@ -0,0 +1,321 @@ +/* + * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. + * Copyright 1993 by David Dawes <dawes@xfree86.org> + * Copyright 2002 by SuSE Linux AG, Author: Egbert Eich + * Copyright 1994-2002 by The XFree86 Project, Inc. + * Copyright 2002 by Paul Elliott + * (Ported from xf86-input-mouse, above copyrights taken from there) + * Copyright © 2008 University of South Australia + * Copyright 2008 by Chris Salch + * Copyright 2008 Red Hat, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without + * fee, provided that the above copyright notice appear in all copies + * and that both that copyright notice and this permission notice + * appear in supporting documentation, and that the name of the authors + * not be used in advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. The authors make no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied + * warranty. + * + * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN + * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +/* Draglock code */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <xf86.h> +#include <xf86Xinput.h> +#include <X11/Xatom.h> +#include <exevents.h> + +#include <evdev-properties.h> +#include "evdev.h" + +#ifdef HAVE_PROPERTIES +static Atom prop_dlock = 0; /* Drag lock buttons. */ +#endif + +void EvdevDragLockLockButton(InputInfoPtr pInfo, unsigned int button); + + +/* Setup and configuration code */ +void +EvdevDragLockPreInit(InputInfoPtr pInfo) +{ + EvdevPtr pEvdev = (EvdevPtr)pInfo->private; + char *option_string = NULL; + int meta_button = 0; + int lock_button = 0; + char *next_num = NULL; + char *end_str = NULL; + BOOL pairs = FALSE; + + option_string = xf86CheckStrOption(pInfo->options, "DragLockButtons",NULL); + + if (!option_string) + return; + + next_num = option_string; + + /* Loop until we hit the end of our option string */ + while (next_num != NULL) { + lock_button = 0; + meta_button = strtol(next_num, &end_str, 10); + + /* check to see if we found anything */ + if (next_num != end_str) { + /* setup for the next number */ + next_num = end_str; + } else { + /* we have nothing more to parse, drop out of the loop */ + next_num = NULL; + } + + /* Check for a button to lock if we have a meta button */ + if (meta_button != 0 && next_num != NULL ) { + lock_button = strtol(next_num, &end_str, 10); + + /* check to see if we found anything */ + if (next_num != end_str) { + /* setup for the next number */ + next_num = end_str; + } else { + /* we have nothing more to parse, drop out of the loop */ + next_num = NULL; + } + } + + /* Ok, let the user know what we found on this look */ + if (meta_button != 0) { + if (lock_button == 0) { + if (!pairs) { + /* We only have a meta button */ + pEvdev->dragLock.meta = meta_button; + + xf86Msg(X_CONFIG, "%s: DragLockButtons : " + "%i as meta\n", + pInfo->name, meta_button); + } else { + xf86Msg(X_ERROR, "%s: DragLockButtons : " + "Incomplete pair specifying button pairs %s\n", + pInfo->name, option_string); + } + } else { + + /* Do bounds checking to make sure we don't crash */ + if ((meta_button <= EVDEV_MAXBUTTONS) && (meta_button >= 0 ) && + (lock_button <= EVDEV_MAXBUTTONS) && (lock_button >= 0)) { + + xf86Msg(X_CONFIG, "%s: DragLockButtons : %i -> %i\n", + pInfo->name, meta_button, lock_button); + + pEvdev->dragLock.lock_pair[meta_button - 1] = lock_button; + pairs=TRUE; + } else { + /* Let the user know something was wrong + with this pair of buttons */ + xf86Msg(X_CONFIG, "%s: DragLockButtons : " + "Invalid button pair %i -> %i\n", + pInfo->name, meta_button, lock_button); + } + } + } else { + xf86Msg(X_ERROR, "%s: Found DragLockButtons " + "with invalid lock button string : '%s'\n", + pInfo->name, option_string); + + /* This should be the case anyhow, just make sure */ + next_num = NULL; + } + + /* Check for end of string, to avoid annoying error */ + if (next_num != NULL && *next_num == '\0') + next_num = NULL; + } +} + +/* Updates DragLock button state and fires button event messges */ +void +EvdevDragLockLockButton(InputInfoPtr pInfo, unsigned int button) +{ + EvdevPtr pEvdev = (EvdevPtr)pInfo->private; + BOOL state = 0; + + /* update button state */ + state = pEvdev->dragLock.lock_state[button - 1] ? FALSE : TRUE; + pEvdev->dragLock.lock_state[button - 1] = state; + + EvdevQueueButtonEvent(pInfo, button, state); +} + +/* Filter button presses looking for either a meta button or the + * control of a button pair. + * + * @param button button number (1 for left, 3 for right) + * @param value TRUE if button press, FALSE if release + * + * @return TRUE if the event was swallowed here, FALSE otherwise. + */ +BOOL +EvdevDragLockFilterEvent(InputInfoPtr pInfo, unsigned int button, int value) +{ + EvdevPtr pEvdev = (EvdevPtr)pInfo->private; + + if (button == 0) + return FALSE; + + /* Do we have a single meta key or + several button pairings? */ + if (pEvdev->dragLock.meta != 0) { + + if (pEvdev->dragLock.meta == button) { + + /* setup up for button lock */ + if (value) + pEvdev->dragLock.meta_state = TRUE; + + return TRUE; + } else if (pEvdev->dragLock.meta_state) { /* waiting to lock */ + + pEvdev->dragLock.meta_state = FALSE; + + EvdevDragLockLockButton(pInfo, button); + + return TRUE; + } + } else if (pEvdev->dragLock.lock_pair[button - 1] && value) { + /* A meta button in a meta/lock pair was pressed */ + EvdevDragLockLockButton(pInfo, pEvdev->dragLock.lock_pair[button - 1]); + return TRUE; + } + + /* Eat events for buttons that are locked */ + if (pEvdev->dragLock.lock_state[button - 1]) + return TRUE; + + return FALSE; +} + +#ifdef HAVE_PROPERTIES +/** + * Set the drag lock property. + * If only one value is supplied, then this is used as the meta button. + * If more than one value is supplied, then each value is the drag lock button + * for the pair. 0 disables a pair. + * i.e. to set bt 3 to draglock button 1, supply 0,0,1 + */ +static int +EvdevDragLockSetProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val, + BOOL checkonly) +{ + InputInfoPtr pInfo = dev->public.devicePrivate; + EvdevPtr pEvdev = pInfo->private; + + if (atom == prop_dlock) + { + int i; + + if (val->format != 8 || val->type != XA_INTEGER) + return BadMatch; + + /* Don't allow changes while a lock is active */ + if (pEvdev->dragLock.meta) + { + if (pEvdev->dragLock.meta_state) + return BadAccess; + } else + { + for (i = 0; i < EVDEV_MAXBUTTONS; i++) + if (pEvdev->dragLock.lock_state[i]) + return BadValue; + } + + if (val->size == 0) + return BadMatch; + else if (val->size == 1) + { + int meta = *((CARD8*)val->data); + if (meta > EVDEV_MAXBUTTONS) + return BadValue; + + if (!checkonly) + { + pEvdev->dragLock.meta = meta; + memset(pEvdev->dragLock.lock_pair, 0, sizeof(pEvdev->dragLock.lock_pair)); + } + } else if ((val->size % 2) == 0) + { + CARD8* vals = (CARD8*)val->data; + + for (i = 0; i < val->size && i < EVDEV_MAXBUTTONS; i++) + if (vals[i] > EVDEV_MAXBUTTONS) + return BadValue; + + if (!checkonly) + { + pEvdev->dragLock.meta = 0; + memset(pEvdev->dragLock.lock_pair, 0, sizeof(pEvdev->dragLock.lock_pair)); + + for (i = 0; i < val->size && i < EVDEV_MAXBUTTONS; i += 2) + pEvdev->dragLock.lock_pair[vals[i] - 1] = vals[i + 1]; + } + } else + return BadMatch; + } + + return Success; +} + +/** + * Initialise property for drag lock buttons setting. + */ +void +EvdevDragLockInitProperty(DeviceIntPtr dev) +{ + InputInfoPtr pInfo = dev->public.devicePrivate; + EvdevPtr pEvdev = pInfo->private; + + if (!dev->button) /* don't init prop for keyboards */ + return; *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406080949.s589nhJ9071271>