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_IOHIDPOINTINGDEVICE_H
26#define _IOKIT_HID_IOHIDPOINTINGDEVICE_H
27
28#include "IOHIDDeviceShim.h"
29#include "IOHIPointing.h"
30
31class IOHIDPointingDevice : public IOHIDDeviceShim
32{
33    OSDeclareDefaultStructors( IOHIDPointingDevice )
34
35private:
36    bool			_isScrollPresent;
37    UInt8			_numButtons;
38    UInt32			_resolution;
39    IOBufferMemoryDescriptor *	_report;
40    IOHIPointing *		_pointing;
41
42protected:
43
44    virtual void free();
45    virtual bool handleStart( IOService * provider );
46
47public:
48    static IOHIDPointingDevice	* newPointingDeviceAndStart(IOService * owner, UInt8 numButtons = 8, UInt32 resolution = 100, bool scroll = false, UInt32 location = 0);
49
50    virtual bool initWithLocation( UInt32 location = 0 );
51
52    virtual IOReturn newReportDescriptor(
53                        IOMemoryDescriptor ** descriptor ) const;
54
55    virtual OSString * newProductString() const;
56
57    virtual IOReturn getReport( IOMemoryDescriptor * report,
58                                 IOHIDReportType      reportType,
59                                 IOOptionBits         options );
60
61    virtual void postMouseEvent(UInt8 buttons, UInt16 x, UInt16 y, UInt8 wheel=0);
62
63    inline bool isScrollPresent() {return _isScrollPresent;}
64};
65
66#endif /* !_IOKIT_HID_IOHIDPOINTINGDEVICE_H */
67