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