|
|
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: * 18 June 1998 sdouglas Start IOKit version.
24: * 18 Nov 1998 suurballe port to C++
25: * 4 Oct 1999 decesare Revised for Type 4 support and sub-classed drivers.
26: */
27:
28: #include <IOKit/adb/IOADBDevice.h>
29: #include <IOKit/hidsystem/IOHIPointing.h>
30:
31: #define TRUE 1
32: #define FALSE 0
33:
34: #define kSoftClick "Clicking"
35: #define k15Press "Dragging"
36: #define kStickyDrag "DragLock"
37:
38: class AppleADBMouse: public IOHIPointing
39: {
40: OSDeclareDefaultStructors(AppleADBMouse);
41:
42: protected:
43: IOADBDevice * adbDevice;
44: IOFixed _resolution;
45: IOItemCount _buttonCount;
46:
47: public:
48: virtual IOService * probe(IOService * provider, SInt32 * score);
49: virtual bool start(IOService * provider);
50: virtual UInt32 interfaceID(void);
51: virtual UInt32 deviceType(void);
52: virtual IOFixed resolution(void);
53: virtual IOItemCount buttonCount(void);
54: virtual void packet(UInt8 adbCommand, IOByteCount length, UInt8 * data);
55: virtual void accelerationTable(IOHIAccelerationPoint ** table, IOItemCount * numEntries);
56: virtual IOReturn setParamProperties( OSDictionary * dict );
57: };
58:
59:
60: class AppleADBMouseType1 : public AppleADBMouse
61: {
62: OSDeclareDefaultStructors(AppleADBMouseType1);
63:
64: public:
65: virtual IOService * probe(IOService * provider, SInt32 * score);
66: virtual bool start(IOService * provider);
67: };
68:
69:
70: class AppleADBMouseType2 : public AppleADBMouse
71: {
72: OSDeclareDefaultStructors(AppleADBMouseType2);
73:
74: public:
75: virtual IOService * probe(IOService * provider, SInt32 * score);
76: virtual bool start(IOService * provider);
77: };
78:
79:
80: class AppleADBMouseType4 : public AppleADBMouse
81: {
82: OSDeclareDefaultStructors(AppleADBMouseType4);
83:
84: private:
85: bool Clicking, Dragging, DragLock;
86:
87: protected:
88: UInt32 deviceSignature;
89: UInt16 deviceResolution;
90: UInt8 deviceClass;
91: UInt8 deviceNumButtons;
92:
93: public:
94: virtual IOService * probe(IOService * provider, SInt32 * score);
95: virtual bool start(IOService * provider);
96: virtual void packet(UInt8 adbCommand, IOByteCount length, UInt8 * data);
97: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.