Browse Source

putil: Deprecated MouseData alias for PointerData

Co-authored-by: rdb <[email protected]>

Closes #1513
Max Rodriguez 2 years ago
parent
commit
b6c427f2b4

+ 2 - 2
panda/src/cocoadisplay/cocoaGraphicsWindow.mm

@@ -127,7 +127,7 @@ CocoaGraphicsWindow::
 bool CocoaGraphicsWindow::
 move_pointer(int device, int x, int y) {
   // Hack!  Will go away when we have floating-point mouse pos.
-  MouseData md = get_pointer(device);
+  PointerData md = get_pointer(device);
   if (md.get_x() == x && md.get_y() == y) {
     return true;
   }
@@ -1713,7 +1713,7 @@ handle_mouse_moved_event(bool in_window, double x, double y, bool absolute) {
 
   } else {
     // We received deltas, so add it to the current mouse position.
-    MouseData md = _input->get_pointer();
+    PointerData md = _input->get_pointer();
     nx = md.get_x() + x;
     ny = md.get_y() + y;
   }

+ 4 - 4
panda/src/display/graphicsWindow.cxx

@@ -355,16 +355,16 @@ disable_pointer_mode(int device) {
 }*/
 
 /**
- * Returns the MouseData associated with the nth input device's pointer.
+ * Returns the PointerData associated with the nth input device's pointer.
  * Using this to access raw mice (with an index other than 0) is deprecated,
  * see the InputDeviceManager interface instead.
  */
-MouseData GraphicsWindow::
+PointerData GraphicsWindow::
 get_pointer(int device) const {
-  MouseData result;
+  PointerData result;
   {
     LightMutexHolder holder(_input_lock);
-    nassertr(device >= 0 && device < (int)_input_devices.size(), MouseData());
+    nassertr(device >= 0 && device < (int)_input_devices.size(), PointerData());
     result = ((const GraphicsWindowInputDevice *)_input_devices[device].p())->get_pointer();
   }
   return result;

+ 2 - 2
panda/src/display/graphicsWindow.h

@@ -21,7 +21,7 @@
 #include "graphicsWindowProc.h"
 #include "graphicsWindowProcCallbackData.h"
 #include "windowProperties.h"
-#include "mouseData.h"
+#include "pointerData.h"
 #include "modifierButtons.h"
 #include "buttonEvent.h"
 #include "keyboardButton.h"
@@ -97,7 +97,7 @@ PUBLISHED:
   /*void enable_pointer_mode(int device, double speed);
   void disable_pointer_mode(int device);*/
 
-  virtual MouseData get_pointer(int device) const;
+  virtual PointerData get_pointer(int device) const;
   virtual bool move_pointer(int device, int x, int y);
   virtual void close_ime();
 

+ 1 - 1
panda/src/display/mouseAndKeyboard.cxx

@@ -12,7 +12,7 @@
  */
 
 #include "mouseAndKeyboard.h"
-#include "mouseData.h"
+#include "pointerData.h"
 #include "buttonHandle.h"
 #include "buttonEvent.h"
 #include "dataNodeTransmit.h"

+ 1 - 1
panda/src/putil/CMakeLists.txt

@@ -48,7 +48,7 @@ set(P3PUTIL_HEADERS
   load_prc_file.h
   loaderOptions.I loaderOptions.h
   modifierButtons.I modifierButtons.h
-  mouseButton.h mouseData.h
+  mouseButton.h
   nameUniquifier.I nameUniquifier.h
   nodeCachedReferenceCount.h nodeCachedReferenceCount.I
   paramValue.I paramValue.h

+ 0 - 27
panda/src/putil/mouseData.h

@@ -1,27 +0,0 @@
-/**
- * PANDA 3D SOFTWARE
- * Copyright (c) Carnegie Mellon University.  All rights reserved.
- *
- * All use of this software is subject to the terms of the revised BSD
- * license.  You should have received a copy of this license along
- * with this source code in a file named "LICENSE."
- *
- * @file mouseData.h
- * @author rdb
- * @date 2018-09-24
- */
-
-#ifndef MOUSEDATA_H
-#define MOUSEDATA_H
-
-#include "pointerData.h"
-
-BEGIN_PUBLISH
-/**
- * Deprecated alias for PointerData.
- */
-typedef PointerData MouseData;
-
-END_PUBLISH
-
-#endif

+ 1 - 1
panda/src/tform/driveInterface.cxx

@@ -16,7 +16,7 @@
 
 #include "compose_matrix.h"
 #include "mouseAndKeyboard.h"
-#include "mouseData.h"
+#include "pointerData.h"
 #include "clockObject.h"
 #include "modifierButtons.h"
 #include "keyboardButton.h"

+ 1 - 1
panda/src/tform/mouseInterfaceNode.cxx

@@ -15,7 +15,7 @@
 #include "buttonEvent.h"
 #include "buttonEventList.h"
 #include "dataNodeTransmit.h"
-#include "mouseData.h"
+#include "pointerData.h"
 
 TypeHandle MouseInterfaceNode::_type_handle;
 

+ 1 - 1
panda/src/tform/mouseWatcher.cxx

@@ -16,7 +16,7 @@
 #include "dataGraphTraverser.h"
 #include "mouseWatcherParameter.h"
 #include "mouseAndKeyboard.h"
-#include "mouseData.h"
+#include "pointerData.h"
 #include "buttonEventList.h"
 #include "mouseButton.h"
 #include "throw_event.h"

+ 1 - 1
panda/src/tform/trackball.cxx

@@ -16,7 +16,7 @@
 #include "buttonEventList.h"
 #include "dataNodeTransmit.h"
 #include "compose_matrix.h"
-#include "mouseData.h"
+#include "pointerData.h"
 #include "modifierButtons.h"
 #include "linmath_events.h"
 #include "mouseButton.h"

+ 4 - 4
panda/src/windisplay/winGraphicsWindow.cxx

@@ -125,14 +125,14 @@ WinGraphicsWindow::
 }
 
 /**
- * Returns the MouseData associated with the nth input device's pointer.
+ * Returns the PointerData associated with the nth input device's pointer.
  */
-MouseData WinGraphicsWindow::
+PointerData WinGraphicsWindow::
 get_pointer(int device) const {
-  MouseData result;
+  PointerData result;
   {
     LightMutexHolder holder(_input_lock);
-    nassertr(device >= 0 && device < (int)_input_devices.size(), MouseData());
+    nassertr(device >= 0 && device < (int)_input_devices.size(), PointerData());
 
     result = ((const GraphicsWindowInputDevice *)_input_devices[device].p())->get_pointer();
 

+ 1 - 1
panda/src/windisplay/winGraphicsWindow.h

@@ -72,7 +72,7 @@ public:
                     GraphicsOutput *host);
   virtual ~WinGraphicsWindow();
 
-  virtual MouseData get_pointer(int device) const;
+  virtual PointerData get_pointer(int device) const;
   virtual bool move_pointer(int device, int x, int y);
 
   virtual void close_ime();

+ 4 - 4
panda/src/x11display/x11GraphicsWindow.cxx

@@ -136,16 +136,16 @@ x11GraphicsWindow::
 }
 
 /**
- * Returns the MouseData associated with the nth input device's pointer.  This
+ * Returns the PointerData associated with the nth input device's pointer.  This
  * is deprecated; use get_pointer_device().get_pointer() instead, or for raw
  * mice, use the InputDeviceManager interface.
  */
-MouseData x11GraphicsWindow::
+PointerData x11GraphicsWindow::
 get_pointer(int device) const {
-  MouseData result;
+  PointerData result;
   {
     LightMutexHolder holder(_input_lock);
-    nassertr(device >= 0 && device < (int)_input_devices.size(), MouseData());
+    nassertr(device >= 0 && device < (int)_input_devices.size(), PointerData());
 
     result = ((const GraphicsWindowInputDevice *)_input_devices[device].p())->get_pointer();
 

+ 1 - 1
panda/src/x11display/x11GraphicsWindow.h

@@ -34,7 +34,7 @@ public:
                     GraphicsOutput *host);
   virtual ~x11GraphicsWindow();
 
-  virtual MouseData get_pointer(int device) const;
+  virtual PointerData get_pointer(int device) const;
   virtual bool move_pointer(int device, int x, int y);
 
   virtual void clear(Thread *current_thread);