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

NAME

6       mouse_setwrap - set what happens at the mouse boundaries
7

SYNOPSIS

9       #include <vgamouse.h>
10
11       void mouse_setwrap(int state);
12
13

DESCRIPTION

15       This  routine  determines  what  to  do if the mouse position reaches a
16       boundary.
17
18       state should be either MOUSE_WRAP, MOUSE_NOWRAP, or  a  bitwise  or  of
19       MOUSE_WRAPX,  MOUSE_WRAPY,  MOUSE_WRAPZ, MOUSE_WRAPRX, MOUSE_WRAPRY, or
20       MOUSE_WRAPRZ.  These define if all or the respective  coordinates  wrap
21       or are clipped at the ends.
22
23       This  variable  has  been  overloaded for the case of multi-dimensional
24       mice that support rotations and can be used to  select  the  coordinate
25       system used to return the current position of the mouse.
26
27       If the above value of state is also ored with MOUSE_ROT_RX_RY_RZ, rota‐
28       tional  information  will  be  returned  as  the  angular  position  as
29       expressed  by  the total angle wound around the X, Y, and Z axes.  This
30       is the simplest coordinate system to use, but it's also the least  use‐
31       ful,  since  angular  rotations about perpendicular axes don't commute.
32       There are situations where this system might be useful, for controlling
33       truly  independent quantities, such as color, with each axis being used
34       to dial a level of red, green, or blue, but  for  modeling  the  actual
35       orientation of a physical object, it's utterly hopeless.
36
37       If  state  is  instead  ored  with MOUSE_ROT_INFINITESIMAL, the angular
38       positions returned are expressed as  differences  from  the  previously
39       reported  position.   If  the  differences  are sufficiently small, the
40       angular displacements will commute with each other and can be  used  to
41       track  the motion of a physical object.  Other coordinate systems, such
42       as yaw, pitch, and roll, could be defined, but haven't been done due to
43       lack  of  time.   If  you feel you need this feature, send mail to Eric
44       Sharkey <sharkey@superk.physics.sunysb.edu> and he just might  consider
45       coding it up.
46
47       MOUSE_WRAP  and  MOUSE_ROT_COORDS can be used to mask out the bits used
48       for wrap and coordinate states, respectively.
49
50

SEE ALSO

52       svgalib(7), vgagl(7), libvga.config(5),  eventtest(6),  mouse_close(3),
53       mouse_init(3),      mouse_getposition_6d(3),      mouse_setposition(3),
54       mouse_setscale(3), mouse_getx(3), mouse_setxrange(3),  mouse_update(3),
55       mouse_waitforupdate(3),      vga_setmousesupport(3),     mouse_seteven‐
56       thandler(3), vga_waitevent(3)
57

AUTHOR

59       This manual page was edited  by  Michael  Weller  <eowmob@exp-math.uni-
60       essen.de>.  The  exact  source of the referenced function as well as of
61       the original documentation is unknown.
62
63       It is very likely that both are at least to some extent are due to Harm
64       Hanemaayer <H.Hanemaayer@inter.nl.net>.
65
66       Occasionally  this  might be wrong. I hereby asked to be excused by the
67       original author and will happily accept any additions or corrections to
68       this first version of the svgalib manual.
69
70
71
72Svgalib (>= 1.2.11)              27 July 1997                 mouse_setwrap(3)
Impressum