miqt/qt/gen_qkeyeventtransition.cpp

123 lines
4.0 KiB
C++

#include <QKeyEventTransition>
#include <QMetaObject>
#include <QObject>
#include <QState>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <qkeyeventtransition.h>
#include "gen_qkeyeventtransition.h"
#include "_cgo_export.h"
QKeyEventTransition* QKeyEventTransition_new() {
return new QKeyEventTransition();
}
QKeyEventTransition* QKeyEventTransition_new2(QObject* object, int typeVal, int key) {
return new QKeyEventTransition(object, static_cast<QEvent::Type>(typeVal), static_cast<int>(key));
}
QKeyEventTransition* QKeyEventTransition_new3(QState* sourceState) {
return new QKeyEventTransition(sourceState);
}
QKeyEventTransition* QKeyEventTransition_new4(QObject* object, int typeVal, int key, QState* sourceState) {
return new QKeyEventTransition(object, static_cast<QEvent::Type>(typeVal), static_cast<int>(key), sourceState);
}
QMetaObject* QKeyEventTransition_MetaObject(const QKeyEventTransition* self) {
return (QMetaObject*) self->metaObject();
}
void* QKeyEventTransition_Metacast(QKeyEventTransition* self, const char* param1) {
return self->qt_metacast(param1);
}
struct miqt_string QKeyEventTransition_Tr(const char* s) {
QString _ret = QKeyEventTransition::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;
}
struct miqt_string QKeyEventTransition_TrUtf8(const char* s) {
QString _ret = QKeyEventTransition::trUtf8(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;
}
int QKeyEventTransition_Key(const QKeyEventTransition* self) {
return self->key();
}
void QKeyEventTransition_SetKey(QKeyEventTransition* self, int key) {
self->setKey(static_cast<int>(key));
}
int QKeyEventTransition_ModifierMask(const QKeyEventTransition* self) {
Qt::KeyboardModifiers _ret = self->modifierMask();
return static_cast<int>(_ret);
}
void QKeyEventTransition_SetModifierMask(QKeyEventTransition* self, int modifiers) {
self->setModifierMask(static_cast<Qt::KeyboardModifiers>(modifiers));
}
struct miqt_string QKeyEventTransition_Tr2(const char* s, const char* c) {
QString _ret = QKeyEventTransition::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 QKeyEventTransition_Tr3(const char* s, const char* c, int n) {
QString _ret = QKeyEventTransition::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;
}
struct miqt_string QKeyEventTransition_TrUtf82(const char* s, const char* c) {
QString _ret = QKeyEventTransition::trUtf8(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 QKeyEventTransition_TrUtf83(const char* s, const char* c, int n) {
QString _ret = QKeyEventTransition::trUtf8(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;
}
void QKeyEventTransition_Delete(QKeyEventTransition* self) {
delete self;
}