mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-27 07:03:36 -04:00
putil: Deprecated MouseData alias for PointerData
Co-authored-by: rdb <git@rdb.name> Closes #1513
This commit is contained in:
parent
cc861cdaa1
commit
b6c427f2b4
@ -127,7 +127,7 @@ CocoaGraphicsWindow::
|
|||||||
bool CocoaGraphicsWindow::
|
bool CocoaGraphicsWindow::
|
||||||
move_pointer(int device, int x, int y) {
|
move_pointer(int device, int x, int y) {
|
||||||
// Hack! Will go away when we have floating-point mouse pos.
|
// 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) {
|
if (md.get_x() == x && md.get_y() == y) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1713,7 +1713,7 @@ handle_mouse_moved_event(bool in_window, double x, double y, bool absolute) {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
// We received deltas, so add it to the current mouse position.
|
// 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;
|
nx = md.get_x() + x;
|
||||||
ny = md.get_y() + y;
|
ny = md.get_y() + y;
|
||||||
}
|
}
|
||||||
|
@ -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,
|
* Using this to access raw mice (with an index other than 0) is deprecated,
|
||||||
* see the InputDeviceManager interface instead.
|
* see the InputDeviceManager interface instead.
|
||||||
*/
|
*/
|
||||||
MouseData GraphicsWindow::
|
PointerData GraphicsWindow::
|
||||||
get_pointer(int device) const {
|
get_pointer(int device) const {
|
||||||
MouseData result;
|
PointerData result;
|
||||||
{
|
{
|
||||||
LightMutexHolder holder(_input_lock);
|
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();
|
result = ((const GraphicsWindowInputDevice *)_input_devices[device].p())->get_pointer();
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "graphicsWindowProc.h"
|
#include "graphicsWindowProc.h"
|
||||||
#include "graphicsWindowProcCallbackData.h"
|
#include "graphicsWindowProcCallbackData.h"
|
||||||
#include "windowProperties.h"
|
#include "windowProperties.h"
|
||||||
#include "mouseData.h"
|
#include "pointerData.h"
|
||||||
#include "modifierButtons.h"
|
#include "modifierButtons.h"
|
||||||
#include "buttonEvent.h"
|
#include "buttonEvent.h"
|
||||||
#include "keyboardButton.h"
|
#include "keyboardButton.h"
|
||||||
@ -97,7 +97,7 @@ PUBLISHED:
|
|||||||
/*void enable_pointer_mode(int device, double speed);
|
/*void enable_pointer_mode(int device, double speed);
|
||||||
void disable_pointer_mode(int device);*/
|
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 bool move_pointer(int device, int x, int y);
|
||||||
virtual void close_ime();
|
virtual void close_ime();
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mouseAndKeyboard.h"
|
#include "mouseAndKeyboard.h"
|
||||||
#include "mouseData.h"
|
#include "pointerData.h"
|
||||||
#include "buttonHandle.h"
|
#include "buttonHandle.h"
|
||||||
#include "buttonEvent.h"
|
#include "buttonEvent.h"
|
||||||
#include "dataNodeTransmit.h"
|
#include "dataNodeTransmit.h"
|
||||||
|
@ -48,7 +48,7 @@ set(P3PUTIL_HEADERS
|
|||||||
load_prc_file.h
|
load_prc_file.h
|
||||||
loaderOptions.I loaderOptions.h
|
loaderOptions.I loaderOptions.h
|
||||||
modifierButtons.I modifierButtons.h
|
modifierButtons.I modifierButtons.h
|
||||||
mouseButton.h mouseData.h
|
mouseButton.h
|
||||||
nameUniquifier.I nameUniquifier.h
|
nameUniquifier.I nameUniquifier.h
|
||||||
nodeCachedReferenceCount.h nodeCachedReferenceCount.I
|
nodeCachedReferenceCount.h nodeCachedReferenceCount.I
|
||||||
paramValue.I paramValue.h
|
paramValue.I paramValue.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
|
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include "compose_matrix.h"
|
#include "compose_matrix.h"
|
||||||
#include "mouseAndKeyboard.h"
|
#include "mouseAndKeyboard.h"
|
||||||
#include "mouseData.h"
|
#include "pointerData.h"
|
||||||
#include "clockObject.h"
|
#include "clockObject.h"
|
||||||
#include "modifierButtons.h"
|
#include "modifierButtons.h"
|
||||||
#include "keyboardButton.h"
|
#include "keyboardButton.h"
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include "buttonEvent.h"
|
#include "buttonEvent.h"
|
||||||
#include "buttonEventList.h"
|
#include "buttonEventList.h"
|
||||||
#include "dataNodeTransmit.h"
|
#include "dataNodeTransmit.h"
|
||||||
#include "mouseData.h"
|
#include "pointerData.h"
|
||||||
|
|
||||||
TypeHandle MouseInterfaceNode::_type_handle;
|
TypeHandle MouseInterfaceNode::_type_handle;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include "dataGraphTraverser.h"
|
#include "dataGraphTraverser.h"
|
||||||
#include "mouseWatcherParameter.h"
|
#include "mouseWatcherParameter.h"
|
||||||
#include "mouseAndKeyboard.h"
|
#include "mouseAndKeyboard.h"
|
||||||
#include "mouseData.h"
|
#include "pointerData.h"
|
||||||
#include "buttonEventList.h"
|
#include "buttonEventList.h"
|
||||||
#include "mouseButton.h"
|
#include "mouseButton.h"
|
||||||
#include "throw_event.h"
|
#include "throw_event.h"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include "buttonEventList.h"
|
#include "buttonEventList.h"
|
||||||
#include "dataNodeTransmit.h"
|
#include "dataNodeTransmit.h"
|
||||||
#include "compose_matrix.h"
|
#include "compose_matrix.h"
|
||||||
#include "mouseData.h"
|
#include "pointerData.h"
|
||||||
#include "modifierButtons.h"
|
#include "modifierButtons.h"
|
||||||
#include "linmath_events.h"
|
#include "linmath_events.h"
|
||||||
#include "mouseButton.h"
|
#include "mouseButton.h"
|
||||||
|
@ -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 {
|
get_pointer(int device) const {
|
||||||
MouseData result;
|
PointerData result;
|
||||||
{
|
{
|
||||||
LightMutexHolder holder(_input_lock);
|
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();
|
result = ((const GraphicsWindowInputDevice *)_input_devices[device].p())->get_pointer();
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ public:
|
|||||||
GraphicsOutput *host);
|
GraphicsOutput *host);
|
||||||
virtual ~WinGraphicsWindow();
|
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 bool move_pointer(int device, int x, int y);
|
||||||
|
|
||||||
virtual void close_ime();
|
virtual void close_ime();
|
||||||
|
@ -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
|
* is deprecated; use get_pointer_device().get_pointer() instead, or for raw
|
||||||
* mice, use the InputDeviceManager interface.
|
* mice, use the InputDeviceManager interface.
|
||||||
*/
|
*/
|
||||||
MouseData x11GraphicsWindow::
|
PointerData x11GraphicsWindow::
|
||||||
get_pointer(int device) const {
|
get_pointer(int device) const {
|
||||||
MouseData result;
|
PointerData result;
|
||||||
{
|
{
|
||||||
LightMutexHolder holder(_input_lock);
|
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();
|
result = ((const GraphicsWindowInputDevice *)_input_devices[device].p())->get_pointer();
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ public:
|
|||||||
GraphicsOutput *host);
|
GraphicsOutput *host);
|
||||||
virtual ~x11GraphicsWindow();
|
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 bool move_pointer(int device, int x, int y);
|
||||||
|
|
||||||
virtual void clear(Thread *current_thread);
|
virtual void clear(Thread *current_thread);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user