Debian Codegraph @

i386/i386at/kd_mouse.h

raw
1 /*
2 * Mouse event handlers
3 * Copyright (C) 2006 Free Software Foundation, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
18 *
19 * Author: Barry deFreese.
20 */
21 /*
22 * Mouse event handling functions.
23 *
24 */
25
26 #ifndef _KD_MOUSE_H_
27 #define _KD_MOUSE_H_
28
29 #include <sys/types.h>
30
31 #define MOUSEBUFSIZE 5 /* num bytes def'd by protocol */
32
33 extern void mouse_button (kev_type which, u_char direction);
34
35 extern void mouse_enqueue (kd_event *ev);
36
37 extern void mouse_moved (struct mouse_motion where);
38
39 extern void mouse_handle_byte (u_char ch);
40
41 extern void serial_mouse_open (dev_t dev);
42
43 extern void serial_mouse_close (dev_t dev, int flags);
44
45 extern void kd_mouse_open (dev_t dev, int mouse_pic);
46
47 extern void kd_mouse_close (dev_t dev, int mouse_pic);
48
49 extern void ibm_ps2_mouse_open (dev_t dev);
50
51 extern void ibm_ps2_mouse_close (dev_t dev);
52
53 extern void mouse_packet_microsoft_mouse (u_char mousebuf[MOUSEBUFSIZE]);
54
55 extern void mouse_packet_mouse_system_mouse (u_char mousebuf[MOUSEBUFSIZE]);
56
57 extern void mouse_packet_ibm_ps2_mouse (u_char mousebuf[MOUSEBUFSIZE]);
58
59 extern int mouseopen(dev_t dev, int flags, io_req_t ior);
60 extern void mouseclose(dev_t dev, int flags);
61 extern int mouseread(dev_t dev, io_req_t ior);
62
63 extern io_return_t mousegetstat(
64 dev_t dev,
65 dev_flavor_t flavor,
66 dev_status_t data,
67 mach_msg_type_number_t *count);
68
69 void mouseintr(int unit);
70 boolean_t mouse_read_done(io_req_t ior);
71
72 #endif /* _KD_MOUSE_H_ */