2024-08-25 04:08:24 +00:00
|
|
|
#include <QFont>
|
|
|
|
#include <QFontInfo>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qfontinfo.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qfontinfo.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
QFontInfo* QFontInfo_new(QFont* param1) {
|
|
|
|
return new QFontInfo(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
QFontInfo* QFontInfo_new2(QFontInfo* param1) {
|
|
|
|
return new QFontInfo(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFontInfo_OperatorAssign(QFontInfo* self, QFontInfo* param1) {
|
|
|
|
self->operator=(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QFontInfo_Swap(QFontInfo* self, QFontInfo* other) {
|
|
|
|
self->swap(*other);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QFontInfo_Family(const QFontInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->family();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
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;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QFontInfo_StyleName(const QFontInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->styleName();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
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;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QFontInfo_PixelSize(const QFontInfo* self) {
|
|
|
|
return self->pixelSize();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QFontInfo_PointSize(const QFontInfo* self) {
|
|
|
|
return self->pointSize();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QFontInfo_PointSizeF(const QFontInfo* self) {
|
2024-09-18 00:12:02 +00:00
|
|
|
qreal _ret = self->pointSizeF();
|
|
|
|
return static_cast<double>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFontInfo_Italic(const QFontInfo* self) {
|
|
|
|
return self->italic();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QFontInfo_Style(const QFontInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QFont::Style _ret = self->style();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QFontInfo_Weight(const QFontInfo* self) {
|
|
|
|
return self->weight();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFontInfo_Bold(const QFontInfo* self) {
|
|
|
|
return self->bold();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFontInfo_Underline(const QFontInfo* self) {
|
|
|
|
return self->underline();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFontInfo_Overline(const QFontInfo* self) {
|
|
|
|
return self->overline();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFontInfo_StrikeOut(const QFontInfo* self) {
|
|
|
|
return self->strikeOut();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFontInfo_FixedPitch(const QFontInfo* self) {
|
|
|
|
return self->fixedPitch();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QFontInfo_StyleHint(const QFontInfo* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QFont::StyleHint _ret = self->styleHint();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFontInfo_RawMode(const QFontInfo* self) {
|
|
|
|
return self->rawMode();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QFontInfo_ExactMatch(const QFontInfo* self) {
|
|
|
|
return self->exactMatch();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QFontInfo_Delete(QFontInfo* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|