miqt/qt/multimedia/gen_qmediatimerange.cpp

181 lines
5.4 KiB
C++
Raw Normal View History

2024-11-04 10:15:32 +00:00
#include <QList>
#include <QMediaTimeInterval>
#include <QMediaTimeRange>
#include <qmediatimerange.h>
#include "gen_qmediatimerange.h"
#ifndef _Bool
#define _Bool bool
#endif
2024-11-04 10:15:32 +00:00
#include "_cgo_export.h"
2024-12-07 04:15:57 +00:00
QMediaTimeInterval* QMediaTimeInterval_new() {
return new QMediaTimeInterval();
2024-11-04 10:15:32 +00:00
}
2024-12-07 04:15:57 +00:00
QMediaTimeInterval* QMediaTimeInterval_new2(long long start, long long end) {
return new QMediaTimeInterval(static_cast<qint64>(start), static_cast<qint64>(end));
2024-11-04 10:15:32 +00:00
}
2024-12-07 04:15:57 +00:00
QMediaTimeInterval* QMediaTimeInterval_new3(QMediaTimeInterval* param1) {
return new QMediaTimeInterval(*param1);
2024-11-04 10:15:32 +00:00
}
void QMediaTimeInterval_OperatorAssign(QMediaTimeInterval* self, QMediaTimeInterval* param1) {
self->operator=(*param1);
}
long long QMediaTimeInterval_Start(const QMediaTimeInterval* self) {
qint64 _ret = self->start();
return static_cast<long long>(_ret);
}
long long QMediaTimeInterval_End(const QMediaTimeInterval* self) {
qint64 _ret = self->end();
return static_cast<long long>(_ret);
}
bool QMediaTimeInterval_Contains(const QMediaTimeInterval* self, long long time) {
return self->contains(static_cast<qint64>(time));
}
bool QMediaTimeInterval_IsNormal(const QMediaTimeInterval* self) {
return self->isNormal();
}
QMediaTimeInterval* QMediaTimeInterval_Normalized(const QMediaTimeInterval* self) {
return new QMediaTimeInterval(self->normalized());
}
QMediaTimeInterval* QMediaTimeInterval_Translated(const QMediaTimeInterval* self, long long offset) {
return new QMediaTimeInterval(self->translated(static_cast<qint64>(offset)));
}
2024-11-19 06:29:06 +00:00
void QMediaTimeInterval_Delete(QMediaTimeInterval* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QMediaTimeInterval*>( self );
} else {
delete self;
}
2024-11-04 10:15:32 +00:00
}
2024-12-07 04:15:57 +00:00
QMediaTimeRange* QMediaTimeRange_new() {
return new QMediaTimeRange();
2024-11-04 10:15:32 +00:00
}
2024-12-07 04:15:57 +00:00
QMediaTimeRange* QMediaTimeRange_new2(long long start, long long end) {
return new QMediaTimeRange(static_cast<qint64>(start), static_cast<qint64>(end));
2024-11-04 10:15:32 +00:00
}
2024-12-07 04:15:57 +00:00
QMediaTimeRange* QMediaTimeRange_new3(QMediaTimeInterval* param1) {
return new QMediaTimeRange(*param1);
2024-11-04 10:15:32 +00:00
}
2024-12-07 04:15:57 +00:00
QMediaTimeRange* QMediaTimeRange_new4(QMediaTimeRange* rangeVal) {
return new QMediaTimeRange(*rangeVal);
2024-11-04 10:15:32 +00:00
}
void QMediaTimeRange_OperatorAssign(QMediaTimeRange* self, QMediaTimeRange* param1) {
self->operator=(*param1);
}
void QMediaTimeRange_OperatorAssignWithQMediaTimeInterval(QMediaTimeRange* self, QMediaTimeInterval* param1) {
self->operator=(*param1);
}
long long QMediaTimeRange_EarliestTime(const QMediaTimeRange* self) {
qint64 _ret = self->earliestTime();
return static_cast<long long>(_ret);
}
long long QMediaTimeRange_LatestTime(const QMediaTimeRange* self) {
qint64 _ret = self->latestTime();
return static_cast<long long>(_ret);
}
struct miqt_array /* of QMediaTimeInterval* */ QMediaTimeRange_Intervals(const QMediaTimeRange* self) {
2024-11-04 10:15:32 +00:00
QList<QMediaTimeInterval> _ret = self->intervals();
// Convert QList<> from C++ memory to manually-managed C memory
QMediaTimeInterval** _arr = static_cast<QMediaTimeInterval**>(malloc(sizeof(QMediaTimeInterval*) * _ret.length()));
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
_arr[i] = new QMediaTimeInterval(_ret[i]);
}
struct miqt_array _out;
_out.len = _ret.length();
_out.data = static_cast<void*>(_arr);
return _out;
}
bool QMediaTimeRange_IsEmpty(const QMediaTimeRange* self) {
return self->isEmpty();
}
bool QMediaTimeRange_IsContinuous(const QMediaTimeRange* self) {
return self->isContinuous();
}
bool QMediaTimeRange_Contains(const QMediaTimeRange* self, long long time) {
return self->contains(static_cast<qint64>(time));
}
void QMediaTimeRange_AddInterval(QMediaTimeRange* self, long long start, long long end) {
self->addInterval(static_cast<qint64>(start), static_cast<qint64>(end));
}
void QMediaTimeRange_AddIntervalWithInterval(QMediaTimeRange* self, QMediaTimeInterval* interval) {
self->addInterval(*interval);
}
void QMediaTimeRange_AddTimeRange(QMediaTimeRange* self, QMediaTimeRange* param1) {
self->addTimeRange(*param1);
}
void QMediaTimeRange_RemoveInterval(QMediaTimeRange* self, long long start, long long end) {
self->removeInterval(static_cast<qint64>(start), static_cast<qint64>(end));
}
void QMediaTimeRange_RemoveIntervalWithInterval(QMediaTimeRange* self, QMediaTimeInterval* interval) {
self->removeInterval(*interval);
}
void QMediaTimeRange_RemoveTimeRange(QMediaTimeRange* self, QMediaTimeRange* param1) {
self->removeTimeRange(*param1);
}
QMediaTimeRange* QMediaTimeRange_OperatorPlusAssign(QMediaTimeRange* self, QMediaTimeRange* param1) {
QMediaTimeRange& _ret = self->operator+=(*param1);
// Cast returned reference into pointer
return &_ret;
}
QMediaTimeRange* QMediaTimeRange_OperatorPlusAssignWithQMediaTimeInterval(QMediaTimeRange* self, QMediaTimeInterval* param1) {
QMediaTimeRange& _ret = self->operator+=(*param1);
// Cast returned reference into pointer
return &_ret;
}
QMediaTimeRange* QMediaTimeRange_OperatorMinusAssign(QMediaTimeRange* self, QMediaTimeRange* param1) {
QMediaTimeRange& _ret = self->operator-=(*param1);
// Cast returned reference into pointer
return &_ret;
}
QMediaTimeRange* QMediaTimeRange_OperatorMinusAssignWithQMediaTimeInterval(QMediaTimeRange* self, QMediaTimeInterval* param1) {
QMediaTimeRange& _ret = self->operator-=(*param1);
// Cast returned reference into pointer
return &_ret;
}
void QMediaTimeRange_Clear(QMediaTimeRange* self) {
self->clear();
}
2024-11-19 06:29:06 +00:00
void QMediaTimeRange_Delete(QMediaTimeRange* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QMediaTimeRange*>( self );
} else {
delete self;
}
2024-11-04 10:15:32 +00:00
}