![]() |
Qt 6.x
The Qt SDK
|
Windows mouse handler. More...
#include <qwindowsmousehandler.h>
Public Types | |
using | QPointingDevicePtr = QSharedPointer< QPointingDevice > |
Public Member Functions | |
QWindowsMouseHandler () | |
const QPointingDevicePtr & | touchDevice () const |
void | setTouchDevice (const QPointingDevicePtr &d) |
bool | translateMouseEvent (QWindow *widget, HWND hwnd, QtWindows::WindowsEventType t, MSG msg, LRESULT *result) |
bool | translateTouchEvent (QWindow *widget, HWND hwnd, QtWindows::WindowsEventType t, MSG msg, LRESULT *result) |
bool | translateGestureEvent (QWindow *window, HWND hwnd, QtWindows::WindowsEventType, MSG msg, LRESULT *) |
bool | translateScrollEvent (QWindow *window, HWND hwnd, MSG msg, LRESULT *result) |
QWindow * | windowUnderMouse () const |
void | clearWindowUnderMouse () |
void | clearEvents () |
Static Public Member Functions | |
static Qt::MouseButtons | keyStateToMouseButtons (WPARAM) |
static Qt::KeyboardModifiers | keyStateToModifiers (int) |
static int | mouseButtonsToKeyState (Qt::MouseButtons) |
static Qt::MouseButtons | queryMouseButtons () |
static const QPointingDevice * | primaryMouse () |
Windows mouse handler.
Dispatches mouse and touch events. Separate for code cleanliness.
Definition at line 20 of file qwindowsmousehandler.h.
Definition at line 24 of file qwindowsmousehandler.h.
|
default |
void QWindowsMouseHandler::clearEvents | ( | ) |
Definition at line 104 of file qwindowsmousehandler.cpp.
References Qt::NoButton, and QEvent::None.
|
inline |
Definition at line 49 of file qwindowsmousehandler.h.
Referenced by QWindowsContext::clearWindowUnderMouse().
|
inlinestatic |
Definition at line 85 of file qwindowsmousehandler.h.
References Qt::AltModifier, Qt::ControlModifier, Qt::NoModifier, and Qt::ShiftModifier.
|
inlinestatic |
Definition at line 69 of file qwindowsmousehandler.h.
References Qt::LeftButton, Qt::MiddleButton, Qt::NoButton, Qt::RightButton, Qt::XButton1, and Qt::XButton2.
Referenced by translateMouseEvent().
|
inlinestatic |
Definition at line 97 of file qwindowsmousehandler.h.
References Qt::LeftButton, Qt::MiddleButton, Qt::RightButton, Qt::XButton1, and Qt::XButton2.
|
static |
Definition at line 96 of file qwindowsmousehandler.cpp.
References QPointingDevice::primaryPointingDevice().
Referenced by translateMouseEvent(), and QWindowsPointerHandler::translateMouseEvent().
|
static |
Definition at line 110 of file qwindowsmousehandler.cpp.
References Qt::LeftButton, Qt::MiddleButton, Qt::RightButton, Qt::XButton1, and Qt::XButton2.
Referenced by QWindowsOleDropTarget::DragLeave(), QWindowsOleDropSource::QueryContinueDrag(), and translateMouseEvent().
|
inline |
Definition at line 29 of file qwindowsmousehandler.h.
References d.
Referenced by QWindowsContext::initTouch().
|
inline |
Definition at line 28 of file qwindowsmousehandler.h.
Referenced by QWindowsContextPrivate::QWindowsContextPrivate(), and QWindowsContext::initTouch().
bool QWindowsMouseHandler::translateGestureEvent | ( | QWindow * | window, |
HWND | hwnd, | ||
QtWindows::WindowsEventType | , | ||
MSG | msg, | ||
LRESULT * | |||
) |
Definition at line 639 of file qwindowsmousehandler.cpp.
References Q_UNUSED, and window().
Referenced by QWindowsContext::windowsProc().
bool QWindowsMouseHandler::translateMouseEvent | ( | QWindow * | widget, |
HWND | hwnd, | ||
QtWindows::WindowsEventType | t, | ||
MSG | msg, | ||
LRESULT * | result | ||
) |
Definition at line 206 of file qwindowsmousehandler.cpp.
References QWindowsWindow::AutoMouseCapture, compressMouseMove(), QRect::contains(), QSharedPointer< T >::data(), device, QWindowsIntegration::DontPassOsMouseEventsSynthesizedFromTouch, eventFromMsg(), QWindow::flags, QWindowSystemInterface::flushWindowSystemEvents(), QGuiApplication::focusWindow(), QWindowSystemInterface::handleEnterEvent(), QWindowSystemInterface::handleLeaveEvent(), QWindowSystemInterface::handleMouseEvent(), QWindowsIntegration::instance(), QPointer< T >::isNull(), QSharedPointer< T >::isNull(), QWindowsBaseWindow::isRtlLayout(), keyStateToMouseButtons(), lastMouseMovePos, Qt::LeftButton, QWindowsGeometryHint::mapFromGlobal(), QWindowsGeometryHint::mapToGlobal(), QEvent::MouseButtonDblClick, QEvent::MouseButtonPress, QEvent::MouseButtonRelease, Qt::MouseEventNotSynthesized, Qt::MouseEventSynthesizedBySystem, QEvent::MouseMove, QtWindows::MouseWheelEvent, QEvent::NonClientAreaMouseButtonDblClick, QEvent::NonClientAreaMouseButtonPress, QEvent::NonClientAreaMouseButtonRelease, QEvent::NonClientAreaMouseMove, QtWindows::NonClientEventFlag, QEvent::None, QWindowsIntegration::options(), primaryMouse(), qCDebug, QWindowsKeyMapper::queryKeyboardModifiers(), queryMouseButtons(), qWarning, QPoint::setX(), Event::type, window(), QWindowsScreen::windowAt(), QWindowsWindow::windowsWindowOf(), Qt::WindowTransparentForInput, and QPoint::x().
Referenced by QWindowsContext::windowsProc().
bool QWindowsMouseHandler::translateScrollEvent | ( | QWindow * | window, |
HWND | hwnd, | ||
MSG | msg, | ||
LRESULT * | result | ||
) |
Definition at line 526 of file qwindowsmousehandler.cpp.
References Qt::Horizontal, Qt::NoModifier, QCursor::pos(), redirectWheelEvent(), and window().
Referenced by QWindowsContext::windowsProc().
bool QWindowsMouseHandler::translateTouchEvent | ( | QWindow * | widget, |
HWND | hwnd, | ||
QtWindows::WindowsEventType | t, | ||
MSG | msg, | ||
LRESULT * | result | ||
) |
Definition at line 558 of file qwindowsmousehandler.cpp.
References QHash< Key, T >::clear(), QHash< Key, T >::contains(), QSharedPointer< T >::data(), QScreen::geometry, QWindowSystemInterface::handleTouchEvent(), QRect::height(), i, QHash< Key, T >::insert(), QWindowsContext::instance(), QEventPoint::Pressed, QGuiApplication::primaryScreen, QWindowsKeyMapper::queryKeyboardModifiers(), qWarning, QEventPoint::Released, QHash< Key, T >::remove(), screen, QHash< Key, T >::size(), QEventPoint::Stationary, QEventPoint::Updated, QHash< Key, T >::value(), QRect::width(), window(), QPointF::x(), and QPointF::y().
Referenced by QWindowsContext::windowsProc().
|
inline |
Definition at line 48 of file qwindowsmousehandler.h.
References QPointer< T >::data().
Referenced by QWindowsContext::windowUnderMouse().