1vga_getmousetype(3)           Svgalib User Manual          vga_getmousetype(3)
2
3
4

NAME

6       mouse_getcaps - returns the capabilities of the mouse
7

SYNOPSIS

9       #include <vgamouse.h>
10
11       int mouse_getcaps(struct MouseCaps *caps);
12
13

DESCRIPTION

15       This  fills  a structure with information about the capabilities of the
16       mouse as configured in /etc/vga/libvga.config.
17
18       The return value is 0 on success, -1 on failure. Failure indicates that
19       an  older  version  of  the svgalib library is being used that does not
20       support this function, and the capabilities should be inferred from the
21       mouse type as retrieved by the function vga_getmousetype(3).
22
23       The MouseCaps structure contains the following members:
24
25       int key;
26              After  a  successful call of mouse_getcaps this should be set to
27              MOUSE_GOTCAPS.  The values of this and  the  other  members  are
28              undefined in the case of failure.
29       int buttons;
30              A  bitmask indicating which buttons are supported by the device,
31              composed of the constants MOUSE_LEFTBUTTON,  MOUSE_MIDDLEBUTTON,
32              MOUSE_RIGHTBUTTON,     MOUSE_FOURTHBUTTON,    MOUSE_FIFTHBUTTON,
33              MOUSE_SIXTHBUTTON, and MOUSE_RESETBUTTON. Note  that  MOUSE_MID‐
34              DLEBUTTON  may  be set when using mouse protocols that support a
35              middle button even if there is no button physically  present  on
36              the mouse.
37       int axes;
38              A  bitmask  indicating  which  axes are supported by the device,
39              composed of the constants  MOUSE_XDIM,  MOUSE_YDIM,  MOUSE_ZDIM,
40              MOUSE_RXDIM, MOUSE_RYDIM, and MOUSE_RZDIM.
41       int info;
42              A  bitmask  indicating  other  information about the mouse. Cur‐
43              rently the only field defined is MOUSE_INFO_WHEEL,  which  indi‐
44              cates that the mouse is a wheel mouse.
45       int reserved0;
46              Reserved for future use.
47       int reserved1;
48              Reserved for future use.
49
50       Your application may use this info to perform specific actions (go into
51       a 3d pointer device mode or make use of a wheel for scrolling for exam‐
52       ple).
53
54

SEE ALSO

56       svgalib(7),    vgagl(7),   libvga.config(5),   mousetest(6),   spin(6),
57       mouse_close(3), mouse_getposition_6d(3), mouse_getx(3),  mouse_init(3),
58       mouse_setposition(3),        mouse_setscale(3),       mouse_setwrap(3),
59       mouse_setxrange(3), mouse_update(3),  mouse_waitforupdate(3),  vga_get‐
60       mousetype(3) vga_init(3), vga_setmousesupport(3), vga_waitevent(3)
61
62

AUTHOR

64       This  manual  page was heavily edited by Brion Vibber <brion@pobox.com>
65       from material on another function edited by Michael Weller <eowmob@exp-
66       math.uni-essen.de>.  The  exact source of the original documentation is
67       unknown.
68
69       It is very likely that it is at least to some extent due to Harm  Hane‐
70       maayer <H.Hanemaayer@inter.nl.net>.
71
72       Occasionally  this  might  be  wrong. I hereby ask to be excused by the
73       original author and will happily accept any additions or corrections to
74       this first version of the svgalib manual.
75
76
77
78Svgalib (>= 1.3.0)                5 July 1998              vga_getmousetype(3)
Impressum