45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Copyright (c) 1999-2003 by The XFree86 Project, Inc.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Permission is hereby granted, free of charge, to any person obtaining a
45e9809aff7304721fddb95654901b32195c9c7avboxsync * copy of this software and associated documentation files (the "Software"),
45e9809aff7304721fddb95654901b32195c9c7avboxsync * to deal in the Software without restriction, including without limitation
45e9809aff7304721fddb95654901b32195c9c7avboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * and/or sell copies of the Software, and to permit persons to whom the
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Software is furnished to do so, subject to the following conditions:
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * The above copyright notice and this permission notice shall be included in
45e9809aff7304721fddb95654901b32195c9c7avboxsync * all copies or substantial portions of the Software.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
45e9809aff7304721fddb95654901b32195c9c7avboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
45e9809aff7304721fddb95654901b32195c9c7avboxsync * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
45e9809aff7304721fddb95654901b32195c9c7avboxsync * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
45e9809aff7304721fddb95654901b32195c9c7avboxsync * OTHER DEALINGS IN THE SOFTWARE.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Except as contained in this notice, the name of the copyright holder(s)
45e9809aff7304721fddb95654901b32195c9c7avboxsync * and author(s) shall not be used in advertising or otherwise to promote
45e9809aff7304721fddb95654901b32195c9c7avboxsync * the sale, use or other dealings in this Software without prior written
45e9809aff7304721fddb95654901b32195c9c7avboxsync * authorization from the copyright holder(s) and author(s).
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Public interface to OS-specific mouse support. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifndef _XF86OSMOUSE_H_
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define _XF86OSMOUSE_H_
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include "xf86Xinput.h"
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Mouse interface classes */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define MSE_NONE 0x00
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define MSE_SERIAL 0x01 /* serial port */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define MSE_BUS 0x02 /* old bus mouse */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define MSE_PS2 0x04 /* standard read-only PS/2 */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define MSE_XPS2 0x08 /* extended PS/2 */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define MSE_AUTO 0x10 /* auto-detect (PnP) */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define MSE_MISC 0x20 /* The OS layer will identify the
45e9809aff7304721fddb95654901b32195c9c7avboxsync * specific protocol names that are
45e9809aff7304721fddb95654901b32195c9c7avboxsync * supported for this class. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Mouse Protocol IDs. */
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef enum {
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_UNKNOWN = -2,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_UNSUP = -1, /* protocol is not supported */
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_MS = 0,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_MSC,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_MM,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_LOGI,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_LOGIMAN,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_MMHIT,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_GLIDE,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_IMSERIAL,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_THINKING,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_ACECAD,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_VALUMOUSESCROLL,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_PS2,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_GENPS2,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_IMPS2,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_EXPPS2,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_THINKPS2,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_MMPS2,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_GLIDEPS2,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_NETPS2,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_NETSCPS2,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_BM,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_AUTO,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_SYSMOUSE,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PROT_NUMPROTOS /* This must always be last. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync} MouseProtocolID;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncstruct _MouseDevRec;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef int (*GetInterfaceTypesProc)(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef const char **(*BuiltinNamesProc)(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef Bool (*CheckProtocolProc)(const char *protocol);
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef Bool (*BuiltinPreInitProc)(InputInfoPtr pInfo, const char *protocol,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int flags);
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef const char *(*DefaultProtocolProc)(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef const char *(*SetupAutoProc)(InputInfoPtr pInfo, int *protoPara);
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef void (*SetResProc)(InputInfoPtr pInfo, const char* protocol, int rate,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int res);
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef const char *(*FindDeviceProc)(InputInfoPtr pInfo, const char *protocol,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int flags);
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef const char *(*GuessProtocolProc)(InputInfoPtr pInfo, int flags);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync * OSMouseInfoRec is used to pass information from the OSMouse layer to the
45e9809aff7304721fddb95654901b32195c9c7avboxsync * OS-independent mouse driver.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsync GetInterfaceTypesProc SupportedInterfaces;
45e9809aff7304721fddb95654901b32195c9c7avboxsync BuiltinNamesProc BuiltinNames;
45e9809aff7304721fddb95654901b32195c9c7avboxsync CheckProtocolProc CheckProtocol;
45e9809aff7304721fddb95654901b32195c9c7avboxsync BuiltinPreInitProc PreInit;
45e9809aff7304721fddb95654901b32195c9c7avboxsync DefaultProtocolProc DefaultProtocol;
45e9809aff7304721fddb95654901b32195c9c7avboxsync SetupAutoProc SetupAuto;
45e9809aff7304721fddb95654901b32195c9c7avboxsync SetResProc SetPS2Res;
45e9809aff7304721fddb95654901b32195c9c7avboxsync SetResProc SetBMRes;
45e9809aff7304721fddb95654901b32195c9c7avboxsync SetResProc SetMiscRes;
45e9809aff7304721fddb95654901b32195c9c7avboxsync FindDeviceProc FindDevice;
45e9809aff7304721fddb95654901b32195c9c7avboxsync GuessProtocolProc GuessProtocol;
45e9809aff7304721fddb95654901b32195c9c7avboxsync} OSMouseInfoRec, *OSMouseInfoPtr;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync * SupportedInterfaces: Returns the mouse interface types that the OS support.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * If MSE_MISC is returned, then the BuiltinNames and
45e9809aff7304721fddb95654901b32195c9c7avboxsync * CheckProtocol should be set.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * BuiltinNames: Returns the names of the protocols that are fully handled
45e9809aff7304721fddb95654901b32195c9c7avboxsync * in the OS-specific code. These are names that don't appear
45e9809aff7304721fddb95654901b32195c9c7avboxsync * directly in the main "mouse" driver.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * CheckProtocol: Checks if the protocol name given is supported by the
45e9809aff7304721fddb95654901b32195c9c7avboxsync * OS. It should return TRUE for both "builtin" protocols and
45e9809aff7304721fddb95654901b32195c9c7avboxsync * protocols of type MSE_MISC that are supported by the OS.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * PreInit: The PreInit function for protocols that are builtin. This
45e9809aff7304721fddb95654901b32195c9c7avboxsync * function is passed the protocol name.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * DefaultProtocol: Returns the name of a default protocol that should be used
45e9809aff7304721fddb95654901b32195c9c7avboxsync * for the OS when none has been supplied in the config file.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * This should only be set when there is a reasonable default.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * SetupAuto: This function can be used to do OS-specific protocol
45e9809aff7304721fddb95654901b32195c9c7avboxsync * auto-detection. It returns the name of the detected protocol,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * or NULL when detection fails. It may also adjust one or more
45e9809aff7304721fddb95654901b32195c9c7avboxsync * of the "protoPara" values for the detected protocol by setting
45e9809aff7304721fddb95654901b32195c9c7avboxsync * then to something other than -1. SetupAuto gets called in two
45e9809aff7304721fddb95654901b32195c9c7avboxsync * ways. The first is before any devices have been opened. This
45e9809aff7304721fddb95654901b32195c9c7avboxsync * can be used when the protocol "Auto" always maps to a single
45e9809aff7304721fddb95654901b32195c9c7avboxsync * protocol type. The second is with the device open, allowing
45e9809aff7304721fddb95654901b32195c9c7avboxsync * OS-specific probing to be done.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * SetPS2Res: Set the resolution and sample rate for MSE_PS2 and MSE_XPS2
45e9809aff7304721fddb95654901b32195c9c7avboxsync * protocol types.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * SetBMRes: Set the resolution and sample rate for MSE_BM protocol types.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * SetMiscRes: Set the resolution and sample rate for MSE_MISC protocol types.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * FindDevice: This function gets called when no Device has been specified
45e9809aff7304721fddb95654901b32195c9c7avboxsync * in the config file. OS-specific methods may be used to guess
45e9809aff7304721fddb95654901b32195c9c7avboxsync * which input device to use. This function is called after the
45e9809aff7304721fddb95654901b32195c9c7avboxsync * pre-open attempts at protocol discovery are done, but before
45e9809aff7304721fddb95654901b32195c9c7avboxsync * the device is open. I.e., after the first SetupAuto() call,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * after the DefaultProtocol() call, but before the PreInit()
45e9809aff7304721fddb95654901b32195c9c7avboxsync * call. Available protocol information may be used in locating
45e9809aff7304721fddb95654901b32195c9c7avboxsync * the default input device.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * GuessProtocol: A last resort attempt at guessing the mouse protocol by
45e9809aff7304721fddb95654901b32195c9c7avboxsync * whatever OS-specific means might be available. OS-independent
45e9809aff7304721fddb95654901b32195c9c7avboxsync * things should be in the mouse driver. This function gets
45e9809aff7304721fddb95654901b32195c9c7avboxsync * called after the mouse driver's OS-independent methods have
45e9809aff7304721fddb95654901b32195c9c7avboxsync * failed.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern OSMouseInfoPtr xf86OSMouseInit(int flags);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Adjust this when the mouse interface changes. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync * History:
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * 1.0.0 - Everything up to when versioning was started.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * 1.1.0 - FindDevice and GuessProtocol added to OSMouseInfoRec
45e9809aff7304721fddb95654901b32195c9c7avboxsync * 1.2.0 - xisbscale added to MouseDevRec
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define OS_MOUSE_VERSION_MAJOR 1
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define OS_MOUSE_VERSION_MINOR 2
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define OS_MOUSE_VERSION_PATCH 0
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define OS_MOUSE_VERSION_CURRENT \
45e9809aff7304721fddb95654901b32195c9c7avboxsync BUILTIN_INTERFACE_VERSION_NUMERIC(OS_MOUSE_VERSION_MAJOR, \
45e9809aff7304721fddb95654901b32195c9c7avboxsync OS_MOUSE_VERSION_MINOR, \
45e9809aff7304721fddb95654901b32195c9c7avboxsync OS_MOUSE_VERSION_PATCH)
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define HAVE_GUESS_PROTOCOL \
45e9809aff7304721fddb95654901b32195c9c7avboxsync (xf86GetBuiltinInterfaceVersion(BUILTIN_IF_OSMOUSE, 0) >= \
45e9809aff7304721fddb95654901b32195c9c7avboxsync BUILTIN_INTERFACE_VERSION_NUMERIC(1, 1, 0))
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define HAVE_FIND_DEVICE \
45e9809aff7304721fddb95654901b32195c9c7avboxsync (xf86GetBuiltinInterfaceVersion(BUILTIN_IF_OSMOUSE, 0) >= \
45e9809aff7304721fddb95654901b32195c9c7avboxsync BUILTIN_INTERFACE_VERSION_NUMERIC(1, 1, 0))
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Z axis mapping */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define MSE_NOZMAP 0
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define MSE_MAPTOX -1
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define MSE_MAPTOY -2
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define MSE_MAPTOZ -3
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define MSE_MAPTOW -4
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Generalize for other axes. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define MSE_NOAXISMAP MSE_NOZMAP
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define MSE_MAXBUTTONS 24
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define MSE_DFLTBUTTONS 3
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Mouse device record. This is shared by the mouse driver and the OSMouse
45e9809aff7304721fddb95654901b32195c9c7avboxsync * layer.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef void (*checkMovementsProc)(InputInfoPtr,int, int);
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef void (*autoProbeProc)(InputInfoPtr, Bool, Bool);
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef Bool (*collectDataProc)(struct _MouseDevRec *, unsigned char);
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef Bool (*dataGoodProc)(struct _MouseDevRec *);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef void (*PostMseEventProc)(InputInfoPtr pInfo, int buttons,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int dx, int dy, int dz, int dw);
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef void (*MouseCommonOptProc)(InputInfoPtr pInfo);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct _MouseDevRec {
45e9809aff7304721fddb95654901b32195c9c7avboxsync PtrCtrlProcPtr Ctrl;
45e9809aff7304721fddb95654901b32195c9c7avboxsync PostMseEventProc PostEvent;
45e9809aff7304721fddb95654901b32195c9c7avboxsync MouseCommonOptProc CommonOptions;
45e9809aff7304721fddb95654901b32195c9c7avboxsync DeviceIntPtr device;
45e9809aff7304721fddb95654901b32195c9c7avboxsync const char * mseDevice;
45e9809aff7304721fddb95654901b32195c9c7avboxsync const char * protocol;
45e9809aff7304721fddb95654901b32195c9c7avboxsync MouseProtocolID protocolID;
45e9809aff7304721fddb95654901b32195c9c7avboxsync MouseProtocolID oldProtocolID; /* hack */
45e9809aff7304721fddb95654901b32195c9c7avboxsync int class;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int mseModel;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int baudRate;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int oldBaudRate;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int sampleRate;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int lastButtons;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int threshold; /* acceleration */
45e9809aff7304721fddb95654901b32195c9c7avboxsync int num;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int den;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int buttons; /* # of buttons */
45e9809aff7304721fddb95654901b32195c9c7avboxsync int emulateState; /* automata state for 2 button mode */
45e9809aff7304721fddb95654901b32195c9c7avboxsync Bool emulate3Buttons;
45e9809aff7304721fddb95654901b32195c9c7avboxsync Bool emulate3ButtonsSoft;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int emulate3Timeout;/* Timeout for 3 button emulation */
45e9809aff7304721fddb95654901b32195c9c7avboxsync Bool chordMiddle;
45e9809aff7304721fddb95654901b32195c9c7avboxsync Bool flipXY;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int invX;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int invY;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int mouseFlags; /* Flags to Clear after opening
45e9809aff7304721fddb95654901b32195c9c7avboxsync * mouse dev */
45e9809aff7304721fddb95654901b32195c9c7avboxsync int truebuttons; /* (not used)
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Arg to maintain before
45e9809aff7304721fddb95654901b32195c9c7avboxsync * emulate3buttons timer callback */
45e9809aff7304721fddb95654901b32195c9c7avboxsync int resolution;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int negativeZ; /* button mask */
45e9809aff7304721fddb95654901b32195c9c7avboxsync int positiveZ; /* button mask */
45e9809aff7304721fddb95654901b32195c9c7avboxsync int negativeW; /* button mask */
45e9809aff7304721fddb95654901b32195c9c7avboxsync int positiveW; /* button mask */
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer buffer; /* usually an XISBuffer* */
45e9809aff7304721fddb95654901b32195c9c7avboxsync int protoBufTail;
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned char protoBuf[8];
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned char protoPara[8];
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned char inSync; /* driver in sync with datastream */
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer mousePriv; /* private area */
45e9809aff7304721fddb95654901b32195c9c7avboxsync InputInfoPtr pInfo;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int origProtocolID;
45e9809aff7304721fddb95654901b32195c9c7avboxsync const char * origProtocol;
45e9809aff7304721fddb95654901b32195c9c7avboxsync Bool emulate3Pending;/* timer waiting */
45e9809aff7304721fddb95654901b32195c9c7avboxsync CARD32 emulate3Expires;/* time to fire emulation code */
45e9809aff7304721fddb95654901b32195c9c7avboxsync Bool emulateWheel;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int wheelInertia;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int wheelButton;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int negativeX; /* Button values. Unlike the Z and */
45e9809aff7304721fddb95654901b32195c9c7avboxsync int positiveX; /* W equivalents, these are button */
45e9809aff7304721fddb95654901b32195c9c7avboxsync int negativeY; /* values rather than button masks. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync int positiveY;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int wheelYDistance;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int wheelXDistance;
45e9809aff7304721fddb95654901b32195c9c7avboxsync Bool autoProbe;
45e9809aff7304721fddb95654901b32195c9c7avboxsync checkMovementsProc checkMovements;
45e9809aff7304721fddb95654901b32195c9c7avboxsync autoProbeProc autoProbeMouse;
45e9809aff7304721fddb95654901b32195c9c7avboxsync collectDataProc collectData;
45e9809aff7304721fddb95654901b32195c9c7avboxsync dataGoodProc dataGood;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int angleOffset;
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer pDragLock; /* drag lock area */
45e9809aff7304721fddb95654901b32195c9c7avboxsync int xisbscale; /* buffer size for 1 event */
45e9809aff7304721fddb95654901b32195c9c7avboxsync int wheelButtonTimeout;/* Timeout for the wheel button emulation */
45e9809aff7304721fddb95654901b32195c9c7avboxsync CARD32 wheelButtonExpires;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int doubleClickSourceButtonMask;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int doubleClickTargetButton;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int doubleClickTargetButtonMask;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int doubleClickOldSourceState;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int lastMappedButtons;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int buttonMap[MSE_MAXBUTTONS];
45e9809aff7304721fddb95654901b32195c9c7avboxsync} MouseDevRec, *MouseDevPtr;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif /* _XF86OSMOUSE_H_ */