1SDL_JoyBallEvent(3) SDL API Reference SDL_JoyBallEvent(3)
2
3
4
6 SDL_JoyBallEvent - Joystick trackball motion event structure
7
9 typedef struct{
10 Uint8 type;
11 Uint8 which;
12 Uint8 ball;
13 Sint16 xrel, yrel;
14 } SDL_JoyBallEvent;
15
17 type SDL_JOYBALLMOTION
18
19 which Joystick device index
20
21 ball Joystick trackball index
22
23 xrel, yrel The relative motion in the X/Y direction
24
26 SDL_JoyBallEvent is a member of the SDL_Event union and is used when an
27 event of type SDL_JOYBALLMOTION is reported.
28
29 A SDL_JOYBALLMOTION event occurs when a user moves a trackball on the
30 joystick. The field which is the index of the joystick that reported
31 the event and ball is the index of the trackball (for a more detailed
32 explaination see the Joystick section). Trackballs only return relative
33 motion, this is the change in position on the ball since it was last
34 polled (last cycle of the event loop) and it is stored in xrel and
35 yrel.
36
38 SDL_Event, Joystick Functions, SDL_JoystickEventState, SDL_JoystickGetâ
39 Ball
40
41
42
43SDL Tue 11 Sep 2001, 22:59 SDL_JoyBallEvent(3)