1mouse_getx(3) Svgalib User Manual mouse_getx(3)
2
3
4
6 mouse_getx, mouse_gety, mouse_getbutton - query the mouse state
7
9 #include <vgamouse.h>
10
11 int mouse_getx(void);
12 int mouse_gety(void);
13 int mouse_getbutton(void);
14
15
17 These three routines do the obvious, namely returning current mouse
18 pointer position and button state. mouse_getbutton() returns an inte‐
19 ger which can be bitwise &'d with MOUSE_LEFTBUTTON, MOUSE_MIDDLEBUTTON,
20 MOUSE_RIGHTBUTTON, MOUSE_FOURTHBUTTON, MOUSE_FIFTHBUTTON, MOUSE_SIXTH‐
21 BUTTON, or MOUSE_RESETBUTTON.
22
23 A 1 on any of these bits means the button has been pressed, a 0 means
24 it hasn't.
25
26 Please note that you need to call mouse_update(3) or mouse_waitforup‐
27 date(3) for the mouse state actually to change.
28
29 For 3d pointer devices, there is actually another interface. See
30 mouse_getposition_6d(3).
31
33 svgalib(7), vgagl(7), libvga.config(5), eventtest(6), mouse_close(3),
34 mouse_init(3), mouse_getposition_6d(3), mouse_setposition(3),
35 mouse_setscale(3), mouse_setwrap(3), mouse_setxrange(3),
36 mouse_update(3), mouse_waitforupdate(3), vga_setmousesupport(3),
37 mouse_seteventhandler(3), vga_waitevent(3)
38
40 This manual page was edited by Michael Weller <eowmob@exp-math.uni-
41 essen.de>. The exact source of the referenced function as well as of
42 the original documentation is unknown.
43
44 It is very likely that both are at least to some extent are due to Harm
45 Hanemaayer <H.Hanemaayer@inter.nl.net>.
46
47 Occasionally this might be wrong. I hereby asked to be excused by the
48 original author and will happily accept any additions or corrections to
49 this first version of the svgalib manual.
50
51
52
53Svgalib (>= 1.2.11) 27 July 1997 mouse_getx(3)