Root/
Source at commit 1146 created 12 years 11 months ago. By azimutz, Sync with trunk (r1145). Add nVidia dev id's, 0DF4 for "GeForce GT 450M" (issue 99) and 1251 for "GeForce GTX 560M" (thanks to oSxFr33k for testing). | |
---|---|
1 | /*␊ |
2 | *␊ |
3 | * @APPLE_LICENSE_HEADER_START@␊ |
4 | * ␊ |
5 | * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.␊ |
6 | * ␊ |
7 | * This file contains Original Code and/or Modifications of Original Code␊ |
8 | * as defined in and that are subject to the Apple Public Source License␊ |
9 | * Version 2.0 (the 'License'). You may not use this file except in␊ |
10 | * compliance with the License. Please obtain a copy of the License at␊ |
11 | * http://www.opensource.apple.com/apsl/ and read it before using this␊ |
12 | * file.␊ |
13 | * ␊ |
14 | * The Original Code and all software distributed under the License are␊ |
15 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
16 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
17 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
18 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.␊ |
19 | * Please see the License for the specific language governing rights and␊ |
20 | * limitations under the License.␊ |
21 | * ␊ |
22 | * @APPLE_LICENSE_HEADER_END@␊ |
23 | */␊ |
24 | ␊ |
25 | #ifndef _IOKIT_HID_IOHIDEVENTDRIVER_H␊ |
26 | #define _IOKIT_HID_IOHIDEVENTDRIVER_H␊ |
27 | ␊ |
28 | #include <IOKit/IOService.h>␊ |
29 | #include <IOKit/hidsystem/IOHIDTypes.h>␊ |
30 | #include <IOKit/hid/IOHIDInterface.h>␊ |
31 | #include <IOKit/hidevent/IOHIDEventService.h>␊ |
32 | ␊ |
33 | ␊ |
34 | /*! @class IOHIDEventDriver : public IOHIDEventService␊ |
35 | @abstract␊ |
36 | @discussion␊ |
37 | */␊ |
38 | struct IOHIDReportHandler;␊ |
39 | ␊ |
40 | class IOHIDEventDriver: public IOHIDEventService␊ |
41 | {␊ |
42 | OSDeclareDefaultStructors( IOHIDEventDriver )␊ |
43 | ␊ |
44 | private:␊ |
45 | IOHIDInterface * _interface;␊ |
46 | IOHIDReportHandler * _reportHandlers;␊ |
47 | ␊ |
48 | IOHIDElement * _ledElements[2];␊ |
49 | OSArray * _supportedElements;␊ |
50 | ␊ |
51 | UInt32 _bootSupport;␊ |
52 | bool _multipleReports;␊ |
53 | bool _relativeButtonCollection;␊ |
54 | UInt32 _cachedButtonState;␊ |
55 | bool _cachedRangeState;␊ |
56 | ␊ |
57 | struct ExpansionData { ␊ |
58 | };␊ |
59 | /*! @var reserved␊ |
60 | Reserved for future use. (Internal use only) */␊ |
61 | ExpansionData * _reserved;␊ |
62 | ␊ |
63 | bool findElements ( OSArray * elementArray, UInt32 bootProtocol );␊ |
64 | ␊ |
65 | bool storeReportElement ( IOHIDElement * element );␊ |
66 | ␊ |
67 | void handleBootPointingReport (␊ |
68 | IOMemoryDescriptor * report,␊ |
69 | SInt32 * dX,␊ |
70 | SInt32 * dY,␊ |
71 | UInt32 * buttonState);␊ |
72 | ␊ |
73 | static void _handleInterruptReport (␊ |
74 | OSObject * target,␊ |
75 | AbsoluteTime timeStamp,␊ |
76 | IOMemoryDescriptor * report,␊ |
77 | IOHIDReportType reportType,␊ |
78 | UInt32 reportID,␊ |
79 | void * refcon);␊ |
80 | ␊ |
81 | protected:␊ |
82 | ␊ |
83 | virtual void free();␊ |
84 | ␊ |
85 | virtual OSArray * getReportElements();␊ |
86 | ␊ |
87 | virtual bool handleStart( IOService * provider );␊ |
88 | ␊ |
89 | virtual void handleStop( IOService * provider );␊ |
90 | ␊ |
91 | virtual void handleInterruptReport (␊ |
92 | AbsoluteTime timeStamp,␊ |
93 | IOMemoryDescriptor * report,␊ |
94 | IOHIDReportType reportType,␊ |
95 | UInt32 reportID);␊ |
96 | ␊ |
97 | virtual OSString * getTransport ();␊ |
98 | ␊ |
99 | virtual UInt32 getLocationID ();␊ |
100 | ␊ |
101 | virtual UInt32 getVendorID ();␊ |
102 | ␊ |
103 | virtual UInt32 getVendorIDSource ();␊ |
104 | ␊ |
105 | virtual UInt32 getProductID ();␊ |
106 | ␊ |
107 | virtual UInt32 getVersion ();␊ |
108 | ␊ |
109 | virtual UInt32 getCountryCode ();␊ |
110 | ␊ |
111 | virtual OSString * getManufacturer ();␊ |
112 | ␊ |
113 | virtual OSString * getProduct ();␊ |
114 | ␊ |
115 | virtual OSString * getSerialNumber ();␊ |
116 | ␊ |
117 | virtual void setElementValue (␊ |
118 | UInt32 usagePage,␊ |
119 | UInt32 usage,␊ |
120 | UInt32 value );␊ |
121 | ␊ |
122 | virtual UInt32 getElementValue ( ␊ |
123 | UInt32 usagePage,␊ |
124 | UInt32 usage );␊ |
125 | ␊ |
126 | public:␊ |
127 | ␊ |
128 | ␊ |
129 | virtual bool init( OSDictionary * dictionary = 0 );␊ |
130 | ␊ |
131 | virtual bool didTerminate(␊ |
132 | IOService * provider,␊ |
133 | IOOptionBits options,␊ |
134 | bool * defer );␊ |
135 | ␊ |
136 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 0);␊ |
137 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 1);␊ |
138 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 2);␊ |
139 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 3);␊ |
140 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 4);␊ |
141 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 5);␊ |
142 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 6);␊ |
143 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 7);␊ |
144 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 8);␊ |
145 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 9);␊ |
146 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 10);␊ |
147 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 11);␊ |
148 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 12);␊ |
149 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 13);␊ |
150 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 14);␊ |
151 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 15);␊ |
152 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 16);␊ |
153 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 17);␊ |
154 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 18);␊ |
155 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 19);␊ |
156 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 20);␊ |
157 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 21);␊ |
158 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 22);␊ |
159 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 23);␊ |
160 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 24);␊ |
161 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 25);␊ |
162 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 26);␊ |
163 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 27);␊ |
164 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 28);␊ |
165 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 29);␊ |
166 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 30);␊ |
167 | OSMetaClassDeclareReservedUnused(IOHIDEventDriver, 31);␊ |
168 | ␊ |
169 | };␊ |
170 | ␊ |
171 | #endif /* !_IOKIT_HID_IOHIDEVENTDRIVER_H */␊ |
172 |