docs/man3/SDL_JoyHatEvent.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_JoyHatEvent" "3" "Tue 11 Sep 2001, 22:59" "SDL" "SDL API Reference" 
slouken@0
     2
.SH "NAME"
slouken@0
     3
SDL_JoyHatEvent\- Joystick hat position change 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 hat;
slouken@0
    11
  Uint8 value;
slouken@0
    12
} SDL_JoyHatEvent;\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_JOY\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
\fBhat\fR
slouken@0
    24
Joystick hat index
slouken@0
    25
.TP 20
slouken@0
    26
\fBvalue\fR
slouken@0
    27
Hat position
slouken@0
    28
.SH "DESCRIPTION"
slouken@0
    29
.PP
slouken@0
    30
\fBSDL_JoyHatEvent\fR is a member of the \fI\fBSDL_Event\fR\fR union and is used when an event of type \fBSDL_JOYHATMOTION\fP is reported\&.
slouken@0
    31
.PP
slouken@0
    32
A \fBSDL_JOYHATMOTION\fP event occurs when ever a user moves a hat on the joystick\&. The field \fBwhich\fR is the index of the joystick that reported the event and \fBhat\fR is the index of the hat (for a more detailed exlaination see the \fIJoystick section\fR)\&. \fBvalue\fR is the current position of the hat\&. It is a logically OR\&'d combination of the following values (whose meanings should be pretty obvious:) :
slouken@0
    33
.IP "" 10
slouken@0
    34
\fBSDL_HAT_CENTERED\fP
slouken@0
    35
.IP "" 10
slouken@0
    36
\fBSDL_HAT_UP\fP
slouken@0
    37
.IP "" 10
slouken@0
    38
\fBSDL_HAT_RIGHT\fP
slouken@0
    39
.IP "" 10
slouken@0
    40
\fBSDL_HAT_DOWN\fP
slouken@0
    41
.IP "" 10
slouken@0
    42
\fBSDL_HAT_LEFT\fP
slouken@0
    43
.PP
slouken@0
    44
The following defines are also provided:
slouken@0
    45
.IP "" 10
slouken@0
    46
\fBSDL_HAT_RIGHTUP\fP
slouken@0
    47
.IP "" 10
slouken@0
    48
\fBSDL_HAT_RIGHTDOWN\fP
slouken@0
    49
.IP "" 10
slouken@0
    50
\fBSDL_HAT_LEFTUP\fP
slouken@0
    51
.IP "" 10
slouken@0
    52
\fBSDL_HAT_LEFTDOWN\fP
slouken@0
    53
.SH "SEE ALSO"
slouken@0
    54
.PP
slouken@0
    55
\fI\fBSDL_Event\fR\fR, \fIJoystick Functions\fR, \fI\fBSDL_JoystickEventState\fP\fR, \fI\fBSDL_JoystickGetHat\fP\fR
slouken@181
    56
...\" created by instant / docbook-to-man, Tue 11 Sep 2001, 22:59