xref: /haiku/src/add-ons/input_server/devices/wacom/PointingDevice.h (revision dc1bdabb92cf7b72403fc3f2a8eb9ef75d4926f2)
1 /*
2  * Copyright 2005-2008 Stephan Aßmus <superstippi@gmx.de>. All rights reserved.
3  * Distributed under the terms of the MIT license.
4  */
5 #ifndef POINTING_DEVICE_H
6 #define POINTING_DEVICE_H
7 
8 #include <SupportDefs.h>
9 
10 class DeviceReader;
11 class MasterServerDevice;
12 
13 class PointingDevice {
14  public:
15 								PointingDevice(MasterServerDevice* parent,
16 											   DeviceReader* reader);
17 	virtual						~PointingDevice();
18 
19 	virtual status_t			InitCheck();
20 
21 	virtual	status_t			Start() = 0;
22 	virtual	status_t			Stop() = 0;
23 
24 	virtual	void				SetActive(bool active);
25 			bool				IsActive() const;
26 
27 								// forwards the device path of the reader
28 			const char*			DevicePath() const;
29 
30 								// hook function to determine if
31 								// PS/2 Mouse thread should be disabled
32 	virtual	bool				DisablePS2() const;
33 
34 			// query the device for information
35 			uint16				VendorID() const;
36 			uint16				ProductID() const;
37 
38  protected:
39 	MasterServerDevice*			fParent;
40 	DeviceReader*				fReader;
41 
42 	volatile bool				fActive;
43 };
44 
45 #endif // POINTING_DEVICE_H
46