miqt/qt-restricted-extras/qscintilla/gen_qscilexercmake.cpp
2024-10-20 18:07:38 +13:00

145 lines
4.4 KiB
C++

#include <QColor>
#include <QFont>
#include <QMetaObject>
#include <QObject>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <qscilexercmake.h>
#include "gen_qscilexercmake.h"
#include "_cgo_export.h"
QsciLexerCMake* QsciLexerCMake_new() {
return new QsciLexerCMake();
}
QsciLexerCMake* QsciLexerCMake_new2(QObject* parent) {
return new QsciLexerCMake(parent);
}
QMetaObject* QsciLexerCMake_MetaObject(const QsciLexerCMake* self) {
return (QMetaObject*) self->metaObject();
}
void* QsciLexerCMake_Metacast(QsciLexerCMake* self, const char* param1) {
return self->qt_metacast(param1);
}
struct miqt_string QsciLexerCMake_Tr(const char* s) {
QString _ret = QsciLexerCMake::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 QsciLexerCMake_TrUtf8(const char* s) {
QString _ret = QsciLexerCMake::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;
}
const char* QsciLexerCMake_Language(const QsciLexerCMake* self) {
return (const char*) self->language();
}
const char* QsciLexerCMake_Lexer(const QsciLexerCMake* self) {
return (const char*) self->lexer();
}
QColor* QsciLexerCMake_DefaultColor(const QsciLexerCMake* self, int style) {
return new QColor(self->defaultColor(static_cast<int>(style)));
}
QFont* QsciLexerCMake_DefaultFont(const QsciLexerCMake* self, int style) {
return new QFont(self->defaultFont(static_cast<int>(style)));
}
QColor* QsciLexerCMake_DefaultPaper(const QsciLexerCMake* self, int style) {
return new QColor(self->defaultPaper(static_cast<int>(style)));
}
const char* QsciLexerCMake_Keywords(const QsciLexerCMake* self, int set) {
return (const char*) self->keywords(static_cast<int>(set));
}
struct miqt_string QsciLexerCMake_Description(const QsciLexerCMake* self, int style) {
QString _ret = self->description(static_cast<int>(style));
// 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 QsciLexerCMake_RefreshProperties(QsciLexerCMake* self) {
self->refreshProperties();
}
bool QsciLexerCMake_FoldAtElse(const QsciLexerCMake* self) {
return self->foldAtElse();
}
void QsciLexerCMake_SetFoldAtElse(QsciLexerCMake* self, bool fold) {
self->setFoldAtElse(fold);
}
struct miqt_string QsciLexerCMake_Tr2(const char* s, const char* c) {
QString _ret = QsciLexerCMake::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 QsciLexerCMake_Tr3(const char* s, const char* c, int n) {
QString _ret = QsciLexerCMake::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 QsciLexerCMake_TrUtf82(const char* s, const char* c) {
QString _ret = QsciLexerCMake::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 QsciLexerCMake_TrUtf83(const char* s, const char* c, int n) {
QString _ret = QsciLexerCMake::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 QsciLexerCMake_Delete(QsciLexerCMake* self) {
delete self;
}