1SDL_JoyHatEvent(3)             SDL API Reference            SDL_JoyHatEvent(3)
2
3
4

NAME

6       SDL_JoyHatEvent- Joystick hat position change event structure
7

STRUCTURE DEFINITION

9       typedef struct{
10         Uint8 type;
11         Uint8 which;
12         Uint8 hat;
13         Uint8 value;
14       } SDL_JoyHatEvent;
15

STRUCTURE DATA

17       type                SDL_JOY
18
19       which               Joystick device index
20
21       hat                 Joystick hat index
22
23       value               Hat position
24

DESCRIPTION

26       SDL_JoyHatEvent  is a member of the SDL_Event union and is used when an
27       event of type SDL_JOYHATMOTION is reported.
28
29       A SDL_JOYHATMOTION event occurs when ever a user moves  a  hat  on  the
30       joystick.  The  field  which is the index of the joystick that reported
31       the event and hat is the index of the hat (for a more detailed exlaina‐
32       tion  see  the  Joystick section). value is the current position of the
33       hat. It is a logically OR'd combination of the following values  (whose
34       meanings should be pretty obvious:) :
35
36                 SDL_HAT_CENTERED
37
38                 SDL_HAT_UP
39
40                 SDL_HAT_RIGHT
41
42                 SDL_HAT_DOWN
43
44                 SDL_HAT_LEFT
45
46       The following defines are also provided:
47
48                 SDL_HAT_RIGHTUP
49
50                 SDL_HAT_RIGHTDOWN
51
52                 SDL_HAT_LEFTUP
53
54                 SDL_HAT_LEFTDOWN
55

SEE ALSO

57       SDL_Event,  Joystick  Functions,  SDL_JoystickEventState, SDL_Joystick‐
58       GetHat
59
60
61
62SDL                         Tue 11 Sep 2001, 22:59          SDL_JoyHatEvent(3)
Impressum