wsmoused.h revision 1.1 1 1.1 christos /* $NetBSD: wsmoused.h,v 1.1 2002/06/26 23:13:11 christos Exp $ */
2 1.1 christos
3 1.1 christos /*
4 1.1 christos * Copyright (c) 2002 The NetBSD Foundation, Inc.
5 1.1 christos * All rights reserved.
6 1.1 christos *
7 1.1 christos * This code is derived from software contributed to The NetBSD Foundation
8 1.1 christos * by Julio Merino.
9 1.1 christos *
10 1.1 christos * Redistribution and use in source and binary forms, with or without
11 1.1 christos * modification, are permitted provided that the following conditions
12 1.1 christos * are met:
13 1.1 christos * 1. Redistributions of source code must retain the above copyright
14 1.1 christos * notice, this list of conditions and the following disclaimer.
15 1.1 christos * 2. The name authors may not be used to endorse or promote products
16 1.1 christos * derived from this software without specific prior written
17 1.1 christos * permission.
18 1.1 christos *
19 1.1 christos * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
20 1.1 christos * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 1.1 christos * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 1.1 christos * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
23 1.1 christos * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 1.1 christos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
25 1.1 christos * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 1.1 christos * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27 1.1 christos * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 1.1 christos * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 1.1 christos * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 1.1 christos */
31 1.1 christos
32 1.1 christos #ifndef _WSMOUSED_WSMOUSED_H
33 1.1 christos #define _WSMOUSED_WSMOUSED_H
34 1.1 christos
35 1.1 christos struct mouse {
36 1.1 christos /* File descriptors and names */
37 1.1 christos int fd;
38 1.1 christos int tty_fd;
39 1.1 christos int stat_fd;
40 1.1 christos int fifo_fd;
41 1.1 christos char *device_name;
42 1.1 christos char *fifo_name;
43 1.1 christos
44 1.1 christos /* Screen coordinates */
45 1.1 christos size_t row, col;
46 1.1 christos size_t max_row, max_col;
47 1.1 christos
48 1.1 christos /* Movement information */
49 1.1 christos size_t slowdown_x, slowdown_y;
50 1.1 christos size_t count_row, count_col;
51 1.1 christos
52 1.1 christos int cursor;
53 1.1 christos int selecting;
54 1.1 christos int disabled;
55 1.1 christos };
56 1.1 christos
57 1.1 christos /* Prototypes for wsmoused.c */
58 1.1 christos void char_invert(struct mouse *, size_t, size_t);
59 1.1 christos void mouse_cursor_show(struct mouse *);
60 1.1 christos void mouse_cursor_hide(struct mouse *);
61 1.1 christos void mouse_open_tty(struct mouse *, int);
62 1.1 christos
63 1.1 christos /* Prototypes for event.c */
64 1.1 christos void mouse_motion_event(struct mouse *, struct wscons_event *);
65 1.1 christos void mouse_button_event(struct mouse *, struct wscons_event *);
66 1.1 christos void screen_event(struct mouse *, struct wscons_event *);
67 1.1 christos
68 1.1 christos /* Prototypes for selection.c */
69 1.1 christos void mouse_sel_init(void);
70 1.1 christos void mouse_sel_start(struct mouse *);
71 1.1 christos void mouse_sel_end(struct mouse *);
72 1.1 christos void mouse_sel_calculate(struct mouse *);
73 1.1 christos void mouse_sel_hide(struct mouse *);
74 1.1 christos void mouse_sel_show(struct mouse *);
75 1.1 christos void mouse_sel_paste(struct mouse *);
76 1.1 christos
77 1.1 christos #endif /* _WSMOUSED_WSMOUSED_H */
78