|
|
1.1 root 1: /*
2: * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
3: *
4: * @APPLE_LICENSE_HEADER_START@
5: *
6: * The contents of this file constitute Original Code as defined in and
7: * are subject to the Apple Public Source License Version 1.1 (the
8: * "License"). You may not use this file except in compliance with the
9: * License. Please obtain a copy of the License at
10: * http://www.apple.com/publicsource and read it before using this file.
11: *
12: * This Original Code and all software distributed under the License are
13: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17: * License for the specific language governing rights and limitations
18: * under the License.
19: *
20: * @APPLE_LICENSE_HEADER_END@
21: */
22: /*
23: * Copyright (c) 1998 Apple Computer, Inc. All rights reserved.
24: *
25: * HISTORY
26: *
27: */
28:
29:
30: #ifndef _IOKIT_APPLEMOUSE_H
31: #define _IOKIT_APPLEMOUSE_H
32:
33: #include <IOKit/IOLib.h>
34: #include <IOKit/IOService.h>
35: #include <IOKit/hidsystem/IOHIPointing.h>
36: #include <IOKit/hidsystem/IOHIDDescriptorParser.h>
37: #include <IOKit/IOBufferMemoryDescriptor.h>
38:
39: #include <IOKit/usb/IOUSBBus.h>
40: #include <IOKit/usb/IOUSBDevice.h>
41: #include <IOKit/usb/USB.h>
42:
43: class AppleMouse : public IOHIPointing
44: {
45: OSDeclareDefaultStructors(AppleMouse)
46:
47: const IOUSBDeviceDescriptor *_deviceDescriptor;
48: IOUSBInterface * _interface;
49: IOUSBPipe * _interruptPipe;
50: IOBufferMemoryDescriptor * _buffer;
51: IOUSBCompletion _completion;
52: UInt16 _maxPacketSize;
53: HIDPreparsedDataRef _preparsedReportDescriptorData;
54: SInt32 _buttonCollection;
55: SInt32 _xCollection;
56: SInt32 _yCollection;
57: SInt32 _tipPressureCollection;
58: SInt32 _digitizerButtonCollection;
59: SInt32 _scrollWheelCollection;
60: int _tipPressureMin;
61: SInt16 _tipPressureMax;
62: bool _absoluteCoordinates;
63: bool _hasInRangeReport;
64: Bounds _bounds;
65: IOItemCount _numButtons;
66:
67: public:
68:
69: virtual bool start(IOService * provider);
70: virtual void stop(IOService * provider);
71:
72: virtual bool parseHIDDescriptor();
73:
74: virtual UInt32 interfaceID( void );
75: virtual UInt32 deviceType( void );
76:
77: void accelerationTable(IOHIAccelerationPoint ** table,
78: IOItemCount * numEntries);
79: IOFixed resolution();
80: IOItemCount buttonCount();
81:
82: void readHandler(void * parameter,
83: IOReturn status,
84: UInt32 bufferSizeRemaining);
85:
86: void MoveMouse(UInt8 * mouseData,
87: UInt32 ret_bufsize);
88: };
89:
90: #endif _IOKIT_APPLEMOUSE_H
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.