Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qmultitouch_mac_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the Qt API. It exists for the convenience
9// of other Qt classes. This header file may change from version to
10// version without notice, or even be removed.
11//
12// We mean it.
13//
14
15#ifndef QMULTITOUCH_MAC_P_H
16#define QMULTITOUCH_MAC_P_H
17
18#include <QtCore/qglobal.h>
19#include <qpa/qwindowsysteminterface.h>
20#include <qhash.h>
21#include <QtCore>
22#include <QtGui/qpointingdevice.h>
23
24#include <QtCore/private/qcore_mac_p.h>
25
27QT_FORWARD_DECLARE_OBJC_ENUM(NSTouchPhase, unsigned long);
28
30
32{
33 public:
34 static QList<QWindowSystemInterface::TouchPoint> getCurrentTouchPointList(NSEvent *event, bool acceptSingleTouch);
35 static void setMouseInDraggingState(bool inDraggingState);
37
38 private:
39 static QHash<quint64, QPointingDevice*> _touchDevices;
40 static QHash<qint64, QCocoaTouch*> _currentTouches;
41 static QPointF _screenReferencePos;
42 static QPointF _trackpadReferencePos;
43 static int _idAssignmentCount;
44 static int _touchCount;
45 static bool _updateInternalStateOnly;
46
48 qint64 _identity;
49
50 QCocoaTouch(NSTouch *nstouch);
52
53 void updateTouchData(NSTouch *nstouch, NSTouchPhase phase);
54 static QCocoaTouch *findQCocoaTouch(NSTouch *nstouch);
55 static QEventPoint::State toTouchPointState(NSTouchPhase nsState);
56};
57
59
60#endif // QMULTITOUCH_MAC_P_H
61
static QList< QWindowSystemInterface::TouchPoint > getCurrentTouchPointList(NSEvent *event, bool acceptSingleTouch)
static QPointingDevice * getTouchDevice(QInputDevice::DeviceType type, quint64 id)
static void setMouseInDraggingState(bool inDraggingState)
State
Specifies the state of this event point.
Definition qeventpoint.h:48
DeviceType
This enum represents the type of device that generated a QPointerEvent.
\inmodule QtCore\reentrant
Definition qpoint.h:217
The QPointingDevice class describes a device from which mouse, touch or tablet events originate.
Combined button and popup list for selecting options.
#define QT_FORWARD_DECLARE_OBJC_ENUM(name, type)
Definition qcore_mac_p.h:75
#define Q_FORWARD_DECLARE_OBJC_CLASS(classname)
GLenum type
struct _cl_event * event
unsigned long long quint64
Definition qtypes.h:61
long long qint64
Definition qtypes.h:60