/netbsd/sys/dev/qbus/qevent.h

https://github.com/deathmaker1/kame · C Header · 119 lines · 40 code · 14 blank · 65 comment · 0 complexity · 0b010f5a619496888302b4e96f583733 MD5 · raw file

  1. /* $NetBSD: qevent.h,v 1.3 1999/06/20 17:58:56 ragge Exp $ */
  2. /*-
  3. * Copyright (c) 1982, 1986 The Regents of the University of California.
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. * 1. Redistributions of source code must retain the above copyright
  10. * notice, this list of conditions and the following disclaimer.
  11. * 2. Redistributions in binary form must reproduce the above copyright
  12. * notice, this list of conditions and the following disclaimer in the
  13. * documentation and/or other materials provided with the distribution.
  14. * 3. All advertising materials mentioning features or use of this software
  15. * must display the following acknowledgement:
  16. * This product includes software developed by the University of
  17. * California, Berkeley and its contributors.
  18. * 4. Neither the name of the University nor the names of its contributors
  19. * may be used to endorse or promote products derived from this software
  20. * without specific prior written permission.
  21. *
  22. * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  23. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  24. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  25. * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  26. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  27. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  28. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  29. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  30. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  31. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  32. * SUCH DAMAGE.
  33. *
  34. * @(#)qevent.h 7.1 (Berkeley) 5/9/91
  35. */
  36. /************************************************************************
  37. * *
  38. * Copyright (c) 1985 by *
  39. * Digital Equipment Corporation, Maynard, MA *
  40. * All rights reserved. *
  41. * *
  42. * This software is furnished under a license and may be used and *
  43. * copied only in accordance with the terms of such license and *
  44. * with the inclusion of the above copyright notice. This *
  45. * software or any other copies thereof may not be provided or *
  46. * otherwise made available to any other person. No title to and *
  47. * ownership of the software is hereby transferred. *
  48. * *
  49. * The information in this software is subject to change without *
  50. * notice and should not be construed as a commitment by Digital *
  51. * Equipment Corporation. *
  52. * *
  53. * Digital assumes no responsibility for the use or reliability *
  54. * of its software on equipment which is not supplied by Digital. *
  55. * *
  56. ************************************************************************/
  57. /*
  58. * Event queue entries
  59. */
  60. #ifndef _QEVENT_
  61. #define _QEVENT_
  62. typedef struct _vs_event {
  63. unsigned short vse_x; /* x position */
  64. unsigned short vse_y; /* y position */
  65. unsigned short vse_time;/* 10 millisecond units (button only) */
  66. char vse_type; /* button or motion? */
  67. unsigned char vse_key; /* the key (button only) */
  68. char vse_direction; /* which direction (button only) */
  69. char vse_device; /* which device (button only) */
  70. } vsEvent;
  71. /* vse_type field */
  72. #define VSE_BUTTON 0 /* button moved */
  73. #define VSE_MMOTION 1 /* mouse moved */
  74. #define VSE_TMOTION 2 /* tablet moved */
  75. /* vse_direction field */
  76. #define VSE_KBTUP 0 /* up */
  77. #define VSE_KBTDOWN 1 /* down */
  78. #define VSE_KBTRAW 2 /* undetermined */
  79. /* vse_device field */
  80. #define VSE_NULL 0 /* NULL event (for QD_GETEVENT ret) */
  81. #define VSE_MOUSE 1 /* mouse */
  82. #define VSE_DKB 2 /* main keyboard */
  83. #define VSE_TABLET 3 /* graphics tablet */
  84. #define VSE_AUX 4 /* auxiliary */
  85. #define VSE_CONSOLE 5 /* console */
  86. /* The event queue */
  87. typedef struct _vs_eventqueue {
  88. vsEvent *events; /* input event buffer */
  89. int size; /* size of event buffer */
  90. int head; /* index into events */
  91. int tail; /* index into events */
  92. } vsEventQueue;
  93. /* mouse cursor position */
  94. typedef struct _vs_cursor {
  95. short x;
  96. short y;
  97. } vsCursor;
  98. /* mouse motion rectangle */
  99. typedef struct _vs_box {
  100. short bottom;
  101. short right;
  102. short left;
  103. short top;
  104. } vsBox;
  105. #endif /*_QEVENT_*/