Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwindowstabletsupport.cpp File Reference

(6793a519667eaef07d6bc04d2799b1746d258c41)

#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>
Include dependency graph for qwindowstabletsupport.cpp:

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 ,
  PacketMode = 0 , TabletPacketQSize = 128 , DeviceIdMask = 0xFF6 , CursorTypeBitMask = 0x0F06
}
enum  {
  PacketMode = 0 , TabletPacketQSize = 128 , DeviceIdMask = 0xFF6 , CursorTypeBitMask = 0x0F06 ,
  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)
QWinTabPointingDevicecreateInputDevice (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)

Macro Definition Documentation

◆ PACKETDATA

#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.

Enumeration Type Documentation

◆ anonymous enum [1/2]

anonymous enum
Enumerator
PacketMode 
TabletPacketQSize 
DeviceIdMask 
CursorTypeBitMask 
PacketMode 
TabletPacketQSize 
DeviceIdMask 
CursorTypeBitMask 

Definition at line 30 of file qwindowstabletsupport.cpp.

◆ anonymous enum [2/2]

anonymous enum
Enumerator
PacketMode 
TabletPacketQSize 
DeviceIdMask 
CursorTypeBitMask 
PacketMode 
TabletPacketQSize 
DeviceIdMask 
CursorTypeBitMask 

Definition at line 30 of file qwindowstabletsupport.cpp.

Function Documentation

◆ buttonValueToEnum()

Qt::MouseButton buttonValueToEnum ( DWORD button,
const QWindowsTabletDeviceData & tdd )

Definition at line 522 of file qwindowstabletsupport.cpp.

◆ 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.

◆ createInputDevice()

Definition at line 132 of file qwindowstabletsupport.cpp.

◆ deviceType()

QInputDevice::DeviceType deviceType ( const UINT cursorType)
inlinestatic

Definition at line 328 of file qwindowstabletsupport.cpp.

References CursorTypeBitMask.

◆ formatOptions()

template<class Stream>
void formatOptions ( Stream & str,
unsigned options )
static

Definition at line 79 of file qwindowstabletsupport.cpp.

◆ operator<<() [1/2]

QDebug operator<< ( QDebug d,
const LOGCONTEXT & lc )

Definition at line 107 of file qwindowstabletsupport.cpp.

◆ operator<<() [2/2]

◆ pointerType()

QPointingDevice::PointerType pointerType ( unsigned currentCursor)
inlinestatic

Definition at line 351 of file qwindowstabletsupport.cpp.

◆ qWindowsTabletSupportWndProc()

LRESULT QT_WIN_CALLBACK qWindowsTabletSupportWndProc ( HWND hwnd,
UINT message,
WPARAM wParam,
LPARAM lParam )

Definition at line 37 of file qwindowstabletsupport.cpp.

◆ sign()

int sign ( int x)
inlinestatic

Definition at line 55 of file qwindowstabletsupport.cpp.

Referenced by QWindowsTabletDeviceData::scaleCoordinates().

Here is the caller graph for this function: