1 /**************************************************************************** 2 ** 3 ** DQt - D bindings for the Qt Toolkit 4 ** 5 ** GNU Lesser General Public License Usage 6 ** This file may be used under the terms of the GNU Lesser 7 ** General Public License version 3 as published by the Free Software 8 ** Foundation and appearing in the file LICENSE.LGPL3 included in the 9 ** packaging of this file. Please review the following information to 10 ** ensure the GNU Lesser General Public License version 3 requirements 11 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. 12 ** 13 ****************************************************************************/ 14 module qt.gui.touchdevice; 15 extern(C++): 16 17 import qt.config; 18 import qt.core.flags; 19 import qt.core.list; 20 import qt.core.objectdefs; 21 import qt.core.string; 22 import qt.helpers; 23 24 /+ class QDebug; +/ 25 extern(C++, class) struct QTouchDevicePrivate; 26 27 extern(C++, class) struct /+ Q_GUI_EXPORT +/ QTouchDevice 28 { 29 mixin(Q_GADGET); 30 public: 31 enum DeviceType { 32 TouchScreen, 33 TouchPad 34 } 35 /+ Q_ENUM(DeviceType) +/ 36 37 enum CapabilityFlag { 38 Position = 0x0001, 39 Area = 0x0002, 40 Pressure = 0x0004, 41 Velocity = 0x0008, 42 RawPositions = 0x0010, 43 NormalizedPosition = 0x0020, 44 MouseEmulation = 0x0040 45 } 46 /+ Q_FLAG(CapabilityFlag) +/ 47 /+ Q_DECLARE_FLAGS(Capabilities, CapabilityFlag) +/ 48 alias Capabilities = QFlags!(CapabilityFlag); 49 @disable this(); 50 pragma(mangle, defaultConstructorMangling(__traits(identifier, typeof(this)))) 51 ref typeof(this) rawConstructor(); 52 static typeof(this) create() 53 { 54 typeof(this) r = typeof(this).init; 55 r.rawConstructor(); 56 return r; 57 } 58 59 ~this(); 60 61 static QList!(const(QTouchDevice)*) devices(); 62 63 QString name() const; 64 DeviceType type() const; 65 Capabilities capabilities() const; 66 int maximumTouchPoints() const; 67 68 void setName(ref const(QString) name); 69 void setType(DeviceType devType); 70 void setCapabilities(Capabilities caps); 71 void setMaximumTouchPoints(int max); 72 73 private: 74 QTouchDevicePrivate* d; 75 /+ friend class QTouchDevicePrivate; +/ 76 } 77 /+pragma(inline, true) QFlags!(QTouchDevice.Capabilities.enum_type) operator |(QTouchDevice.Capabilities.enum_type f1, QTouchDevice.Capabilities.enum_type f2)/+noexcept+/{return QFlags!(QTouchDevice.Capabilities.enum_type)(f1)|f2;}+/ 78 /+pragma(inline, true) QFlags!(QTouchDevice.Capabilities.enum_type) operator |(QTouchDevice.Capabilities.enum_type f1, QFlags!(QTouchDevice.Capabilities.enum_type) f2)/+noexcept+/{return f2|f1;}+/ 79 /+pragma(inline, true) QIncompatibleFlag operator |(QTouchDevice.Capabilities.enum_type f1, int f2)/+noexcept+/{return QIncompatibleFlag(int(f1)|f2);}+/ 80 81 /+ Q_DECLARE_OPERATORS_FOR_FLAGS(QTouchDevice::Capabilities) 82 #ifndef QT_NO_DEBUG_STREAM 83 Q_GUI_EXPORT QDebug operator<<(QDebug, const QTouchDevice *); 84 #endif +/ 85