docs/man3/SDL_JoyBallEvent.3
author Sam Lantinga <slouken@libsdl.org>
Wed, 08 Mar 2006 18:30:12 +0000
changeset 1486 9d77fc9d0ace
parent 181 e5bc29de3f0a
child 2283 546f7c1eb755
permissions -rw-r--r--
Re-added C runtime support for Visual C++ 5,6
slouken@181
     1
.TH "SDL_JoyBallEvent" "3" "Tue 11 Sep 2001, 22:59" "SDL" "SDL API Reference" 
slouken@0
     2
.SH "NAME"
slouken@0
     3
SDL_JoyBallEvent\- Joystick trackball motion event structure
slouken@0
     4
.SH "STRUCTURE DEFINITION"
slouken@0
     5
.PP
slouken@0
     6
.nf
slouken@0
     7
\f(CWtypedef struct{
slouken@0
     8
  Uint8 type;
slouken@0
     9
  Uint8 which;
slouken@0
    10
  Uint8 ball;
slouken@0
    11
  Sint16 xrel, yrel;
slouken@0
    12
} SDL_JoyBallEvent;\fR
slouken@0
    13
.fi
slouken@0
    14
.PP
slouken@0
    15
.SH "STRUCTURE DATA"
slouken@0
    16
.TP 20
slouken@0
    17
\fBtype\fR
slouken@0
    18
\fBSDL_JOYBALLMOTION\fP
slouken@0
    19
.TP 20
slouken@0
    20
\fBwhich\fR
slouken@0
    21
Joystick device index
slouken@0
    22
.TP 20
slouken@0
    23
\fBball\fR
slouken@0
    24
Joystick trackball index
slouken@0
    25
.TP 20
slouken@0
    26
\fBxrel\fR, \fByrel\fR
slouken@0
    27
The relative motion in the X/Y direction
slouken@0
    28
.SH "DESCRIPTION"
slouken@0
    29
.PP
slouken@0
    30
\fBSDL_JoyBallEvent\fR is a member of the \fI\fBSDL_Event\fR\fR union and is used when an event of type \fBSDL_JOYBALLMOTION\fP is reported\&.
slouken@0
    31
.PP
slouken@0
    32
A \fBSDL_JOYBALLMOTION\fP event occurs when a user moves a trackball on the joystick\&. The field \fBwhich\fR is the index of the joystick that reported the event and \fBball\fR is the index of the trackball (for a more detailed explaination see the \fIJoystick section\fR)\&. Trackballs only return relative motion, this is the change in position on the ball since it was last polled (last cycle of the event loop) and it is stored in \fBxrel\fR and \fByrel\fR\&.
slouken@0
    33
.SH "SEE ALSO"
slouken@0
    34
.PP
slouken@0
    35
\fI\fBSDL_Event\fR\fR, \fIJoystick Functions\fR, \fI\fBSDL_JoystickEventState\fP\fR, \fI\fBSDL_JoystickGetBall\fP\fR
slouken@181
    36
...\" created by instant / docbook-to-man, Tue 11 Sep 2001, 22:59