amsvar.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* $OpenBSD: amsvar.h,v 1.1 2006/01/18 23:21:17 miod Exp $ */
  2. /* $NetBSD: amsvar.h,v 1.4 1999/06/17 06:59:05 tsubai Exp $ */
  3. /*
  4. * Copyright (C) 1998 Colin Wood
  5. * All rights reserved.
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following conditions
  9. * are met:
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * 2. Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. * 3. All advertising materials mentioning features or use of this software
  16. * must display the following acknowledgement:
  17. * This product includes software developed by Colin Wood.
  18. * 4. The name of the author may not be used to endorse or promote products
  19. * derived from this software without specific prior written permission.
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  22. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  23. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  24. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  25. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  26. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  27. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  28. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  29. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  30. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. */
  32. #ifndef _ADB_AMSVAR_H_
  33. #define _ADB_AMSVAR_H_
  34. /*
  35. * State info, per mouse instance.
  36. */
  37. struct ams_softc {
  38. struct device sc_dev;
  39. /* ADB info */
  40. int origaddr; /* ADB device type (ADBADDR_MS) */
  41. int adbaddr; /* current ADB address */
  42. int handler_id; /* type of mouse */
  43. /* Extended Mouse Protocol info, faked for non-EMP mice */
  44. u_int8_t sc_class; /* mouse class (mouse, trackball) */
  45. u_int8_t sc_buttons; /* number of buttons */
  46. u_int32_t sc_res; /* mouse resolution (dpi) */
  47. char sc_devid[5]; /* device identifier */
  48. int sc_mb; /* current button state */
  49. struct device *sc_wsmousedev;
  50. };
  51. /* EMP device classes */
  52. #define MSCLASS_TABLET 0
  53. #define MSCLASS_MOUSE 1
  54. #define MSCLASS_TRACKBALL 2
  55. #define MSCLASS_TRACKPAD 3
  56. #endif /* _ADB_AMSVAR_H_ */