#include #include #include #include #include #include #include #include "gen_qwebenginescriptcollection.h" #include "_cgo_export.h" bool QWebEngineScriptCollection_IsEmpty(const QWebEngineScriptCollection* self) { return self->isEmpty(); } int QWebEngineScriptCollection_Count(const QWebEngineScriptCollection* self) { return self->count(); } int QWebEngineScriptCollection_Size(const QWebEngineScriptCollection* self) { return self->size(); } bool QWebEngineScriptCollection_Contains(const QWebEngineScriptCollection* self, QWebEngineScript* value) { return self->contains(*value); } QWebEngineScript* QWebEngineScriptCollection_FindScript(const QWebEngineScriptCollection* self, struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); return new QWebEngineScript(self->findScript(name_QString)); } struct miqt_array /* of QWebEngineScript* */ QWebEngineScriptCollection_FindScripts(const QWebEngineScriptCollection* self, struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); QList _ret = self->findScripts(name_QString); // Convert QList<> from C++ memory to manually-managed C memory QWebEngineScript** _arr = static_cast(malloc(sizeof(QWebEngineScript*) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { _arr[i] = new QWebEngineScript(_ret[i]); } struct miqt_array _out; _out.len = _ret.length(); _out.data = static_cast(_arr); return _out; } void QWebEngineScriptCollection_Insert(QWebEngineScriptCollection* self, QWebEngineScript* param1) { self->insert(*param1); } void QWebEngineScriptCollection_InsertWithList(QWebEngineScriptCollection* self, struct miqt_array /* of QWebEngineScript* */ list) { QList list_QList; list_QList.reserve(list.len); QWebEngineScript** list_arr = static_cast(list.data); for(size_t i = 0; i < list.len; ++i) { list_QList.push_back(*(list_arr[i])); } self->insert(list_QList); } bool QWebEngineScriptCollection_Remove(QWebEngineScriptCollection* self, QWebEngineScript* param1) { return self->remove(*param1); } void QWebEngineScriptCollection_Clear(QWebEngineScriptCollection* self) { self->clear(); } struct miqt_array /* of QWebEngineScript* */ QWebEngineScriptCollection_ToList(const QWebEngineScriptCollection* self) { QList _ret = self->toList(); // Convert QList<> from C++ memory to manually-managed C memory QWebEngineScript** _arr = static_cast(malloc(sizeof(QWebEngineScript*) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { _arr[i] = new QWebEngineScript(_ret[i]); } struct miqt_array _out; _out.len = _ret.length(); _out.data = static_cast(_arr); return _out; } void QWebEngineScriptCollection_Delete(QWebEngineScriptCollection* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); } else { delete self; } }