74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86OSmouse.h,v 1.20 2002/12/17 20:55:23 dawes Exp $ */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Copyright (c) 1997-1999 by The XFree86 Project, Inc.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/* Public interface to OS-specific mouse support. */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/* Mouse interface classes */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define MSE_MISC 0x20 /* The OS layer will identify the
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * specific protocol names that are
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * supported for this class. */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef Bool (*CheckProtocolProc)(const char *protocol);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef Bool (*BuiltinPreInitProc)(InputInfoPtr pInfo, const char *protocol,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef const char *(*SetupAutoProc)(InputInfoPtr pInfo, int *protoPara);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef void (*SetResProc)(InputInfoPtr pInfo, const char* protocol, int rate,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef void (*checkMovementsProc)(InputInfoPtr,int, int);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef void (*autoProbeProc)(InputInfoPtr, Bool, Bool);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef Bool (*collectDataProc)(struct _MouseDevRec *, unsigned char);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef Bool (*dataGoodProc)(struct _MouseDevRec *);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * OSMouseInfoRec is used to pass information from the OSMouse layer to the
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * OS-independent mouse driver.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * SupportedInterfaces: Returns the mouse interface types that the OS support.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * If MSE_MISC is returned, then the BuiltinNames and
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * CheckProtocol should be set.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * BuiltinNames: Returns the names of the protocols that are fully handled
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * in the OS-specific code. These are names that don't appear
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * directly in the main "mouse" driver.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * CheckProtocol: Checks if the protocol name given is supported by the
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * OS. It should return TRUE for both "builtin" protocols and
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * protocols of type MSE_MISC that are supported by the OS.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * PreInit: The PreInit function for protocols that are builtin. This
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * function is passed the protocol name.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * DefaultProtocol: Returns the name of a default protocol that should be used
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * for the OS when none has been supplied in the config file.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * This should only be set when there is a reasonable default.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * SetupAuto: This function can be used to do OS-specific protocol
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * auto-detection. It returns the name of the detected protocol,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * or NULL when detection fails. It may also adjust one or more
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * of the "protoPara" values for the detected protocol by setting
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * then to something other than -1.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * SetPS2Res: Set the resolution and sample rate for MSE_PS2 and MSE_XPS2
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * protocol types.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * SetBMRes: Set the resolution and sample rate for MSE_BM protocol types.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * SetMiscRes: Set the resolution and sample rate for MSE_MISC protocol types.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Mouse device record. This is shared by the mouse driver and the OSMouse
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef void (*PostMseEventProc)(InputInfoPtr pInfo, int buttons,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef void (*MouseCommonOptProc)(InputInfoPtr pInfo);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int emulateState; /* automata state for 2 button mode */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int emulate3Timeout;/* Timeout for 3 button emulation */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * mouse dev */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Arg to maintain before
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * emulate3buttons timer callback */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned char inSync; /* driver in sync with datastream */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync CARD32 emulate3Expires;/* time to fire emulation code */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int negativeX; /* Button values. Unlike the Z and */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int positiveX; /* W equivalents, these are button */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int negativeY; /* values rather than button masks. */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/* Z axis mapping */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/* Generalize for other axes. */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif /* _XF86OSMOUSE_H_ */