mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 08:58:37 +00:00
174 lines
7.5 KiB
C++
174 lines
7.5 KiB
C++
#include <QEventPoint>
|
|
#include <QMetaObject>
|
|
#include <QObject>
|
|
#include <QPointerEvent>
|
|
#include <QPointingDevice>
|
|
#include <QPointingDeviceUniqueId>
|
|
#include <QString>
|
|
#include <QByteArray>
|
|
#include <cstring>
|
|
#include <qpointingdevice.h>
|
|
#include "gen_qpointingdevice.h"
|
|
#include "_cgo_export.h"
|
|
|
|
QPointingDeviceUniqueId* QPointingDeviceUniqueId_new() {
|
|
return new QPointingDeviceUniqueId();
|
|
}
|
|
|
|
QPointingDeviceUniqueId* QPointingDeviceUniqueId_new2(QPointingDeviceUniqueId* param1) {
|
|
return new QPointingDeviceUniqueId(*param1);
|
|
}
|
|
|
|
QPointingDeviceUniqueId* QPointingDeviceUniqueId_FromNumericId(long long id) {
|
|
return new QPointingDeviceUniqueId(QPointingDeviceUniqueId::fromNumericId(static_cast<qint64>(id)));
|
|
}
|
|
|
|
bool QPointingDeviceUniqueId_IsValid(const QPointingDeviceUniqueId* self) {
|
|
return self->isValid();
|
|
}
|
|
|
|
long long QPointingDeviceUniqueId_NumericId(const QPointingDeviceUniqueId* self) {
|
|
qint64 _ret = self->numericId();
|
|
return static_cast<long long>(_ret);
|
|
}
|
|
|
|
void QPointingDeviceUniqueId_Delete(QPointingDeviceUniqueId* self) {
|
|
delete self;
|
|
}
|
|
|
|
QPointingDevice* QPointingDevice_new() {
|
|
return new QPointingDevice();
|
|
}
|
|
|
|
QPointingDevice* QPointingDevice_new2(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount) {
|
|
QString name_QString = QString::fromUtf8(name.data, name.len);
|
|
return new QPointingDevice(name_QString, static_cast<qint64>(systemId), static_cast<QInputDevice::DeviceType>(devType), static_cast<QPointingDevice::PointerType>(pType), static_cast<QInputDevice::Capabilities>(caps), static_cast<int>(maxPoints), static_cast<int>(buttonCount));
|
|
}
|
|
|
|
QPointingDevice* QPointingDevice_new3(QObject* parent) {
|
|
return new QPointingDevice(parent);
|
|
}
|
|
|
|
QPointingDevice* QPointingDevice_new4(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName) {
|
|
QString name_QString = QString::fromUtf8(name.data, name.len);
|
|
QString seatName_QString = QString::fromUtf8(seatName.data, seatName.len);
|
|
return new QPointingDevice(name_QString, static_cast<qint64>(systemId), static_cast<QInputDevice::DeviceType>(devType), static_cast<QPointingDevice::PointerType>(pType), static_cast<QInputDevice::Capabilities>(caps), static_cast<int>(maxPoints), static_cast<int>(buttonCount), seatName_QString);
|
|
}
|
|
|
|
QPointingDevice* QPointingDevice_new5(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDeviceUniqueId* uniqueId) {
|
|
QString name_QString = QString::fromUtf8(name.data, name.len);
|
|
QString seatName_QString = QString::fromUtf8(seatName.data, seatName.len);
|
|
return new QPointingDevice(name_QString, static_cast<qint64>(systemId), static_cast<QInputDevice::DeviceType>(devType), static_cast<QPointingDevice::PointerType>(pType), static_cast<QInputDevice::Capabilities>(caps), static_cast<int>(maxPoints), static_cast<int>(buttonCount), seatName_QString, *uniqueId);
|
|
}
|
|
|
|
QPointingDevice* QPointingDevice_new6(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDeviceUniqueId* uniqueId, QObject* parent) {
|
|
QString name_QString = QString::fromUtf8(name.data, name.len);
|
|
QString seatName_QString = QString::fromUtf8(seatName.data, seatName.len);
|
|
return new QPointingDevice(name_QString, static_cast<qint64>(systemId), static_cast<QInputDevice::DeviceType>(devType), static_cast<QPointingDevice::PointerType>(pType), static_cast<QInputDevice::Capabilities>(caps), static_cast<int>(maxPoints), static_cast<int>(buttonCount), seatName_QString, *uniqueId, parent);
|
|
}
|
|
|
|
QMetaObject* QPointingDevice_MetaObject(const QPointingDevice* self) {
|
|
return (QMetaObject*) self->metaObject();
|
|
}
|
|
|
|
void* QPointingDevice_Metacast(QPointingDevice* self, const char* param1) {
|
|
return self->qt_metacast(param1);
|
|
}
|
|
|
|
struct miqt_string QPointingDevice_Tr(const char* s) {
|
|
QString _ret = QPointingDevice::tr(s);
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
QByteArray _b = _ret.toUtf8();
|
|
struct miqt_string _ms;
|
|
_ms.len = _b.length();
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
return _ms;
|
|
}
|
|
|
|
void QPointingDevice_SetType(QPointingDevice* self, int devType) {
|
|
self->setType(static_cast<QInputDevice::DeviceType>(devType));
|
|
}
|
|
|
|
void QPointingDevice_SetCapabilities(QPointingDevice* self, int caps) {
|
|
self->setCapabilities(static_cast<QInputDevice::Capabilities>(caps));
|
|
}
|
|
|
|
void QPointingDevice_SetMaximumTouchPoints(QPointingDevice* self, int c) {
|
|
self->setMaximumTouchPoints(static_cast<int>(c));
|
|
}
|
|
|
|
int QPointingDevice_PointerType(const QPointingDevice* self) {
|
|
QPointingDevice::PointerType _ret = self->pointerType();
|
|
return static_cast<int>(_ret);
|
|
}
|
|
|
|
int QPointingDevice_MaximumPoints(const QPointingDevice* self) {
|
|
return self->maximumPoints();
|
|
}
|
|
|
|
int QPointingDevice_ButtonCount(const QPointingDevice* self) {
|
|
return self->buttonCount();
|
|
}
|
|
|
|
QPointingDeviceUniqueId* QPointingDevice_UniqueId(const QPointingDevice* self) {
|
|
return new QPointingDeviceUniqueId(self->uniqueId());
|
|
}
|
|
|
|
QPointingDevice* QPointingDevice_PrimaryPointingDevice() {
|
|
return (QPointingDevice*) QPointingDevice::primaryPointingDevice();
|
|
}
|
|
|
|
bool QPointingDevice_OperatorEqual(const QPointingDevice* self, QPointingDevice* other) {
|
|
return self->operator==(*other);
|
|
}
|
|
|
|
void QPointingDevice_GrabChanged(const QPointingDevice* self, QObject* grabber, int transition, QPointerEvent* event, QEventPoint* point) {
|
|
self->grabChanged(grabber, static_cast<QPointingDevice::GrabTransition>(transition), event, *point);
|
|
}
|
|
|
|
void QPointingDevice_connect_GrabChanged(QPointingDevice* self, intptr_t slot) {
|
|
QPointingDevice::connect(self, static_cast<void (QPointingDevice::*)(QObject*, QPointingDevice::GrabTransition, const QPointerEvent*, const QEventPoint&) const>(&QPointingDevice::grabChanged), self, [=](QObject* grabber, QPointingDevice::GrabTransition transition, const QPointerEvent* event, const QEventPoint& point) {
|
|
QObject* sigval1 = grabber;
|
|
QPointingDevice::GrabTransition transition_ret = transition;
|
|
int sigval2 = static_cast<int>(transition_ret);
|
|
QPointerEvent* sigval3 = (QPointerEvent*) event;
|
|
const QEventPoint& point_ret = point;
|
|
// Cast returned reference into pointer
|
|
QEventPoint* sigval4 = const_cast<QEventPoint*>(&point_ret);
|
|
miqt_exec_callback_QPointingDevice_GrabChanged(slot, sigval1, sigval2, sigval3, sigval4);
|
|
});
|
|
}
|
|
|
|
struct miqt_string QPointingDevice_Tr2(const char* s, const char* c) {
|
|
QString _ret = QPointingDevice::tr(s, c);
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
QByteArray _b = _ret.toUtf8();
|
|
struct miqt_string _ms;
|
|
_ms.len = _b.length();
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
return _ms;
|
|
}
|
|
|
|
struct miqt_string QPointingDevice_Tr3(const char* s, const char* c, int n) {
|
|
QString _ret = QPointingDevice::tr(s, c, static_cast<int>(n));
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
QByteArray _b = _ret.toUtf8();
|
|
struct miqt_string _ms;
|
|
_ms.len = _b.length();
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
return _ms;
|
|
}
|
|
|
|
QPointingDevice* QPointingDevice_PrimaryPointingDevice1(struct miqt_string seatName) {
|
|
QString seatName_QString = QString::fromUtf8(seatName.data, seatName.len);
|
|
return (QPointingDevice*) QPointingDevice::primaryPointingDevice(seatName_QString);
|
|
}
|
|
|
|
void QPointingDevice_Delete(QPointingDevice* self) {
|
|
delete self;
|
|
}
|
|
|