include/SDL_mouse.h
changeset 8945 04248c700ada
parent 8927 be64f5daf64b
child 8952 4bb098814ec4
     1.1 --- a/include/SDL_mouse.h	Thu Jun 05 00:02:42 2014 -0400
     1.2 +++ b/include/SDL_mouse.h	Thu Jun 05 00:03:33 2014 -0400
     1.3 @@ -78,6 +78,31 @@
     1.4  extern DECLSPEC Uint32 SDLCALL SDL_GetMouseState(int *x, int *y);
     1.5  
     1.6  /**
     1.7 + *  \brief Get the current state of the mouse, in relation to the desktop
     1.8 + *
     1.9 + *  This works just like SDL_GetMouseState(), but the coordinates will be
    1.10 + *  reported relative to the top-left of the desktop. This can be useful if
    1.11 + *  you need to track the mouse outside of a specific window and
    1.12 + *  SDL_CaptureMouse() doesn't fit your needs. For example, it could be
    1.13 + *  useful if you need to track the mouse while dragging a window, where
    1.14 + *  coordinates relative to a window might not be in sync at all times.
    1.15 + *
    1.16 + *  \note SDL_GetMouseState() returns the mouse position as SDL understands
    1.17 + *        it from the last pump of the event queue. This function, however,
    1.18 + *        queries the OS for the current mouse position, and as such, might
    1.19 + *        be a slightly less efficient function. Unless you know what you're
    1.20 + *        doing and have a good reason to use this function, you probably want
    1.21 + *        SDL_GetMouseState() instead.
    1.22 + *
    1.23 + *  \param x Returns the current X coord, relative to the desktop. Can be NULL.
    1.24 + *  \param y Returns the current Y coord, relative to the desktop. Can be NULL.
    1.25 + *  \return The current button state as a bitmask, which can be tested using the SDL_BUTTON(X) macros.
    1.26 + *
    1.27 + *  \sa SDL_GetMouseState
    1.28 + */
    1.29 +extern DECLSPEC Uint32 SDLCALL SDL_GetAbsoluteMouseState(int *x, int *y);
    1.30 +
    1.31 +/**
    1.32   *  \brief Retrieve the relative state of the mouse.
    1.33   *
    1.34   *  The current button state is returned as a button bitmask, which can