2 * Copyright 2001-2014 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors (in chronological order):
6 * Elad Lahav, elad@eldarshany.com
7 * Stefano Ceccherini, burton666@libero.it
8 * Axel Dörfler, axeld@pinc-software.de
9 * Marcus Overhagen, marcus@overhagen.de
10 * Clemens Zeidler, czeidler@gmx.de
11 * John Scipione, jscipione@gmail.com
13 #ifndef __PS2_STANDARD_MOUSE_H
14 #define __PS2_STANDARD_MOUSE_H
19 #include "packet_buffer.h"
22 #define MOUSE_HISTORY_SIZE 256
23 // we record that many mouse packets before we start to drop them
25 #define F_MOUSE_TYPE_STANDARD 0x1
26 #define F_MOUSE_TYPE_INTELLIMOUSE 0x2
31 sem_id standard_mouse_sem
;
32 struct packet_buffer
* standard_mouse_buffer
;
33 bigtime_t click_last_time
;
34 bigtime_t click_speed
;
39 uint8 buffer
[PS2_MAX_PACKET_SIZE
];
40 } standard_mouse_cookie
;
43 status_t
probe_standard_mouse(ps2_dev
* dev
);
45 status_t
standard_mouse_open(const char* name
, uint32 flags
, void** _cookie
);
46 status_t
standard_mouse_close(void* _cookie
);
47 status_t
standard_mouse_freecookie(void* _cookie
);
48 status_t
standard_mouse_ioctl(void* _cookie
, uint32 op
, void* buffer
,
51 int32
standard_mouse_handle_int(ps2_dev
* dev
);
52 void standard_mouse_disconnect(ps2_dev
* dev
);
54 extern device_hooks gStandardMouseDeviceHooks
;
57 #endif /* __PS2_STANDARD_MOUSE_H */