2 * Copyright 2002 Red Hat Inc., Durham, North Carolina.
6 * Permission is hereby granted, free of charge, to any person obtaining
7 * a copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation on the rights to use, copy, modify, merge,
10 * publish, distribute, sublicense, and/or sell copies of the Software,
11 * and to permit persons to whom the Software is furnished to do so,
12 * subject to the following conditions:
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial
16 * portions of the Software.
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21 * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
22 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
23 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30 * Rickard E. (Rik) Faith <faith@redhat.com>
35 * Private header file for USB support. This file provides
36 * Linux-specific include files and the definition of the private
37 * structure. \see usb-common.c \see usb-keyboard.c \see usb-mouse.c
40 #ifndef _USB_PRIVATE_H_
41 #define _USB_PRIVATE_H_
43 #include "dmxinputinit.h"
47 #include <linux/input.h>
48 #include "usb-common.h"
50 /* Support for force feedback was
51 * introduced in Linxu 2.4.10 */
59 #define LED_SLEEP 0x05
62 #define LED_SUSPEND 0x06
71 #define BTN_DEAD 0x12f
74 #define BTN_THUMBL 0x13d
77 #define BTN_THUMBR 0x13e
80 #define MSC_SERIAL 0x00
86 /* Support for older kernels. */
88 #define ABS_WHEEL 0x08
94 #define ABS_BRAKE 0x0a
97 #define NUM_STATE_ENTRIES (256/32)
99 /* Private area for USB devices. */
100 typedef struct _myPrivate
{
101 DeviceIntPtr pDevice
; /**< Device (mouse or other) */
102 int fd
; /**< File descriptor */
103 unsigned char mask
[EV_MAX
/8 + 1]; /**< Mask */
104 int numRel
, numAbs
, numLeds
; /**< Counts */
105 int relmap
[DMX_MAX_AXES
]; /**< Relative axis map */
106 int absmap
[DMX_MAX_AXES
]; /**< Absolute axis map */
108 CARD32 kbdState
[NUM_STATE_ENTRIES
]; /**< Keyboard state */
109 DeviceIntPtr pKeyboard
; /** Keyboard device */
111 int pitch
; /**< Bell pitch */
112 unsigned long duration
; /**< Bell duration */
114 /* FIXME: dmxInput is never initialized */
115 DMXInputInfo
*dmxInput
; /**< For pretty-printing */