Changed SDL_GetAbsoluteMouseState() to SDL_GetGlobalMouseState().
authorRyan C. Gordon <icculus@icculus.org>
Wed, 25 Jun 2014 16:16:55 -0400
changeset 8952 4bb098814ec4
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
--- a/include/SDL_mouse.h	Wed Jun 11 00:40:19 2014 -0400
+++ b/include/SDL_mouse.h	Wed Jun 25 16:16:55 2014 -0400
@@ -100,7 +100,7 @@
  *
  *  \sa SDL_GetMouseState
  */
-extern DECLSPEC Uint32 SDLCALL SDL_GetAbsoluteMouseState(int *x, int *y);
+extern DECLSPEC Uint32 SDLCALL SDL_GetGlobalMouseState(int *x, int *y);
 
 /**
  *  \brief Retrieve the relative state of the mouse.
--- a/src/dynapi/SDL_dynapi_overrides.h	Wed Jun 11 00:40:19 2014 -0400
+++ b/src/dynapi/SDL_dynapi_overrides.h	Wed Jun 25 16:16:55 2014 -0400
@@ -581,4 +581,4 @@
 #define SDL_WinRTRunApp SDL_WinRTRunApp_REAL
 #define SDL_CaptureMouse SDL_CaptureMouse_REAL
 #define SDL_SetWindowHitTest SDL_SetWindowHitTest_REAL
-#define SDL_GetAbsoluteMouseState SDL_GetAbsoluteMouseState_REAL
+#define SDL_GetGlobalMouseState SDL_GetGlobalMouseState_REAL
--- a/src/dynapi/SDL_dynapi_procs.h	Wed Jun 11 00:40:19 2014 -0400
+++ b/src/dynapi/SDL_dynapi_procs.h	Wed Jun 25 16:16:55 2014 -0400
@@ -614,4 +614,4 @@
 #endif
 SDL_DYNAPI_PROC(int,SDL_CaptureMouse,(SDL_bool a),(a),return)
 SDL_DYNAPI_PROC(int,SDL_SetWindowHitTest,(SDL_Window *a, SDL_HitTest b, void *c),(a,b,c),return)
-SDL_DYNAPI_PROC(Uint32,SDL_GetAbsoluteMouseState,(int *a, int *b),(a,b),return)
+SDL_DYNAPI_PROC(Uint32,SDL_GetGlobalMouseState,(int *a, int *b),(a,b),return)
--- a/src/events/SDL_mouse.c	Wed Jun 11 00:40:19 2014 -0400
+++ b/src/events/SDL_mouse.c	Wed Jun 25 16:16:55 2014 -0400
@@ -470,7 +470,7 @@
 }
 
 Uint32
-SDL_GetAbsoluteMouseState(int *x, int *y)
+SDL_GetGlobalMouseState(int *x, int *y)
 {
     SDL_Mouse *mouse = SDL_GetMouse();
     int tmpx, tmpy;
@@ -485,12 +485,12 @@
 
     *x = *y = 0;
 
-    if (!mouse->GetAbsoluteMouseState) {
+    if (!mouse->GetGlobalMouseState) {
         SDL_assert(0 && "This should really be implemented for every target.");
         return 0;
     }
 
-    return mouse->GetAbsoluteMouseState(x, y);
+    return mouse->GetGlobalMouseState(x, y);
 }
 
 void
--- a/src/events/SDL_mouse_c.h	Wed Jun 11 00:40:19 2014 -0400
+++ b/src/events/SDL_mouse_c.h	Wed Jun 25 16:16:55 2014 -0400
@@ -67,7 +67,7 @@
     int (*CaptureMouse) (SDL_Window * window);
 
     /* Get absolute mouse coordinates. (x) and (y) are never NULL and set to zero before call. */
-    Uint32 (*GetAbsoluteMouseState) (int *x, int *y);
+    Uint32 (*GetGlobalMouseState) (int *x, int *y);
 
     /* Data common to all mice */
     SDL_MouseID mouseID;
--- a/src/test/SDL_test_common.c	Wed Jun 11 00:40:19 2014 -0400
+++ b/src/test/SDL_test_common.c	Wed Jun 25 16:16:55 2014 -0400
@@ -1492,7 +1492,7 @@
             if (withControl) {
                 /* Ctrl-A reports absolute mouse position. */
                 int x, y;
-                const Uint32 mask = SDL_GetAbsoluteMouseState(&x, &y);
+                const Uint32 mask = SDL_GetGlobalMouseState(&x, &y);
                 SDL_Log("ABSOLUTE MOUSE: (%d, %d)%s%s%s%s%s\n", x, y,
                         (mask & SDL_BUTTON_LMASK) ? " [LBUTTON]" : "",
                         (mask & SDL_BUTTON_MMASK) ? " [MBUTTON]" : "",
--- a/src/video/cocoa/SDL_cocoamouse.m	Wed Jun 11 00:40:19 2014 -0400
+++ b/src/video/cocoa/SDL_cocoamouse.m	Wed Jun 25 16:16:55 2014 -0400
@@ -283,7 +283,7 @@
 }
 
 static Uint32
-Cocoa_GetAbsoluteMouseState(int *x, int *y)
+Cocoa_GetGlobalMouseState(int *x, int *y)
 {
     const NSUInteger cocoaButtons = [NSEvent pressedMouseButtons];
     const NSPoint cocoaLocation = [NSEvent mouseLocation];
@@ -321,7 +321,7 @@
     mouse->WarpMouse = Cocoa_WarpMouse;
     mouse->SetRelativeMouseMode = Cocoa_SetRelativeMouseMode;
     mouse->CaptureMouse = Cocoa_CaptureMouse;
-    mouse->GetAbsoluteMouseState = Cocoa_GetAbsoluteMouseState;
+    mouse->GetGlobalMouseState = Cocoa_GetGlobalMouseState;
 
     SDL_SetDefaultCursor(Cocoa_CreateDefaultCursor());
 
--- a/src/video/windows/SDL_windowsmouse.c	Wed Jun 11 00:40:19 2014 -0400
+++ b/src/video/windows/SDL_windowsmouse.c	Wed Jun 25 16:16:55 2014 -0400
@@ -261,7 +261,7 @@
 }
 
 static Uint32
-WIN_GetAbsoluteMouseState(int *x, int *y)
+WIN_GetGlobalMouseState(int *x, int *y)
 {
     Uint32 retval = 0;
     POINT pt = { 0, 0 };
@@ -290,7 +290,7 @@
     mouse->WarpMouse = WIN_WarpMouse;
     mouse->SetRelativeMouseMode = WIN_SetRelativeMouseMode;
     mouse->CaptureMouse = WIN_CaptureMouse;
-    mouse->GetAbsoluteMouseState = WIN_GetAbsoluteMouseState;
+    mouse->GetGlobalMouseState = WIN_GetGlobalMouseState;
 
     SDL_SetDefaultCursor(WIN_CreateDefaultCursor());
 
--- a/src/video/x11/SDL_x11mouse.c	Wed Jun 11 00:40:19 2014 -0400
+++ b/src/video/x11/SDL_x11mouse.c	Wed Jun 25 16:16:55 2014 -0400
@@ -354,7 +354,7 @@
 }
 
 static Uint32
-X11_GetAbsoluteMouseState(int *x, int *y)
+X11_GetGlobalMouseState(int *x, int *y)
 {
     Display *display = GetDisplay();
     const int num_screens = SDL_GetNumVideoDisplays();
@@ -398,7 +398,7 @@
     mouse->WarpMouse = X11_WarpMouse;
     mouse->SetRelativeMouseMode = X11_SetRelativeMouseMode;
     mouse->CaptureMouse = X11_CaptureMouse;
-    mouse->GetAbsoluteMouseState = X11_GetAbsoluteMouseState;
+    mouse->GetGlobalMouseState = X11_GetGlobalMouseState;
 
     SDL_SetDefaultCursor(X11_CreateDefaultCursor());
 }