Tao.Sdl SDK Documentation

Sdl.SDL_MouseMotionEvent Structure

Mouse motion event structure

For a list of all members of this type, see Sdl.SDL_MouseMotionEvent Members.

System.Object
   System.ValueType
      Tao.Sdl.Sdl.SDL_MouseMotionEvent

[Visual Basic]
Public Structure Sdl.SDL_MouseMotionEvent
[C#]
public struct Sdl.SDL_MouseMotionEvent

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

SDL_MouseMotionEvent is a member of the Sdl.SDL_Event union and is used when an event of type SDL_MOUSEMOTION is reported.

Simply put, a SDL_MOUSEMOTION type event occurs when a user moves the mouse within the application window or when SDL_WarpMouse is called. Both the absolute (x and y) and relative (xrel and yrel ) coordinates are reported along with the current button states (state). The button state can be interpreted using the SDL_BUTTON macro (see SDL_GetMouseState).

If the cursor is hidden (SDL_ShowCursor(0)) and the input is grabbed (SDL_WM_GrabInput(SDL_GRAB_ON)), 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.

Struct in SDL_events.h

            typedef struct{
                    Uint8 type;
                    Uint8 which;
                    Uint8 state;
                    Uint16 x, y;
                    Sint16 xrel, yrel;
                } SDL_MouseMotionEvent;
            

Requirements

Namespace: Tao.Sdl

Assembly: Tao.Sdl (in Tao.Sdl.dll)

See Also

Sdl.SDL_MouseMotionEvent Members | Tao.Sdl Namespace | Sdl.SDL_Event | Sdl.SDL_MouseButtonEvent