>SDL_MouseMotionEvent<
/TITLE
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.64
REL="HOME"
TITLE="SDL Library Documentation"
REL="UP"
TITLE="SDL Event Structures."
HREF="eventstructures.html"><
LINK
REL="PREVIOUS"
TITLE="SDL_KeyboardEvent"
HREF="sdlkeyboardevent.html"><
LINK
REL="NEXT"
TITLE="SDL_MouseButtonEvent"
HREF="sdlmousebuttonevent.html"><
/HEAD
CLASS="REFENTRY"
BGCOLOR="#FFF8DC"
TEXT="#000000"
LINK="#0000ee"
VLINK="#551a8b"
ALINK="#ff0000"
CLASS="NAVHEADER"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
COLSPAN="3"
ALIGN="center"
>SDL Library Documentation<
/TH
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
HREF="sdlkeyboardevent.html"
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
HREF="sdlmousebuttonevent.html"
ALIGN="LEFT"
NAME="SDLMOUSEMOTIONEVENT"
CLASS="REFNAMEDIV"
NAME="AEN3646"
>SDL_MouseMotionEvent -- Mouse motion event structure<
/DIV
CLASS="REFSECT1"
NAME="AEN3649"
>Structure Definition<
/H2
CLASS="PROGRAMLISTING"
>typedef struct{
Uint8 type;
Uint8 state;
Uint16 x, y;
Sint16 xrel, yrel;
} SDL_MouseMotionEvent;<
/PRE
CLASS="REFSECT1"
NAME="AEN3652"
CLASS="INFORMALTABLE"
NAME="AEN3654"
BORDER="0"
CLASS="CALSTABLE"
ALIGN="LEFT"
VALIGN="TOP"
CLASS="STRUCTFIELD"
ALIGN="LEFT"
VALIGN="TOP"
CLASS="LITERAL"
ALIGN="LEFT"
VALIGN="TOP"
CLASS="STRUCTFIELD"
ALIGN="LEFT"
VALIGN="TOP"
>The current button state<
/TD
ALIGN="LEFT"
VALIGN="TOP"
CLASS="STRUCTFIELD"
CLASS="STRUCTFIELD"
ALIGN="LEFT"
VALIGN="TOP"
>The X
/Y coordinates of the mouse<
/TD
ALIGN="LEFT"
VALIGN="TOP"
CLASS="STRUCTFIELD"
CLASS="STRUCTFIELD"
ALIGN="LEFT"
VALIGN="TOP"
>Relative motion in the X
/Y direction<
/TD
CLASS="REFSECT1"
NAME="AEN3676"
CLASS="STRUCTNAME"
>SDL_MouseMotionEvent<
/SPAN
HREF="sdlevent.html"
CLASS="STRUCTNAME"
> union and is used when an event of
type <
TT
CLASS="LITERAL"
CLASS="LITERAL"
>
type event occurs when a user moves the mouse within the application window or when <
A
HREF="sdlwarpmouse.html"
CLASS="FUNCTION"
> is called. Both the absolute
(<
TT
CLASS="STRUCTFIELD"
CLASS="STRUCTFIELD"
CLASS="STRUCTFIELD"
CLASS="STRUCTFIELD"
>
) coordinates are reported along with the current button states
(<
TT
CLASS="STRUCTFIELD"
>
). The button state can be interpreted using the <
TT
CLASS="LITERAL"
HREF="sdlgetmousestate.html"
CLASS="FUNCTION"
>If the cursor is hidden
(<
A
HREF="sdlshowcursor.html"
CLASS="FUNCTION"
>
) and the input is grabbed
(<
A
HREF="sdlwmgrabinput.html"
CLASS="FUNCTION"
>
), then the mouse will give relative motion events even when the cursor reaches the edge fo the screen. This is currently only implemented on Windows and Linux
/Unix-a-likes.<
/P
CLASS="REFSECT1"
NAME="AEN3700"
HREF="sdlevent.html"
CLASS="STRUCTNAME"
>,
HREF="sdlmousebuttonevent.html"
CLASS="STRUCTNAME"
>SDL_MouseButtonEvent<
/SPAN
CLASS="NAVFOOTER"
ALIGN="LEFT"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
WIDTH="33%"
ALIGN="left"
VALIGN="top"
HREF="sdlkeyboardevent.html"
WIDTH="34%"
ALIGN="center"
VALIGN="top"
HREF="index.html"
WIDTH="33%"
ALIGN="right"
VALIGN="top"
HREF="sdlmousebuttonevent.html"
WIDTH="33%"
ALIGN="left"
VALIGN="top"
WIDTH="34%"
ALIGN="center"
VALIGN="top"
HREF="eventstructures.html"
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>SDL_MouseButtonEvent<
/TD
>