From 5c7ed5f4cdd82bfd0829c11c6f3779db2bd704ab Mon Sep 17 00:00:00 2001 From: Joerg Seitter Date: Fri, 8 Jan 2010 10:44:54 +0100 Subject: added xf86-input-evtouch package Support for touchscreens with xf86 Signed-off-by: Joerg Seitter --- package/Config.in | 1 + package/xf86-input-evtouch/Makefile | 33 +++ package/xf86-input-evtouch/extra/xf86OSmouse.h | 277 +++++++++++++++++++++ package/xf86-input-evtouch/patches/patch-evtouch_c | 174 +++++++++++++ 4 files changed, 485 insertions(+) create mode 100644 package/xf86-input-evtouch/Makefile create mode 100644 package/xf86-input-evtouch/extra/xf86OSmouse.h create mode 100644 package/xf86-input-evtouch/patches/patch-evtouch_c diff --git a/package/Config.in b/package/Config.in index 832ab8893..63ae10491 100644 --- a/package/Config.in +++ b/package/Config.in @@ -544,6 +544,7 @@ source "package/xf86-video-cirrus/Config.in" source "package/xf86-video-geode/Config.in" source "package/xf86-input-mouse/Config.in" source "package/xf86-input-keyboard/Config.in" +source "package/xf86-input-evtouch/Config.in" menu "X Libraries" source "package/libICE/Config.in" diff --git a/package/xf86-input-evtouch/Makefile b/package/xf86-input-evtouch/Makefile new file mode 100644 index 000000000..4f7506523 --- /dev/null +++ b/package/xf86-input-evtouch/Makefile @@ -0,0 +1,33 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= xf86-input-evtouch +PKG_VERSION:= 0.8.8 +PKG_RELEASE:= 1 +PKG_BUILDDEP+= xorg-server +PKG_MD5SUM:= 4d8e092356d8353002f60a4907046c13 +PKG_DESCR:= X11 driver for touchscreen +PKG_SECTION:= x11 +PKG_DEPENDS:= xorg-server kmod-input-evdev +PKG_SITES:= http://www.conan.de/touchscreen/ + +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 + +PKG_TARGET_DEPENDS:= alix1c + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,XF86_INPUT_EVTOUCH,${PKG_NAME},$(PKG_VERSION)-$(PKG_RELEASE),${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +CONFIGURE_STYLE:= gnu +BUILD_STYLE:= auto +INSTALL_STYLE:= auto + +post-install: + ${INSTALL_DIR} ${IDIR_XF86_INPUT_EVTOUCH}/usr/lib/xorg/modules/input + ${CP} ${WRKINST}/usr/lib/xorg/modules/input/evtouch_drv.so \ + ${IDIR_XF86_INPUT_EVTOUCH}/usr/lib/xorg/modules/input/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/xf86-input-evtouch/extra/xf86OSmouse.h b/package/xf86-input-evtouch/extra/xf86OSmouse.h new file mode 100644 index 000000000..09b8525f7 --- /dev/null +++ b/package/xf86-input-evtouch/extra/xf86OSmouse.h @@ -0,0 +1,277 @@ +/* + * Copyright (c) 1999-2003 by The XFree86 Project, 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 holder(s) + * and author(s) 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 holder(s) and author(s). + */ + +/* Public interface to OS-specific mouse support. */ + +#ifndef _XF86OSMOUSE_H_ +#define _XF86OSMOUSE_H_ + +#include "xf86Xinput.h" + +/* Mouse interface classes */ +#define MSE_NONE 0x00 +#define MSE_SERIAL 0x01 /* serial port */ +#define MSE_BUS 0x02 /* old bus mouse */ +#define MSE_PS2 0x04 /* standard read-only PS/2 */ +#define MSE_XPS2 0x08 /* extended PS/2 */ +#define MSE_AUTO 0x10 /* auto-detect (PnP) */ +#define MSE_MISC 0x20 /* The OS layer will identify the + * specific protocol names that are + * supported for this class. */ + +/* Mouse Protocol IDs. */ +typedef enum { + PROT_UNKNOWN = -2, + PROT_UNSUP = -1, /* protocol is not supported */ + PROT_MS = 0, + PROT_MSC, + PROT_MM, + PROT_LOGI, + PROT_LOGIMAN, + PROT_MMHIT, + PROT_GLIDE, + PROT_IMSERIAL, + PROT_THINKING, + PROT_ACECAD, + PROT_VALUMOUSESCROLL, + PROT_PS2, + PROT_GENPS2, + PROT_IMPS2, + PROT_EXPPS2, + PROT_THINKPS2, + PROT_MMPS2, + PROT_GLIDEPS2, + PROT_NETPS2, + PROT_NETSCPS2, + PROT_BM, + PROT_AUTO, + PROT_SYSMOUSE, + PROT_NUMPROTOS /* This must always be last. */ +} MouseProtocolID; + +struct _MouseDevRec; + +typedef int (*GetInterfaceTypesProc)(void); +typedef const char **(*BuiltinNamesProc)(void); +typedef Bool (*CheckProtocolProc)(const char *protocol); +typedef Bool (*BuiltinPreInitProc)(InputInfoPtr pInfo, const char *protocol, + int flags); +typedef const char *(*DefaultProtocolProc)(void); +typedef const char *(*SetupAutoProc)(InputInfoPtr pInfo, int *protoPara); +typedef void (*SetResProc)(InputInfoPtr pInfo, const char* protocol, int rate, + int res); +typedef const char *(*FindDeviceProc)(InputInfoPtr pInfo, const char *protocol, + int flags); +typedef const char *(*GuessProtocolProc)(InputInfoPtr pInfo, int flags); + +/* + * OSMouseInfoRec is used to pass information from the OSMouse layer to the + * OS-independent mouse driver. + */ +typedef struct { + GetInterfaceTypesProc SupportedInterfaces; + BuiltinNamesProc BuiltinNames; + CheckProtocolProc CheckProtocol; + BuiltinPreInitProc PreInit; + DefaultProtocolProc DefaultProtocol; + SetupAutoProc SetupAuto; + SetResProc SetPS2Res; + SetResProc SetBMRes; + SetResProc SetMiscRes; + FindDeviceProc FindDevice; + GuessProtocolProc GuessProtocol; +} OSMouseInfoRec, *OSMouseInfoPtr; + +/* + * SupportedInterfaces: Returns the mouse interface types that the OS support. + * If MSE_MISC is returned, then the BuiltinNames and + * CheckProtocol should be set. + * + * BuiltinNames: Returns the names of the protocols that are fully handled + * in the OS-specific code. These are names that don't appear + * directly in the main "mouse" driver. + * + * CheckProtocol: Checks if the protocol name given is supported by the + * OS. It should return TRUE for both "builtin" protocols and + * protocols of type MSE_MISC that are supported by the OS. + * + * PreInit: The PreInit function for protocols that are builtin. This + * function is passed the protocol name. + * + * DefaultProtocol: Returns the name of a default protocol that should be used + * for the OS when none has been supplied in the config file. + * This should only be set when there is a reasonable default. + * + * SetupAuto: This function can be used to do OS-specific protocol + * auto-detection. It returns the name of the detected protocol, + * or NULL when detection fails. It may also adjust one or more + * of the "protoPara" values for the detected protocol by setting + * then to something other than -1. SetupAuto gets called in two + * ways. The first is before any devices have been opened. This + * can be used when the protocol "Auto" always maps to a single + * protocol type. The second is with the device open, allowing + * OS-specific probing to be done. + * + * SetPS2Res: Set the resolution and sample rate for MSE_PS2 and MSE_XPS2 + * protocol types. + * + * SetBMRes: Set the resolution and sample rate for MSE_BM protocol types. + * + * SetMiscRes: Set the resolution and sample rate for MSE_MISC protocol types. + * + * FindDevice: This function gets called when no Device has been specified + * in the config file. OS-specific methods may be used to guess + * which input device to use. This function is called after the + * pre-open attempts at protocol discovery are done, but before + * the device is open. I.e., after the first SetupAuto() call, + * after the DefaultProtocol() call, but before the PreInit() + * call. Available protocol information may be used in locating + * the default input device. + * + * GuessProtocol: A last resort attempt at guessing the mouse protocol by + * whatever OS-specific means might be available. OS-independent + * things should be in the mouse driver. This function gets + * called after the mouse driver's OS-independent methods have + * failed. + */ + +extern OSMouseInfoPtr xf86OSMouseInit(int flags); + +/* Adjust this when the mouse interface changes. */ + +/* + * History: + * + * 1.0.0 - Everything up to when versioning was started. + * 1.1.0 - FindDevice and GuessProtocol added to OSMouseInfoRec + * 1.2.0 - xisbscale added to MouseDevRec + * + */ + +/* Z axis mapping */ +#define MSE_NOZMAP 0 +#define MSE_MAPTOX -1 +#define MSE_MAPTOY -2 +#define MSE_MAPTOZ -3 +#define MSE_MAPTOW -4 + +/* Generalize for other axes. */ +#define MSE_NOAXISMAP MSE_NOZMAP + +#define MSE_MAXBUTTONS 24 +#define MSE_DFLTBUTTONS 3 + +/* + * Mouse device record. This is shared by the mouse driver and the OSMouse + * layer. + */ + +typedef void (*checkMovementsProc)(InputInfoPtr,int, int); +typedef void (*autoProbeProc)(InputInfoPtr, Bool, Bool); +typedef Bool (*collectDataProc)(struct _MouseDevRec *, unsigned char); +typedef Bool (*dataGoodProc)(struct _MouseDevRec *); + +typedef void (*PostMseEventProc)(InputInfoPtr pInfo, int buttons, + int dx, int dy, int dz, int dw); +typedef void (*MouseCommonOptProc)(InputInfoPtr pInfo); + +typedef struct _MouseDevRec { + PtrCtrlProcPtr Ctrl; + PostMseEventProc PostEvent; + MouseCommonOptProc CommonOptions; + DeviceIntPtr device; + const char * mseDevice; + const char * protocol; + MouseProtocolID protocolID; + MouseProtocolID oldProtocolID; /* hack */ + int class; + int mseModel; + int baudRate; + int oldBaudRate; + int sampleRate; + int lastButtons; + int threshold; /* acceleration */ + int num; + int den; + int buttons; /* # of buttons */ + int emulateState; /* automata state for 2 button mode */ + Bool emulate3Buttons; + Bool emulate3ButtonsSoft; + int emulate3Timeout;/* Timeout for 3 button emulation */ + Bool chordMiddle; + Bool flipXY; + int invX; + int invY; + int mouseFlags; /* Flags to Clear after opening + * mouse dev */ + int truebuttons; /* (not used) + * Arg to maintain before + * emulate3buttons timer callback */ + int resolution; + int negativeZ; /* button mask */ + int positiveZ; /* button mask */ + int negativeW; /* button mask */ + int positiveW; /* button mask */ + pointer buffer; /* usually an XISBuffer* */ + int protoBufTail; + unsigned char protoBuf[8]; + unsigned char protoPara[8]; + unsigned char inSync; /* driver in sync with datastream */ + pointer mousePriv; /* private area */ + InputInfoPtr pInfo; + int origProtocolID; + const char * origProtocol; + Bool emulate3Pending;/* timer waiting */ + CARD32 emulate3Expires;/* time to fire emulation code */ + Bool emulateWheel; + int wheelInertia; + int wheelButton; + int negativeX; /* Button values. Unlike the Z and */ + int positiveX; /* W equivalents, these are button */ + int negativeY; /* values rather than button masks. */ + int positiveY; + int wheelYDistance; + int wheelXDistance; + Bool autoProbe; + checkMovementsProc checkMovements; + autoProbeProc autoProbeMouse; + collectDataProc collectData; + dataGoodProc dataGood; + int angleOffset; + pointer pDragLock; /* drag lock area */ + int xisbscale; /* buffer size for 1 event */ + int wheelButtonTimeout;/* Timeout for the wheel button emulation */ + CARD32 wheelButtonExpires; + int doubleClickSourceButtonMask; + int doubleClickTargetButton; + int doubleClickTargetButtonMask; + int doubleClickOldSourceState; + int lastMappedButtons; + int buttonMap[MSE_MAXBUTTONS]; +} MouseDevRec, *MouseDevPtr; + +#endif /* _XF86OSMOUSE_H_ */ diff --git a/package/xf86-input-evtouch/patches/patch-evtouch_c b/package/xf86-input-evtouch/patches/patch-evtouch_c new file mode 100644 index 000000000..a60a08453 --- /dev/null +++ b/package/xf86-input-evtouch/patches/patch-evtouch_c @@ -0,0 +1,174 @@ +fixed compile for xorg 1.7.1 +--- xf86-input-evtouch-0.8.8.orig/evtouch.c 2008-11-11 09:47:55.000000000 +0100 ++++ xf86-input-evtouch-0.8.8/evtouch.c 2010-01-06 16:11:16.000000000 +0100 +@@ -30,10 +30,10 @@ + + #define _evdev_touch_C_ + +-#include +-#if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(3,9,0,0,0) +-#define XFREE86_V4 +-#endif ++//#include ++//#if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(3,9,0,0,0) ++//#define XFREE86_V4 ++//#endif + + /***************************************************************************** + * Standard Headers +@@ -88,6 +88,11 @@ + + #include + ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3 ++#include ++#include ++#endif ++ + /***************************************************************************** + * Local Headers + ****************************************************************************/ +@@ -132,14 +137,14 @@ InputDriverRec EVTOUCH = { + 0 + }; + +-#ifdef XFree86LOADER ++//#ifdef XFree86LOADER + static XF86ModuleVersionInfo VersionRec = + { + "evtouch", + "Kenan Esau", + MODINFOSTRING1, + MODINFOSTRING2, +- XF86_VERSION_CURRENT, ++ XORG_VERSION_CURRENT, + 0, 8, 8, + ABI_CLASS_XINPUT, + ABI_XINPUT_VERSION, +@@ -167,9 +172,9 @@ Unplug(pointer p) + } + + +-XF86ModuleData evtouchModuleData = {&VersionRec, Plug, Unplug }; ++_X_EXPORT XF86ModuleData evtouchModuleData = {&VersionRec, Plug, Unplug }; + +-#endif /* XFree86LOADER */ ++//#endif /* XFree86LOADER */ + + + static const char *default_options[] = +@@ -581,6 +586,32 @@ DeviceOff (DeviceIntPtr dev) + } + + ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 ++static void xf86WcmInitButtonLabels(Atom *labels, int nlabels) ++{ ++ memset(labels, 0, nlabels * sizeof(Atom)); ++ switch(nlabels) ++ { ++ default: ++ case 7: ++ labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT); ++ case 6: ++ labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT); ++ case 5: ++ labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN); ++ case 4: ++ labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP); ++ case 3: ++ labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); ++ case 2: ++ labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); ++ case 1: ++ labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); ++ break; ++ } ++} ++#endif ++ + + + static Bool +@@ -591,12 +622,21 @@ DeviceInit (DeviceIntPtr dev) + EVTouchPrivatePtr priv = (EVTouchPrivatePtr) (local->private); + unsigned char map[EV_MAX_BUTTONS]; + int i; ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 ++ Atom *axis_labels, *btn_labels; ++#endif + + for (i = 0; i < EV_MAX_BUTTONS; i++) + map[i] = i; + + priv->btn_count = EV_MAX_BUTTONS; + ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 ++ axis_labels = xcalloc(2, sizeof(Atom)); ++ btn_labels = xcalloc(EV_MAX_BUTTONS, sizeof(Atom)); ++ xf86WcmInitButtonLabels(btn_labels, EV_MAX_BUTTONS); ++#endif ++ + /* + * these have to be here instead of in the SetupProc, because when the + * SetupProc is run at server startup, screenInfo is not setup yet +@@ -629,8 +669,18 @@ DeviceInit (DeviceIntPtr dev) + /* + * Device reports button press for 5 buttons. + */ +- if (InitButtonClassDeviceStruct (dev, EV_MAX_BUTTONS, map) == FALSE) ++ if (InitButtonClassDeviceStruct (dev, EV_MAX_BUTTONS, ++ ++ #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 ++ btn_labels, ++ #endif ++ map) == FALSE) + { ++ ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 ++ xfree(btn_labels); ++#endif ++ + ErrorF("Unable to allocate EVTouch touchscreen ButtonClassDeviceStruct\n"); + return BadAlloc; + } +@@ -653,7 +703,12 @@ DeviceInit (DeviceIntPtr dev) + * Device reports motions on 2 axes in absolute coordinates. + * Axes min and max values are reported in raw coordinates. + */ +- if (InitValuatorClassDeviceStruct(dev, 2, xf86GetMotionEvents, ++ if (InitValuatorClassDeviceStruct(dev, 2, ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 ++ axis_labels, ++#endif ++ ++// xf86GetMotionEvents, + local->history_size, Absolute) == FALSE) + { + ErrorF ("Unable to allocate EVTouch touchscreen ValuatorClassDeviceStruct\n"); +@@ -672,7 +727,24 @@ DeviceInit (DeviceIntPtr dev) + EV_AXIS_MAX_RES /* max_res */ ); + xf86InitValuatorDefaults(dev, 1); + #else +- xf86InitValuatorAxisStruct(dev, 0, priv->min_x, priv->max_x, ++ xf86InitValuatorAxisStruct(dev, 0, ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 ++ XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X), ++#endif ++ 0, priv->screen_width, ++ 1024, ++ EV_AXIS_MIN_RES /* min_res */ , ++ EV_AXIS_MAX_RES /* max_res */ ); ++ xf86InitValuatorDefaults(dev, 0); ++ ++ xf86InitValuatorAxisStruct(dev, 1, ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 ++ XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y), ++#endif ++ 0, priv->screen_width, ++ 1024, ++ EV_AXIS_MIN_RES /* min_res */ , ++ EV_AXIS_MAX_RES /* max_res */ ); + xf86InitValuatorDefaults(dev, 1); + #endif + -- cgit v1.2.3 From ec4c5a3cb3c732d16e7aa3f0019844675fd425c1 Mon Sep 17 00:00:00 2001 From: Joerg Seitter Date: Fri, 8 Jan 2010 10:49:34 +0100 Subject: added event input kernel module Added support for event input kernel module Signed-off-by: Joerg Seitter --- mk/modules.mk | 4 ++++ target/linux/config/Config.in.input | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/mk/modules.mk b/mk/modules.mk index 948a68364..f1760baa8 100644 --- a/mk/modules.mk +++ b/mk/modules.mk @@ -979,6 +979,10 @@ $(eval $(call KMOD_template,INPUT_MOUSEDEV,input-mousedev,\ $(MODULES_DIR)/kernel/drivers/input/mousedev \ ,45)) +$(eval $(call KMOD_template,INPUT_EVDEV,input-evdev,\ + $(MODULES_DIR)/kernel/drivers/input/evdev \ +,45)) + # # USB # diff --git a/target/linux/config/Config.in.input b/target/linux/config/Config.in.input index 5f1cffd77..a3afafe0c 100644 --- a/target/linux/config/Config.in.input +++ b/target/linux/config/Config.in.input @@ -38,4 +38,10 @@ config ADK_KPACKAGE_KMOD_INPUT_MOUSEDEV tristate default n +config ADK_KPACKAGE_KMOD_INPUT_EVDEV + prompt "kmod-input-evdev................. Event support" + select ADK_KERNEL_INPUT + tristate + default n + endmenu -- cgit v1.2.3 From 0d0796ca606c51fb3e3d5af7e35376206ff1c741 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 8 Jan 2010 17:19:59 +0100 Subject: add message for nfs root users. device nodes need to be created manually --- package/dialog/Makefile | 2 +- target/alix1c/Makefile | 1 + target/alix2d/Makefile | 1 + target/alix2d13/Makefile | 1 + target/foxboard/Makefile | 1 + target/rb411/Makefile | 1 + target/rb433/Makefile | 1 + target/rb532/Makefile | 1 + target/wrap/Makefile | 1 + 9 files changed, 9 insertions(+), 1 deletion(-) diff --git a/package/dialog/Makefile b/package/dialog/Makefile index 74178cd2b..2763a0946 100644 --- a/package/dialog/Makefile +++ b/package/dialog/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:= dialog PKG_VERSION:= 1.1-20080819 PKG_RELEASE:= 1 -PKG_MD5SUM:= 3caebd641a9f337b980becb4444336c5 +PKG_MD5SUM:= 3caebd641a9f337b980becb4444336c5 PKG_DESCR:= A text gui interface PKG_SECTION:= misc PKG_DEPENDS:= libncurses diff --git a/target/alix1c/Makefile b/target/alix1c/Makefile index 691cf1a08..c17a1ef8a 100644 --- a/target/alix1c/Makefile +++ b/target/alix1c/Makefile @@ -24,5 +24,6 @@ imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL) @echo @echo 'The linux kernel is here: $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel' @echo 'The nfs root tarball is here: ${BIN_DIR}/${ROOTFSTARBALL}' + @echo 'Do not forget to create device nodes for console,null and tty in your nfsroot' @echo 'Login as user root with password linux123 via ssh or console' endif diff --git a/target/alix2d/Makefile b/target/alix2d/Makefile index 691cf1a08..c17a1ef8a 100644 --- a/target/alix2d/Makefile +++ b/target/alix2d/Makefile @@ -24,5 +24,6 @@ imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL) @echo @echo 'The linux kernel is here: $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel' @echo 'The nfs root tarball is here: ${BIN_DIR}/${ROOTFSTARBALL}' + @echo 'Do not forget to create device nodes for console,null and tty in your nfsroot' @echo 'Login as user root with password linux123 via ssh or console' endif diff --git a/target/alix2d13/Makefile b/target/alix2d13/Makefile index 691cf1a08..c17a1ef8a 100644 --- a/target/alix2d13/Makefile +++ b/target/alix2d13/Makefile @@ -24,5 +24,6 @@ imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL) @echo @echo 'The linux kernel is here: $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel' @echo 'The nfs root tarball is here: ${BIN_DIR}/${ROOTFSTARBALL}' + @echo 'Do not forget to create device nodes for console,null and tty in your nfsroot' @echo 'Login as user root with password linux123 via ssh or console' endif diff --git a/target/foxboard/Makefile b/target/foxboard/Makefile index c4a64c26b..facf2fb3e 100644 --- a/target/foxboard/Makefile +++ b/target/foxboard/Makefile @@ -33,5 +33,6 @@ imageinstall: ${BIN_DIR}/${ROOTFSTARBALL} @echo Use sudo ./boot_linux -F -i ${ADK_TARGET}-${FS}-kernel to flash the kernel @echo Do not forget to set network boot jumper, before you start the foxboard @echo ${ROOTFSTARBALL} is your nfs root and can be extracted on your nfs server + @echo 'Do not forget to create device nodes for console,null and tty in your nfsroot' @echo 'Login as user root with password linux123 via ssh or console' endif diff --git a/target/rb411/Makefile b/target/rb411/Makefile index b9ee5932b..4ecfbc47a 100644 --- a/target/rb411/Makefile +++ b/target/rb411/Makefile @@ -14,6 +14,7 @@ ifeq ($(FS),nfsroot) imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL) @echo 'The kernel file is: ${BIN_DIR}/${ADK_TARGET}-${FS}-kernel' @echo 'The nfs root tarball is: ${BIN_DIR}/${ROOTFSTARBALL}' + @echo 'Do not forget to create device nodes for console,null and tty in your nfsroot' @echo 'Login as user root with password linux123 via ssh or console' endif ifeq ($(FS),yaffs) diff --git a/target/rb433/Makefile b/target/rb433/Makefile index b9ee5932b..4ecfbc47a 100644 --- a/target/rb433/Makefile +++ b/target/rb433/Makefile @@ -14,6 +14,7 @@ ifeq ($(FS),nfsroot) imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL) @echo 'The kernel file is: ${BIN_DIR}/${ADK_TARGET}-${FS}-kernel' @echo 'The nfs root tarball is: ${BIN_DIR}/${ROOTFSTARBALL}' + @echo 'Do not forget to create device nodes for console,null and tty in your nfsroot' @echo 'Login as user root with password linux123 via ssh or console' endif ifeq ($(FS),yaffs) diff --git a/target/rb532/Makefile b/target/rb532/Makefile index f0e6028ec..7cf3d7c46 100644 --- a/target/rb532/Makefile +++ b/target/rb532/Makefile @@ -26,5 +26,6 @@ imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL) @echo @echo 'The kernel file is: ${BIN_DIR}/${ADK_TARGET}-${FS}-kernel' @echo 'The nfs root tarball is: ${BIN_DIR}/${ROOTFSTARBALL}' + @echo 'Do not forget to create device nodes for console,null and tty in your nfsroot' @echo 'Login as user root with password linux123 via ssh or console' endif diff --git a/target/wrap/Makefile b/target/wrap/Makefile index 825b55175..77b9d4ab9 100644 --- a/target/wrap/Makefile +++ b/target/wrap/Makefile @@ -24,5 +24,6 @@ imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL) @echo @echo 'The linux kernel is here: $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel' @echo 'The nfs root tarball is: ${BIN_DIR}/${ROOTFSTARBALL}' + @echo 'Do not forget to create device nodes for console,null and tty in your nfsroot' @echo 'Login as user root with password linux123 via ssh or console' endif -- cgit v1.2.3 From 0e2ce1a8e4e679ad913d01267caefe2d9b0eb634 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 8 Jan 2010 18:05:44 +0100 Subject: add patches for xorg 1.7 from archlinux and debian. Works okay now. --- .../patches/patch-ev_calibrate_c | 11 ++ package/xf86-input-evtouch/patches/patch-evtouch_c | 191 ++++++++------------- 2 files changed, 82 insertions(+), 120 deletions(-) create mode 100644 package/xf86-input-evtouch/patches/patch-ev_calibrate_c diff --git a/package/xf86-input-evtouch/patches/patch-ev_calibrate_c b/package/xf86-input-evtouch/patches/patch-ev_calibrate_c new file mode 100644 index 000000000..103500ea5 --- /dev/null +++ b/package/xf86-input-evtouch/patches/patch-ev_calibrate_c @@ -0,0 +1,11 @@ +--- xf86-input-evtouch-0.8.8.orig/ev_calibrate.c 2008-11-10 12:25:32.000000000 +0100 ++++ xf86-input-evtouch-0.8.8/ev_calibrate.c 2010-01-08 17:13:52.000000000 +0100 +@@ -218,7 +218,7 @@ int main (void) + int cap_style = CapButt; /* style of the line's edje and */ + int join_style = JoinBevel; /* joined lines. */ + +- int event_mask = ExposureMask | ButtonReleaseMask | PointerMotionMask | KeyPressMask; ++ int event_mask = ExposureMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask | KeyPressMask; + + int depth; + int screen_num; diff --git a/package/xf86-input-evtouch/patches/patch-evtouch_c b/package/xf86-input-evtouch/patches/patch-evtouch_c index a60a08453..a0fe4919e 100644 --- a/package/xf86-input-evtouch/patches/patch-evtouch_c +++ b/package/xf86-input-evtouch/patches/patch-evtouch_c @@ -1,42 +1,25 @@ -fixed compile for xorg 1.7.1 --- xf86-input-evtouch-0.8.8.orig/evtouch.c 2008-11-11 09:47:55.000000000 +0100 -+++ xf86-input-evtouch-0.8.8/evtouch.c 2010-01-06 16:11:16.000000000 +0100 -@@ -30,10 +30,10 @@ ++++ xf86-input-evtouch-0.8.8/evtouch.c 2010-01-08 17:14:02.000000000 +0100 +@@ -30,8 +30,8 @@ #define _evdev_touch_C_ -#include -#if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(3,9,0,0,0) --#define XFREE86_V4 --#endif -+//#include -+//#if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(3,9,0,0,0) -+//#define XFREE86_V4 -+//#endif - - /***************************************************************************** - * Standard Headers -@@ -88,6 +88,11 @@ - - #include ++#include ++#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(3,9,0,0,0) + #define XFREE86_V4 + #endif -+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3 -+#include -+#include -+#endif -+ - /***************************************************************************** - * Local Headers - ****************************************************************************/ -@@ -132,14 +137,14 @@ InputDriverRec EVTOUCH = { - 0 - }; +@@ -74,7 +74,6 @@ + #include "xf86_OSproc.h" + #include "xf86Xinput.h" + #include "exevents.h" +-#include "xf86OSmouse.h" + #include "randrstr.h" --#ifdef XFree86LOADER -+//#ifdef XFree86LOADER - static XF86ModuleVersionInfo VersionRec = - { - "evtouch", + #ifndef NEED_XF86_TYPES +@@ -139,7 +138,7 @@ static XF86ModuleVersionInfo VersionRec "Kenan Esau", MODINFOSTRING1, MODINFOSTRING2, @@ -45,130 +28,98 @@ fixed compile for xorg 1.7.1 0, 8, 8, ABI_CLASS_XINPUT, ABI_XINPUT_VERSION, -@@ -167,9 +172,9 @@ Unplug(pointer p) +@@ -167,7 +166,7 @@ Unplug(pointer p) } -XF86ModuleData evtouchModuleData = {&VersionRec, Plug, Unplug }; +_X_EXPORT XF86ModuleData evtouchModuleData = {&VersionRec, Plug, Unplug }; --#endif /* XFree86LOADER */ -+//#endif /* XFree86LOADER */ - - - static const char *default_options[] = -@@ -581,6 +586,32 @@ DeviceOff (DeviceIntPtr dev) - } - - -+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 -+static void xf86WcmInitButtonLabels(Atom *labels, int nlabels) -+{ -+ memset(labels, 0, nlabels * sizeof(Atom)); -+ switch(nlabels) -+ { -+ default: -+ case 7: -+ labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT); -+ case 6: -+ labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT); -+ case 5: -+ labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN); -+ case 4: -+ labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP); -+ case 3: -+ labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); -+ case 2: -+ labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); -+ case 1: -+ labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); -+ break; -+ } -+} -+#endif -+ - - - static Bool -@@ -591,12 +622,21 @@ DeviceInit (DeviceIntPtr dev) + #endif /* XFree86LOADER */ + +@@ -306,7 +305,7 @@ void EVTouchProcessAbs(EVTouchPrivatePtr + } + + if (pos_changed == 1) { +-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 2 ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 2 + ConvertProc(priv->local, 0, 2, + priv->raw_x, priv->raw_y, + 0, 0, 0, 0, +@@ -370,7 +369,7 @@ void EVTouchProcessRel(EVTouchPrivatePtr + priv->raw_y = priv->min_y; + } + +-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 2 ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 2 + ConvertProc(priv->local, 0, 2, + priv->raw_x, priv->raw_y, + 0, 0, 0, 0, +@@ -591,6 +590,10 @@ DeviceInit (DeviceIntPtr dev) EVTouchPrivatePtr priv = (EVTouchPrivatePtr) (local->private); unsigned char map[EV_MAX_BUTTONS]; int i; +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 -+ Atom *axis_labels, *btn_labels; ++ Atom btn_label; ++ Atom axis_labels[2] = { 0, 0 }; +#endif for (i = 0; i < EV_MAX_BUTTONS; i++) map[i] = i; - - priv->btn_count = EV_MAX_BUTTONS; - -+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 -+ axis_labels = xcalloc(2, sizeof(Atom)); -+ btn_labels = xcalloc(EV_MAX_BUTTONS, sizeof(Atom)); -+ xf86WcmInitButtonLabels(btn_labels, EV_MAX_BUTTONS); -+#endif -+ - /* - * these have to be here instead of in the SetupProc, because when the - * SetupProc is run at server startup, screenInfo is not setup yet -@@ -629,8 +669,18 @@ DeviceInit (DeviceIntPtr dev) +@@ -629,7 +632,11 @@ DeviceInit (DeviceIntPtr dev) /* * Device reports button press for 5 buttons. */ - if (InitButtonClassDeviceStruct (dev, EV_MAX_BUTTONS, map) == FALSE) + if (InitButtonClassDeviceStruct (dev, EV_MAX_BUTTONS, -+ -+ #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 -+ btn_labels, -+ #endif -+ map) == FALSE) - { -+ +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 -+ xfree(btn_labels); ++ &btn_label, +#endif -+ ++ map) == FALSE) + { ErrorF("Unable to allocate EVTouch touchscreen ButtonClassDeviceStruct\n"); return BadAlloc; - } -@@ -653,7 +703,12 @@ DeviceInit (DeviceIntPtr dev) +@@ -653,28 +660,34 @@ DeviceInit (DeviceIntPtr dev) * Device reports motions on 2 axes in absolute coordinates. * Axes min and max values are reported in raw coordinates. */ - if (InitValuatorClassDeviceStruct(dev, 2, xf86GetMotionEvents, -+ if (InitValuatorClassDeviceStruct(dev, 2, +- local->history_size, Absolute) == FALSE) ++ if (InitValuatorClassDeviceStruct(dev, 2, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 -+ axis_labels, ++ axis_labels, +#endif -+ -+// xf86GetMotionEvents, - local->history_size, Absolute) == FALSE) ++ local->history_size, Absolute) == FALSE) { ErrorF ("Unable to allocate EVTouch touchscreen ValuatorClassDeviceStruct\n"); -@@ -672,7 +727,24 @@ DeviceInit (DeviceIntPtr dev) - EV_AXIS_MAX_RES /* max_res */ ); - xf86InitValuatorDefaults(dev, 1); - #else -- xf86InitValuatorAxisStruct(dev, 0, priv->min_x, priv->max_x, + return !Success; + } + +-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 2 +- xf86InitValuatorAxisStruct(dev, 0, 0, priv->screen_width, + xf86InitValuatorAxisStruct(dev, 0, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 -+ XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X), ++ axis_labels[0], +#endif -+ 0, priv->screen_width, -+ 1024, -+ EV_AXIS_MIN_RES /* min_res */ , -+ EV_AXIS_MAX_RES /* max_res */ ); -+ xf86InitValuatorDefaults(dev, 0); -+ -+ xf86InitValuatorAxisStruct(dev, 1, ++ 0, priv->screen_width, + 1024, + EV_AXIS_MIN_RES /* min_res */ , + EV_AXIS_MAX_RES /* max_res */ ); + xf86InitValuatorDefaults(dev, 0); +- xf86InitValuatorAxisStruct(dev, 1, 0, priv->screen_height, ++ xf86InitValuatorAxisStruct(dev, 1, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 -+ XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y), ++ axis_labels[1], +#endif -+ 0, priv->screen_width, -+ 1024, -+ EV_AXIS_MIN_RES /* min_res */ , -+ EV_AXIS_MAX_RES /* max_res */ ); ++ 0, priv->screen_height, + 1024, + EV_AXIS_MIN_RES /* min_res */ , + EV_AXIS_MAX_RES /* max_res */ ); xf86InitValuatorDefaults(dev, 1); - #endif +-#else +- xf86InitValuatorAxisStruct(dev, 0, priv->min_x, priv->max_x, +- xf86InitValuatorDefaults(dev, 1); +-#endif + /* Initial position of pointer on screen: Centered */ + priv->cur_x=(priv->max_x - priv->min_x)/2; -- cgit v1.2.3 From fcf67343aecddb9ef86ff4e41812203b3c04a829 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 9 Jan 2010 12:02:09 +0100 Subject: fix runtime dependencies for xorg-server --- package/xorg-server/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/xorg-server/Makefile b/package/xorg-server/Makefile index 790a01d7e..4152dcc0c 100644 --- a/package/xorg-server/Makefile +++ b/package/xorg-server/Makefile @@ -9,7 +9,7 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= 913a672cbd6da516de15965d594e20b9 PKG_DESCR:= Xorg server PKG_SECTION:= x11 -PKG_DEPENDS:= libopenssl libxfont pixman libpciaccess libxkbfile libfontenc xkeyboard-config xkbcomp +PKG_DEPENDS:= libopenssl libxfont pixman libpciaccess libxkbfile libfontenc xkeyboard-config xkbcomp libxau libxaw libxmu libxpm libxrender libxt libxxf86dga libxext libxdmcp libxv libsm libice libx11 PKG_BUILDDEP+= libX11 randrproto renderproto fixesproto damageproto scrnsaverproto resourceproto fontsproto videoproto compositeproto evieext libxkbfile libXfont pixman libpciaccess openssl xf86dgaproto PKG_URL:= http://www.x.org PKG_SITES:= ${MASTER_SITE_XORG} -- cgit v1.2.3 From 705c25d2fc08102f10cf6bb9a6fc113905e29dc1 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 9 Jan 2010 12:02:37 +0100 Subject: remove unused file --- package/xf86-input-evtouch/extra/xf86OSmouse.h | 277 ------------------------- 1 file changed, 277 deletions(-) delete mode 100644 package/xf86-input-evtouch/extra/xf86OSmouse.h diff --git a/package/xf86-input-evtouch/extra/xf86OSmouse.h b/package/xf86-input-evtouch/extra/xf86OSmouse.h deleted file mode 100644 index 09b8525f7..000000000 --- a/package/xf86-input-evtouch/extra/xf86OSmouse.h +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright (c) 1999-2003 by The XFree86 Project, 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 holder(s) - * and author(s) 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 holder(s) and author(s). - */ - -/* Public interface to OS-specific mouse support. */ - -#ifndef _XF86OSMOUSE_H_ -#define _XF86OSMOUSE_H_ - -#include "xf86Xinput.h" - -/* Mouse interface classes */ -#define MSE_NONE 0x00 -#define MSE_SERIAL 0x01 /* serial port */ -#define MSE_BUS 0x02 /* old bus mouse */ -#define MSE_PS2 0x04 /* standard read-only PS/2 */ -#define MSE_XPS2 0x08 /* extended PS/2 */ -#define MSE_AUTO 0x10 /* auto-detect (PnP) */ -#define MSE_MISC 0x20 /* The OS layer will identify the - * specific protocol names that are - * supported for this class. */ - -/* Mouse Protocol IDs. */ -typedef enum { - PROT_UNKNOWN = -2, - PROT_UNSUP = -1, /* protocol is not supported */ - PROT_MS = 0, - PROT_MSC, - PROT_MM, - PROT_LOGI, - PROT_LOGIMAN, - PROT_MMHIT, - PROT_GLIDE, - PROT_IMSERIAL, - PROT_THINKING, - PROT_ACECAD, - PROT_VALUMOUSESCROLL, - PROT_PS2, - PROT_GENPS2, - PROT_IMPS2, - PROT_EXPPS2, - PROT_THINKPS2, - PROT_MMPS2, - PROT_GLIDEPS2, - PROT_NETPS2, - PROT_NETSCPS2, - PROT_BM, - PROT_AUTO, - PROT_SYSMOUSE, - PROT_NUMPROTOS /* This must always be last. */ -} MouseProtocolID; - -struct _MouseDevRec; - -typedef int (*GetInterfaceTypesProc)(void); -typedef const char **(*BuiltinNamesProc)(void); -typedef Bool (*CheckProtocolProc)(const char *protocol); -typedef Bool (*BuiltinPreInitProc)(InputInfoPtr pInfo, const char *protocol, - int flags); -typedef const char *(*DefaultProtocolProc)(void); -typedef const char *(*SetupAutoProc)(InputInfoPtr pInfo, int *protoPara); -typedef void (*SetResProc)(InputInfoPtr pInfo, const char* protocol, int rate, - int res); -typedef const char *(*FindDeviceProc)(InputInfoPtr pInfo, const char *protocol, - int flags); -typedef const char *(*GuessProtocolProc)(InputInfoPtr pInfo, int flags); - -/* - * OSMouseInfoRec is used to pass information from the OSMouse layer to the - * OS-independent mouse driver. - */ -typedef struct { - GetInterfaceTypesProc SupportedInterfaces; - BuiltinNamesProc BuiltinNames; - CheckProtocolProc CheckProtocol; - BuiltinPreInitProc PreInit; - DefaultProtocolProc DefaultProtocol; - SetupAutoProc SetupAuto; - SetResProc SetPS2Res; - SetResProc SetBMRes; - SetResProc SetMiscRes; - FindDeviceProc FindDevice; - GuessProtocolProc GuessProtocol; -} OSMouseInfoRec, *OSMouseInfoPtr; - -/* - * SupportedInterfaces: Returns the mouse interface types that the OS support. - * If MSE_MISC is returned, then the BuiltinNames and - * CheckProtocol should be set. - * - * BuiltinNames: Returns the names of the protocols that are fully handled - * in the OS-specific code. These are names that don't appear - * directly in the main "mouse" driver. - * - * CheckProtocol: Checks if the protocol name given is supported by the - * OS. It should return TRUE for both "builtin" protocols and - * protocols of type MSE_MISC that are supported by the OS. - * - * PreInit: The PreInit function for protocols that are builtin. This - * function is passed the protocol name. - * - * DefaultProtocol: Returns the name of a default protocol that should be used - * for the OS when none has been supplied in the config file. - * This should only be set when there is a reasonable default. - * - * SetupAuto: This function can be used to do OS-specific protocol - * auto-detection. It returns the name of the detected protocol, - * or NULL when detection fails. It may also adjust one or more - * of the "protoPara" values for the detected protocol by setting - * then to something other than -1. SetupAuto gets called in two - * ways. The first is before any devices have been opened. This - * can be used when the protocol "Auto" always maps to a single - * protocol type. The second is with the device open, allowing - * OS-specific probing to be done. - * - * SetPS2Res: Set the resolution and sample rate for MSE_PS2 and MSE_XPS2 - * protocol types. - * - * SetBMRes: Set the resolution and sample rate for MSE_BM protocol types. - * - * SetMiscRes: Set the resolution and sample rate for MSE_MISC protocol types. - * - * FindDevice: This function gets called when no Device has been specified - * in the config file. OS-specific methods may be used to guess - * which input device to use. This function is called after the - * pre-open attempts at protocol discovery are done, but before - * the device is open. I.e., after the first SetupAuto() call, - * after the DefaultProtocol() call, but before the PreInit() - * call. Available protocol information may be used in locating - * the default input device. - * - * GuessProtocol: A last resort attempt at guessing the mouse protocol by - * whatever OS-specific means might be available. OS-independent - * things should be in the mouse driver. This function gets - * called after the mouse driver's OS-independent methods have - * failed. - */ - -extern OSMouseInfoPtr xf86OSMouseInit(int flags); - -/* Adjust this when the mouse interface changes. */ - -/* - * History: - * - * 1.0.0 - Everything up to when versioning was started. - * 1.1.0 - FindDevice and GuessProtocol added to OSMouseInfoRec - * 1.2.0 - xisbscale added to MouseDevRec - * - */ - -/* Z axis mapping */ -#define MSE_NOZMAP 0 -#define MSE_MAPTOX -1 -#define MSE_MAPTOY -2 -#define MSE_MAPTOZ -3 -#define MSE_MAPTOW -4 - -/* Generalize for other axes. */ -#define MSE_NOAXISMAP MSE_NOZMAP - -#define MSE_MAXBUTTONS 24 -#define MSE_DFLTBUTTONS 3 - -/* - * Mouse device record. This is shared by the mouse driver and the OSMouse - * layer. - */ - -typedef void (*checkMovementsProc)(InputInfoPtr,int, int); -typedef void (*autoProbeProc)(InputInfoPtr, Bool, Bool); -typedef Bool (*collectDataProc)(struct _MouseDevRec *, unsigned char); -typedef Bool (*dataGoodProc)(struct _MouseDevRec *); - -typedef void (*PostMseEventProc)(InputInfoPtr pInfo, int buttons, - int dx, int dy, int dz, int dw); -typedef void (*MouseCommonOptProc)(InputInfoPtr pInfo); - -typedef struct _MouseDevRec { - PtrCtrlProcPtr Ctrl; - PostMseEventProc PostEvent; - MouseCommonOptProc CommonOptions; - DeviceIntPtr device; - const char * mseDevice; - const char * protocol; - MouseProtocolID protocolID; - MouseProtocolID oldProtocolID; /* hack */ - int class; - int mseModel; - int baudRate; - int oldBaudRate; - int sampleRate; - int lastButtons; - int threshold; /* acceleration */ - int num; - int den; - int buttons; /* # of buttons */ - int emulateState; /* automata state for 2 button mode */ - Bool emulate3Buttons; - Bool emulate3ButtonsSoft; - int emulate3Timeout;/* Timeout for 3 button emulation */ - Bool chordMiddle; - Bool flipXY; - int invX; - int invY; - int mouseFlags; /* Flags to Clear after opening - * mouse dev */ - int truebuttons; /* (not used) - * Arg to maintain before - * emulate3buttons timer callback */ - int resolution; - int negativeZ; /* button mask */ - int positiveZ; /* button mask */ - int negativeW; /* button mask */ - int positiveW; /* button mask */ - pointer buffer; /* usually an XISBuffer* */ - int protoBufTail; - unsigned char protoBuf[8]; - unsigned char protoPara[8]; - unsigned char inSync; /* driver in sync with datastream */ - pointer mousePriv; /* private area */ - InputInfoPtr pInfo; - int origProtocolID; - const char * origProtocol; - Bool emulate3Pending;/* timer waiting */ - CARD32 emulate3Expires;/* time to fire emulation code */ - Bool emulateWheel; - int wheelInertia; - int wheelButton; - int negativeX; /* Button values. Unlike the Z and */ - int positiveX; /* W equivalents, these are button */ - int negativeY; /* values rather than button masks. */ - int positiveY; - int wheelYDistance; - int wheelXDistance; - Bool autoProbe; - checkMovementsProc checkMovements; - autoProbeProc autoProbeMouse; - collectDataProc collectData; - dataGoodProc dataGood; - int angleOffset; - pointer pDragLock; /* drag lock area */ - int xisbscale; /* buffer size for 1 event */ - int wheelButtonTimeout;/* Timeout for the wheel button emulation */ - CARD32 wheelButtonExpires; - int doubleClickSourceButtonMask; - int doubleClickTargetButton; - int doubleClickTargetButtonMask; - int doubleClickOldSourceState; - int lastMappedButtons; - int buttonMap[MSE_MAXBUTTONS]; -} MouseDevRec, *MouseDevPtr; - -#endif /* _XF86OSMOUSE_H_ */ -- cgit v1.2.3