2 * Copyright 2013 Stephan Aßmus <superstippi@gmx.de>
3 * Copyright 2010-2011 Enrique Medina Gremaldos <quiqueiii@gmail.com>
4 * Copyright 2008-2011 Michael Lotz <mmlr@mlotz.ch>
5 * Distributed under the terms of the MIT license.
7 #ifndef USB_TABLET_PROTOCOL_HANDLER_H
8 #define USB_TABLET_PROTOCOL_HANDLER_H
11 #include <InterfaceDefs.h>
13 #include "ProtocolHandler.h"
20 #ifndef B_MAX_MOUSE_BUTTONS
21 # define B_MAX_MOUSE_BUTTONS 8
25 class TabletProtocolHandler
: public ProtocolHandler
{
27 TabletProtocolHandler(HIDReport
&report
,
29 HIDReportItem
&yAxis
);
31 static void AddHandlers(HIDDevice
&device
,
32 HIDCollection
&collection
,
33 ProtocolHandler
*&handlerList
);
35 virtual status_t
Control(uint32
*cookie
, uint32 op
, void *buffer
,
39 status_t
_ReadReport(void *buffer
, uint32
*cookie
);
43 HIDReportItem
& fXAxis
;
44 HIDReportItem
& fYAxis
;
45 HIDReportItem
* fWheel
;
46 HIDReportItem
* fButtons
[B_MAX_MOUSE_BUTTONS
];
48 HIDReportItem
* fPressure
;
49 HIDReportItem
* fRange
;
51 HIDReportItem
* fBarrelSwitch
;
52 HIDReportItem
* fEraser
;
53 HIDReportItem
* fXTilt
;
54 HIDReportItem
* fYTilt
;
58 bigtime_t fLastClickTime
;
59 bigtime_t fClickSpeed
;
62 #endif // USB_TABLET_PROTOCOL_HANDLER_H