amsvar.h revision 1.4
11.4Stsubai/* $NetBSD: amsvar.h,v 1.4 1999/06/17 06:59:05 tsubai Exp $ */ 21.1Stsubai 31.1Stsubai/* 41.1Stsubai * Copyright (C) 1998 Colin Wood 51.1Stsubai * All rights reserved. 61.1Stsubai * 71.1Stsubai * Redistribution and use in source and binary forms, with or without 81.1Stsubai * modification, are permitted provided that the following conditions 91.1Stsubai * are met: 101.1Stsubai * 1. Redistributions of source code must retain the above copyright 111.1Stsubai * notice, this list of conditions and the following disclaimer. 121.1Stsubai * 2. Redistributions in binary form must reproduce the above copyright 131.1Stsubai * notice, this list of conditions and the following disclaimer in the 141.1Stsubai * documentation and/or other materials provided with the distribution. 151.1Stsubai * 3. All advertising materials mentioning features or use of this software 161.1Stsubai * must display the following acknowledgement: 171.1Stsubai * This product includes software developed by Colin Wood. 181.1Stsubai * 4. The name of the author may not be used to endorse or promote products 191.1Stsubai * derived from this software without specific prior written permission. 201.1Stsubai * 211.1Stsubai * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 221.1Stsubai * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 231.1Stsubai * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 241.1Stsubai * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 251.1Stsubai * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 261.1Stsubai * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 271.1Stsubai * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 281.1Stsubai * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 291.1Stsubai * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 301.1Stsubai * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 311.1Stsubai */ 321.1Stsubai 331.2Stsubai#ifndef _MACPPC_AMSVAR_H_ 341.2Stsubai#define _MACPPC_AMSVAR_H_ 351.1Stsubai 361.1Stsubai/* 371.1Stsubai * State info, per mouse instance. 381.1Stsubai */ 391.2Stsubaistruct ams_softc { 401.1Stsubai struct device sc_dev; 411.1Stsubai 421.1Stsubai /* ADB info */ 431.3Stsubai int origaddr; /* ADB device type (ADBADDR_MS) */ 441.3Stsubai int adbaddr; /* current ADB address */ 451.3Stsubai int handler_id; /* type of mouse */ 461.1Stsubai 471.1Stsubai /* Extended Mouse Protocol info, faked for non-EMP mice */ 481.1Stsubai u_int8_t sc_class; /* mouse class (mouse, trackball) */ 491.1Stsubai u_int8_t sc_buttons; /* number of buttons */ 501.1Stsubai u_int32_t sc_res; /* mouse resolution (dpi) */ 511.1Stsubai char sc_devid[5]; /* device indentifier */ 521.1Stsubai 531.1Stsubai int sc_mb; /* current button state */ 541.2Stsubai struct device *sc_wsmousedev; 551.1Stsubai}; 561.1Stsubai 571.1Stsubai/* EMP device classes */ 581.1Stsubai#define MSCLASS_TABLET 0 591.1Stsubai#define MSCLASS_MOUSE 1 601.4Stsubai#define MSCLASS_TRACKBALL 2 611.4Stsubai#define MSCLASS_TRACKPAD 3 621.1Stsubai 631.4Stsubaivoid ms_adbcomplete __P((caddr_t buffer, caddr_t data_area, int adb_command)); 641.4Stsubaivoid ms_handoff __P((adb_event_t *event, struct ams_softc *)); 651.1Stsubai 661.2Stsubai#endif /* _MACPPC_AMSVAR_H_ */ 67