![]() |
Qt 6.x
The Qt SDK
|
#include "qwindowstabletsupport.h"
#include "qwindowscontext.h"
#include "qwindowskeymapper.h"
#include "qwindowswindow.h"
#include "qwindowsscreen.h"
#include <qpa/qwindowsysteminterface.h>
#include <QtGui/qevent.h>
#include <QtGui/qscreen.h>
#include <QtGui/qguiapplication.h>
#include <QtGui/qwindow.h>
#include <QtCore/qdebug.h>
#include <QtCore/qvarlengtharray.h>
#include <QtCore/qmath.h>
#include <private/qguiapplication_p.h>
#include <QtCore/private/qsystemlibrary_p.h>
#include <pktdef.h>
Go to the source code of this file.
Macros | |
#define | PACKETDATA (PK_X | PK_Y | PK_BUTTONS | PK_NORMAL_PRESSURE | PK_TANGENT_PRESSURE | PK_ORIENTATION | PK_CURSOR | PK_Z | PK_TIME) |
Enumerations | |
enum | { PacketMode = 0 , TabletPacketQSize = 128 , DeviceIdMask = 0xFF6 , CursorTypeBitMask = 0x0F06 } |
Functions | |
LRESULT QT_WIN_CALLBACK | qWindowsTabletSupportWndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) |
static int | sign (int x) |
template<class Stream > | |
static void | formatOptions (Stream &str, unsigned options) |
QDebug | operator<< (QDebug d, const QWindowsTabletDeviceData &t) |
QDebug | operator<< (QDebug d, const LOGCONTEXT &lc) |
QWinTabPointingDevice * | createInputDevice (const QSharedPointer< QWindowsTabletDeviceData > &d, QInputDevice::DeviceType devType, QPointingDevice::PointerType pointerType) |
static QInputDevice::DeviceType | deviceType (const UINT cursorType) |
static QPointingDevice::PointerType | pointerType (unsigned currentCursor) |
Qt::MouseButton | buttonValueToEnum (DWORD button, const QWindowsTabletDeviceData &tdd) |
Qt::MouseButtons | convertTabletButtons (DWORD btnNew, const QWindowsTabletDeviceData &tdd) |
#define PACKETDATA (PK_X | PK_Y | PK_BUTTONS | PK_NORMAL_PRESSURE | PK_TANGENT_PRESSURE | PK_ORIENTATION | PK_CURSOR | PK_Z | PK_TIME) |
Definition at line 25 of file qwindowstabletsupport.cpp.
anonymous enum |
Enumerator | |
---|---|
PacketMode | |
TabletPacketQSize | |
DeviceIdMask | |
CursorTypeBitMask |
Definition at line 30 of file qwindowstabletsupport.cpp.
Qt::MouseButton buttonValueToEnum | ( | DWORD | button, |
const QWindowsTabletDeviceData & | tdd | ||
) |
Definition at line 522 of file qwindowstabletsupport.cpp.
References button, QWindowsTabletDeviceData::buttonsMap, Qt::LeftButton, Qt::MiddleButton, Qt::NoButton, Qt::RightButton, and QHash< Key, T >::value().
Referenced by convertTabletButtons().
Qt::MouseButtons convertTabletButtons | ( | DWORD | btnNew, |
const QWindowsTabletDeviceData & | tdd | ||
) |
If a button that is present in hardware input is mapped to a Qt::NoButton, it means that it is going to be eaten by the driver, for example by its "Pan/Scroll" feature. Therefore we shouldn't handle any of the events associated to it. We'll just return Qt::NoButtons here.
Definition at line 542 of file qwindowstabletsupport.cpp.
References btn, buttonValueToEnum(), i, and Qt::NoButton.
Referenced by QWindowsTabletSupport::translateTabletPacketEvent().
QWinTabPointingDevice * createInputDevice | ( | const QSharedPointer< QWindowsTabletDeviceData > & | d, |
QInputDevice::DeviceType | devType, | ||
QPointingDevice::PointerType | pointerType | ||
) |
Definition at line 132 of file qwindowstabletsupport.cpp.
References d, QPointingDeviceUniqueId::fromNumericId(), QInputDevice::Hover, QInputDevice::MouseEmulation, pointerType(), QInputDevice::Position, QInputDevice::Pressure, QStringLiteral, QWindowSystemInterface::registerInputDevice(), QInputDevice::Rotation, QInputDevice::TangentialPressure, QInputDevice::XTilt, QInputDevice::YTilt, and QInputDevice::ZPosition.
Referenced by QWindowsTabletSupport::translateTabletProximityEvent().
|
inlinestatic |
Definition at line 328 of file qwindowstabletsupport.cpp.
References QInputDevice::Airbrush, CursorTypeBitMask, QInputDevice::Mouse, QInputDevice::Puck, QInputDevice::Stylus, and QInputDevice::Unknown.
Referenced by QFFmpeg::deviceTypes(), QFFmpeg::findAVDecoder(), QFFmpeg::findAVEncoder(), QWindowSystemInterface::handleTabletEnterProximityEvent(), QWindowSystemInterface::handleTabletEnterProximityEvent(), QWindowSystemInterface::handleTabletLeaveProximityEvent(), QWindowSystemInterface::handleTabletLeaveProximityEvent(), QFFmpeg::pixelFormatForHwDevice(), and QWindowsTabletSupport::translateTabletProximityEvent().
|
static |
Definition at line 79 of file qwindowstabletsupport.cpp.
References str.
Referenced by QWindowsTabletSupport::description(), and operator<<().
Definition at line 107 of file qwindowstabletsupport.cpp.
References d, Qt::dec(), formatOptions(), QString::fromWCharArray(), and Qt::hex().
QDebug operator<< | ( | QDebug | d, |
const QWindowsTabletDeviceData & | t | ||
) |
Definition at line 96 of file qwindowstabletsupport.cpp.
References d.
|
inlinestatic |
Definition at line 351 of file qwindowstabletsupport.cpp.
References QPointingDevice::Cursor, QPointingDevice::Eraser, QPointingDevice::Pen, and QPointingDevice::Unknown.
Referenced by createInputDevice(), QWindowSystemInterface::handleTabletEnterProximityEvent(), QWindowSystemInterface::handleTabletEnterProximityEvent(), QWindowSystemInterface::handleTabletEvent(), QWindowSystemInterface::handleTabletEvent(), QWindowSystemInterface::handleTabletLeaveProximityEvent(), QWindowSystemInterface::handleTabletLeaveProximityEvent(), org.qtproject.qt.android.QtNative::sendTouchEvent(), QtAndroidInput::tabletEvent(), QWindowsTabletSupport::translateTabletPacketEvent(), and QWindowsTabletSupport::translateTabletProximityEvent().
LRESULT QT_WIN_CALLBACK qWindowsTabletSupportWndProc | ( | HWND | hwnd, |
UINT | message, | ||
WPARAM | wParam, | ||
LPARAM | lParam | ||
) |
Definition at line 37 of file qwindowstabletsupport.cpp.
References QWindowsContext::instance().
Referenced by QWindowsTabletSupport::create().
|
inlinestatic |
Definition at line 55 of file qwindowstabletsupport.cpp.
Referenced by BezierEase::_cbrt(), addCircle(), QQuickFrictionAffector::affectParticle(), qfloat16::copySign(), QSSGRenderTextureFormat::decodeToFloat(), QTextLayout::drawCursor(), dtoString(), QQuick3DParticleEmitter::emitParticle(), QSSGRenderTextureFormat::encodeToPixel(), QTextStreamPrivate::getNumber(), QDeclarativeGeoMapItemUtils::greaterCirclePath(), QTimeZonePrivate::isoOffsetFormat(), QV4::GlobalFunctions::method_parseInt(), QV4::RuntimeHelpers::numberToString(), QUtcTimeZonePrivate::offsetFromUtcString(), parseDateString(), QTextStreamPrivate::putString(), QTextStreamPrivate::putString(), qdtoa(), qt_doubleToAscii(), readFloat16(), QWindowsTabletDeviceData::scaleCoordinates(), QSSGRenderNode::signedSquared(), and QSpatialSoundPrivate::updateRoomEffects().