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