Distributed Multihead X  1.16.4
usb-private.h
Go to the documentation of this file.
1 /*
2  * Copyright 2002 Red Hat Inc., Durham, North Carolina.
3  *
4  * All Rights Reserved.
5  *
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:
13  *
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.
17  *
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
25  * SOFTWARE.
26  */
27 
28 /*
29  * Authors:
30  * Rickard E. (Rik) Faith <faith@redhat.com>
31  *
32  */
33 
40 #ifndef _USB_PRIVATE_H_
41 #define _USB_PRIVATE_H_
42 
43 #include "dmxinputinit.h"
44 #include "inputstr.h"
45 #include <X11/Xos.h>
46 #include <errno.h>
47 #include <linux/input.h>
48 #include "usb-common.h"
49 
50  /* Support for force feedback was
51  * introduced in Linxu 2.4.10 */
52 #ifndef EV_MSC
53 #define EV_MSC 0x04
54 #endif
55 #ifndef EV_FF
56 #define EV_FF 0x15
57 #endif
58 #ifndef LED_SLEEP
59 #define LED_SLEEP 0x05
60 #endif
61 #ifndef LED_SUSPEND
62 #define LED_SUSPEND 0x06
63 #endif
64 #ifndef LED_MUTE
65 #define LED_MUTE 0x07
66 #endif
67 #ifndef LED_MISC
68 #define LED_MISC 0x08
69 #endif
70 #ifndef BTN_DEAD
71 #define BTN_DEAD 0x12f
72 #endif
73 #ifndef BTN_THUMBL
74 #define BTN_THUMBL 0x13d
75 #endif
76 #ifndef BTN_THUMBR
77 #define BTN_THUMBR 0x13e
78 #endif
79 #ifndef MSC_SERIAL
80 #define MSC_SERIAL 0x00
81 #endif
82 #ifndef MSC_MAX
83 #define MSC_MAX 0x07
84 #endif
85 
86  /* Support for older kernels. */
87 #ifndef ABS_WHEEL
88 #define ABS_WHEEL 0x08
89 #endif
90 #ifndef ABS_GAS
91 #define ABS_GAS 0x09
92 #endif
93 #ifndef ABS_BRAKE
94 #define ABS_BRAKE 0x0a
95 #endif
96 
97 #define NUM_STATE_ENTRIES (256/32)
98 
99 /* Private area for USB devices. */
100 typedef struct _myPrivate {
101  DeviceIntPtr pDevice;
102  int fd;
103  unsigned char mask[EV_MAX / 8 + 1];
105  int relmap[REL_CNT];
106  int absmap[ABS_CNT];
108  CARD32 kbdState[NUM_STATE_ENTRIES];
109  DeviceIntPtr pKeyboard;
111  int pitch;
112  unsigned long duration;
114  /* FIXME: dmxInput is never initialized */
116 } myPrivate;
117 #endif
Definition: dmxinput.h:84
DeviceIntPtr pDevice
Definition: usb-private.h:101
int numRel
Definition: usb-private.h:104
unsigned char mask[EV_MAX/8+1]
Definition: usb-private.h:103
int numAbs
Definition: usb-private.h:104
int pitch
Definition: lnx-keyboard.c:192
unsigned long duration
Definition: lnx-keyboard.c:193
struct _myPrivate myPrivate
int relmap[REL_CNT]
Definition: usb-private.h:105
DeviceIntPtr pKeyboard
Definition: lnx-keyboard.c:184
int fd
Definition: lnx-keyboard.c:177
CARD32 kbdState[NUM_STATE_ENTRIES]
Definition: lnx-keyboard.c:183
DMXInputInfo * dmxInput
Definition: usb-private.h:115
Definition: dmxbackend.c:64
int absmap[ABS_CNT]
Definition: usb-private.h:106
#define NUM_STATE_ENTRIES
Definition: usb-private.h:97
int numLeds
Definition: usb-private.h:104

Generated on Tue Aug 18 2015 01:27:31 for Distributed Multihead X by doxygen 1.8.8