Changed SDL_GetAbsoluteMouseState() to SDL_GetGlobalMouseState().
authorRyan C. Gordon <icculus@icculus.org>
Wed, 25 Jun 2014 16:16:55 -0400
changeset 89524bb098814ec4
parent 8951 692ba71b9c04
child 8953 dc80dc0bd22e
Changed SDL_GetAbsoluteMouseState() to SDL_GetGlobalMouseState().

This matches naming conventions in the main repository, between
SDL_GetRelativeMouseState() and SDL_WarpMouseGlobal().
include/SDL_mouse.h
src/dynapi/SDL_dynapi_overrides.h
src/dynapi/SDL_dynapi_procs.h
src/events/SDL_mouse.c
src/events/SDL_mouse_c.h
src/test/SDL_test_common.c
src/video/cocoa/SDL_cocoamouse.m
src/video/windows/SDL_windowsmouse.c
src/video/x11/SDL_x11mouse.c
     1.1 --- a/include/SDL_mouse.h	Wed Jun 11 00:40:19 2014 -0400
     1.2 +++ b/include/SDL_mouse.h	Wed Jun 25 16:16:55 2014 -0400
     1.3 @@ -100,7 +100,7 @@
     1.4   *
     1.5   *  \sa SDL_GetMouseState
     1.6   */
     1.7 -extern DECLSPEC Uint32 SDLCALL SDL_GetAbsoluteMouseState(int *x, int *y);
     1.8 +extern DECLSPEC Uint32 SDLCALL SDL_GetGlobalMouseState(int *x, int *y);
     1.9  
    1.10  /**
    1.11   *  \brief Retrieve the relative state of the mouse.
     2.1 --- a/src/dynapi/SDL_dynapi_overrides.h	Wed Jun 11 00:40:19 2014 -0400
     2.2 +++ b/src/dynapi/SDL_dynapi_overrides.h	Wed Jun 25 16:16:55 2014 -0400
     2.3 @@ -581,4 +581,4 @@
     2.4  #define SDL_WinRTRunApp SDL_WinRTRunApp_REAL
     2.5  #define SDL_CaptureMouse SDL_CaptureMouse_REAL
     2.6  #define SDL_SetWindowHitTest SDL_SetWindowHitTest_REAL
     2.7 -#define SDL_GetAbsoluteMouseState SDL_GetAbsoluteMouseState_REAL
     2.8 +#define SDL_GetGlobalMouseState SDL_GetGlobalMouseState_REAL
     3.1 --- a/src/dynapi/SDL_dynapi_procs.h	Wed Jun 11 00:40:19 2014 -0400
     3.2 +++ b/src/dynapi/SDL_dynapi_procs.h	Wed Jun 25 16:16:55 2014 -0400
     3.3 @@ -614,4 +614,4 @@
     3.4  #endif
     3.5  SDL_DYNAPI_PROC(int,SDL_CaptureMouse,(SDL_bool a),(a),return)
     3.6  SDL_DYNAPI_PROC(int,SDL_SetWindowHitTest,(SDL_Window *a, SDL_HitTest b, void *c),(a,b,c),return)
     3.7 -SDL_DYNAPI_PROC(Uint32,SDL_GetAbsoluteMouseState,(int *a, int *b),(a,b),return)
     3.8 +SDL_DYNAPI_PROC(Uint32,SDL_GetGlobalMouseState,(int *a, int *b),(a,b),return)
     4.1 --- a/src/events/SDL_mouse.c	Wed Jun 11 00:40:19 2014 -0400
     4.2 +++ b/src/events/SDL_mouse.c	Wed Jun 25 16:16:55 2014 -0400
     4.3 @@ -470,7 +470,7 @@
     4.4  }
     4.5  
     4.6  Uint32
     4.7 -SDL_GetAbsoluteMouseState(int *x, int *y)
     4.8 +SDL_GetGlobalMouseState(int *x, int *y)
     4.9  {
    4.10      SDL_Mouse *mouse = SDL_GetMouse();
    4.11      int tmpx, tmpy;
    4.12 @@ -485,12 +485,12 @@
    4.13  
    4.14      *x = *y = 0;
    4.15  
    4.16 -    if (!mouse->GetAbsoluteMouseState) {
    4.17 +    if (!mouse->GetGlobalMouseState) {
    4.18          SDL_assert(0 && "This should really be implemented for every target.");
    4.19          return 0;
    4.20      }
    4.21  
    4.22 -    return mouse->GetAbsoluteMouseState(x, y);
    4.23 +    return mouse->GetGlobalMouseState(x, y);
    4.24  }
    4.25  
    4.26  void
     5.1 --- a/src/events/SDL_mouse_c.h	Wed Jun 11 00:40:19 2014 -0400
     5.2 +++ b/src/events/SDL_mouse_c.h	Wed Jun 25 16:16:55 2014 -0400
     5.3 @@ -67,7 +67,7 @@
     5.4      int (*CaptureMouse) (SDL_Window * window);
     5.5  
     5.6      /* Get absolute mouse coordinates. (x) and (y) are never NULL and set to zero before call. */
     5.7 -    Uint32 (*GetAbsoluteMouseState) (int *x, int *y);
     5.8 +    Uint32 (*GetGlobalMouseState) (int *x, int *y);
     5.9  
    5.10      /* Data common to all mice */
    5.11      SDL_MouseID mouseID;
     6.1 --- a/src/test/SDL_test_common.c	Wed Jun 11 00:40:19 2014 -0400
     6.2 +++ b/src/test/SDL_test_common.c	Wed Jun 25 16:16:55 2014 -0400
     6.3 @@ -1492,7 +1492,7 @@
     6.4              if (withControl) {
     6.5                  /* Ctrl-A reports absolute mouse position. */
     6.6                  int x, y;
     6.7 -                const Uint32 mask = SDL_GetAbsoluteMouseState(&x, &y);
     6.8 +                const Uint32 mask = SDL_GetGlobalMouseState(&x, &y);
     6.9                  SDL_Log("ABSOLUTE MOUSE: (%d, %d)%s%s%s%s%s\n", x, y,
    6.10                          (mask & SDL_BUTTON_LMASK) ? " [LBUTTON]" : "",
    6.11                          (mask & SDL_BUTTON_MMASK) ? " [MBUTTON]" : "",
     7.1 --- a/src/video/cocoa/SDL_cocoamouse.m	Wed Jun 11 00:40:19 2014 -0400
     7.2 +++ b/src/video/cocoa/SDL_cocoamouse.m	Wed Jun 25 16:16:55 2014 -0400
     7.3 @@ -283,7 +283,7 @@
     7.4  }
     7.5  
     7.6  static Uint32
     7.7 -Cocoa_GetAbsoluteMouseState(int *x, int *y)
     7.8 +Cocoa_GetGlobalMouseState(int *x, int *y)
     7.9  {
    7.10      const NSUInteger cocoaButtons = [NSEvent pressedMouseButtons];
    7.11      const NSPoint cocoaLocation = [NSEvent mouseLocation];
    7.12 @@ -321,7 +321,7 @@
    7.13      mouse->WarpMouse = Cocoa_WarpMouse;
    7.14      mouse->SetRelativeMouseMode = Cocoa_SetRelativeMouseMode;
    7.15      mouse->CaptureMouse = Cocoa_CaptureMouse;
    7.16 -    mouse->GetAbsoluteMouseState = Cocoa_GetAbsoluteMouseState;
    7.17 +    mouse->GetGlobalMouseState = Cocoa_GetGlobalMouseState;
    7.18  
    7.19      SDL_SetDefaultCursor(Cocoa_CreateDefaultCursor());
    7.20  
     8.1 --- a/src/video/windows/SDL_windowsmouse.c	Wed Jun 11 00:40:19 2014 -0400
     8.2 +++ b/src/video/windows/SDL_windowsmouse.c	Wed Jun 25 16:16:55 2014 -0400
     8.3 @@ -261,7 +261,7 @@
     8.4  }
     8.5  
     8.6  static Uint32
     8.7 -WIN_GetAbsoluteMouseState(int *x, int *y)
     8.8 +WIN_GetGlobalMouseState(int *x, int *y)
     8.9  {
    8.10      Uint32 retval = 0;
    8.11      POINT pt = { 0, 0 };
    8.12 @@ -290,7 +290,7 @@
    8.13      mouse->WarpMouse = WIN_WarpMouse;
    8.14      mouse->SetRelativeMouseMode = WIN_SetRelativeMouseMode;
    8.15      mouse->CaptureMouse = WIN_CaptureMouse;
    8.16 -    mouse->GetAbsoluteMouseState = WIN_GetAbsoluteMouseState;
    8.17 +    mouse->GetGlobalMouseState = WIN_GetGlobalMouseState;
    8.18  
    8.19      SDL_SetDefaultCursor(WIN_CreateDefaultCursor());
    8.20  
     9.1 --- a/src/video/x11/SDL_x11mouse.c	Wed Jun 11 00:40:19 2014 -0400
     9.2 +++ b/src/video/x11/SDL_x11mouse.c	Wed Jun 25 16:16:55 2014 -0400
     9.3 @@ -354,7 +354,7 @@
     9.4  }
     9.5  
     9.6  static Uint32
     9.7 -X11_GetAbsoluteMouseState(int *x, int *y)
     9.8 +X11_GetGlobalMouseState(int *x, int *y)
     9.9  {
    9.10      Display *display = GetDisplay();
    9.11      const int num_screens = SDL_GetNumVideoDisplays();
    9.12 @@ -398,7 +398,7 @@
    9.13      mouse->WarpMouse = X11_WarpMouse;
    9.14      mouse->SetRelativeMouseMode = X11_SetRelativeMouseMode;
    9.15      mouse->CaptureMouse = X11_CaptureMouse;
    9.16 -    mouse->GetAbsoluteMouseState = X11_GetAbsoluteMouseState;
    9.17 +    mouse->GetGlobalMouseState = X11_GetGlobalMouseState;
    9.18  
    9.19      SDL_SetDefaultCursor(X11_CreateDefaultCursor());
    9.20  }