diff --git a/.gitignore b/.gitignore index 179a6992..5576b734 100644 --- a/.gitignore +++ b/.gitignore @@ -35,8 +35,10 @@ examples/libraries/qt-network/qt-network examples/libraries/qt-printsupport/qt-printsupport examples/libraries/qt-script/qt-script examples/libraries/qt-svg/qt-svg +examples/libraries/qt-webengine/qt-webengine examples/libraries/qt-webkit/qt-webkit examples/libraries/qt6-multimedia/qt6-multimedia +examples/libraries/qt6-webengine/qt6-webengine examples/libraries/restricted-extras-qscintilla/restricted-extras-qscintilla # android temporary build files diff --git a/README.md b/README.md index c26a142a..c7ce6be2 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ MIQT is MIT-licensed Qt bindings for Go. This is a straightforward binding of the Qt 5.15 / Qt 6.4+ API using CGO. You must have a working Qt C++ development toolchain to use this Go binding. -These bindings were newly started in August 2024. The bindings are complete for QtCore, QtGui, QtWidgets, QtMultimedia, QtMultimediaWidgets, QtSpatialAudio, QtPrintSupport, QScintilla, ScintillaEdit, and there is a uic/rcc implementation. But, the bindings may be immature in some ways. Please try out the bindings and raise issues if you have trouble. +These bindings were newly started in August 2024. The bindings are complete for QtCore, QtGui, QtWidgets, QtMultimedia, QtMultimediaWidgets, QtSpatialAudio, QtPrintSupport, QtSvg, QtScript, QtNetwork, QtWebkit, QtWebChannel, QtWebEngine, QScintilla, ScintillaEdit, there is subclassing support, and there is a uic/rcc implementation. But, the bindings may be immature in some ways. Please try out the bindings and raise issues if you have trouble. ## Supported platforms @@ -123,9 +123,9 @@ Fork this repository and add your library to the `genbindings/config-libraries` ### Linux (native) -*Tested with Debian 12 / Qt 5.15 / Qt 6.4 / GCC 12* +*Tested with Debian 12 / Qt 5.15 + 6.4 / GCC 12* -*Tested with Fedora 40 / Qt 6.7 / GCC 14* +*Tested with Fedora 40 + 41 / Qt 6.7 + 6.8 / GCC 14* For dynamic linking, with the system Qt (Qt 5): diff --git a/cmd/genbindings/config-allowlist.go b/cmd/genbindings/config-allowlist.go index c11069f4..53d48d35 100644 --- a/cmd/genbindings/config-allowlist.go +++ b/cmd/genbindings/config-allowlist.go @@ -385,6 +385,12 @@ func AllowType(p CppParameter, isReturnType bool) error { if strings.HasPrefix(p.ParameterType, "EncodedData<") { return ErrTooComplex // e.g. Qt 6 qstringconverter.h } + if strings.HasPrefix(p.ParameterType, "QQmlListProperty<") { + return ErrTooComplex // e.g. Qt 5 QWebChannel qmlwebchannel.h . Supporting this will be required for QML in future + } + if strings.HasPrefix(p.ParameterType, "QWebEngineCallback<") { + return ErrTooComplex // Function pointer types in QtWebEngine + } if strings.HasPrefix(p.ParameterType, "std::") { // std::initializer e.g. qcborarray.h @@ -510,6 +516,7 @@ func AllowType(p CppParameter, isReturnType bool) error { "QPostEvent", // .. "QWebFrameAdapter", // Qt 5 Webkit: Used by e.g. qwebframe.h but never defined anywhere "QWebPageAdapter", // ... + "QQmlWebChannelAttached", // Qt 5 qqmlwebchannel.h. Need to add QML support for this to work "____last____": return ErrTooComplex } diff --git a/cmd/genbindings/config-libraries.go b/cmd/genbindings/config-libraries.go index 4ea894b5..944c98c7 100644 --- a/cmd/genbindings/config-libraries.go +++ b/cmd/genbindings/config-libraries.go @@ -129,6 +129,41 @@ func ProcessLibraries(clangBin, outDir, extraLibsDir string) { ClangMatchSameHeaderDefinitionOnly, ) + // Qt 5 QWebChannel + generate( + "qt/webchannel", + []string{ + "/usr/include/x86_64-linux-gnu/qt5/QtWebChannel", + }, + AllowAllHeaders, + clangBin, + pkgConfigCflags("Qt5WebChannel"), + outDir, + ClangMatchSameHeaderDefinitionOnly, + ) + + // Qt 5 QWebEngine + generate( + "qt/webengine", + []string{ + "/usr/include/x86_64-linux-gnu/qt5/QtWebEngine", + "/usr/include/x86_64-linux-gnu/qt5/QtWebEngineCore", + "/usr/include/x86_64-linux-gnu/qt5/QtWebEngineWidgets", + }, + + func(fullpath string) bool { + baseName := filepath.Base(fullpath) + if baseName == "qquickwebengineprofile.h" || baseName == "qquickwebenginescript.h" { + return false + } + return true + }, + clangBin, + pkgConfigCflags("Qt5WebEngineWidgets"), + outDir, + ClangMatchSameHeaderDefinitionOnly, + ) + // Depends on QtCore/Gui/Widgets, QPrintSupport generate( "qt-restricted-extras/qscintilla", @@ -269,6 +304,40 @@ func ProcessLibraries(clangBin, outDir, extraLibsDir string) { ClangMatchSameHeaderDefinitionOnly, ) + // Qt 6 QWebChannel + generate( + "qt6/webchannel", + []string{ + "/usr/include/x86_64-linux-gnu/qt6/QtWebChannel", + }, + AllowAllHeaders, + clangBin, + "--std=c++17 "+pkgConfigCflags("Qt6WebChannel"), + outDir, + ClangMatchSameHeaderDefinitionOnly, + ) + + // Qt 6 QWebEngine + generate( + "qt6/webengine", + []string{ + "/usr/include/x86_64-linux-gnu/qt6/QtWebEngineCore", + "/usr/include/x86_64-linux-gnu/qt6/QtWebEngineWidgets", + }, + func(fullpath string) bool { + baseName := filepath.Base(fullpath) + if baseName == "qtwebenginewidgets-config.h" { + return false + } + return true + }, + clangBin, + "--std=c++17 "+pkgConfigCflags("Qt6WebEngineWidgets"), + outDir, + ClangMatchSameHeaderDefinitionOnly, + ) + + // Qt 6 QScintilla // Depends on QtCore/Gui/Widgets, QPrintSupport generate( "qt-restricted-extras/qscintilla6", diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index 14ba3532..e718edcb 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -300,7 +300,8 @@ func emitCABI2CppForwarding(p CppParameter, indent string) (preamble string, for p.GetQtCppType().ParameterType == "qintptr" || p.GetQtCppType().ParameterType == "qsizetype" || // Qt 6 qversionnumber.h: invalid ‘static_cast’ from type ‘ptrdiff_t*’ {aka ‘long int*’} to type ‘qsizetype*’ {aka ‘long long int*’} p.ParameterType == "qint8" || - (p.IsFlagType() && p.ByRef) { + (p.IsFlagType() && p.ByRef) || + (p.IsKnownEnum() && p.ByRef) { // QDataStream::operator>>() by reference (qint64) // QLockFile::getLockInfo() by pointer // QTextStream::operator>>() by reference (qlonglong + qulonglong) diff --git a/cmd/genbindings/emitgo.go b/cmd/genbindings/emitgo.go index 0c835ae5..b7e14801 100644 --- a/cmd/genbindings/emitgo.go +++ b/cmd/genbindings/emitgo.go @@ -688,6 +688,10 @@ import "C" preventShortNames[e.EnumName] = struct{}{} continue nextEnum } + if _, ok := KnownEnums[shortEnumName+"::"+ee.EntryName]; ok { + preventShortNames[e.EnumName] = struct{}{} + continue nextEnum + } } } diff --git a/docker/genbindings.Dockerfile b/docker/genbindings.Dockerfile index 116caa4f..36ea65d9 100644 --- a/docker/genbindings.Dockerfile +++ b/docker/genbindings.Dockerfile @@ -8,9 +8,11 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ qtscript5-dev \ libqt5svg5-dev \ libqt5webkit5-dev \ + qtwebengine5-dev \ qt6-base-dev \ qt6-multimedia-dev \ qt6-svg-dev \ + qt6-webengine-dev \ libqscintilla2-qt5-dev \ libqscintilla2-qt6-dev \ clang \ diff --git a/examples/libraries/qt-webengine/main.go b/examples/libraries/qt-webengine/main.go new file mode 100644 index 00000000..75057ed4 --- /dev/null +++ b/examples/libraries/qt-webengine/main.go @@ -0,0 +1,19 @@ +package main + +import ( + "os" + + "github.com/mappu/miqt/qt" + "github.com/mappu/miqt/qt/webengine" +) + +func main() { + + qt.NewQApplication(os.Args) + + w := webengine.NewQWebEngineView2() + w.Load(qt.NewQUrl3("https://www.github.com/mappu/miqt")) + w.Show() + + qt.QApplication_Exec() +} diff --git a/examples/libraries/qt-webengine/screenshot.png b/examples/libraries/qt-webengine/screenshot.png new file mode 100644 index 00000000..0ba4cb68 Binary files /dev/null and b/examples/libraries/qt-webengine/screenshot.png differ diff --git a/examples/libraries/qt6-webengine/main.go b/examples/libraries/qt6-webengine/main.go new file mode 100644 index 00000000..4193829e --- /dev/null +++ b/examples/libraries/qt6-webengine/main.go @@ -0,0 +1,19 @@ +package main + +import ( + "os" + + qt "github.com/mappu/miqt/qt6" + "github.com/mappu/miqt/qt6/webengine" +) + +func main() { + + qt.NewQApplication(os.Args) + + w := webengine.NewQWebEngineView2() + w.Load(qt.NewQUrl3("https://www.github.com/mappu/miqt")) + w.Show() + + qt.QApplication_Exec() +} diff --git a/examples/libraries/qt6-webengine/screenshot.png b/examples/libraries/qt6-webengine/screenshot.png new file mode 100644 index 00000000..7ded6d39 Binary files /dev/null and b/examples/libraries/qt6-webengine/screenshot.png differ diff --git a/qt/webchannel/cflags.go b/qt/webchannel/cflags.go new file mode 100644 index 00000000..09e7f050 --- /dev/null +++ b/qt/webchannel/cflags.go @@ -0,0 +1,6 @@ +package webchannel + +/* +#cgo pkg-config: Qt5WebChannel +*/ +import "C" diff --git a/qt/webchannel/gen_qqmlwebchannel.cpp b/qt/webchannel/gen_qqmlwebchannel.cpp new file mode 100644 index 00000000..90ef72fc --- /dev/null +++ b/qt/webchannel/gen_qqmlwebchannel.cpp @@ -0,0 +1,128 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qqmlwebchannel.h" +#include "_cgo_export.h" + +void QQmlWebChannel_new(QQmlWebChannel** outptr_QQmlWebChannel, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject) { + QQmlWebChannel* ret = new QQmlWebChannel(); + *outptr_QQmlWebChannel = ret; + *outptr_QWebChannel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QQmlWebChannel_new2(QObject* parent, QQmlWebChannel** outptr_QQmlWebChannel, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject) { + QQmlWebChannel* ret = new QQmlWebChannel(parent); + *outptr_QQmlWebChannel = ret; + *outptr_QWebChannel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QQmlWebChannel_MetaObject(const QQmlWebChannel* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QQmlWebChannel_Metacast(QQmlWebChannel* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QQmlWebChannel_Tr(const char* s) { + QString _ret = QQmlWebChannel::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QQmlWebChannel_TrUtf8(const char* s) { + QString _ret = QQmlWebChannel::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QQmlWebChannel_RegisterObjects(QQmlWebChannel* self, struct miqt_map /* of struct miqt_string to QVariant* */ objects) { + QVariantMap objects_QMap; + struct miqt_string* objects_karr = static_cast(objects.keys); + QVariant** objects_varr = static_cast(objects.values); + for(size_t i = 0; i < objects.len; ++i) { + QString objects_karr_i_QString = QString::fromUtf8(objects_karr[i].data, objects_karr[i].len); + objects_QMap[objects_karr_i_QString] = *(objects_varr[i]); + } + self->registerObjects(objects_QMap); +} + +void QQmlWebChannel_ConnectTo(QQmlWebChannel* self, QObject* transport) { + self->connectTo(transport); +} + +void QQmlWebChannel_DisconnectFrom(QQmlWebChannel* self, QObject* transport) { + self->disconnectFrom(transport); +} + +struct miqt_string QQmlWebChannel_Tr2(const char* s, const char* c) { + QString _ret = QQmlWebChannel::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QQmlWebChannel_Tr3(const char* s, const char* c, int n) { + QString _ret = QQmlWebChannel::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QQmlWebChannel_TrUtf82(const char* s, const char* c) { + QString _ret = QQmlWebChannel::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QQmlWebChannel_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QQmlWebChannel::trUtf8(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QQmlWebChannel_Delete(QQmlWebChannel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webchannel/gen_qqmlwebchannel.go b/qt/webchannel/gen_qqmlwebchannel.go new file mode 100644 index 00000000..7a7ad40e --- /dev/null +++ b/qt/webchannel/gen_qqmlwebchannel.go @@ -0,0 +1,195 @@ +package webchannel + +/* + +#include "gen_qqmlwebchannel.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "unsafe" +) + +type QQmlWebChannel struct { + h *C.QQmlWebChannel + isSubclass bool + *QWebChannel +} + +func (this *QQmlWebChannel) cPointer() *C.QQmlWebChannel { + if this == nil { + return nil + } + return this.h +} + +func (this *QQmlWebChannel) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQQmlWebChannel constructs the type using only CGO pointers. +func newQQmlWebChannel(h *C.QQmlWebChannel, h_QWebChannel *C.QWebChannel, h_QObject *C.QObject) *QQmlWebChannel { + if h == nil { + return nil + } + return &QQmlWebChannel{h: h, + QWebChannel: newQWebChannel(h_QWebChannel, h_QObject)} +} + +// UnsafeNewQQmlWebChannel constructs the type using only unsafe pointers. +func UnsafeNewQQmlWebChannel(h unsafe.Pointer, h_QWebChannel unsafe.Pointer, h_QObject unsafe.Pointer) *QQmlWebChannel { + if h == nil { + return nil + } + + return &QQmlWebChannel{h: (*C.QQmlWebChannel)(h), + QWebChannel: UnsafeNewQWebChannel(h_QWebChannel, h_QObject)} +} + +// NewQQmlWebChannel constructs a new QQmlWebChannel object. +func NewQQmlWebChannel() *QQmlWebChannel { + var outptr_QQmlWebChannel *C.QQmlWebChannel = nil + var outptr_QWebChannel *C.QWebChannel = nil + var outptr_QObject *C.QObject = nil + + C.QQmlWebChannel_new(&outptr_QQmlWebChannel, &outptr_QWebChannel, &outptr_QObject) + ret := newQQmlWebChannel(outptr_QQmlWebChannel, outptr_QWebChannel, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQQmlWebChannel2 constructs a new QQmlWebChannel object. +func NewQQmlWebChannel2(parent *qt.QObject) *QQmlWebChannel { + var outptr_QQmlWebChannel *C.QQmlWebChannel = nil + var outptr_QWebChannel *C.QWebChannel = nil + var outptr_QObject *C.QObject = nil + + C.QQmlWebChannel_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QQmlWebChannel, &outptr_QWebChannel, &outptr_QObject) + ret := newQQmlWebChannel(outptr_QQmlWebChannel, outptr_QWebChannel, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QQmlWebChannel) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QQmlWebChannel_MetaObject(this.h))) +} + +func (this *QQmlWebChannel) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QQmlWebChannel_Metacast(this.h, param1_Cstring)) +} + +func QQmlWebChannel_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QQmlWebChannel_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QQmlWebChannel_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QQmlWebChannel_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QQmlWebChannel) RegisterObjects(objects map[string]qt.QVariant) { + objects_Keys_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(objects)))) + defer C.free(unsafe.Pointer(objects_Keys_CArray)) + objects_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(objects)))) + defer C.free(unsafe.Pointer(objects_Values_CArray)) + objects_ctr := 0 + for objects_k, objects_v := range objects { + objects_k_ms := C.struct_miqt_string{} + objects_k_ms.data = C.CString(objects_k) + objects_k_ms.len = C.size_t(len(objects_k)) + defer C.free(unsafe.Pointer(objects_k_ms.data)) + objects_Keys_CArray[objects_ctr] = objects_k_ms + objects_Values_CArray[objects_ctr] = (*C.QVariant)(objects_v.UnsafePointer()) + objects_ctr++ + } + objects_mm := C.struct_miqt_map{ + len: C.size_t(len(objects)), + keys: unsafe.Pointer(objects_Keys_CArray), + values: unsafe.Pointer(objects_Values_CArray), + } + C.QQmlWebChannel_RegisterObjects(this.h, objects_mm) +} + +func (this *QQmlWebChannel) ConnectTo(transport *qt.QObject) { + C.QQmlWebChannel_ConnectTo(this.h, (*C.QObject)(transport.UnsafePointer())) +} + +func (this *QQmlWebChannel) DisconnectFrom(transport *qt.QObject) { + C.QQmlWebChannel_DisconnectFrom(this.h, (*C.QObject)(transport.UnsafePointer())) +} + +func QQmlWebChannel_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QQmlWebChannel_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QQmlWebChannel_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QQmlWebChannel_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QQmlWebChannel_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QQmlWebChannel_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QQmlWebChannel_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QQmlWebChannel_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// Delete this object from C++ memory. +func (this *QQmlWebChannel) Delete() { + C.QQmlWebChannel_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QQmlWebChannel) GoGC() { + runtime.SetFinalizer(this, func(this *QQmlWebChannel) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webchannel/gen_qqmlwebchannel.h b/qt/webchannel/gen_qqmlwebchannel.h new file mode 100644 index 00000000..2d870448 --- /dev/null +++ b/qt/webchannel/gen_qqmlwebchannel.h @@ -0,0 +1,50 @@ +#pragma once +#ifndef MIQT_QT_WEBCHANNEL_GEN_QQMLWEBCHANNEL_H +#define MIQT_QT_WEBCHANNEL_GEN_QQMLWEBCHANNEL_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QMetaObject; +class QObject; +class QQmlWebChannel; +class QVariant; +class QWebChannel; +#else +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QQmlWebChannel QQmlWebChannel; +typedef struct QVariant QVariant; +typedef struct QWebChannel QWebChannel; +#endif + +void QQmlWebChannel_new(QQmlWebChannel** outptr_QQmlWebChannel, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject); +void QQmlWebChannel_new2(QObject* parent, QQmlWebChannel** outptr_QQmlWebChannel, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject); +QMetaObject* QQmlWebChannel_MetaObject(const QQmlWebChannel* self); +void* QQmlWebChannel_Metacast(QQmlWebChannel* self, const char* param1); +struct miqt_string QQmlWebChannel_Tr(const char* s); +struct miqt_string QQmlWebChannel_TrUtf8(const char* s); +void QQmlWebChannel_RegisterObjects(QQmlWebChannel* self, struct miqt_map /* of struct miqt_string to QVariant* */ objects); +void QQmlWebChannel_ConnectTo(QQmlWebChannel* self, QObject* transport); +void QQmlWebChannel_DisconnectFrom(QQmlWebChannel* self, QObject* transport); +struct miqt_string QQmlWebChannel_Tr2(const char* s, const char* c); +struct miqt_string QQmlWebChannel_Tr3(const char* s, const char* c, int n); +struct miqt_string QQmlWebChannel_TrUtf82(const char* s, const char* c); +struct miqt_string QQmlWebChannel_TrUtf83(const char* s, const char* c, int n); +void QQmlWebChannel_Delete(QQmlWebChannel* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webchannel/gen_qwebchannel.cpp b/qt/webchannel/gen_qwebchannel.cpp new file mode 100644 index 00000000..24593a69 --- /dev/null +++ b/qt/webchannel/gen_qwebchannel.cpp @@ -0,0 +1,420 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebchannel.h" +#include "_cgo_export.h" + +class MiqtVirtualQWebChannel : public virtual QWebChannel { +public: + + MiqtVirtualQWebChannel(): QWebChannel() {}; + MiqtVirtualQWebChannel(QObject* parent): QWebChannel(parent) {}; + + virtual ~MiqtVirtualQWebChannel() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QWebChannel::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QWebChannel_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QWebChannel::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QWebChannel::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QWebChannel_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QWebChannel::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QWebChannel::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QWebChannel_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QWebChannel::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QWebChannel::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QWebChannel_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QWebChannel::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QWebChannel::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebChannel_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QWebChannel::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QWebChannel::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebChannel_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QWebChannel::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QWebChannel::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebChannel_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QWebChannel::disconnectNotify(*signal); + + } + +}; + +void QWebChannel_new(QWebChannel** outptr_QWebChannel, QObject** outptr_QObject) { + MiqtVirtualQWebChannel* ret = new MiqtVirtualQWebChannel(); + *outptr_QWebChannel = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebChannel_new2(QObject* parent, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject) { + MiqtVirtualQWebChannel* ret = new MiqtVirtualQWebChannel(parent); + *outptr_QWebChannel = ret; + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QWebChannel_MetaObject(const QWebChannel* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebChannel_Metacast(QWebChannel* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebChannel_Tr(const char* s) { + QString _ret = QWebChannel::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebChannel_TrUtf8(const char* s) { + QString _ret = QWebChannel::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebChannel_RegisterObjects(QWebChannel* self, struct miqt_map /* of struct miqt_string to QObject* */ objects) { + QHash objects_QMap; + objects_QMap.reserve(objects.len); + struct miqt_string* objects_karr = static_cast(objects.keys); + QObject** objects_varr = static_cast(objects.values); + for(size_t i = 0; i < objects.len; ++i) { + QString objects_karr_i_QString = QString::fromUtf8(objects_karr[i].data, objects_karr[i].len); + objects_QMap[objects_karr_i_QString] = objects_varr[i]; + } + self->registerObjects(objects_QMap); +} + +struct miqt_map /* of struct miqt_string to QObject* */ QWebChannel_RegisteredObjects(const QWebChannel* self) { + QHash _ret = self->registeredObjects(); + // Convert QMap<> from C++ memory to manually-managed C memory + struct miqt_string* _karr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + QObject** _varr = static_cast(malloc(sizeof(QObject*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + QString _hashkey_ret = _itr->first; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _hashkey_b = _hashkey_ret.toUtf8(); + struct miqt_string _hashkey_ms; + _hashkey_ms.len = _hashkey_b.length(); + _hashkey_ms.data = static_cast(malloc(_hashkey_ms.len)); + memcpy(_hashkey_ms.data, _hashkey_b.data(), _hashkey_ms.len); + _karr[_ctr] = _hashkey_ms; + _varr[_ctr] = _itr->second; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; +} + +void QWebChannel_RegisterObject(QWebChannel* self, struct miqt_string id, QObject* object) { + QString id_QString = QString::fromUtf8(id.data, id.len); + self->registerObject(id_QString, object); +} + +void QWebChannel_DeregisterObject(QWebChannel* self, QObject* object) { + self->deregisterObject(object); +} + +bool QWebChannel_BlockUpdates(const QWebChannel* self) { + return self->blockUpdates(); +} + +void QWebChannel_SetBlockUpdates(QWebChannel* self, bool block) { + self->setBlockUpdates(block); +} + +void QWebChannel_BlockUpdatesChanged(QWebChannel* self, bool block) { + self->blockUpdatesChanged(block); +} + +void QWebChannel_connect_BlockUpdatesChanged(QWebChannel* self, intptr_t slot) { + MiqtVirtualQWebChannel::connect(self, static_cast(&QWebChannel::blockUpdatesChanged), self, [=](bool block) { + bool sigval1 = block; + miqt_exec_callback_QWebChannel_BlockUpdatesChanged(slot, sigval1); + }); +} + +void QWebChannel_ConnectTo(QWebChannel* self, QWebChannelAbstractTransport* transport) { + self->connectTo(transport); +} + +void QWebChannel_DisconnectFrom(QWebChannel* self, QWebChannelAbstractTransport* transport) { + self->disconnectFrom(transport); +} + +struct miqt_string QWebChannel_Tr2(const char* s, const char* c) { + QString _ret = QWebChannel::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebChannel_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebChannel::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebChannel_TrUtf82(const char* s, const char* c) { + QString _ret = QWebChannel::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebChannel_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebChannel::trUtf8(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebChannel_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWebChannel*)(self) )->handle__Event = slot; +} + +bool QWebChannel_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQWebChannel*)(self) )->virtualbase_Event(event); +} + +void QWebChannel_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWebChannel*)(self) )->handle__EventFilter = slot; +} + +bool QWebChannel_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQWebChannel*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QWebChannel_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebChannel*)(self) )->handle__TimerEvent = slot; +} + +void QWebChannel_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQWebChannel*)(self) )->virtualbase_TimerEvent(event); +} + +void QWebChannel_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebChannel*)(self) )->handle__ChildEvent = slot; +} + +void QWebChannel_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQWebChannel*)(self) )->virtualbase_ChildEvent(event); +} + +void QWebChannel_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebChannel*)(self) )->handle__CustomEvent = slot; +} + +void QWebChannel_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebChannel*)(self) )->virtualbase_CustomEvent(event); +} + +void QWebChannel_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebChannel*)(self) )->handle__ConnectNotify = slot; +} + +void QWebChannel_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebChannel*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QWebChannel_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebChannel*)(self) )->handle__DisconnectNotify = slot; +} + +void QWebChannel_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebChannel*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QWebChannel_Delete(QWebChannel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webchannel/gen_qwebchannel.go b/qt/webchannel/gen_qwebchannel.go new file mode 100644 index 00000000..c7634531 --- /dev/null +++ b/qt/webchannel/gen_qwebchannel.go @@ -0,0 +1,416 @@ +package webchannel + +/* + +#include "gen_qwebchannel.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebChannel struct { + h *C.QWebChannel + isSubclass bool + *qt.QObject +} + +func (this *QWebChannel) cPointer() *C.QWebChannel { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebChannel) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebChannel constructs the type using only CGO pointers. +func newQWebChannel(h *C.QWebChannel, h_QObject *C.QObject) *QWebChannel { + if h == nil { + return nil + } + return &QWebChannel{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebChannel constructs the type using only unsafe pointers. +func UnsafeNewQWebChannel(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebChannel { + if h == nil { + return nil + } + + return &QWebChannel{h: (*C.QWebChannel)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +// NewQWebChannel constructs a new QWebChannel object. +func NewQWebChannel() *QWebChannel { + var outptr_QWebChannel *C.QWebChannel = nil + var outptr_QObject *C.QObject = nil + + C.QWebChannel_new(&outptr_QWebChannel, &outptr_QObject) + ret := newQWebChannel(outptr_QWebChannel, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebChannel2 constructs a new QWebChannel object. +func NewQWebChannel2(parent *qt.QObject) *QWebChannel { + var outptr_QWebChannel *C.QWebChannel = nil + var outptr_QObject *C.QObject = nil + + C.QWebChannel_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QWebChannel, &outptr_QObject) + ret := newQWebChannel(outptr_QWebChannel, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QWebChannel) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebChannel_MetaObject(this.h))) +} + +func (this *QWebChannel) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebChannel_Metacast(this.h, param1_Cstring)) +} + +func QWebChannel_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebChannel_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebChannel_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebChannel_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebChannel) RegisterObjects(objects map[string]*qt.QObject) { + objects_Keys_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(objects)))) + defer C.free(unsafe.Pointer(objects_Keys_CArray)) + objects_Values_CArray := (*[0xffff]*C.QObject)(C.malloc(C.size_t(8 * len(objects)))) + defer C.free(unsafe.Pointer(objects_Values_CArray)) + objects_ctr := 0 + for objects_k, objects_v := range objects { + objects_k_ms := C.struct_miqt_string{} + objects_k_ms.data = C.CString(objects_k) + objects_k_ms.len = C.size_t(len(objects_k)) + defer C.free(unsafe.Pointer(objects_k_ms.data)) + objects_Keys_CArray[objects_ctr] = objects_k_ms + objects_Values_CArray[objects_ctr] = (*C.QObject)(objects_v.UnsafePointer()) + objects_ctr++ + } + objects_mm := C.struct_miqt_map{ + len: C.size_t(len(objects)), + keys: unsafe.Pointer(objects_Keys_CArray), + values: unsafe.Pointer(objects_Values_CArray), + } + C.QWebChannel_RegisterObjects(this.h, objects_mm) +} + +func (this *QWebChannel) RegisteredObjects() map[string]*qt.QObject { + var _mm C.struct_miqt_map = C.QWebChannel_RegisteredObjects(this.h) + _ret := make(map[string]*qt.QObject, int(_mm.len)) + _Keys := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QObject)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + var _hashkey_ms C.struct_miqt_string = _Keys[i] + _hashkey_ret := C.GoStringN(_hashkey_ms.data, C.int(int64(_hashkey_ms.len))) + C.free(unsafe.Pointer(_hashkey_ms.data)) + _entry_Key := _hashkey_ret + _entry_Value := qt.UnsafeNewQObject(unsafe.Pointer(_Values[i])) + _ret[_entry_Key] = _entry_Value + } + return _ret +} + +func (this *QWebChannel) RegisterObject(id string, object *qt.QObject) { + id_ms := C.struct_miqt_string{} + id_ms.data = C.CString(id) + id_ms.len = C.size_t(len(id)) + defer C.free(unsafe.Pointer(id_ms.data)) + C.QWebChannel_RegisterObject(this.h, id_ms, (*C.QObject)(object.UnsafePointer())) +} + +func (this *QWebChannel) DeregisterObject(object *qt.QObject) { + C.QWebChannel_DeregisterObject(this.h, (*C.QObject)(object.UnsafePointer())) +} + +func (this *QWebChannel) BlockUpdates() bool { + return (bool)(C.QWebChannel_BlockUpdates(this.h)) +} + +func (this *QWebChannel) SetBlockUpdates(block bool) { + C.QWebChannel_SetBlockUpdates(this.h, (C.bool)(block)) +} + +func (this *QWebChannel) BlockUpdatesChanged(block bool) { + C.QWebChannel_BlockUpdatesChanged(this.h, (C.bool)(block)) +} +func (this *QWebChannel) OnBlockUpdatesChanged(slot func(block bool)) { + C.QWebChannel_connect_BlockUpdatesChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannel_BlockUpdatesChanged +func miqt_exec_callback_QWebChannel_BlockUpdatesChanged(cb C.intptr_t, block C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(block bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(block) + + gofunc(slotval1) +} + +func (this *QWebChannel) ConnectTo(transport *QWebChannelAbstractTransport) { + C.QWebChannel_ConnectTo(this.h, transport.cPointer()) +} + +func (this *QWebChannel) DisconnectFrom(transport *QWebChannelAbstractTransport) { + C.QWebChannel_DisconnectFrom(this.h, transport.cPointer()) +} + +func QWebChannel_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebChannel_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebChannel_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebChannel_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebChannel_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebChannel_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebChannel_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebChannel_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebChannel) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QWebChannel_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebChannel) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QWebChannel_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannel_Event +func miqt_exec_callback_QWebChannel_Event(self *C.QWebChannel, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebChannel{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebChannel) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QWebChannel_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebChannel) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QWebChannel_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannel_EventFilter +func miqt_exec_callback_QWebChannel_EventFilter(self *C.QWebChannel, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebChannel{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebChannel) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QWebChannel_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QWebChannel) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QWebChannel_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannel_TimerEvent +func miqt_exec_callback_QWebChannel_TimerEvent(self *C.QWebChannel, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebChannel{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QWebChannel) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QWebChannel_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QWebChannel) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QWebChannel_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannel_ChildEvent +func miqt_exec_callback_QWebChannel_ChildEvent(self *C.QWebChannel, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebChannel{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QWebChannel) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QWebChannel_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebChannel) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QWebChannel_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannel_CustomEvent +func miqt_exec_callback_QWebChannel_CustomEvent(self *C.QWebChannel, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWebChannel{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QWebChannel) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QWebChannel_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebChannel) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QWebChannel_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannel_ConnectNotify +func miqt_exec_callback_QWebChannel_ConnectNotify(self *C.QWebChannel, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebChannel{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QWebChannel) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QWebChannel_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebChannel) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QWebChannel_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannel_DisconnectNotify +func miqt_exec_callback_QWebChannel_DisconnectNotify(self *C.QWebChannel, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebChannel{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QWebChannel) Delete() { + C.QWebChannel_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebChannel) GoGC() { + runtime.SetFinalizer(this, func(this *QWebChannel) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webchannel/gen_qwebchannel.h b/qt/webchannel/gen_qwebchannel.h new file mode 100644 index 00000000..73d012d8 --- /dev/null +++ b/qt/webchannel/gen_qwebchannel.h @@ -0,0 +1,77 @@ +#pragma once +#ifndef MIQT_QT_WEBCHANNEL_GEN_QWEBCHANNEL_H +#define MIQT_QT_WEBCHANNEL_GEN_QWEBCHANNEL_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; +class QMetaObject; +class QObject; +class QTimerEvent; +class QWebChannel; +class QWebChannelAbstractTransport; +#else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; +typedef struct QWebChannel QWebChannel; +typedef struct QWebChannelAbstractTransport QWebChannelAbstractTransport; +#endif + +void QWebChannel_new(QWebChannel** outptr_QWebChannel, QObject** outptr_QObject); +void QWebChannel_new2(QObject* parent, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject); +QMetaObject* QWebChannel_MetaObject(const QWebChannel* self); +void* QWebChannel_Metacast(QWebChannel* self, const char* param1); +struct miqt_string QWebChannel_Tr(const char* s); +struct miqt_string QWebChannel_TrUtf8(const char* s); +void QWebChannel_RegisterObjects(QWebChannel* self, struct miqt_map /* of struct miqt_string to QObject* */ objects); +struct miqt_map /* of struct miqt_string to QObject* */ QWebChannel_RegisteredObjects(const QWebChannel* self); +void QWebChannel_RegisterObject(QWebChannel* self, struct miqt_string id, QObject* object); +void QWebChannel_DeregisterObject(QWebChannel* self, QObject* object); +bool QWebChannel_BlockUpdates(const QWebChannel* self); +void QWebChannel_SetBlockUpdates(QWebChannel* self, bool block); +void QWebChannel_BlockUpdatesChanged(QWebChannel* self, bool block); +void QWebChannel_connect_BlockUpdatesChanged(QWebChannel* self, intptr_t slot); +void QWebChannel_ConnectTo(QWebChannel* self, QWebChannelAbstractTransport* transport); +void QWebChannel_DisconnectFrom(QWebChannel* self, QWebChannelAbstractTransport* transport); +struct miqt_string QWebChannel_Tr2(const char* s, const char* c); +struct miqt_string QWebChannel_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebChannel_TrUtf82(const char* s, const char* c); +struct miqt_string QWebChannel_TrUtf83(const char* s, const char* c, int n); +void QWebChannel_override_virtual_Event(void* self, intptr_t slot); +bool QWebChannel_virtualbase_Event(void* self, QEvent* event); +void QWebChannel_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWebChannel_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QWebChannel_override_virtual_TimerEvent(void* self, intptr_t slot); +void QWebChannel_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QWebChannel_override_virtual_ChildEvent(void* self, intptr_t slot); +void QWebChannel_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QWebChannel_override_virtual_CustomEvent(void* self, intptr_t slot); +void QWebChannel_virtualbase_CustomEvent(void* self, QEvent* event); +void QWebChannel_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QWebChannel_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QWebChannel_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QWebChannel_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QWebChannel_Delete(QWebChannel* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webchannel/gen_qwebchannelabstracttransport.cpp b/qt/webchannel/gen_qwebchannelabstracttransport.cpp new file mode 100644 index 00000000..0172ceb4 --- /dev/null +++ b/qt/webchannel/gen_qwebchannelabstracttransport.cpp @@ -0,0 +1,386 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebchannelabstracttransport.h" +#include "_cgo_export.h" + +class MiqtVirtualQWebChannelAbstractTransport : public virtual QWebChannelAbstractTransport { +public: + + MiqtVirtualQWebChannelAbstractTransport(): QWebChannelAbstractTransport() {}; + MiqtVirtualQWebChannelAbstractTransport(QObject* parent): QWebChannelAbstractTransport(parent) {}; + + virtual ~MiqtVirtualQWebChannelAbstractTransport() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SendMessage = 0; + + // Subclass to allow providing a Go implementation + virtual void sendMessage(const QJsonObject& message) override { + if (handle__SendMessage == 0) { + return; // Pure virtual, there is no base we can call + } + + const QJsonObject& message_ret = message; + // Cast returned reference into pointer + QJsonObject* sigval1 = const_cast(&message_ret); + + miqt_exec_callback_QWebChannelAbstractTransport_SendMessage(this, handle__SendMessage, sigval1); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QWebChannelAbstractTransport::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QWebChannelAbstractTransport_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QWebChannelAbstractTransport::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QWebChannelAbstractTransport::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QWebChannelAbstractTransport_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QWebChannelAbstractTransport::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QWebChannelAbstractTransport::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QWebChannelAbstractTransport_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QWebChannelAbstractTransport::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QWebChannelAbstractTransport::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QWebChannelAbstractTransport_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QWebChannelAbstractTransport::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QWebChannelAbstractTransport::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebChannelAbstractTransport_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QWebChannelAbstractTransport::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QWebChannelAbstractTransport::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebChannelAbstractTransport_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QWebChannelAbstractTransport::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QWebChannelAbstractTransport::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebChannelAbstractTransport_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QWebChannelAbstractTransport::disconnectNotify(*signal); + + } + +}; + +void QWebChannelAbstractTransport_new(QWebChannelAbstractTransport** outptr_QWebChannelAbstractTransport, QObject** outptr_QObject) { + MiqtVirtualQWebChannelAbstractTransport* ret = new MiqtVirtualQWebChannelAbstractTransport(); + *outptr_QWebChannelAbstractTransport = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebChannelAbstractTransport_new2(QObject* parent, QWebChannelAbstractTransport** outptr_QWebChannelAbstractTransport, QObject** outptr_QObject) { + MiqtVirtualQWebChannelAbstractTransport* ret = new MiqtVirtualQWebChannelAbstractTransport(parent); + *outptr_QWebChannelAbstractTransport = ret; + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QWebChannelAbstractTransport_MetaObject(const QWebChannelAbstractTransport* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebChannelAbstractTransport_Metacast(QWebChannelAbstractTransport* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebChannelAbstractTransport_Tr(const char* s) { + QString _ret = QWebChannelAbstractTransport::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebChannelAbstractTransport_TrUtf8(const char* s) { + QString _ret = QWebChannelAbstractTransport::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebChannelAbstractTransport_SendMessage(QWebChannelAbstractTransport* self, QJsonObject* message) { + self->sendMessage(*message); +} + +void QWebChannelAbstractTransport_MessageReceived(QWebChannelAbstractTransport* self, QJsonObject* message, QWebChannelAbstractTransport* transport) { + self->messageReceived(*message, transport); +} + +void QWebChannelAbstractTransport_connect_MessageReceived(QWebChannelAbstractTransport* self, intptr_t slot) { + MiqtVirtualQWebChannelAbstractTransport::connect(self, static_cast(&QWebChannelAbstractTransport::messageReceived), self, [=](const QJsonObject& message, QWebChannelAbstractTransport* transport) { + const QJsonObject& message_ret = message; + // Cast returned reference into pointer + QJsonObject* sigval1 = const_cast(&message_ret); + QWebChannelAbstractTransport* sigval2 = transport; + miqt_exec_callback_QWebChannelAbstractTransport_MessageReceived(slot, sigval1, sigval2); + }); +} + +struct miqt_string QWebChannelAbstractTransport_Tr2(const char* s, const char* c) { + QString _ret = QWebChannelAbstractTransport::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebChannelAbstractTransport_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebChannelAbstractTransport::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebChannelAbstractTransport_TrUtf82(const char* s, const char* c) { + QString _ret = QWebChannelAbstractTransport::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebChannelAbstractTransport_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebChannelAbstractTransport::trUtf8(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebChannelAbstractTransport_override_virtual_SendMessage(void* self, intptr_t slot) { + dynamic_cast( (QWebChannelAbstractTransport*)(self) )->handle__SendMessage = slot; +} + +void QWebChannelAbstractTransport_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWebChannelAbstractTransport*)(self) )->handle__Event = slot; +} + +bool QWebChannelAbstractTransport_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQWebChannelAbstractTransport*)(self) )->virtualbase_Event(event); +} + +void QWebChannelAbstractTransport_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWebChannelAbstractTransport*)(self) )->handle__EventFilter = slot; +} + +bool QWebChannelAbstractTransport_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQWebChannelAbstractTransport*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QWebChannelAbstractTransport_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebChannelAbstractTransport*)(self) )->handle__TimerEvent = slot; +} + +void QWebChannelAbstractTransport_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQWebChannelAbstractTransport*)(self) )->virtualbase_TimerEvent(event); +} + +void QWebChannelAbstractTransport_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebChannelAbstractTransport*)(self) )->handle__ChildEvent = slot; +} + +void QWebChannelAbstractTransport_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQWebChannelAbstractTransport*)(self) )->virtualbase_ChildEvent(event); +} + +void QWebChannelAbstractTransport_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebChannelAbstractTransport*)(self) )->handle__CustomEvent = slot; +} + +void QWebChannelAbstractTransport_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebChannelAbstractTransport*)(self) )->virtualbase_CustomEvent(event); +} + +void QWebChannelAbstractTransport_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebChannelAbstractTransport*)(self) )->handle__ConnectNotify = slot; +} + +void QWebChannelAbstractTransport_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebChannelAbstractTransport*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QWebChannelAbstractTransport_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebChannelAbstractTransport*)(self) )->handle__DisconnectNotify = slot; +} + +void QWebChannelAbstractTransport_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebChannelAbstractTransport*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QWebChannelAbstractTransport_Delete(QWebChannelAbstractTransport* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webchannel/gen_qwebchannelabstracttransport.go b/qt/webchannel/gen_qwebchannelabstracttransport.go new file mode 100644 index 00000000..d31ba426 --- /dev/null +++ b/qt/webchannel/gen_qwebchannelabstracttransport.go @@ -0,0 +1,371 @@ +package webchannel + +/* + +#include "gen_qwebchannelabstracttransport.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebChannelAbstractTransport struct { + h *C.QWebChannelAbstractTransport + isSubclass bool + *qt.QObject +} + +func (this *QWebChannelAbstractTransport) cPointer() *C.QWebChannelAbstractTransport { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebChannelAbstractTransport) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebChannelAbstractTransport constructs the type using only CGO pointers. +func newQWebChannelAbstractTransport(h *C.QWebChannelAbstractTransport, h_QObject *C.QObject) *QWebChannelAbstractTransport { + if h == nil { + return nil + } + return &QWebChannelAbstractTransport{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebChannelAbstractTransport constructs the type using only unsafe pointers. +func UnsafeNewQWebChannelAbstractTransport(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebChannelAbstractTransport { + if h == nil { + return nil + } + + return &QWebChannelAbstractTransport{h: (*C.QWebChannelAbstractTransport)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +// NewQWebChannelAbstractTransport constructs a new QWebChannelAbstractTransport object. +func NewQWebChannelAbstractTransport() *QWebChannelAbstractTransport { + var outptr_QWebChannelAbstractTransport *C.QWebChannelAbstractTransport = nil + var outptr_QObject *C.QObject = nil + + C.QWebChannelAbstractTransport_new(&outptr_QWebChannelAbstractTransport, &outptr_QObject) + ret := newQWebChannelAbstractTransport(outptr_QWebChannelAbstractTransport, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebChannelAbstractTransport2 constructs a new QWebChannelAbstractTransport object. +func NewQWebChannelAbstractTransport2(parent *qt.QObject) *QWebChannelAbstractTransport { + var outptr_QWebChannelAbstractTransport *C.QWebChannelAbstractTransport = nil + var outptr_QObject *C.QObject = nil + + C.QWebChannelAbstractTransport_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QWebChannelAbstractTransport, &outptr_QObject) + ret := newQWebChannelAbstractTransport(outptr_QWebChannelAbstractTransport, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QWebChannelAbstractTransport) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebChannelAbstractTransport_MetaObject(this.h))) +} + +func (this *QWebChannelAbstractTransport) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebChannelAbstractTransport_Metacast(this.h, param1_Cstring)) +} + +func QWebChannelAbstractTransport_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebChannelAbstractTransport_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebChannelAbstractTransport_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebChannelAbstractTransport_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebChannelAbstractTransport) SendMessage(message *qt.QJsonObject) { + C.QWebChannelAbstractTransport_SendMessage(this.h, (*C.QJsonObject)(message.UnsafePointer())) +} + +func (this *QWebChannelAbstractTransport) MessageReceived(message *qt.QJsonObject, transport *QWebChannelAbstractTransport) { + C.QWebChannelAbstractTransport_MessageReceived(this.h, (*C.QJsonObject)(message.UnsafePointer()), transport.cPointer()) +} +func (this *QWebChannelAbstractTransport) OnMessageReceived(slot func(message *qt.QJsonObject, transport *QWebChannelAbstractTransport)) { + C.QWebChannelAbstractTransport_connect_MessageReceived(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannelAbstractTransport_MessageReceived +func miqt_exec_callback_QWebChannelAbstractTransport_MessageReceived(cb C.intptr_t, message *C.QJsonObject, transport *C.QWebChannelAbstractTransport) { + gofunc, ok := cgo.Handle(cb).Value().(func(message *qt.QJsonObject, transport *QWebChannelAbstractTransport)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQJsonObject(unsafe.Pointer(message)) + slotval2 := UnsafeNewQWebChannelAbstractTransport(unsafe.Pointer(transport), nil) + + gofunc(slotval1, slotval2) +} + +func QWebChannelAbstractTransport_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebChannelAbstractTransport_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebChannelAbstractTransport_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebChannelAbstractTransport_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebChannelAbstractTransport_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebChannelAbstractTransport_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebChannelAbstractTransport_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebChannelAbstractTransport_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QWebChannelAbstractTransport) OnSendMessage(slot func(message *qt.QJsonObject)) { + C.QWebChannelAbstractTransport_override_virtual_SendMessage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannelAbstractTransport_SendMessage +func miqt_exec_callback_QWebChannelAbstractTransport_SendMessage(self *C.QWebChannelAbstractTransport, cb C.intptr_t, message *C.QJsonObject) { + gofunc, ok := cgo.Handle(cb).Value().(func(message *qt.QJsonObject)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQJsonObject(unsafe.Pointer(message)) + + gofunc(slotval1) + +} + +func (this *QWebChannelAbstractTransport) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QWebChannelAbstractTransport_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebChannelAbstractTransport) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QWebChannelAbstractTransport_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannelAbstractTransport_Event +func miqt_exec_callback_QWebChannelAbstractTransport_Event(self *C.QWebChannelAbstractTransport, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebChannelAbstractTransport{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebChannelAbstractTransport) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QWebChannelAbstractTransport_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebChannelAbstractTransport) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QWebChannelAbstractTransport_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannelAbstractTransport_EventFilter +func miqt_exec_callback_QWebChannelAbstractTransport_EventFilter(self *C.QWebChannelAbstractTransport, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebChannelAbstractTransport{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebChannelAbstractTransport) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QWebChannelAbstractTransport_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QWebChannelAbstractTransport) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QWebChannelAbstractTransport_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannelAbstractTransport_TimerEvent +func miqt_exec_callback_QWebChannelAbstractTransport_TimerEvent(self *C.QWebChannelAbstractTransport, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebChannelAbstractTransport{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QWebChannelAbstractTransport) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QWebChannelAbstractTransport_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QWebChannelAbstractTransport) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QWebChannelAbstractTransport_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannelAbstractTransport_ChildEvent +func miqt_exec_callback_QWebChannelAbstractTransport_ChildEvent(self *C.QWebChannelAbstractTransport, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebChannelAbstractTransport{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QWebChannelAbstractTransport) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QWebChannelAbstractTransport_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebChannelAbstractTransport) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QWebChannelAbstractTransport_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannelAbstractTransport_CustomEvent +func miqt_exec_callback_QWebChannelAbstractTransport_CustomEvent(self *C.QWebChannelAbstractTransport, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWebChannelAbstractTransport{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QWebChannelAbstractTransport) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QWebChannelAbstractTransport_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebChannelAbstractTransport) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QWebChannelAbstractTransport_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannelAbstractTransport_ConnectNotify +func miqt_exec_callback_QWebChannelAbstractTransport_ConnectNotify(self *C.QWebChannelAbstractTransport, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebChannelAbstractTransport{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QWebChannelAbstractTransport) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QWebChannelAbstractTransport_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebChannelAbstractTransport) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QWebChannelAbstractTransport_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannelAbstractTransport_DisconnectNotify +func miqt_exec_callback_QWebChannelAbstractTransport_DisconnectNotify(self *C.QWebChannelAbstractTransport, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebChannelAbstractTransport{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QWebChannelAbstractTransport) Delete() { + C.QWebChannelAbstractTransport_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebChannelAbstractTransport) GoGC() { + runtime.SetFinalizer(this, func(this *QWebChannelAbstractTransport) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webchannel/gen_qwebchannelabstracttransport.h b/qt/webchannel/gen_qwebchannelabstracttransport.h new file mode 100644 index 00000000..7b05d74f --- /dev/null +++ b/qt/webchannel/gen_qwebchannelabstracttransport.h @@ -0,0 +1,72 @@ +#pragma once +#ifndef MIQT_QT_WEBCHANNEL_GEN_QWEBCHANNELABSTRACTTRANSPORT_H +#define MIQT_QT_WEBCHANNEL_GEN_QWEBCHANNELABSTRACTTRANSPORT_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QChildEvent; +class QEvent; +class QJsonObject; +class QMetaMethod; +class QMetaObject; +class QObject; +class QTimerEvent; +class QWebChannelAbstractTransport; +#else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QJsonObject QJsonObject; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; +typedef struct QWebChannelAbstractTransport QWebChannelAbstractTransport; +#endif + +void QWebChannelAbstractTransport_new(QWebChannelAbstractTransport** outptr_QWebChannelAbstractTransport, QObject** outptr_QObject); +void QWebChannelAbstractTransport_new2(QObject* parent, QWebChannelAbstractTransport** outptr_QWebChannelAbstractTransport, QObject** outptr_QObject); +QMetaObject* QWebChannelAbstractTransport_MetaObject(const QWebChannelAbstractTransport* self); +void* QWebChannelAbstractTransport_Metacast(QWebChannelAbstractTransport* self, const char* param1); +struct miqt_string QWebChannelAbstractTransport_Tr(const char* s); +struct miqt_string QWebChannelAbstractTransport_TrUtf8(const char* s); +void QWebChannelAbstractTransport_SendMessage(QWebChannelAbstractTransport* self, QJsonObject* message); +void QWebChannelAbstractTransport_MessageReceived(QWebChannelAbstractTransport* self, QJsonObject* message, QWebChannelAbstractTransport* transport); +void QWebChannelAbstractTransport_connect_MessageReceived(QWebChannelAbstractTransport* self, intptr_t slot); +struct miqt_string QWebChannelAbstractTransport_Tr2(const char* s, const char* c); +struct miqt_string QWebChannelAbstractTransport_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebChannelAbstractTransport_TrUtf82(const char* s, const char* c); +struct miqt_string QWebChannelAbstractTransport_TrUtf83(const char* s, const char* c, int n); +void QWebChannelAbstractTransport_override_virtual_SendMessage(void* self, intptr_t slot); +void QWebChannelAbstractTransport_virtualbase_SendMessage(void* self, QJsonObject* message); +void QWebChannelAbstractTransport_override_virtual_Event(void* self, intptr_t slot); +bool QWebChannelAbstractTransport_virtualbase_Event(void* self, QEvent* event); +void QWebChannelAbstractTransport_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWebChannelAbstractTransport_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QWebChannelAbstractTransport_override_virtual_TimerEvent(void* self, intptr_t slot); +void QWebChannelAbstractTransport_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QWebChannelAbstractTransport_override_virtual_ChildEvent(void* self, intptr_t slot); +void QWebChannelAbstractTransport_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QWebChannelAbstractTransport_override_virtual_CustomEvent(void* self, intptr_t slot); +void QWebChannelAbstractTransport_virtualbase_CustomEvent(void* self, QEvent* event); +void QWebChannelAbstractTransport_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QWebChannelAbstractTransport_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QWebChannelAbstractTransport_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QWebChannelAbstractTransport_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QWebChannelAbstractTransport_Delete(QWebChannelAbstractTransport* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/cflags.go b/qt/webengine/cflags.go new file mode 100644 index 00000000..22b7e552 --- /dev/null +++ b/qt/webengine/cflags.go @@ -0,0 +1,6 @@ +package webengine + +/* +#cgo pkg-config: Qt5WebEngineWidgets +*/ +import "C" diff --git a/qt/webengine/gen_qwebenginecertificateerror.cpp b/qt/webengine/gen_qwebenginecertificateerror.cpp new file mode 100644 index 00000000..6b165fa0 --- /dev/null +++ b/qt/webengine/gen_qwebenginecertificateerror.cpp @@ -0,0 +1,91 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebenginecertificateerror.h" +#include "_cgo_export.h" + +void QWebEngineCertificateError_new(int error, QUrl* url, bool overridable, struct miqt_string errorDescription, QWebEngineCertificateError** outptr_QWebEngineCertificateError) { + QString errorDescription_QString = QString::fromUtf8(errorDescription.data, errorDescription.len); + QWebEngineCertificateError* ret = new QWebEngineCertificateError(static_cast(error), *url, overridable, errorDescription_QString); + *outptr_QWebEngineCertificateError = ret; +} + +void QWebEngineCertificateError_new2(QWebEngineCertificateError* other, QWebEngineCertificateError** outptr_QWebEngineCertificateError) { + QWebEngineCertificateError* ret = new QWebEngineCertificateError(*other); + *outptr_QWebEngineCertificateError = ret; +} + +int QWebEngineCertificateError_Error(const QWebEngineCertificateError* self) { + QWebEngineCertificateError::Error _ret = self->error(); + return static_cast(_ret); +} + +QUrl* QWebEngineCertificateError_Url(const QWebEngineCertificateError* self) { + return new QUrl(self->url()); +} + +bool QWebEngineCertificateError_IsOverridable(const QWebEngineCertificateError* self) { + return self->isOverridable(); +} + +struct miqt_string QWebEngineCertificateError_ErrorDescription(const QWebEngineCertificateError* self) { + QString _ret = self->errorDescription(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineCertificateError_OperatorAssign(QWebEngineCertificateError* self, QWebEngineCertificateError* other) { + self->operator=(*other); +} + +void QWebEngineCertificateError_Defer(QWebEngineCertificateError* self) { + self->defer(); +} + +bool QWebEngineCertificateError_Deferred(const QWebEngineCertificateError* self) { + return self->deferred(); +} + +void QWebEngineCertificateError_RejectCertificate(QWebEngineCertificateError* self) { + self->rejectCertificate(); +} + +void QWebEngineCertificateError_IgnoreCertificateError(QWebEngineCertificateError* self) { + self->ignoreCertificateError(); +} + +bool QWebEngineCertificateError_Answered(const QWebEngineCertificateError* self) { + return self->answered(); +} + +struct miqt_array /* of QSslCertificate* */ QWebEngineCertificateError_CertificateChain(const QWebEngineCertificateError* self) { + QList _ret = self->certificateChain(); + // Convert QList<> from C++ memory to manually-managed C memory + QSslCertificate** _arr = static_cast(malloc(sizeof(QSslCertificate*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QSslCertificate(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QWebEngineCertificateError_Delete(QWebEngineCertificateError* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webengine/gen_qwebenginecertificateerror.go b/qt/webengine/gen_qwebenginecertificateerror.go new file mode 100644 index 00000000..47cd676c --- /dev/null +++ b/qt/webengine/gen_qwebenginecertificateerror.go @@ -0,0 +1,170 @@ +package webengine + +/* + +#include "gen_qwebenginecertificateerror.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "github.com/mappu/miqt/qt/network" + "runtime" + "unsafe" +) + +type QWebEngineCertificateError__Error int + +const ( + QWebEngineCertificateError__SslPinnedKeyNotInCertificateChain QWebEngineCertificateError__Error = -150 + QWebEngineCertificateError__CertificateCommonNameInvalid QWebEngineCertificateError__Error = -200 + QWebEngineCertificateError__CertificateDateInvalid QWebEngineCertificateError__Error = -201 + QWebEngineCertificateError__CertificateAuthorityInvalid QWebEngineCertificateError__Error = -202 + QWebEngineCertificateError__CertificateContainsErrors QWebEngineCertificateError__Error = -203 + QWebEngineCertificateError__CertificateNoRevocationMechanism QWebEngineCertificateError__Error = -204 + QWebEngineCertificateError__CertificateUnableToCheckRevocation QWebEngineCertificateError__Error = -205 + QWebEngineCertificateError__CertificateRevoked QWebEngineCertificateError__Error = -206 + QWebEngineCertificateError__CertificateInvalid QWebEngineCertificateError__Error = -207 + QWebEngineCertificateError__CertificateWeakSignatureAlgorithm QWebEngineCertificateError__Error = -208 + QWebEngineCertificateError__CertificateNonUniqueName QWebEngineCertificateError__Error = -210 + QWebEngineCertificateError__CertificateWeakKey QWebEngineCertificateError__Error = -211 + QWebEngineCertificateError__CertificateNameConstraintViolation QWebEngineCertificateError__Error = -212 + QWebEngineCertificateError__CertificateValidityTooLong QWebEngineCertificateError__Error = -213 + QWebEngineCertificateError__CertificateTransparencyRequired QWebEngineCertificateError__Error = -214 + QWebEngineCertificateError__CertificateKnownInterceptionBlocked QWebEngineCertificateError__Error = -217 +) + +type QWebEngineCertificateError struct { + h *C.QWebEngineCertificateError + isSubclass bool +} + +func (this *QWebEngineCertificateError) cPointer() *C.QWebEngineCertificateError { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineCertificateError) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineCertificateError constructs the type using only CGO pointers. +func newQWebEngineCertificateError(h *C.QWebEngineCertificateError) *QWebEngineCertificateError { + if h == nil { + return nil + } + return &QWebEngineCertificateError{h: h} +} + +// UnsafeNewQWebEngineCertificateError constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineCertificateError(h unsafe.Pointer) *QWebEngineCertificateError { + if h == nil { + return nil + } + + return &QWebEngineCertificateError{h: (*C.QWebEngineCertificateError)(h)} +} + +// NewQWebEngineCertificateError constructs a new QWebEngineCertificateError object. +func NewQWebEngineCertificateError(error int, url qt.QUrl, overridable bool, errorDescription string) *QWebEngineCertificateError { + errorDescription_ms := C.struct_miqt_string{} + errorDescription_ms.data = C.CString(errorDescription) + errorDescription_ms.len = C.size_t(len(errorDescription)) + defer C.free(unsafe.Pointer(errorDescription_ms.data)) + var outptr_QWebEngineCertificateError *C.QWebEngineCertificateError = nil + + C.QWebEngineCertificateError_new((C.int)(error), (*C.QUrl)(url.UnsafePointer()), (C.bool)(overridable), errorDescription_ms, &outptr_QWebEngineCertificateError) + ret := newQWebEngineCertificateError(outptr_QWebEngineCertificateError) + ret.isSubclass = true + return ret +} + +// NewQWebEngineCertificateError2 constructs a new QWebEngineCertificateError object. +func NewQWebEngineCertificateError2(other *QWebEngineCertificateError) *QWebEngineCertificateError { + var outptr_QWebEngineCertificateError *C.QWebEngineCertificateError = nil + + C.QWebEngineCertificateError_new2(other.cPointer(), &outptr_QWebEngineCertificateError) + ret := newQWebEngineCertificateError(outptr_QWebEngineCertificateError) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineCertificateError) Error() QWebEngineCertificateError__Error { + return (QWebEngineCertificateError__Error)(C.QWebEngineCertificateError_Error(this.h)) +} + +func (this *QWebEngineCertificateError) Url() *qt.QUrl { + _ret := C.QWebEngineCertificateError_Url(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineCertificateError) IsOverridable() bool { + return (bool)(C.QWebEngineCertificateError_IsOverridable(this.h)) +} + +func (this *QWebEngineCertificateError) ErrorDescription() string { + var _ms C.struct_miqt_string = C.QWebEngineCertificateError_ErrorDescription(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineCertificateError) OperatorAssign(other *QWebEngineCertificateError) { + C.QWebEngineCertificateError_OperatorAssign(this.h, other.cPointer()) +} + +func (this *QWebEngineCertificateError) Defer() { + C.QWebEngineCertificateError_Defer(this.h) +} + +func (this *QWebEngineCertificateError) Deferred() bool { + return (bool)(C.QWebEngineCertificateError_Deferred(this.h)) +} + +func (this *QWebEngineCertificateError) RejectCertificate() { + C.QWebEngineCertificateError_RejectCertificate(this.h) +} + +func (this *QWebEngineCertificateError) IgnoreCertificateError() { + C.QWebEngineCertificateError_IgnoreCertificateError(this.h) +} + +func (this *QWebEngineCertificateError) Answered() bool { + return (bool)(C.QWebEngineCertificateError_Answered(this.h)) +} + +func (this *QWebEngineCertificateError) CertificateChain() []network.QSslCertificate { + var _ma C.struct_miqt_array = C.QWebEngineCertificateError_CertificateChain(this.h) + _ret := make([]network.QSslCertificate, int(_ma.len)) + _outCast := (*[0xffff]*C.QSslCertificate)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := network.UnsafeNewQSslCertificate(unsafe.Pointer(_lv_ret)) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebEngineCertificateError) Delete() { + C.QWebEngineCertificateError_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineCertificateError) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineCertificateError) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webengine/gen_qwebenginecertificateerror.h b/qt/webengine/gen_qwebenginecertificateerror.h new file mode 100644 index 00000000..b4bccf9c --- /dev/null +++ b/qt/webengine/gen_qwebenginecertificateerror.h @@ -0,0 +1,46 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINECERTIFICATEERROR_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINECERTIFICATEERROR_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QSslCertificate; +class QUrl; +class QWebEngineCertificateError; +#else +typedef struct QSslCertificate QSslCertificate; +typedef struct QUrl QUrl; +typedef struct QWebEngineCertificateError QWebEngineCertificateError; +#endif + +void QWebEngineCertificateError_new(int error, QUrl* url, bool overridable, struct miqt_string errorDescription, QWebEngineCertificateError** outptr_QWebEngineCertificateError); +void QWebEngineCertificateError_new2(QWebEngineCertificateError* other, QWebEngineCertificateError** outptr_QWebEngineCertificateError); +int QWebEngineCertificateError_Error(const QWebEngineCertificateError* self); +QUrl* QWebEngineCertificateError_Url(const QWebEngineCertificateError* self); +bool QWebEngineCertificateError_IsOverridable(const QWebEngineCertificateError* self); +struct miqt_string QWebEngineCertificateError_ErrorDescription(const QWebEngineCertificateError* self); +void QWebEngineCertificateError_OperatorAssign(QWebEngineCertificateError* self, QWebEngineCertificateError* other); +void QWebEngineCertificateError_Defer(QWebEngineCertificateError* self); +bool QWebEngineCertificateError_Deferred(const QWebEngineCertificateError* self); +void QWebEngineCertificateError_RejectCertificate(QWebEngineCertificateError* self); +void QWebEngineCertificateError_IgnoreCertificateError(QWebEngineCertificateError* self); +bool QWebEngineCertificateError_Answered(const QWebEngineCertificateError* self); +struct miqt_array /* of QSslCertificate* */ QWebEngineCertificateError_CertificateChain(const QWebEngineCertificateError* self); +void QWebEngineCertificateError_Delete(QWebEngineCertificateError* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebengineclientcertificateselection.cpp b/qt/webengine/gen_qwebengineclientcertificateselection.cpp new file mode 100644 index 00000000..3652b828 --- /dev/null +++ b/qt/webengine/gen_qwebengineclientcertificateselection.cpp @@ -0,0 +1,50 @@ +#include +#include +#include +#include +#include +#include "gen_qwebengineclientcertificateselection.h" +#include "_cgo_export.h" + +void QWebEngineClientCertificateSelection_new(QWebEngineClientCertificateSelection* param1, QWebEngineClientCertificateSelection** outptr_QWebEngineClientCertificateSelection) { + QWebEngineClientCertificateSelection* ret = new QWebEngineClientCertificateSelection(*param1); + *outptr_QWebEngineClientCertificateSelection = ret; +} + +void QWebEngineClientCertificateSelection_OperatorAssign(QWebEngineClientCertificateSelection* self, QWebEngineClientCertificateSelection* param1) { + self->operator=(*param1); +} + +QUrl* QWebEngineClientCertificateSelection_Host(const QWebEngineClientCertificateSelection* self) { + return new QUrl(self->host()); +} + +void QWebEngineClientCertificateSelection_Select(QWebEngineClientCertificateSelection* self, QSslCertificate* certificate) { + self->select(*certificate); +} + +void QWebEngineClientCertificateSelection_SelectNone(QWebEngineClientCertificateSelection* self) { + self->selectNone(); +} + +struct miqt_array /* of QSslCertificate* */ QWebEngineClientCertificateSelection_Certificates(const QWebEngineClientCertificateSelection* self) { + QVector _ret = self->certificates(); + // Convert QList<> from C++ memory to manually-managed C memory + QSslCertificate** _arr = static_cast(malloc(sizeof(QSslCertificate*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QSslCertificate(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QWebEngineClientCertificateSelection_Delete(QWebEngineClientCertificateSelection* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webengine/gen_qwebengineclientcertificateselection.go b/qt/webengine/gen_qwebengineclientcertificateselection.go new file mode 100644 index 00000000..58d230c1 --- /dev/null +++ b/qt/webengine/gen_qwebengineclientcertificateselection.go @@ -0,0 +1,108 @@ +package webengine + +/* + +#include "gen_qwebengineclientcertificateselection.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "github.com/mappu/miqt/qt/network" + "runtime" + "unsafe" +) + +type QWebEngineClientCertificateSelection struct { + h *C.QWebEngineClientCertificateSelection + isSubclass bool +} + +func (this *QWebEngineClientCertificateSelection) cPointer() *C.QWebEngineClientCertificateSelection { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineClientCertificateSelection) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineClientCertificateSelection constructs the type using only CGO pointers. +func newQWebEngineClientCertificateSelection(h *C.QWebEngineClientCertificateSelection) *QWebEngineClientCertificateSelection { + if h == nil { + return nil + } + return &QWebEngineClientCertificateSelection{h: h} +} + +// UnsafeNewQWebEngineClientCertificateSelection constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineClientCertificateSelection(h unsafe.Pointer) *QWebEngineClientCertificateSelection { + if h == nil { + return nil + } + + return &QWebEngineClientCertificateSelection{h: (*C.QWebEngineClientCertificateSelection)(h)} +} + +// NewQWebEngineClientCertificateSelection constructs a new QWebEngineClientCertificateSelection object. +func NewQWebEngineClientCertificateSelection(param1 *QWebEngineClientCertificateSelection) *QWebEngineClientCertificateSelection { + var outptr_QWebEngineClientCertificateSelection *C.QWebEngineClientCertificateSelection = nil + + C.QWebEngineClientCertificateSelection_new(param1.cPointer(), &outptr_QWebEngineClientCertificateSelection) + ret := newQWebEngineClientCertificateSelection(outptr_QWebEngineClientCertificateSelection) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineClientCertificateSelection) OperatorAssign(param1 *QWebEngineClientCertificateSelection) { + C.QWebEngineClientCertificateSelection_OperatorAssign(this.h, param1.cPointer()) +} + +func (this *QWebEngineClientCertificateSelection) Host() *qt.QUrl { + _ret := C.QWebEngineClientCertificateSelection_Host(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineClientCertificateSelection) Select(certificate *network.QSslCertificate) { + C.QWebEngineClientCertificateSelection_Select(this.h, (*C.QSslCertificate)(certificate.UnsafePointer())) +} + +func (this *QWebEngineClientCertificateSelection) SelectNone() { + C.QWebEngineClientCertificateSelection_SelectNone(this.h) +} + +func (this *QWebEngineClientCertificateSelection) Certificates() []network.QSslCertificate { + var _ma C.struct_miqt_array = C.QWebEngineClientCertificateSelection_Certificates(this.h) + _ret := make([]network.QSslCertificate, int(_ma.len)) + _outCast := (*[0xffff]*C.QSslCertificate)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _vv_ret := _outCast[i] + _vv_goptr := network.UnsafeNewQSslCertificate(unsafe.Pointer(_vv_ret)) + _vv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_vv_goptr + } + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebEngineClientCertificateSelection) Delete() { + C.QWebEngineClientCertificateSelection_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineClientCertificateSelection) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineClientCertificateSelection) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webengine/gen_qwebengineclientcertificateselection.h b/qt/webengine/gen_qwebengineclientcertificateselection.h new file mode 100644 index 00000000..e3199f0d --- /dev/null +++ b/qt/webengine/gen_qwebengineclientcertificateselection.h @@ -0,0 +1,39 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINECLIENTCERTIFICATESELECTION_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINECLIENTCERTIFICATESELECTION_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QSslCertificate; +class QUrl; +class QWebEngineClientCertificateSelection; +#else +typedef struct QSslCertificate QSslCertificate; +typedef struct QUrl QUrl; +typedef struct QWebEngineClientCertificateSelection QWebEngineClientCertificateSelection; +#endif + +void QWebEngineClientCertificateSelection_new(QWebEngineClientCertificateSelection* param1, QWebEngineClientCertificateSelection** outptr_QWebEngineClientCertificateSelection); +void QWebEngineClientCertificateSelection_OperatorAssign(QWebEngineClientCertificateSelection* self, QWebEngineClientCertificateSelection* param1); +QUrl* QWebEngineClientCertificateSelection_Host(const QWebEngineClientCertificateSelection* self); +void QWebEngineClientCertificateSelection_Select(QWebEngineClientCertificateSelection* self, QSslCertificate* certificate); +void QWebEngineClientCertificateSelection_SelectNone(QWebEngineClientCertificateSelection* self); +struct miqt_array /* of QSslCertificate* */ QWebEngineClientCertificateSelection_Certificates(const QWebEngineClientCertificateSelection* self); +void QWebEngineClientCertificateSelection_Delete(QWebEngineClientCertificateSelection* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebengineclientcertificatestore.cpp b/qt/webengine/gen_qwebengineclientcertificatestore.cpp new file mode 100644 index 00000000..7bb8626a --- /dev/null +++ b/qt/webengine/gen_qwebengineclientcertificatestore.cpp @@ -0,0 +1,33 @@ +#include +#include +#include +#include +#include +#include "gen_qwebengineclientcertificatestore.h" +#include "_cgo_export.h" + +void QWebEngineClientCertificateStore_Add(QWebEngineClientCertificateStore* self, QSslCertificate* certificate, QSslKey* privateKey) { + self->add(*certificate, *privateKey); +} + +struct miqt_array /* of QSslCertificate* */ QWebEngineClientCertificateStore_Certificates(const QWebEngineClientCertificateStore* self) { + QVector _ret = self->certificates(); + // Convert QList<> from C++ memory to manually-managed C memory + QSslCertificate** _arr = static_cast(malloc(sizeof(QSslCertificate*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QSslCertificate(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QWebEngineClientCertificateStore_Remove(QWebEngineClientCertificateStore* self, QSslCertificate* certificate) { + self->remove(*certificate); +} + +void QWebEngineClientCertificateStore_Clear(QWebEngineClientCertificateStore* self) { + self->clear(); +} + diff --git a/qt/webengine/gen_qwebengineclientcertificatestore.go b/qt/webengine/gen_qwebengineclientcertificatestore.go new file mode 100644 index 00000000..00150ced --- /dev/null +++ b/qt/webengine/gen_qwebengineclientcertificatestore.go @@ -0,0 +1,75 @@ +package webengine + +/* + +#include "gen_qwebengineclientcertificatestore.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt/network" + "unsafe" +) + +type QWebEngineClientCertificateStore struct { + h *C.QWebEngineClientCertificateStore + isSubclass bool +} + +func (this *QWebEngineClientCertificateStore) cPointer() *C.QWebEngineClientCertificateStore { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineClientCertificateStore) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineClientCertificateStore constructs the type using only CGO pointers. +func newQWebEngineClientCertificateStore(h *C.QWebEngineClientCertificateStore) *QWebEngineClientCertificateStore { + if h == nil { + return nil + } + return &QWebEngineClientCertificateStore{h: h} +} + +// UnsafeNewQWebEngineClientCertificateStore constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineClientCertificateStore(h unsafe.Pointer) *QWebEngineClientCertificateStore { + if h == nil { + return nil + } + + return &QWebEngineClientCertificateStore{h: (*C.QWebEngineClientCertificateStore)(h)} +} + +func (this *QWebEngineClientCertificateStore) Add(certificate *network.QSslCertificate, privateKey *network.QSslKey) { + C.QWebEngineClientCertificateStore_Add(this.h, (*C.QSslCertificate)(certificate.UnsafePointer()), (*C.QSslKey)(privateKey.UnsafePointer())) +} + +func (this *QWebEngineClientCertificateStore) Certificates() []network.QSslCertificate { + var _ma C.struct_miqt_array = C.QWebEngineClientCertificateStore_Certificates(this.h) + _ret := make([]network.QSslCertificate, int(_ma.len)) + _outCast := (*[0xffff]*C.QSslCertificate)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _vv_ret := _outCast[i] + _vv_goptr := network.UnsafeNewQSslCertificate(unsafe.Pointer(_vv_ret)) + _vv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_vv_goptr + } + return _ret +} + +func (this *QWebEngineClientCertificateStore) Remove(certificate *network.QSslCertificate) { + C.QWebEngineClientCertificateStore_Remove(this.h, (*C.QSslCertificate)(certificate.UnsafePointer())) +} + +func (this *QWebEngineClientCertificateStore) Clear() { + C.QWebEngineClientCertificateStore_Clear(this.h) +} diff --git a/qt/webengine/gen_qwebengineclientcertificatestore.h b/qt/webengine/gen_qwebengineclientcertificatestore.h new file mode 100644 index 00000000..ac94f3cb --- /dev/null +++ b/qt/webengine/gen_qwebengineclientcertificatestore.h @@ -0,0 +1,36 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINECLIENTCERTIFICATESTORE_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINECLIENTCERTIFICATESTORE_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QSslCertificate; +class QSslKey; +class QWebEngineClientCertificateStore; +#else +typedef struct QSslCertificate QSslCertificate; +typedef struct QSslKey QSslKey; +typedef struct QWebEngineClientCertificateStore QWebEngineClientCertificateStore; +#endif + +void QWebEngineClientCertificateStore_Add(QWebEngineClientCertificateStore* self, QSslCertificate* certificate, QSslKey* privateKey); +struct miqt_array /* of QSslCertificate* */ QWebEngineClientCertificateStore_Certificates(const QWebEngineClientCertificateStore* self); +void QWebEngineClientCertificateStore_Remove(QWebEngineClientCertificateStore* self, QSslCertificate* certificate); +void QWebEngineClientCertificateStore_Clear(QWebEngineClientCertificateStore* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebenginecontextmenudata.cpp b/qt/webengine/gen_qwebenginecontextmenudata.cpp new file mode 100644 index 00000000..e286d5f4 --- /dev/null +++ b/qt/webengine/gen_qwebenginecontextmenudata.cpp @@ -0,0 +1,121 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebenginecontextmenudata.h" +#include "_cgo_export.h" + +void QWebEngineContextMenuData_new(QWebEngineContextMenuData** outptr_QWebEngineContextMenuData) { + QWebEngineContextMenuData* ret = new QWebEngineContextMenuData(); + *outptr_QWebEngineContextMenuData = ret; +} + +void QWebEngineContextMenuData_new2(QWebEngineContextMenuData* other, QWebEngineContextMenuData** outptr_QWebEngineContextMenuData) { + QWebEngineContextMenuData* ret = new QWebEngineContextMenuData(*other); + *outptr_QWebEngineContextMenuData = ret; +} + +void QWebEngineContextMenuData_OperatorAssign(QWebEngineContextMenuData* self, QWebEngineContextMenuData* other) { + self->operator=(*other); +} + +bool QWebEngineContextMenuData_IsValid(const QWebEngineContextMenuData* self) { + return self->isValid(); +} + +QPoint* QWebEngineContextMenuData_Position(const QWebEngineContextMenuData* self) { + return new QPoint(self->position()); +} + +struct miqt_string QWebEngineContextMenuData_SelectedText(const QWebEngineContextMenuData* self) { + QString _ret = self->selectedText(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineContextMenuData_LinkText(const QWebEngineContextMenuData* self) { + QString _ret = self->linkText(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QUrl* QWebEngineContextMenuData_LinkUrl(const QWebEngineContextMenuData* self) { + return new QUrl(self->linkUrl()); +} + +QUrl* QWebEngineContextMenuData_MediaUrl(const QWebEngineContextMenuData* self) { + return new QUrl(self->mediaUrl()); +} + +int QWebEngineContextMenuData_MediaType(const QWebEngineContextMenuData* self) { + QWebEngineContextMenuData::MediaType _ret = self->mediaType(); + return static_cast(_ret); +} + +bool QWebEngineContextMenuData_IsContentEditable(const QWebEngineContextMenuData* self) { + return self->isContentEditable(); +} + +struct miqt_string QWebEngineContextMenuData_MisspelledWord(const QWebEngineContextMenuData* self) { + QString _ret = self->misspelledWord(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_array /* of struct miqt_string */ QWebEngineContextMenuData_SpellCheckerSuggestions(const QWebEngineContextMenuData* self) { + QStringList _ret = self->spellCheckerSuggestions(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +int QWebEngineContextMenuData_MediaFlags(const QWebEngineContextMenuData* self) { + QWebEngineContextMenuData::MediaFlags _ret = self->mediaFlags(); + return static_cast(_ret); +} + +int QWebEngineContextMenuData_EditFlags(const QWebEngineContextMenuData* self) { + QWebEngineContextMenuData::EditFlags _ret = self->editFlags(); + return static_cast(_ret); +} + +void QWebEngineContextMenuData_Delete(QWebEngineContextMenuData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webengine/gen_qwebenginecontextmenudata.go b/qt/webengine/gen_qwebenginecontextmenudata.go new file mode 100644 index 00000000..3abbf9bd --- /dev/null +++ b/qt/webengine/gen_qwebenginecontextmenudata.go @@ -0,0 +1,205 @@ +package webengine + +/* + +#include "gen_qwebenginecontextmenudata.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "unsafe" +) + +type QWebEngineContextMenuData__MediaType int + +const ( + QWebEngineContextMenuData__MediaTypeNone QWebEngineContextMenuData__MediaType = 0 + QWebEngineContextMenuData__MediaTypeImage QWebEngineContextMenuData__MediaType = 1 + QWebEngineContextMenuData__MediaTypeVideo QWebEngineContextMenuData__MediaType = 2 + QWebEngineContextMenuData__MediaTypeAudio QWebEngineContextMenuData__MediaType = 3 + QWebEngineContextMenuData__MediaTypeCanvas QWebEngineContextMenuData__MediaType = 4 + QWebEngineContextMenuData__MediaTypeFile QWebEngineContextMenuData__MediaType = 5 + QWebEngineContextMenuData__MediaTypePlugin QWebEngineContextMenuData__MediaType = 6 +) + +type QWebEngineContextMenuData__MediaFlag int + +const ( + QWebEngineContextMenuData__MediaInError QWebEngineContextMenuData__MediaFlag = 1 + QWebEngineContextMenuData__MediaPaused QWebEngineContextMenuData__MediaFlag = 2 + QWebEngineContextMenuData__MediaMuted QWebEngineContextMenuData__MediaFlag = 4 + QWebEngineContextMenuData__MediaLoop QWebEngineContextMenuData__MediaFlag = 8 + QWebEngineContextMenuData__MediaCanSave QWebEngineContextMenuData__MediaFlag = 16 + QWebEngineContextMenuData__MediaHasAudio QWebEngineContextMenuData__MediaFlag = 32 + QWebEngineContextMenuData__MediaCanToggleControls QWebEngineContextMenuData__MediaFlag = 64 + QWebEngineContextMenuData__MediaControls QWebEngineContextMenuData__MediaFlag = 128 + QWebEngineContextMenuData__MediaCanPrint QWebEngineContextMenuData__MediaFlag = 256 + QWebEngineContextMenuData__MediaCanRotate QWebEngineContextMenuData__MediaFlag = 512 +) + +type QWebEngineContextMenuData__EditFlag int + +const ( + QWebEngineContextMenuData__CanUndo QWebEngineContextMenuData__EditFlag = 1 + QWebEngineContextMenuData__CanRedo QWebEngineContextMenuData__EditFlag = 2 + QWebEngineContextMenuData__CanCut QWebEngineContextMenuData__EditFlag = 4 + QWebEngineContextMenuData__CanCopy QWebEngineContextMenuData__EditFlag = 8 + QWebEngineContextMenuData__CanPaste QWebEngineContextMenuData__EditFlag = 16 + QWebEngineContextMenuData__CanDelete QWebEngineContextMenuData__EditFlag = 32 + QWebEngineContextMenuData__CanSelectAll QWebEngineContextMenuData__EditFlag = 64 + QWebEngineContextMenuData__CanTranslate QWebEngineContextMenuData__EditFlag = 128 + QWebEngineContextMenuData__CanEditRichly QWebEngineContextMenuData__EditFlag = 256 +) + +type QWebEngineContextMenuData struct { + h *C.QWebEngineContextMenuData + isSubclass bool +} + +func (this *QWebEngineContextMenuData) cPointer() *C.QWebEngineContextMenuData { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineContextMenuData) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineContextMenuData constructs the type using only CGO pointers. +func newQWebEngineContextMenuData(h *C.QWebEngineContextMenuData) *QWebEngineContextMenuData { + if h == nil { + return nil + } + return &QWebEngineContextMenuData{h: h} +} + +// UnsafeNewQWebEngineContextMenuData constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineContextMenuData(h unsafe.Pointer) *QWebEngineContextMenuData { + if h == nil { + return nil + } + + return &QWebEngineContextMenuData{h: (*C.QWebEngineContextMenuData)(h)} +} + +// NewQWebEngineContextMenuData constructs a new QWebEngineContextMenuData object. +func NewQWebEngineContextMenuData() *QWebEngineContextMenuData { + var outptr_QWebEngineContextMenuData *C.QWebEngineContextMenuData = nil + + C.QWebEngineContextMenuData_new(&outptr_QWebEngineContextMenuData) + ret := newQWebEngineContextMenuData(outptr_QWebEngineContextMenuData) + ret.isSubclass = true + return ret +} + +// NewQWebEngineContextMenuData2 constructs a new QWebEngineContextMenuData object. +func NewQWebEngineContextMenuData2(other *QWebEngineContextMenuData) *QWebEngineContextMenuData { + var outptr_QWebEngineContextMenuData *C.QWebEngineContextMenuData = nil + + C.QWebEngineContextMenuData_new2(other.cPointer(), &outptr_QWebEngineContextMenuData) + ret := newQWebEngineContextMenuData(outptr_QWebEngineContextMenuData) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineContextMenuData) OperatorAssign(other *QWebEngineContextMenuData) { + C.QWebEngineContextMenuData_OperatorAssign(this.h, other.cPointer()) +} + +func (this *QWebEngineContextMenuData) IsValid() bool { + return (bool)(C.QWebEngineContextMenuData_IsValid(this.h)) +} + +func (this *QWebEngineContextMenuData) Position() *qt.QPoint { + _ret := C.QWebEngineContextMenuData_Position(this.h) + _goptr := qt.UnsafeNewQPoint(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineContextMenuData) SelectedText() string { + var _ms C.struct_miqt_string = C.QWebEngineContextMenuData_SelectedText(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineContextMenuData) LinkText() string { + var _ms C.struct_miqt_string = C.QWebEngineContextMenuData_LinkText(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineContextMenuData) LinkUrl() *qt.QUrl { + _ret := C.QWebEngineContextMenuData_LinkUrl(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineContextMenuData) MediaUrl() *qt.QUrl { + _ret := C.QWebEngineContextMenuData_MediaUrl(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineContextMenuData) MediaType() QWebEngineContextMenuData__MediaType { + return (QWebEngineContextMenuData__MediaType)(C.QWebEngineContextMenuData_MediaType(this.h)) +} + +func (this *QWebEngineContextMenuData) IsContentEditable() bool { + return (bool)(C.QWebEngineContextMenuData_IsContentEditable(this.h)) +} + +func (this *QWebEngineContextMenuData) MisspelledWord() string { + var _ms C.struct_miqt_string = C.QWebEngineContextMenuData_MisspelledWord(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineContextMenuData) SpellCheckerSuggestions() []string { + var _ma C.struct_miqt_array = C.QWebEngineContextMenuData_SpellCheckerSuggestions(this.h) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret +} + +func (this *QWebEngineContextMenuData) MediaFlags() QWebEngineContextMenuData__MediaFlag { + return (QWebEngineContextMenuData__MediaFlag)(C.QWebEngineContextMenuData_MediaFlags(this.h)) +} + +func (this *QWebEngineContextMenuData) EditFlags() QWebEngineContextMenuData__EditFlag { + return (QWebEngineContextMenuData__EditFlag)(C.QWebEngineContextMenuData_EditFlags(this.h)) +} + +// Delete this object from C++ memory. +func (this *QWebEngineContextMenuData) Delete() { + C.QWebEngineContextMenuData_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineContextMenuData) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineContextMenuData) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webengine/gen_qwebenginecontextmenudata.h b/qt/webengine/gen_qwebenginecontextmenudata.h new file mode 100644 index 00000000..9130bda6 --- /dev/null +++ b/qt/webengine/gen_qwebenginecontextmenudata.h @@ -0,0 +1,48 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINECONTEXTMENUDATA_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINECONTEXTMENUDATA_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QPoint; +class QUrl; +class QWebEngineContextMenuData; +#else +typedef struct QPoint QPoint; +typedef struct QUrl QUrl; +typedef struct QWebEngineContextMenuData QWebEngineContextMenuData; +#endif + +void QWebEngineContextMenuData_new(QWebEngineContextMenuData** outptr_QWebEngineContextMenuData); +void QWebEngineContextMenuData_new2(QWebEngineContextMenuData* other, QWebEngineContextMenuData** outptr_QWebEngineContextMenuData); +void QWebEngineContextMenuData_OperatorAssign(QWebEngineContextMenuData* self, QWebEngineContextMenuData* other); +bool QWebEngineContextMenuData_IsValid(const QWebEngineContextMenuData* self); +QPoint* QWebEngineContextMenuData_Position(const QWebEngineContextMenuData* self); +struct miqt_string QWebEngineContextMenuData_SelectedText(const QWebEngineContextMenuData* self); +struct miqt_string QWebEngineContextMenuData_LinkText(const QWebEngineContextMenuData* self); +QUrl* QWebEngineContextMenuData_LinkUrl(const QWebEngineContextMenuData* self); +QUrl* QWebEngineContextMenuData_MediaUrl(const QWebEngineContextMenuData* self); +int QWebEngineContextMenuData_MediaType(const QWebEngineContextMenuData* self); +bool QWebEngineContextMenuData_IsContentEditable(const QWebEngineContextMenuData* self); +struct miqt_string QWebEngineContextMenuData_MisspelledWord(const QWebEngineContextMenuData* self); +struct miqt_array /* of struct miqt_string */ QWebEngineContextMenuData_SpellCheckerSuggestions(const QWebEngineContextMenuData* self); +int QWebEngineContextMenuData_MediaFlags(const QWebEngineContextMenuData* self); +int QWebEngineContextMenuData_EditFlags(const QWebEngineContextMenuData* self); +void QWebEngineContextMenuData_Delete(QWebEngineContextMenuData* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebenginecookiestore.cpp b/qt/webengine/gen_qwebenginecookiestore.cpp new file mode 100644 index 00000000..df95e5d5 --- /dev/null +++ b/qt/webengine/gen_qwebenginecookiestore.cpp @@ -0,0 +1,166 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#define WORKAROUND_INNER_CLASS_DEFINITION_QWebEngineCookieStore__FilterRequest +#include +#include "gen_qwebenginecookiestore.h" +#include "_cgo_export.h" + +QMetaObject* QWebEngineCookieStore_MetaObject(const QWebEngineCookieStore* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineCookieStore_Metacast(QWebEngineCookieStore* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineCookieStore_Tr(const char* s) { + QString _ret = QWebEngineCookieStore::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineCookieStore_TrUtf8(const char* s) { + QString _ret = QWebEngineCookieStore::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineCookieStore_SetCookie(QWebEngineCookieStore* self, QNetworkCookie* cookie) { + self->setCookie(*cookie); +} + +void QWebEngineCookieStore_DeleteCookie(QWebEngineCookieStore* self, QNetworkCookie* cookie) { + self->deleteCookie(*cookie); +} + +void QWebEngineCookieStore_DeleteSessionCookies(QWebEngineCookieStore* self) { + self->deleteSessionCookies(); +} + +void QWebEngineCookieStore_DeleteAllCookies(QWebEngineCookieStore* self) { + self->deleteAllCookies(); +} + +void QWebEngineCookieStore_LoadAllCookies(QWebEngineCookieStore* self) { + self->loadAllCookies(); +} + +void QWebEngineCookieStore_CookieAdded(QWebEngineCookieStore* self, QNetworkCookie* cookie) { + self->cookieAdded(*cookie); +} + +void QWebEngineCookieStore_connect_CookieAdded(QWebEngineCookieStore* self, intptr_t slot) { + QWebEngineCookieStore::connect(self, static_cast(&QWebEngineCookieStore::cookieAdded), self, [=](const QNetworkCookie& cookie) { + const QNetworkCookie& cookie_ret = cookie; + // Cast returned reference into pointer + QNetworkCookie* sigval1 = const_cast(&cookie_ret); + miqt_exec_callback_QWebEngineCookieStore_CookieAdded(slot, sigval1); + }); +} + +void QWebEngineCookieStore_CookieRemoved(QWebEngineCookieStore* self, QNetworkCookie* cookie) { + self->cookieRemoved(*cookie); +} + +void QWebEngineCookieStore_connect_CookieRemoved(QWebEngineCookieStore* self, intptr_t slot) { + QWebEngineCookieStore::connect(self, static_cast(&QWebEngineCookieStore::cookieRemoved), self, [=](const QNetworkCookie& cookie) { + const QNetworkCookie& cookie_ret = cookie; + // Cast returned reference into pointer + QNetworkCookie* sigval1 = const_cast(&cookie_ret); + miqt_exec_callback_QWebEngineCookieStore_CookieRemoved(slot, sigval1); + }); +} + +struct miqt_string QWebEngineCookieStore_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineCookieStore::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineCookieStore_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineCookieStore::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineCookieStore_TrUtf82(const char* s, const char* c) { + QString _ret = QWebEngineCookieStore::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineCookieStore_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebEngineCookieStore::trUtf8(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineCookieStore_SetCookie2(QWebEngineCookieStore* self, QNetworkCookie* cookie, QUrl* origin) { + self->setCookie(*cookie, *origin); +} + +void QWebEngineCookieStore_DeleteCookie2(QWebEngineCookieStore* self, QNetworkCookie* cookie, QUrl* origin) { + self->deleteCookie(*cookie, *origin); +} + +void QWebEngineCookieStore_Delete(QWebEngineCookieStore* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QWebEngineCookieStore__FilterRequest_new(QWebEngineCookieStore__FilterRequest* param1, QWebEngineCookieStore__FilterRequest** outptr_QWebEngineCookieStore__FilterRequest) { + QWebEngineCookieStore::FilterRequest* ret = new QWebEngineCookieStore::FilterRequest(*param1); + *outptr_QWebEngineCookieStore__FilterRequest = ret; +} + +void QWebEngineCookieStore__FilterRequest_OperatorAssign(QWebEngineCookieStore__FilterRequest* self, QWebEngineCookieStore__FilterRequest* param1) { + self->operator=(*param1); +} + +void QWebEngineCookieStore__FilterRequest_Delete(QWebEngineCookieStore__FilterRequest* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webengine/gen_qwebenginecookiestore.go b/qt/webengine/gen_qwebenginecookiestore.go new file mode 100644 index 00000000..c7a3af96 --- /dev/null +++ b/qt/webengine/gen_qwebenginecookiestore.go @@ -0,0 +1,274 @@ +package webengine + +/* + +#include "gen_qwebenginecookiestore.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "github.com/mappu/miqt/qt/network" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebEngineCookieStore struct { + h *C.QWebEngineCookieStore + isSubclass bool + *qt.QObject +} + +func (this *QWebEngineCookieStore) cPointer() *C.QWebEngineCookieStore { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineCookieStore) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineCookieStore constructs the type using only CGO pointers. +func newQWebEngineCookieStore(h *C.QWebEngineCookieStore, h_QObject *C.QObject) *QWebEngineCookieStore { + if h == nil { + return nil + } + return &QWebEngineCookieStore{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEngineCookieStore constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineCookieStore(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineCookieStore { + if h == nil { + return nil + } + + return &QWebEngineCookieStore{h: (*C.QWebEngineCookieStore)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +func (this *QWebEngineCookieStore) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineCookieStore_MetaObject(this.h))) +} + +func (this *QWebEngineCookieStore) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineCookieStore_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineCookieStore_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineCookieStore_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineCookieStore_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineCookieStore_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineCookieStore) SetCookie(cookie *network.QNetworkCookie) { + C.QWebEngineCookieStore_SetCookie(this.h, (*C.QNetworkCookie)(cookie.UnsafePointer())) +} + +func (this *QWebEngineCookieStore) DeleteCookie(cookie *network.QNetworkCookie) { + C.QWebEngineCookieStore_DeleteCookie(this.h, (*C.QNetworkCookie)(cookie.UnsafePointer())) +} + +func (this *QWebEngineCookieStore) DeleteSessionCookies() { + C.QWebEngineCookieStore_DeleteSessionCookies(this.h) +} + +func (this *QWebEngineCookieStore) DeleteAllCookies() { + C.QWebEngineCookieStore_DeleteAllCookies(this.h) +} + +func (this *QWebEngineCookieStore) LoadAllCookies() { + C.QWebEngineCookieStore_LoadAllCookies(this.h) +} + +func (this *QWebEngineCookieStore) CookieAdded(cookie *network.QNetworkCookie) { + C.QWebEngineCookieStore_CookieAdded(this.h, (*C.QNetworkCookie)(cookie.UnsafePointer())) +} +func (this *QWebEngineCookieStore) OnCookieAdded(slot func(cookie *network.QNetworkCookie)) { + C.QWebEngineCookieStore_connect_CookieAdded(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineCookieStore_CookieAdded +func miqt_exec_callback_QWebEngineCookieStore_CookieAdded(cb C.intptr_t, cookie *C.QNetworkCookie) { + gofunc, ok := cgo.Handle(cb).Value().(func(cookie *network.QNetworkCookie)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := network.UnsafeNewQNetworkCookie(unsafe.Pointer(cookie)) + + gofunc(slotval1) +} + +func (this *QWebEngineCookieStore) CookieRemoved(cookie *network.QNetworkCookie) { + C.QWebEngineCookieStore_CookieRemoved(this.h, (*C.QNetworkCookie)(cookie.UnsafePointer())) +} +func (this *QWebEngineCookieStore) OnCookieRemoved(slot func(cookie *network.QNetworkCookie)) { + C.QWebEngineCookieStore_connect_CookieRemoved(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineCookieStore_CookieRemoved +func miqt_exec_callback_QWebEngineCookieStore_CookieRemoved(cb C.intptr_t, cookie *C.QNetworkCookie) { + gofunc, ok := cgo.Handle(cb).Value().(func(cookie *network.QNetworkCookie)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := network.UnsafeNewQNetworkCookie(unsafe.Pointer(cookie)) + + gofunc(slotval1) +} + +func QWebEngineCookieStore_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineCookieStore_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineCookieStore_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineCookieStore_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineCookieStore_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineCookieStore_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineCookieStore_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineCookieStore_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineCookieStore) SetCookie2(cookie *network.QNetworkCookie, origin *qt.QUrl) { + C.QWebEngineCookieStore_SetCookie2(this.h, (*C.QNetworkCookie)(cookie.UnsafePointer()), (*C.QUrl)(origin.UnsafePointer())) +} + +func (this *QWebEngineCookieStore) DeleteCookie2(cookie *network.QNetworkCookie, origin *qt.QUrl) { + C.QWebEngineCookieStore_DeleteCookie2(this.h, (*C.QNetworkCookie)(cookie.UnsafePointer()), (*C.QUrl)(origin.UnsafePointer())) +} + +// Delete this object from C++ memory. +func (this *QWebEngineCookieStore) Delete() { + C.QWebEngineCookieStore_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineCookieStore) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineCookieStore) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebEngineCookieStore__FilterRequest struct { + h *C.QWebEngineCookieStore__FilterRequest + isSubclass bool +} + +func (this *QWebEngineCookieStore__FilterRequest) cPointer() *C.QWebEngineCookieStore__FilterRequest { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineCookieStore__FilterRequest) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineCookieStore__FilterRequest constructs the type using only CGO pointers. +func newQWebEngineCookieStore__FilterRequest(h *C.QWebEngineCookieStore__FilterRequest) *QWebEngineCookieStore__FilterRequest { + if h == nil { + return nil + } + return &QWebEngineCookieStore__FilterRequest{h: h} +} + +// UnsafeNewQWebEngineCookieStore__FilterRequest constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineCookieStore__FilterRequest(h unsafe.Pointer) *QWebEngineCookieStore__FilterRequest { + if h == nil { + return nil + } + + return &QWebEngineCookieStore__FilterRequest{h: (*C.QWebEngineCookieStore__FilterRequest)(h)} +} + +// NewQWebEngineCookieStore__FilterRequest constructs a new QWebEngineCookieStore::FilterRequest object. +func NewQWebEngineCookieStore__FilterRequest(param1 *QWebEngineCookieStore__FilterRequest) *QWebEngineCookieStore__FilterRequest { + var outptr_QWebEngineCookieStore__FilterRequest *C.QWebEngineCookieStore__FilterRequest = nil + + C.QWebEngineCookieStore__FilterRequest_new(param1.cPointer(), &outptr_QWebEngineCookieStore__FilterRequest) + ret := newQWebEngineCookieStore__FilterRequest(outptr_QWebEngineCookieStore__FilterRequest) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineCookieStore__FilterRequest) OperatorAssign(param1 *QWebEngineCookieStore__FilterRequest) { + C.QWebEngineCookieStore__FilterRequest_OperatorAssign(this.h, param1.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QWebEngineCookieStore__FilterRequest) Delete() { + C.QWebEngineCookieStore__FilterRequest_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineCookieStore__FilterRequest) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineCookieStore__FilterRequest) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webengine/gen_qwebenginecookiestore.h b/qt/webengine/gen_qwebenginecookiestore.h new file mode 100644 index 00000000..f61b9935 --- /dev/null +++ b/qt/webengine/gen_qwebenginecookiestore.h @@ -0,0 +1,66 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINECOOKIESTORE_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINECOOKIESTORE_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QMetaObject; +class QNetworkCookie; +class QObject; +class QUrl; +class QWebEngineCookieStore; +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebEngineCookieStore__FilterRequest) +typedef QWebEngineCookieStore::FilterRequest QWebEngineCookieStore__FilterRequest; +#else +class QWebEngineCookieStore__FilterRequest; +#endif +#else +typedef struct QMetaObject QMetaObject; +typedef struct QNetworkCookie QNetworkCookie; +typedef struct QObject QObject; +typedef struct QUrl QUrl; +typedef struct QWebEngineCookieStore QWebEngineCookieStore; +typedef struct QWebEngineCookieStore__FilterRequest QWebEngineCookieStore__FilterRequest; +#endif + +QMetaObject* QWebEngineCookieStore_MetaObject(const QWebEngineCookieStore* self); +void* QWebEngineCookieStore_Metacast(QWebEngineCookieStore* self, const char* param1); +struct miqt_string QWebEngineCookieStore_Tr(const char* s); +struct miqt_string QWebEngineCookieStore_TrUtf8(const char* s); +void QWebEngineCookieStore_SetCookie(QWebEngineCookieStore* self, QNetworkCookie* cookie); +void QWebEngineCookieStore_DeleteCookie(QWebEngineCookieStore* self, QNetworkCookie* cookie); +void QWebEngineCookieStore_DeleteSessionCookies(QWebEngineCookieStore* self); +void QWebEngineCookieStore_DeleteAllCookies(QWebEngineCookieStore* self); +void QWebEngineCookieStore_LoadAllCookies(QWebEngineCookieStore* self); +void QWebEngineCookieStore_CookieAdded(QWebEngineCookieStore* self, QNetworkCookie* cookie); +void QWebEngineCookieStore_connect_CookieAdded(QWebEngineCookieStore* self, intptr_t slot); +void QWebEngineCookieStore_CookieRemoved(QWebEngineCookieStore* self, QNetworkCookie* cookie); +void QWebEngineCookieStore_connect_CookieRemoved(QWebEngineCookieStore* self, intptr_t slot); +struct miqt_string QWebEngineCookieStore_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineCookieStore_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebEngineCookieStore_TrUtf82(const char* s, const char* c); +struct miqt_string QWebEngineCookieStore_TrUtf83(const char* s, const char* c, int n); +void QWebEngineCookieStore_SetCookie2(QWebEngineCookieStore* self, QNetworkCookie* cookie, QUrl* origin); +void QWebEngineCookieStore_DeleteCookie2(QWebEngineCookieStore* self, QNetworkCookie* cookie, QUrl* origin); +void QWebEngineCookieStore_Delete(QWebEngineCookieStore* self, bool isSubclass); + +void QWebEngineCookieStore__FilterRequest_new(QWebEngineCookieStore__FilterRequest* param1, QWebEngineCookieStore__FilterRequest** outptr_QWebEngineCookieStore__FilterRequest); +void QWebEngineCookieStore__FilterRequest_OperatorAssign(QWebEngineCookieStore__FilterRequest* self, QWebEngineCookieStore__FilterRequest* param1); +void QWebEngineCookieStore__FilterRequest_Delete(QWebEngineCookieStore__FilterRequest* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebenginedownloaditem.cpp b/qt/webengine/gen_qwebenginedownloaditem.cpp new file mode 100644 index 00000000..a4bbaa11 --- /dev/null +++ b/qt/webengine/gen_qwebenginedownloaditem.cpp @@ -0,0 +1,297 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebenginedownloaditem.h" +#include "_cgo_export.h" + +QMetaObject* QWebEngineDownloadItem_MetaObject(const QWebEngineDownloadItem* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineDownloadItem_Metacast(QWebEngineDownloadItem* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineDownloadItem_Tr(const char* s) { + QString _ret = QWebEngineDownloadItem::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineDownloadItem_TrUtf8(const char* s) { + QString _ret = QWebEngineDownloadItem::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +unsigned int QWebEngineDownloadItem_Id(const QWebEngineDownloadItem* self) { + quint32 _ret = self->id(); + return static_cast(_ret); +} + +int QWebEngineDownloadItem_State(const QWebEngineDownloadItem* self) { + QWebEngineDownloadItem::DownloadState _ret = self->state(); + return static_cast(_ret); +} + +long long QWebEngineDownloadItem_TotalBytes(const QWebEngineDownloadItem* self) { + qint64 _ret = self->totalBytes(); + return static_cast(_ret); +} + +long long QWebEngineDownloadItem_ReceivedBytes(const QWebEngineDownloadItem* self) { + qint64 _ret = self->receivedBytes(); + return static_cast(_ret); +} + +QUrl* QWebEngineDownloadItem_Url(const QWebEngineDownloadItem* self) { + return new QUrl(self->url()); +} + +struct miqt_string QWebEngineDownloadItem_MimeType(const QWebEngineDownloadItem* self) { + QString _ret = self->mimeType(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineDownloadItem_Path(const QWebEngineDownloadItem* self) { + QString _ret = self->path(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineDownloadItem_SetPath(QWebEngineDownloadItem* self, struct miqt_string path) { + QString path_QString = QString::fromUtf8(path.data, path.len); + self->setPath(path_QString); +} + +bool QWebEngineDownloadItem_IsFinished(const QWebEngineDownloadItem* self) { + return self->isFinished(); +} + +bool QWebEngineDownloadItem_IsPaused(const QWebEngineDownloadItem* self) { + return self->isPaused(); +} + +int QWebEngineDownloadItem_SavePageFormat(const QWebEngineDownloadItem* self) { + QWebEngineDownloadItem::SavePageFormat _ret = self->savePageFormat(); + return static_cast(_ret); +} + +void QWebEngineDownloadItem_SetSavePageFormat(QWebEngineDownloadItem* self, int format) { + self->setSavePageFormat(static_cast(format)); +} + +int QWebEngineDownloadItem_Type(const QWebEngineDownloadItem* self) { + QWebEngineDownloadItem::DownloadType _ret = self->type(); + return static_cast(_ret); +} + +int QWebEngineDownloadItem_InterruptReason(const QWebEngineDownloadItem* self) { + QWebEngineDownloadItem::DownloadInterruptReason _ret = self->interruptReason(); + return static_cast(_ret); +} + +struct miqt_string QWebEngineDownloadItem_InterruptReasonString(const QWebEngineDownloadItem* self) { + QString _ret = self->interruptReasonString(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QWebEngineDownloadItem_IsSavePageDownload(const QWebEngineDownloadItem* self) { + return self->isSavePageDownload(); +} + +struct miqt_string QWebEngineDownloadItem_SuggestedFileName(const QWebEngineDownloadItem* self) { + QString _ret = self->suggestedFileName(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineDownloadItem_DownloadDirectory(const QWebEngineDownloadItem* self) { + QString _ret = self->downloadDirectory(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineDownloadItem_SetDownloadDirectory(QWebEngineDownloadItem* self, struct miqt_string directory) { + QString directory_QString = QString::fromUtf8(directory.data, directory.len); + self->setDownloadDirectory(directory_QString); +} + +struct miqt_string QWebEngineDownloadItem_DownloadFileName(const QWebEngineDownloadItem* self) { + QString _ret = self->downloadFileName(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineDownloadItem_SetDownloadFileName(QWebEngineDownloadItem* self, struct miqt_string fileName) { + QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); + self->setDownloadFileName(fileName_QString); +} + +QWebEnginePage* QWebEngineDownloadItem_Page(const QWebEngineDownloadItem* self) { + return self->page(); +} + +void QWebEngineDownloadItem_Accept(QWebEngineDownloadItem* self) { + self->accept(); +} + +void QWebEngineDownloadItem_Cancel(QWebEngineDownloadItem* self) { + self->cancel(); +} + +void QWebEngineDownloadItem_Pause(QWebEngineDownloadItem* self) { + self->pause(); +} + +void QWebEngineDownloadItem_Resume(QWebEngineDownloadItem* self) { + self->resume(); +} + +void QWebEngineDownloadItem_Finished(QWebEngineDownloadItem* self) { + self->finished(); +} + +void QWebEngineDownloadItem_connect_Finished(QWebEngineDownloadItem* self, intptr_t slot) { + QWebEngineDownloadItem::connect(self, static_cast(&QWebEngineDownloadItem::finished), self, [=]() { + miqt_exec_callback_QWebEngineDownloadItem_Finished(slot); + }); +} + +void QWebEngineDownloadItem_StateChanged(QWebEngineDownloadItem* self, int state) { + self->stateChanged(static_cast(state)); +} + +void QWebEngineDownloadItem_connect_StateChanged(QWebEngineDownloadItem* self, intptr_t slot) { + QWebEngineDownloadItem::connect(self, static_cast(&QWebEngineDownloadItem::stateChanged), self, [=](QWebEngineDownloadItem::DownloadState state) { + QWebEngineDownloadItem::DownloadState state_ret = state; + int sigval1 = static_cast(state_ret); + miqt_exec_callback_QWebEngineDownloadItem_StateChanged(slot, sigval1); + }); +} + +void QWebEngineDownloadItem_DownloadProgress(QWebEngineDownloadItem* self, long long bytesReceived, long long bytesTotal) { + self->downloadProgress(static_cast(bytesReceived), static_cast(bytesTotal)); +} + +void QWebEngineDownloadItem_connect_DownloadProgress(QWebEngineDownloadItem* self, intptr_t slot) { + QWebEngineDownloadItem::connect(self, static_cast(&QWebEngineDownloadItem::downloadProgress), self, [=](qint64 bytesReceived, qint64 bytesTotal) { + qint64 bytesReceived_ret = bytesReceived; + long long sigval1 = static_cast(bytesReceived_ret); + qint64 bytesTotal_ret = bytesTotal; + long long sigval2 = static_cast(bytesTotal_ret); + miqt_exec_callback_QWebEngineDownloadItem_DownloadProgress(slot, sigval1, sigval2); + }); +} + +void QWebEngineDownloadItem_IsPausedChanged(QWebEngineDownloadItem* self, bool isPaused) { + self->isPausedChanged(isPaused); +} + +void QWebEngineDownloadItem_connect_IsPausedChanged(QWebEngineDownloadItem* self, intptr_t slot) { + QWebEngineDownloadItem::connect(self, static_cast(&QWebEngineDownloadItem::isPausedChanged), self, [=](bool isPaused) { + bool sigval1 = isPaused; + miqt_exec_callback_QWebEngineDownloadItem_IsPausedChanged(slot, sigval1); + }); +} + +struct miqt_string QWebEngineDownloadItem_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineDownloadItem::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineDownloadItem_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineDownloadItem::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineDownloadItem_TrUtf82(const char* s, const char* c) { + QString _ret = QWebEngineDownloadItem::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineDownloadItem_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebEngineDownloadItem::trUtf8(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineDownloadItem_Delete(QWebEngineDownloadItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webengine/gen_qwebenginedownloaditem.go b/qt/webengine/gen_qwebenginedownloaditem.go new file mode 100644 index 00000000..69dfa480 --- /dev/null +++ b/qt/webengine/gen_qwebenginedownloaditem.go @@ -0,0 +1,414 @@ +package webengine + +/* + +#include "gen_qwebenginedownloaditem.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebEngineDownloadItem__DownloadState int + +const ( + QWebEngineDownloadItem__DownloadRequested QWebEngineDownloadItem__DownloadState = 0 + QWebEngineDownloadItem__DownloadInProgress QWebEngineDownloadItem__DownloadState = 1 + QWebEngineDownloadItem__DownloadCompleted QWebEngineDownloadItem__DownloadState = 2 + QWebEngineDownloadItem__DownloadCancelled QWebEngineDownloadItem__DownloadState = 3 + QWebEngineDownloadItem__DownloadInterrupted QWebEngineDownloadItem__DownloadState = 4 +) + +type QWebEngineDownloadItem__SavePageFormat int + +const ( + QWebEngineDownloadItem__UnknownSaveFormat QWebEngineDownloadItem__SavePageFormat = -1 + QWebEngineDownloadItem__SingleHtmlSaveFormat QWebEngineDownloadItem__SavePageFormat = 0 + QWebEngineDownloadItem__CompleteHtmlSaveFormat QWebEngineDownloadItem__SavePageFormat = 1 + QWebEngineDownloadItem__MimeHtmlSaveFormat QWebEngineDownloadItem__SavePageFormat = 2 +) + +type QWebEngineDownloadItem__DownloadInterruptReason int + +const ( + QWebEngineDownloadItem__NoReason QWebEngineDownloadItem__DownloadInterruptReason = 0 + QWebEngineDownloadItem__FileFailed QWebEngineDownloadItem__DownloadInterruptReason = 1 + QWebEngineDownloadItem__FileAccessDenied QWebEngineDownloadItem__DownloadInterruptReason = 2 + QWebEngineDownloadItem__FileNoSpace QWebEngineDownloadItem__DownloadInterruptReason = 3 + QWebEngineDownloadItem__FileNameTooLong QWebEngineDownloadItem__DownloadInterruptReason = 5 + QWebEngineDownloadItem__FileTooLarge QWebEngineDownloadItem__DownloadInterruptReason = 6 + QWebEngineDownloadItem__FileVirusInfected QWebEngineDownloadItem__DownloadInterruptReason = 7 + QWebEngineDownloadItem__FileTransientError QWebEngineDownloadItem__DownloadInterruptReason = 10 + QWebEngineDownloadItem__FileBlocked QWebEngineDownloadItem__DownloadInterruptReason = 11 + QWebEngineDownloadItem__FileSecurityCheckFailed QWebEngineDownloadItem__DownloadInterruptReason = 12 + QWebEngineDownloadItem__FileTooShort QWebEngineDownloadItem__DownloadInterruptReason = 13 + QWebEngineDownloadItem__FileHashMismatch QWebEngineDownloadItem__DownloadInterruptReason = 14 + QWebEngineDownloadItem__NetworkFailed QWebEngineDownloadItem__DownloadInterruptReason = 20 + QWebEngineDownloadItem__NetworkTimeout QWebEngineDownloadItem__DownloadInterruptReason = 21 + QWebEngineDownloadItem__NetworkDisconnected QWebEngineDownloadItem__DownloadInterruptReason = 22 + QWebEngineDownloadItem__NetworkServerDown QWebEngineDownloadItem__DownloadInterruptReason = 23 + QWebEngineDownloadItem__NetworkInvalidRequest QWebEngineDownloadItem__DownloadInterruptReason = 24 + QWebEngineDownloadItem__ServerFailed QWebEngineDownloadItem__DownloadInterruptReason = 30 + QWebEngineDownloadItem__ServerBadContent QWebEngineDownloadItem__DownloadInterruptReason = 33 + QWebEngineDownloadItem__ServerUnauthorized QWebEngineDownloadItem__DownloadInterruptReason = 34 + QWebEngineDownloadItem__ServerCertProblem QWebEngineDownloadItem__DownloadInterruptReason = 35 + QWebEngineDownloadItem__ServerForbidden QWebEngineDownloadItem__DownloadInterruptReason = 36 + QWebEngineDownloadItem__ServerUnreachable QWebEngineDownloadItem__DownloadInterruptReason = 37 + QWebEngineDownloadItem__UserCanceled QWebEngineDownloadItem__DownloadInterruptReason = 40 +) + +type QWebEngineDownloadItem__DownloadType int + +const ( + QWebEngineDownloadItem__Attachment QWebEngineDownloadItem__DownloadType = 0 + QWebEngineDownloadItem__DownloadAttribute QWebEngineDownloadItem__DownloadType = 1 + QWebEngineDownloadItem__UserRequested QWebEngineDownloadItem__DownloadType = 2 + QWebEngineDownloadItem__SavePage QWebEngineDownloadItem__DownloadType = 3 +) + +type QWebEngineDownloadItem struct { + h *C.QWebEngineDownloadItem + isSubclass bool + *qt.QObject +} + +func (this *QWebEngineDownloadItem) cPointer() *C.QWebEngineDownloadItem { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineDownloadItem) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineDownloadItem constructs the type using only CGO pointers. +func newQWebEngineDownloadItem(h *C.QWebEngineDownloadItem, h_QObject *C.QObject) *QWebEngineDownloadItem { + if h == nil { + return nil + } + return &QWebEngineDownloadItem{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEngineDownloadItem constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineDownloadItem(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineDownloadItem { + if h == nil { + return nil + } + + return &QWebEngineDownloadItem{h: (*C.QWebEngineDownloadItem)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +func (this *QWebEngineDownloadItem) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineDownloadItem_MetaObject(this.h))) +} + +func (this *QWebEngineDownloadItem) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineDownloadItem_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineDownloadItem_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineDownloadItem_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineDownloadItem_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineDownloadItem_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineDownloadItem) Id() uint { + return (uint)(C.QWebEngineDownloadItem_Id(this.h)) +} + +func (this *QWebEngineDownloadItem) State() QWebEngineDownloadItem__DownloadState { + return (QWebEngineDownloadItem__DownloadState)(C.QWebEngineDownloadItem_State(this.h)) +} + +func (this *QWebEngineDownloadItem) TotalBytes() int64 { + return (int64)(C.QWebEngineDownloadItem_TotalBytes(this.h)) +} + +func (this *QWebEngineDownloadItem) ReceivedBytes() int64 { + return (int64)(C.QWebEngineDownloadItem_ReceivedBytes(this.h)) +} + +func (this *QWebEngineDownloadItem) Url() *qt.QUrl { + _ret := C.QWebEngineDownloadItem_Url(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineDownloadItem) MimeType() string { + var _ms C.struct_miqt_string = C.QWebEngineDownloadItem_MimeType(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineDownloadItem) Path() string { + var _ms C.struct_miqt_string = C.QWebEngineDownloadItem_Path(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineDownloadItem) SetPath(path string) { + path_ms := C.struct_miqt_string{} + path_ms.data = C.CString(path) + path_ms.len = C.size_t(len(path)) + defer C.free(unsafe.Pointer(path_ms.data)) + C.QWebEngineDownloadItem_SetPath(this.h, path_ms) +} + +func (this *QWebEngineDownloadItem) IsFinished() bool { + return (bool)(C.QWebEngineDownloadItem_IsFinished(this.h)) +} + +func (this *QWebEngineDownloadItem) IsPaused() bool { + return (bool)(C.QWebEngineDownloadItem_IsPaused(this.h)) +} + +func (this *QWebEngineDownloadItem) SavePageFormat() QWebEngineDownloadItem__SavePageFormat { + return (QWebEngineDownloadItem__SavePageFormat)(C.QWebEngineDownloadItem_SavePageFormat(this.h)) +} + +func (this *QWebEngineDownloadItem) SetSavePageFormat(format QWebEngineDownloadItem__SavePageFormat) { + C.QWebEngineDownloadItem_SetSavePageFormat(this.h, (C.int)(format)) +} + +func (this *QWebEngineDownloadItem) Type() QWebEngineDownloadItem__DownloadType { + return (QWebEngineDownloadItem__DownloadType)(C.QWebEngineDownloadItem_Type(this.h)) +} + +func (this *QWebEngineDownloadItem) InterruptReason() QWebEngineDownloadItem__DownloadInterruptReason { + return (QWebEngineDownloadItem__DownloadInterruptReason)(C.QWebEngineDownloadItem_InterruptReason(this.h)) +} + +func (this *QWebEngineDownloadItem) InterruptReasonString() string { + var _ms C.struct_miqt_string = C.QWebEngineDownloadItem_InterruptReasonString(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineDownloadItem) IsSavePageDownload() bool { + return (bool)(C.QWebEngineDownloadItem_IsSavePageDownload(this.h)) +} + +func (this *QWebEngineDownloadItem) SuggestedFileName() string { + var _ms C.struct_miqt_string = C.QWebEngineDownloadItem_SuggestedFileName(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineDownloadItem) DownloadDirectory() string { + var _ms C.struct_miqt_string = C.QWebEngineDownloadItem_DownloadDirectory(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineDownloadItem) SetDownloadDirectory(directory string) { + directory_ms := C.struct_miqt_string{} + directory_ms.data = C.CString(directory) + directory_ms.len = C.size_t(len(directory)) + defer C.free(unsafe.Pointer(directory_ms.data)) + C.QWebEngineDownloadItem_SetDownloadDirectory(this.h, directory_ms) +} + +func (this *QWebEngineDownloadItem) DownloadFileName() string { + var _ms C.struct_miqt_string = C.QWebEngineDownloadItem_DownloadFileName(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineDownloadItem) SetDownloadFileName(fileName string) { + fileName_ms := C.struct_miqt_string{} + fileName_ms.data = C.CString(fileName) + fileName_ms.len = C.size_t(len(fileName)) + defer C.free(unsafe.Pointer(fileName_ms.data)) + C.QWebEngineDownloadItem_SetDownloadFileName(this.h, fileName_ms) +} + +func (this *QWebEngineDownloadItem) Page() *QWebEnginePage { + return UnsafeNewQWebEnginePage(unsafe.Pointer(C.QWebEngineDownloadItem_Page(this.h)), nil) +} + +func (this *QWebEngineDownloadItem) Accept() { + C.QWebEngineDownloadItem_Accept(this.h) +} + +func (this *QWebEngineDownloadItem) Cancel() { + C.QWebEngineDownloadItem_Cancel(this.h) +} + +func (this *QWebEngineDownloadItem) Pause() { + C.QWebEngineDownloadItem_Pause(this.h) +} + +func (this *QWebEngineDownloadItem) Resume() { + C.QWebEngineDownloadItem_Resume(this.h) +} + +func (this *QWebEngineDownloadItem) Finished() { + C.QWebEngineDownloadItem_Finished(this.h) +} +func (this *QWebEngineDownloadItem) OnFinished(slot func()) { + C.QWebEngineDownloadItem_connect_Finished(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineDownloadItem_Finished +func miqt_exec_callback_QWebEngineDownloadItem_Finished(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEngineDownloadItem) StateChanged(state QWebEngineDownloadItem__DownloadState) { + C.QWebEngineDownloadItem_StateChanged(this.h, (C.int)(state)) +} +func (this *QWebEngineDownloadItem) OnStateChanged(slot func(state QWebEngineDownloadItem__DownloadState)) { + C.QWebEngineDownloadItem_connect_StateChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineDownloadItem_StateChanged +func miqt_exec_callback_QWebEngineDownloadItem_StateChanged(cb C.intptr_t, state C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(state QWebEngineDownloadItem__DownloadState)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebEngineDownloadItem__DownloadState)(state) + + gofunc(slotval1) +} + +func (this *QWebEngineDownloadItem) DownloadProgress(bytesReceived int64, bytesTotal int64) { + C.QWebEngineDownloadItem_DownloadProgress(this.h, (C.longlong)(bytesReceived), (C.longlong)(bytesTotal)) +} +func (this *QWebEngineDownloadItem) OnDownloadProgress(slot func(bytesReceived int64, bytesTotal int64)) { + C.QWebEngineDownloadItem_connect_DownloadProgress(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineDownloadItem_DownloadProgress +func miqt_exec_callback_QWebEngineDownloadItem_DownloadProgress(cb C.intptr_t, bytesReceived C.longlong, bytesTotal C.longlong) { + gofunc, ok := cgo.Handle(cb).Value().(func(bytesReceived int64, bytesTotal int64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(bytesReceived) + + slotval2 := (int64)(bytesTotal) + + gofunc(slotval1, slotval2) +} + +func (this *QWebEngineDownloadItem) IsPausedChanged(isPaused bool) { + C.QWebEngineDownloadItem_IsPausedChanged(this.h, (C.bool)(isPaused)) +} +func (this *QWebEngineDownloadItem) OnIsPausedChanged(slot func(isPaused bool)) { + C.QWebEngineDownloadItem_connect_IsPausedChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineDownloadItem_IsPausedChanged +func miqt_exec_callback_QWebEngineDownloadItem_IsPausedChanged(cb C.intptr_t, isPaused C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(isPaused bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(isPaused) + + gofunc(slotval1) +} + +func QWebEngineDownloadItem_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineDownloadItem_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineDownloadItem_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineDownloadItem_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineDownloadItem_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineDownloadItem_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineDownloadItem_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineDownloadItem_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebEngineDownloadItem) Delete() { + C.QWebEngineDownloadItem_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineDownloadItem) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineDownloadItem) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webengine/gen_qwebenginedownloaditem.h b/qt/webengine/gen_qwebenginedownloaditem.h new file mode 100644 index 00000000..eb5494e6 --- /dev/null +++ b/qt/webengine/gen_qwebenginedownloaditem.h @@ -0,0 +1,79 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEDOWNLOADITEM_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEDOWNLOADITEM_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QMetaObject; +class QObject; +class QUrl; +class QWebEngineDownloadItem; +class QWebEnginePage; +#else +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QUrl QUrl; +typedef struct QWebEngineDownloadItem QWebEngineDownloadItem; +typedef struct QWebEnginePage QWebEnginePage; +#endif + +QMetaObject* QWebEngineDownloadItem_MetaObject(const QWebEngineDownloadItem* self); +void* QWebEngineDownloadItem_Metacast(QWebEngineDownloadItem* self, const char* param1); +struct miqt_string QWebEngineDownloadItem_Tr(const char* s); +struct miqt_string QWebEngineDownloadItem_TrUtf8(const char* s); +unsigned int QWebEngineDownloadItem_Id(const QWebEngineDownloadItem* self); +int QWebEngineDownloadItem_State(const QWebEngineDownloadItem* self); +long long QWebEngineDownloadItem_TotalBytes(const QWebEngineDownloadItem* self); +long long QWebEngineDownloadItem_ReceivedBytes(const QWebEngineDownloadItem* self); +QUrl* QWebEngineDownloadItem_Url(const QWebEngineDownloadItem* self); +struct miqt_string QWebEngineDownloadItem_MimeType(const QWebEngineDownloadItem* self); +struct miqt_string QWebEngineDownloadItem_Path(const QWebEngineDownloadItem* self); +void QWebEngineDownloadItem_SetPath(QWebEngineDownloadItem* self, struct miqt_string path); +bool QWebEngineDownloadItem_IsFinished(const QWebEngineDownloadItem* self); +bool QWebEngineDownloadItem_IsPaused(const QWebEngineDownloadItem* self); +int QWebEngineDownloadItem_SavePageFormat(const QWebEngineDownloadItem* self); +void QWebEngineDownloadItem_SetSavePageFormat(QWebEngineDownloadItem* self, int format); +int QWebEngineDownloadItem_Type(const QWebEngineDownloadItem* self); +int QWebEngineDownloadItem_InterruptReason(const QWebEngineDownloadItem* self); +struct miqt_string QWebEngineDownloadItem_InterruptReasonString(const QWebEngineDownloadItem* self); +bool QWebEngineDownloadItem_IsSavePageDownload(const QWebEngineDownloadItem* self); +struct miqt_string QWebEngineDownloadItem_SuggestedFileName(const QWebEngineDownloadItem* self); +struct miqt_string QWebEngineDownloadItem_DownloadDirectory(const QWebEngineDownloadItem* self); +void QWebEngineDownloadItem_SetDownloadDirectory(QWebEngineDownloadItem* self, struct miqt_string directory); +struct miqt_string QWebEngineDownloadItem_DownloadFileName(const QWebEngineDownloadItem* self); +void QWebEngineDownloadItem_SetDownloadFileName(QWebEngineDownloadItem* self, struct miqt_string fileName); +QWebEnginePage* QWebEngineDownloadItem_Page(const QWebEngineDownloadItem* self); +void QWebEngineDownloadItem_Accept(QWebEngineDownloadItem* self); +void QWebEngineDownloadItem_Cancel(QWebEngineDownloadItem* self); +void QWebEngineDownloadItem_Pause(QWebEngineDownloadItem* self); +void QWebEngineDownloadItem_Resume(QWebEngineDownloadItem* self); +void QWebEngineDownloadItem_Finished(QWebEngineDownloadItem* self); +void QWebEngineDownloadItem_connect_Finished(QWebEngineDownloadItem* self, intptr_t slot); +void QWebEngineDownloadItem_StateChanged(QWebEngineDownloadItem* self, int state); +void QWebEngineDownloadItem_connect_StateChanged(QWebEngineDownloadItem* self, intptr_t slot); +void QWebEngineDownloadItem_DownloadProgress(QWebEngineDownloadItem* self, long long bytesReceived, long long bytesTotal); +void QWebEngineDownloadItem_connect_DownloadProgress(QWebEngineDownloadItem* self, intptr_t slot); +void QWebEngineDownloadItem_IsPausedChanged(QWebEngineDownloadItem* self, bool isPaused); +void QWebEngineDownloadItem_connect_IsPausedChanged(QWebEngineDownloadItem* self, intptr_t slot); +struct miqt_string QWebEngineDownloadItem_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineDownloadItem_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebEngineDownloadItem_TrUtf82(const char* s, const char* c); +struct miqt_string QWebEngineDownloadItem_TrUtf83(const char* s, const char* c, int n); +void QWebEngineDownloadItem_Delete(QWebEngineDownloadItem* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebenginefindtextresult.cpp b/qt/webengine/gen_qwebenginefindtextresult.cpp new file mode 100644 index 00000000..855ab8f3 --- /dev/null +++ b/qt/webengine/gen_qwebenginefindtextresult.cpp @@ -0,0 +1,35 @@ +#include +#include +#include "gen_qwebenginefindtextresult.h" +#include "_cgo_export.h" + +void QWebEngineFindTextResult_new(QWebEngineFindTextResult** outptr_QWebEngineFindTextResult) { + QWebEngineFindTextResult* ret = new QWebEngineFindTextResult(); + *outptr_QWebEngineFindTextResult = ret; +} + +void QWebEngineFindTextResult_new2(QWebEngineFindTextResult* other, QWebEngineFindTextResult** outptr_QWebEngineFindTextResult) { + QWebEngineFindTextResult* ret = new QWebEngineFindTextResult(*other); + *outptr_QWebEngineFindTextResult = ret; +} + +int QWebEngineFindTextResult_NumberOfMatches(const QWebEngineFindTextResult* self) { + return self->numberOfMatches(); +} + +int QWebEngineFindTextResult_ActiveMatch(const QWebEngineFindTextResult* self) { + return self->activeMatch(); +} + +void QWebEngineFindTextResult_OperatorAssign(QWebEngineFindTextResult* self, QWebEngineFindTextResult* other) { + self->operator=(*other); +} + +void QWebEngineFindTextResult_Delete(QWebEngineFindTextResult* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webengine/gen_qwebenginefindtextresult.go b/qt/webengine/gen_qwebenginefindtextresult.go new file mode 100644 index 00000000..bff61d4a --- /dev/null +++ b/qt/webengine/gen_qwebenginefindtextresult.go @@ -0,0 +1,96 @@ +package webengine + +/* + +#include "gen_qwebenginefindtextresult.h" +#include + +*/ +import "C" + +import ( + "runtime" + "unsafe" +) + +type QWebEngineFindTextResult struct { + h *C.QWebEngineFindTextResult + isSubclass bool +} + +func (this *QWebEngineFindTextResult) cPointer() *C.QWebEngineFindTextResult { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineFindTextResult) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineFindTextResult constructs the type using only CGO pointers. +func newQWebEngineFindTextResult(h *C.QWebEngineFindTextResult) *QWebEngineFindTextResult { + if h == nil { + return nil + } + return &QWebEngineFindTextResult{h: h} +} + +// UnsafeNewQWebEngineFindTextResult constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineFindTextResult(h unsafe.Pointer) *QWebEngineFindTextResult { + if h == nil { + return nil + } + + return &QWebEngineFindTextResult{h: (*C.QWebEngineFindTextResult)(h)} +} + +// NewQWebEngineFindTextResult constructs a new QWebEngineFindTextResult object. +func NewQWebEngineFindTextResult() *QWebEngineFindTextResult { + var outptr_QWebEngineFindTextResult *C.QWebEngineFindTextResult = nil + + C.QWebEngineFindTextResult_new(&outptr_QWebEngineFindTextResult) + ret := newQWebEngineFindTextResult(outptr_QWebEngineFindTextResult) + ret.isSubclass = true + return ret +} + +// NewQWebEngineFindTextResult2 constructs a new QWebEngineFindTextResult object. +func NewQWebEngineFindTextResult2(other *QWebEngineFindTextResult) *QWebEngineFindTextResult { + var outptr_QWebEngineFindTextResult *C.QWebEngineFindTextResult = nil + + C.QWebEngineFindTextResult_new2(other.cPointer(), &outptr_QWebEngineFindTextResult) + ret := newQWebEngineFindTextResult(outptr_QWebEngineFindTextResult) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineFindTextResult) NumberOfMatches() int { + return (int)(C.QWebEngineFindTextResult_NumberOfMatches(this.h)) +} + +func (this *QWebEngineFindTextResult) ActiveMatch() int { + return (int)(C.QWebEngineFindTextResult_ActiveMatch(this.h)) +} + +func (this *QWebEngineFindTextResult) OperatorAssign(other *QWebEngineFindTextResult) { + C.QWebEngineFindTextResult_OperatorAssign(this.h, other.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QWebEngineFindTextResult) Delete() { + C.QWebEngineFindTextResult_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineFindTextResult) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineFindTextResult) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webengine/gen_qwebenginefindtextresult.h b/qt/webengine/gen_qwebenginefindtextresult.h new file mode 100644 index 00000000..e2343961 --- /dev/null +++ b/qt/webengine/gen_qwebenginefindtextresult.h @@ -0,0 +1,34 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEFINDTEXTRESULT_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEFINDTEXTRESULT_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QWebEngineFindTextResult; +#else +typedef struct QWebEngineFindTextResult QWebEngineFindTextResult; +#endif + +void QWebEngineFindTextResult_new(QWebEngineFindTextResult** outptr_QWebEngineFindTextResult); +void QWebEngineFindTextResult_new2(QWebEngineFindTextResult* other, QWebEngineFindTextResult** outptr_QWebEngineFindTextResult); +int QWebEngineFindTextResult_NumberOfMatches(const QWebEngineFindTextResult* self); +int QWebEngineFindTextResult_ActiveMatch(const QWebEngineFindTextResult* self); +void QWebEngineFindTextResult_OperatorAssign(QWebEngineFindTextResult* self, QWebEngineFindTextResult* other); +void QWebEngineFindTextResult_Delete(QWebEngineFindTextResult* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebenginefullscreenrequest.cpp b/qt/webengine/gen_qwebenginefullscreenrequest.cpp new file mode 100644 index 00000000..05e39d4e --- /dev/null +++ b/qt/webengine/gen_qwebenginefullscreenrequest.cpp @@ -0,0 +1,37 @@ +#include +#include +#include +#include "gen_qwebenginefullscreenrequest.h" +#include "_cgo_export.h" + +void QWebEngineFullScreenRequest_new(QWebEngineFullScreenRequest* param1, QWebEngineFullScreenRequest** outptr_QWebEngineFullScreenRequest) { + QWebEngineFullScreenRequest* ret = new QWebEngineFullScreenRequest(*param1); + *outptr_QWebEngineFullScreenRequest = ret; +} + +void QWebEngineFullScreenRequest_Reject(QWebEngineFullScreenRequest* self) { + self->reject(); +} + +void QWebEngineFullScreenRequest_Accept(QWebEngineFullScreenRequest* self) { + self->accept(); +} + +bool QWebEngineFullScreenRequest_ToggleOn(const QWebEngineFullScreenRequest* self) { + return self->toggleOn(); +} + +QUrl* QWebEngineFullScreenRequest_Origin(const QWebEngineFullScreenRequest* self) { + const QUrl& _ret = self->origin(); + // Cast returned reference into pointer + return const_cast(&_ret); +} + +void QWebEngineFullScreenRequest_Delete(QWebEngineFullScreenRequest* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webengine/gen_qwebenginefullscreenrequest.go b/qt/webengine/gen_qwebenginefullscreenrequest.go new file mode 100644 index 00000000..d42ad018 --- /dev/null +++ b/qt/webengine/gen_qwebenginefullscreenrequest.go @@ -0,0 +1,91 @@ +package webengine + +/* + +#include "gen_qwebenginefullscreenrequest.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "unsafe" +) + +type QWebEngineFullScreenRequest struct { + h *C.QWebEngineFullScreenRequest + isSubclass bool +} + +func (this *QWebEngineFullScreenRequest) cPointer() *C.QWebEngineFullScreenRequest { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineFullScreenRequest) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineFullScreenRequest constructs the type using only CGO pointers. +func newQWebEngineFullScreenRequest(h *C.QWebEngineFullScreenRequest) *QWebEngineFullScreenRequest { + if h == nil { + return nil + } + return &QWebEngineFullScreenRequest{h: h} +} + +// UnsafeNewQWebEngineFullScreenRequest constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineFullScreenRequest(h unsafe.Pointer) *QWebEngineFullScreenRequest { + if h == nil { + return nil + } + + return &QWebEngineFullScreenRequest{h: (*C.QWebEngineFullScreenRequest)(h)} +} + +// NewQWebEngineFullScreenRequest constructs a new QWebEngineFullScreenRequest object. +func NewQWebEngineFullScreenRequest(param1 *QWebEngineFullScreenRequest) *QWebEngineFullScreenRequest { + var outptr_QWebEngineFullScreenRequest *C.QWebEngineFullScreenRequest = nil + + C.QWebEngineFullScreenRequest_new(param1.cPointer(), &outptr_QWebEngineFullScreenRequest) + ret := newQWebEngineFullScreenRequest(outptr_QWebEngineFullScreenRequest) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineFullScreenRequest) Reject() { + C.QWebEngineFullScreenRequest_Reject(this.h) +} + +func (this *QWebEngineFullScreenRequest) Accept() { + C.QWebEngineFullScreenRequest_Accept(this.h) +} + +func (this *QWebEngineFullScreenRequest) ToggleOn() bool { + return (bool)(C.QWebEngineFullScreenRequest_ToggleOn(this.h)) +} + +func (this *QWebEngineFullScreenRequest) Origin() *qt.QUrl { + return qt.UnsafeNewQUrl(unsafe.Pointer(C.QWebEngineFullScreenRequest_Origin(this.h))) +} + +// Delete this object from C++ memory. +func (this *QWebEngineFullScreenRequest) Delete() { + C.QWebEngineFullScreenRequest_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineFullScreenRequest) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineFullScreenRequest) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webengine/gen_qwebenginefullscreenrequest.h b/qt/webengine/gen_qwebenginefullscreenrequest.h new file mode 100644 index 00000000..2253dca5 --- /dev/null +++ b/qt/webengine/gen_qwebenginefullscreenrequest.h @@ -0,0 +1,36 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEFULLSCREENREQUEST_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEFULLSCREENREQUEST_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QUrl; +class QWebEngineFullScreenRequest; +#else +typedef struct QUrl QUrl; +typedef struct QWebEngineFullScreenRequest QWebEngineFullScreenRequest; +#endif + +void QWebEngineFullScreenRequest_new(QWebEngineFullScreenRequest* param1, QWebEngineFullScreenRequest** outptr_QWebEngineFullScreenRequest); +void QWebEngineFullScreenRequest_Reject(QWebEngineFullScreenRequest* self); +void QWebEngineFullScreenRequest_Accept(QWebEngineFullScreenRequest* self); +bool QWebEngineFullScreenRequest_ToggleOn(const QWebEngineFullScreenRequest* self); +QUrl* QWebEngineFullScreenRequest_Origin(const QWebEngineFullScreenRequest* self); +void QWebEngineFullScreenRequest_Delete(QWebEngineFullScreenRequest* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebenginehistory.cpp b/qt/webengine/gen_qwebenginehistory.cpp new file mode 100644 index 00000000..6c47d6af --- /dev/null +++ b/qt/webengine/gen_qwebenginehistory.cpp @@ -0,0 +1,151 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebenginehistory.h" +#include "_cgo_export.h" + +void QWebEngineHistoryItem_new(QWebEngineHistoryItem* other, QWebEngineHistoryItem** outptr_QWebEngineHistoryItem) { + QWebEngineHistoryItem* ret = new QWebEngineHistoryItem(*other); + *outptr_QWebEngineHistoryItem = ret; +} + +void QWebEngineHistoryItem_OperatorAssign(QWebEngineHistoryItem* self, QWebEngineHistoryItem* other) { + self->operator=(*other); +} + +QUrl* QWebEngineHistoryItem_OriginalUrl(const QWebEngineHistoryItem* self) { + return new QUrl(self->originalUrl()); +} + +QUrl* QWebEngineHistoryItem_Url(const QWebEngineHistoryItem* self) { + return new QUrl(self->url()); +} + +struct miqt_string QWebEngineHistoryItem_Title(const QWebEngineHistoryItem* self) { + QString _ret = self->title(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QDateTime* QWebEngineHistoryItem_LastVisited(const QWebEngineHistoryItem* self) { + return new QDateTime(self->lastVisited()); +} + +QUrl* QWebEngineHistoryItem_IconUrl(const QWebEngineHistoryItem* self) { + return new QUrl(self->iconUrl()); +} + +bool QWebEngineHistoryItem_IsValid(const QWebEngineHistoryItem* self) { + return self->isValid(); +} + +void QWebEngineHistoryItem_Swap(QWebEngineHistoryItem* self, QWebEngineHistoryItem* other) { + self->swap(*other); +} + +void QWebEngineHistoryItem_Delete(QWebEngineHistoryItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QWebEngineHistory_Clear(QWebEngineHistory* self) { + self->clear(); +} + +struct miqt_array /* of QWebEngineHistoryItem* */ QWebEngineHistory_Items(const QWebEngineHistory* self) { + QList _ret = self->items(); + // Convert QList<> from C++ memory to manually-managed C memory + QWebEngineHistoryItem** _arr = static_cast(malloc(sizeof(QWebEngineHistoryItem*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QWebEngineHistoryItem(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +struct miqt_array /* of QWebEngineHistoryItem* */ QWebEngineHistory_BackItems(const QWebEngineHistory* self, int maxItems) { + QList _ret = self->backItems(static_cast(maxItems)); + // Convert QList<> from C++ memory to manually-managed C memory + QWebEngineHistoryItem** _arr = static_cast(malloc(sizeof(QWebEngineHistoryItem*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QWebEngineHistoryItem(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +struct miqt_array /* of QWebEngineHistoryItem* */ QWebEngineHistory_ForwardItems(const QWebEngineHistory* self, int maxItems) { + QList _ret = self->forwardItems(static_cast(maxItems)); + // Convert QList<> from C++ memory to manually-managed C memory + QWebEngineHistoryItem** _arr = static_cast(malloc(sizeof(QWebEngineHistoryItem*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QWebEngineHistoryItem(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +bool QWebEngineHistory_CanGoBack(const QWebEngineHistory* self) { + return self->canGoBack(); +} + +bool QWebEngineHistory_CanGoForward(const QWebEngineHistory* self) { + return self->canGoForward(); +} + +void QWebEngineHistory_Back(QWebEngineHistory* self) { + self->back(); +} + +void QWebEngineHistory_Forward(QWebEngineHistory* self) { + self->forward(); +} + +void QWebEngineHistory_GoToItem(QWebEngineHistory* self, QWebEngineHistoryItem* item) { + self->goToItem(*item); +} + +QWebEngineHistoryItem* QWebEngineHistory_BackItem(const QWebEngineHistory* self) { + return new QWebEngineHistoryItem(self->backItem()); +} + +QWebEngineHistoryItem* QWebEngineHistory_CurrentItem(const QWebEngineHistory* self) { + return new QWebEngineHistoryItem(self->currentItem()); +} + +QWebEngineHistoryItem* QWebEngineHistory_ForwardItem(const QWebEngineHistory* self) { + return new QWebEngineHistoryItem(self->forwardItem()); +} + +QWebEngineHistoryItem* QWebEngineHistory_ItemAt(const QWebEngineHistory* self, int i) { + return new QWebEngineHistoryItem(self->itemAt(static_cast(i))); +} + +int QWebEngineHistory_CurrentItemIndex(const QWebEngineHistory* self) { + return self->currentItemIndex(); +} + +int QWebEngineHistory_Count(const QWebEngineHistory* self) { + return self->count(); +} + diff --git a/qt/webengine/gen_qwebenginehistory.go b/qt/webengine/gen_qwebenginehistory.go new file mode 100644 index 00000000..3e2f7f2b --- /dev/null +++ b/qt/webengine/gen_qwebenginehistory.go @@ -0,0 +1,257 @@ +package webengine + +/* + +#include "gen_qwebenginehistory.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "unsafe" +) + +type QWebEngineHistoryItem struct { + h *C.QWebEngineHistoryItem + isSubclass bool +} + +func (this *QWebEngineHistoryItem) cPointer() *C.QWebEngineHistoryItem { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineHistoryItem) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineHistoryItem constructs the type using only CGO pointers. +func newQWebEngineHistoryItem(h *C.QWebEngineHistoryItem) *QWebEngineHistoryItem { + if h == nil { + return nil + } + return &QWebEngineHistoryItem{h: h} +} + +// UnsafeNewQWebEngineHistoryItem constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineHistoryItem(h unsafe.Pointer) *QWebEngineHistoryItem { + if h == nil { + return nil + } + + return &QWebEngineHistoryItem{h: (*C.QWebEngineHistoryItem)(h)} +} + +// NewQWebEngineHistoryItem constructs a new QWebEngineHistoryItem object. +func NewQWebEngineHistoryItem(other *QWebEngineHistoryItem) *QWebEngineHistoryItem { + var outptr_QWebEngineHistoryItem *C.QWebEngineHistoryItem = nil + + C.QWebEngineHistoryItem_new(other.cPointer(), &outptr_QWebEngineHistoryItem) + ret := newQWebEngineHistoryItem(outptr_QWebEngineHistoryItem) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineHistoryItem) OperatorAssign(other *QWebEngineHistoryItem) { + C.QWebEngineHistoryItem_OperatorAssign(this.h, other.cPointer()) +} + +func (this *QWebEngineHistoryItem) OriginalUrl() *qt.QUrl { + _ret := C.QWebEngineHistoryItem_OriginalUrl(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHistoryItem) Url() *qt.QUrl { + _ret := C.QWebEngineHistoryItem_Url(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHistoryItem) Title() string { + var _ms C.struct_miqt_string = C.QWebEngineHistoryItem_Title(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineHistoryItem) LastVisited() *qt.QDateTime { + _ret := C.QWebEngineHistoryItem_LastVisited(this.h) + _goptr := qt.UnsafeNewQDateTime(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHistoryItem) IconUrl() *qt.QUrl { + _ret := C.QWebEngineHistoryItem_IconUrl(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHistoryItem) IsValid() bool { + return (bool)(C.QWebEngineHistoryItem_IsValid(this.h)) +} + +func (this *QWebEngineHistoryItem) Swap(other *QWebEngineHistoryItem) { + C.QWebEngineHistoryItem_Swap(this.h, other.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QWebEngineHistoryItem) Delete() { + C.QWebEngineHistoryItem_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineHistoryItem) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineHistoryItem) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebEngineHistory struct { + h *C.QWebEngineHistory + isSubclass bool +} + +func (this *QWebEngineHistory) cPointer() *C.QWebEngineHistory { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineHistory) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineHistory constructs the type using only CGO pointers. +func newQWebEngineHistory(h *C.QWebEngineHistory) *QWebEngineHistory { + if h == nil { + return nil + } + return &QWebEngineHistory{h: h} +} + +// UnsafeNewQWebEngineHistory constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineHistory(h unsafe.Pointer) *QWebEngineHistory { + if h == nil { + return nil + } + + return &QWebEngineHistory{h: (*C.QWebEngineHistory)(h)} +} + +func (this *QWebEngineHistory) Clear() { + C.QWebEngineHistory_Clear(this.h) +} + +func (this *QWebEngineHistory) Items() []QWebEngineHistoryItem { + var _ma C.struct_miqt_array = C.QWebEngineHistory_Items(this.h) + _ret := make([]QWebEngineHistoryItem, int(_ma.len)) + _outCast := (*[0xffff]*C.QWebEngineHistoryItem)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQWebEngineHistoryItem(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret +} + +func (this *QWebEngineHistory) BackItems(maxItems int) []QWebEngineHistoryItem { + var _ma C.struct_miqt_array = C.QWebEngineHistory_BackItems(this.h, (C.int)(maxItems)) + _ret := make([]QWebEngineHistoryItem, int(_ma.len)) + _outCast := (*[0xffff]*C.QWebEngineHistoryItem)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQWebEngineHistoryItem(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret +} + +func (this *QWebEngineHistory) ForwardItems(maxItems int) []QWebEngineHistoryItem { + var _ma C.struct_miqt_array = C.QWebEngineHistory_ForwardItems(this.h, (C.int)(maxItems)) + _ret := make([]QWebEngineHistoryItem, int(_ma.len)) + _outCast := (*[0xffff]*C.QWebEngineHistoryItem)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQWebEngineHistoryItem(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret +} + +func (this *QWebEngineHistory) CanGoBack() bool { + return (bool)(C.QWebEngineHistory_CanGoBack(this.h)) +} + +func (this *QWebEngineHistory) CanGoForward() bool { + return (bool)(C.QWebEngineHistory_CanGoForward(this.h)) +} + +func (this *QWebEngineHistory) Back() { + C.QWebEngineHistory_Back(this.h) +} + +func (this *QWebEngineHistory) Forward() { + C.QWebEngineHistory_Forward(this.h) +} + +func (this *QWebEngineHistory) GoToItem(item *QWebEngineHistoryItem) { + C.QWebEngineHistory_GoToItem(this.h, item.cPointer()) +} + +func (this *QWebEngineHistory) BackItem() *QWebEngineHistoryItem { + _ret := C.QWebEngineHistory_BackItem(this.h) + _goptr := newQWebEngineHistoryItem(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHistory) CurrentItem() *QWebEngineHistoryItem { + _ret := C.QWebEngineHistory_CurrentItem(this.h) + _goptr := newQWebEngineHistoryItem(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHistory) ForwardItem() *QWebEngineHistoryItem { + _ret := C.QWebEngineHistory_ForwardItem(this.h) + _goptr := newQWebEngineHistoryItem(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHistory) ItemAt(i int) *QWebEngineHistoryItem { + _ret := C.QWebEngineHistory_ItemAt(this.h, (C.int)(i)) + _goptr := newQWebEngineHistoryItem(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHistory) CurrentItemIndex() int { + return (int)(C.QWebEngineHistory_CurrentItemIndex(this.h)) +} + +func (this *QWebEngineHistory) Count() int { + return (int)(C.QWebEngineHistory_Count(this.h)) +} diff --git a/qt/webengine/gen_qwebenginehistory.h b/qt/webengine/gen_qwebenginehistory.h new file mode 100644 index 00000000..d01ebd29 --- /dev/null +++ b/qt/webengine/gen_qwebenginehistory.h @@ -0,0 +1,60 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEHISTORY_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEHISTORY_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QDateTime; +class QUrl; +class QWebEngineHistory; +class QWebEngineHistoryItem; +#else +typedef struct QDateTime QDateTime; +typedef struct QUrl QUrl; +typedef struct QWebEngineHistory QWebEngineHistory; +typedef struct QWebEngineHistoryItem QWebEngineHistoryItem; +#endif + +void QWebEngineHistoryItem_new(QWebEngineHistoryItem* other, QWebEngineHistoryItem** outptr_QWebEngineHistoryItem); +void QWebEngineHistoryItem_OperatorAssign(QWebEngineHistoryItem* self, QWebEngineHistoryItem* other); +QUrl* QWebEngineHistoryItem_OriginalUrl(const QWebEngineHistoryItem* self); +QUrl* QWebEngineHistoryItem_Url(const QWebEngineHistoryItem* self); +struct miqt_string QWebEngineHistoryItem_Title(const QWebEngineHistoryItem* self); +QDateTime* QWebEngineHistoryItem_LastVisited(const QWebEngineHistoryItem* self); +QUrl* QWebEngineHistoryItem_IconUrl(const QWebEngineHistoryItem* self); +bool QWebEngineHistoryItem_IsValid(const QWebEngineHistoryItem* self); +void QWebEngineHistoryItem_Swap(QWebEngineHistoryItem* self, QWebEngineHistoryItem* other); +void QWebEngineHistoryItem_Delete(QWebEngineHistoryItem* self, bool isSubclass); + +void QWebEngineHistory_Clear(QWebEngineHistory* self); +struct miqt_array /* of QWebEngineHistoryItem* */ QWebEngineHistory_Items(const QWebEngineHistory* self); +struct miqt_array /* of QWebEngineHistoryItem* */ QWebEngineHistory_BackItems(const QWebEngineHistory* self, int maxItems); +struct miqt_array /* of QWebEngineHistoryItem* */ QWebEngineHistory_ForwardItems(const QWebEngineHistory* self, int maxItems); +bool QWebEngineHistory_CanGoBack(const QWebEngineHistory* self); +bool QWebEngineHistory_CanGoForward(const QWebEngineHistory* self); +void QWebEngineHistory_Back(QWebEngineHistory* self); +void QWebEngineHistory_Forward(QWebEngineHistory* self); +void QWebEngineHistory_GoToItem(QWebEngineHistory* self, QWebEngineHistoryItem* item); +QWebEngineHistoryItem* QWebEngineHistory_BackItem(const QWebEngineHistory* self); +QWebEngineHistoryItem* QWebEngineHistory_CurrentItem(const QWebEngineHistory* self); +QWebEngineHistoryItem* QWebEngineHistory_ForwardItem(const QWebEngineHistory* self); +QWebEngineHistoryItem* QWebEngineHistory_ItemAt(const QWebEngineHistory* self, int i); +int QWebEngineHistory_CurrentItemIndex(const QWebEngineHistory* self); +int QWebEngineHistory_Count(const QWebEngineHistory* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebenginehttprequest.cpp b/qt/webengine/gen_qwebenginehttprequest.cpp new file mode 100644 index 00000000..742a7809 --- /dev/null +++ b/qt/webengine/gen_qwebenginehttprequest.cpp @@ -0,0 +1,143 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebenginehttprequest.h" +#include "_cgo_export.h" + +void QWebEngineHttpRequest_new(QWebEngineHttpRequest** outptr_QWebEngineHttpRequest) { + QWebEngineHttpRequest* ret = new QWebEngineHttpRequest(); + *outptr_QWebEngineHttpRequest = ret; +} + +void QWebEngineHttpRequest_new2(QWebEngineHttpRequest* other, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest) { + QWebEngineHttpRequest* ret = new QWebEngineHttpRequest(*other); + *outptr_QWebEngineHttpRequest = ret; +} + +void QWebEngineHttpRequest_new3(QUrl* url, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest) { + QWebEngineHttpRequest* ret = new QWebEngineHttpRequest(*url); + *outptr_QWebEngineHttpRequest = ret; +} + +void QWebEngineHttpRequest_new4(QUrl* url, int* method, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest) { + QWebEngineHttpRequest* ret = new QWebEngineHttpRequest(*url, (const QWebEngineHttpRequest::Method&)(*method)); + *outptr_QWebEngineHttpRequest = ret; +} + +void QWebEngineHttpRequest_OperatorAssign(QWebEngineHttpRequest* self, QWebEngineHttpRequest* other) { + self->operator=(*other); +} + +QWebEngineHttpRequest* QWebEngineHttpRequest_PostRequest(QUrl* url, struct miqt_map /* of struct miqt_string to struct miqt_string */ postData) { + QMap postData_QMap; + struct miqt_string* postData_karr = static_cast(postData.keys); + struct miqt_string* postData_varr = static_cast(postData.values); + for(size_t i = 0; i < postData.len; ++i) { + QString postData_karr_i_QString = QString::fromUtf8(postData_karr[i].data, postData_karr[i].len); + QString postData_varr_i_QString = QString::fromUtf8(postData_varr[i].data, postData_varr[i].len); + postData_QMap[postData_karr_i_QString] = postData_varr_i_QString; + } + return new QWebEngineHttpRequest(QWebEngineHttpRequest::postRequest(*url, postData_QMap)); +} + +void QWebEngineHttpRequest_Swap(QWebEngineHttpRequest* self, QWebEngineHttpRequest* other) { + self->swap(*other); +} + +bool QWebEngineHttpRequest_OperatorEqual(const QWebEngineHttpRequest* self, QWebEngineHttpRequest* other) { + return (*self == *other); +} + +bool QWebEngineHttpRequest_OperatorNotEqual(const QWebEngineHttpRequest* self, QWebEngineHttpRequest* other) { + return (*self != *other); +} + +int QWebEngineHttpRequest_Method(const QWebEngineHttpRequest* self) { + QWebEngineHttpRequest::Method _ret = self->method(); + return static_cast(_ret); +} + +void QWebEngineHttpRequest_SetMethod(QWebEngineHttpRequest* self, int method) { + self->setMethod(static_cast(method)); +} + +QUrl* QWebEngineHttpRequest_Url(const QWebEngineHttpRequest* self) { + return new QUrl(self->url()); +} + +void QWebEngineHttpRequest_SetUrl(QWebEngineHttpRequest* self, QUrl* url) { + self->setUrl(*url); +} + +struct miqt_string QWebEngineHttpRequest_PostData(const QWebEngineHttpRequest* self) { + QByteArray _qb = self->postData(); + struct miqt_string _ms; + _ms.len = _qb.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _qb.data(), _ms.len); + return _ms; +} + +void QWebEngineHttpRequest_SetPostData(QWebEngineHttpRequest* self, struct miqt_string postData) { + QByteArray postData_QByteArray(postData.data, postData.len); + self->setPostData(postData_QByteArray); +} + +bool QWebEngineHttpRequest_HasHeader(const QWebEngineHttpRequest* self, struct miqt_string headerName) { + QByteArray headerName_QByteArray(headerName.data, headerName.len); + return self->hasHeader(headerName_QByteArray); +} + +struct miqt_array /* of struct miqt_string */ QWebEngineHttpRequest_Headers(const QWebEngineHttpRequest* self) { + QVector _ret = self->headers(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QByteArray _vv_qb = _ret[i]; + struct miqt_string _vv_ms; + _vv_ms.len = _vv_qb.length(); + _vv_ms.data = static_cast(malloc(_vv_ms.len)); + memcpy(_vv_ms.data, _vv_qb.data(), _vv_ms.len); + _arr[i] = _vv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +struct miqt_string QWebEngineHttpRequest_Header(const QWebEngineHttpRequest* self, struct miqt_string headerName) { + QByteArray headerName_QByteArray(headerName.data, headerName.len); + QByteArray _qb = self->header(headerName_QByteArray); + struct miqt_string _ms; + _ms.len = _qb.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _qb.data(), _ms.len); + return _ms; +} + +void QWebEngineHttpRequest_SetHeader(QWebEngineHttpRequest* self, struct miqt_string headerName, struct miqt_string value) { + QByteArray headerName_QByteArray(headerName.data, headerName.len); + QByteArray value_QByteArray(value.data, value.len); + self->setHeader(headerName_QByteArray, value_QByteArray); +} + +void QWebEngineHttpRequest_UnsetHeader(QWebEngineHttpRequest* self, struct miqt_string headerName) { + QByteArray headerName_QByteArray(headerName.data, headerName.len); + self->unsetHeader(headerName_QByteArray); +} + +void QWebEngineHttpRequest_Delete(QWebEngineHttpRequest* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webengine/gen_qwebenginehttprequest.go b/qt/webengine/gen_qwebenginehttprequest.go new file mode 100644 index 00000000..c327be60 --- /dev/null +++ b/qt/webengine/gen_qwebenginehttprequest.go @@ -0,0 +1,238 @@ +package webengine + +/* + +#include "gen_qwebenginehttprequest.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "unsafe" +) + +type QWebEngineHttpRequest__Method int + +const ( + QWebEngineHttpRequest__Get QWebEngineHttpRequest__Method = 0 + QWebEngineHttpRequest__Post QWebEngineHttpRequest__Method = 1 +) + +type QWebEngineHttpRequest struct { + h *C.QWebEngineHttpRequest + isSubclass bool +} + +func (this *QWebEngineHttpRequest) cPointer() *C.QWebEngineHttpRequest { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineHttpRequest) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineHttpRequest constructs the type using only CGO pointers. +func newQWebEngineHttpRequest(h *C.QWebEngineHttpRequest) *QWebEngineHttpRequest { + if h == nil { + return nil + } + return &QWebEngineHttpRequest{h: h} +} + +// UnsafeNewQWebEngineHttpRequest constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineHttpRequest(h unsafe.Pointer) *QWebEngineHttpRequest { + if h == nil { + return nil + } + + return &QWebEngineHttpRequest{h: (*C.QWebEngineHttpRequest)(h)} +} + +// NewQWebEngineHttpRequest constructs a new QWebEngineHttpRequest object. +func NewQWebEngineHttpRequest() *QWebEngineHttpRequest { + var outptr_QWebEngineHttpRequest *C.QWebEngineHttpRequest = nil + + C.QWebEngineHttpRequest_new(&outptr_QWebEngineHttpRequest) + ret := newQWebEngineHttpRequest(outptr_QWebEngineHttpRequest) + ret.isSubclass = true + return ret +} + +// NewQWebEngineHttpRequest2 constructs a new QWebEngineHttpRequest object. +func NewQWebEngineHttpRequest2(other *QWebEngineHttpRequest) *QWebEngineHttpRequest { + var outptr_QWebEngineHttpRequest *C.QWebEngineHttpRequest = nil + + C.QWebEngineHttpRequest_new2(other.cPointer(), &outptr_QWebEngineHttpRequest) + ret := newQWebEngineHttpRequest(outptr_QWebEngineHttpRequest) + ret.isSubclass = true + return ret +} + +// NewQWebEngineHttpRequest3 constructs a new QWebEngineHttpRequest object. +func NewQWebEngineHttpRequest3(url *qt.QUrl) *QWebEngineHttpRequest { + var outptr_QWebEngineHttpRequest *C.QWebEngineHttpRequest = nil + + C.QWebEngineHttpRequest_new3((*C.QUrl)(url.UnsafePointer()), &outptr_QWebEngineHttpRequest) + ret := newQWebEngineHttpRequest(outptr_QWebEngineHttpRequest) + ret.isSubclass = true + return ret +} + +// NewQWebEngineHttpRequest4 constructs a new QWebEngineHttpRequest object. +func NewQWebEngineHttpRequest4(url *qt.QUrl, method *QWebEngineHttpRequest__Method) *QWebEngineHttpRequest { + var outptr_QWebEngineHttpRequest *C.QWebEngineHttpRequest = nil + + C.QWebEngineHttpRequest_new4((*C.QUrl)(url.UnsafePointer()), (*C.int)(unsafe.Pointer(method)), &outptr_QWebEngineHttpRequest) + ret := newQWebEngineHttpRequest(outptr_QWebEngineHttpRequest) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineHttpRequest) OperatorAssign(other *QWebEngineHttpRequest) { + C.QWebEngineHttpRequest_OperatorAssign(this.h, other.cPointer()) +} + +func QWebEngineHttpRequest_PostRequest(url *qt.QUrl, postData map[string]string) *QWebEngineHttpRequest { + postData_Keys_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(postData)))) + defer C.free(unsafe.Pointer(postData_Keys_CArray)) + postData_Values_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(postData)))) + defer C.free(unsafe.Pointer(postData_Values_CArray)) + postData_ctr := 0 + for postData_k, postData_v := range postData { + postData_k_ms := C.struct_miqt_string{} + postData_k_ms.data = C.CString(postData_k) + postData_k_ms.len = C.size_t(len(postData_k)) + defer C.free(unsafe.Pointer(postData_k_ms.data)) + postData_Keys_CArray[postData_ctr] = postData_k_ms + postData_v_ms := C.struct_miqt_string{} + postData_v_ms.data = C.CString(postData_v) + postData_v_ms.len = C.size_t(len(postData_v)) + defer C.free(unsafe.Pointer(postData_v_ms.data)) + postData_Values_CArray[postData_ctr] = postData_v_ms + postData_ctr++ + } + postData_mm := C.struct_miqt_map{ + len: C.size_t(len(postData)), + keys: unsafe.Pointer(postData_Keys_CArray), + values: unsafe.Pointer(postData_Values_CArray), + } + _ret := C.QWebEngineHttpRequest_PostRequest((*C.QUrl)(url.UnsafePointer()), postData_mm) + _goptr := newQWebEngineHttpRequest(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHttpRequest) Swap(other *QWebEngineHttpRequest) { + C.QWebEngineHttpRequest_Swap(this.h, other.cPointer()) +} + +func (this *QWebEngineHttpRequest) OperatorEqual(other *QWebEngineHttpRequest) bool { + return (bool)(C.QWebEngineHttpRequest_OperatorEqual(this.h, other.cPointer())) +} + +func (this *QWebEngineHttpRequest) OperatorNotEqual(other *QWebEngineHttpRequest) bool { + return (bool)(C.QWebEngineHttpRequest_OperatorNotEqual(this.h, other.cPointer())) +} + +func (this *QWebEngineHttpRequest) Method() QWebEngineHttpRequest__Method { + return (QWebEngineHttpRequest__Method)(C.QWebEngineHttpRequest_Method(this.h)) +} + +func (this *QWebEngineHttpRequest) SetMethod(method QWebEngineHttpRequest__Method) { + C.QWebEngineHttpRequest_SetMethod(this.h, (C.int)(method)) +} + +func (this *QWebEngineHttpRequest) Url() *qt.QUrl { + _ret := C.QWebEngineHttpRequest_Url(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHttpRequest) SetUrl(url *qt.QUrl) { + C.QWebEngineHttpRequest_SetUrl(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QWebEngineHttpRequest) PostData() []byte { + var _bytearray C.struct_miqt_string = C.QWebEngineHttpRequest_PostData(this.h) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *QWebEngineHttpRequest) SetPostData(postData []byte) { + postData_alias := C.struct_miqt_string{} + postData_alias.data = (*C.char)(unsafe.Pointer(&postData[0])) + postData_alias.len = C.size_t(len(postData)) + C.QWebEngineHttpRequest_SetPostData(this.h, postData_alias) +} + +func (this *QWebEngineHttpRequest) HasHeader(headerName []byte) bool { + headerName_alias := C.struct_miqt_string{} + headerName_alias.data = (*C.char)(unsafe.Pointer(&headerName[0])) + headerName_alias.len = C.size_t(len(headerName)) + return (bool)(C.QWebEngineHttpRequest_HasHeader(this.h, headerName_alias)) +} + +func (this *QWebEngineHttpRequest) Headers() [][]byte { + var _ma C.struct_miqt_array = C.QWebEngineHttpRequest_Headers(this.h) + _ret := make([][]byte, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _vv_bytearray C.struct_miqt_string = _outCast[i] + _vv_ret := C.GoBytes(unsafe.Pointer(_vv_bytearray.data), C.int(int64(_vv_bytearray.len))) + C.free(unsafe.Pointer(_vv_bytearray.data)) + _ret[i] = _vv_ret + } + return _ret +} + +func (this *QWebEngineHttpRequest) Header(headerName []byte) []byte { + headerName_alias := C.struct_miqt_string{} + headerName_alias.data = (*C.char)(unsafe.Pointer(&headerName[0])) + headerName_alias.len = C.size_t(len(headerName)) + var _bytearray C.struct_miqt_string = C.QWebEngineHttpRequest_Header(this.h, headerName_alias) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *QWebEngineHttpRequest) SetHeader(headerName []byte, value []byte) { + headerName_alias := C.struct_miqt_string{} + headerName_alias.data = (*C.char)(unsafe.Pointer(&headerName[0])) + headerName_alias.len = C.size_t(len(headerName)) + value_alias := C.struct_miqt_string{} + value_alias.data = (*C.char)(unsafe.Pointer(&value[0])) + value_alias.len = C.size_t(len(value)) + C.QWebEngineHttpRequest_SetHeader(this.h, headerName_alias, value_alias) +} + +func (this *QWebEngineHttpRequest) UnsetHeader(headerName []byte) { + headerName_alias := C.struct_miqt_string{} + headerName_alias.data = (*C.char)(unsafe.Pointer(&headerName[0])) + headerName_alias.len = C.size_t(len(headerName)) + C.QWebEngineHttpRequest_UnsetHeader(this.h, headerName_alias) +} + +// Delete this object from C++ memory. +func (this *QWebEngineHttpRequest) Delete() { + C.QWebEngineHttpRequest_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineHttpRequest) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineHttpRequest) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webengine/gen_qwebenginehttprequest.h b/qt/webengine/gen_qwebenginehttprequest.h new file mode 100644 index 00000000..90ae9068 --- /dev/null +++ b/qt/webengine/gen_qwebenginehttprequest.h @@ -0,0 +1,51 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEHTTPREQUEST_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEHTTPREQUEST_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QUrl; +class QWebEngineHttpRequest; +#else +typedef struct QUrl QUrl; +typedef struct QWebEngineHttpRequest QWebEngineHttpRequest; +#endif + +void QWebEngineHttpRequest_new(QWebEngineHttpRequest** outptr_QWebEngineHttpRequest); +void QWebEngineHttpRequest_new2(QWebEngineHttpRequest* other, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest); +void QWebEngineHttpRequest_new3(QUrl* url, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest); +void QWebEngineHttpRequest_new4(QUrl* url, int* method, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest); +void QWebEngineHttpRequest_OperatorAssign(QWebEngineHttpRequest* self, QWebEngineHttpRequest* other); +QWebEngineHttpRequest* QWebEngineHttpRequest_PostRequest(QUrl* url, struct miqt_map /* of struct miqt_string to struct miqt_string */ postData); +void QWebEngineHttpRequest_Swap(QWebEngineHttpRequest* self, QWebEngineHttpRequest* other); +bool QWebEngineHttpRequest_OperatorEqual(const QWebEngineHttpRequest* self, QWebEngineHttpRequest* other); +bool QWebEngineHttpRequest_OperatorNotEqual(const QWebEngineHttpRequest* self, QWebEngineHttpRequest* other); +int QWebEngineHttpRequest_Method(const QWebEngineHttpRequest* self); +void QWebEngineHttpRequest_SetMethod(QWebEngineHttpRequest* self, int method); +QUrl* QWebEngineHttpRequest_Url(const QWebEngineHttpRequest* self); +void QWebEngineHttpRequest_SetUrl(QWebEngineHttpRequest* self, QUrl* url); +struct miqt_string QWebEngineHttpRequest_PostData(const QWebEngineHttpRequest* self); +void QWebEngineHttpRequest_SetPostData(QWebEngineHttpRequest* self, struct miqt_string postData); +bool QWebEngineHttpRequest_HasHeader(const QWebEngineHttpRequest* self, struct miqt_string headerName); +struct miqt_array /* of struct miqt_string */ QWebEngineHttpRequest_Headers(const QWebEngineHttpRequest* self); +struct miqt_string QWebEngineHttpRequest_Header(const QWebEngineHttpRequest* self, struct miqt_string headerName); +void QWebEngineHttpRequest_SetHeader(QWebEngineHttpRequest* self, struct miqt_string headerName, struct miqt_string value); +void QWebEngineHttpRequest_UnsetHeader(QWebEngineHttpRequest* self, struct miqt_string headerName); +void QWebEngineHttpRequest_Delete(QWebEngineHttpRequest* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebenginenotification.cpp b/qt/webengine/gen_qwebenginenotification.cpp new file mode 100644 index 00000000..640eceec --- /dev/null +++ b/qt/webengine/gen_qwebenginenotification.cpp @@ -0,0 +1,177 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebenginenotification.h" +#include "_cgo_export.h" + +QMetaObject* QWebEngineNotification_MetaObject(const QWebEngineNotification* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineNotification_Metacast(QWebEngineNotification* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineNotification_Tr(const char* s) { + QString _ret = QWebEngineNotification::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineNotification_TrUtf8(const char* s) { + QString _ret = QWebEngineNotification::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QWebEngineNotification_Matches(const QWebEngineNotification* self, QWebEngineNotification* other) { + return self->matches(other); +} + +QUrl* QWebEngineNotification_Origin(const QWebEngineNotification* self) { + return new QUrl(self->origin()); +} + +QImage* QWebEngineNotification_Icon(const QWebEngineNotification* self) { + return new QImage(self->icon()); +} + +struct miqt_string QWebEngineNotification_Title(const QWebEngineNotification* self) { + QString _ret = self->title(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineNotification_Message(const QWebEngineNotification* self) { + QString _ret = self->message(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineNotification_Tag(const QWebEngineNotification* self) { + QString _ret = self->tag(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineNotification_Language(const QWebEngineNotification* self) { + QString _ret = self->language(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QWebEngineNotification_Direction(const QWebEngineNotification* self) { + Qt::LayoutDirection _ret = self->direction(); + return static_cast(_ret); +} + +void QWebEngineNotification_Show(const QWebEngineNotification* self) { + self->show(); +} + +void QWebEngineNotification_Click(const QWebEngineNotification* self) { + self->click(); +} + +void QWebEngineNotification_Close(const QWebEngineNotification* self) { + self->close(); +} + +void QWebEngineNotification_Closed(QWebEngineNotification* self) { + self->closed(); +} + +void QWebEngineNotification_connect_Closed(QWebEngineNotification* self, intptr_t slot) { + QWebEngineNotification::connect(self, static_cast(&QWebEngineNotification::closed), self, [=]() { + miqt_exec_callback_QWebEngineNotification_Closed(slot); + }); +} + +struct miqt_string QWebEngineNotification_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineNotification::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineNotification_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineNotification::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineNotification_TrUtf82(const char* s, const char* c) { + QString _ret = QWebEngineNotification::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineNotification_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebEngineNotification::trUtf8(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineNotification_Delete(QWebEngineNotification* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webengine/gen_qwebenginenotification.go b/qt/webengine/gen_qwebenginenotification.go new file mode 100644 index 00000000..9a0816f4 --- /dev/null +++ b/qt/webengine/gen_qwebenginenotification.go @@ -0,0 +1,220 @@ +package webengine + +/* + +#include "gen_qwebenginenotification.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebEngineNotification struct { + h *C.QWebEngineNotification + isSubclass bool + *qt.QObject +} + +func (this *QWebEngineNotification) cPointer() *C.QWebEngineNotification { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineNotification) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineNotification constructs the type using only CGO pointers. +func newQWebEngineNotification(h *C.QWebEngineNotification, h_QObject *C.QObject) *QWebEngineNotification { + if h == nil { + return nil + } + return &QWebEngineNotification{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEngineNotification constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineNotification(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineNotification { + if h == nil { + return nil + } + + return &QWebEngineNotification{h: (*C.QWebEngineNotification)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +func (this *QWebEngineNotification) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineNotification_MetaObject(this.h))) +} + +func (this *QWebEngineNotification) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineNotification_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineNotification_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineNotification_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineNotification_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineNotification_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineNotification) Matches(other *QWebEngineNotification) bool { + return (bool)(C.QWebEngineNotification_Matches(this.h, other.cPointer())) +} + +func (this *QWebEngineNotification) Origin() *qt.QUrl { + _ret := C.QWebEngineNotification_Origin(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineNotification) Icon() *qt.QImage { + _ret := C.QWebEngineNotification_Icon(this.h) + _goptr := qt.UnsafeNewQImage(unsafe.Pointer(_ret), nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineNotification) Title() string { + var _ms C.struct_miqt_string = C.QWebEngineNotification_Title(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineNotification) Message() string { + var _ms C.struct_miqt_string = C.QWebEngineNotification_Message(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineNotification) Tag() string { + var _ms C.struct_miqt_string = C.QWebEngineNotification_Tag(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineNotification) Language() string { + var _ms C.struct_miqt_string = C.QWebEngineNotification_Language(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineNotification) Direction() qt.LayoutDirection { + return (qt.LayoutDirection)(C.QWebEngineNotification_Direction(this.h)) +} + +func (this *QWebEngineNotification) Show() { + C.QWebEngineNotification_Show(this.h) +} + +func (this *QWebEngineNotification) Click() { + C.QWebEngineNotification_Click(this.h) +} + +func (this *QWebEngineNotification) Close() { + C.QWebEngineNotification_Close(this.h) +} + +func (this *QWebEngineNotification) Closed() { + C.QWebEngineNotification_Closed(this.h) +} +func (this *QWebEngineNotification) OnClosed(slot func()) { + C.QWebEngineNotification_connect_Closed(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineNotification_Closed +func miqt_exec_callback_QWebEngineNotification_Closed(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func QWebEngineNotification_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineNotification_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineNotification_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineNotification_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineNotification_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineNotification_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineNotification_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineNotification_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebEngineNotification) Delete() { + C.QWebEngineNotification_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineNotification) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineNotification) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webengine/gen_qwebenginenotification.h b/qt/webengine/gen_qwebenginenotification.h new file mode 100644 index 00000000..f674c0fb --- /dev/null +++ b/qt/webengine/gen_qwebenginenotification.h @@ -0,0 +1,58 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINENOTIFICATION_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINENOTIFICATION_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QImage; +class QMetaObject; +class QObject; +class QUrl; +class QWebEngineNotification; +#else +typedef struct QImage QImage; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QUrl QUrl; +typedef struct QWebEngineNotification QWebEngineNotification; +#endif + +QMetaObject* QWebEngineNotification_MetaObject(const QWebEngineNotification* self); +void* QWebEngineNotification_Metacast(QWebEngineNotification* self, const char* param1); +struct miqt_string QWebEngineNotification_Tr(const char* s); +struct miqt_string QWebEngineNotification_TrUtf8(const char* s); +bool QWebEngineNotification_Matches(const QWebEngineNotification* self, QWebEngineNotification* other); +QUrl* QWebEngineNotification_Origin(const QWebEngineNotification* self); +QImage* QWebEngineNotification_Icon(const QWebEngineNotification* self); +struct miqt_string QWebEngineNotification_Title(const QWebEngineNotification* self); +struct miqt_string QWebEngineNotification_Message(const QWebEngineNotification* self); +struct miqt_string QWebEngineNotification_Tag(const QWebEngineNotification* self); +struct miqt_string QWebEngineNotification_Language(const QWebEngineNotification* self); +int QWebEngineNotification_Direction(const QWebEngineNotification* self); +void QWebEngineNotification_Show(const QWebEngineNotification* self); +void QWebEngineNotification_Click(const QWebEngineNotification* self); +void QWebEngineNotification_Close(const QWebEngineNotification* self); +void QWebEngineNotification_Closed(QWebEngineNotification* self); +void QWebEngineNotification_connect_Closed(QWebEngineNotification* self, intptr_t slot); +struct miqt_string QWebEngineNotification_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineNotification_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebEngineNotification_TrUtf82(const char* s, const char* c); +struct miqt_string QWebEngineNotification_TrUtf83(const char* s, const char* c, int n); +void QWebEngineNotification_Delete(QWebEngineNotification* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebenginepage.cpp b/qt/webengine/gen_qwebenginepage.cpp new file mode 100644 index 00000000..291f65ae --- /dev/null +++ b/qt/webengine/gen_qwebenginepage.cpp @@ -0,0 +1,1448 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebenginepage.h" +#include "_cgo_export.h" + +class MiqtVirtualQWebEnginePage : public virtual QWebEnginePage { +public: + + MiqtVirtualQWebEnginePage(): QWebEnginePage() {}; + MiqtVirtualQWebEnginePage(QWebEngineProfile* profile): QWebEnginePage(profile) {}; + MiqtVirtualQWebEnginePage(QObject* parent): QWebEnginePage(parent) {}; + MiqtVirtualQWebEnginePage(QWebEngineProfile* profile, QObject* parent): QWebEnginePage(profile, parent) {}; + + virtual ~MiqtVirtualQWebEnginePage() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__TriggerAction = 0; + + // Subclass to allow providing a Go implementation + virtual void triggerAction(QWebEnginePage::WebAction action, bool checked) override { + if (handle__TriggerAction == 0) { + QWebEnginePage::triggerAction(action, checked); + return; + } + + QWebEnginePage::WebAction action_ret = action; + int sigval1 = static_cast(action_ret); + bool sigval2 = checked; + + miqt_exec_callback_QWebEnginePage_TriggerAction(this, handle__TriggerAction, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TriggerAction(int action, bool checked) { + + QWebEnginePage::triggerAction(static_cast(action), checked); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QWebEnginePage::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QWebEnginePage_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QWebEnginePage::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateWindow = 0; + + // Subclass to allow providing a Go implementation + virtual QWebEnginePage* createWindow(QWebEnginePage::WebWindowType typeVal) override { + if (handle__CreateWindow == 0) { + return QWebEnginePage::createWindow(typeVal); + } + + QWebEnginePage::WebWindowType typeVal_ret = typeVal; + int sigval1 = static_cast(typeVal_ret); + + QWebEnginePage* callback_return_value = miqt_exec_callback_QWebEnginePage_CreateWindow(this, handle__CreateWindow, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWebEnginePage* virtualbase_CreateWindow(int typeVal) { + + return QWebEnginePage::createWindow(static_cast(typeVal)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChooseFiles = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList chooseFiles(QWebEnginePage::FileSelectionMode mode, const QStringList& oldFiles, const QStringList& acceptedMimeTypes) override { + if (handle__ChooseFiles == 0) { + return QWebEnginePage::chooseFiles(mode, oldFiles, acceptedMimeTypes); + } + + QWebEnginePage::FileSelectionMode mode_ret = mode; + int sigval1 = static_cast(mode_ret); + const QStringList& oldFiles_ret = oldFiles; + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* oldFiles_arr = static_cast(malloc(sizeof(struct miqt_string) * oldFiles_ret.length())); + for (size_t i = 0, e = oldFiles_ret.length(); i < e; ++i) { + QString oldFiles_lv_ret = oldFiles_ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray oldFiles_lv_b = oldFiles_lv_ret.toUtf8(); + struct miqt_string oldFiles_lv_ms; + oldFiles_lv_ms.len = oldFiles_lv_b.length(); + oldFiles_lv_ms.data = static_cast(malloc(oldFiles_lv_ms.len)); + memcpy(oldFiles_lv_ms.data, oldFiles_lv_b.data(), oldFiles_lv_ms.len); + oldFiles_arr[i] = oldFiles_lv_ms; + } + struct miqt_array oldFiles_out; + oldFiles_out.len = oldFiles_ret.length(); + oldFiles_out.data = static_cast(oldFiles_arr); + struct miqt_array /* of struct miqt_string */ sigval2 = oldFiles_out; + const QStringList& acceptedMimeTypes_ret = acceptedMimeTypes; + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* acceptedMimeTypes_arr = static_cast(malloc(sizeof(struct miqt_string) * acceptedMimeTypes_ret.length())); + for (size_t i = 0, e = acceptedMimeTypes_ret.length(); i < e; ++i) { + QString acceptedMimeTypes_lv_ret = acceptedMimeTypes_ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray acceptedMimeTypes_lv_b = acceptedMimeTypes_lv_ret.toUtf8(); + struct miqt_string acceptedMimeTypes_lv_ms; + acceptedMimeTypes_lv_ms.len = acceptedMimeTypes_lv_b.length(); + acceptedMimeTypes_lv_ms.data = static_cast(malloc(acceptedMimeTypes_lv_ms.len)); + memcpy(acceptedMimeTypes_lv_ms.data, acceptedMimeTypes_lv_b.data(), acceptedMimeTypes_lv_ms.len); + acceptedMimeTypes_arr[i] = acceptedMimeTypes_lv_ms; + } + struct miqt_array acceptedMimeTypes_out; + acceptedMimeTypes_out.len = acceptedMimeTypes_ret.length(); + acceptedMimeTypes_out.data = static_cast(acceptedMimeTypes_arr); + struct miqt_array /* of struct miqt_string */ sigval3 = acceptedMimeTypes_out; + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QWebEnginePage_ChooseFiles(this, handle__ChooseFiles, sigval1, sigval2, sigval3); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_ChooseFiles(int mode, struct miqt_array /* of struct miqt_string */ oldFiles, struct miqt_array /* of struct miqt_string */ acceptedMimeTypes) { + QStringList oldFiles_QList; + oldFiles_QList.reserve(oldFiles.len); + struct miqt_string* oldFiles_arr = static_cast(oldFiles.data); + for(size_t i = 0; i < oldFiles.len; ++i) { + QString oldFiles_arr_i_QString = QString::fromUtf8(oldFiles_arr[i].data, oldFiles_arr[i].len); + oldFiles_QList.push_back(oldFiles_arr_i_QString); + } + QStringList acceptedMimeTypes_QList; + acceptedMimeTypes_QList.reserve(acceptedMimeTypes.len); + struct miqt_string* acceptedMimeTypes_arr = static_cast(acceptedMimeTypes.data); + for(size_t i = 0; i < acceptedMimeTypes.len; ++i) { + QString acceptedMimeTypes_arr_i_QString = QString::fromUtf8(acceptedMimeTypes_arr[i].data, acceptedMimeTypes_arr[i].len); + acceptedMimeTypes_QList.push_back(acceptedMimeTypes_arr_i_QString); + } + + QStringList _ret = QWebEnginePage::chooseFiles(static_cast(mode), oldFiles_QList, acceptedMimeTypes_QList); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__JavaScriptAlert = 0; + + // Subclass to allow providing a Go implementation + virtual void javaScriptAlert(const QUrl& securityOrigin, const QString& msg) override { + if (handle__JavaScriptAlert == 0) { + QWebEnginePage::javaScriptAlert(securityOrigin, msg); + return; + } + + const QUrl& securityOrigin_ret = securityOrigin; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&securityOrigin_ret); + const QString msg_ret = msg; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray msg_b = msg_ret.toUtf8(); + struct miqt_string msg_ms; + msg_ms.len = msg_b.length(); + msg_ms.data = static_cast(malloc(msg_ms.len)); + memcpy(msg_ms.data, msg_b.data(), msg_ms.len); + struct miqt_string sigval2 = msg_ms; + + miqt_exec_callback_QWebEnginePage_JavaScriptAlert(this, handle__JavaScriptAlert, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_JavaScriptAlert(QUrl* securityOrigin, struct miqt_string msg) { + QString msg_QString = QString::fromUtf8(msg.data, msg.len); + + QWebEnginePage::javaScriptAlert(*securityOrigin, msg_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__JavaScriptConfirm = 0; + + // Subclass to allow providing a Go implementation + virtual bool javaScriptConfirm(const QUrl& securityOrigin, const QString& msg) override { + if (handle__JavaScriptConfirm == 0) { + return QWebEnginePage::javaScriptConfirm(securityOrigin, msg); + } + + const QUrl& securityOrigin_ret = securityOrigin; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&securityOrigin_ret); + const QString msg_ret = msg; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray msg_b = msg_ret.toUtf8(); + struct miqt_string msg_ms; + msg_ms.len = msg_b.length(); + msg_ms.data = static_cast(malloc(msg_ms.len)); + memcpy(msg_ms.data, msg_b.data(), msg_ms.len); + struct miqt_string sigval2 = msg_ms; + + bool callback_return_value = miqt_exec_callback_QWebEnginePage_JavaScriptConfirm(this, handle__JavaScriptConfirm, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_JavaScriptConfirm(QUrl* securityOrigin, struct miqt_string msg) { + QString msg_QString = QString::fromUtf8(msg.data, msg.len); + + return QWebEnginePage::javaScriptConfirm(*securityOrigin, msg_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__JavaScriptConsoleMessage = 0; + + // Subclass to allow providing a Go implementation + virtual void javaScriptConsoleMessage(QWebEnginePage::JavaScriptConsoleMessageLevel level, const QString& message, int lineNumber, const QString& sourceID) override { + if (handle__JavaScriptConsoleMessage == 0) { + QWebEnginePage::javaScriptConsoleMessage(level, message, lineNumber, sourceID); + return; + } + + QWebEnginePage::JavaScriptConsoleMessageLevel level_ret = level; + int sigval1 = static_cast(level_ret); + const QString message_ret = message; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray message_b = message_ret.toUtf8(); + struct miqt_string message_ms; + message_ms.len = message_b.length(); + message_ms.data = static_cast(malloc(message_ms.len)); + memcpy(message_ms.data, message_b.data(), message_ms.len); + struct miqt_string sigval2 = message_ms; + int sigval3 = lineNumber; + const QString sourceID_ret = sourceID; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray sourceID_b = sourceID_ret.toUtf8(); + struct miqt_string sourceID_ms; + sourceID_ms.len = sourceID_b.length(); + sourceID_ms.data = static_cast(malloc(sourceID_ms.len)); + memcpy(sourceID_ms.data, sourceID_b.data(), sourceID_ms.len); + struct miqt_string sigval4 = sourceID_ms; + + miqt_exec_callback_QWebEnginePage_JavaScriptConsoleMessage(this, handle__JavaScriptConsoleMessage, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_JavaScriptConsoleMessage(int level, struct miqt_string message, int lineNumber, struct miqt_string sourceID) { + QString message_QString = QString::fromUtf8(message.data, message.len); + QString sourceID_QString = QString::fromUtf8(sourceID.data, sourceID.len); + + QWebEnginePage::javaScriptConsoleMessage(static_cast(level), message_QString, static_cast(lineNumber), sourceID_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CertificateError = 0; + + // Subclass to allow providing a Go implementation + virtual bool certificateError(const QWebEngineCertificateError& certificateError) override { + if (handle__CertificateError == 0) { + return QWebEnginePage::certificateError(certificateError); + } + + const QWebEngineCertificateError& certificateError_ret = certificateError; + // Cast returned reference into pointer + QWebEngineCertificateError* sigval1 = const_cast(&certificateError_ret); + + bool callback_return_value = miqt_exec_callback_QWebEnginePage_CertificateError(this, handle__CertificateError, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CertificateError(QWebEngineCertificateError* certificateError) { + + return QWebEnginePage::certificateError(*certificateError); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AcceptNavigationRequest = 0; + + // Subclass to allow providing a Go implementation + virtual bool acceptNavigationRequest(const QUrl& url, QWebEnginePage::NavigationType typeVal, bool isMainFrame) override { + if (handle__AcceptNavigationRequest == 0) { + return QWebEnginePage::acceptNavigationRequest(url, typeVal, isMainFrame); + } + + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&url_ret); + QWebEnginePage::NavigationType typeVal_ret = typeVal; + int sigval2 = static_cast(typeVal_ret); + bool sigval3 = isMainFrame; + + bool callback_return_value = miqt_exec_callback_QWebEnginePage_AcceptNavigationRequest(this, handle__AcceptNavigationRequest, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AcceptNavigationRequest(QUrl* url, int typeVal, bool isMainFrame) { + + return QWebEnginePage::acceptNavigationRequest(*url, static_cast(typeVal), isMainFrame); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QWebEnginePage::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QWebEnginePage_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QWebEnginePage::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QWebEnginePage::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QWebEnginePage_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QWebEnginePage::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QWebEnginePage::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QWebEnginePage_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QWebEnginePage::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QWebEnginePage::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebEnginePage_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QWebEnginePage::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QWebEnginePage::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebEnginePage_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QWebEnginePage::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QWebEnginePage::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebEnginePage_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QWebEnginePage::disconnectNotify(*signal); + + } + +}; + +void QWebEnginePage_new(QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject) { + MiqtVirtualQWebEnginePage* ret = new MiqtVirtualQWebEnginePage(); + *outptr_QWebEnginePage = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebEnginePage_new2(QWebEngineProfile* profile, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject) { + MiqtVirtualQWebEnginePage* ret = new MiqtVirtualQWebEnginePage(profile); + *outptr_QWebEnginePage = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebEnginePage_new3(QObject* parent, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject) { + MiqtVirtualQWebEnginePage* ret = new MiqtVirtualQWebEnginePage(parent); + *outptr_QWebEnginePage = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebEnginePage_new4(QWebEngineProfile* profile, QObject* parent, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject) { + MiqtVirtualQWebEnginePage* ret = new MiqtVirtualQWebEnginePage(profile, parent); + *outptr_QWebEnginePage = ret; + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QWebEnginePage_MetaObject(const QWebEnginePage* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEnginePage_Metacast(QWebEnginePage* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEnginePage_Tr(const char* s) { + QString _ret = QWebEnginePage::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEnginePage_TrUtf8(const char* s) { + QString _ret = QWebEnginePage::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QWebEngineHistory* QWebEnginePage_History(const QWebEnginePage* self) { + return self->history(); +} + +void QWebEnginePage_SetView(QWebEnginePage* self, QWidget* view) { + self->setView(view); +} + +QWidget* QWebEnginePage_View(const QWebEnginePage* self) { + return self->view(); +} + +bool QWebEnginePage_HasSelection(const QWebEnginePage* self) { + return self->hasSelection(); +} + +struct miqt_string QWebEnginePage_SelectedText(const QWebEnginePage* self) { + QString _ret = self->selectedText(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QWebEngineProfile* QWebEnginePage_Profile(const QWebEnginePage* self) { + return self->profile(); +} + +QAction* QWebEnginePage_Action(const QWebEnginePage* self, int action) { + return self->action(static_cast(action)); +} + +void QWebEnginePage_TriggerAction(QWebEnginePage* self, int action, bool checked) { + self->triggerAction(static_cast(action), checked); +} + +void QWebEnginePage_ReplaceMisspelledWord(QWebEnginePage* self, struct miqt_string replacement) { + QString replacement_QString = QString::fromUtf8(replacement.data, replacement.len); + self->replaceMisspelledWord(replacement_QString); +} + +bool QWebEnginePage_Event(QWebEnginePage* self, QEvent* param1) { + return self->event(param1); +} + +void QWebEnginePage_FindText(QWebEnginePage* self, struct miqt_string subString) { + QString subString_QString = QString::fromUtf8(subString.data, subString.len); + self->findText(subString_QString); +} + +QMenu* QWebEnginePage_CreateStandardContextMenu(QWebEnginePage* self) { + return self->createStandardContextMenu(); +} + +void QWebEnginePage_SetFeaturePermission(QWebEnginePage* self, QUrl* securityOrigin, int feature, int policy) { + self->setFeaturePermission(*securityOrigin, static_cast(feature), static_cast(policy)); +} + +void QWebEnginePage_Load(QWebEnginePage* self, QUrl* url) { + self->load(*url); +} + +void QWebEnginePage_LoadWithRequest(QWebEnginePage* self, QWebEngineHttpRequest* request) { + self->load(*request); +} + +void QWebEnginePage_Download(QWebEnginePage* self, QUrl* url) { + self->download(*url); +} + +void QWebEnginePage_SetHtml(QWebEnginePage* self, struct miqt_string html) { + QString html_QString = QString::fromUtf8(html.data, html.len); + self->setHtml(html_QString); +} + +void QWebEnginePage_SetContent(QWebEnginePage* self, struct miqt_string data) { + QByteArray data_QByteArray(data.data, data.len); + self->setContent(data_QByteArray); +} + +struct miqt_string QWebEnginePage_Title(const QWebEnginePage* self) { + QString _ret = self->title(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEnginePage_SetUrl(QWebEnginePage* self, QUrl* url) { + self->setUrl(*url); +} + +QUrl* QWebEnginePage_Url(const QWebEnginePage* self) { + return new QUrl(self->url()); +} + +QUrl* QWebEnginePage_RequestedUrl(const QWebEnginePage* self) { + return new QUrl(self->requestedUrl()); +} + +QUrl* QWebEnginePage_IconUrl(const QWebEnginePage* self) { + return new QUrl(self->iconUrl()); +} + +QIcon* QWebEnginePage_Icon(const QWebEnginePage* self) { + return new QIcon(self->icon()); +} + +double QWebEnginePage_ZoomFactor(const QWebEnginePage* self) { + qreal _ret = self->zoomFactor(); + return static_cast(_ret); +} + +void QWebEnginePage_SetZoomFactor(QWebEnginePage* self, double factor) { + self->setZoomFactor(static_cast(factor)); +} + +QPointF* QWebEnginePage_ScrollPosition(const QWebEnginePage* self) { + return new QPointF(self->scrollPosition()); +} + +QSizeF* QWebEnginePage_ContentsSize(const QWebEnginePage* self) { + return new QSizeF(self->contentsSize()); +} + +void QWebEnginePage_RunJavaScript(QWebEnginePage* self, struct miqt_string scriptSource) { + QString scriptSource_QString = QString::fromUtf8(scriptSource.data, scriptSource.len); + self->runJavaScript(scriptSource_QString); +} + +void QWebEnginePage_RunJavaScript2(QWebEnginePage* self, struct miqt_string scriptSource, unsigned int worldId) { + QString scriptSource_QString = QString::fromUtf8(scriptSource.data, scriptSource.len); + self->runJavaScript(scriptSource_QString, static_cast(worldId)); +} + +QWebEngineScriptCollection* QWebEnginePage_Scripts(QWebEnginePage* self) { + QWebEngineScriptCollection& _ret = self->scripts(); + // Cast returned reference into pointer + return &_ret; +} + +QWebEngineSettings* QWebEnginePage_Settings(const QWebEnginePage* self) { + return self->settings(); +} + +QWebChannel* QWebEnginePage_WebChannel(const QWebEnginePage* self) { + return self->webChannel(); +} + +void QWebEnginePage_SetWebChannel(QWebEnginePage* self, QWebChannel* webChannel) { + self->setWebChannel(webChannel); +} + +void QWebEnginePage_SetWebChannel2(QWebEnginePage* self, QWebChannel* param1, unsigned int worldId) { + self->setWebChannel(param1, static_cast(worldId)); +} + +QColor* QWebEnginePage_BackgroundColor(const QWebEnginePage* self) { + return new QColor(self->backgroundColor()); +} + +void QWebEnginePage_SetBackgroundColor(QWebEnginePage* self, QColor* color) { + self->setBackgroundColor(*color); +} + +void QWebEnginePage_Save(const QWebEnginePage* self, struct miqt_string filePath) { + QString filePath_QString = QString::fromUtf8(filePath.data, filePath.len); + self->save(filePath_QString); +} + +bool QWebEnginePage_IsAudioMuted(const QWebEnginePage* self) { + return self->isAudioMuted(); +} + +void QWebEnginePage_SetAudioMuted(QWebEnginePage* self, bool muted) { + self->setAudioMuted(muted); +} + +bool QWebEnginePage_RecentlyAudible(const QWebEnginePage* self) { + return self->recentlyAudible(); +} + +long long QWebEnginePage_RenderProcessPid(const QWebEnginePage* self) { + qint64 _ret = self->renderProcessPid(); + return static_cast(_ret); +} + +void QWebEnginePage_PrintToPdf(QWebEnginePage* self, struct miqt_string filePath) { + QString filePath_QString = QString::fromUtf8(filePath.data, filePath.len); + self->printToPdf(filePath_QString); +} + +void QWebEnginePage_SetInspectedPage(QWebEnginePage* self, QWebEnginePage* page) { + self->setInspectedPage(page); +} + +QWebEnginePage* QWebEnginePage_InspectedPage(const QWebEnginePage* self) { + return self->inspectedPage(); +} + +void QWebEnginePage_SetDevToolsPage(QWebEnginePage* self, QWebEnginePage* page) { + self->setDevToolsPage(page); +} + +QWebEnginePage* QWebEnginePage_DevToolsPage(const QWebEnginePage* self) { + return self->devToolsPage(); +} + +void QWebEnginePage_SetUrlRequestInterceptor(QWebEnginePage* self, QWebEngineUrlRequestInterceptor* interceptor) { + self->setUrlRequestInterceptor(interceptor); +} + +QWebEngineContextMenuData* QWebEnginePage_ContextMenuData(const QWebEnginePage* self) { + const QWebEngineContextMenuData& _ret = self->contextMenuData(); + // Cast returned reference into pointer + return const_cast(&_ret); +} + +int QWebEnginePage_LifecycleState(const QWebEnginePage* self) { + QWebEnginePage::LifecycleState _ret = self->lifecycleState(); + return static_cast(_ret); +} + +void QWebEnginePage_SetLifecycleState(QWebEnginePage* self, int state) { + self->setLifecycleState(static_cast(state)); +} + +int QWebEnginePage_RecommendedState(const QWebEnginePage* self) { + QWebEnginePage::LifecycleState _ret = self->recommendedState(); + return static_cast(_ret); +} + +bool QWebEnginePage_IsVisible(const QWebEnginePage* self) { + return self->isVisible(); +} + +void QWebEnginePage_SetVisible(QWebEnginePage* self, bool visible) { + self->setVisible(visible); +} + +void QWebEnginePage_LoadStarted(QWebEnginePage* self) { + self->loadStarted(); +} + +void QWebEnginePage_connect_LoadStarted(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::loadStarted), self, [=]() { + miqt_exec_callback_QWebEnginePage_LoadStarted(slot); + }); +} + +void QWebEnginePage_LoadProgress(QWebEnginePage* self, int progress) { + self->loadProgress(static_cast(progress)); +} + +void QWebEnginePage_connect_LoadProgress(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::loadProgress), self, [=](int progress) { + int sigval1 = progress; + miqt_exec_callback_QWebEnginePage_LoadProgress(slot, sigval1); + }); +} + +void QWebEnginePage_LoadFinished(QWebEnginePage* self, bool ok) { + self->loadFinished(ok); +} + +void QWebEnginePage_connect_LoadFinished(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::loadFinished), self, [=](bool ok) { + bool sigval1 = ok; + miqt_exec_callback_QWebEnginePage_LoadFinished(slot, sigval1); + }); +} + +void QWebEnginePage_LinkHovered(QWebEnginePage* self, struct miqt_string url) { + QString url_QString = QString::fromUtf8(url.data, url.len); + self->linkHovered(url_QString); +} + +void QWebEnginePage_connect_LinkHovered(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::linkHovered), self, [=](const QString& url) { + const QString url_ret = url; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray url_b = url_ret.toUtf8(); + struct miqt_string url_ms; + url_ms.len = url_b.length(); + url_ms.data = static_cast(malloc(url_ms.len)); + memcpy(url_ms.data, url_b.data(), url_ms.len); + struct miqt_string sigval1 = url_ms; + miqt_exec_callback_QWebEnginePage_LinkHovered(slot, sigval1); + }); +} + +void QWebEnginePage_SelectionChanged(QWebEnginePage* self) { + self->selectionChanged(); +} + +void QWebEnginePage_connect_SelectionChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::selectionChanged), self, [=]() { + miqt_exec_callback_QWebEnginePage_SelectionChanged(slot); + }); +} + +void QWebEnginePage_GeometryChangeRequested(QWebEnginePage* self, QRect* geom) { + self->geometryChangeRequested(*geom); +} + +void QWebEnginePage_connect_GeometryChangeRequested(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::geometryChangeRequested), self, [=](const QRect& geom) { + const QRect& geom_ret = geom; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geom_ret); + miqt_exec_callback_QWebEnginePage_GeometryChangeRequested(slot, sigval1); + }); +} + +void QWebEnginePage_WindowCloseRequested(QWebEnginePage* self) { + self->windowCloseRequested(); +} + +void QWebEnginePage_connect_WindowCloseRequested(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::windowCloseRequested), self, [=]() { + miqt_exec_callback_QWebEnginePage_WindowCloseRequested(slot); + }); +} + +void QWebEnginePage_FeaturePermissionRequested(QWebEnginePage* self, QUrl* securityOrigin, int feature) { + self->featurePermissionRequested(*securityOrigin, static_cast(feature)); +} + +void QWebEnginePage_connect_FeaturePermissionRequested(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::featurePermissionRequested), self, [=](const QUrl& securityOrigin, QWebEnginePage::Feature feature) { + const QUrl& securityOrigin_ret = securityOrigin; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&securityOrigin_ret); + QWebEnginePage::Feature feature_ret = feature; + int sigval2 = static_cast(feature_ret); + miqt_exec_callback_QWebEnginePage_FeaturePermissionRequested(slot, sigval1, sigval2); + }); +} + +void QWebEnginePage_FeaturePermissionRequestCanceled(QWebEnginePage* self, QUrl* securityOrigin, int feature) { + self->featurePermissionRequestCanceled(*securityOrigin, static_cast(feature)); +} + +void QWebEnginePage_connect_FeaturePermissionRequestCanceled(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::featurePermissionRequestCanceled), self, [=](const QUrl& securityOrigin, QWebEnginePage::Feature feature) { + const QUrl& securityOrigin_ret = securityOrigin; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&securityOrigin_ret); + QWebEnginePage::Feature feature_ret = feature; + int sigval2 = static_cast(feature_ret); + miqt_exec_callback_QWebEnginePage_FeaturePermissionRequestCanceled(slot, sigval1, sigval2); + }); +} + +void QWebEnginePage_FullScreenRequested(QWebEnginePage* self, QWebEngineFullScreenRequest* fullScreenRequest) { + self->fullScreenRequested(*fullScreenRequest); +} + +void QWebEnginePage_connect_FullScreenRequested(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::fullScreenRequested), self, [=](QWebEngineFullScreenRequest fullScreenRequest) { + QWebEngineFullScreenRequest* sigval1 = new QWebEngineFullScreenRequest(fullScreenRequest); + miqt_exec_callback_QWebEnginePage_FullScreenRequested(slot, sigval1); + }); +} + +void QWebEnginePage_QuotaRequested(QWebEnginePage* self, QWebEngineQuotaRequest* quotaRequest) { + self->quotaRequested(*quotaRequest); +} + +void QWebEnginePage_connect_QuotaRequested(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::quotaRequested), self, [=](QWebEngineQuotaRequest quotaRequest) { + QWebEngineQuotaRequest* sigval1 = new QWebEngineQuotaRequest(quotaRequest); + miqt_exec_callback_QWebEnginePage_QuotaRequested(slot, sigval1); + }); +} + +void QWebEnginePage_RegisterProtocolHandlerRequested(QWebEnginePage* self, QWebEngineRegisterProtocolHandlerRequest* request) { + self->registerProtocolHandlerRequested(*request); +} + +void QWebEnginePage_connect_RegisterProtocolHandlerRequested(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::registerProtocolHandlerRequested), self, [=](QWebEngineRegisterProtocolHandlerRequest request) { + QWebEngineRegisterProtocolHandlerRequest* sigval1 = new QWebEngineRegisterProtocolHandlerRequest(request); + miqt_exec_callback_QWebEnginePage_RegisterProtocolHandlerRequested(slot, sigval1); + }); +} + +void QWebEnginePage_SelectClientCertificate(QWebEnginePage* self, QWebEngineClientCertificateSelection* clientCertSelection) { + self->selectClientCertificate(*clientCertSelection); +} + +void QWebEnginePage_connect_SelectClientCertificate(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::selectClientCertificate), self, [=](QWebEngineClientCertificateSelection clientCertSelection) { + QWebEngineClientCertificateSelection* sigval1 = new QWebEngineClientCertificateSelection(clientCertSelection); + miqt_exec_callback_QWebEnginePage_SelectClientCertificate(slot, sigval1); + }); +} + +void QWebEnginePage_AuthenticationRequired(QWebEnginePage* self, QUrl* requestUrl, QAuthenticator* authenticator) { + self->authenticationRequired(*requestUrl, authenticator); +} + +void QWebEnginePage_connect_AuthenticationRequired(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::authenticationRequired), self, [=](const QUrl& requestUrl, QAuthenticator* authenticator) { + const QUrl& requestUrl_ret = requestUrl; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&requestUrl_ret); + QAuthenticator* sigval2 = authenticator; + miqt_exec_callback_QWebEnginePage_AuthenticationRequired(slot, sigval1, sigval2); + }); +} + +void QWebEnginePage_ProxyAuthenticationRequired(QWebEnginePage* self, QUrl* requestUrl, QAuthenticator* authenticator, struct miqt_string proxyHost) { + QString proxyHost_QString = QString::fromUtf8(proxyHost.data, proxyHost.len); + self->proxyAuthenticationRequired(*requestUrl, authenticator, proxyHost_QString); +} + +void QWebEnginePage_connect_ProxyAuthenticationRequired(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::proxyAuthenticationRequired), self, [=](const QUrl& requestUrl, QAuthenticator* authenticator, const QString& proxyHost) { + const QUrl& requestUrl_ret = requestUrl; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&requestUrl_ret); + QAuthenticator* sigval2 = authenticator; + const QString proxyHost_ret = proxyHost; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray proxyHost_b = proxyHost_ret.toUtf8(); + struct miqt_string proxyHost_ms; + proxyHost_ms.len = proxyHost_b.length(); + proxyHost_ms.data = static_cast(malloc(proxyHost_ms.len)); + memcpy(proxyHost_ms.data, proxyHost_b.data(), proxyHost_ms.len); + struct miqt_string sigval3 = proxyHost_ms; + miqt_exec_callback_QWebEnginePage_ProxyAuthenticationRequired(slot, sigval1, sigval2, sigval3); + }); +} + +void QWebEnginePage_RenderProcessTerminated(QWebEnginePage* self, int terminationStatus, int exitCode) { + self->renderProcessTerminated(static_cast(terminationStatus), static_cast(exitCode)); +} + +void QWebEnginePage_connect_RenderProcessTerminated(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::renderProcessTerminated), self, [=](QWebEnginePage::RenderProcessTerminationStatus terminationStatus, int exitCode) { + QWebEnginePage::RenderProcessTerminationStatus terminationStatus_ret = terminationStatus; + int sigval1 = static_cast(terminationStatus_ret); + int sigval2 = exitCode; + miqt_exec_callback_QWebEnginePage_RenderProcessTerminated(slot, sigval1, sigval2); + }); +} + +void QWebEnginePage_TitleChanged(QWebEnginePage* self, struct miqt_string title) { + QString title_QString = QString::fromUtf8(title.data, title.len); + self->titleChanged(title_QString); +} + +void QWebEnginePage_connect_TitleChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::titleChanged), self, [=](const QString& title) { + const QString title_ret = title; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray title_b = title_ret.toUtf8(); + struct miqt_string title_ms; + title_ms.len = title_b.length(); + title_ms.data = static_cast(malloc(title_ms.len)); + memcpy(title_ms.data, title_b.data(), title_ms.len); + struct miqt_string sigval1 = title_ms; + miqt_exec_callback_QWebEnginePage_TitleChanged(slot, sigval1); + }); +} + +void QWebEnginePage_UrlChanged(QWebEnginePage* self, QUrl* url) { + self->urlChanged(*url); +} + +void QWebEnginePage_connect_UrlChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::urlChanged), self, [=](const QUrl& url) { + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&url_ret); + miqt_exec_callback_QWebEnginePage_UrlChanged(slot, sigval1); + }); +} + +void QWebEnginePage_IconUrlChanged(QWebEnginePage* self, QUrl* url) { + self->iconUrlChanged(*url); +} + +void QWebEnginePage_connect_IconUrlChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::iconUrlChanged), self, [=](const QUrl& url) { + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&url_ret); + miqt_exec_callback_QWebEnginePage_IconUrlChanged(slot, sigval1); + }); +} + +void QWebEnginePage_IconChanged(QWebEnginePage* self, QIcon* icon) { + self->iconChanged(*icon); +} + +void QWebEnginePage_connect_IconChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::iconChanged), self, [=](const QIcon& icon) { + const QIcon& icon_ret = icon; + // Cast returned reference into pointer + QIcon* sigval1 = const_cast(&icon_ret); + miqt_exec_callback_QWebEnginePage_IconChanged(slot, sigval1); + }); +} + +void QWebEnginePage_ScrollPositionChanged(QWebEnginePage* self, QPointF* position) { + self->scrollPositionChanged(*position); +} + +void QWebEnginePage_connect_ScrollPositionChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::scrollPositionChanged), self, [=](const QPointF& position) { + const QPointF& position_ret = position; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&position_ret); + miqt_exec_callback_QWebEnginePage_ScrollPositionChanged(slot, sigval1); + }); +} + +void QWebEnginePage_ContentsSizeChanged(QWebEnginePage* self, QSizeF* size) { + self->contentsSizeChanged(*size); +} + +void QWebEnginePage_connect_ContentsSizeChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::contentsSizeChanged), self, [=](const QSizeF& size) { + const QSizeF& size_ret = size; + // Cast returned reference into pointer + QSizeF* sigval1 = const_cast(&size_ret); + miqt_exec_callback_QWebEnginePage_ContentsSizeChanged(slot, sigval1); + }); +} + +void QWebEnginePage_AudioMutedChanged(QWebEnginePage* self, bool muted) { + self->audioMutedChanged(muted); +} + +void QWebEnginePage_connect_AudioMutedChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::audioMutedChanged), self, [=](bool muted) { + bool sigval1 = muted; + miqt_exec_callback_QWebEnginePage_AudioMutedChanged(slot, sigval1); + }); +} + +void QWebEnginePage_RecentlyAudibleChanged(QWebEnginePage* self, bool recentlyAudible) { + self->recentlyAudibleChanged(recentlyAudible); +} + +void QWebEnginePage_connect_RecentlyAudibleChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::recentlyAudibleChanged), self, [=](bool recentlyAudible) { + bool sigval1 = recentlyAudible; + miqt_exec_callback_QWebEnginePage_RecentlyAudibleChanged(slot, sigval1); + }); +} + +void QWebEnginePage_RenderProcessPidChanged(QWebEnginePage* self, long long pid) { + self->renderProcessPidChanged(static_cast(pid)); +} + +void QWebEnginePage_connect_RenderProcessPidChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::renderProcessPidChanged), self, [=](qint64 pid) { + qint64 pid_ret = pid; + long long sigval1 = static_cast(pid_ret); + miqt_exec_callback_QWebEnginePage_RenderProcessPidChanged(slot, sigval1); + }); +} + +void QWebEnginePage_PdfPrintingFinished(QWebEnginePage* self, struct miqt_string filePath, bool success) { + QString filePath_QString = QString::fromUtf8(filePath.data, filePath.len); + self->pdfPrintingFinished(filePath_QString, success); +} + +void QWebEnginePage_connect_PdfPrintingFinished(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::pdfPrintingFinished), self, [=](const QString& filePath, bool success) { + const QString filePath_ret = filePath; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray filePath_b = filePath_ret.toUtf8(); + struct miqt_string filePath_ms; + filePath_ms.len = filePath_b.length(); + filePath_ms.data = static_cast(malloc(filePath_ms.len)); + memcpy(filePath_ms.data, filePath_b.data(), filePath_ms.len); + struct miqt_string sigval1 = filePath_ms; + bool sigval2 = success; + miqt_exec_callback_QWebEnginePage_PdfPrintingFinished(slot, sigval1, sigval2); + }); +} + +void QWebEnginePage_PrintRequested(QWebEnginePage* self) { + self->printRequested(); +} + +void QWebEnginePage_connect_PrintRequested(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::printRequested), self, [=]() { + miqt_exec_callback_QWebEnginePage_PrintRequested(slot); + }); +} + +void QWebEnginePage_VisibleChanged(QWebEnginePage* self, bool visible) { + self->visibleChanged(visible); +} + +void QWebEnginePage_connect_VisibleChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::visibleChanged), self, [=](bool visible) { + bool sigval1 = visible; + miqt_exec_callback_QWebEnginePage_VisibleChanged(slot, sigval1); + }); +} + +void QWebEnginePage_LifecycleStateChanged(QWebEnginePage* self, int state) { + self->lifecycleStateChanged(static_cast(state)); +} + +void QWebEnginePage_connect_LifecycleStateChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::lifecycleStateChanged), self, [=](QWebEnginePage::LifecycleState state) { + QWebEnginePage::LifecycleState state_ret = state; + int sigval1 = static_cast(state_ret); + miqt_exec_callback_QWebEnginePage_LifecycleStateChanged(slot, sigval1); + }); +} + +void QWebEnginePage_RecommendedStateChanged(QWebEnginePage* self, int state) { + self->recommendedStateChanged(static_cast(state)); +} + +void QWebEnginePage_connect_RecommendedStateChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::recommendedStateChanged), self, [=](QWebEnginePage::LifecycleState state) { + QWebEnginePage::LifecycleState state_ret = state; + int sigval1 = static_cast(state_ret); + miqt_exec_callback_QWebEnginePage_RecommendedStateChanged(slot, sigval1); + }); +} + +void QWebEnginePage_FindTextFinished(QWebEnginePage* self, QWebEngineFindTextResult* result) { + self->findTextFinished(*result); +} + +void QWebEnginePage_connect_FindTextFinished(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::findTextFinished), self, [=](const QWebEngineFindTextResult& result) { + const QWebEngineFindTextResult& result_ret = result; + // Cast returned reference into pointer + QWebEngineFindTextResult* sigval1 = const_cast(&result_ret); + miqt_exec_callback_QWebEnginePage_FindTextFinished(slot, sigval1); + }); +} + +struct miqt_string QWebEnginePage_Tr2(const char* s, const char* c) { + QString _ret = QWebEnginePage::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEnginePage_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEnginePage::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEnginePage_TrUtf82(const char* s, const char* c) { + QString _ret = QWebEnginePage::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEnginePage_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebEnginePage::trUtf8(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEnginePage_FindText2(QWebEnginePage* self, struct miqt_string subString, int options) { + QString subString_QString = QString::fromUtf8(subString.data, subString.len); + self->findText(subString_QString, static_cast(options)); +} + +void QWebEnginePage_Download2(QWebEnginePage* self, QUrl* url, struct miqt_string filename) { + QString filename_QString = QString::fromUtf8(filename.data, filename.len); + self->download(*url, filename_QString); +} + +void QWebEnginePage_SetHtml2(QWebEnginePage* self, struct miqt_string html, QUrl* baseUrl) { + QString html_QString = QString::fromUtf8(html.data, html.len); + self->setHtml(html_QString, *baseUrl); +} + +void QWebEnginePage_SetContent2(QWebEnginePage* self, struct miqt_string data, struct miqt_string mimeType) { + QByteArray data_QByteArray(data.data, data.len); + QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); + self->setContent(data_QByteArray, mimeType_QString); +} + +void QWebEnginePage_SetContent3(QWebEnginePage* self, struct miqt_string data, struct miqt_string mimeType, QUrl* baseUrl) { + QByteArray data_QByteArray(data.data, data.len); + QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); + self->setContent(data_QByteArray, mimeType_QString, *baseUrl); +} + +void QWebEnginePage_Save2(const QWebEnginePage* self, struct miqt_string filePath, int format) { + QString filePath_QString = QString::fromUtf8(filePath.data, filePath.len); + self->save(filePath_QString, static_cast(format)); +} + +void QWebEnginePage_PrintToPdf2(QWebEnginePage* self, struct miqt_string filePath, QPageLayout* layout) { + QString filePath_QString = QString::fromUtf8(filePath.data, filePath.len); + self->printToPdf(filePath_QString, *layout); +} + +void QWebEnginePage_override_virtual_TriggerAction(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__TriggerAction = slot; +} + +void QWebEnginePage_virtualbase_TriggerAction(void* self, int action, bool checked) { + ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_TriggerAction(action, checked); +} + +void QWebEnginePage_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__Event = slot; +} + +bool QWebEnginePage_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_Event(param1); +} + +void QWebEnginePage_override_virtual_CreateWindow(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__CreateWindow = slot; +} + +QWebEnginePage* QWebEnginePage_virtualbase_CreateWindow(void* self, int typeVal) { + return ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_CreateWindow(typeVal); +} + +void QWebEnginePage_override_virtual_ChooseFiles(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__ChooseFiles = slot; +} + +struct miqt_array /* of struct miqt_string */ QWebEnginePage_virtualbase_ChooseFiles(void* self, int mode, struct miqt_array /* of struct miqt_string */ oldFiles, struct miqt_array /* of struct miqt_string */ acceptedMimeTypes) { + return ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_ChooseFiles(mode, oldFiles, acceptedMimeTypes); +} + +void QWebEnginePage_override_virtual_JavaScriptAlert(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__JavaScriptAlert = slot; +} + +void QWebEnginePage_virtualbase_JavaScriptAlert(void* self, QUrl* securityOrigin, struct miqt_string msg) { + ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_JavaScriptAlert(securityOrigin, msg); +} + +void QWebEnginePage_override_virtual_JavaScriptConfirm(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__JavaScriptConfirm = slot; +} + +bool QWebEnginePage_virtualbase_JavaScriptConfirm(void* self, QUrl* securityOrigin, struct miqt_string msg) { + return ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_JavaScriptConfirm(securityOrigin, msg); +} + +void QWebEnginePage_override_virtual_JavaScriptConsoleMessage(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__JavaScriptConsoleMessage = slot; +} + +void QWebEnginePage_virtualbase_JavaScriptConsoleMessage(void* self, int level, struct miqt_string message, int lineNumber, struct miqt_string sourceID) { + ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_JavaScriptConsoleMessage(level, message, lineNumber, sourceID); +} + +void QWebEnginePage_override_virtual_CertificateError(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__CertificateError = slot; +} + +bool QWebEnginePage_virtualbase_CertificateError(void* self, QWebEngineCertificateError* certificateError) { + return ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_CertificateError(certificateError); +} + +void QWebEnginePage_override_virtual_AcceptNavigationRequest(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__AcceptNavigationRequest = slot; +} + +bool QWebEnginePage_virtualbase_AcceptNavigationRequest(void* self, QUrl* url, int typeVal, bool isMainFrame) { + return ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_AcceptNavigationRequest(url, typeVal, isMainFrame); +} + +void QWebEnginePage_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__EventFilter = slot; +} + +bool QWebEnginePage_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QWebEnginePage_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__TimerEvent = slot; +} + +void QWebEnginePage_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_TimerEvent(event); +} + +void QWebEnginePage_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__ChildEvent = slot; +} + +void QWebEnginePage_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_ChildEvent(event); +} + +void QWebEnginePage_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__CustomEvent = slot; +} + +void QWebEnginePage_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_CustomEvent(event); +} + +void QWebEnginePage_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__ConnectNotify = slot; +} + +void QWebEnginePage_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QWebEnginePage_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__DisconnectNotify = slot; +} + +void QWebEnginePage_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QWebEnginePage_Delete(QWebEnginePage* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webengine/gen_qwebenginepage.go b/qt/webengine/gen_qwebenginepage.go new file mode 100644 index 00000000..4d71ec54 --- /dev/null +++ b/qt/webengine/gen_qwebenginepage.go @@ -0,0 +1,1772 @@ +package webengine + +/* + +#include "gen_qwebenginepage.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "github.com/mappu/miqt/qt/network" + "github.com/mappu/miqt/qt/webchannel" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebEnginePage__WebAction int + +const ( + QWebEnginePage__NoWebAction QWebEnginePage__WebAction = -1 + QWebEnginePage__Back QWebEnginePage__WebAction = 0 + QWebEnginePage__Forward QWebEnginePage__WebAction = 1 + QWebEnginePage__Stop QWebEnginePage__WebAction = 2 + QWebEnginePage__Reload QWebEnginePage__WebAction = 3 + QWebEnginePage__Cut QWebEnginePage__WebAction = 4 + QWebEnginePage__Copy QWebEnginePage__WebAction = 5 + QWebEnginePage__Paste QWebEnginePage__WebAction = 6 + QWebEnginePage__Undo QWebEnginePage__WebAction = 7 + QWebEnginePage__Redo QWebEnginePage__WebAction = 8 + QWebEnginePage__SelectAll QWebEnginePage__WebAction = 9 + QWebEnginePage__ReloadAndBypassCache QWebEnginePage__WebAction = 10 + QWebEnginePage__PasteAndMatchStyle QWebEnginePage__WebAction = 11 + QWebEnginePage__OpenLinkInThisWindow QWebEnginePage__WebAction = 12 + QWebEnginePage__OpenLinkInNewWindow QWebEnginePage__WebAction = 13 + QWebEnginePage__OpenLinkInNewTab QWebEnginePage__WebAction = 14 + QWebEnginePage__CopyLinkToClipboard QWebEnginePage__WebAction = 15 + QWebEnginePage__DownloadLinkToDisk QWebEnginePage__WebAction = 16 + QWebEnginePage__CopyImageToClipboard QWebEnginePage__WebAction = 17 + QWebEnginePage__CopyImageUrlToClipboard QWebEnginePage__WebAction = 18 + QWebEnginePage__DownloadImageToDisk QWebEnginePage__WebAction = 19 + QWebEnginePage__CopyMediaUrlToClipboard QWebEnginePage__WebAction = 20 + QWebEnginePage__ToggleMediaControls QWebEnginePage__WebAction = 21 + QWebEnginePage__ToggleMediaLoop QWebEnginePage__WebAction = 22 + QWebEnginePage__ToggleMediaPlayPause QWebEnginePage__WebAction = 23 + QWebEnginePage__ToggleMediaMute QWebEnginePage__WebAction = 24 + QWebEnginePage__DownloadMediaToDisk QWebEnginePage__WebAction = 25 + QWebEnginePage__InspectElement QWebEnginePage__WebAction = 26 + QWebEnginePage__ExitFullScreen QWebEnginePage__WebAction = 27 + QWebEnginePage__RequestClose QWebEnginePage__WebAction = 28 + QWebEnginePage__Unselect QWebEnginePage__WebAction = 29 + QWebEnginePage__SavePage QWebEnginePage__WebAction = 30 + QWebEnginePage__OpenLinkInNewBackgroundTab QWebEnginePage__WebAction = 31 + QWebEnginePage__ViewSource QWebEnginePage__WebAction = 32 + QWebEnginePage__ToggleBold QWebEnginePage__WebAction = 33 + QWebEnginePage__ToggleItalic QWebEnginePage__WebAction = 34 + QWebEnginePage__ToggleUnderline QWebEnginePage__WebAction = 35 + QWebEnginePage__ToggleStrikethrough QWebEnginePage__WebAction = 36 + QWebEnginePage__AlignLeft QWebEnginePage__WebAction = 37 + QWebEnginePage__AlignCenter QWebEnginePage__WebAction = 38 + QWebEnginePage__AlignRight QWebEnginePage__WebAction = 39 + QWebEnginePage__AlignJustified QWebEnginePage__WebAction = 40 + QWebEnginePage__Indent QWebEnginePage__WebAction = 41 + QWebEnginePage__Outdent QWebEnginePage__WebAction = 42 + QWebEnginePage__InsertOrderedList QWebEnginePage__WebAction = 43 + QWebEnginePage__InsertUnorderedList QWebEnginePage__WebAction = 44 + QWebEnginePage__WebActionCount QWebEnginePage__WebAction = 45 +) + +type QWebEnginePage__FindFlag int + +const ( + QWebEnginePage__FindBackward QWebEnginePage__FindFlag = 1 + QWebEnginePage__FindCaseSensitively QWebEnginePage__FindFlag = 2 +) + +type QWebEnginePage__WebWindowType int + +const ( + QWebEnginePage__WebBrowserWindow QWebEnginePage__WebWindowType = 0 + QWebEnginePage__WebBrowserTab QWebEnginePage__WebWindowType = 1 + QWebEnginePage__WebDialog QWebEnginePage__WebWindowType = 2 + QWebEnginePage__WebBrowserBackgroundTab QWebEnginePage__WebWindowType = 3 +) + +type QWebEnginePage__PermissionPolicy int + +const ( + QWebEnginePage__PermissionUnknown QWebEnginePage__PermissionPolicy = 0 + QWebEnginePage__PermissionGrantedByUser QWebEnginePage__PermissionPolicy = 1 + QWebEnginePage__PermissionDeniedByUser QWebEnginePage__PermissionPolicy = 2 +) + +type QWebEnginePage__NavigationType int + +const ( + QWebEnginePage__NavigationTypeLinkClicked QWebEnginePage__NavigationType = 0 + QWebEnginePage__NavigationTypeTyped QWebEnginePage__NavigationType = 1 + QWebEnginePage__NavigationTypeFormSubmitted QWebEnginePage__NavigationType = 2 + QWebEnginePage__NavigationTypeBackForward QWebEnginePage__NavigationType = 3 + QWebEnginePage__NavigationTypeReload QWebEnginePage__NavigationType = 4 + QWebEnginePage__NavigationTypeOther QWebEnginePage__NavigationType = 5 + QWebEnginePage__NavigationTypeRedirect QWebEnginePage__NavigationType = 6 +) + +type QWebEnginePage__Feature int + +const ( + QWebEnginePage__Notifications QWebEnginePage__Feature = 0 + QWebEnginePage__Geolocation QWebEnginePage__Feature = 1 + QWebEnginePage__MediaAudioCapture QWebEnginePage__Feature = 2 + QWebEnginePage__MediaVideoCapture QWebEnginePage__Feature = 3 + QWebEnginePage__MediaAudioVideoCapture QWebEnginePage__Feature = 4 + QWebEnginePage__MouseLock QWebEnginePage__Feature = 5 + QWebEnginePage__DesktopVideoCapture QWebEnginePage__Feature = 6 + QWebEnginePage__DesktopAudioVideoCapture QWebEnginePage__Feature = 7 +) + +type QWebEnginePage__FileSelectionMode int + +const ( + QWebEnginePage__FileSelectOpen QWebEnginePage__FileSelectionMode = 0 + QWebEnginePage__FileSelectOpenMultiple QWebEnginePage__FileSelectionMode = 1 +) + +type QWebEnginePage__JavaScriptConsoleMessageLevel int + +const ( + QWebEnginePage__InfoMessageLevel QWebEnginePage__JavaScriptConsoleMessageLevel = 0 + QWebEnginePage__WarningMessageLevel QWebEnginePage__JavaScriptConsoleMessageLevel = 1 + QWebEnginePage__ErrorMessageLevel QWebEnginePage__JavaScriptConsoleMessageLevel = 2 +) + +type QWebEnginePage__RenderProcessTerminationStatus int + +const ( + QWebEnginePage__NormalTerminationStatus QWebEnginePage__RenderProcessTerminationStatus = 0 + QWebEnginePage__AbnormalTerminationStatus QWebEnginePage__RenderProcessTerminationStatus = 1 + QWebEnginePage__CrashedTerminationStatus QWebEnginePage__RenderProcessTerminationStatus = 2 + QWebEnginePage__KilledTerminationStatus QWebEnginePage__RenderProcessTerminationStatus = 3 +) + +type QWebEnginePage__LifecycleState int + +const ( + QWebEnginePage__Active QWebEnginePage__LifecycleState = 0 + QWebEnginePage__Frozen QWebEnginePage__LifecycleState = 1 + QWebEnginePage__Discarded QWebEnginePage__LifecycleState = 2 +) + +type QWebEnginePage struct { + h *C.QWebEnginePage + isSubclass bool + *qt.QObject +} + +func (this *QWebEnginePage) cPointer() *C.QWebEnginePage { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEnginePage) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEnginePage constructs the type using only CGO pointers. +func newQWebEnginePage(h *C.QWebEnginePage, h_QObject *C.QObject) *QWebEnginePage { + if h == nil { + return nil + } + return &QWebEnginePage{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEnginePage constructs the type using only unsafe pointers. +func UnsafeNewQWebEnginePage(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEnginePage { + if h == nil { + return nil + } + + return &QWebEnginePage{h: (*C.QWebEnginePage)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +// NewQWebEnginePage constructs a new QWebEnginePage object. +func NewQWebEnginePage() *QWebEnginePage { + var outptr_QWebEnginePage *C.QWebEnginePage = nil + var outptr_QObject *C.QObject = nil + + C.QWebEnginePage_new(&outptr_QWebEnginePage, &outptr_QObject) + ret := newQWebEnginePage(outptr_QWebEnginePage, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebEnginePage2 constructs a new QWebEnginePage object. +func NewQWebEnginePage2(profile *QWebEngineProfile) *QWebEnginePage { + var outptr_QWebEnginePage *C.QWebEnginePage = nil + var outptr_QObject *C.QObject = nil + + C.QWebEnginePage_new2(profile.cPointer(), &outptr_QWebEnginePage, &outptr_QObject) + ret := newQWebEnginePage(outptr_QWebEnginePage, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebEnginePage3 constructs a new QWebEnginePage object. +func NewQWebEnginePage3(parent *qt.QObject) *QWebEnginePage { + var outptr_QWebEnginePage *C.QWebEnginePage = nil + var outptr_QObject *C.QObject = nil + + C.QWebEnginePage_new3((*C.QObject)(parent.UnsafePointer()), &outptr_QWebEnginePage, &outptr_QObject) + ret := newQWebEnginePage(outptr_QWebEnginePage, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebEnginePage4 constructs a new QWebEnginePage object. +func NewQWebEnginePage4(profile *QWebEngineProfile, parent *qt.QObject) *QWebEnginePage { + var outptr_QWebEnginePage *C.QWebEnginePage = nil + var outptr_QObject *C.QObject = nil + + C.QWebEnginePage_new4(profile.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QWebEnginePage, &outptr_QObject) + ret := newQWebEnginePage(outptr_QWebEnginePage, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QWebEnginePage) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEnginePage_MetaObject(this.h))) +} + +func (this *QWebEnginePage) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEnginePage_Metacast(this.h, param1_Cstring)) +} + +func QWebEnginePage_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEnginePage_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEnginePage_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEnginePage_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEnginePage) History() *QWebEngineHistory { + return UnsafeNewQWebEngineHistory(unsafe.Pointer(C.QWebEnginePage_History(this.h))) +} + +func (this *QWebEnginePage) SetView(view *qt.QWidget) { + C.QWebEnginePage_SetView(this.h, (*C.QWidget)(view.UnsafePointer())) +} + +func (this *QWebEnginePage) View() *qt.QWidget { + return qt.UnsafeNewQWidget(unsafe.Pointer(C.QWebEnginePage_View(this.h)), nil, nil) +} + +func (this *QWebEnginePage) HasSelection() bool { + return (bool)(C.QWebEnginePage_HasSelection(this.h)) +} + +func (this *QWebEnginePage) SelectedText() string { + var _ms C.struct_miqt_string = C.QWebEnginePage_SelectedText(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEnginePage) Profile() *QWebEngineProfile { + return UnsafeNewQWebEngineProfile(unsafe.Pointer(C.QWebEnginePage_Profile(this.h)), nil) +} + +func (this *QWebEnginePage) Action(action QWebEnginePage__WebAction) *qt.QAction { + return qt.UnsafeNewQAction(unsafe.Pointer(C.QWebEnginePage_Action(this.h, (C.int)(action))), nil) +} + +func (this *QWebEnginePage) TriggerAction(action QWebEnginePage__WebAction, checked bool) { + C.QWebEnginePage_TriggerAction(this.h, (C.int)(action), (C.bool)(checked)) +} + +func (this *QWebEnginePage) ReplaceMisspelledWord(replacement string) { + replacement_ms := C.struct_miqt_string{} + replacement_ms.data = C.CString(replacement) + replacement_ms.len = C.size_t(len(replacement)) + defer C.free(unsafe.Pointer(replacement_ms.data)) + C.QWebEnginePage_ReplaceMisspelledWord(this.h, replacement_ms) +} + +func (this *QWebEnginePage) Event(param1 *qt.QEvent) bool { + return (bool)(C.QWebEnginePage_Event(this.h, (*C.QEvent)(param1.UnsafePointer()))) +} + +func (this *QWebEnginePage) FindText(subString string) { + subString_ms := C.struct_miqt_string{} + subString_ms.data = C.CString(subString) + subString_ms.len = C.size_t(len(subString)) + defer C.free(unsafe.Pointer(subString_ms.data)) + C.QWebEnginePage_FindText(this.h, subString_ms) +} + +func (this *QWebEnginePage) CreateStandardContextMenu() *qt.QMenu { + return qt.UnsafeNewQMenu(unsafe.Pointer(C.QWebEnginePage_CreateStandardContextMenu(this.h)), nil, nil, nil) +} + +func (this *QWebEnginePage) SetFeaturePermission(securityOrigin *qt.QUrl, feature QWebEnginePage__Feature, policy QWebEnginePage__PermissionPolicy) { + C.QWebEnginePage_SetFeaturePermission(this.h, (*C.QUrl)(securityOrigin.UnsafePointer()), (C.int)(feature), (C.int)(policy)) +} + +func (this *QWebEnginePage) Load(url *qt.QUrl) { + C.QWebEnginePage_Load(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QWebEnginePage) LoadWithRequest(request *QWebEngineHttpRequest) { + C.QWebEnginePage_LoadWithRequest(this.h, request.cPointer()) +} + +func (this *QWebEnginePage) Download(url *qt.QUrl) { + C.QWebEnginePage_Download(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QWebEnginePage) SetHtml(html string) { + html_ms := C.struct_miqt_string{} + html_ms.data = C.CString(html) + html_ms.len = C.size_t(len(html)) + defer C.free(unsafe.Pointer(html_ms.data)) + C.QWebEnginePage_SetHtml(this.h, html_ms) +} + +func (this *QWebEnginePage) SetContent(data []byte) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + C.QWebEnginePage_SetContent(this.h, data_alias) +} + +func (this *QWebEnginePage) Title() string { + var _ms C.struct_miqt_string = C.QWebEnginePage_Title(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEnginePage) SetUrl(url *qt.QUrl) { + C.QWebEnginePage_SetUrl(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QWebEnginePage) Url() *qt.QUrl { + _ret := C.QWebEnginePage_Url(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEnginePage) RequestedUrl() *qt.QUrl { + _ret := C.QWebEnginePage_RequestedUrl(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEnginePage) IconUrl() *qt.QUrl { + _ret := C.QWebEnginePage_IconUrl(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEnginePage) Icon() *qt.QIcon { + _ret := C.QWebEnginePage_Icon(this.h) + _goptr := qt.UnsafeNewQIcon(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEnginePage) ZoomFactor() float64 { + return (float64)(C.QWebEnginePage_ZoomFactor(this.h)) +} + +func (this *QWebEnginePage) SetZoomFactor(factor float64) { + C.QWebEnginePage_SetZoomFactor(this.h, (C.double)(factor)) +} + +func (this *QWebEnginePage) ScrollPosition() *qt.QPointF { + _ret := C.QWebEnginePage_ScrollPosition(this.h) + _goptr := qt.UnsafeNewQPointF(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEnginePage) ContentsSize() *qt.QSizeF { + _ret := C.QWebEnginePage_ContentsSize(this.h) + _goptr := qt.UnsafeNewQSizeF(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEnginePage) RunJavaScript(scriptSource string) { + scriptSource_ms := C.struct_miqt_string{} + scriptSource_ms.data = C.CString(scriptSource) + scriptSource_ms.len = C.size_t(len(scriptSource)) + defer C.free(unsafe.Pointer(scriptSource_ms.data)) + C.QWebEnginePage_RunJavaScript(this.h, scriptSource_ms) +} + +func (this *QWebEnginePage) RunJavaScript2(scriptSource string, worldId uint) { + scriptSource_ms := C.struct_miqt_string{} + scriptSource_ms.data = C.CString(scriptSource) + scriptSource_ms.len = C.size_t(len(scriptSource)) + defer C.free(unsafe.Pointer(scriptSource_ms.data)) + C.QWebEnginePage_RunJavaScript2(this.h, scriptSource_ms, (C.uint)(worldId)) +} + +func (this *QWebEnginePage) Scripts() *QWebEngineScriptCollection { + return UnsafeNewQWebEngineScriptCollection(unsafe.Pointer(C.QWebEnginePage_Scripts(this.h))) +} + +func (this *QWebEnginePage) Settings() *QWebEngineSettings { + return UnsafeNewQWebEngineSettings(unsafe.Pointer(C.QWebEnginePage_Settings(this.h))) +} + +func (this *QWebEnginePage) WebChannel() *webchannel.QWebChannel { + return webchannel.UnsafeNewQWebChannel(unsafe.Pointer(C.QWebEnginePage_WebChannel(this.h)), nil) +} + +func (this *QWebEnginePage) SetWebChannel(webChannel *webchannel.QWebChannel) { + C.QWebEnginePage_SetWebChannel(this.h, (*C.QWebChannel)(webChannel.UnsafePointer())) +} + +func (this *QWebEnginePage) SetWebChannel2(param1 *webchannel.QWebChannel, worldId uint) { + C.QWebEnginePage_SetWebChannel2(this.h, (*C.QWebChannel)(param1.UnsafePointer()), (C.uint)(worldId)) +} + +func (this *QWebEnginePage) BackgroundColor() *qt.QColor { + _ret := C.QWebEnginePage_BackgroundColor(this.h) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEnginePage) SetBackgroundColor(color *qt.QColor) { + C.QWebEnginePage_SetBackgroundColor(this.h, (*C.QColor)(color.UnsafePointer())) +} + +func (this *QWebEnginePage) Save(filePath string) { + filePath_ms := C.struct_miqt_string{} + filePath_ms.data = C.CString(filePath) + filePath_ms.len = C.size_t(len(filePath)) + defer C.free(unsafe.Pointer(filePath_ms.data)) + C.QWebEnginePage_Save(this.h, filePath_ms) +} + +func (this *QWebEnginePage) IsAudioMuted() bool { + return (bool)(C.QWebEnginePage_IsAudioMuted(this.h)) +} + +func (this *QWebEnginePage) SetAudioMuted(muted bool) { + C.QWebEnginePage_SetAudioMuted(this.h, (C.bool)(muted)) +} + +func (this *QWebEnginePage) RecentlyAudible() bool { + return (bool)(C.QWebEnginePage_RecentlyAudible(this.h)) +} + +func (this *QWebEnginePage) RenderProcessPid() int64 { + return (int64)(C.QWebEnginePage_RenderProcessPid(this.h)) +} + +func (this *QWebEnginePage) PrintToPdf(filePath string) { + filePath_ms := C.struct_miqt_string{} + filePath_ms.data = C.CString(filePath) + filePath_ms.len = C.size_t(len(filePath)) + defer C.free(unsafe.Pointer(filePath_ms.data)) + C.QWebEnginePage_PrintToPdf(this.h, filePath_ms) +} + +func (this *QWebEnginePage) SetInspectedPage(page *QWebEnginePage) { + C.QWebEnginePage_SetInspectedPage(this.h, page.cPointer()) +} + +func (this *QWebEnginePage) InspectedPage() *QWebEnginePage { + return UnsafeNewQWebEnginePage(unsafe.Pointer(C.QWebEnginePage_InspectedPage(this.h)), nil) +} + +func (this *QWebEnginePage) SetDevToolsPage(page *QWebEnginePage) { + C.QWebEnginePage_SetDevToolsPage(this.h, page.cPointer()) +} + +func (this *QWebEnginePage) DevToolsPage() *QWebEnginePage { + return UnsafeNewQWebEnginePage(unsafe.Pointer(C.QWebEnginePage_DevToolsPage(this.h)), nil) +} + +func (this *QWebEnginePage) SetUrlRequestInterceptor(interceptor *QWebEngineUrlRequestInterceptor) { + C.QWebEnginePage_SetUrlRequestInterceptor(this.h, interceptor.cPointer()) +} + +func (this *QWebEnginePage) ContextMenuData() *QWebEngineContextMenuData { + return UnsafeNewQWebEngineContextMenuData(unsafe.Pointer(C.QWebEnginePage_ContextMenuData(this.h))) +} + +func (this *QWebEnginePage) LifecycleState() QWebEnginePage__LifecycleState { + return (QWebEnginePage__LifecycleState)(C.QWebEnginePage_LifecycleState(this.h)) +} + +func (this *QWebEnginePage) SetLifecycleState(state QWebEnginePage__LifecycleState) { + C.QWebEnginePage_SetLifecycleState(this.h, (C.int)(state)) +} + +func (this *QWebEnginePage) RecommendedState() QWebEnginePage__LifecycleState { + return (QWebEnginePage__LifecycleState)(C.QWebEnginePage_RecommendedState(this.h)) +} + +func (this *QWebEnginePage) IsVisible() bool { + return (bool)(C.QWebEnginePage_IsVisible(this.h)) +} + +func (this *QWebEnginePage) SetVisible(visible bool) { + C.QWebEnginePage_SetVisible(this.h, (C.bool)(visible)) +} + +func (this *QWebEnginePage) LoadStarted() { + C.QWebEnginePage_LoadStarted(this.h) +} +func (this *QWebEnginePage) OnLoadStarted(slot func()) { + C.QWebEnginePage_connect_LoadStarted(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_LoadStarted +func miqt_exec_callback_QWebEnginePage_LoadStarted(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEnginePage) LoadProgress(progress int) { + C.QWebEnginePage_LoadProgress(this.h, (C.int)(progress)) +} +func (this *QWebEnginePage) OnLoadProgress(slot func(progress int)) { + C.QWebEnginePage_connect_LoadProgress(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_LoadProgress +func miqt_exec_callback_QWebEnginePage_LoadProgress(cb C.intptr_t, progress C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(progress int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(progress) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) LoadFinished(ok bool) { + C.QWebEnginePage_LoadFinished(this.h, (C.bool)(ok)) +} +func (this *QWebEnginePage) OnLoadFinished(slot func(ok bool)) { + C.QWebEnginePage_connect_LoadFinished(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_LoadFinished +func miqt_exec_callback_QWebEnginePage_LoadFinished(cb C.intptr_t, ok C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(ok bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(ok) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) LinkHovered(url string) { + url_ms := C.struct_miqt_string{} + url_ms.data = C.CString(url) + url_ms.len = C.size_t(len(url)) + defer C.free(unsafe.Pointer(url_ms.data)) + C.QWebEnginePage_LinkHovered(this.h, url_ms) +} +func (this *QWebEnginePage) OnLinkHovered(slot func(url string)) { + C.QWebEnginePage_connect_LinkHovered(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_LinkHovered +func miqt_exec_callback_QWebEnginePage_LinkHovered(cb C.intptr_t, url C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(url string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var url_ms C.struct_miqt_string = url + url_ret := C.GoStringN(url_ms.data, C.int(int64(url_ms.len))) + C.free(unsafe.Pointer(url_ms.data)) + slotval1 := url_ret + + gofunc(slotval1) +} + +func (this *QWebEnginePage) SelectionChanged() { + C.QWebEnginePage_SelectionChanged(this.h) +} +func (this *QWebEnginePage) OnSelectionChanged(slot func()) { + C.QWebEnginePage_connect_SelectionChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_SelectionChanged +func miqt_exec_callback_QWebEnginePage_SelectionChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEnginePage) GeometryChangeRequested(geom *qt.QRect) { + C.QWebEnginePage_GeometryChangeRequested(this.h, (*C.QRect)(geom.UnsafePointer())) +} +func (this *QWebEnginePage) OnGeometryChangeRequested(slot func(geom *qt.QRect)) { + C.QWebEnginePage_connect_GeometryChangeRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_GeometryChangeRequested +func miqt_exec_callback_QWebEnginePage_GeometryChangeRequested(cb C.intptr_t, geom *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(geom *qt.QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQRect(unsafe.Pointer(geom)) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) WindowCloseRequested() { + C.QWebEnginePage_WindowCloseRequested(this.h) +} +func (this *QWebEnginePage) OnWindowCloseRequested(slot func()) { + C.QWebEnginePage_connect_WindowCloseRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_WindowCloseRequested +func miqt_exec_callback_QWebEnginePage_WindowCloseRequested(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEnginePage) FeaturePermissionRequested(securityOrigin *qt.QUrl, feature QWebEnginePage__Feature) { + C.QWebEnginePage_FeaturePermissionRequested(this.h, (*C.QUrl)(securityOrigin.UnsafePointer()), (C.int)(feature)) +} +func (this *QWebEnginePage) OnFeaturePermissionRequested(slot func(securityOrigin *qt.QUrl, feature QWebEnginePage__Feature)) { + C.QWebEnginePage_connect_FeaturePermissionRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_FeaturePermissionRequested +func miqt_exec_callback_QWebEnginePage_FeaturePermissionRequested(cb C.intptr_t, securityOrigin *C.QUrl, feature C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(securityOrigin *qt.QUrl, feature QWebEnginePage__Feature)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(securityOrigin)) + slotval2 := (QWebEnginePage__Feature)(feature) + + gofunc(slotval1, slotval2) +} + +func (this *QWebEnginePage) FeaturePermissionRequestCanceled(securityOrigin *qt.QUrl, feature QWebEnginePage__Feature) { + C.QWebEnginePage_FeaturePermissionRequestCanceled(this.h, (*C.QUrl)(securityOrigin.UnsafePointer()), (C.int)(feature)) +} +func (this *QWebEnginePage) OnFeaturePermissionRequestCanceled(slot func(securityOrigin *qt.QUrl, feature QWebEnginePage__Feature)) { + C.QWebEnginePage_connect_FeaturePermissionRequestCanceled(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_FeaturePermissionRequestCanceled +func miqt_exec_callback_QWebEnginePage_FeaturePermissionRequestCanceled(cb C.intptr_t, securityOrigin *C.QUrl, feature C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(securityOrigin *qt.QUrl, feature QWebEnginePage__Feature)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(securityOrigin)) + slotval2 := (QWebEnginePage__Feature)(feature) + + gofunc(slotval1, slotval2) +} + +func (this *QWebEnginePage) FullScreenRequested(fullScreenRequest QWebEngineFullScreenRequest) { + C.QWebEnginePage_FullScreenRequested(this.h, fullScreenRequest.cPointer()) +} +func (this *QWebEnginePage) OnFullScreenRequested(slot func(fullScreenRequest QWebEngineFullScreenRequest)) { + C.QWebEnginePage_connect_FullScreenRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_FullScreenRequested +func miqt_exec_callback_QWebEnginePage_FullScreenRequested(cb C.intptr_t, fullScreenRequest *C.QWebEngineFullScreenRequest) { + gofunc, ok := cgo.Handle(cb).Value().(func(fullScreenRequest QWebEngineFullScreenRequest)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + fullScreenRequest_ret := fullScreenRequest + fullScreenRequest_goptr := newQWebEngineFullScreenRequest(fullScreenRequest_ret) + fullScreenRequest_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *fullScreenRequest_goptr + + gofunc(slotval1) +} + +func (this *QWebEnginePage) QuotaRequested(quotaRequest QWebEngineQuotaRequest) { + C.QWebEnginePage_QuotaRequested(this.h, quotaRequest.cPointer()) +} +func (this *QWebEnginePage) OnQuotaRequested(slot func(quotaRequest QWebEngineQuotaRequest)) { + C.QWebEnginePage_connect_QuotaRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_QuotaRequested +func miqt_exec_callback_QWebEnginePage_QuotaRequested(cb C.intptr_t, quotaRequest *C.QWebEngineQuotaRequest) { + gofunc, ok := cgo.Handle(cb).Value().(func(quotaRequest QWebEngineQuotaRequest)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + quotaRequest_ret := quotaRequest + quotaRequest_goptr := newQWebEngineQuotaRequest(quotaRequest_ret) + quotaRequest_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *quotaRequest_goptr + + gofunc(slotval1) +} + +func (this *QWebEnginePage) RegisterProtocolHandlerRequested(request QWebEngineRegisterProtocolHandlerRequest) { + C.QWebEnginePage_RegisterProtocolHandlerRequested(this.h, request.cPointer()) +} +func (this *QWebEnginePage) OnRegisterProtocolHandlerRequested(slot func(request QWebEngineRegisterProtocolHandlerRequest)) { + C.QWebEnginePage_connect_RegisterProtocolHandlerRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_RegisterProtocolHandlerRequested +func miqt_exec_callback_QWebEnginePage_RegisterProtocolHandlerRequested(cb C.intptr_t, request *C.QWebEngineRegisterProtocolHandlerRequest) { + gofunc, ok := cgo.Handle(cb).Value().(func(request QWebEngineRegisterProtocolHandlerRequest)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + request_ret := request + request_goptr := newQWebEngineRegisterProtocolHandlerRequest(request_ret) + request_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *request_goptr + + gofunc(slotval1) +} + +func (this *QWebEnginePage) SelectClientCertificate(clientCertSelection QWebEngineClientCertificateSelection) { + C.QWebEnginePage_SelectClientCertificate(this.h, clientCertSelection.cPointer()) +} +func (this *QWebEnginePage) OnSelectClientCertificate(slot func(clientCertSelection QWebEngineClientCertificateSelection)) { + C.QWebEnginePage_connect_SelectClientCertificate(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_SelectClientCertificate +func miqt_exec_callback_QWebEnginePage_SelectClientCertificate(cb C.intptr_t, clientCertSelection *C.QWebEngineClientCertificateSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(clientCertSelection QWebEngineClientCertificateSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + clientCertSelection_ret := clientCertSelection + clientCertSelection_goptr := newQWebEngineClientCertificateSelection(clientCertSelection_ret) + clientCertSelection_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *clientCertSelection_goptr + + gofunc(slotval1) +} + +func (this *QWebEnginePage) AuthenticationRequired(requestUrl *qt.QUrl, authenticator *network.QAuthenticator) { + C.QWebEnginePage_AuthenticationRequired(this.h, (*C.QUrl)(requestUrl.UnsafePointer()), (*C.QAuthenticator)(authenticator.UnsafePointer())) +} +func (this *QWebEnginePage) OnAuthenticationRequired(slot func(requestUrl *qt.QUrl, authenticator *network.QAuthenticator)) { + C.QWebEnginePage_connect_AuthenticationRequired(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_AuthenticationRequired +func miqt_exec_callback_QWebEnginePage_AuthenticationRequired(cb C.intptr_t, requestUrl *C.QUrl, authenticator *C.QAuthenticator) { + gofunc, ok := cgo.Handle(cb).Value().(func(requestUrl *qt.QUrl, authenticator *network.QAuthenticator)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(requestUrl)) + slotval2 := network.UnsafeNewQAuthenticator(unsafe.Pointer(authenticator)) + + gofunc(slotval1, slotval2) +} + +func (this *QWebEnginePage) ProxyAuthenticationRequired(requestUrl *qt.QUrl, authenticator *network.QAuthenticator, proxyHost string) { + proxyHost_ms := C.struct_miqt_string{} + proxyHost_ms.data = C.CString(proxyHost) + proxyHost_ms.len = C.size_t(len(proxyHost)) + defer C.free(unsafe.Pointer(proxyHost_ms.data)) + C.QWebEnginePage_ProxyAuthenticationRequired(this.h, (*C.QUrl)(requestUrl.UnsafePointer()), (*C.QAuthenticator)(authenticator.UnsafePointer()), proxyHost_ms) +} +func (this *QWebEnginePage) OnProxyAuthenticationRequired(slot func(requestUrl *qt.QUrl, authenticator *network.QAuthenticator, proxyHost string)) { + C.QWebEnginePage_connect_ProxyAuthenticationRequired(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_ProxyAuthenticationRequired +func miqt_exec_callback_QWebEnginePage_ProxyAuthenticationRequired(cb C.intptr_t, requestUrl *C.QUrl, authenticator *C.QAuthenticator, proxyHost C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(requestUrl *qt.QUrl, authenticator *network.QAuthenticator, proxyHost string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(requestUrl)) + slotval2 := network.UnsafeNewQAuthenticator(unsafe.Pointer(authenticator)) + var proxyHost_ms C.struct_miqt_string = proxyHost + proxyHost_ret := C.GoStringN(proxyHost_ms.data, C.int(int64(proxyHost_ms.len))) + C.free(unsafe.Pointer(proxyHost_ms.data)) + slotval3 := proxyHost_ret + + gofunc(slotval1, slotval2, slotval3) +} + +func (this *QWebEnginePage) RenderProcessTerminated(terminationStatus QWebEnginePage__RenderProcessTerminationStatus, exitCode int) { + C.QWebEnginePage_RenderProcessTerminated(this.h, (C.int)(terminationStatus), (C.int)(exitCode)) +} +func (this *QWebEnginePage) OnRenderProcessTerminated(slot func(terminationStatus QWebEnginePage__RenderProcessTerminationStatus, exitCode int)) { + C.QWebEnginePage_connect_RenderProcessTerminated(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_RenderProcessTerminated +func miqt_exec_callback_QWebEnginePage_RenderProcessTerminated(cb C.intptr_t, terminationStatus C.int, exitCode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(terminationStatus QWebEnginePage__RenderProcessTerminationStatus, exitCode int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebEnginePage__RenderProcessTerminationStatus)(terminationStatus) + + slotval2 := (int)(exitCode) + + gofunc(slotval1, slotval2) +} + +func (this *QWebEnginePage) TitleChanged(title string) { + title_ms := C.struct_miqt_string{} + title_ms.data = C.CString(title) + title_ms.len = C.size_t(len(title)) + defer C.free(unsafe.Pointer(title_ms.data)) + C.QWebEnginePage_TitleChanged(this.h, title_ms) +} +func (this *QWebEnginePage) OnTitleChanged(slot func(title string)) { + C.QWebEnginePage_connect_TitleChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_TitleChanged +func miqt_exec_callback_QWebEnginePage_TitleChanged(cb C.intptr_t, title C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(title string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var title_ms C.struct_miqt_string = title + title_ret := C.GoStringN(title_ms.data, C.int(int64(title_ms.len))) + C.free(unsafe.Pointer(title_ms.data)) + slotval1 := title_ret + + gofunc(slotval1) +} + +func (this *QWebEnginePage) UrlChanged(url *qt.QUrl) { + C.QWebEnginePage_UrlChanged(this.h, (*C.QUrl)(url.UnsafePointer())) +} +func (this *QWebEnginePage) OnUrlChanged(slot func(url *qt.QUrl)) { + C.QWebEnginePage_connect_UrlChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_UrlChanged +func miqt_exec_callback_QWebEnginePage_UrlChanged(cb C.intptr_t, url *C.QUrl) { + gofunc, ok := cgo.Handle(cb).Value().(func(url *qt.QUrl)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(url)) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) IconUrlChanged(url *qt.QUrl) { + C.QWebEnginePage_IconUrlChanged(this.h, (*C.QUrl)(url.UnsafePointer())) +} +func (this *QWebEnginePage) OnIconUrlChanged(slot func(url *qt.QUrl)) { + C.QWebEnginePage_connect_IconUrlChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_IconUrlChanged +func miqt_exec_callback_QWebEnginePage_IconUrlChanged(cb C.intptr_t, url *C.QUrl) { + gofunc, ok := cgo.Handle(cb).Value().(func(url *qt.QUrl)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(url)) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) IconChanged(icon *qt.QIcon) { + C.QWebEnginePage_IconChanged(this.h, (*C.QIcon)(icon.UnsafePointer())) +} +func (this *QWebEnginePage) OnIconChanged(slot func(icon *qt.QIcon)) { + C.QWebEnginePage_connect_IconChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_IconChanged +func miqt_exec_callback_QWebEnginePage_IconChanged(cb C.intptr_t, icon *C.QIcon) { + gofunc, ok := cgo.Handle(cb).Value().(func(icon *qt.QIcon)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQIcon(unsafe.Pointer(icon)) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) ScrollPositionChanged(position *qt.QPointF) { + C.QWebEnginePage_ScrollPositionChanged(this.h, (*C.QPointF)(position.UnsafePointer())) +} +func (this *QWebEnginePage) OnScrollPositionChanged(slot func(position *qt.QPointF)) { + C.QWebEnginePage_connect_ScrollPositionChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_ScrollPositionChanged +func miqt_exec_callback_QWebEnginePage_ScrollPositionChanged(cb C.intptr_t, position *C.QPointF) { + gofunc, ok := cgo.Handle(cb).Value().(func(position *qt.QPointF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPointF(unsafe.Pointer(position)) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) ContentsSizeChanged(size *qt.QSizeF) { + C.QWebEnginePage_ContentsSizeChanged(this.h, (*C.QSizeF)(size.UnsafePointer())) +} +func (this *QWebEnginePage) OnContentsSizeChanged(slot func(size *qt.QSizeF)) { + C.QWebEnginePage_connect_ContentsSizeChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_ContentsSizeChanged +func miqt_exec_callback_QWebEnginePage_ContentsSizeChanged(cb C.intptr_t, size *C.QSizeF) { + gofunc, ok := cgo.Handle(cb).Value().(func(size *qt.QSizeF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSizeF(unsafe.Pointer(size)) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) AudioMutedChanged(muted bool) { + C.QWebEnginePage_AudioMutedChanged(this.h, (C.bool)(muted)) +} +func (this *QWebEnginePage) OnAudioMutedChanged(slot func(muted bool)) { + C.QWebEnginePage_connect_AudioMutedChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_AudioMutedChanged +func miqt_exec_callback_QWebEnginePage_AudioMutedChanged(cb C.intptr_t, muted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(muted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(muted) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) RecentlyAudibleChanged(recentlyAudible bool) { + C.QWebEnginePage_RecentlyAudibleChanged(this.h, (C.bool)(recentlyAudible)) +} +func (this *QWebEnginePage) OnRecentlyAudibleChanged(slot func(recentlyAudible bool)) { + C.QWebEnginePage_connect_RecentlyAudibleChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_RecentlyAudibleChanged +func miqt_exec_callback_QWebEnginePage_RecentlyAudibleChanged(cb C.intptr_t, recentlyAudible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(recentlyAudible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(recentlyAudible) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) RenderProcessPidChanged(pid int64) { + C.QWebEnginePage_RenderProcessPidChanged(this.h, (C.longlong)(pid)) +} +func (this *QWebEnginePage) OnRenderProcessPidChanged(slot func(pid int64)) { + C.QWebEnginePage_connect_RenderProcessPidChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_RenderProcessPidChanged +func miqt_exec_callback_QWebEnginePage_RenderProcessPidChanged(cb C.intptr_t, pid C.longlong) { + gofunc, ok := cgo.Handle(cb).Value().(func(pid int64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(pid) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) PdfPrintingFinished(filePath string, success bool) { + filePath_ms := C.struct_miqt_string{} + filePath_ms.data = C.CString(filePath) + filePath_ms.len = C.size_t(len(filePath)) + defer C.free(unsafe.Pointer(filePath_ms.data)) + C.QWebEnginePage_PdfPrintingFinished(this.h, filePath_ms, (C.bool)(success)) +} +func (this *QWebEnginePage) OnPdfPrintingFinished(slot func(filePath string, success bool)) { + C.QWebEnginePage_connect_PdfPrintingFinished(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_PdfPrintingFinished +func miqt_exec_callback_QWebEnginePage_PdfPrintingFinished(cb C.intptr_t, filePath C.struct_miqt_string, success C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(filePath string, success bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var filePath_ms C.struct_miqt_string = filePath + filePath_ret := C.GoStringN(filePath_ms.data, C.int(int64(filePath_ms.len))) + C.free(unsafe.Pointer(filePath_ms.data)) + slotval1 := filePath_ret + slotval2 := (bool)(success) + + gofunc(slotval1, slotval2) +} + +func (this *QWebEnginePage) PrintRequested() { + C.QWebEnginePage_PrintRequested(this.h) +} +func (this *QWebEnginePage) OnPrintRequested(slot func()) { + C.QWebEnginePage_connect_PrintRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_PrintRequested +func miqt_exec_callback_QWebEnginePage_PrintRequested(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEnginePage) VisibleChanged(visible bool) { + C.QWebEnginePage_VisibleChanged(this.h, (C.bool)(visible)) +} +func (this *QWebEnginePage) OnVisibleChanged(slot func(visible bool)) { + C.QWebEnginePage_connect_VisibleChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_VisibleChanged +func miqt_exec_callback_QWebEnginePage_VisibleChanged(cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) LifecycleStateChanged(state QWebEnginePage__LifecycleState) { + C.QWebEnginePage_LifecycleStateChanged(this.h, (C.int)(state)) +} +func (this *QWebEnginePage) OnLifecycleStateChanged(slot func(state QWebEnginePage__LifecycleState)) { + C.QWebEnginePage_connect_LifecycleStateChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_LifecycleStateChanged +func miqt_exec_callback_QWebEnginePage_LifecycleStateChanged(cb C.intptr_t, state C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(state QWebEnginePage__LifecycleState)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebEnginePage__LifecycleState)(state) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) RecommendedStateChanged(state QWebEnginePage__LifecycleState) { + C.QWebEnginePage_RecommendedStateChanged(this.h, (C.int)(state)) +} +func (this *QWebEnginePage) OnRecommendedStateChanged(slot func(state QWebEnginePage__LifecycleState)) { + C.QWebEnginePage_connect_RecommendedStateChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_RecommendedStateChanged +func miqt_exec_callback_QWebEnginePage_RecommendedStateChanged(cb C.intptr_t, state C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(state QWebEnginePage__LifecycleState)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebEnginePage__LifecycleState)(state) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) FindTextFinished(result *QWebEngineFindTextResult) { + C.QWebEnginePage_FindTextFinished(this.h, result.cPointer()) +} +func (this *QWebEnginePage) OnFindTextFinished(slot func(result *QWebEngineFindTextResult)) { + C.QWebEnginePage_connect_FindTextFinished(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_FindTextFinished +func miqt_exec_callback_QWebEnginePage_FindTextFinished(cb C.intptr_t, result *C.QWebEngineFindTextResult) { + gofunc, ok := cgo.Handle(cb).Value().(func(result *QWebEngineFindTextResult)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebEngineFindTextResult(unsafe.Pointer(result)) + + gofunc(slotval1) +} + +func QWebEnginePage_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEnginePage_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEnginePage_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEnginePage_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEnginePage_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEnginePage_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEnginePage_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEnginePage_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEnginePage) FindText2(subString string, options QWebEnginePage__FindFlag) { + subString_ms := C.struct_miqt_string{} + subString_ms.data = C.CString(subString) + subString_ms.len = C.size_t(len(subString)) + defer C.free(unsafe.Pointer(subString_ms.data)) + C.QWebEnginePage_FindText2(this.h, subString_ms, (C.int)(options)) +} + +func (this *QWebEnginePage) Download2(url *qt.QUrl, filename string) { + filename_ms := C.struct_miqt_string{} + filename_ms.data = C.CString(filename) + filename_ms.len = C.size_t(len(filename)) + defer C.free(unsafe.Pointer(filename_ms.data)) + C.QWebEnginePage_Download2(this.h, (*C.QUrl)(url.UnsafePointer()), filename_ms) +} + +func (this *QWebEnginePage) SetHtml2(html string, baseUrl *qt.QUrl) { + html_ms := C.struct_miqt_string{} + html_ms.data = C.CString(html) + html_ms.len = C.size_t(len(html)) + defer C.free(unsafe.Pointer(html_ms.data)) + C.QWebEnginePage_SetHtml2(this.h, html_ms, (*C.QUrl)(baseUrl.UnsafePointer())) +} + +func (this *QWebEnginePage) SetContent2(data []byte, mimeType string) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + mimeType_ms := C.struct_miqt_string{} + mimeType_ms.data = C.CString(mimeType) + mimeType_ms.len = C.size_t(len(mimeType)) + defer C.free(unsafe.Pointer(mimeType_ms.data)) + C.QWebEnginePage_SetContent2(this.h, data_alias, mimeType_ms) +} + +func (this *QWebEnginePage) SetContent3(data []byte, mimeType string, baseUrl *qt.QUrl) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + mimeType_ms := C.struct_miqt_string{} + mimeType_ms.data = C.CString(mimeType) + mimeType_ms.len = C.size_t(len(mimeType)) + defer C.free(unsafe.Pointer(mimeType_ms.data)) + C.QWebEnginePage_SetContent3(this.h, data_alias, mimeType_ms, (*C.QUrl)(baseUrl.UnsafePointer())) +} + +func (this *QWebEnginePage) Save2(filePath string, format QWebEngineDownloadItem__SavePageFormat) { + filePath_ms := C.struct_miqt_string{} + filePath_ms.data = C.CString(filePath) + filePath_ms.len = C.size_t(len(filePath)) + defer C.free(unsafe.Pointer(filePath_ms.data)) + C.QWebEnginePage_Save2(this.h, filePath_ms, (C.int)(format)) +} + +func (this *QWebEnginePage) PrintToPdf2(filePath string, layout *qt.QPageLayout) { + filePath_ms := C.struct_miqt_string{} + filePath_ms.data = C.CString(filePath) + filePath_ms.len = C.size_t(len(filePath)) + defer C.free(unsafe.Pointer(filePath_ms.data)) + C.QWebEnginePage_PrintToPdf2(this.h, filePath_ms, (*C.QPageLayout)(layout.UnsafePointer())) +} + +func (this *QWebEnginePage) callVirtualBase_TriggerAction(action QWebEnginePage__WebAction, checked bool) { + + C.QWebEnginePage_virtualbase_TriggerAction(unsafe.Pointer(this.h), (C.int)(action), (C.bool)(checked)) + +} +func (this *QWebEnginePage) OnTriggerAction(slot func(super func(action QWebEnginePage__WebAction, checked bool), action QWebEnginePage__WebAction, checked bool)) { + C.QWebEnginePage_override_virtual_TriggerAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_TriggerAction +func miqt_exec_callback_QWebEnginePage_TriggerAction(self *C.QWebEnginePage, cb C.intptr_t, action C.int, checked C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action QWebEnginePage__WebAction, checked bool), action QWebEnginePage__WebAction, checked bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebEnginePage__WebAction)(action) + + slotval2 := (bool)(checked) + + gofunc((&QWebEnginePage{h: self}).callVirtualBase_TriggerAction, slotval1, slotval2) + +} + +func (this *QWebEnginePage) callVirtualBase_Event(param1 *qt.QEvent) bool { + + return (bool)(C.QWebEnginePage_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer()))) + +} +func (this *QWebEnginePage) OnEvent(slot func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) { + C.QWebEnginePage_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_Event +func miqt_exec_callback_QWebEnginePage_Event(self *C.QWebEnginePage, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QWebEnginePage{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEnginePage) callVirtualBase_CreateWindow(typeVal QWebEnginePage__WebWindowType) *QWebEnginePage { + + return UnsafeNewQWebEnginePage(unsafe.Pointer(C.QWebEnginePage_virtualbase_CreateWindow(unsafe.Pointer(this.h), (C.int)(typeVal))), nil) +} +func (this *QWebEnginePage) OnCreateWindow(slot func(super func(typeVal QWebEnginePage__WebWindowType) *QWebEnginePage, typeVal QWebEnginePage__WebWindowType) *QWebEnginePage) { + C.QWebEnginePage_override_virtual_CreateWindow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_CreateWindow +func miqt_exec_callback_QWebEnginePage_CreateWindow(self *C.QWebEnginePage, cb C.intptr_t, typeVal C.int) *C.QWebEnginePage { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(typeVal QWebEnginePage__WebWindowType) *QWebEnginePage, typeVal QWebEnginePage__WebWindowType) *QWebEnginePage) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebEnginePage__WebWindowType)(typeVal) + + virtualReturn := gofunc((&QWebEnginePage{h: self}).callVirtualBase_CreateWindow, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QWebEnginePage) callVirtualBase_ChooseFiles(mode QWebEnginePage__FileSelectionMode, oldFiles []string, acceptedMimeTypes []string) []string { + oldFiles_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(oldFiles)))) + defer C.free(unsafe.Pointer(oldFiles_CArray)) + for i := range oldFiles { + oldFiles_i_ms := C.struct_miqt_string{} + oldFiles_i_ms.data = C.CString(oldFiles[i]) + oldFiles_i_ms.len = C.size_t(len(oldFiles[i])) + defer C.free(unsafe.Pointer(oldFiles_i_ms.data)) + oldFiles_CArray[i] = oldFiles_i_ms + } + oldFiles_ma := C.struct_miqt_array{len: C.size_t(len(oldFiles)), data: unsafe.Pointer(oldFiles_CArray)} + acceptedMimeTypes_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(acceptedMimeTypes)))) + defer C.free(unsafe.Pointer(acceptedMimeTypes_CArray)) + for i := range acceptedMimeTypes { + acceptedMimeTypes_i_ms := C.struct_miqt_string{} + acceptedMimeTypes_i_ms.data = C.CString(acceptedMimeTypes[i]) + acceptedMimeTypes_i_ms.len = C.size_t(len(acceptedMimeTypes[i])) + defer C.free(unsafe.Pointer(acceptedMimeTypes_i_ms.data)) + acceptedMimeTypes_CArray[i] = acceptedMimeTypes_i_ms + } + acceptedMimeTypes_ma := C.struct_miqt_array{len: C.size_t(len(acceptedMimeTypes)), data: unsafe.Pointer(acceptedMimeTypes_CArray)} + + var _ma C.struct_miqt_array = C.QWebEnginePage_virtualbase_ChooseFiles(unsafe.Pointer(this.h), (C.int)(mode), oldFiles_ma, acceptedMimeTypes_ma) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QWebEnginePage) OnChooseFiles(slot func(super func(mode QWebEnginePage__FileSelectionMode, oldFiles []string, acceptedMimeTypes []string) []string, mode QWebEnginePage__FileSelectionMode, oldFiles []string, acceptedMimeTypes []string) []string) { + C.QWebEnginePage_override_virtual_ChooseFiles(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_ChooseFiles +func miqt_exec_callback_QWebEnginePage_ChooseFiles(self *C.QWebEnginePage, cb C.intptr_t, mode C.int, oldFiles C.struct_miqt_array, acceptedMimeTypes C.struct_miqt_array) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mode QWebEnginePage__FileSelectionMode, oldFiles []string, acceptedMimeTypes []string) []string, mode QWebEnginePage__FileSelectionMode, oldFiles []string, acceptedMimeTypes []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebEnginePage__FileSelectionMode)(mode) + + var oldFiles_ma C.struct_miqt_array = oldFiles + oldFiles_ret := make([]string, int(oldFiles_ma.len)) + oldFiles_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(oldFiles_ma.data)) // hey ya + for i := 0; i < int(oldFiles_ma.len); i++ { + var oldFiles_lv_ms C.struct_miqt_string = oldFiles_outCast[i] + oldFiles_lv_ret := C.GoStringN(oldFiles_lv_ms.data, C.int(int64(oldFiles_lv_ms.len))) + C.free(unsafe.Pointer(oldFiles_lv_ms.data)) + oldFiles_ret[i] = oldFiles_lv_ret + } + slotval2 := oldFiles_ret + + var acceptedMimeTypes_ma C.struct_miqt_array = acceptedMimeTypes + acceptedMimeTypes_ret := make([]string, int(acceptedMimeTypes_ma.len)) + acceptedMimeTypes_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(acceptedMimeTypes_ma.data)) // hey ya + for i := 0; i < int(acceptedMimeTypes_ma.len); i++ { + var acceptedMimeTypes_lv_ms C.struct_miqt_string = acceptedMimeTypes_outCast[i] + acceptedMimeTypes_lv_ret := C.GoStringN(acceptedMimeTypes_lv_ms.data, C.int(int64(acceptedMimeTypes_lv_ms.len))) + C.free(unsafe.Pointer(acceptedMimeTypes_lv_ms.data)) + acceptedMimeTypes_ret[i] = acceptedMimeTypes_lv_ret + } + slotval3 := acceptedMimeTypes_ret + + virtualReturn := gofunc((&QWebEnginePage{h: self}).callVirtualBase_ChooseFiles, slotval1, slotval2, slotval3) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QWebEnginePage) callVirtualBase_JavaScriptAlert(securityOrigin *qt.QUrl, msg string) { + msg_ms := C.struct_miqt_string{} + msg_ms.data = C.CString(msg) + msg_ms.len = C.size_t(len(msg)) + defer C.free(unsafe.Pointer(msg_ms.data)) + + C.QWebEnginePage_virtualbase_JavaScriptAlert(unsafe.Pointer(this.h), (*C.QUrl)(securityOrigin.UnsafePointer()), msg_ms) + +} +func (this *QWebEnginePage) OnJavaScriptAlert(slot func(super func(securityOrigin *qt.QUrl, msg string), securityOrigin *qt.QUrl, msg string)) { + C.QWebEnginePage_override_virtual_JavaScriptAlert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_JavaScriptAlert +func miqt_exec_callback_QWebEnginePage_JavaScriptAlert(self *C.QWebEnginePage, cb C.intptr_t, securityOrigin *C.QUrl, msg C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(securityOrigin *qt.QUrl, msg string), securityOrigin *qt.QUrl, msg string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(securityOrigin)) + var msg_ms C.struct_miqt_string = msg + msg_ret := C.GoStringN(msg_ms.data, C.int(int64(msg_ms.len))) + C.free(unsafe.Pointer(msg_ms.data)) + slotval2 := msg_ret + + gofunc((&QWebEnginePage{h: self}).callVirtualBase_JavaScriptAlert, slotval1, slotval2) + +} + +func (this *QWebEnginePage) callVirtualBase_JavaScriptConfirm(securityOrigin *qt.QUrl, msg string) bool { + msg_ms := C.struct_miqt_string{} + msg_ms.data = C.CString(msg) + msg_ms.len = C.size_t(len(msg)) + defer C.free(unsafe.Pointer(msg_ms.data)) + + return (bool)(C.QWebEnginePage_virtualbase_JavaScriptConfirm(unsafe.Pointer(this.h), (*C.QUrl)(securityOrigin.UnsafePointer()), msg_ms)) + +} +func (this *QWebEnginePage) OnJavaScriptConfirm(slot func(super func(securityOrigin *qt.QUrl, msg string) bool, securityOrigin *qt.QUrl, msg string) bool) { + C.QWebEnginePage_override_virtual_JavaScriptConfirm(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_JavaScriptConfirm +func miqt_exec_callback_QWebEnginePage_JavaScriptConfirm(self *C.QWebEnginePage, cb C.intptr_t, securityOrigin *C.QUrl, msg C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(securityOrigin *qt.QUrl, msg string) bool, securityOrigin *qt.QUrl, msg string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(securityOrigin)) + var msg_ms C.struct_miqt_string = msg + msg_ret := C.GoStringN(msg_ms.data, C.int(int64(msg_ms.len))) + C.free(unsafe.Pointer(msg_ms.data)) + slotval2 := msg_ret + + virtualReturn := gofunc((&QWebEnginePage{h: self}).callVirtualBase_JavaScriptConfirm, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEnginePage) callVirtualBase_JavaScriptConsoleMessage(level QWebEnginePage__JavaScriptConsoleMessageLevel, message string, lineNumber int, sourceID string) { + message_ms := C.struct_miqt_string{} + message_ms.data = C.CString(message) + message_ms.len = C.size_t(len(message)) + defer C.free(unsafe.Pointer(message_ms.data)) + sourceID_ms := C.struct_miqt_string{} + sourceID_ms.data = C.CString(sourceID) + sourceID_ms.len = C.size_t(len(sourceID)) + defer C.free(unsafe.Pointer(sourceID_ms.data)) + + C.QWebEnginePage_virtualbase_JavaScriptConsoleMessage(unsafe.Pointer(this.h), (C.int)(level), message_ms, (C.int)(lineNumber), sourceID_ms) + +} +func (this *QWebEnginePage) OnJavaScriptConsoleMessage(slot func(super func(level QWebEnginePage__JavaScriptConsoleMessageLevel, message string, lineNumber int, sourceID string), level QWebEnginePage__JavaScriptConsoleMessageLevel, message string, lineNumber int, sourceID string)) { + C.QWebEnginePage_override_virtual_JavaScriptConsoleMessage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_JavaScriptConsoleMessage +func miqt_exec_callback_QWebEnginePage_JavaScriptConsoleMessage(self *C.QWebEnginePage, cb C.intptr_t, level C.int, message C.struct_miqt_string, lineNumber C.int, sourceID C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(level QWebEnginePage__JavaScriptConsoleMessageLevel, message string, lineNumber int, sourceID string), level QWebEnginePage__JavaScriptConsoleMessageLevel, message string, lineNumber int, sourceID string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebEnginePage__JavaScriptConsoleMessageLevel)(level) + + var message_ms C.struct_miqt_string = message + message_ret := C.GoStringN(message_ms.data, C.int(int64(message_ms.len))) + C.free(unsafe.Pointer(message_ms.data)) + slotval2 := message_ret + slotval3 := (int)(lineNumber) + + var sourceID_ms C.struct_miqt_string = sourceID + sourceID_ret := C.GoStringN(sourceID_ms.data, C.int(int64(sourceID_ms.len))) + C.free(unsafe.Pointer(sourceID_ms.data)) + slotval4 := sourceID_ret + + gofunc((&QWebEnginePage{h: self}).callVirtualBase_JavaScriptConsoleMessage, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QWebEnginePage) callVirtualBase_CertificateError(certificateError *QWebEngineCertificateError) bool { + + return (bool)(C.QWebEnginePage_virtualbase_CertificateError(unsafe.Pointer(this.h), certificateError.cPointer())) + +} +func (this *QWebEnginePage) OnCertificateError(slot func(super func(certificateError *QWebEngineCertificateError) bool, certificateError *QWebEngineCertificateError) bool) { + C.QWebEnginePage_override_virtual_CertificateError(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_CertificateError +func miqt_exec_callback_QWebEnginePage_CertificateError(self *C.QWebEnginePage, cb C.intptr_t, certificateError *C.QWebEngineCertificateError) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(certificateError *QWebEngineCertificateError) bool, certificateError *QWebEngineCertificateError) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebEngineCertificateError(unsafe.Pointer(certificateError)) + + virtualReturn := gofunc((&QWebEnginePage{h: self}).callVirtualBase_CertificateError, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEnginePage) callVirtualBase_AcceptNavigationRequest(url *qt.QUrl, typeVal QWebEnginePage__NavigationType, isMainFrame bool) bool { + + return (bool)(C.QWebEnginePage_virtualbase_AcceptNavigationRequest(unsafe.Pointer(this.h), (*C.QUrl)(url.UnsafePointer()), (C.int)(typeVal), (C.bool)(isMainFrame))) + +} +func (this *QWebEnginePage) OnAcceptNavigationRequest(slot func(super func(url *qt.QUrl, typeVal QWebEnginePage__NavigationType, isMainFrame bool) bool, url *qt.QUrl, typeVal QWebEnginePage__NavigationType, isMainFrame bool) bool) { + C.QWebEnginePage_override_virtual_AcceptNavigationRequest(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_AcceptNavigationRequest +func miqt_exec_callback_QWebEnginePage_AcceptNavigationRequest(self *C.QWebEnginePage, cb C.intptr_t, url *C.QUrl, typeVal C.int, isMainFrame C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(url *qt.QUrl, typeVal QWebEnginePage__NavigationType, isMainFrame bool) bool, url *qt.QUrl, typeVal QWebEnginePage__NavigationType, isMainFrame bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(url)) + slotval2 := (QWebEnginePage__NavigationType)(typeVal) + + slotval3 := (bool)(isMainFrame) + + virtualReturn := gofunc((&QWebEnginePage{h: self}).callVirtualBase_AcceptNavigationRequest, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEnginePage) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QWebEnginePage_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebEnginePage) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QWebEnginePage_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_EventFilter +func miqt_exec_callback_QWebEnginePage_EventFilter(self *C.QWebEnginePage, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebEnginePage{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEnginePage) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QWebEnginePage_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QWebEnginePage) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QWebEnginePage_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_TimerEvent +func miqt_exec_callback_QWebEnginePage_TimerEvent(self *C.QWebEnginePage, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEnginePage{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QWebEnginePage) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QWebEnginePage_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QWebEnginePage) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QWebEnginePage_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_ChildEvent +func miqt_exec_callback_QWebEnginePage_ChildEvent(self *C.QWebEnginePage, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEnginePage{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QWebEnginePage) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QWebEnginePage_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebEnginePage) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QWebEnginePage_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_CustomEvent +func miqt_exec_callback_QWebEnginePage_CustomEvent(self *C.QWebEnginePage, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWebEnginePage{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QWebEnginePage) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QWebEnginePage_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebEnginePage) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QWebEnginePage_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_ConnectNotify +func miqt_exec_callback_QWebEnginePage_ConnectNotify(self *C.QWebEnginePage, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebEnginePage{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QWebEnginePage) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QWebEnginePage_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebEnginePage) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QWebEnginePage_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_DisconnectNotify +func miqt_exec_callback_QWebEnginePage_DisconnectNotify(self *C.QWebEnginePage, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebEnginePage{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QWebEnginePage) Delete() { + C.QWebEnginePage_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEnginePage) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEnginePage) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webengine/gen_qwebenginepage.h b/qt/webengine/gen_qwebenginepage.h new file mode 100644 index 00000000..32fbaa9d --- /dev/null +++ b/qt/webengine/gen_qwebenginepage.h @@ -0,0 +1,263 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEPAGE_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEPAGE_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QAction; +class QAuthenticator; +class QChildEvent; +class QColor; +class QEvent; +class QIcon; +class QMenu; +class QMetaMethod; +class QMetaObject; +class QObject; +class QPageLayout; +class QPointF; +class QRect; +class QSizeF; +class QTimerEvent; +class QUrl; +class QWebChannel; +class QWebEngineCertificateError; +class QWebEngineClientCertificateSelection; +class QWebEngineContextMenuData; +class QWebEngineFindTextResult; +class QWebEngineFullScreenRequest; +class QWebEngineHistory; +class QWebEngineHttpRequest; +class QWebEnginePage; +class QWebEngineProfile; +class QWebEngineQuotaRequest; +class QWebEngineRegisterProtocolHandlerRequest; +class QWebEngineScriptCollection; +class QWebEngineSettings; +class QWebEngineUrlRequestInterceptor; +class QWidget; +#else +typedef struct QAction QAction; +typedef struct QAuthenticator QAuthenticator; +typedef struct QChildEvent QChildEvent; +typedef struct QColor QColor; +typedef struct QEvent QEvent; +typedef struct QIcon QIcon; +typedef struct QMenu QMenu; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPageLayout QPageLayout; +typedef struct QPointF QPointF; +typedef struct QRect QRect; +typedef struct QSizeF QSizeF; +typedef struct QTimerEvent QTimerEvent; +typedef struct QUrl QUrl; +typedef struct QWebChannel QWebChannel; +typedef struct QWebEngineCertificateError QWebEngineCertificateError; +typedef struct QWebEngineClientCertificateSelection QWebEngineClientCertificateSelection; +typedef struct QWebEngineContextMenuData QWebEngineContextMenuData; +typedef struct QWebEngineFindTextResult QWebEngineFindTextResult; +typedef struct QWebEngineFullScreenRequest QWebEngineFullScreenRequest; +typedef struct QWebEngineHistory QWebEngineHistory; +typedef struct QWebEngineHttpRequest QWebEngineHttpRequest; +typedef struct QWebEnginePage QWebEnginePage; +typedef struct QWebEngineProfile QWebEngineProfile; +typedef struct QWebEngineQuotaRequest QWebEngineQuotaRequest; +typedef struct QWebEngineRegisterProtocolHandlerRequest QWebEngineRegisterProtocolHandlerRequest; +typedef struct QWebEngineScriptCollection QWebEngineScriptCollection; +typedef struct QWebEngineSettings QWebEngineSettings; +typedef struct QWebEngineUrlRequestInterceptor QWebEngineUrlRequestInterceptor; +typedef struct QWidget QWidget; +#endif + +void QWebEnginePage_new(QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject); +void QWebEnginePage_new2(QWebEngineProfile* profile, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject); +void QWebEnginePage_new3(QObject* parent, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject); +void QWebEnginePage_new4(QWebEngineProfile* profile, QObject* parent, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject); +QMetaObject* QWebEnginePage_MetaObject(const QWebEnginePage* self); +void* QWebEnginePage_Metacast(QWebEnginePage* self, const char* param1); +struct miqt_string QWebEnginePage_Tr(const char* s); +struct miqt_string QWebEnginePage_TrUtf8(const char* s); +QWebEngineHistory* QWebEnginePage_History(const QWebEnginePage* self); +void QWebEnginePage_SetView(QWebEnginePage* self, QWidget* view); +QWidget* QWebEnginePage_View(const QWebEnginePage* self); +bool QWebEnginePage_HasSelection(const QWebEnginePage* self); +struct miqt_string QWebEnginePage_SelectedText(const QWebEnginePage* self); +QWebEngineProfile* QWebEnginePage_Profile(const QWebEnginePage* self); +QAction* QWebEnginePage_Action(const QWebEnginePage* self, int action); +void QWebEnginePage_TriggerAction(QWebEnginePage* self, int action, bool checked); +void QWebEnginePage_ReplaceMisspelledWord(QWebEnginePage* self, struct miqt_string replacement); +bool QWebEnginePage_Event(QWebEnginePage* self, QEvent* param1); +void QWebEnginePage_FindText(QWebEnginePage* self, struct miqt_string subString); +QMenu* QWebEnginePage_CreateStandardContextMenu(QWebEnginePage* self); +void QWebEnginePage_SetFeaturePermission(QWebEnginePage* self, QUrl* securityOrigin, int feature, int policy); +void QWebEnginePage_Load(QWebEnginePage* self, QUrl* url); +void QWebEnginePage_LoadWithRequest(QWebEnginePage* self, QWebEngineHttpRequest* request); +void QWebEnginePage_Download(QWebEnginePage* self, QUrl* url); +void QWebEnginePage_SetHtml(QWebEnginePage* self, struct miqt_string html); +void QWebEnginePage_SetContent(QWebEnginePage* self, struct miqt_string data); +struct miqt_string QWebEnginePage_Title(const QWebEnginePage* self); +void QWebEnginePage_SetUrl(QWebEnginePage* self, QUrl* url); +QUrl* QWebEnginePage_Url(const QWebEnginePage* self); +QUrl* QWebEnginePage_RequestedUrl(const QWebEnginePage* self); +QUrl* QWebEnginePage_IconUrl(const QWebEnginePage* self); +QIcon* QWebEnginePage_Icon(const QWebEnginePage* self); +double QWebEnginePage_ZoomFactor(const QWebEnginePage* self); +void QWebEnginePage_SetZoomFactor(QWebEnginePage* self, double factor); +QPointF* QWebEnginePage_ScrollPosition(const QWebEnginePage* self); +QSizeF* QWebEnginePage_ContentsSize(const QWebEnginePage* self); +void QWebEnginePage_RunJavaScript(QWebEnginePage* self, struct miqt_string scriptSource); +void QWebEnginePage_RunJavaScript2(QWebEnginePage* self, struct miqt_string scriptSource, unsigned int worldId); +QWebEngineScriptCollection* QWebEnginePage_Scripts(QWebEnginePage* self); +QWebEngineSettings* QWebEnginePage_Settings(const QWebEnginePage* self); +QWebChannel* QWebEnginePage_WebChannel(const QWebEnginePage* self); +void QWebEnginePage_SetWebChannel(QWebEnginePage* self, QWebChannel* webChannel); +void QWebEnginePage_SetWebChannel2(QWebEnginePage* self, QWebChannel* param1, unsigned int worldId); +QColor* QWebEnginePage_BackgroundColor(const QWebEnginePage* self); +void QWebEnginePage_SetBackgroundColor(QWebEnginePage* self, QColor* color); +void QWebEnginePage_Save(const QWebEnginePage* self, struct miqt_string filePath); +bool QWebEnginePage_IsAudioMuted(const QWebEnginePage* self); +void QWebEnginePage_SetAudioMuted(QWebEnginePage* self, bool muted); +bool QWebEnginePage_RecentlyAudible(const QWebEnginePage* self); +long long QWebEnginePage_RenderProcessPid(const QWebEnginePage* self); +void QWebEnginePage_PrintToPdf(QWebEnginePage* self, struct miqt_string filePath); +void QWebEnginePage_SetInspectedPage(QWebEnginePage* self, QWebEnginePage* page); +QWebEnginePage* QWebEnginePage_InspectedPage(const QWebEnginePage* self); +void QWebEnginePage_SetDevToolsPage(QWebEnginePage* self, QWebEnginePage* page); +QWebEnginePage* QWebEnginePage_DevToolsPage(const QWebEnginePage* self); +void QWebEnginePage_SetUrlRequestInterceptor(QWebEnginePage* self, QWebEngineUrlRequestInterceptor* interceptor); +QWebEngineContextMenuData* QWebEnginePage_ContextMenuData(const QWebEnginePage* self); +int QWebEnginePage_LifecycleState(const QWebEnginePage* self); +void QWebEnginePage_SetLifecycleState(QWebEnginePage* self, int state); +int QWebEnginePage_RecommendedState(const QWebEnginePage* self); +bool QWebEnginePage_IsVisible(const QWebEnginePage* self); +void QWebEnginePage_SetVisible(QWebEnginePage* self, bool visible); +void QWebEnginePage_LoadStarted(QWebEnginePage* self); +void QWebEnginePage_connect_LoadStarted(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_LoadProgress(QWebEnginePage* self, int progress); +void QWebEnginePage_connect_LoadProgress(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_LoadFinished(QWebEnginePage* self, bool ok); +void QWebEnginePage_connect_LoadFinished(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_LinkHovered(QWebEnginePage* self, struct miqt_string url); +void QWebEnginePage_connect_LinkHovered(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_SelectionChanged(QWebEnginePage* self); +void QWebEnginePage_connect_SelectionChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_GeometryChangeRequested(QWebEnginePage* self, QRect* geom); +void QWebEnginePage_connect_GeometryChangeRequested(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_WindowCloseRequested(QWebEnginePage* self); +void QWebEnginePage_connect_WindowCloseRequested(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_FeaturePermissionRequested(QWebEnginePage* self, QUrl* securityOrigin, int feature); +void QWebEnginePage_connect_FeaturePermissionRequested(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_FeaturePermissionRequestCanceled(QWebEnginePage* self, QUrl* securityOrigin, int feature); +void QWebEnginePage_connect_FeaturePermissionRequestCanceled(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_FullScreenRequested(QWebEnginePage* self, QWebEngineFullScreenRequest* fullScreenRequest); +void QWebEnginePage_connect_FullScreenRequested(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_QuotaRequested(QWebEnginePage* self, QWebEngineQuotaRequest* quotaRequest); +void QWebEnginePage_connect_QuotaRequested(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_RegisterProtocolHandlerRequested(QWebEnginePage* self, QWebEngineRegisterProtocolHandlerRequest* request); +void QWebEnginePage_connect_RegisterProtocolHandlerRequested(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_SelectClientCertificate(QWebEnginePage* self, QWebEngineClientCertificateSelection* clientCertSelection); +void QWebEnginePage_connect_SelectClientCertificate(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_AuthenticationRequired(QWebEnginePage* self, QUrl* requestUrl, QAuthenticator* authenticator); +void QWebEnginePage_connect_AuthenticationRequired(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_ProxyAuthenticationRequired(QWebEnginePage* self, QUrl* requestUrl, QAuthenticator* authenticator, struct miqt_string proxyHost); +void QWebEnginePage_connect_ProxyAuthenticationRequired(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_RenderProcessTerminated(QWebEnginePage* self, int terminationStatus, int exitCode); +void QWebEnginePage_connect_RenderProcessTerminated(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_TitleChanged(QWebEnginePage* self, struct miqt_string title); +void QWebEnginePage_connect_TitleChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_UrlChanged(QWebEnginePage* self, QUrl* url); +void QWebEnginePage_connect_UrlChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_IconUrlChanged(QWebEnginePage* self, QUrl* url); +void QWebEnginePage_connect_IconUrlChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_IconChanged(QWebEnginePage* self, QIcon* icon); +void QWebEnginePage_connect_IconChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_ScrollPositionChanged(QWebEnginePage* self, QPointF* position); +void QWebEnginePage_connect_ScrollPositionChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_ContentsSizeChanged(QWebEnginePage* self, QSizeF* size); +void QWebEnginePage_connect_ContentsSizeChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_AudioMutedChanged(QWebEnginePage* self, bool muted); +void QWebEnginePage_connect_AudioMutedChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_RecentlyAudibleChanged(QWebEnginePage* self, bool recentlyAudible); +void QWebEnginePage_connect_RecentlyAudibleChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_RenderProcessPidChanged(QWebEnginePage* self, long long pid); +void QWebEnginePage_connect_RenderProcessPidChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_PdfPrintingFinished(QWebEnginePage* self, struct miqt_string filePath, bool success); +void QWebEnginePage_connect_PdfPrintingFinished(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_PrintRequested(QWebEnginePage* self); +void QWebEnginePage_connect_PrintRequested(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_VisibleChanged(QWebEnginePage* self, bool visible); +void QWebEnginePage_connect_VisibleChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_LifecycleStateChanged(QWebEnginePage* self, int state); +void QWebEnginePage_connect_LifecycleStateChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_RecommendedStateChanged(QWebEnginePage* self, int state); +void QWebEnginePage_connect_RecommendedStateChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_FindTextFinished(QWebEnginePage* self, QWebEngineFindTextResult* result); +void QWebEnginePage_connect_FindTextFinished(QWebEnginePage* self, intptr_t slot); +QWebEnginePage* QWebEnginePage_CreateWindow(QWebEnginePage* self, int typeVal); +struct miqt_array /* of struct miqt_string */ QWebEnginePage_ChooseFiles(QWebEnginePage* self, int mode, struct miqt_array /* of struct miqt_string */ oldFiles, struct miqt_array /* of struct miqt_string */ acceptedMimeTypes); +void QWebEnginePage_JavaScriptAlert(QWebEnginePage* self, QUrl* securityOrigin, struct miqt_string msg); +bool QWebEnginePage_JavaScriptConfirm(QWebEnginePage* self, QUrl* securityOrigin, struct miqt_string msg); +void QWebEnginePage_JavaScriptConsoleMessage(QWebEnginePage* self, int level, struct miqt_string message, int lineNumber, struct miqt_string sourceID); +bool QWebEnginePage_CertificateError(QWebEnginePage* self, QWebEngineCertificateError* certificateError); +bool QWebEnginePage_AcceptNavigationRequest(QWebEnginePage* self, QUrl* url, int typeVal, bool isMainFrame); +struct miqt_string QWebEnginePage_Tr2(const char* s, const char* c); +struct miqt_string QWebEnginePage_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebEnginePage_TrUtf82(const char* s, const char* c); +struct miqt_string QWebEnginePage_TrUtf83(const char* s, const char* c, int n); +void QWebEnginePage_FindText2(QWebEnginePage* self, struct miqt_string subString, int options); +void QWebEnginePage_Download2(QWebEnginePage* self, QUrl* url, struct miqt_string filename); +void QWebEnginePage_SetHtml2(QWebEnginePage* self, struct miqt_string html, QUrl* baseUrl); +void QWebEnginePage_SetContent2(QWebEnginePage* self, struct miqt_string data, struct miqt_string mimeType); +void QWebEnginePage_SetContent3(QWebEnginePage* self, struct miqt_string data, struct miqt_string mimeType, QUrl* baseUrl); +void QWebEnginePage_Save2(const QWebEnginePage* self, struct miqt_string filePath, int format); +void QWebEnginePage_PrintToPdf2(QWebEnginePage* self, struct miqt_string filePath, QPageLayout* layout); +void QWebEnginePage_override_virtual_TriggerAction(void* self, intptr_t slot); +void QWebEnginePage_virtualbase_TriggerAction(void* self, int action, bool checked); +void QWebEnginePage_override_virtual_Event(void* self, intptr_t slot); +bool QWebEnginePage_virtualbase_Event(void* self, QEvent* param1); +void QWebEnginePage_override_virtual_CreateWindow(void* self, intptr_t slot); +QWebEnginePage* QWebEnginePage_virtualbase_CreateWindow(void* self, int typeVal); +void QWebEnginePage_override_virtual_ChooseFiles(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QWebEnginePage_virtualbase_ChooseFiles(void* self, int mode, struct miqt_array /* of struct miqt_string */ oldFiles, struct miqt_array /* of struct miqt_string */ acceptedMimeTypes); +void QWebEnginePage_override_virtual_JavaScriptAlert(void* self, intptr_t slot); +void QWebEnginePage_virtualbase_JavaScriptAlert(void* self, QUrl* securityOrigin, struct miqt_string msg); +void QWebEnginePage_override_virtual_JavaScriptConfirm(void* self, intptr_t slot); +bool QWebEnginePage_virtualbase_JavaScriptConfirm(void* self, QUrl* securityOrigin, struct miqt_string msg); +void QWebEnginePage_override_virtual_JavaScriptConsoleMessage(void* self, intptr_t slot); +void QWebEnginePage_virtualbase_JavaScriptConsoleMessage(void* self, int level, struct miqt_string message, int lineNumber, struct miqt_string sourceID); +void QWebEnginePage_override_virtual_CertificateError(void* self, intptr_t slot); +bool QWebEnginePage_virtualbase_CertificateError(void* self, QWebEngineCertificateError* certificateError); +void QWebEnginePage_override_virtual_AcceptNavigationRequest(void* self, intptr_t slot); +bool QWebEnginePage_virtualbase_AcceptNavigationRequest(void* self, QUrl* url, int typeVal, bool isMainFrame); +void QWebEnginePage_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWebEnginePage_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QWebEnginePage_override_virtual_TimerEvent(void* self, intptr_t slot); +void QWebEnginePage_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QWebEnginePage_override_virtual_ChildEvent(void* self, intptr_t slot); +void QWebEnginePage_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QWebEnginePage_override_virtual_CustomEvent(void* self, intptr_t slot); +void QWebEnginePage_virtualbase_CustomEvent(void* self, QEvent* event); +void QWebEnginePage_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QWebEnginePage_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QWebEnginePage_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QWebEnginePage_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QWebEnginePage_Delete(QWebEnginePage* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebengineprofile.cpp b/qt/webengine/gen_qwebengineprofile.cpp new file mode 100644 index 00000000..3f4a138e --- /dev/null +++ b/qt/webengine/gen_qwebengineprofile.cpp @@ -0,0 +1,627 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebengineprofile.h" +#include "_cgo_export.h" + +class MiqtVirtualQWebEngineProfile : public virtual QWebEngineProfile { +public: + + MiqtVirtualQWebEngineProfile(): QWebEngineProfile() {}; + MiqtVirtualQWebEngineProfile(const QString& name): QWebEngineProfile(name) {}; + MiqtVirtualQWebEngineProfile(QObject* parent): QWebEngineProfile(parent) {}; + MiqtVirtualQWebEngineProfile(const QString& name, QObject* parent): QWebEngineProfile(name, parent) {}; + + virtual ~MiqtVirtualQWebEngineProfile() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QWebEngineProfile::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QWebEngineProfile_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QWebEngineProfile::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QWebEngineProfile::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QWebEngineProfile_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QWebEngineProfile::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QWebEngineProfile::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineProfile_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QWebEngineProfile::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QWebEngineProfile::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineProfile_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QWebEngineProfile::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QWebEngineProfile::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineProfile_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QWebEngineProfile::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QWebEngineProfile::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebEngineProfile_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QWebEngineProfile::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QWebEngineProfile::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebEngineProfile_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QWebEngineProfile::disconnectNotify(*signal); + + } + +}; + +void QWebEngineProfile_new(QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject) { + MiqtVirtualQWebEngineProfile* ret = new MiqtVirtualQWebEngineProfile(); + *outptr_QWebEngineProfile = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebEngineProfile_new2(struct miqt_string name, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject) { + QString name_QString = QString::fromUtf8(name.data, name.len); + MiqtVirtualQWebEngineProfile* ret = new MiqtVirtualQWebEngineProfile(name_QString); + *outptr_QWebEngineProfile = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebEngineProfile_new3(QObject* parent, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject) { + MiqtVirtualQWebEngineProfile* ret = new MiqtVirtualQWebEngineProfile(parent); + *outptr_QWebEngineProfile = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebEngineProfile_new4(struct miqt_string name, QObject* parent, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject) { + QString name_QString = QString::fromUtf8(name.data, name.len); + MiqtVirtualQWebEngineProfile* ret = new MiqtVirtualQWebEngineProfile(name_QString, parent); + *outptr_QWebEngineProfile = ret; + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QWebEngineProfile_MetaObject(const QWebEngineProfile* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineProfile_Metacast(QWebEngineProfile* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineProfile_Tr(const char* s) { + QString _ret = QWebEngineProfile::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineProfile_TrUtf8(const char* s) { + QString _ret = QWebEngineProfile::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineProfile_StorageName(const QWebEngineProfile* self) { + QString _ret = self->storageName(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QWebEngineProfile_IsOffTheRecord(const QWebEngineProfile* self) { + return self->isOffTheRecord(); +} + +struct miqt_string QWebEngineProfile_PersistentStoragePath(const QWebEngineProfile* self) { + QString _ret = self->persistentStoragePath(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineProfile_SetPersistentStoragePath(QWebEngineProfile* self, struct miqt_string path) { + QString path_QString = QString::fromUtf8(path.data, path.len); + self->setPersistentStoragePath(path_QString); +} + +struct miqt_string QWebEngineProfile_CachePath(const QWebEngineProfile* self) { + QString _ret = self->cachePath(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineProfile_SetCachePath(QWebEngineProfile* self, struct miqt_string path) { + QString path_QString = QString::fromUtf8(path.data, path.len); + self->setCachePath(path_QString); +} + +struct miqt_string QWebEngineProfile_HttpUserAgent(const QWebEngineProfile* self) { + QString _ret = self->httpUserAgent(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineProfile_SetHttpUserAgent(QWebEngineProfile* self, struct miqt_string userAgent) { + QString userAgent_QString = QString::fromUtf8(userAgent.data, userAgent.len); + self->setHttpUserAgent(userAgent_QString); +} + +int QWebEngineProfile_HttpCacheType(const QWebEngineProfile* self) { + QWebEngineProfile::HttpCacheType _ret = self->httpCacheType(); + return static_cast(_ret); +} + +void QWebEngineProfile_SetHttpCacheType(QWebEngineProfile* self, int httpCacheType) { + self->setHttpCacheType(static_cast(httpCacheType)); +} + +void QWebEngineProfile_SetHttpAcceptLanguage(QWebEngineProfile* self, struct miqt_string httpAcceptLanguage) { + QString httpAcceptLanguage_QString = QString::fromUtf8(httpAcceptLanguage.data, httpAcceptLanguage.len); + self->setHttpAcceptLanguage(httpAcceptLanguage_QString); +} + +struct miqt_string QWebEngineProfile_HttpAcceptLanguage(const QWebEngineProfile* self) { + QString _ret = self->httpAcceptLanguage(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QWebEngineProfile_PersistentCookiesPolicy(const QWebEngineProfile* self) { + QWebEngineProfile::PersistentCookiesPolicy _ret = self->persistentCookiesPolicy(); + return static_cast(_ret); +} + +void QWebEngineProfile_SetPersistentCookiesPolicy(QWebEngineProfile* self, int persistentCookiesPolicy) { + self->setPersistentCookiesPolicy(static_cast(persistentCookiesPolicy)); +} + +int QWebEngineProfile_HttpCacheMaximumSize(const QWebEngineProfile* self) { + return self->httpCacheMaximumSize(); +} + +void QWebEngineProfile_SetHttpCacheMaximumSize(QWebEngineProfile* self, int maxSize) { + self->setHttpCacheMaximumSize(static_cast(maxSize)); +} + +QWebEngineCookieStore* QWebEngineProfile_CookieStore(QWebEngineProfile* self) { + return self->cookieStore(); +} + +void QWebEngineProfile_SetRequestInterceptor(QWebEngineProfile* self, QWebEngineUrlRequestInterceptor* interceptor) { + self->setRequestInterceptor(interceptor); +} + +void QWebEngineProfile_SetUrlRequestInterceptor(QWebEngineProfile* self, QWebEngineUrlRequestInterceptor* interceptor) { + self->setUrlRequestInterceptor(interceptor); +} + +void QWebEngineProfile_ClearAllVisitedLinks(QWebEngineProfile* self) { + self->clearAllVisitedLinks(); +} + +void QWebEngineProfile_ClearVisitedLinks(QWebEngineProfile* self, struct miqt_array /* of QUrl* */ urls) { + QList urls_QList; + urls_QList.reserve(urls.len); + QUrl** urls_arr = static_cast(urls.data); + for(size_t i = 0; i < urls.len; ++i) { + urls_QList.push_back(*(urls_arr[i])); + } + self->clearVisitedLinks(urls_QList); +} + +bool QWebEngineProfile_VisitedLinksContainsUrl(const QWebEngineProfile* self, QUrl* url) { + return self->visitedLinksContainsUrl(*url); +} + +QWebEngineSettings* QWebEngineProfile_Settings(const QWebEngineProfile* self) { + return self->settings(); +} + +QWebEngineScriptCollection* QWebEngineProfile_Scripts(const QWebEngineProfile* self) { + return self->scripts(); +} + +QWebEngineUrlSchemeHandler* QWebEngineProfile_UrlSchemeHandler(const QWebEngineProfile* self, struct miqt_string param1) { + QByteArray param1_QByteArray(param1.data, param1.len); + return (QWebEngineUrlSchemeHandler*) self->urlSchemeHandler(param1_QByteArray); +} + +void QWebEngineProfile_InstallUrlSchemeHandler(QWebEngineProfile* self, struct miqt_string scheme, QWebEngineUrlSchemeHandler* param2) { + QByteArray scheme_QByteArray(scheme.data, scheme.len); + self->installUrlSchemeHandler(scheme_QByteArray, param2); +} + +void QWebEngineProfile_RemoveUrlScheme(QWebEngineProfile* self, struct miqt_string scheme) { + QByteArray scheme_QByteArray(scheme.data, scheme.len); + self->removeUrlScheme(scheme_QByteArray); +} + +void QWebEngineProfile_RemoveUrlSchemeHandler(QWebEngineProfile* self, QWebEngineUrlSchemeHandler* param1) { + self->removeUrlSchemeHandler(param1); +} + +void QWebEngineProfile_RemoveAllUrlSchemeHandlers(QWebEngineProfile* self) { + self->removeAllUrlSchemeHandlers(); +} + +void QWebEngineProfile_ClearHttpCache(QWebEngineProfile* self) { + self->clearHttpCache(); +} + +void QWebEngineProfile_SetSpellCheckLanguages(QWebEngineProfile* self, struct miqt_array /* of struct miqt_string */ languages) { + QStringList languages_QList; + languages_QList.reserve(languages.len); + struct miqt_string* languages_arr = static_cast(languages.data); + for(size_t i = 0; i < languages.len; ++i) { + QString languages_arr_i_QString = QString::fromUtf8(languages_arr[i].data, languages_arr[i].len); + languages_QList.push_back(languages_arr_i_QString); + } + self->setSpellCheckLanguages(languages_QList); +} + +struct miqt_array /* of struct miqt_string */ QWebEngineProfile_SpellCheckLanguages(const QWebEngineProfile* self) { + QStringList _ret = self->spellCheckLanguages(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QWebEngineProfile_SetSpellCheckEnabled(QWebEngineProfile* self, bool enabled) { + self->setSpellCheckEnabled(enabled); +} + +bool QWebEngineProfile_IsSpellCheckEnabled(const QWebEngineProfile* self) { + return self->isSpellCheckEnabled(); +} + +void QWebEngineProfile_SetUseForGlobalCertificateVerification(QWebEngineProfile* self) { + self->setUseForGlobalCertificateVerification(); +} + +bool QWebEngineProfile_IsUsedForGlobalCertificateVerification(const QWebEngineProfile* self) { + return self->isUsedForGlobalCertificateVerification(); +} + +struct miqt_string QWebEngineProfile_DownloadPath(const QWebEngineProfile* self) { + QString _ret = self->downloadPath(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineProfile_SetDownloadPath(QWebEngineProfile* self, struct miqt_string path) { + QString path_QString = QString::fromUtf8(path.data, path.len); + self->setDownloadPath(path_QString); +} + +QWebEngineClientCertificateStore* QWebEngineProfile_ClientCertificateStore(QWebEngineProfile* self) { + return self->clientCertificateStore(); +} + +QWebEngineProfile* QWebEngineProfile_DefaultProfile() { + return QWebEngineProfile::defaultProfile(); +} + +void QWebEngineProfile_DownloadRequested(QWebEngineProfile* self, QWebEngineDownloadItem* download) { + self->downloadRequested(download); +} + +void QWebEngineProfile_connect_DownloadRequested(QWebEngineProfile* self, intptr_t slot) { + MiqtVirtualQWebEngineProfile::connect(self, static_cast(&QWebEngineProfile::downloadRequested), self, [=](QWebEngineDownloadItem* download) { + QWebEngineDownloadItem* sigval1 = download; + miqt_exec_callback_QWebEngineProfile_DownloadRequested(slot, sigval1); + }); +} + +struct miqt_string QWebEngineProfile_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineProfile::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineProfile_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineProfile::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineProfile_TrUtf82(const char* s, const char* c) { + QString _ret = QWebEngineProfile::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineProfile_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebEngineProfile::trUtf8(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineProfile_SetUseForGlobalCertificateVerification1(QWebEngineProfile* self, bool enabled) { + self->setUseForGlobalCertificateVerification(enabled); +} + +void QWebEngineProfile_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineProfile*)(self) )->handle__Event = slot; +} + +bool QWebEngineProfile_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQWebEngineProfile*)(self) )->virtualbase_Event(event); +} + +void QWebEngineProfile_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineProfile*)(self) )->handle__EventFilter = slot; +} + +bool QWebEngineProfile_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQWebEngineProfile*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QWebEngineProfile_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineProfile*)(self) )->handle__TimerEvent = slot; +} + +void QWebEngineProfile_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQWebEngineProfile*)(self) )->virtualbase_TimerEvent(event); +} + +void QWebEngineProfile_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineProfile*)(self) )->handle__ChildEvent = slot; +} + +void QWebEngineProfile_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQWebEngineProfile*)(self) )->virtualbase_ChildEvent(event); +} + +void QWebEngineProfile_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineProfile*)(self) )->handle__CustomEvent = slot; +} + +void QWebEngineProfile_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebEngineProfile*)(self) )->virtualbase_CustomEvent(event); +} + +void QWebEngineProfile_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineProfile*)(self) )->handle__ConnectNotify = slot; +} + +void QWebEngineProfile_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebEngineProfile*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QWebEngineProfile_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineProfile*)(self) )->handle__DisconnectNotify = slot; +} + +void QWebEngineProfile_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebEngineProfile*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QWebEngineProfile_Delete(QWebEngineProfile* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webengine/gen_qwebengineprofile.go b/qt/webengine/gen_qwebengineprofile.go new file mode 100644 index 00000000..1054b462 --- /dev/null +++ b/qt/webengine/gen_qwebengineprofile.go @@ -0,0 +1,631 @@ +package webengine + +/* + +#include "gen_qwebengineprofile.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebEngineProfile__HttpCacheType int + +const ( + QWebEngineProfile__MemoryHttpCache QWebEngineProfile__HttpCacheType = 0 + QWebEngineProfile__DiskHttpCache QWebEngineProfile__HttpCacheType = 1 + QWebEngineProfile__NoCache QWebEngineProfile__HttpCacheType = 2 +) + +type QWebEngineProfile__PersistentCookiesPolicy int + +const ( + QWebEngineProfile__NoPersistentCookies QWebEngineProfile__PersistentCookiesPolicy = 0 + QWebEngineProfile__AllowPersistentCookies QWebEngineProfile__PersistentCookiesPolicy = 1 + QWebEngineProfile__ForcePersistentCookies QWebEngineProfile__PersistentCookiesPolicy = 2 +) + +type QWebEngineProfile struct { + h *C.QWebEngineProfile + isSubclass bool + *qt.QObject +} + +func (this *QWebEngineProfile) cPointer() *C.QWebEngineProfile { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineProfile) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineProfile constructs the type using only CGO pointers. +func newQWebEngineProfile(h *C.QWebEngineProfile, h_QObject *C.QObject) *QWebEngineProfile { + if h == nil { + return nil + } + return &QWebEngineProfile{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEngineProfile constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineProfile(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineProfile { + if h == nil { + return nil + } + + return &QWebEngineProfile{h: (*C.QWebEngineProfile)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +// NewQWebEngineProfile constructs a new QWebEngineProfile object. +func NewQWebEngineProfile() *QWebEngineProfile { + var outptr_QWebEngineProfile *C.QWebEngineProfile = nil + var outptr_QObject *C.QObject = nil + + C.QWebEngineProfile_new(&outptr_QWebEngineProfile, &outptr_QObject) + ret := newQWebEngineProfile(outptr_QWebEngineProfile, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebEngineProfile2 constructs a new QWebEngineProfile object. +func NewQWebEngineProfile2(name string) *QWebEngineProfile { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + var outptr_QWebEngineProfile *C.QWebEngineProfile = nil + var outptr_QObject *C.QObject = nil + + C.QWebEngineProfile_new2(name_ms, &outptr_QWebEngineProfile, &outptr_QObject) + ret := newQWebEngineProfile(outptr_QWebEngineProfile, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebEngineProfile3 constructs a new QWebEngineProfile object. +func NewQWebEngineProfile3(parent *qt.QObject) *QWebEngineProfile { + var outptr_QWebEngineProfile *C.QWebEngineProfile = nil + var outptr_QObject *C.QObject = nil + + C.QWebEngineProfile_new3((*C.QObject)(parent.UnsafePointer()), &outptr_QWebEngineProfile, &outptr_QObject) + ret := newQWebEngineProfile(outptr_QWebEngineProfile, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebEngineProfile4 constructs a new QWebEngineProfile object. +func NewQWebEngineProfile4(name string, parent *qt.QObject) *QWebEngineProfile { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + var outptr_QWebEngineProfile *C.QWebEngineProfile = nil + var outptr_QObject *C.QObject = nil + + C.QWebEngineProfile_new4(name_ms, (*C.QObject)(parent.UnsafePointer()), &outptr_QWebEngineProfile, &outptr_QObject) + ret := newQWebEngineProfile(outptr_QWebEngineProfile, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineProfile) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineProfile_MetaObject(this.h))) +} + +func (this *QWebEngineProfile) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineProfile_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineProfile_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineProfile_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineProfile_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineProfile_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineProfile) StorageName() string { + var _ms C.struct_miqt_string = C.QWebEngineProfile_StorageName(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineProfile) IsOffTheRecord() bool { + return (bool)(C.QWebEngineProfile_IsOffTheRecord(this.h)) +} + +func (this *QWebEngineProfile) PersistentStoragePath() string { + var _ms C.struct_miqt_string = C.QWebEngineProfile_PersistentStoragePath(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineProfile) SetPersistentStoragePath(path string) { + path_ms := C.struct_miqt_string{} + path_ms.data = C.CString(path) + path_ms.len = C.size_t(len(path)) + defer C.free(unsafe.Pointer(path_ms.data)) + C.QWebEngineProfile_SetPersistentStoragePath(this.h, path_ms) +} + +func (this *QWebEngineProfile) CachePath() string { + var _ms C.struct_miqt_string = C.QWebEngineProfile_CachePath(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineProfile) SetCachePath(path string) { + path_ms := C.struct_miqt_string{} + path_ms.data = C.CString(path) + path_ms.len = C.size_t(len(path)) + defer C.free(unsafe.Pointer(path_ms.data)) + C.QWebEngineProfile_SetCachePath(this.h, path_ms) +} + +func (this *QWebEngineProfile) HttpUserAgent() string { + var _ms C.struct_miqt_string = C.QWebEngineProfile_HttpUserAgent(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineProfile) SetHttpUserAgent(userAgent string) { + userAgent_ms := C.struct_miqt_string{} + userAgent_ms.data = C.CString(userAgent) + userAgent_ms.len = C.size_t(len(userAgent)) + defer C.free(unsafe.Pointer(userAgent_ms.data)) + C.QWebEngineProfile_SetHttpUserAgent(this.h, userAgent_ms) +} + +func (this *QWebEngineProfile) HttpCacheType() QWebEngineProfile__HttpCacheType { + return (QWebEngineProfile__HttpCacheType)(C.QWebEngineProfile_HttpCacheType(this.h)) +} + +func (this *QWebEngineProfile) SetHttpCacheType(httpCacheType QWebEngineProfile__HttpCacheType) { + C.QWebEngineProfile_SetHttpCacheType(this.h, (C.int)(httpCacheType)) +} + +func (this *QWebEngineProfile) SetHttpAcceptLanguage(httpAcceptLanguage string) { + httpAcceptLanguage_ms := C.struct_miqt_string{} + httpAcceptLanguage_ms.data = C.CString(httpAcceptLanguage) + httpAcceptLanguage_ms.len = C.size_t(len(httpAcceptLanguage)) + defer C.free(unsafe.Pointer(httpAcceptLanguage_ms.data)) + C.QWebEngineProfile_SetHttpAcceptLanguage(this.h, httpAcceptLanguage_ms) +} + +func (this *QWebEngineProfile) HttpAcceptLanguage() string { + var _ms C.struct_miqt_string = C.QWebEngineProfile_HttpAcceptLanguage(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineProfile) PersistentCookiesPolicy() QWebEngineProfile__PersistentCookiesPolicy { + return (QWebEngineProfile__PersistentCookiesPolicy)(C.QWebEngineProfile_PersistentCookiesPolicy(this.h)) +} + +func (this *QWebEngineProfile) SetPersistentCookiesPolicy(persistentCookiesPolicy QWebEngineProfile__PersistentCookiesPolicy) { + C.QWebEngineProfile_SetPersistentCookiesPolicy(this.h, (C.int)(persistentCookiesPolicy)) +} + +func (this *QWebEngineProfile) HttpCacheMaximumSize() int { + return (int)(C.QWebEngineProfile_HttpCacheMaximumSize(this.h)) +} + +func (this *QWebEngineProfile) SetHttpCacheMaximumSize(maxSize int) { + C.QWebEngineProfile_SetHttpCacheMaximumSize(this.h, (C.int)(maxSize)) +} + +func (this *QWebEngineProfile) CookieStore() *QWebEngineCookieStore { + return UnsafeNewQWebEngineCookieStore(unsafe.Pointer(C.QWebEngineProfile_CookieStore(this.h)), nil) +} + +func (this *QWebEngineProfile) SetRequestInterceptor(interceptor *QWebEngineUrlRequestInterceptor) { + C.QWebEngineProfile_SetRequestInterceptor(this.h, interceptor.cPointer()) +} + +func (this *QWebEngineProfile) SetUrlRequestInterceptor(interceptor *QWebEngineUrlRequestInterceptor) { + C.QWebEngineProfile_SetUrlRequestInterceptor(this.h, interceptor.cPointer()) +} + +func (this *QWebEngineProfile) ClearAllVisitedLinks() { + C.QWebEngineProfile_ClearAllVisitedLinks(this.h) +} + +func (this *QWebEngineProfile) ClearVisitedLinks(urls []qt.QUrl) { + urls_CArray := (*[0xffff]*C.QUrl)(C.malloc(C.size_t(8 * len(urls)))) + defer C.free(unsafe.Pointer(urls_CArray)) + for i := range urls { + urls_CArray[i] = (*C.QUrl)(urls[i].UnsafePointer()) + } + urls_ma := C.struct_miqt_array{len: C.size_t(len(urls)), data: unsafe.Pointer(urls_CArray)} + C.QWebEngineProfile_ClearVisitedLinks(this.h, urls_ma) +} + +func (this *QWebEngineProfile) VisitedLinksContainsUrl(url *qt.QUrl) bool { + return (bool)(C.QWebEngineProfile_VisitedLinksContainsUrl(this.h, (*C.QUrl)(url.UnsafePointer()))) +} + +func (this *QWebEngineProfile) Settings() *QWebEngineSettings { + return UnsafeNewQWebEngineSettings(unsafe.Pointer(C.QWebEngineProfile_Settings(this.h))) +} + +func (this *QWebEngineProfile) Scripts() *QWebEngineScriptCollection { + return UnsafeNewQWebEngineScriptCollection(unsafe.Pointer(C.QWebEngineProfile_Scripts(this.h))) +} + +func (this *QWebEngineProfile) UrlSchemeHandler(param1 []byte) *QWebEngineUrlSchemeHandler { + param1_alias := C.struct_miqt_string{} + param1_alias.data = (*C.char)(unsafe.Pointer(¶m1[0])) + param1_alias.len = C.size_t(len(param1)) + return UnsafeNewQWebEngineUrlSchemeHandler(unsafe.Pointer(C.QWebEngineProfile_UrlSchemeHandler(this.h, param1_alias)), nil) +} + +func (this *QWebEngineProfile) InstallUrlSchemeHandler(scheme []byte, param2 *QWebEngineUrlSchemeHandler) { + scheme_alias := C.struct_miqt_string{} + scheme_alias.data = (*C.char)(unsafe.Pointer(&scheme[0])) + scheme_alias.len = C.size_t(len(scheme)) + C.QWebEngineProfile_InstallUrlSchemeHandler(this.h, scheme_alias, param2.cPointer()) +} + +func (this *QWebEngineProfile) RemoveUrlScheme(scheme []byte) { + scheme_alias := C.struct_miqt_string{} + scheme_alias.data = (*C.char)(unsafe.Pointer(&scheme[0])) + scheme_alias.len = C.size_t(len(scheme)) + C.QWebEngineProfile_RemoveUrlScheme(this.h, scheme_alias) +} + +func (this *QWebEngineProfile) RemoveUrlSchemeHandler(param1 *QWebEngineUrlSchemeHandler) { + C.QWebEngineProfile_RemoveUrlSchemeHandler(this.h, param1.cPointer()) +} + +func (this *QWebEngineProfile) RemoveAllUrlSchemeHandlers() { + C.QWebEngineProfile_RemoveAllUrlSchemeHandlers(this.h) +} + +func (this *QWebEngineProfile) ClearHttpCache() { + C.QWebEngineProfile_ClearHttpCache(this.h) +} + +func (this *QWebEngineProfile) SetSpellCheckLanguages(languages []string) { + languages_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(languages)))) + defer C.free(unsafe.Pointer(languages_CArray)) + for i := range languages { + languages_i_ms := C.struct_miqt_string{} + languages_i_ms.data = C.CString(languages[i]) + languages_i_ms.len = C.size_t(len(languages[i])) + defer C.free(unsafe.Pointer(languages_i_ms.data)) + languages_CArray[i] = languages_i_ms + } + languages_ma := C.struct_miqt_array{len: C.size_t(len(languages)), data: unsafe.Pointer(languages_CArray)} + C.QWebEngineProfile_SetSpellCheckLanguages(this.h, languages_ma) +} + +func (this *QWebEngineProfile) SpellCheckLanguages() []string { + var _ma C.struct_miqt_array = C.QWebEngineProfile_SpellCheckLanguages(this.h) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret +} + +func (this *QWebEngineProfile) SetSpellCheckEnabled(enabled bool) { + C.QWebEngineProfile_SetSpellCheckEnabled(this.h, (C.bool)(enabled)) +} + +func (this *QWebEngineProfile) IsSpellCheckEnabled() bool { + return (bool)(C.QWebEngineProfile_IsSpellCheckEnabled(this.h)) +} + +func (this *QWebEngineProfile) SetUseForGlobalCertificateVerification() { + C.QWebEngineProfile_SetUseForGlobalCertificateVerification(this.h) +} + +func (this *QWebEngineProfile) IsUsedForGlobalCertificateVerification() bool { + return (bool)(C.QWebEngineProfile_IsUsedForGlobalCertificateVerification(this.h)) +} + +func (this *QWebEngineProfile) DownloadPath() string { + var _ms C.struct_miqt_string = C.QWebEngineProfile_DownloadPath(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineProfile) SetDownloadPath(path string) { + path_ms := C.struct_miqt_string{} + path_ms.data = C.CString(path) + path_ms.len = C.size_t(len(path)) + defer C.free(unsafe.Pointer(path_ms.data)) + C.QWebEngineProfile_SetDownloadPath(this.h, path_ms) +} + +func (this *QWebEngineProfile) ClientCertificateStore() *QWebEngineClientCertificateStore { + return UnsafeNewQWebEngineClientCertificateStore(unsafe.Pointer(C.QWebEngineProfile_ClientCertificateStore(this.h))) +} + +func QWebEngineProfile_DefaultProfile() *QWebEngineProfile { + return UnsafeNewQWebEngineProfile(unsafe.Pointer(C.QWebEngineProfile_DefaultProfile()), nil) +} + +func (this *QWebEngineProfile) DownloadRequested(download *QWebEngineDownloadItem) { + C.QWebEngineProfile_DownloadRequested(this.h, download.cPointer()) +} +func (this *QWebEngineProfile) OnDownloadRequested(slot func(download *QWebEngineDownloadItem)) { + C.QWebEngineProfile_connect_DownloadRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineProfile_DownloadRequested +func miqt_exec_callback_QWebEngineProfile_DownloadRequested(cb C.intptr_t, download *C.QWebEngineDownloadItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(download *QWebEngineDownloadItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebEngineDownloadItem(unsafe.Pointer(download), nil) + + gofunc(slotval1) +} + +func QWebEngineProfile_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineProfile_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineProfile_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineProfile_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineProfile_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineProfile_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineProfile_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineProfile_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineProfile) SetUseForGlobalCertificateVerification1(enabled bool) { + C.QWebEngineProfile_SetUseForGlobalCertificateVerification1(this.h, (C.bool)(enabled)) +} + +func (this *QWebEngineProfile) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QWebEngineProfile_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebEngineProfile) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QWebEngineProfile_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineProfile_Event +func miqt_exec_callback_QWebEngineProfile_Event(self *C.QWebEngineProfile, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebEngineProfile{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEngineProfile) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QWebEngineProfile_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebEngineProfile) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QWebEngineProfile_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineProfile_EventFilter +func miqt_exec_callback_QWebEngineProfile_EventFilter(self *C.QWebEngineProfile, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebEngineProfile{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEngineProfile) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QWebEngineProfile_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineProfile) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QWebEngineProfile_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineProfile_TimerEvent +func miqt_exec_callback_QWebEngineProfile_TimerEvent(self *C.QWebEngineProfile, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineProfile{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QWebEngineProfile) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QWebEngineProfile_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineProfile) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QWebEngineProfile_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineProfile_ChildEvent +func miqt_exec_callback_QWebEngineProfile_ChildEvent(self *C.QWebEngineProfile, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineProfile{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QWebEngineProfile) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QWebEngineProfile_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineProfile) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QWebEngineProfile_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineProfile_CustomEvent +func miqt_exec_callback_QWebEngineProfile_CustomEvent(self *C.QWebEngineProfile, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWebEngineProfile{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QWebEngineProfile) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QWebEngineProfile_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebEngineProfile) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QWebEngineProfile_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineProfile_ConnectNotify +func miqt_exec_callback_QWebEngineProfile_ConnectNotify(self *C.QWebEngineProfile, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebEngineProfile{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QWebEngineProfile) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QWebEngineProfile_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebEngineProfile) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QWebEngineProfile_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineProfile_DisconnectNotify +func miqt_exec_callback_QWebEngineProfile_DisconnectNotify(self *C.QWebEngineProfile, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebEngineProfile{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QWebEngineProfile) Delete() { + C.QWebEngineProfile_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineProfile) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineProfile) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webengine/gen_qwebengineprofile.h b/qt/webengine/gen_qwebengineprofile.h new file mode 100644 index 00000000..08a37c8a --- /dev/null +++ b/qt/webengine/gen_qwebengineprofile.h @@ -0,0 +1,126 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEPROFILE_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEPROFILE_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; +class QMetaObject; +class QObject; +class QTimerEvent; +class QUrl; +class QWebEngineClientCertificateStore; +class QWebEngineCookieStore; +class QWebEngineDownloadItem; +class QWebEngineProfile; +class QWebEngineScriptCollection; +class QWebEngineSettings; +class QWebEngineUrlRequestInterceptor; +class QWebEngineUrlSchemeHandler; +#else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; +typedef struct QUrl QUrl; +typedef struct QWebEngineClientCertificateStore QWebEngineClientCertificateStore; +typedef struct QWebEngineCookieStore QWebEngineCookieStore; +typedef struct QWebEngineDownloadItem QWebEngineDownloadItem; +typedef struct QWebEngineProfile QWebEngineProfile; +typedef struct QWebEngineScriptCollection QWebEngineScriptCollection; +typedef struct QWebEngineSettings QWebEngineSettings; +typedef struct QWebEngineUrlRequestInterceptor QWebEngineUrlRequestInterceptor; +typedef struct QWebEngineUrlSchemeHandler QWebEngineUrlSchemeHandler; +#endif + +void QWebEngineProfile_new(QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject); +void QWebEngineProfile_new2(struct miqt_string name, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject); +void QWebEngineProfile_new3(QObject* parent, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject); +void QWebEngineProfile_new4(struct miqt_string name, QObject* parent, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject); +QMetaObject* QWebEngineProfile_MetaObject(const QWebEngineProfile* self); +void* QWebEngineProfile_Metacast(QWebEngineProfile* self, const char* param1); +struct miqt_string QWebEngineProfile_Tr(const char* s); +struct miqt_string QWebEngineProfile_TrUtf8(const char* s); +struct miqt_string QWebEngineProfile_StorageName(const QWebEngineProfile* self); +bool QWebEngineProfile_IsOffTheRecord(const QWebEngineProfile* self); +struct miqt_string QWebEngineProfile_PersistentStoragePath(const QWebEngineProfile* self); +void QWebEngineProfile_SetPersistentStoragePath(QWebEngineProfile* self, struct miqt_string path); +struct miqt_string QWebEngineProfile_CachePath(const QWebEngineProfile* self); +void QWebEngineProfile_SetCachePath(QWebEngineProfile* self, struct miqt_string path); +struct miqt_string QWebEngineProfile_HttpUserAgent(const QWebEngineProfile* self); +void QWebEngineProfile_SetHttpUserAgent(QWebEngineProfile* self, struct miqt_string userAgent); +int QWebEngineProfile_HttpCacheType(const QWebEngineProfile* self); +void QWebEngineProfile_SetHttpCacheType(QWebEngineProfile* self, int httpCacheType); +void QWebEngineProfile_SetHttpAcceptLanguage(QWebEngineProfile* self, struct miqt_string httpAcceptLanguage); +struct miqt_string QWebEngineProfile_HttpAcceptLanguage(const QWebEngineProfile* self); +int QWebEngineProfile_PersistentCookiesPolicy(const QWebEngineProfile* self); +void QWebEngineProfile_SetPersistentCookiesPolicy(QWebEngineProfile* self, int persistentCookiesPolicy); +int QWebEngineProfile_HttpCacheMaximumSize(const QWebEngineProfile* self); +void QWebEngineProfile_SetHttpCacheMaximumSize(QWebEngineProfile* self, int maxSize); +QWebEngineCookieStore* QWebEngineProfile_CookieStore(QWebEngineProfile* self); +void QWebEngineProfile_SetRequestInterceptor(QWebEngineProfile* self, QWebEngineUrlRequestInterceptor* interceptor); +void QWebEngineProfile_SetUrlRequestInterceptor(QWebEngineProfile* self, QWebEngineUrlRequestInterceptor* interceptor); +void QWebEngineProfile_ClearAllVisitedLinks(QWebEngineProfile* self); +void QWebEngineProfile_ClearVisitedLinks(QWebEngineProfile* self, struct miqt_array /* of QUrl* */ urls); +bool QWebEngineProfile_VisitedLinksContainsUrl(const QWebEngineProfile* self, QUrl* url); +QWebEngineSettings* QWebEngineProfile_Settings(const QWebEngineProfile* self); +QWebEngineScriptCollection* QWebEngineProfile_Scripts(const QWebEngineProfile* self); +QWebEngineUrlSchemeHandler* QWebEngineProfile_UrlSchemeHandler(const QWebEngineProfile* self, struct miqt_string param1); +void QWebEngineProfile_InstallUrlSchemeHandler(QWebEngineProfile* self, struct miqt_string scheme, QWebEngineUrlSchemeHandler* param2); +void QWebEngineProfile_RemoveUrlScheme(QWebEngineProfile* self, struct miqt_string scheme); +void QWebEngineProfile_RemoveUrlSchemeHandler(QWebEngineProfile* self, QWebEngineUrlSchemeHandler* param1); +void QWebEngineProfile_RemoveAllUrlSchemeHandlers(QWebEngineProfile* self); +void QWebEngineProfile_ClearHttpCache(QWebEngineProfile* self); +void QWebEngineProfile_SetSpellCheckLanguages(QWebEngineProfile* self, struct miqt_array /* of struct miqt_string */ languages); +struct miqt_array /* of struct miqt_string */ QWebEngineProfile_SpellCheckLanguages(const QWebEngineProfile* self); +void QWebEngineProfile_SetSpellCheckEnabled(QWebEngineProfile* self, bool enabled); +bool QWebEngineProfile_IsSpellCheckEnabled(const QWebEngineProfile* self); +void QWebEngineProfile_SetUseForGlobalCertificateVerification(QWebEngineProfile* self); +bool QWebEngineProfile_IsUsedForGlobalCertificateVerification(const QWebEngineProfile* self); +struct miqt_string QWebEngineProfile_DownloadPath(const QWebEngineProfile* self); +void QWebEngineProfile_SetDownloadPath(QWebEngineProfile* self, struct miqt_string path); +QWebEngineClientCertificateStore* QWebEngineProfile_ClientCertificateStore(QWebEngineProfile* self); +QWebEngineProfile* QWebEngineProfile_DefaultProfile(); +void QWebEngineProfile_DownloadRequested(QWebEngineProfile* self, QWebEngineDownloadItem* download); +void QWebEngineProfile_connect_DownloadRequested(QWebEngineProfile* self, intptr_t slot); +struct miqt_string QWebEngineProfile_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineProfile_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebEngineProfile_TrUtf82(const char* s, const char* c); +struct miqt_string QWebEngineProfile_TrUtf83(const char* s, const char* c, int n); +void QWebEngineProfile_SetUseForGlobalCertificateVerification1(QWebEngineProfile* self, bool enabled); +void QWebEngineProfile_override_virtual_Event(void* self, intptr_t slot); +bool QWebEngineProfile_virtualbase_Event(void* self, QEvent* event); +void QWebEngineProfile_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWebEngineProfile_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QWebEngineProfile_override_virtual_TimerEvent(void* self, intptr_t slot); +void QWebEngineProfile_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QWebEngineProfile_override_virtual_ChildEvent(void* self, intptr_t slot); +void QWebEngineProfile_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QWebEngineProfile_override_virtual_CustomEvent(void* self, intptr_t slot); +void QWebEngineProfile_virtualbase_CustomEvent(void* self, QEvent* event); +void QWebEngineProfile_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QWebEngineProfile_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QWebEngineProfile_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QWebEngineProfile_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QWebEngineProfile_Delete(QWebEngineProfile* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebenginequotarequest.cpp b/qt/webengine/gen_qwebenginequotarequest.cpp new file mode 100644 index 00000000..6f249c33 --- /dev/null +++ b/qt/webengine/gen_qwebenginequotarequest.cpp @@ -0,0 +1,49 @@ +#include +#include +#include +#include "gen_qwebenginequotarequest.h" +#include "_cgo_export.h" + +void QWebEngineQuotaRequest_new(QWebEngineQuotaRequest** outptr_QWebEngineQuotaRequest) { + QWebEngineQuotaRequest* ret = new QWebEngineQuotaRequest(); + *outptr_QWebEngineQuotaRequest = ret; +} + +void QWebEngineQuotaRequest_new2(QWebEngineQuotaRequest* param1, QWebEngineQuotaRequest** outptr_QWebEngineQuotaRequest) { + QWebEngineQuotaRequest* ret = new QWebEngineQuotaRequest(*param1); + *outptr_QWebEngineQuotaRequest = ret; +} + +void QWebEngineQuotaRequest_Accept(QWebEngineQuotaRequest* self) { + self->accept(); +} + +void QWebEngineQuotaRequest_Reject(QWebEngineQuotaRequest* self) { + self->reject(); +} + +QUrl* QWebEngineQuotaRequest_Origin(const QWebEngineQuotaRequest* self) { + return new QUrl(self->origin()); +} + +long long QWebEngineQuotaRequest_RequestedSize(const QWebEngineQuotaRequest* self) { + qint64 _ret = self->requestedSize(); + return static_cast(_ret); +} + +bool QWebEngineQuotaRequest_OperatorEqual(const QWebEngineQuotaRequest* self, QWebEngineQuotaRequest* that) { + return (*self == *that); +} + +bool QWebEngineQuotaRequest_OperatorNotEqual(const QWebEngineQuotaRequest* self, QWebEngineQuotaRequest* that) { + return (*self != *that); +} + +void QWebEngineQuotaRequest_Delete(QWebEngineQuotaRequest* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webengine/gen_qwebenginequotarequest.go b/qt/webengine/gen_qwebenginequotarequest.go new file mode 100644 index 00000000..ce93646b --- /dev/null +++ b/qt/webengine/gen_qwebenginequotarequest.go @@ -0,0 +1,112 @@ +package webengine + +/* + +#include "gen_qwebenginequotarequest.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "unsafe" +) + +type QWebEngineQuotaRequest struct { + h *C.QWebEngineQuotaRequest + isSubclass bool +} + +func (this *QWebEngineQuotaRequest) cPointer() *C.QWebEngineQuotaRequest { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineQuotaRequest) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineQuotaRequest constructs the type using only CGO pointers. +func newQWebEngineQuotaRequest(h *C.QWebEngineQuotaRequest) *QWebEngineQuotaRequest { + if h == nil { + return nil + } + return &QWebEngineQuotaRequest{h: h} +} + +// UnsafeNewQWebEngineQuotaRequest constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineQuotaRequest(h unsafe.Pointer) *QWebEngineQuotaRequest { + if h == nil { + return nil + } + + return &QWebEngineQuotaRequest{h: (*C.QWebEngineQuotaRequest)(h)} +} + +// NewQWebEngineQuotaRequest constructs a new QWebEngineQuotaRequest object. +func NewQWebEngineQuotaRequest() *QWebEngineQuotaRequest { + var outptr_QWebEngineQuotaRequest *C.QWebEngineQuotaRequest = nil + + C.QWebEngineQuotaRequest_new(&outptr_QWebEngineQuotaRequest) + ret := newQWebEngineQuotaRequest(outptr_QWebEngineQuotaRequest) + ret.isSubclass = true + return ret +} + +// NewQWebEngineQuotaRequest2 constructs a new QWebEngineQuotaRequest object. +func NewQWebEngineQuotaRequest2(param1 *QWebEngineQuotaRequest) *QWebEngineQuotaRequest { + var outptr_QWebEngineQuotaRequest *C.QWebEngineQuotaRequest = nil + + C.QWebEngineQuotaRequest_new2(param1.cPointer(), &outptr_QWebEngineQuotaRequest) + ret := newQWebEngineQuotaRequest(outptr_QWebEngineQuotaRequest) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineQuotaRequest) Accept() { + C.QWebEngineQuotaRequest_Accept(this.h) +} + +func (this *QWebEngineQuotaRequest) Reject() { + C.QWebEngineQuotaRequest_Reject(this.h) +} + +func (this *QWebEngineQuotaRequest) Origin() *qt.QUrl { + _ret := C.QWebEngineQuotaRequest_Origin(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineQuotaRequest) RequestedSize() int64 { + return (int64)(C.QWebEngineQuotaRequest_RequestedSize(this.h)) +} + +func (this *QWebEngineQuotaRequest) OperatorEqual(that *QWebEngineQuotaRequest) bool { + return (bool)(C.QWebEngineQuotaRequest_OperatorEqual(this.h, that.cPointer())) +} + +func (this *QWebEngineQuotaRequest) OperatorNotEqual(that *QWebEngineQuotaRequest) bool { + return (bool)(C.QWebEngineQuotaRequest_OperatorNotEqual(this.h, that.cPointer())) +} + +// Delete this object from C++ memory. +func (this *QWebEngineQuotaRequest) Delete() { + C.QWebEngineQuotaRequest_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineQuotaRequest) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineQuotaRequest) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webengine/gen_qwebenginequotarequest.h b/qt/webengine/gen_qwebenginequotarequest.h new file mode 100644 index 00000000..d08eac56 --- /dev/null +++ b/qt/webengine/gen_qwebenginequotarequest.h @@ -0,0 +1,39 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEQUOTAREQUEST_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEQUOTAREQUEST_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QUrl; +class QWebEngineQuotaRequest; +#else +typedef struct QUrl QUrl; +typedef struct QWebEngineQuotaRequest QWebEngineQuotaRequest; +#endif + +void QWebEngineQuotaRequest_new(QWebEngineQuotaRequest** outptr_QWebEngineQuotaRequest); +void QWebEngineQuotaRequest_new2(QWebEngineQuotaRequest* param1, QWebEngineQuotaRequest** outptr_QWebEngineQuotaRequest); +void QWebEngineQuotaRequest_Accept(QWebEngineQuotaRequest* self); +void QWebEngineQuotaRequest_Reject(QWebEngineQuotaRequest* self); +QUrl* QWebEngineQuotaRequest_Origin(const QWebEngineQuotaRequest* self); +long long QWebEngineQuotaRequest_RequestedSize(const QWebEngineQuotaRequest* self); +bool QWebEngineQuotaRequest_OperatorEqual(const QWebEngineQuotaRequest* self, QWebEngineQuotaRequest* that); +bool QWebEngineQuotaRequest_OperatorNotEqual(const QWebEngineQuotaRequest* self, QWebEngineQuotaRequest* that); +void QWebEngineQuotaRequest_Delete(QWebEngineQuotaRequest* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.cpp b/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.cpp new file mode 100644 index 00000000..b4fe6cd3 --- /dev/null +++ b/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.cpp @@ -0,0 +1,58 @@ +#include +#include +#include +#include +#include +#include +#include "gen_qwebengineregisterprotocolhandlerrequest.h" +#include "_cgo_export.h" + +void QWebEngineRegisterProtocolHandlerRequest_new(QWebEngineRegisterProtocolHandlerRequest** outptr_QWebEngineRegisterProtocolHandlerRequest) { + QWebEngineRegisterProtocolHandlerRequest* ret = new QWebEngineRegisterProtocolHandlerRequest(); + *outptr_QWebEngineRegisterProtocolHandlerRequest = ret; +} + +void QWebEngineRegisterProtocolHandlerRequest_new2(QWebEngineRegisterProtocolHandlerRequest* param1, QWebEngineRegisterProtocolHandlerRequest** outptr_QWebEngineRegisterProtocolHandlerRequest) { + QWebEngineRegisterProtocolHandlerRequest* ret = new QWebEngineRegisterProtocolHandlerRequest(*param1); + *outptr_QWebEngineRegisterProtocolHandlerRequest = ret; +} + +void QWebEngineRegisterProtocolHandlerRequest_Accept(QWebEngineRegisterProtocolHandlerRequest* self) { + self->accept(); +} + +void QWebEngineRegisterProtocolHandlerRequest_Reject(QWebEngineRegisterProtocolHandlerRequest* self) { + self->reject(); +} + +QUrl* QWebEngineRegisterProtocolHandlerRequest_Origin(const QWebEngineRegisterProtocolHandlerRequest* self) { + return new QUrl(self->origin()); +} + +struct miqt_string QWebEngineRegisterProtocolHandlerRequest_Scheme(const QWebEngineRegisterProtocolHandlerRequest* self) { + QString _ret = self->scheme(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QWebEngineRegisterProtocolHandlerRequest_OperatorEqual(const QWebEngineRegisterProtocolHandlerRequest* self, QWebEngineRegisterProtocolHandlerRequest* that) { + return (*self == *that); +} + +bool QWebEngineRegisterProtocolHandlerRequest_OperatorNotEqual(const QWebEngineRegisterProtocolHandlerRequest* self, QWebEngineRegisterProtocolHandlerRequest* that) { + return (*self != *that); +} + +void QWebEngineRegisterProtocolHandlerRequest_Delete(QWebEngineRegisterProtocolHandlerRequest* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.go b/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.go new file mode 100644 index 00000000..7bd4c294 --- /dev/null +++ b/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.go @@ -0,0 +1,115 @@ +package webengine + +/* + +#include "gen_qwebengineregisterprotocolhandlerrequest.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "unsafe" +) + +type QWebEngineRegisterProtocolHandlerRequest struct { + h *C.QWebEngineRegisterProtocolHandlerRequest + isSubclass bool +} + +func (this *QWebEngineRegisterProtocolHandlerRequest) cPointer() *C.QWebEngineRegisterProtocolHandlerRequest { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineRegisterProtocolHandlerRequest) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineRegisterProtocolHandlerRequest constructs the type using only CGO pointers. +func newQWebEngineRegisterProtocolHandlerRequest(h *C.QWebEngineRegisterProtocolHandlerRequest) *QWebEngineRegisterProtocolHandlerRequest { + if h == nil { + return nil + } + return &QWebEngineRegisterProtocolHandlerRequest{h: h} +} + +// UnsafeNewQWebEngineRegisterProtocolHandlerRequest constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineRegisterProtocolHandlerRequest(h unsafe.Pointer) *QWebEngineRegisterProtocolHandlerRequest { + if h == nil { + return nil + } + + return &QWebEngineRegisterProtocolHandlerRequest{h: (*C.QWebEngineRegisterProtocolHandlerRequest)(h)} +} + +// NewQWebEngineRegisterProtocolHandlerRequest constructs a new QWebEngineRegisterProtocolHandlerRequest object. +func NewQWebEngineRegisterProtocolHandlerRequest() *QWebEngineRegisterProtocolHandlerRequest { + var outptr_QWebEngineRegisterProtocolHandlerRequest *C.QWebEngineRegisterProtocolHandlerRequest = nil + + C.QWebEngineRegisterProtocolHandlerRequest_new(&outptr_QWebEngineRegisterProtocolHandlerRequest) + ret := newQWebEngineRegisterProtocolHandlerRequest(outptr_QWebEngineRegisterProtocolHandlerRequest) + ret.isSubclass = true + return ret +} + +// NewQWebEngineRegisterProtocolHandlerRequest2 constructs a new QWebEngineRegisterProtocolHandlerRequest object. +func NewQWebEngineRegisterProtocolHandlerRequest2(param1 *QWebEngineRegisterProtocolHandlerRequest) *QWebEngineRegisterProtocolHandlerRequest { + var outptr_QWebEngineRegisterProtocolHandlerRequest *C.QWebEngineRegisterProtocolHandlerRequest = nil + + C.QWebEngineRegisterProtocolHandlerRequest_new2(param1.cPointer(), &outptr_QWebEngineRegisterProtocolHandlerRequest) + ret := newQWebEngineRegisterProtocolHandlerRequest(outptr_QWebEngineRegisterProtocolHandlerRequest) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineRegisterProtocolHandlerRequest) Accept() { + C.QWebEngineRegisterProtocolHandlerRequest_Accept(this.h) +} + +func (this *QWebEngineRegisterProtocolHandlerRequest) Reject() { + C.QWebEngineRegisterProtocolHandlerRequest_Reject(this.h) +} + +func (this *QWebEngineRegisterProtocolHandlerRequest) Origin() *qt.QUrl { + _ret := C.QWebEngineRegisterProtocolHandlerRequest_Origin(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineRegisterProtocolHandlerRequest) Scheme() string { + var _ms C.struct_miqt_string = C.QWebEngineRegisterProtocolHandlerRequest_Scheme(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineRegisterProtocolHandlerRequest) OperatorEqual(that *QWebEngineRegisterProtocolHandlerRequest) bool { + return (bool)(C.QWebEngineRegisterProtocolHandlerRequest_OperatorEqual(this.h, that.cPointer())) +} + +func (this *QWebEngineRegisterProtocolHandlerRequest) OperatorNotEqual(that *QWebEngineRegisterProtocolHandlerRequest) bool { + return (bool)(C.QWebEngineRegisterProtocolHandlerRequest_OperatorNotEqual(this.h, that.cPointer())) +} + +// Delete this object from C++ memory. +func (this *QWebEngineRegisterProtocolHandlerRequest) Delete() { + C.QWebEngineRegisterProtocolHandlerRequest_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineRegisterProtocolHandlerRequest) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineRegisterProtocolHandlerRequest) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.h b/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.h new file mode 100644 index 00000000..939cedbd --- /dev/null +++ b/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.h @@ -0,0 +1,39 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEREGISTERPROTOCOLHANDLERREQUEST_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEREGISTERPROTOCOLHANDLERREQUEST_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QUrl; +class QWebEngineRegisterProtocolHandlerRequest; +#else +typedef struct QUrl QUrl; +typedef struct QWebEngineRegisterProtocolHandlerRequest QWebEngineRegisterProtocolHandlerRequest; +#endif + +void QWebEngineRegisterProtocolHandlerRequest_new(QWebEngineRegisterProtocolHandlerRequest** outptr_QWebEngineRegisterProtocolHandlerRequest); +void QWebEngineRegisterProtocolHandlerRequest_new2(QWebEngineRegisterProtocolHandlerRequest* param1, QWebEngineRegisterProtocolHandlerRequest** outptr_QWebEngineRegisterProtocolHandlerRequest); +void QWebEngineRegisterProtocolHandlerRequest_Accept(QWebEngineRegisterProtocolHandlerRequest* self); +void QWebEngineRegisterProtocolHandlerRequest_Reject(QWebEngineRegisterProtocolHandlerRequest* self); +QUrl* QWebEngineRegisterProtocolHandlerRequest_Origin(const QWebEngineRegisterProtocolHandlerRequest* self); +struct miqt_string QWebEngineRegisterProtocolHandlerRequest_Scheme(const QWebEngineRegisterProtocolHandlerRequest* self); +bool QWebEngineRegisterProtocolHandlerRequest_OperatorEqual(const QWebEngineRegisterProtocolHandlerRequest* self, QWebEngineRegisterProtocolHandlerRequest* that); +bool QWebEngineRegisterProtocolHandlerRequest_OperatorNotEqual(const QWebEngineRegisterProtocolHandlerRequest* self, QWebEngineRegisterProtocolHandlerRequest* that); +void QWebEngineRegisterProtocolHandlerRequest_Delete(QWebEngineRegisterProtocolHandlerRequest* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebenginescript.cpp b/qt/webengine/gen_qwebenginescript.cpp new file mode 100644 index 00000000..1a1dd70f --- /dev/null +++ b/qt/webengine/gen_qwebenginescript.cpp @@ -0,0 +1,104 @@ +#include +#include +#include +#include +#include +#include "gen_qwebenginescript.h" +#include "_cgo_export.h" + +void QWebEngineScript_new(QWebEngineScript** outptr_QWebEngineScript) { + QWebEngineScript* ret = new QWebEngineScript(); + *outptr_QWebEngineScript = ret; +} + +void QWebEngineScript_new2(QWebEngineScript* other, QWebEngineScript** outptr_QWebEngineScript) { + QWebEngineScript* ret = new QWebEngineScript(*other); + *outptr_QWebEngineScript = ret; +} + +void QWebEngineScript_OperatorAssign(QWebEngineScript* self, QWebEngineScript* other) { + self->operator=(*other); +} + +bool QWebEngineScript_IsNull(const QWebEngineScript* self) { + return self->isNull(); +} + +struct miqt_string QWebEngineScript_Name(const QWebEngineScript* self) { + QString _ret = self->name(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineScript_SetName(QWebEngineScript* self, struct miqt_string name) { + QString name_QString = QString::fromUtf8(name.data, name.len); + self->setName(name_QString); +} + +struct miqt_string QWebEngineScript_SourceCode(const QWebEngineScript* self) { + QString _ret = self->sourceCode(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineScript_SetSourceCode(QWebEngineScript* self, struct miqt_string sourceCode) { + QString sourceCode_QString = QString::fromUtf8(sourceCode.data, sourceCode.len); + self->setSourceCode(sourceCode_QString); +} + +int QWebEngineScript_InjectionPoint(const QWebEngineScript* self) { + QWebEngineScript::InjectionPoint _ret = self->injectionPoint(); + return static_cast(_ret); +} + +void QWebEngineScript_SetInjectionPoint(QWebEngineScript* self, int injectionPoint) { + self->setInjectionPoint(static_cast(injectionPoint)); +} + +unsigned int QWebEngineScript_WorldId(const QWebEngineScript* self) { + quint32 _ret = self->worldId(); + return static_cast(_ret); +} + +void QWebEngineScript_SetWorldId(QWebEngineScript* self, unsigned int worldId) { + self->setWorldId(static_cast(worldId)); +} + +bool QWebEngineScript_RunsOnSubFrames(const QWebEngineScript* self) { + return self->runsOnSubFrames(); +} + +void QWebEngineScript_SetRunsOnSubFrames(QWebEngineScript* self, bool on) { + self->setRunsOnSubFrames(on); +} + +bool QWebEngineScript_OperatorEqual(const QWebEngineScript* self, QWebEngineScript* other) { + return (*self == *other); +} + +bool QWebEngineScript_OperatorNotEqual(const QWebEngineScript* self, QWebEngineScript* other) { + return (*self != *other); +} + +void QWebEngineScript_Swap(QWebEngineScript* self, QWebEngineScript* other) { + self->swap(*other); +} + +void QWebEngineScript_Delete(QWebEngineScript* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webengine/gen_qwebenginescript.go b/qt/webengine/gen_qwebenginescript.go new file mode 100644 index 00000000..e4d17f04 --- /dev/null +++ b/qt/webengine/gen_qwebenginescript.go @@ -0,0 +1,174 @@ +package webengine + +/* + +#include "gen_qwebenginescript.h" +#include + +*/ +import "C" + +import ( + "runtime" + "unsafe" +) + +type QWebEngineScript__InjectionPoint int + +const ( + QWebEngineScript__Deferred QWebEngineScript__InjectionPoint = 0 + QWebEngineScript__DocumentReady QWebEngineScript__InjectionPoint = 1 + QWebEngineScript__DocumentCreation QWebEngineScript__InjectionPoint = 2 +) + +type QWebEngineScript__ScriptWorldId int + +const ( + QWebEngineScript__MainWorld QWebEngineScript__ScriptWorldId = 0 + QWebEngineScript__ApplicationWorld QWebEngineScript__ScriptWorldId = 1 + QWebEngineScript__UserWorld QWebEngineScript__ScriptWorldId = 2 +) + +type QWebEngineScript struct { + h *C.QWebEngineScript + isSubclass bool +} + +func (this *QWebEngineScript) cPointer() *C.QWebEngineScript { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineScript) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineScript constructs the type using only CGO pointers. +func newQWebEngineScript(h *C.QWebEngineScript) *QWebEngineScript { + if h == nil { + return nil + } + return &QWebEngineScript{h: h} +} + +// UnsafeNewQWebEngineScript constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineScript(h unsafe.Pointer) *QWebEngineScript { + if h == nil { + return nil + } + + return &QWebEngineScript{h: (*C.QWebEngineScript)(h)} +} + +// NewQWebEngineScript constructs a new QWebEngineScript object. +func NewQWebEngineScript() *QWebEngineScript { + var outptr_QWebEngineScript *C.QWebEngineScript = nil + + C.QWebEngineScript_new(&outptr_QWebEngineScript) + ret := newQWebEngineScript(outptr_QWebEngineScript) + ret.isSubclass = true + return ret +} + +// NewQWebEngineScript2 constructs a new QWebEngineScript object. +func NewQWebEngineScript2(other *QWebEngineScript) *QWebEngineScript { + var outptr_QWebEngineScript *C.QWebEngineScript = nil + + C.QWebEngineScript_new2(other.cPointer(), &outptr_QWebEngineScript) + ret := newQWebEngineScript(outptr_QWebEngineScript) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineScript) OperatorAssign(other *QWebEngineScript) { + C.QWebEngineScript_OperatorAssign(this.h, other.cPointer()) +} + +func (this *QWebEngineScript) IsNull() bool { + return (bool)(C.QWebEngineScript_IsNull(this.h)) +} + +func (this *QWebEngineScript) Name() string { + var _ms C.struct_miqt_string = C.QWebEngineScript_Name(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineScript) SetName(name string) { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + C.QWebEngineScript_SetName(this.h, name_ms) +} + +func (this *QWebEngineScript) SourceCode() string { + var _ms C.struct_miqt_string = C.QWebEngineScript_SourceCode(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineScript) SetSourceCode(sourceCode string) { + sourceCode_ms := C.struct_miqt_string{} + sourceCode_ms.data = C.CString(sourceCode) + sourceCode_ms.len = C.size_t(len(sourceCode)) + defer C.free(unsafe.Pointer(sourceCode_ms.data)) + C.QWebEngineScript_SetSourceCode(this.h, sourceCode_ms) +} + +func (this *QWebEngineScript) InjectionPoint() QWebEngineScript__InjectionPoint { + return (QWebEngineScript__InjectionPoint)(C.QWebEngineScript_InjectionPoint(this.h)) +} + +func (this *QWebEngineScript) SetInjectionPoint(injectionPoint QWebEngineScript__InjectionPoint) { + C.QWebEngineScript_SetInjectionPoint(this.h, (C.int)(injectionPoint)) +} + +func (this *QWebEngineScript) WorldId() uint { + return (uint)(C.QWebEngineScript_WorldId(this.h)) +} + +func (this *QWebEngineScript) SetWorldId(worldId uint) { + C.QWebEngineScript_SetWorldId(this.h, (C.uint)(worldId)) +} + +func (this *QWebEngineScript) RunsOnSubFrames() bool { + return (bool)(C.QWebEngineScript_RunsOnSubFrames(this.h)) +} + +func (this *QWebEngineScript) SetRunsOnSubFrames(on bool) { + C.QWebEngineScript_SetRunsOnSubFrames(this.h, (C.bool)(on)) +} + +func (this *QWebEngineScript) OperatorEqual(other *QWebEngineScript) bool { + return (bool)(C.QWebEngineScript_OperatorEqual(this.h, other.cPointer())) +} + +func (this *QWebEngineScript) OperatorNotEqual(other *QWebEngineScript) bool { + return (bool)(C.QWebEngineScript_OperatorNotEqual(this.h, other.cPointer())) +} + +func (this *QWebEngineScript) Swap(other *QWebEngineScript) { + C.QWebEngineScript_Swap(this.h, other.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QWebEngineScript) Delete() { + C.QWebEngineScript_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineScript) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineScript) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webengine/gen_qwebenginescript.h b/qt/webengine/gen_qwebenginescript.h new file mode 100644 index 00000000..bc7392b8 --- /dev/null +++ b/qt/webengine/gen_qwebenginescript.h @@ -0,0 +1,46 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINESCRIPT_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINESCRIPT_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QWebEngineScript; +#else +typedef struct QWebEngineScript QWebEngineScript; +#endif + +void QWebEngineScript_new(QWebEngineScript** outptr_QWebEngineScript); +void QWebEngineScript_new2(QWebEngineScript* other, QWebEngineScript** outptr_QWebEngineScript); +void QWebEngineScript_OperatorAssign(QWebEngineScript* self, QWebEngineScript* other); +bool QWebEngineScript_IsNull(const QWebEngineScript* self); +struct miqt_string QWebEngineScript_Name(const QWebEngineScript* self); +void QWebEngineScript_SetName(QWebEngineScript* self, struct miqt_string name); +struct miqt_string QWebEngineScript_SourceCode(const QWebEngineScript* self); +void QWebEngineScript_SetSourceCode(QWebEngineScript* self, struct miqt_string sourceCode); +int QWebEngineScript_InjectionPoint(const QWebEngineScript* self); +void QWebEngineScript_SetInjectionPoint(QWebEngineScript* self, int injectionPoint); +unsigned int QWebEngineScript_WorldId(const QWebEngineScript* self); +void QWebEngineScript_SetWorldId(QWebEngineScript* self, unsigned int worldId); +bool QWebEngineScript_RunsOnSubFrames(const QWebEngineScript* self); +void QWebEngineScript_SetRunsOnSubFrames(QWebEngineScript* self, bool on); +bool QWebEngineScript_OperatorEqual(const QWebEngineScript* self, QWebEngineScript* other); +bool QWebEngineScript_OperatorNotEqual(const QWebEngineScript* self, QWebEngineScript* other); +void QWebEngineScript_Swap(QWebEngineScript* self, QWebEngineScript* other); +void QWebEngineScript_Delete(QWebEngineScript* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebenginescriptcollection.cpp b/qt/webengine/gen_qwebenginescriptcollection.cpp new file mode 100644 index 00000000..e6baffd5 --- /dev/null +++ b/qt/webengine/gen_qwebenginescriptcollection.cpp @@ -0,0 +1,88 @@ +#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; + } +} + diff --git a/qt/webengine/gen_qwebenginescriptcollection.go b/qt/webengine/gen_qwebenginescriptcollection.go new file mode 100644 index 00000000..4637b162 --- /dev/null +++ b/qt/webengine/gen_qwebenginescriptcollection.go @@ -0,0 +1,143 @@ +package webengine + +/* + +#include "gen_qwebenginescriptcollection.h" +#include + +*/ +import "C" + +import ( + "runtime" + "unsafe" +) + +type QWebEngineScriptCollection struct { + h *C.QWebEngineScriptCollection + isSubclass bool +} + +func (this *QWebEngineScriptCollection) cPointer() *C.QWebEngineScriptCollection { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineScriptCollection) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineScriptCollection constructs the type using only CGO pointers. +func newQWebEngineScriptCollection(h *C.QWebEngineScriptCollection) *QWebEngineScriptCollection { + if h == nil { + return nil + } + return &QWebEngineScriptCollection{h: h} +} + +// UnsafeNewQWebEngineScriptCollection constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineScriptCollection(h unsafe.Pointer) *QWebEngineScriptCollection { + if h == nil { + return nil + } + + return &QWebEngineScriptCollection{h: (*C.QWebEngineScriptCollection)(h)} +} + +func (this *QWebEngineScriptCollection) IsEmpty() bool { + return (bool)(C.QWebEngineScriptCollection_IsEmpty(this.h)) +} + +func (this *QWebEngineScriptCollection) Count() int { + return (int)(C.QWebEngineScriptCollection_Count(this.h)) +} + +func (this *QWebEngineScriptCollection) Size() int { + return (int)(C.QWebEngineScriptCollection_Size(this.h)) +} + +func (this *QWebEngineScriptCollection) Contains(value *QWebEngineScript) bool { + return (bool)(C.QWebEngineScriptCollection_Contains(this.h, value.cPointer())) +} + +func (this *QWebEngineScriptCollection) FindScript(name string) *QWebEngineScript { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + _ret := C.QWebEngineScriptCollection_FindScript(this.h, name_ms) + _goptr := newQWebEngineScript(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineScriptCollection) FindScripts(name string) []QWebEngineScript { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + var _ma C.struct_miqt_array = C.QWebEngineScriptCollection_FindScripts(this.h, name_ms) + _ret := make([]QWebEngineScript, int(_ma.len)) + _outCast := (*[0xffff]*C.QWebEngineScript)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQWebEngineScript(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret +} + +func (this *QWebEngineScriptCollection) Insert(param1 *QWebEngineScript) { + C.QWebEngineScriptCollection_Insert(this.h, param1.cPointer()) +} + +func (this *QWebEngineScriptCollection) InsertWithList(list []QWebEngineScript) { + list_CArray := (*[0xffff]*C.QWebEngineScript)(C.malloc(C.size_t(8 * len(list)))) + defer C.free(unsafe.Pointer(list_CArray)) + for i := range list { + list_CArray[i] = list[i].cPointer() + } + list_ma := C.struct_miqt_array{len: C.size_t(len(list)), data: unsafe.Pointer(list_CArray)} + C.QWebEngineScriptCollection_InsertWithList(this.h, list_ma) +} + +func (this *QWebEngineScriptCollection) Remove(param1 *QWebEngineScript) bool { + return (bool)(C.QWebEngineScriptCollection_Remove(this.h, param1.cPointer())) +} + +func (this *QWebEngineScriptCollection) Clear() { + C.QWebEngineScriptCollection_Clear(this.h) +} + +func (this *QWebEngineScriptCollection) ToList() []QWebEngineScript { + var _ma C.struct_miqt_array = C.QWebEngineScriptCollection_ToList(this.h) + _ret := make([]QWebEngineScript, int(_ma.len)) + _outCast := (*[0xffff]*C.QWebEngineScript)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQWebEngineScript(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebEngineScriptCollection) Delete() { + C.QWebEngineScriptCollection_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineScriptCollection) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineScriptCollection) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webengine/gen_qwebenginescriptcollection.h b/qt/webengine/gen_qwebenginescriptcollection.h new file mode 100644 index 00000000..767eb755 --- /dev/null +++ b/qt/webengine/gen_qwebenginescriptcollection.h @@ -0,0 +1,42 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINESCRIPTCOLLECTION_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINESCRIPTCOLLECTION_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QWebEngineScript; +class QWebEngineScriptCollection; +#else +typedef struct QWebEngineScript QWebEngineScript; +typedef struct QWebEngineScriptCollection QWebEngineScriptCollection; +#endif + +bool QWebEngineScriptCollection_IsEmpty(const QWebEngineScriptCollection* self); +int QWebEngineScriptCollection_Count(const QWebEngineScriptCollection* self); +int QWebEngineScriptCollection_Size(const QWebEngineScriptCollection* self); +bool QWebEngineScriptCollection_Contains(const QWebEngineScriptCollection* self, QWebEngineScript* value); +QWebEngineScript* QWebEngineScriptCollection_FindScript(const QWebEngineScriptCollection* self, struct miqt_string name); +struct miqt_array /* of QWebEngineScript* */ QWebEngineScriptCollection_FindScripts(const QWebEngineScriptCollection* self, struct miqt_string name); +void QWebEngineScriptCollection_Insert(QWebEngineScriptCollection* self, QWebEngineScript* param1); +void QWebEngineScriptCollection_InsertWithList(QWebEngineScriptCollection* self, struct miqt_array /* of QWebEngineScript* */ list); +bool QWebEngineScriptCollection_Remove(QWebEngineScriptCollection* self, QWebEngineScript* param1); +void QWebEngineScriptCollection_Clear(QWebEngineScriptCollection* self); +struct miqt_array /* of QWebEngineScript* */ QWebEngineScriptCollection_ToList(const QWebEngineScriptCollection* self); +void QWebEngineScriptCollection_Delete(QWebEngineScriptCollection* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebenginesettings.cpp b/qt/webengine/gen_qwebenginesettings.cpp new file mode 100644 index 00000000..5ce84c8a --- /dev/null +++ b/qt/webengine/gen_qwebenginesettings.cpp @@ -0,0 +1,89 @@ +#include +#include +#include +#include +#include +#include "gen_qwebenginesettings.h" +#include "_cgo_export.h" + +QWebEngineSettings* QWebEngineSettings_GlobalSettings() { + return QWebEngineSettings::globalSettings(); +} + +QWebEngineSettings* QWebEngineSettings_DefaultSettings() { + return QWebEngineSettings::defaultSettings(); +} + +void QWebEngineSettings_SetFontFamily(QWebEngineSettings* self, int which, struct miqt_string family) { + QString family_QString = QString::fromUtf8(family.data, family.len); + self->setFontFamily(static_cast(which), family_QString); +} + +struct miqt_string QWebEngineSettings_FontFamily(const QWebEngineSettings* self, int which) { + QString _ret = self->fontFamily(static_cast(which)); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineSettings_ResetFontFamily(QWebEngineSettings* self, int which) { + self->resetFontFamily(static_cast(which)); +} + +void QWebEngineSettings_SetFontSize(QWebEngineSettings* self, int typeVal, int size) { + self->setFontSize(static_cast(typeVal), static_cast(size)); +} + +int QWebEngineSettings_FontSize(const QWebEngineSettings* self, int typeVal) { + return self->fontSize(static_cast(typeVal)); +} + +void QWebEngineSettings_ResetFontSize(QWebEngineSettings* self, int typeVal) { + self->resetFontSize(static_cast(typeVal)); +} + +void QWebEngineSettings_SetAttribute(QWebEngineSettings* self, int attr, bool on) { + self->setAttribute(static_cast(attr), on); +} + +bool QWebEngineSettings_TestAttribute(const QWebEngineSettings* self, int attr) { + return self->testAttribute(static_cast(attr)); +} + +void QWebEngineSettings_ResetAttribute(QWebEngineSettings* self, int attr) { + self->resetAttribute(static_cast(attr)); +} + +void QWebEngineSettings_SetDefaultTextEncoding(QWebEngineSettings* self, struct miqt_string encoding) { + QString encoding_QString = QString::fromUtf8(encoding.data, encoding.len); + self->setDefaultTextEncoding(encoding_QString); +} + +struct miqt_string QWebEngineSettings_DefaultTextEncoding(const QWebEngineSettings* self) { + QString _ret = self->defaultTextEncoding(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QWebEngineSettings_UnknownUrlSchemePolicy(const QWebEngineSettings* self) { + QWebEngineSettings::UnknownUrlSchemePolicy _ret = self->unknownUrlSchemePolicy(); + return static_cast(_ret); +} + +void QWebEngineSettings_SetUnknownUrlSchemePolicy(QWebEngineSettings* self, int policy) { + self->setUnknownUrlSchemePolicy(static_cast(policy)); +} + +void QWebEngineSettings_ResetUnknownUrlSchemePolicy(QWebEngineSettings* self) { + self->resetUnknownUrlSchemePolicy(); +} + diff --git a/qt/webengine/gen_qwebenginesettings.go b/qt/webengine/gen_qwebenginesettings.go new file mode 100644 index 00000000..c97e5ddf --- /dev/null +++ b/qt/webengine/gen_qwebenginesettings.go @@ -0,0 +1,192 @@ +package webengine + +/* + +#include "gen_qwebenginesettings.h" +#include + +*/ +import "C" + +import ( + "unsafe" +) + +type QWebEngineSettings__FontFamily int + +const ( + QWebEngineSettings__StandardFont QWebEngineSettings__FontFamily = 0 + QWebEngineSettings__FixedFont QWebEngineSettings__FontFamily = 1 + QWebEngineSettings__SerifFont QWebEngineSettings__FontFamily = 2 + QWebEngineSettings__SansSerifFont QWebEngineSettings__FontFamily = 3 + QWebEngineSettings__CursiveFont QWebEngineSettings__FontFamily = 4 + QWebEngineSettings__FantasyFont QWebEngineSettings__FontFamily = 5 + QWebEngineSettings__PictographFont QWebEngineSettings__FontFamily = 6 +) + +type QWebEngineSettings__WebAttribute int + +const ( + QWebEngineSettings__AutoLoadImages QWebEngineSettings__WebAttribute = 0 + QWebEngineSettings__JavascriptEnabled QWebEngineSettings__WebAttribute = 1 + QWebEngineSettings__JavascriptCanOpenWindows QWebEngineSettings__WebAttribute = 2 + QWebEngineSettings__JavascriptCanAccessClipboard QWebEngineSettings__WebAttribute = 3 + QWebEngineSettings__LinksIncludedInFocusChain QWebEngineSettings__WebAttribute = 4 + QWebEngineSettings__LocalStorageEnabled QWebEngineSettings__WebAttribute = 5 + QWebEngineSettings__LocalContentCanAccessRemoteUrls QWebEngineSettings__WebAttribute = 6 + QWebEngineSettings__XSSAuditingEnabled QWebEngineSettings__WebAttribute = 7 + QWebEngineSettings__SpatialNavigationEnabled QWebEngineSettings__WebAttribute = 8 + QWebEngineSettings__LocalContentCanAccessFileUrls QWebEngineSettings__WebAttribute = 9 + QWebEngineSettings__HyperlinkAuditingEnabled QWebEngineSettings__WebAttribute = 10 + QWebEngineSettings__ScrollAnimatorEnabled QWebEngineSettings__WebAttribute = 11 + QWebEngineSettings__ErrorPageEnabled QWebEngineSettings__WebAttribute = 12 + QWebEngineSettings__PluginsEnabled QWebEngineSettings__WebAttribute = 13 + QWebEngineSettings__FullScreenSupportEnabled QWebEngineSettings__WebAttribute = 14 + QWebEngineSettings__ScreenCaptureEnabled QWebEngineSettings__WebAttribute = 15 + QWebEngineSettings__WebGLEnabled QWebEngineSettings__WebAttribute = 16 + QWebEngineSettings__Accelerated2dCanvasEnabled QWebEngineSettings__WebAttribute = 17 + QWebEngineSettings__AutoLoadIconsForPage QWebEngineSettings__WebAttribute = 18 + QWebEngineSettings__TouchIconsEnabled QWebEngineSettings__WebAttribute = 19 + QWebEngineSettings__FocusOnNavigationEnabled QWebEngineSettings__WebAttribute = 20 + QWebEngineSettings__PrintElementBackgrounds QWebEngineSettings__WebAttribute = 21 + QWebEngineSettings__AllowRunningInsecureContent QWebEngineSettings__WebAttribute = 22 + QWebEngineSettings__AllowGeolocationOnInsecureOrigins QWebEngineSettings__WebAttribute = 23 + QWebEngineSettings__AllowWindowActivationFromJavaScript QWebEngineSettings__WebAttribute = 24 + QWebEngineSettings__ShowScrollBars QWebEngineSettings__WebAttribute = 25 + QWebEngineSettings__PlaybackRequiresUserGesture QWebEngineSettings__WebAttribute = 26 + QWebEngineSettings__WebRTCPublicInterfacesOnly QWebEngineSettings__WebAttribute = 27 + QWebEngineSettings__JavascriptCanPaste QWebEngineSettings__WebAttribute = 28 + QWebEngineSettings__DnsPrefetchEnabled QWebEngineSettings__WebAttribute = 29 + QWebEngineSettings__PdfViewerEnabled QWebEngineSettings__WebAttribute = 30 +) + +type QWebEngineSettings__FontSize int + +const ( + QWebEngineSettings__MinimumFontSize QWebEngineSettings__FontSize = 0 + QWebEngineSettings__MinimumLogicalFontSize QWebEngineSettings__FontSize = 1 + QWebEngineSettings__DefaultFontSize QWebEngineSettings__FontSize = 2 + QWebEngineSettings__DefaultFixedFontSize QWebEngineSettings__FontSize = 3 +) + +type QWebEngineSettings__UnknownUrlSchemePolicy int + +const ( + QWebEngineSettings__DisallowUnknownUrlSchemes QWebEngineSettings__UnknownUrlSchemePolicy = 1 + QWebEngineSettings__AllowUnknownUrlSchemesFromUserInteraction QWebEngineSettings__UnknownUrlSchemePolicy = 2 + QWebEngineSettings__AllowAllUnknownUrlSchemes QWebEngineSettings__UnknownUrlSchemePolicy = 3 +) + +type QWebEngineSettings struct { + h *C.QWebEngineSettings + isSubclass bool +} + +func (this *QWebEngineSettings) cPointer() *C.QWebEngineSettings { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineSettings) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineSettings constructs the type using only CGO pointers. +func newQWebEngineSettings(h *C.QWebEngineSettings) *QWebEngineSettings { + if h == nil { + return nil + } + return &QWebEngineSettings{h: h} +} + +// UnsafeNewQWebEngineSettings constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineSettings(h unsafe.Pointer) *QWebEngineSettings { + if h == nil { + return nil + } + + return &QWebEngineSettings{h: (*C.QWebEngineSettings)(h)} +} + +func QWebEngineSettings_GlobalSettings() *QWebEngineSettings { + return UnsafeNewQWebEngineSettings(unsafe.Pointer(C.QWebEngineSettings_GlobalSettings())) +} + +func QWebEngineSettings_DefaultSettings() *QWebEngineSettings { + return UnsafeNewQWebEngineSettings(unsafe.Pointer(C.QWebEngineSettings_DefaultSettings())) +} + +func (this *QWebEngineSettings) SetFontFamily(which QWebEngineSettings__FontFamily, family string) { + family_ms := C.struct_miqt_string{} + family_ms.data = C.CString(family) + family_ms.len = C.size_t(len(family)) + defer C.free(unsafe.Pointer(family_ms.data)) + C.QWebEngineSettings_SetFontFamily(this.h, (C.int)(which), family_ms) +} + +func (this *QWebEngineSettings) FontFamily(which QWebEngineSettings__FontFamily) string { + var _ms C.struct_miqt_string = C.QWebEngineSettings_FontFamily(this.h, (C.int)(which)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineSettings) ResetFontFamily(which QWebEngineSettings__FontFamily) { + C.QWebEngineSettings_ResetFontFamily(this.h, (C.int)(which)) +} + +func (this *QWebEngineSettings) SetFontSize(typeVal QWebEngineSettings__FontSize, size int) { + C.QWebEngineSettings_SetFontSize(this.h, (C.int)(typeVal), (C.int)(size)) +} + +func (this *QWebEngineSettings) FontSize(typeVal QWebEngineSettings__FontSize) int { + return (int)(C.QWebEngineSettings_FontSize(this.h, (C.int)(typeVal))) +} + +func (this *QWebEngineSettings) ResetFontSize(typeVal QWebEngineSettings__FontSize) { + C.QWebEngineSettings_ResetFontSize(this.h, (C.int)(typeVal)) +} + +func (this *QWebEngineSettings) SetAttribute(attr QWebEngineSettings__WebAttribute, on bool) { + C.QWebEngineSettings_SetAttribute(this.h, (C.int)(attr), (C.bool)(on)) +} + +func (this *QWebEngineSettings) TestAttribute(attr QWebEngineSettings__WebAttribute) bool { + return (bool)(C.QWebEngineSettings_TestAttribute(this.h, (C.int)(attr))) +} + +func (this *QWebEngineSettings) ResetAttribute(attr QWebEngineSettings__WebAttribute) { + C.QWebEngineSettings_ResetAttribute(this.h, (C.int)(attr)) +} + +func (this *QWebEngineSettings) SetDefaultTextEncoding(encoding string) { + encoding_ms := C.struct_miqt_string{} + encoding_ms.data = C.CString(encoding) + encoding_ms.len = C.size_t(len(encoding)) + defer C.free(unsafe.Pointer(encoding_ms.data)) + C.QWebEngineSettings_SetDefaultTextEncoding(this.h, encoding_ms) +} + +func (this *QWebEngineSettings) DefaultTextEncoding() string { + var _ms C.struct_miqt_string = C.QWebEngineSettings_DefaultTextEncoding(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineSettings) UnknownUrlSchemePolicy() QWebEngineSettings__UnknownUrlSchemePolicy { + return (QWebEngineSettings__UnknownUrlSchemePolicy)(C.QWebEngineSettings_UnknownUrlSchemePolicy(this.h)) +} + +func (this *QWebEngineSettings) SetUnknownUrlSchemePolicy(policy QWebEngineSettings__UnknownUrlSchemePolicy) { + C.QWebEngineSettings_SetUnknownUrlSchemePolicy(this.h, (C.int)(policy)) +} + +func (this *QWebEngineSettings) ResetUnknownUrlSchemePolicy() { + C.QWebEngineSettings_ResetUnknownUrlSchemePolicy(this.h) +} diff --git a/qt/webengine/gen_qwebenginesettings.h b/qt/webengine/gen_qwebenginesettings.h new file mode 100644 index 00000000..bc4e96a8 --- /dev/null +++ b/qt/webengine/gen_qwebenginesettings.h @@ -0,0 +1,44 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINESETTINGS_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINESETTINGS_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QWebEngineSettings; +#else +typedef struct QWebEngineSettings QWebEngineSettings; +#endif + +QWebEngineSettings* QWebEngineSettings_GlobalSettings(); +QWebEngineSettings* QWebEngineSettings_DefaultSettings(); +void QWebEngineSettings_SetFontFamily(QWebEngineSettings* self, int which, struct miqt_string family); +struct miqt_string QWebEngineSettings_FontFamily(const QWebEngineSettings* self, int which); +void QWebEngineSettings_ResetFontFamily(QWebEngineSettings* self, int which); +void QWebEngineSettings_SetFontSize(QWebEngineSettings* self, int typeVal, int size); +int QWebEngineSettings_FontSize(const QWebEngineSettings* self, int typeVal); +void QWebEngineSettings_ResetFontSize(QWebEngineSettings* self, int typeVal); +void QWebEngineSettings_SetAttribute(QWebEngineSettings* self, int attr, bool on); +bool QWebEngineSettings_TestAttribute(const QWebEngineSettings* self, int attr); +void QWebEngineSettings_ResetAttribute(QWebEngineSettings* self, int attr); +void QWebEngineSettings_SetDefaultTextEncoding(QWebEngineSettings* self, struct miqt_string encoding); +struct miqt_string QWebEngineSettings_DefaultTextEncoding(const QWebEngineSettings* self); +int QWebEngineSettings_UnknownUrlSchemePolicy(const QWebEngineSettings* self); +void QWebEngineSettings_SetUnknownUrlSchemePolicy(QWebEngineSettings* self, int policy); +void QWebEngineSettings_ResetUnknownUrlSchemePolicy(QWebEngineSettings* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebengineurlrequestinfo.cpp b/qt/webengine/gen_qwebengineurlrequestinfo.cpp new file mode 100644 index 00000000..215fabe6 --- /dev/null +++ b/qt/webengine/gen_qwebengineurlrequestinfo.cpp @@ -0,0 +1,56 @@ +#include +#include +#include +#include +#include "gen_qwebengineurlrequestinfo.h" +#include "_cgo_export.h" + +int QWebEngineUrlRequestInfo_ResourceType(const QWebEngineUrlRequestInfo* self) { + QWebEngineUrlRequestInfo::ResourceType _ret = self->resourceType(); + return static_cast(_ret); +} + +int QWebEngineUrlRequestInfo_NavigationType(const QWebEngineUrlRequestInfo* self) { + QWebEngineUrlRequestInfo::NavigationType _ret = self->navigationType(); + return static_cast(_ret); +} + +QUrl* QWebEngineUrlRequestInfo_RequestUrl(const QWebEngineUrlRequestInfo* self) { + return new QUrl(self->requestUrl()); +} + +QUrl* QWebEngineUrlRequestInfo_FirstPartyUrl(const QWebEngineUrlRequestInfo* self) { + return new QUrl(self->firstPartyUrl()); +} + +QUrl* QWebEngineUrlRequestInfo_Initiator(const QWebEngineUrlRequestInfo* self) { + return new QUrl(self->initiator()); +} + +struct miqt_string QWebEngineUrlRequestInfo_RequestMethod(const QWebEngineUrlRequestInfo* self) { + QByteArray _qb = self->requestMethod(); + struct miqt_string _ms; + _ms.len = _qb.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _qb.data(), _ms.len); + return _ms; +} + +bool QWebEngineUrlRequestInfo_Changed(const QWebEngineUrlRequestInfo* self) { + return self->changed(); +} + +void QWebEngineUrlRequestInfo_Block(QWebEngineUrlRequestInfo* self, bool shouldBlock) { + self->block(shouldBlock); +} + +void QWebEngineUrlRequestInfo_Redirect(QWebEngineUrlRequestInfo* self, QUrl* url) { + self->redirect(*url); +} + +void QWebEngineUrlRequestInfo_SetHttpHeader(QWebEngineUrlRequestInfo* self, struct miqt_string name, struct miqt_string value) { + QByteArray name_QByteArray(name.data, name.len); + QByteArray value_QByteArray(value.data, value.len); + self->setHttpHeader(name_QByteArray, value_QByteArray); +} + diff --git a/qt/webengine/gen_qwebengineurlrequestinfo.go b/qt/webengine/gen_qwebengineurlrequestinfo.go new file mode 100644 index 00000000..7bb62dd8 --- /dev/null +++ b/qt/webengine/gen_qwebengineurlrequestinfo.go @@ -0,0 +1,147 @@ +package webengine + +/* + +#include "gen_qwebengineurlrequestinfo.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "unsafe" +) + +type QWebEngineUrlRequestInfo__ResourceType int + +const ( + QWebEngineUrlRequestInfo__ResourceTypeMainFrame QWebEngineUrlRequestInfo__ResourceType = 0 + QWebEngineUrlRequestInfo__ResourceTypeSubFrame QWebEngineUrlRequestInfo__ResourceType = 1 + QWebEngineUrlRequestInfo__ResourceTypeStylesheet QWebEngineUrlRequestInfo__ResourceType = 2 + QWebEngineUrlRequestInfo__ResourceTypeScript QWebEngineUrlRequestInfo__ResourceType = 3 + QWebEngineUrlRequestInfo__ResourceTypeImage QWebEngineUrlRequestInfo__ResourceType = 4 + QWebEngineUrlRequestInfo__ResourceTypeFontResource QWebEngineUrlRequestInfo__ResourceType = 5 + QWebEngineUrlRequestInfo__ResourceTypeSubResource QWebEngineUrlRequestInfo__ResourceType = 6 + QWebEngineUrlRequestInfo__ResourceTypeObject QWebEngineUrlRequestInfo__ResourceType = 7 + QWebEngineUrlRequestInfo__ResourceTypeMedia QWebEngineUrlRequestInfo__ResourceType = 8 + QWebEngineUrlRequestInfo__ResourceTypeWorker QWebEngineUrlRequestInfo__ResourceType = 9 + QWebEngineUrlRequestInfo__ResourceTypeSharedWorker QWebEngineUrlRequestInfo__ResourceType = 10 + QWebEngineUrlRequestInfo__ResourceTypePrefetch QWebEngineUrlRequestInfo__ResourceType = 11 + QWebEngineUrlRequestInfo__ResourceTypeFavicon QWebEngineUrlRequestInfo__ResourceType = 12 + QWebEngineUrlRequestInfo__ResourceTypeXhr QWebEngineUrlRequestInfo__ResourceType = 13 + QWebEngineUrlRequestInfo__ResourceTypePing QWebEngineUrlRequestInfo__ResourceType = 14 + QWebEngineUrlRequestInfo__ResourceTypeServiceWorker QWebEngineUrlRequestInfo__ResourceType = 15 + QWebEngineUrlRequestInfo__ResourceTypeCspReport QWebEngineUrlRequestInfo__ResourceType = 16 + QWebEngineUrlRequestInfo__ResourceTypePluginResource QWebEngineUrlRequestInfo__ResourceType = 17 + QWebEngineUrlRequestInfo__ResourceTypeNavigationPreloadMainFrame QWebEngineUrlRequestInfo__ResourceType = 19 + QWebEngineUrlRequestInfo__ResourceTypeNavigationPreloadSubFrame QWebEngineUrlRequestInfo__ResourceType = 20 + QWebEngineUrlRequestInfo__ResourceTypeLast QWebEngineUrlRequestInfo__ResourceType = 20 + QWebEngineUrlRequestInfo__ResourceTypeUnknown QWebEngineUrlRequestInfo__ResourceType = 255 +) + +type QWebEngineUrlRequestInfo__NavigationType int + +const ( + QWebEngineUrlRequestInfo__NavigationTypeLink QWebEngineUrlRequestInfo__NavigationType = 0 + QWebEngineUrlRequestInfo__NavigationTypeTyped QWebEngineUrlRequestInfo__NavigationType = 1 + QWebEngineUrlRequestInfo__NavigationTypeFormSubmitted QWebEngineUrlRequestInfo__NavigationType = 2 + QWebEngineUrlRequestInfo__NavigationTypeBackForward QWebEngineUrlRequestInfo__NavigationType = 3 + QWebEngineUrlRequestInfo__NavigationTypeReload QWebEngineUrlRequestInfo__NavigationType = 4 + QWebEngineUrlRequestInfo__NavigationTypeOther QWebEngineUrlRequestInfo__NavigationType = 5 + QWebEngineUrlRequestInfo__NavigationTypeRedirect QWebEngineUrlRequestInfo__NavigationType = 6 +) + +type QWebEngineUrlRequestInfo struct { + h *C.QWebEngineUrlRequestInfo + isSubclass bool +} + +func (this *QWebEngineUrlRequestInfo) cPointer() *C.QWebEngineUrlRequestInfo { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineUrlRequestInfo) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineUrlRequestInfo constructs the type using only CGO pointers. +func newQWebEngineUrlRequestInfo(h *C.QWebEngineUrlRequestInfo) *QWebEngineUrlRequestInfo { + if h == nil { + return nil + } + return &QWebEngineUrlRequestInfo{h: h} +} + +// UnsafeNewQWebEngineUrlRequestInfo constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineUrlRequestInfo(h unsafe.Pointer) *QWebEngineUrlRequestInfo { + if h == nil { + return nil + } + + return &QWebEngineUrlRequestInfo{h: (*C.QWebEngineUrlRequestInfo)(h)} +} + +func (this *QWebEngineUrlRequestInfo) ResourceType() QWebEngineUrlRequestInfo__ResourceType { + return (QWebEngineUrlRequestInfo__ResourceType)(C.QWebEngineUrlRequestInfo_ResourceType(this.h)) +} + +func (this *QWebEngineUrlRequestInfo) NavigationType() QWebEngineUrlRequestInfo__NavigationType { + return (QWebEngineUrlRequestInfo__NavigationType)(C.QWebEngineUrlRequestInfo_NavigationType(this.h)) +} + +func (this *QWebEngineUrlRequestInfo) RequestUrl() *qt.QUrl { + _ret := C.QWebEngineUrlRequestInfo_RequestUrl(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineUrlRequestInfo) FirstPartyUrl() *qt.QUrl { + _ret := C.QWebEngineUrlRequestInfo_FirstPartyUrl(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineUrlRequestInfo) Initiator() *qt.QUrl { + _ret := C.QWebEngineUrlRequestInfo_Initiator(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineUrlRequestInfo) RequestMethod() []byte { + var _bytearray C.struct_miqt_string = C.QWebEngineUrlRequestInfo_RequestMethod(this.h) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *QWebEngineUrlRequestInfo) Changed() bool { + return (bool)(C.QWebEngineUrlRequestInfo_Changed(this.h)) +} + +func (this *QWebEngineUrlRequestInfo) Block(shouldBlock bool) { + C.QWebEngineUrlRequestInfo_Block(this.h, (C.bool)(shouldBlock)) +} + +func (this *QWebEngineUrlRequestInfo) Redirect(url *qt.QUrl) { + C.QWebEngineUrlRequestInfo_Redirect(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QWebEngineUrlRequestInfo) SetHttpHeader(name []byte, value []byte) { + name_alias := C.struct_miqt_string{} + name_alias.data = (*C.char)(unsafe.Pointer(&name[0])) + name_alias.len = C.size_t(len(name)) + value_alias := C.struct_miqt_string{} + value_alias.data = (*C.char)(unsafe.Pointer(&value[0])) + value_alias.len = C.size_t(len(value)) + C.QWebEngineUrlRequestInfo_SetHttpHeader(this.h, name_alias, value_alias) +} diff --git a/qt/webengine/gen_qwebengineurlrequestinfo.h b/qt/webengine/gen_qwebengineurlrequestinfo.h new file mode 100644 index 00000000..a0b16244 --- /dev/null +++ b/qt/webengine/gen_qwebengineurlrequestinfo.h @@ -0,0 +1,40 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEURLREQUESTINFO_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEURLREQUESTINFO_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QUrl; +class QWebEngineUrlRequestInfo; +#else +typedef struct QUrl QUrl; +typedef struct QWebEngineUrlRequestInfo QWebEngineUrlRequestInfo; +#endif + +int QWebEngineUrlRequestInfo_ResourceType(const QWebEngineUrlRequestInfo* self); +int QWebEngineUrlRequestInfo_NavigationType(const QWebEngineUrlRequestInfo* self); +QUrl* QWebEngineUrlRequestInfo_RequestUrl(const QWebEngineUrlRequestInfo* self); +QUrl* QWebEngineUrlRequestInfo_FirstPartyUrl(const QWebEngineUrlRequestInfo* self); +QUrl* QWebEngineUrlRequestInfo_Initiator(const QWebEngineUrlRequestInfo* self); +struct miqt_string QWebEngineUrlRequestInfo_RequestMethod(const QWebEngineUrlRequestInfo* self); +bool QWebEngineUrlRequestInfo_Changed(const QWebEngineUrlRequestInfo* self); +void QWebEngineUrlRequestInfo_Block(QWebEngineUrlRequestInfo* self, bool shouldBlock); +void QWebEngineUrlRequestInfo_Redirect(QWebEngineUrlRequestInfo* self, QUrl* url); +void QWebEngineUrlRequestInfo_SetHttpHeader(QWebEngineUrlRequestInfo* self, struct miqt_string name, struct miqt_string value); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebengineurlrequestinterceptor.cpp b/qt/webengine/gen_qwebengineurlrequestinterceptor.cpp new file mode 100644 index 00000000..4bc03d73 --- /dev/null +++ b/qt/webengine/gen_qwebengineurlrequestinterceptor.cpp @@ -0,0 +1,372 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebengineurlrequestinterceptor.h" +#include "_cgo_export.h" + +class MiqtVirtualQWebEngineUrlRequestInterceptor : public virtual QWebEngineUrlRequestInterceptor { +public: + + MiqtVirtualQWebEngineUrlRequestInterceptor(): QWebEngineUrlRequestInterceptor() {}; + MiqtVirtualQWebEngineUrlRequestInterceptor(QObject* p): QWebEngineUrlRequestInterceptor(p) {}; + + virtual ~MiqtVirtualQWebEngineUrlRequestInterceptor() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__InterceptRequest = 0; + + // Subclass to allow providing a Go implementation + virtual void interceptRequest(QWebEngineUrlRequestInfo& info) override { + if (handle__InterceptRequest == 0) { + return; // Pure virtual, there is no base we can call + } + + QWebEngineUrlRequestInfo& info_ret = info; + // Cast returned reference into pointer + QWebEngineUrlRequestInfo* sigval1 = &info_ret; + + miqt_exec_callback_QWebEngineUrlRequestInterceptor_InterceptRequest(this, handle__InterceptRequest, sigval1); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QWebEngineUrlRequestInterceptor::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QWebEngineUrlRequestInterceptor_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QWebEngineUrlRequestInterceptor::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QWebEngineUrlRequestInterceptor::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QWebEngineUrlRequestInterceptor_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QWebEngineUrlRequestInterceptor::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QWebEngineUrlRequestInterceptor::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineUrlRequestInterceptor_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QWebEngineUrlRequestInterceptor::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QWebEngineUrlRequestInterceptor::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineUrlRequestInterceptor_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QWebEngineUrlRequestInterceptor::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QWebEngineUrlRequestInterceptor::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineUrlRequestInterceptor_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QWebEngineUrlRequestInterceptor::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QWebEngineUrlRequestInterceptor::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebEngineUrlRequestInterceptor_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QWebEngineUrlRequestInterceptor::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QWebEngineUrlRequestInterceptor::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebEngineUrlRequestInterceptor_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QWebEngineUrlRequestInterceptor::disconnectNotify(*signal); + + } + +}; + +void QWebEngineUrlRequestInterceptor_new(QWebEngineUrlRequestInterceptor** outptr_QWebEngineUrlRequestInterceptor, QObject** outptr_QObject) { + MiqtVirtualQWebEngineUrlRequestInterceptor* ret = new MiqtVirtualQWebEngineUrlRequestInterceptor(); + *outptr_QWebEngineUrlRequestInterceptor = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebEngineUrlRequestInterceptor_new2(QObject* p, QWebEngineUrlRequestInterceptor** outptr_QWebEngineUrlRequestInterceptor, QObject** outptr_QObject) { + MiqtVirtualQWebEngineUrlRequestInterceptor* ret = new MiqtVirtualQWebEngineUrlRequestInterceptor(p); + *outptr_QWebEngineUrlRequestInterceptor = ret; + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QWebEngineUrlRequestInterceptor_MetaObject(const QWebEngineUrlRequestInterceptor* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineUrlRequestInterceptor_Metacast(QWebEngineUrlRequestInterceptor* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineUrlRequestInterceptor_Tr(const char* s) { + QString _ret = QWebEngineUrlRequestInterceptor::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineUrlRequestInterceptor_TrUtf8(const char* s) { + QString _ret = QWebEngineUrlRequestInterceptor::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineUrlRequestInterceptor_InterceptRequest(QWebEngineUrlRequestInterceptor* self, QWebEngineUrlRequestInfo* info) { + self->interceptRequest(*info); +} + +struct miqt_string QWebEngineUrlRequestInterceptor_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineUrlRequestInterceptor::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineUrlRequestInterceptor_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineUrlRequestInterceptor::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineUrlRequestInterceptor_TrUtf82(const char* s, const char* c) { + QString _ret = QWebEngineUrlRequestInterceptor::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineUrlRequestInterceptor_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebEngineUrlRequestInterceptor::trUtf8(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineUrlRequestInterceptor_override_virtual_InterceptRequest(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlRequestInterceptor*)(self) )->handle__InterceptRequest = slot; +} + +void QWebEngineUrlRequestInterceptor_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlRequestInterceptor*)(self) )->handle__Event = slot; +} + +bool QWebEngineUrlRequestInterceptor_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQWebEngineUrlRequestInterceptor*)(self) )->virtualbase_Event(event); +} + +void QWebEngineUrlRequestInterceptor_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlRequestInterceptor*)(self) )->handle__EventFilter = slot; +} + +bool QWebEngineUrlRequestInterceptor_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQWebEngineUrlRequestInterceptor*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QWebEngineUrlRequestInterceptor_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlRequestInterceptor*)(self) )->handle__TimerEvent = slot; +} + +void QWebEngineUrlRequestInterceptor_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQWebEngineUrlRequestInterceptor*)(self) )->virtualbase_TimerEvent(event); +} + +void QWebEngineUrlRequestInterceptor_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlRequestInterceptor*)(self) )->handle__ChildEvent = slot; +} + +void QWebEngineUrlRequestInterceptor_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQWebEngineUrlRequestInterceptor*)(self) )->virtualbase_ChildEvent(event); +} + +void QWebEngineUrlRequestInterceptor_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlRequestInterceptor*)(self) )->handle__CustomEvent = slot; +} + +void QWebEngineUrlRequestInterceptor_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebEngineUrlRequestInterceptor*)(self) )->virtualbase_CustomEvent(event); +} + +void QWebEngineUrlRequestInterceptor_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlRequestInterceptor*)(self) )->handle__ConnectNotify = slot; +} + +void QWebEngineUrlRequestInterceptor_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebEngineUrlRequestInterceptor*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QWebEngineUrlRequestInterceptor_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlRequestInterceptor*)(self) )->handle__DisconnectNotify = slot; +} + +void QWebEngineUrlRequestInterceptor_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebEngineUrlRequestInterceptor*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QWebEngineUrlRequestInterceptor_Delete(QWebEngineUrlRequestInterceptor* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webengine/gen_qwebengineurlrequestinterceptor.go b/qt/webengine/gen_qwebengineurlrequestinterceptor.go new file mode 100644 index 00000000..31b3b66d --- /dev/null +++ b/qt/webengine/gen_qwebengineurlrequestinterceptor.go @@ -0,0 +1,350 @@ +package webengine + +/* + +#include "gen_qwebengineurlrequestinterceptor.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebEngineUrlRequestInterceptor struct { + h *C.QWebEngineUrlRequestInterceptor + isSubclass bool + *qt.QObject +} + +func (this *QWebEngineUrlRequestInterceptor) cPointer() *C.QWebEngineUrlRequestInterceptor { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineUrlRequestInterceptor) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineUrlRequestInterceptor constructs the type using only CGO pointers. +func newQWebEngineUrlRequestInterceptor(h *C.QWebEngineUrlRequestInterceptor, h_QObject *C.QObject) *QWebEngineUrlRequestInterceptor { + if h == nil { + return nil + } + return &QWebEngineUrlRequestInterceptor{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEngineUrlRequestInterceptor constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineUrlRequestInterceptor(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineUrlRequestInterceptor { + if h == nil { + return nil + } + + return &QWebEngineUrlRequestInterceptor{h: (*C.QWebEngineUrlRequestInterceptor)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +// NewQWebEngineUrlRequestInterceptor constructs a new QWebEngineUrlRequestInterceptor object. +func NewQWebEngineUrlRequestInterceptor() *QWebEngineUrlRequestInterceptor { + var outptr_QWebEngineUrlRequestInterceptor *C.QWebEngineUrlRequestInterceptor = nil + var outptr_QObject *C.QObject = nil + + C.QWebEngineUrlRequestInterceptor_new(&outptr_QWebEngineUrlRequestInterceptor, &outptr_QObject) + ret := newQWebEngineUrlRequestInterceptor(outptr_QWebEngineUrlRequestInterceptor, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebEngineUrlRequestInterceptor2 constructs a new QWebEngineUrlRequestInterceptor object. +func NewQWebEngineUrlRequestInterceptor2(p *qt.QObject) *QWebEngineUrlRequestInterceptor { + var outptr_QWebEngineUrlRequestInterceptor *C.QWebEngineUrlRequestInterceptor = nil + var outptr_QObject *C.QObject = nil + + C.QWebEngineUrlRequestInterceptor_new2((*C.QObject)(p.UnsafePointer()), &outptr_QWebEngineUrlRequestInterceptor, &outptr_QObject) + ret := newQWebEngineUrlRequestInterceptor(outptr_QWebEngineUrlRequestInterceptor, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineUrlRequestInterceptor) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineUrlRequestInterceptor_MetaObject(this.h))) +} + +func (this *QWebEngineUrlRequestInterceptor) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineUrlRequestInterceptor_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineUrlRequestInterceptor_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlRequestInterceptor_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineUrlRequestInterceptor_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlRequestInterceptor_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineUrlRequestInterceptor) InterceptRequest(info *QWebEngineUrlRequestInfo) { + C.QWebEngineUrlRequestInterceptor_InterceptRequest(this.h, info.cPointer()) +} + +func QWebEngineUrlRequestInterceptor_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlRequestInterceptor_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineUrlRequestInterceptor_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlRequestInterceptor_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineUrlRequestInterceptor_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlRequestInterceptor_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineUrlRequestInterceptor_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlRequestInterceptor_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QWebEngineUrlRequestInterceptor) OnInterceptRequest(slot func(info *QWebEngineUrlRequestInfo)) { + C.QWebEngineUrlRequestInterceptor_override_virtual_InterceptRequest(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlRequestInterceptor_InterceptRequest +func miqt_exec_callback_QWebEngineUrlRequestInterceptor_InterceptRequest(self *C.QWebEngineUrlRequestInterceptor, cb C.intptr_t, info *C.QWebEngineUrlRequestInfo) { + gofunc, ok := cgo.Handle(cb).Value().(func(info *QWebEngineUrlRequestInfo)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebEngineUrlRequestInfo(unsafe.Pointer(info)) + + gofunc(slotval1) + +} + +func (this *QWebEngineUrlRequestInterceptor) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QWebEngineUrlRequestInterceptor_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebEngineUrlRequestInterceptor) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QWebEngineUrlRequestInterceptor_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlRequestInterceptor_Event +func miqt_exec_callback_QWebEngineUrlRequestInterceptor_Event(self *C.QWebEngineUrlRequestInterceptor, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebEngineUrlRequestInterceptor{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEngineUrlRequestInterceptor) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QWebEngineUrlRequestInterceptor_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebEngineUrlRequestInterceptor) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QWebEngineUrlRequestInterceptor_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlRequestInterceptor_EventFilter +func miqt_exec_callback_QWebEngineUrlRequestInterceptor_EventFilter(self *C.QWebEngineUrlRequestInterceptor, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebEngineUrlRequestInterceptor{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEngineUrlRequestInterceptor) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QWebEngineUrlRequestInterceptor_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineUrlRequestInterceptor) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QWebEngineUrlRequestInterceptor_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlRequestInterceptor_TimerEvent +func miqt_exec_callback_QWebEngineUrlRequestInterceptor_TimerEvent(self *C.QWebEngineUrlRequestInterceptor, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineUrlRequestInterceptor{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QWebEngineUrlRequestInterceptor) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QWebEngineUrlRequestInterceptor_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineUrlRequestInterceptor) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QWebEngineUrlRequestInterceptor_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlRequestInterceptor_ChildEvent +func miqt_exec_callback_QWebEngineUrlRequestInterceptor_ChildEvent(self *C.QWebEngineUrlRequestInterceptor, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineUrlRequestInterceptor{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QWebEngineUrlRequestInterceptor) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QWebEngineUrlRequestInterceptor_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineUrlRequestInterceptor) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QWebEngineUrlRequestInterceptor_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlRequestInterceptor_CustomEvent +func miqt_exec_callback_QWebEngineUrlRequestInterceptor_CustomEvent(self *C.QWebEngineUrlRequestInterceptor, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWebEngineUrlRequestInterceptor{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QWebEngineUrlRequestInterceptor) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QWebEngineUrlRequestInterceptor_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebEngineUrlRequestInterceptor) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QWebEngineUrlRequestInterceptor_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlRequestInterceptor_ConnectNotify +func miqt_exec_callback_QWebEngineUrlRequestInterceptor_ConnectNotify(self *C.QWebEngineUrlRequestInterceptor, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebEngineUrlRequestInterceptor{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QWebEngineUrlRequestInterceptor) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QWebEngineUrlRequestInterceptor_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebEngineUrlRequestInterceptor) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QWebEngineUrlRequestInterceptor_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlRequestInterceptor_DisconnectNotify +func miqt_exec_callback_QWebEngineUrlRequestInterceptor_DisconnectNotify(self *C.QWebEngineUrlRequestInterceptor, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebEngineUrlRequestInterceptor{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QWebEngineUrlRequestInterceptor) Delete() { + C.QWebEngineUrlRequestInterceptor_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineUrlRequestInterceptor) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineUrlRequestInterceptor) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webengine/gen_qwebengineurlrequestinterceptor.h b/qt/webengine/gen_qwebengineurlrequestinterceptor.h new file mode 100644 index 00000000..fa45911a --- /dev/null +++ b/qt/webengine/gen_qwebengineurlrequestinterceptor.h @@ -0,0 +1,70 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEURLREQUESTINTERCEPTOR_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEURLREQUESTINTERCEPTOR_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; +class QMetaObject; +class QObject; +class QTimerEvent; +class QWebEngineUrlRequestInfo; +class QWebEngineUrlRequestInterceptor; +#else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; +typedef struct QWebEngineUrlRequestInfo QWebEngineUrlRequestInfo; +typedef struct QWebEngineUrlRequestInterceptor QWebEngineUrlRequestInterceptor; +#endif + +void QWebEngineUrlRequestInterceptor_new(QWebEngineUrlRequestInterceptor** outptr_QWebEngineUrlRequestInterceptor, QObject** outptr_QObject); +void QWebEngineUrlRequestInterceptor_new2(QObject* p, QWebEngineUrlRequestInterceptor** outptr_QWebEngineUrlRequestInterceptor, QObject** outptr_QObject); +QMetaObject* QWebEngineUrlRequestInterceptor_MetaObject(const QWebEngineUrlRequestInterceptor* self); +void* QWebEngineUrlRequestInterceptor_Metacast(QWebEngineUrlRequestInterceptor* self, const char* param1); +struct miqt_string QWebEngineUrlRequestInterceptor_Tr(const char* s); +struct miqt_string QWebEngineUrlRequestInterceptor_TrUtf8(const char* s); +void QWebEngineUrlRequestInterceptor_InterceptRequest(QWebEngineUrlRequestInterceptor* self, QWebEngineUrlRequestInfo* info); +struct miqt_string QWebEngineUrlRequestInterceptor_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineUrlRequestInterceptor_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebEngineUrlRequestInterceptor_TrUtf82(const char* s, const char* c); +struct miqt_string QWebEngineUrlRequestInterceptor_TrUtf83(const char* s, const char* c, int n); +void QWebEngineUrlRequestInterceptor_override_virtual_InterceptRequest(void* self, intptr_t slot); +void QWebEngineUrlRequestInterceptor_virtualbase_InterceptRequest(void* self, QWebEngineUrlRequestInfo* info); +void QWebEngineUrlRequestInterceptor_override_virtual_Event(void* self, intptr_t slot); +bool QWebEngineUrlRequestInterceptor_virtualbase_Event(void* self, QEvent* event); +void QWebEngineUrlRequestInterceptor_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWebEngineUrlRequestInterceptor_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QWebEngineUrlRequestInterceptor_override_virtual_TimerEvent(void* self, intptr_t slot); +void QWebEngineUrlRequestInterceptor_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QWebEngineUrlRequestInterceptor_override_virtual_ChildEvent(void* self, intptr_t slot); +void QWebEngineUrlRequestInterceptor_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QWebEngineUrlRequestInterceptor_override_virtual_CustomEvent(void* self, intptr_t slot); +void QWebEngineUrlRequestInterceptor_virtualbase_CustomEvent(void* self, QEvent* event); +void QWebEngineUrlRequestInterceptor_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QWebEngineUrlRequestInterceptor_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QWebEngineUrlRequestInterceptor_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QWebEngineUrlRequestInterceptor_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QWebEngineUrlRequestInterceptor_Delete(QWebEngineUrlRequestInterceptor* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebengineurlrequestjob.cpp b/qt/webengine/gen_qwebengineurlrequestjob.cpp new file mode 100644 index 00000000..e0bce682 --- /dev/null +++ b/qt/webengine/gen_qwebengineurlrequestjob.cpp @@ -0,0 +1,125 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebengineurlrequestjob.h" +#include "_cgo_export.h" + +QMetaObject* QWebEngineUrlRequestJob_MetaObject(const QWebEngineUrlRequestJob* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineUrlRequestJob_Metacast(QWebEngineUrlRequestJob* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineUrlRequestJob_Tr(const char* s) { + QString _ret = QWebEngineUrlRequestJob::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineUrlRequestJob_TrUtf8(const char* s) { + QString _ret = QWebEngineUrlRequestJob::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QUrl* QWebEngineUrlRequestJob_RequestUrl(const QWebEngineUrlRequestJob* self) { + return new QUrl(self->requestUrl()); +} + +struct miqt_string QWebEngineUrlRequestJob_RequestMethod(const QWebEngineUrlRequestJob* self) { + QByteArray _qb = self->requestMethod(); + struct miqt_string _ms; + _ms.len = _qb.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _qb.data(), _ms.len); + return _ms; +} + +QUrl* QWebEngineUrlRequestJob_Initiator(const QWebEngineUrlRequestJob* self) { + return new QUrl(self->initiator()); +} + +void QWebEngineUrlRequestJob_Reply(QWebEngineUrlRequestJob* self, struct miqt_string contentType, QIODevice* device) { + QByteArray contentType_QByteArray(contentType.data, contentType.len); + self->reply(contentType_QByteArray, device); +} + +void QWebEngineUrlRequestJob_Fail(QWebEngineUrlRequestJob* self, int error) { + self->fail(static_cast(error)); +} + +void QWebEngineUrlRequestJob_Redirect(QWebEngineUrlRequestJob* self, QUrl* url) { + self->redirect(*url); +} + +struct miqt_string QWebEngineUrlRequestJob_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineUrlRequestJob::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineUrlRequestJob_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineUrlRequestJob::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineUrlRequestJob_TrUtf82(const char* s, const char* c) { + QString _ret = QWebEngineUrlRequestJob::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineUrlRequestJob_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebEngineUrlRequestJob::trUtf8(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineUrlRequestJob_Delete(QWebEngineUrlRequestJob* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webengine/gen_qwebengineurlrequestjob.go b/qt/webengine/gen_qwebengineurlrequestjob.go new file mode 100644 index 00000000..079da25d --- /dev/null +++ b/qt/webengine/gen_qwebengineurlrequestjob.go @@ -0,0 +1,187 @@ +package webengine + +/* + +#include "gen_qwebengineurlrequestjob.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "unsafe" +) + +type QWebEngineUrlRequestJob__Error int + +const ( + QWebEngineUrlRequestJob__NoError QWebEngineUrlRequestJob__Error = 0 + QWebEngineUrlRequestJob__UrlNotFound QWebEngineUrlRequestJob__Error = 1 + QWebEngineUrlRequestJob__UrlInvalid QWebEngineUrlRequestJob__Error = 2 + QWebEngineUrlRequestJob__RequestAborted QWebEngineUrlRequestJob__Error = 3 + QWebEngineUrlRequestJob__RequestDenied QWebEngineUrlRequestJob__Error = 4 + QWebEngineUrlRequestJob__RequestFailed QWebEngineUrlRequestJob__Error = 5 +) + +type QWebEngineUrlRequestJob struct { + h *C.QWebEngineUrlRequestJob + isSubclass bool + *qt.QObject +} + +func (this *QWebEngineUrlRequestJob) cPointer() *C.QWebEngineUrlRequestJob { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineUrlRequestJob) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineUrlRequestJob constructs the type using only CGO pointers. +func newQWebEngineUrlRequestJob(h *C.QWebEngineUrlRequestJob, h_QObject *C.QObject) *QWebEngineUrlRequestJob { + if h == nil { + return nil + } + return &QWebEngineUrlRequestJob{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEngineUrlRequestJob constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineUrlRequestJob(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineUrlRequestJob { + if h == nil { + return nil + } + + return &QWebEngineUrlRequestJob{h: (*C.QWebEngineUrlRequestJob)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +func (this *QWebEngineUrlRequestJob) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineUrlRequestJob_MetaObject(this.h))) +} + +func (this *QWebEngineUrlRequestJob) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineUrlRequestJob_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineUrlRequestJob_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlRequestJob_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineUrlRequestJob_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlRequestJob_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineUrlRequestJob) RequestUrl() *qt.QUrl { + _ret := C.QWebEngineUrlRequestJob_RequestUrl(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineUrlRequestJob) RequestMethod() []byte { + var _bytearray C.struct_miqt_string = C.QWebEngineUrlRequestJob_RequestMethod(this.h) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *QWebEngineUrlRequestJob) Initiator() *qt.QUrl { + _ret := C.QWebEngineUrlRequestJob_Initiator(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineUrlRequestJob) Reply(contentType []byte, device *qt.QIODevice) { + contentType_alias := C.struct_miqt_string{} + contentType_alias.data = (*C.char)(unsafe.Pointer(&contentType[0])) + contentType_alias.len = C.size_t(len(contentType)) + C.QWebEngineUrlRequestJob_Reply(this.h, contentType_alias, (*C.QIODevice)(device.UnsafePointer())) +} + +func (this *QWebEngineUrlRequestJob) Fail(error QWebEngineUrlRequestJob__Error) { + C.QWebEngineUrlRequestJob_Fail(this.h, (C.int)(error)) +} + +func (this *QWebEngineUrlRequestJob) Redirect(url *qt.QUrl) { + C.QWebEngineUrlRequestJob_Redirect(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func QWebEngineUrlRequestJob_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlRequestJob_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineUrlRequestJob_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlRequestJob_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineUrlRequestJob_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlRequestJob_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineUrlRequestJob_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlRequestJob_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebEngineUrlRequestJob) Delete() { + C.QWebEngineUrlRequestJob_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineUrlRequestJob) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineUrlRequestJob) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webengine/gen_qwebengineurlrequestjob.h b/qt/webengine/gen_qwebengineurlrequestjob.h new file mode 100644 index 00000000..8109f9f6 --- /dev/null +++ b/qt/webengine/gen_qwebengineurlrequestjob.h @@ -0,0 +1,51 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEURLREQUESTJOB_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEURLREQUESTJOB_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QIODevice; +class QMetaObject; +class QObject; +class QUrl; +class QWebEngineUrlRequestJob; +#else +typedef struct QIODevice QIODevice; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QUrl QUrl; +typedef struct QWebEngineUrlRequestJob QWebEngineUrlRequestJob; +#endif + +QMetaObject* QWebEngineUrlRequestJob_MetaObject(const QWebEngineUrlRequestJob* self); +void* QWebEngineUrlRequestJob_Metacast(QWebEngineUrlRequestJob* self, const char* param1); +struct miqt_string QWebEngineUrlRequestJob_Tr(const char* s); +struct miqt_string QWebEngineUrlRequestJob_TrUtf8(const char* s); +QUrl* QWebEngineUrlRequestJob_RequestUrl(const QWebEngineUrlRequestJob* self); +struct miqt_string QWebEngineUrlRequestJob_RequestMethod(const QWebEngineUrlRequestJob* self); +QUrl* QWebEngineUrlRequestJob_Initiator(const QWebEngineUrlRequestJob* self); +void QWebEngineUrlRequestJob_Reply(QWebEngineUrlRequestJob* self, struct miqt_string contentType, QIODevice* device); +void QWebEngineUrlRequestJob_Fail(QWebEngineUrlRequestJob* self, int error); +void QWebEngineUrlRequestJob_Redirect(QWebEngineUrlRequestJob* self, QUrl* url); +struct miqt_string QWebEngineUrlRequestJob_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineUrlRequestJob_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebEngineUrlRequestJob_TrUtf82(const char* s, const char* c); +struct miqt_string QWebEngineUrlRequestJob_TrUtf83(const char* s, const char* c, int n); +void QWebEngineUrlRequestJob_Delete(QWebEngineUrlRequestJob* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebengineurlscheme.cpp b/qt/webengine/gen_qwebengineurlscheme.cpp new file mode 100644 index 00000000..1d5852d8 --- /dev/null +++ b/qt/webengine/gen_qwebengineurlscheme.cpp @@ -0,0 +1,91 @@ +#include +#include +#include +#include "gen_qwebengineurlscheme.h" +#include "_cgo_export.h" + +void QWebEngineUrlScheme_new(QWebEngineUrlScheme** outptr_QWebEngineUrlScheme) { + QWebEngineUrlScheme* ret = new QWebEngineUrlScheme(); + *outptr_QWebEngineUrlScheme = ret; +} + +void QWebEngineUrlScheme_new2(struct miqt_string name, QWebEngineUrlScheme** outptr_QWebEngineUrlScheme) { + QByteArray name_QByteArray(name.data, name.len); + QWebEngineUrlScheme* ret = new QWebEngineUrlScheme(name_QByteArray); + *outptr_QWebEngineUrlScheme = ret; +} + +void QWebEngineUrlScheme_new3(QWebEngineUrlScheme* that, QWebEngineUrlScheme** outptr_QWebEngineUrlScheme) { + QWebEngineUrlScheme* ret = new QWebEngineUrlScheme(*that); + *outptr_QWebEngineUrlScheme = ret; +} + +void QWebEngineUrlScheme_OperatorAssign(QWebEngineUrlScheme* self, QWebEngineUrlScheme* that) { + self->operator=(*that); +} + +bool QWebEngineUrlScheme_OperatorEqual(const QWebEngineUrlScheme* self, QWebEngineUrlScheme* that) { + return (*self == *that); +} + +bool QWebEngineUrlScheme_OperatorNotEqual(const QWebEngineUrlScheme* self, QWebEngineUrlScheme* that) { + return (*self != *that); +} + +struct miqt_string QWebEngineUrlScheme_Name(const QWebEngineUrlScheme* self) { + QByteArray _qb = self->name(); + struct miqt_string _ms; + _ms.len = _qb.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _qb.data(), _ms.len); + return _ms; +} + +void QWebEngineUrlScheme_SetName(QWebEngineUrlScheme* self, struct miqt_string newValue) { + QByteArray newValue_QByteArray(newValue.data, newValue.len); + self->setName(newValue_QByteArray); +} + +int QWebEngineUrlScheme_Syntax(const QWebEngineUrlScheme* self) { + QWebEngineUrlScheme::Syntax _ret = self->syntax(); + return static_cast(_ret); +} + +void QWebEngineUrlScheme_SetSyntax(QWebEngineUrlScheme* self, int newValue) { + self->setSyntax(static_cast(newValue)); +} + +int QWebEngineUrlScheme_DefaultPort(const QWebEngineUrlScheme* self) { + return self->defaultPort(); +} + +void QWebEngineUrlScheme_SetDefaultPort(QWebEngineUrlScheme* self, int newValue) { + self->setDefaultPort(static_cast(newValue)); +} + +int QWebEngineUrlScheme_Flags(const QWebEngineUrlScheme* self) { + QWebEngineUrlScheme::Flags _ret = self->flags(); + return static_cast(_ret); +} + +void QWebEngineUrlScheme_SetFlags(QWebEngineUrlScheme* self, int newValue) { + self->setFlags(static_cast(newValue)); +} + +void QWebEngineUrlScheme_RegisterScheme(QWebEngineUrlScheme* scheme) { + QWebEngineUrlScheme::registerScheme(*scheme); +} + +QWebEngineUrlScheme* QWebEngineUrlScheme_SchemeByName(struct miqt_string name) { + QByteArray name_QByteArray(name.data, name.len); + return new QWebEngineUrlScheme(QWebEngineUrlScheme::schemeByName(name_QByteArray)); +} + +void QWebEngineUrlScheme_Delete(QWebEngineUrlScheme* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webengine/gen_qwebengineurlscheme.go b/qt/webengine/gen_qwebengineurlscheme.go new file mode 100644 index 00000000..f42e34ae --- /dev/null +++ b/qt/webengine/gen_qwebengineurlscheme.go @@ -0,0 +1,189 @@ +package webengine + +/* + +#include "gen_qwebengineurlscheme.h" +#include + +*/ +import "C" + +import ( + "runtime" + "unsafe" +) + +type QWebEngineUrlScheme__Syntax int + +const ( + QWebEngineUrlScheme__HostPortAndUserInformation QWebEngineUrlScheme__Syntax = 0 + QWebEngineUrlScheme__HostAndPort QWebEngineUrlScheme__Syntax = 1 + QWebEngineUrlScheme__Host QWebEngineUrlScheme__Syntax = 2 + QWebEngineUrlScheme__Path QWebEngineUrlScheme__Syntax = 3 +) + +type QWebEngineUrlScheme__SpecialPort int + +const ( + QWebEngineUrlScheme__PortUnspecified QWebEngineUrlScheme__SpecialPort = -1 +) + +type QWebEngineUrlScheme__Flag int + +const ( + QWebEngineUrlScheme__SecureScheme QWebEngineUrlScheme__Flag = 1 + QWebEngineUrlScheme__LocalScheme QWebEngineUrlScheme__Flag = 2 + QWebEngineUrlScheme__LocalAccessAllowed QWebEngineUrlScheme__Flag = 4 + QWebEngineUrlScheme__NoAccessAllowed QWebEngineUrlScheme__Flag = 8 + QWebEngineUrlScheme__ServiceWorkersAllowed QWebEngineUrlScheme__Flag = 16 + QWebEngineUrlScheme__ViewSourceAllowed QWebEngineUrlScheme__Flag = 32 + QWebEngineUrlScheme__ContentSecurityPolicyIgnored QWebEngineUrlScheme__Flag = 64 + QWebEngineUrlScheme__CorsEnabled QWebEngineUrlScheme__Flag = 128 +) + +type QWebEngineUrlScheme struct { + h *C.QWebEngineUrlScheme + isSubclass bool +} + +func (this *QWebEngineUrlScheme) cPointer() *C.QWebEngineUrlScheme { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineUrlScheme) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineUrlScheme constructs the type using only CGO pointers. +func newQWebEngineUrlScheme(h *C.QWebEngineUrlScheme) *QWebEngineUrlScheme { + if h == nil { + return nil + } + return &QWebEngineUrlScheme{h: h} +} + +// UnsafeNewQWebEngineUrlScheme constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineUrlScheme(h unsafe.Pointer) *QWebEngineUrlScheme { + if h == nil { + return nil + } + + return &QWebEngineUrlScheme{h: (*C.QWebEngineUrlScheme)(h)} +} + +// NewQWebEngineUrlScheme constructs a new QWebEngineUrlScheme object. +func NewQWebEngineUrlScheme() *QWebEngineUrlScheme { + var outptr_QWebEngineUrlScheme *C.QWebEngineUrlScheme = nil + + C.QWebEngineUrlScheme_new(&outptr_QWebEngineUrlScheme) + ret := newQWebEngineUrlScheme(outptr_QWebEngineUrlScheme) + ret.isSubclass = true + return ret +} + +// NewQWebEngineUrlScheme2 constructs a new QWebEngineUrlScheme object. +func NewQWebEngineUrlScheme2(name []byte) *QWebEngineUrlScheme { + name_alias := C.struct_miqt_string{} + name_alias.data = (*C.char)(unsafe.Pointer(&name[0])) + name_alias.len = C.size_t(len(name)) + var outptr_QWebEngineUrlScheme *C.QWebEngineUrlScheme = nil + + C.QWebEngineUrlScheme_new2(name_alias, &outptr_QWebEngineUrlScheme) + ret := newQWebEngineUrlScheme(outptr_QWebEngineUrlScheme) + ret.isSubclass = true + return ret +} + +// NewQWebEngineUrlScheme3 constructs a new QWebEngineUrlScheme object. +func NewQWebEngineUrlScheme3(that *QWebEngineUrlScheme) *QWebEngineUrlScheme { + var outptr_QWebEngineUrlScheme *C.QWebEngineUrlScheme = nil + + C.QWebEngineUrlScheme_new3(that.cPointer(), &outptr_QWebEngineUrlScheme) + ret := newQWebEngineUrlScheme(outptr_QWebEngineUrlScheme) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineUrlScheme) OperatorAssign(that *QWebEngineUrlScheme) { + C.QWebEngineUrlScheme_OperatorAssign(this.h, that.cPointer()) +} + +func (this *QWebEngineUrlScheme) OperatorEqual(that *QWebEngineUrlScheme) bool { + return (bool)(C.QWebEngineUrlScheme_OperatorEqual(this.h, that.cPointer())) +} + +func (this *QWebEngineUrlScheme) OperatorNotEqual(that *QWebEngineUrlScheme) bool { + return (bool)(C.QWebEngineUrlScheme_OperatorNotEqual(this.h, that.cPointer())) +} + +func (this *QWebEngineUrlScheme) Name() []byte { + var _bytearray C.struct_miqt_string = C.QWebEngineUrlScheme_Name(this.h) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *QWebEngineUrlScheme) SetName(newValue []byte) { + newValue_alias := C.struct_miqt_string{} + newValue_alias.data = (*C.char)(unsafe.Pointer(&newValue[0])) + newValue_alias.len = C.size_t(len(newValue)) + C.QWebEngineUrlScheme_SetName(this.h, newValue_alias) +} + +func (this *QWebEngineUrlScheme) Syntax() QWebEngineUrlScheme__Syntax { + return (QWebEngineUrlScheme__Syntax)(C.QWebEngineUrlScheme_Syntax(this.h)) +} + +func (this *QWebEngineUrlScheme) SetSyntax(newValue QWebEngineUrlScheme__Syntax) { + C.QWebEngineUrlScheme_SetSyntax(this.h, (C.int)(newValue)) +} + +func (this *QWebEngineUrlScheme) DefaultPort() int { + return (int)(C.QWebEngineUrlScheme_DefaultPort(this.h)) +} + +func (this *QWebEngineUrlScheme) SetDefaultPort(newValue int) { + C.QWebEngineUrlScheme_SetDefaultPort(this.h, (C.int)(newValue)) +} + +func (this *QWebEngineUrlScheme) Flags() QWebEngineUrlScheme__Flag { + return (QWebEngineUrlScheme__Flag)(C.QWebEngineUrlScheme_Flags(this.h)) +} + +func (this *QWebEngineUrlScheme) SetFlags(newValue QWebEngineUrlScheme__Flag) { + C.QWebEngineUrlScheme_SetFlags(this.h, (C.int)(newValue)) +} + +func QWebEngineUrlScheme_RegisterScheme(scheme *QWebEngineUrlScheme) { + C.QWebEngineUrlScheme_RegisterScheme(scheme.cPointer()) +} + +func QWebEngineUrlScheme_SchemeByName(name []byte) *QWebEngineUrlScheme { + name_alias := C.struct_miqt_string{} + name_alias.data = (*C.char)(unsafe.Pointer(&name[0])) + name_alias.len = C.size_t(len(name)) + _ret := C.QWebEngineUrlScheme_SchemeByName(name_alias) + _goptr := newQWebEngineUrlScheme(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +// Delete this object from C++ memory. +func (this *QWebEngineUrlScheme) Delete() { + C.QWebEngineUrlScheme_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineUrlScheme) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineUrlScheme) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webengine/gen_qwebengineurlscheme.h b/qt/webengine/gen_qwebengineurlscheme.h new file mode 100644 index 00000000..f391b199 --- /dev/null +++ b/qt/webengine/gen_qwebengineurlscheme.h @@ -0,0 +1,45 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEURLSCHEME_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEURLSCHEME_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QWebEngineUrlScheme; +#else +typedef struct QWebEngineUrlScheme QWebEngineUrlScheme; +#endif + +void QWebEngineUrlScheme_new(QWebEngineUrlScheme** outptr_QWebEngineUrlScheme); +void QWebEngineUrlScheme_new2(struct miqt_string name, QWebEngineUrlScheme** outptr_QWebEngineUrlScheme); +void QWebEngineUrlScheme_new3(QWebEngineUrlScheme* that, QWebEngineUrlScheme** outptr_QWebEngineUrlScheme); +void QWebEngineUrlScheme_OperatorAssign(QWebEngineUrlScheme* self, QWebEngineUrlScheme* that); +bool QWebEngineUrlScheme_OperatorEqual(const QWebEngineUrlScheme* self, QWebEngineUrlScheme* that); +bool QWebEngineUrlScheme_OperatorNotEqual(const QWebEngineUrlScheme* self, QWebEngineUrlScheme* that); +struct miqt_string QWebEngineUrlScheme_Name(const QWebEngineUrlScheme* self); +void QWebEngineUrlScheme_SetName(QWebEngineUrlScheme* self, struct miqt_string newValue); +int QWebEngineUrlScheme_Syntax(const QWebEngineUrlScheme* self); +void QWebEngineUrlScheme_SetSyntax(QWebEngineUrlScheme* self, int newValue); +int QWebEngineUrlScheme_DefaultPort(const QWebEngineUrlScheme* self); +void QWebEngineUrlScheme_SetDefaultPort(QWebEngineUrlScheme* self, int newValue); +int QWebEngineUrlScheme_Flags(const QWebEngineUrlScheme* self); +void QWebEngineUrlScheme_SetFlags(QWebEngineUrlScheme* self, int newValue); +void QWebEngineUrlScheme_RegisterScheme(QWebEngineUrlScheme* scheme); +QWebEngineUrlScheme* QWebEngineUrlScheme_SchemeByName(struct miqt_string name); +void QWebEngineUrlScheme_Delete(QWebEngineUrlScheme* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebengineurlschemehandler.cpp b/qt/webengine/gen_qwebengineurlschemehandler.cpp new file mode 100644 index 00000000..7182bfda --- /dev/null +++ b/qt/webengine/gen_qwebengineurlschemehandler.cpp @@ -0,0 +1,370 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebengineurlschemehandler.h" +#include "_cgo_export.h" + +class MiqtVirtualQWebEngineUrlSchemeHandler : public virtual QWebEngineUrlSchemeHandler { +public: + + MiqtVirtualQWebEngineUrlSchemeHandler(): QWebEngineUrlSchemeHandler() {}; + MiqtVirtualQWebEngineUrlSchemeHandler(QObject* parent): QWebEngineUrlSchemeHandler(parent) {}; + + virtual ~MiqtVirtualQWebEngineUrlSchemeHandler() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__RequestStarted = 0; + + // Subclass to allow providing a Go implementation + virtual void requestStarted(QWebEngineUrlRequestJob* param1) override { + if (handle__RequestStarted == 0) { + return; // Pure virtual, there is no base we can call + } + + QWebEngineUrlRequestJob* sigval1 = param1; + + miqt_exec_callback_QWebEngineUrlSchemeHandler_RequestStarted(this, handle__RequestStarted, sigval1); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QWebEngineUrlSchemeHandler::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QWebEngineUrlSchemeHandler_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QWebEngineUrlSchemeHandler::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QWebEngineUrlSchemeHandler::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QWebEngineUrlSchemeHandler_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QWebEngineUrlSchemeHandler::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QWebEngineUrlSchemeHandler::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineUrlSchemeHandler_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QWebEngineUrlSchemeHandler::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QWebEngineUrlSchemeHandler::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineUrlSchemeHandler_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QWebEngineUrlSchemeHandler::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QWebEngineUrlSchemeHandler::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineUrlSchemeHandler_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QWebEngineUrlSchemeHandler::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QWebEngineUrlSchemeHandler::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebEngineUrlSchemeHandler_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QWebEngineUrlSchemeHandler::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QWebEngineUrlSchemeHandler::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebEngineUrlSchemeHandler_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QWebEngineUrlSchemeHandler::disconnectNotify(*signal); + + } + +}; + +void QWebEngineUrlSchemeHandler_new(QWebEngineUrlSchemeHandler** outptr_QWebEngineUrlSchemeHandler, QObject** outptr_QObject) { + MiqtVirtualQWebEngineUrlSchemeHandler* ret = new MiqtVirtualQWebEngineUrlSchemeHandler(); + *outptr_QWebEngineUrlSchemeHandler = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebEngineUrlSchemeHandler_new2(QObject* parent, QWebEngineUrlSchemeHandler** outptr_QWebEngineUrlSchemeHandler, QObject** outptr_QObject) { + MiqtVirtualQWebEngineUrlSchemeHandler* ret = new MiqtVirtualQWebEngineUrlSchemeHandler(parent); + *outptr_QWebEngineUrlSchemeHandler = ret; + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QWebEngineUrlSchemeHandler_MetaObject(const QWebEngineUrlSchemeHandler* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineUrlSchemeHandler_Metacast(QWebEngineUrlSchemeHandler* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineUrlSchemeHandler_Tr(const char* s) { + QString _ret = QWebEngineUrlSchemeHandler::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineUrlSchemeHandler_TrUtf8(const char* s) { + QString _ret = QWebEngineUrlSchemeHandler::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineUrlSchemeHandler_RequestStarted(QWebEngineUrlSchemeHandler* self, QWebEngineUrlRequestJob* param1) { + self->requestStarted(param1); +} + +struct miqt_string QWebEngineUrlSchemeHandler_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineUrlSchemeHandler::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineUrlSchemeHandler_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineUrlSchemeHandler::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineUrlSchemeHandler_TrUtf82(const char* s, const char* c) { + QString _ret = QWebEngineUrlSchemeHandler::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineUrlSchemeHandler_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebEngineUrlSchemeHandler::trUtf8(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineUrlSchemeHandler_override_virtual_RequestStarted(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlSchemeHandler*)(self) )->handle__RequestStarted = slot; +} + +void QWebEngineUrlSchemeHandler_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlSchemeHandler*)(self) )->handle__Event = slot; +} + +bool QWebEngineUrlSchemeHandler_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQWebEngineUrlSchemeHandler*)(self) )->virtualbase_Event(event); +} + +void QWebEngineUrlSchemeHandler_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlSchemeHandler*)(self) )->handle__EventFilter = slot; +} + +bool QWebEngineUrlSchemeHandler_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQWebEngineUrlSchemeHandler*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QWebEngineUrlSchemeHandler_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlSchemeHandler*)(self) )->handle__TimerEvent = slot; +} + +void QWebEngineUrlSchemeHandler_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQWebEngineUrlSchemeHandler*)(self) )->virtualbase_TimerEvent(event); +} + +void QWebEngineUrlSchemeHandler_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlSchemeHandler*)(self) )->handle__ChildEvent = slot; +} + +void QWebEngineUrlSchemeHandler_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQWebEngineUrlSchemeHandler*)(self) )->virtualbase_ChildEvent(event); +} + +void QWebEngineUrlSchemeHandler_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlSchemeHandler*)(self) )->handle__CustomEvent = slot; +} + +void QWebEngineUrlSchemeHandler_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebEngineUrlSchemeHandler*)(self) )->virtualbase_CustomEvent(event); +} + +void QWebEngineUrlSchemeHandler_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlSchemeHandler*)(self) )->handle__ConnectNotify = slot; +} + +void QWebEngineUrlSchemeHandler_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebEngineUrlSchemeHandler*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QWebEngineUrlSchemeHandler_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlSchemeHandler*)(self) )->handle__DisconnectNotify = slot; +} + +void QWebEngineUrlSchemeHandler_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebEngineUrlSchemeHandler*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QWebEngineUrlSchemeHandler_Delete(QWebEngineUrlSchemeHandler* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webengine/gen_qwebengineurlschemehandler.go b/qt/webengine/gen_qwebengineurlschemehandler.go new file mode 100644 index 00000000..f6d7ec9f --- /dev/null +++ b/qt/webengine/gen_qwebengineurlschemehandler.go @@ -0,0 +1,350 @@ +package webengine + +/* + +#include "gen_qwebengineurlschemehandler.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebEngineUrlSchemeHandler struct { + h *C.QWebEngineUrlSchemeHandler + isSubclass bool + *qt.QObject +} + +func (this *QWebEngineUrlSchemeHandler) cPointer() *C.QWebEngineUrlSchemeHandler { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineUrlSchemeHandler) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineUrlSchemeHandler constructs the type using only CGO pointers. +func newQWebEngineUrlSchemeHandler(h *C.QWebEngineUrlSchemeHandler, h_QObject *C.QObject) *QWebEngineUrlSchemeHandler { + if h == nil { + return nil + } + return &QWebEngineUrlSchemeHandler{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEngineUrlSchemeHandler constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineUrlSchemeHandler(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineUrlSchemeHandler { + if h == nil { + return nil + } + + return &QWebEngineUrlSchemeHandler{h: (*C.QWebEngineUrlSchemeHandler)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +// NewQWebEngineUrlSchemeHandler constructs a new QWebEngineUrlSchemeHandler object. +func NewQWebEngineUrlSchemeHandler() *QWebEngineUrlSchemeHandler { + var outptr_QWebEngineUrlSchemeHandler *C.QWebEngineUrlSchemeHandler = nil + var outptr_QObject *C.QObject = nil + + C.QWebEngineUrlSchemeHandler_new(&outptr_QWebEngineUrlSchemeHandler, &outptr_QObject) + ret := newQWebEngineUrlSchemeHandler(outptr_QWebEngineUrlSchemeHandler, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebEngineUrlSchemeHandler2 constructs a new QWebEngineUrlSchemeHandler object. +func NewQWebEngineUrlSchemeHandler2(parent *qt.QObject) *QWebEngineUrlSchemeHandler { + var outptr_QWebEngineUrlSchemeHandler *C.QWebEngineUrlSchemeHandler = nil + var outptr_QObject *C.QObject = nil + + C.QWebEngineUrlSchemeHandler_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QWebEngineUrlSchemeHandler, &outptr_QObject) + ret := newQWebEngineUrlSchemeHandler(outptr_QWebEngineUrlSchemeHandler, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineUrlSchemeHandler) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineUrlSchemeHandler_MetaObject(this.h))) +} + +func (this *QWebEngineUrlSchemeHandler) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineUrlSchemeHandler_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineUrlSchemeHandler_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlSchemeHandler_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineUrlSchemeHandler_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlSchemeHandler_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineUrlSchemeHandler) RequestStarted(param1 *QWebEngineUrlRequestJob) { + C.QWebEngineUrlSchemeHandler_RequestStarted(this.h, param1.cPointer()) +} + +func QWebEngineUrlSchemeHandler_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlSchemeHandler_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineUrlSchemeHandler_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlSchemeHandler_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineUrlSchemeHandler_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlSchemeHandler_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineUrlSchemeHandler_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlSchemeHandler_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QWebEngineUrlSchemeHandler) OnRequestStarted(slot func(param1 *QWebEngineUrlRequestJob)) { + C.QWebEngineUrlSchemeHandler_override_virtual_RequestStarted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlSchemeHandler_RequestStarted +func miqt_exec_callback_QWebEngineUrlSchemeHandler_RequestStarted(self *C.QWebEngineUrlSchemeHandler, cb C.intptr_t, param1 *C.QWebEngineUrlRequestJob) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 *QWebEngineUrlRequestJob)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebEngineUrlRequestJob(unsafe.Pointer(param1), nil) + + gofunc(slotval1) + +} + +func (this *QWebEngineUrlSchemeHandler) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QWebEngineUrlSchemeHandler_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebEngineUrlSchemeHandler) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QWebEngineUrlSchemeHandler_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlSchemeHandler_Event +func miqt_exec_callback_QWebEngineUrlSchemeHandler_Event(self *C.QWebEngineUrlSchemeHandler, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebEngineUrlSchemeHandler{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEngineUrlSchemeHandler) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QWebEngineUrlSchemeHandler_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebEngineUrlSchemeHandler) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QWebEngineUrlSchemeHandler_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlSchemeHandler_EventFilter +func miqt_exec_callback_QWebEngineUrlSchemeHandler_EventFilter(self *C.QWebEngineUrlSchemeHandler, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebEngineUrlSchemeHandler{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEngineUrlSchemeHandler) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QWebEngineUrlSchemeHandler_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineUrlSchemeHandler) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QWebEngineUrlSchemeHandler_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlSchemeHandler_TimerEvent +func miqt_exec_callback_QWebEngineUrlSchemeHandler_TimerEvent(self *C.QWebEngineUrlSchemeHandler, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineUrlSchemeHandler{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QWebEngineUrlSchemeHandler) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QWebEngineUrlSchemeHandler_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineUrlSchemeHandler) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QWebEngineUrlSchemeHandler_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlSchemeHandler_ChildEvent +func miqt_exec_callback_QWebEngineUrlSchemeHandler_ChildEvent(self *C.QWebEngineUrlSchemeHandler, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineUrlSchemeHandler{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QWebEngineUrlSchemeHandler) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QWebEngineUrlSchemeHandler_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineUrlSchemeHandler) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QWebEngineUrlSchemeHandler_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlSchemeHandler_CustomEvent +func miqt_exec_callback_QWebEngineUrlSchemeHandler_CustomEvent(self *C.QWebEngineUrlSchemeHandler, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWebEngineUrlSchemeHandler{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QWebEngineUrlSchemeHandler) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QWebEngineUrlSchemeHandler_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebEngineUrlSchemeHandler) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QWebEngineUrlSchemeHandler_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlSchemeHandler_ConnectNotify +func miqt_exec_callback_QWebEngineUrlSchemeHandler_ConnectNotify(self *C.QWebEngineUrlSchemeHandler, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebEngineUrlSchemeHandler{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QWebEngineUrlSchemeHandler) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QWebEngineUrlSchemeHandler_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebEngineUrlSchemeHandler) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QWebEngineUrlSchemeHandler_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlSchemeHandler_DisconnectNotify +func miqt_exec_callback_QWebEngineUrlSchemeHandler_DisconnectNotify(self *C.QWebEngineUrlSchemeHandler, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebEngineUrlSchemeHandler{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QWebEngineUrlSchemeHandler) Delete() { + C.QWebEngineUrlSchemeHandler_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineUrlSchemeHandler) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineUrlSchemeHandler) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webengine/gen_qwebengineurlschemehandler.h b/qt/webengine/gen_qwebengineurlschemehandler.h new file mode 100644 index 00000000..1a815bf9 --- /dev/null +++ b/qt/webengine/gen_qwebengineurlschemehandler.h @@ -0,0 +1,70 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEURLSCHEMEHANDLER_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEURLSCHEMEHANDLER_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; +class QMetaObject; +class QObject; +class QTimerEvent; +class QWebEngineUrlRequestJob; +class QWebEngineUrlSchemeHandler; +#else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; +typedef struct QWebEngineUrlRequestJob QWebEngineUrlRequestJob; +typedef struct QWebEngineUrlSchemeHandler QWebEngineUrlSchemeHandler; +#endif + +void QWebEngineUrlSchemeHandler_new(QWebEngineUrlSchemeHandler** outptr_QWebEngineUrlSchemeHandler, QObject** outptr_QObject); +void QWebEngineUrlSchemeHandler_new2(QObject* parent, QWebEngineUrlSchemeHandler** outptr_QWebEngineUrlSchemeHandler, QObject** outptr_QObject); +QMetaObject* QWebEngineUrlSchemeHandler_MetaObject(const QWebEngineUrlSchemeHandler* self); +void* QWebEngineUrlSchemeHandler_Metacast(QWebEngineUrlSchemeHandler* self, const char* param1); +struct miqt_string QWebEngineUrlSchemeHandler_Tr(const char* s); +struct miqt_string QWebEngineUrlSchemeHandler_TrUtf8(const char* s); +void QWebEngineUrlSchemeHandler_RequestStarted(QWebEngineUrlSchemeHandler* self, QWebEngineUrlRequestJob* param1); +struct miqt_string QWebEngineUrlSchemeHandler_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineUrlSchemeHandler_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebEngineUrlSchemeHandler_TrUtf82(const char* s, const char* c); +struct miqt_string QWebEngineUrlSchemeHandler_TrUtf83(const char* s, const char* c, int n); +void QWebEngineUrlSchemeHandler_override_virtual_RequestStarted(void* self, intptr_t slot); +void QWebEngineUrlSchemeHandler_virtualbase_RequestStarted(void* self, QWebEngineUrlRequestJob* param1); +void QWebEngineUrlSchemeHandler_override_virtual_Event(void* self, intptr_t slot); +bool QWebEngineUrlSchemeHandler_virtualbase_Event(void* self, QEvent* event); +void QWebEngineUrlSchemeHandler_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWebEngineUrlSchemeHandler_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QWebEngineUrlSchemeHandler_override_virtual_TimerEvent(void* self, intptr_t slot); +void QWebEngineUrlSchemeHandler_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QWebEngineUrlSchemeHandler_override_virtual_ChildEvent(void* self, intptr_t slot); +void QWebEngineUrlSchemeHandler_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QWebEngineUrlSchemeHandler_override_virtual_CustomEvent(void* self, intptr_t slot); +void QWebEngineUrlSchemeHandler_virtualbase_CustomEvent(void* self, QEvent* event); +void QWebEngineUrlSchemeHandler_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QWebEngineUrlSchemeHandler_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QWebEngineUrlSchemeHandler_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QWebEngineUrlSchemeHandler_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QWebEngineUrlSchemeHandler_Delete(QWebEngineUrlSchemeHandler* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webengine/gen_qwebengineview.cpp b/qt/webengine/gen_qwebengineview.cpp new file mode 100644 index 00000000..93d73445 --- /dev/null +++ b/qt/webengine/gen_qwebengineview.cpp @@ -0,0 +1,1744 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebengineview.h" +#include "_cgo_export.h" + +class MiqtVirtualQWebEngineView : public virtual QWebEngineView { +public: + + MiqtVirtualQWebEngineView(QWidget* parent): QWebEngineView(parent) {}; + MiqtVirtualQWebEngineView(): QWebEngineView() {}; + + virtual ~MiqtVirtualQWebEngineView() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QWebEngineView::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWebEngineView_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QWebEngineView::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateWindow = 0; + + // Subclass to allow providing a Go implementation + virtual QWebEngineView* createWindow(QWebEnginePage::WebWindowType typeVal) override { + if (handle__CreateWindow == 0) { + return QWebEngineView::createWindow(typeVal); + } + + QWebEnginePage::WebWindowType typeVal_ret = typeVal; + int sigval1 = static_cast(typeVal_ret); + + QWebEngineView* callback_return_value = miqt_exec_callback_QWebEngineView_CreateWindow(this, handle__CreateWindow, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWebEngineView* virtualbase_CreateWindow(int typeVal) { + + return QWebEngineView::createWindow(static_cast(typeVal)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QWebEngineView::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QWebEngineView_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QWebEngineView::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QWebEngineView::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QWebEngineView_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QWebEngineView::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QWebEngineView::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QWebEngineView_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QWebEngineView::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* param1) override { + if (handle__HideEvent == 0) { + QWebEngineView::hideEvent(param1); + return; + } + + QHideEvent* sigval1 = param1; + + miqt_exec_callback_QWebEngineView_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* param1) { + + QWebEngineView::hideEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QWebEngineView::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QWebEngineView_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QWebEngineView::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* e) override { + if (handle__DragEnterEvent == 0) { + QWebEngineView::dragEnterEvent(e); + return; + } + + QDragEnterEvent* sigval1 = e; + + miqt_exec_callback_QWebEngineView_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* e) { + + QWebEngineView::dragEnterEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* e) override { + if (handle__DragLeaveEvent == 0) { + QWebEngineView::dragLeaveEvent(e); + return; + } + + QDragLeaveEvent* sigval1 = e; + + miqt_exec_callback_QWebEngineView_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* e) { + + QWebEngineView::dragLeaveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* e) override { + if (handle__DragMoveEvent == 0) { + QWebEngineView::dragMoveEvent(e); + return; + } + + QDragMoveEvent* sigval1 = e; + + miqt_exec_callback_QWebEngineView_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* e) { + + QWebEngineView::dragMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* e) override { + if (handle__DropEvent == 0) { + QWebEngineView::dropEvent(e); + return; + } + + QDropEvent* sigval1 = e; + + miqt_exec_callback_QWebEngineView_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* e) { + + QWebEngineView::dropEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QWebEngineView::devType(); + } + + + int callback_return_value = miqt_exec_callback_QWebEngineView_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QWebEngineView::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QWebEngineView::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QWebEngineView_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QWebEngineView::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QWebEngineView::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWebEngineView_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QWebEngineView::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QWebEngineView::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QWebEngineView_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QWebEngineView::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QWebEngineView::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QWebEngineView_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QWebEngineView::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QWebEngineView::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QWebEngineView_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QWebEngineView::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QWebEngineView::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QWebEngineView::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QWebEngineView::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QWebEngineView::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QWebEngineView::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QWebEngineView::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QWebEngineView::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QWebEngineView::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QWebEngineView::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QWebEngineView::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QWebEngineView::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QWebEngineView::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QWebEngineView::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QWebEngineView::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QWebEngineView::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QWebEngineView::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QWebEngineView::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QWebEngineView::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QWebEngineView::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QWebEngineView::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QWebEngineView::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QWebEngineView::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QWebEngineView::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QWebEngineView::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QWebEngineView::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QWebEngineView::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QWebEngineView::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QWebEngineView::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QWebEngineView::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QWebEngineView::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QWebEngineView::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QWebEngineView::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QWebEngineView::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QWebEngineView_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QWebEngineView::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QWebEngineView::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QWebEngineView_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QWebEngineView::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QWebEngineView::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QWebEngineView_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QWebEngineView::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QWebEngineView::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QWebEngineView_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QWebEngineView::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QWebEngineView::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QWebEngineView_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QWebEngineView::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QWebEngineView::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QWebEngineView_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QWebEngineView::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QWebEngineView::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QWebEngineView_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QWebEngineView::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QWebEngineView::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QWebEngineView_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QWebEngineView::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QWebEngineView::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QWebEngineView_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QWebEngineView::focusNextPrevChild(next); + + } + +}; + +void QWebEngineView_new(QWidget* parent, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWebEngineView* ret = new MiqtVirtualQWebEngineView(parent); + *outptr_QWebEngineView = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QWebEngineView_new2(QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWebEngineView* ret = new MiqtVirtualQWebEngineView(); + *outptr_QWebEngineView = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QWebEngineView_MetaObject(const QWebEngineView* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineView_Metacast(QWebEngineView* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineView_Tr(const char* s) { + QString _ret = QWebEngineView::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineView_TrUtf8(const char* s) { + QString _ret = QWebEngineView::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QWebEnginePage* QWebEngineView_Page(const QWebEngineView* self) { + return self->page(); +} + +void QWebEngineView_SetPage(QWebEngineView* self, QWebEnginePage* page) { + self->setPage(page); +} + +void QWebEngineView_Load(QWebEngineView* self, QUrl* url) { + self->load(*url); +} + +void QWebEngineView_LoadWithRequest(QWebEngineView* self, QWebEngineHttpRequest* request) { + self->load(*request); +} + +void QWebEngineView_SetHtml(QWebEngineView* self, struct miqt_string html) { + QString html_QString = QString::fromUtf8(html.data, html.len); + self->setHtml(html_QString); +} + +void QWebEngineView_SetContent(QWebEngineView* self, struct miqt_string data) { + QByteArray data_QByteArray(data.data, data.len); + self->setContent(data_QByteArray); +} + +QWebEngineHistory* QWebEngineView_History(const QWebEngineView* self) { + return self->history(); +} + +struct miqt_string QWebEngineView_Title(const QWebEngineView* self) { + QString _ret = self->title(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineView_SetUrl(QWebEngineView* self, QUrl* url) { + self->setUrl(*url); +} + +QUrl* QWebEngineView_Url(const QWebEngineView* self) { + return new QUrl(self->url()); +} + +QUrl* QWebEngineView_IconUrl(const QWebEngineView* self) { + return new QUrl(self->iconUrl()); +} + +QIcon* QWebEngineView_Icon(const QWebEngineView* self) { + return new QIcon(self->icon()); +} + +bool QWebEngineView_HasSelection(const QWebEngineView* self) { + return self->hasSelection(); +} + +struct miqt_string QWebEngineView_SelectedText(const QWebEngineView* self) { + QString _ret = self->selectedText(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QAction* QWebEngineView_PageAction(const QWebEngineView* self, int action) { + return self->pageAction(static_cast(action)); +} + +void QWebEngineView_TriggerPageAction(QWebEngineView* self, int action) { + self->triggerPageAction(static_cast(action)); +} + +double QWebEngineView_ZoomFactor(const QWebEngineView* self) { + qreal _ret = self->zoomFactor(); + return static_cast(_ret); +} + +void QWebEngineView_SetZoomFactor(QWebEngineView* self, double factor) { + self->setZoomFactor(static_cast(factor)); +} + +void QWebEngineView_FindText(QWebEngineView* self, struct miqt_string subString) { + QString subString_QString = QString::fromUtf8(subString.data, subString.len); + self->findText(subString_QString); +} + +QSize* QWebEngineView_SizeHint(const QWebEngineView* self) { + return new QSize(self->sizeHint()); +} + +QWebEngineSettings* QWebEngineView_Settings(const QWebEngineView* self) { + return self->settings(); +} + +void QWebEngineView_Stop(QWebEngineView* self) { + self->stop(); +} + +void QWebEngineView_Back(QWebEngineView* self) { + self->back(); +} + +void QWebEngineView_Forward(QWebEngineView* self) { + self->forward(); +} + +void QWebEngineView_Reload(QWebEngineView* self) { + self->reload(); +} + +void QWebEngineView_LoadStarted(QWebEngineView* self) { + self->loadStarted(); +} + +void QWebEngineView_connect_LoadStarted(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::loadStarted), self, [=]() { + miqt_exec_callback_QWebEngineView_LoadStarted(slot); + }); +} + +void QWebEngineView_LoadProgress(QWebEngineView* self, int progress) { + self->loadProgress(static_cast(progress)); +} + +void QWebEngineView_connect_LoadProgress(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::loadProgress), self, [=](int progress) { + int sigval1 = progress; + miqt_exec_callback_QWebEngineView_LoadProgress(slot, sigval1); + }); +} + +void QWebEngineView_LoadFinished(QWebEngineView* self, bool param1) { + self->loadFinished(param1); +} + +void QWebEngineView_connect_LoadFinished(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::loadFinished), self, [=](bool param1) { + bool sigval1 = param1; + miqt_exec_callback_QWebEngineView_LoadFinished(slot, sigval1); + }); +} + +void QWebEngineView_TitleChanged(QWebEngineView* self, struct miqt_string title) { + QString title_QString = QString::fromUtf8(title.data, title.len); + self->titleChanged(title_QString); +} + +void QWebEngineView_connect_TitleChanged(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::titleChanged), self, [=](const QString& title) { + const QString title_ret = title; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray title_b = title_ret.toUtf8(); + struct miqt_string title_ms; + title_ms.len = title_b.length(); + title_ms.data = static_cast(malloc(title_ms.len)); + memcpy(title_ms.data, title_b.data(), title_ms.len); + struct miqt_string sigval1 = title_ms; + miqt_exec_callback_QWebEngineView_TitleChanged(slot, sigval1); + }); +} + +void QWebEngineView_SelectionChanged(QWebEngineView* self) { + self->selectionChanged(); +} + +void QWebEngineView_connect_SelectionChanged(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::selectionChanged), self, [=]() { + miqt_exec_callback_QWebEngineView_SelectionChanged(slot); + }); +} + +void QWebEngineView_UrlChanged(QWebEngineView* self, QUrl* param1) { + self->urlChanged(*param1); +} + +void QWebEngineView_connect_UrlChanged(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::urlChanged), self, [=](const QUrl& param1) { + const QUrl& param1_ret = param1; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(¶m1_ret); + miqt_exec_callback_QWebEngineView_UrlChanged(slot, sigval1); + }); +} + +void QWebEngineView_IconUrlChanged(QWebEngineView* self, QUrl* param1) { + self->iconUrlChanged(*param1); +} + +void QWebEngineView_connect_IconUrlChanged(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::iconUrlChanged), self, [=](const QUrl& param1) { + const QUrl& param1_ret = param1; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(¶m1_ret); + miqt_exec_callback_QWebEngineView_IconUrlChanged(slot, sigval1); + }); +} + +void QWebEngineView_IconChanged(QWebEngineView* self, QIcon* param1) { + self->iconChanged(*param1); +} + +void QWebEngineView_connect_IconChanged(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::iconChanged), self, [=](const QIcon& param1) { + const QIcon& param1_ret = param1; + // Cast returned reference into pointer + QIcon* sigval1 = const_cast(¶m1_ret); + miqt_exec_callback_QWebEngineView_IconChanged(slot, sigval1); + }); +} + +void QWebEngineView_RenderProcessTerminated(QWebEngineView* self, int terminationStatus, int exitCode) { + self->renderProcessTerminated(static_cast(terminationStatus), static_cast(exitCode)); +} + +void QWebEngineView_connect_RenderProcessTerminated(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::renderProcessTerminated), self, [=](QWebEnginePage::RenderProcessTerminationStatus terminationStatus, int exitCode) { + QWebEnginePage::RenderProcessTerminationStatus terminationStatus_ret = terminationStatus; + int sigval1 = static_cast(terminationStatus_ret); + int sigval2 = exitCode; + miqt_exec_callback_QWebEngineView_RenderProcessTerminated(slot, sigval1, sigval2); + }); +} + +struct miqt_string QWebEngineView_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineView::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineView_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineView::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineView_TrUtf82(const char* s, const char* c) { + QString _ret = QWebEngineView::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineView_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebEngineView::trUtf8(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineView_SetHtml2(QWebEngineView* self, struct miqt_string html, QUrl* baseUrl) { + QString html_QString = QString::fromUtf8(html.data, html.len); + self->setHtml(html_QString, *baseUrl); +} + +void QWebEngineView_SetContent2(QWebEngineView* self, struct miqt_string data, struct miqt_string mimeType) { + QByteArray data_QByteArray(data.data, data.len); + QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); + self->setContent(data_QByteArray, mimeType_QString); +} + +void QWebEngineView_SetContent3(QWebEngineView* self, struct miqt_string data, struct miqt_string mimeType, QUrl* baseUrl) { + QByteArray data_QByteArray(data.data, data.len); + QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); + self->setContent(data_QByteArray, mimeType_QString, *baseUrl); +} + +void QWebEngineView_TriggerPageAction2(QWebEngineView* self, int action, bool checked) { + self->triggerPageAction(static_cast(action), checked); +} + +void QWebEngineView_FindText2(QWebEngineView* self, struct miqt_string subString, int options) { + QString subString_QString = QString::fromUtf8(subString.data, subString.len); + self->findText(subString_QString, static_cast(options)); +} + +void QWebEngineView_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__SizeHint = slot; +} + +QSize* QWebEngineView_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_SizeHint(); +} + +void QWebEngineView_override_virtual_CreateWindow(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__CreateWindow = slot; +} + +QWebEngineView* QWebEngineView_virtualbase_CreateWindow(void* self, int typeVal) { + return ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_CreateWindow(typeVal); +} + +void QWebEngineView_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__ContextMenuEvent = slot; +} + +void QWebEngineView_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QWebEngineView_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__Event = slot; +} + +bool QWebEngineView_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_Event(param1); +} + +void QWebEngineView_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__ShowEvent = slot; +} + +void QWebEngineView_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_ShowEvent(param1); +} + +void QWebEngineView_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__HideEvent = slot; +} + +void QWebEngineView_virtualbase_HideEvent(void* self, QHideEvent* param1) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_HideEvent(param1); +} + +void QWebEngineView_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__CloseEvent = slot; +} + +void QWebEngineView_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_CloseEvent(param1); +} + +void QWebEngineView_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__DragEnterEvent = slot; +} + +void QWebEngineView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_DragEnterEvent(e); +} + +void QWebEngineView_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__DragLeaveEvent = slot; +} + +void QWebEngineView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_DragLeaveEvent(e); +} + +void QWebEngineView_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__DragMoveEvent = slot; +} + +void QWebEngineView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_DragMoveEvent(e); +} + +void QWebEngineView_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__DropEvent = slot; +} + +void QWebEngineView_virtualbase_DropEvent(void* self, QDropEvent* e) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_DropEvent(e); +} + +void QWebEngineView_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__DevType = slot; +} + +int QWebEngineView_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_DevType(); +} + +void QWebEngineView_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__SetVisible = slot; +} + +void QWebEngineView_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_SetVisible(visible); +} + +void QWebEngineView_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QWebEngineView_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QWebEngineView_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__HeightForWidth = slot; +} + +int QWebEngineView_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QWebEngineView_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QWebEngineView_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QWebEngineView_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QWebEngineView_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_PaintEngine(); +} + +void QWebEngineView_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__MousePressEvent = slot; +} + +void QWebEngineView_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_MousePressEvent(event); +} + +void QWebEngineView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QWebEngineView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QWebEngineView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QWebEngineView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QWebEngineView_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__MouseMoveEvent = slot; +} + +void QWebEngineView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QWebEngineView_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__WheelEvent = slot; +} + +void QWebEngineView_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_WheelEvent(event); +} + +void QWebEngineView_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__KeyPressEvent = slot; +} + +void QWebEngineView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QWebEngineView_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QWebEngineView_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QWebEngineView_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__FocusInEvent = slot; +} + +void QWebEngineView_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_FocusInEvent(event); +} + +void QWebEngineView_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__FocusOutEvent = slot; +} + +void QWebEngineView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QWebEngineView_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__EnterEvent = slot; +} + +void QWebEngineView_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_EnterEvent(event); +} + +void QWebEngineView_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__LeaveEvent = slot; +} + +void QWebEngineView_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_LeaveEvent(event); +} + +void QWebEngineView_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__PaintEvent = slot; +} + +void QWebEngineView_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_PaintEvent(event); +} + +void QWebEngineView_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__MoveEvent = slot; +} + +void QWebEngineView_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_MoveEvent(event); +} + +void QWebEngineView_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__ResizeEvent = slot; +} + +void QWebEngineView_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_ResizeEvent(event); +} + +void QWebEngineView_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__TabletEvent = slot; +} + +void QWebEngineView_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_TabletEvent(event); +} + +void QWebEngineView_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__ActionEvent = slot; +} + +void QWebEngineView_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_ActionEvent(event); +} + +void QWebEngineView_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__NativeEvent = slot; +} + +bool QWebEngineView_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QWebEngineView_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__ChangeEvent = slot; +} + +void QWebEngineView_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QWebEngineView_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__Metric = slot; +} + +int QWebEngineView_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_Metric(param1); +} + +void QWebEngineView_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__InitPainter = slot; +} + +void QWebEngineView_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_InitPainter(painter); +} + +void QWebEngineView_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QWebEngineView_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_Redirected(offset); +} + +void QWebEngineView_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QWebEngineView_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_SharedPainter(); +} + +void QWebEngineView_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__InputMethodEvent = slot; +} + +void QWebEngineView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QWebEngineView_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QWebEngineView_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QWebEngineView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QWebEngineView_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QWebEngineView_Delete(QWebEngineView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webengine/gen_qwebengineview.go b/qt/webengine/gen_qwebengineview.go new file mode 100644 index 00000000..72d934c8 --- /dev/null +++ b/qt/webengine/gen_qwebengineview.go @@ -0,0 +1,1511 @@ +package webengine + +/* + +#include "gen_qwebengineview.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebEngineView struct { + h *C.QWebEngineView + isSubclass bool + *qt.QWidget +} + +func (this *QWebEngineView) cPointer() *C.QWebEngineView { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineView) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineView constructs the type using only CGO pointers. +func newQWebEngineView(h *C.QWebEngineView, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QWebEngineView { + if h == nil { + return nil + } + return &QWebEngineView{h: h, + QWidget: qt.UnsafeNewQWidget(unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} +} + +// UnsafeNewQWebEngineView constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineView(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QWebEngineView { + if h == nil { + return nil + } + + return &QWebEngineView{h: (*C.QWebEngineView)(h), + QWidget: qt.UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +} + +// NewQWebEngineView constructs a new QWebEngineView object. +func NewQWebEngineView(parent *qt.QWidget) *QWebEngineView { + var outptr_QWebEngineView *C.QWebEngineView = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWebEngineView_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QWebEngineView, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWebEngineView(outptr_QWebEngineView, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQWebEngineView2 constructs a new QWebEngineView object. +func NewQWebEngineView2() *QWebEngineView { + var outptr_QWebEngineView *C.QWebEngineView = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWebEngineView_new2(&outptr_QWebEngineView, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWebEngineView(outptr_QWebEngineView, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineView) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineView_MetaObject(this.h))) +} + +func (this *QWebEngineView) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineView_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineView_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineView_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineView_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineView_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineView) Page() *QWebEnginePage { + return UnsafeNewQWebEnginePage(unsafe.Pointer(C.QWebEngineView_Page(this.h)), nil) +} + +func (this *QWebEngineView) SetPage(page *QWebEnginePage) { + C.QWebEngineView_SetPage(this.h, page.cPointer()) +} + +func (this *QWebEngineView) Load(url *qt.QUrl) { + C.QWebEngineView_Load(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QWebEngineView) LoadWithRequest(request *QWebEngineHttpRequest) { + C.QWebEngineView_LoadWithRequest(this.h, request.cPointer()) +} + +func (this *QWebEngineView) SetHtml(html string) { + html_ms := C.struct_miqt_string{} + html_ms.data = C.CString(html) + html_ms.len = C.size_t(len(html)) + defer C.free(unsafe.Pointer(html_ms.data)) + C.QWebEngineView_SetHtml(this.h, html_ms) +} + +func (this *QWebEngineView) SetContent(data []byte) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + C.QWebEngineView_SetContent(this.h, data_alias) +} + +func (this *QWebEngineView) History() *QWebEngineHistory { + return UnsafeNewQWebEngineHistory(unsafe.Pointer(C.QWebEngineView_History(this.h))) +} + +func (this *QWebEngineView) Title() string { + var _ms C.struct_miqt_string = C.QWebEngineView_Title(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineView) SetUrl(url *qt.QUrl) { + C.QWebEngineView_SetUrl(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QWebEngineView) Url() *qt.QUrl { + _ret := C.QWebEngineView_Url(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineView) IconUrl() *qt.QUrl { + _ret := C.QWebEngineView_IconUrl(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineView) Icon() *qt.QIcon { + _ret := C.QWebEngineView_Icon(this.h) + _goptr := qt.UnsafeNewQIcon(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineView) HasSelection() bool { + return (bool)(C.QWebEngineView_HasSelection(this.h)) +} + +func (this *QWebEngineView) SelectedText() string { + var _ms C.struct_miqt_string = C.QWebEngineView_SelectedText(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineView) PageAction(action QWebEnginePage__WebAction) *qt.QAction { + return qt.UnsafeNewQAction(unsafe.Pointer(C.QWebEngineView_PageAction(this.h, (C.int)(action))), nil) +} + +func (this *QWebEngineView) TriggerPageAction(action QWebEnginePage__WebAction) { + C.QWebEngineView_TriggerPageAction(this.h, (C.int)(action)) +} + +func (this *QWebEngineView) ZoomFactor() float64 { + return (float64)(C.QWebEngineView_ZoomFactor(this.h)) +} + +func (this *QWebEngineView) SetZoomFactor(factor float64) { + C.QWebEngineView_SetZoomFactor(this.h, (C.double)(factor)) +} + +func (this *QWebEngineView) FindText(subString string) { + subString_ms := C.struct_miqt_string{} + subString_ms.data = C.CString(subString) + subString_ms.len = C.size_t(len(subString)) + defer C.free(unsafe.Pointer(subString_ms.data)) + C.QWebEngineView_FindText(this.h, subString_ms) +} + +func (this *QWebEngineView) SizeHint() *qt.QSize { + _ret := C.QWebEngineView_SizeHint(this.h) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineView) Settings() *QWebEngineSettings { + return UnsafeNewQWebEngineSettings(unsafe.Pointer(C.QWebEngineView_Settings(this.h))) +} + +func (this *QWebEngineView) Stop() { + C.QWebEngineView_Stop(this.h) +} + +func (this *QWebEngineView) Back() { + C.QWebEngineView_Back(this.h) +} + +func (this *QWebEngineView) Forward() { + C.QWebEngineView_Forward(this.h) +} + +func (this *QWebEngineView) Reload() { + C.QWebEngineView_Reload(this.h) +} + +func (this *QWebEngineView) LoadStarted() { + C.QWebEngineView_LoadStarted(this.h) +} +func (this *QWebEngineView) OnLoadStarted(slot func()) { + C.QWebEngineView_connect_LoadStarted(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_LoadStarted +func miqt_exec_callback_QWebEngineView_LoadStarted(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEngineView) LoadProgress(progress int) { + C.QWebEngineView_LoadProgress(this.h, (C.int)(progress)) +} +func (this *QWebEngineView) OnLoadProgress(slot func(progress int)) { + C.QWebEngineView_connect_LoadProgress(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_LoadProgress +func miqt_exec_callback_QWebEngineView_LoadProgress(cb C.intptr_t, progress C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(progress int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(progress) + + gofunc(slotval1) +} + +func (this *QWebEngineView) LoadFinished(param1 bool) { + C.QWebEngineView_LoadFinished(this.h, (C.bool)(param1)) +} +func (this *QWebEngineView) OnLoadFinished(slot func(param1 bool)) { + C.QWebEngineView_connect_LoadFinished(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_LoadFinished +func miqt_exec_callback_QWebEngineView_LoadFinished(cb C.intptr_t, param1 C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(param1) + + gofunc(slotval1) +} + +func (this *QWebEngineView) TitleChanged(title string) { + title_ms := C.struct_miqt_string{} + title_ms.data = C.CString(title) + title_ms.len = C.size_t(len(title)) + defer C.free(unsafe.Pointer(title_ms.data)) + C.QWebEngineView_TitleChanged(this.h, title_ms) +} +func (this *QWebEngineView) OnTitleChanged(slot func(title string)) { + C.QWebEngineView_connect_TitleChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_TitleChanged +func miqt_exec_callback_QWebEngineView_TitleChanged(cb C.intptr_t, title C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(title string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var title_ms C.struct_miqt_string = title + title_ret := C.GoStringN(title_ms.data, C.int(int64(title_ms.len))) + C.free(unsafe.Pointer(title_ms.data)) + slotval1 := title_ret + + gofunc(slotval1) +} + +func (this *QWebEngineView) SelectionChanged() { + C.QWebEngineView_SelectionChanged(this.h) +} +func (this *QWebEngineView) OnSelectionChanged(slot func()) { + C.QWebEngineView_connect_SelectionChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_SelectionChanged +func miqt_exec_callback_QWebEngineView_SelectionChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEngineView) UrlChanged(param1 *qt.QUrl) { + C.QWebEngineView_UrlChanged(this.h, (*C.QUrl)(param1.UnsafePointer())) +} +func (this *QWebEngineView) OnUrlChanged(slot func(param1 *qt.QUrl)) { + C.QWebEngineView_connect_UrlChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_UrlChanged +func miqt_exec_callback_QWebEngineView_UrlChanged(cb C.intptr_t, param1 *C.QUrl) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 *qt.QUrl)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(param1)) + + gofunc(slotval1) +} + +func (this *QWebEngineView) IconUrlChanged(param1 *qt.QUrl) { + C.QWebEngineView_IconUrlChanged(this.h, (*C.QUrl)(param1.UnsafePointer())) +} +func (this *QWebEngineView) OnIconUrlChanged(slot func(param1 *qt.QUrl)) { + C.QWebEngineView_connect_IconUrlChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_IconUrlChanged +func miqt_exec_callback_QWebEngineView_IconUrlChanged(cb C.intptr_t, param1 *C.QUrl) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 *qt.QUrl)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(param1)) + + gofunc(slotval1) +} + +func (this *QWebEngineView) IconChanged(param1 *qt.QIcon) { + C.QWebEngineView_IconChanged(this.h, (*C.QIcon)(param1.UnsafePointer())) +} +func (this *QWebEngineView) OnIconChanged(slot func(param1 *qt.QIcon)) { + C.QWebEngineView_connect_IconChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_IconChanged +func miqt_exec_callback_QWebEngineView_IconChanged(cb C.intptr_t, param1 *C.QIcon) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 *qt.QIcon)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQIcon(unsafe.Pointer(param1)) + + gofunc(slotval1) +} + +func (this *QWebEngineView) RenderProcessTerminated(terminationStatus QWebEnginePage__RenderProcessTerminationStatus, exitCode int) { + C.QWebEngineView_RenderProcessTerminated(this.h, (C.int)(terminationStatus), (C.int)(exitCode)) +} +func (this *QWebEngineView) OnRenderProcessTerminated(slot func(terminationStatus QWebEnginePage__RenderProcessTerminationStatus, exitCode int)) { + C.QWebEngineView_connect_RenderProcessTerminated(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_RenderProcessTerminated +func miqt_exec_callback_QWebEngineView_RenderProcessTerminated(cb C.intptr_t, terminationStatus C.int, exitCode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(terminationStatus QWebEnginePage__RenderProcessTerminationStatus, exitCode int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebEnginePage__RenderProcessTerminationStatus)(terminationStatus) + + slotval2 := (int)(exitCode) + + gofunc(slotval1, slotval2) +} + +func QWebEngineView_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineView_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineView_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineView_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineView_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineView_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineView_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineView_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineView) SetHtml2(html string, baseUrl *qt.QUrl) { + html_ms := C.struct_miqt_string{} + html_ms.data = C.CString(html) + html_ms.len = C.size_t(len(html)) + defer C.free(unsafe.Pointer(html_ms.data)) + C.QWebEngineView_SetHtml2(this.h, html_ms, (*C.QUrl)(baseUrl.UnsafePointer())) +} + +func (this *QWebEngineView) SetContent2(data []byte, mimeType string) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + mimeType_ms := C.struct_miqt_string{} + mimeType_ms.data = C.CString(mimeType) + mimeType_ms.len = C.size_t(len(mimeType)) + defer C.free(unsafe.Pointer(mimeType_ms.data)) + C.QWebEngineView_SetContent2(this.h, data_alias, mimeType_ms) +} + +func (this *QWebEngineView) SetContent3(data []byte, mimeType string, baseUrl *qt.QUrl) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + mimeType_ms := C.struct_miqt_string{} + mimeType_ms.data = C.CString(mimeType) + mimeType_ms.len = C.size_t(len(mimeType)) + defer C.free(unsafe.Pointer(mimeType_ms.data)) + C.QWebEngineView_SetContent3(this.h, data_alias, mimeType_ms, (*C.QUrl)(baseUrl.UnsafePointer())) +} + +func (this *QWebEngineView) TriggerPageAction2(action QWebEnginePage__WebAction, checked bool) { + C.QWebEngineView_TriggerPageAction2(this.h, (C.int)(action), (C.bool)(checked)) +} + +func (this *QWebEngineView) FindText2(subString string, options QWebEnginePage__FindFlag) { + subString_ms := C.struct_miqt_string{} + subString_ms.data = C.CString(subString) + subString_ms.len = C.size_t(len(subString)) + defer C.free(unsafe.Pointer(subString_ms.data)) + C.QWebEngineView_FindText2(this.h, subString_ms, (C.int)(options)) +} + +func (this *QWebEngineView) callVirtualBase_SizeHint() *qt.QSize { + + _ret := C.QWebEngineView_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWebEngineView) OnSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QWebEngineView_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_SizeHint +func miqt_exec_callback_QWebEngineView_SizeHint(self *C.QWebEngineView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebEngineView) callVirtualBase_CreateWindow(typeVal QWebEnginePage__WebWindowType) *QWebEngineView { + + return UnsafeNewQWebEngineView(unsafe.Pointer(C.QWebEngineView_virtualbase_CreateWindow(unsafe.Pointer(this.h), (C.int)(typeVal))), nil, nil, nil) +} +func (this *QWebEngineView) OnCreateWindow(slot func(super func(typeVal QWebEnginePage__WebWindowType) *QWebEngineView, typeVal QWebEnginePage__WebWindowType) *QWebEngineView) { + C.QWebEngineView_override_virtual_CreateWindow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_CreateWindow +func miqt_exec_callback_QWebEngineView_CreateWindow(self *C.QWebEngineView, cb C.intptr_t, typeVal C.int) *C.QWebEngineView { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(typeVal QWebEnginePage__WebWindowType) *QWebEngineView, typeVal QWebEnginePage__WebWindowType) *QWebEngineView) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebEnginePage__WebWindowType)(typeVal) + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_CreateWindow, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QWebEngineView) callVirtualBase_ContextMenuEvent(param1 *qt.QContextMenuEvent) { + + C.QWebEngineView_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(param1.UnsafePointer())) + +} +func (this *QWebEngineView) OnContextMenuEvent(slot func(super func(param1 *qt.QContextMenuEvent), param1 *qt.QContextMenuEvent)) { + C.QWebEngineView_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_ContextMenuEvent +func miqt_exec_callback_QWebEngineView_ContextMenuEvent(self *C.QWebEngineView, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QContextMenuEvent), param1 *qt.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_Event(param1 *qt.QEvent) bool { + + return (bool)(C.QWebEngineView_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer()))) + +} +func (this *QWebEngineView) OnEvent(slot func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) { + C.QWebEngineView_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_Event +func miqt_exec_callback_QWebEngineView_Event(self *C.QWebEngineView, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEngineView) callVirtualBase_ShowEvent(param1 *qt.QShowEvent) { + + C.QWebEngineView_virtualbase_ShowEvent(unsafe.Pointer(this.h), (*C.QShowEvent)(param1.UnsafePointer())) + +} +func (this *QWebEngineView) OnShowEvent(slot func(super func(param1 *qt.QShowEvent), param1 *qt.QShowEvent)) { + C.QWebEngineView_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_ShowEvent +func miqt_exec_callback_QWebEngineView_ShowEvent(self *C.QWebEngineView, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QShowEvent), param1 *qt.QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_HideEvent(param1 *qt.QHideEvent) { + + C.QWebEngineView_virtualbase_HideEvent(unsafe.Pointer(this.h), (*C.QHideEvent)(param1.UnsafePointer())) + +} +func (this *QWebEngineView) OnHideEvent(slot func(super func(param1 *qt.QHideEvent), param1 *qt.QHideEvent)) { + C.QWebEngineView_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_HideEvent +func miqt_exec_callback_QWebEngineView_HideEvent(self *C.QWebEngineView, cb C.intptr_t, param1 *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QHideEvent), param1 *qt.QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_CloseEvent(param1 *qt.QCloseEvent) { + + C.QWebEngineView_virtualbase_CloseEvent(unsafe.Pointer(this.h), (*C.QCloseEvent)(param1.UnsafePointer())) + +} +func (this *QWebEngineView) OnCloseEvent(slot func(super func(param1 *qt.QCloseEvent), param1 *qt.QCloseEvent)) { + C.QWebEngineView_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_CloseEvent +func miqt_exec_callback_QWebEngineView_CloseEvent(self *C.QWebEngineView, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QCloseEvent), param1 *qt.QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_DragEnterEvent(e *qt.QDragEnterEvent) { + + C.QWebEngineView_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), (*C.QDragEnterEvent)(e.UnsafePointer())) + +} +func (this *QWebEngineView) OnDragEnterEvent(slot func(super func(e *qt.QDragEnterEvent), e *qt.QDragEnterEvent)) { + C.QWebEngineView_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_DragEnterEvent +func miqt_exec_callback_QWebEngineView_DragEnterEvent(self *C.QWebEngineView, cb C.intptr_t, e *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QDragEnterEvent), e *qt.QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(e), nil, nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_DragLeaveEvent(e *qt.QDragLeaveEvent) { + + C.QWebEngineView_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), (*C.QDragLeaveEvent)(e.UnsafePointer())) + +} +func (this *QWebEngineView) OnDragLeaveEvent(slot func(super func(e *qt.QDragLeaveEvent), e *qt.QDragLeaveEvent)) { + C.QWebEngineView_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_DragLeaveEvent +func miqt_exec_callback_QWebEngineView_DragLeaveEvent(self *C.QWebEngineView, cb C.intptr_t, e *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QDragLeaveEvent), e *qt.QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_DragMoveEvent(e *qt.QDragMoveEvent) { + + C.QWebEngineView_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), (*C.QDragMoveEvent)(e.UnsafePointer())) + +} +func (this *QWebEngineView) OnDragMoveEvent(slot func(super func(e *qt.QDragMoveEvent), e *qt.QDragMoveEvent)) { + C.QWebEngineView_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_DragMoveEvent +func miqt_exec_callback_QWebEngineView_DragMoveEvent(self *C.QWebEngineView, cb C.intptr_t, e *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QDragMoveEvent), e *qt.QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_DropEvent(e *qt.QDropEvent) { + + C.QWebEngineView_virtualbase_DropEvent(unsafe.Pointer(this.h), (*C.QDropEvent)(e.UnsafePointer())) + +} +func (this *QWebEngineView) OnDropEvent(slot func(super func(e *qt.QDropEvent), e *qt.QDropEvent)) { + C.QWebEngineView_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_DropEvent +func miqt_exec_callback_QWebEngineView_DropEvent(self *C.QWebEngineView, cb C.intptr_t, e *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QDropEvent), e *qt.QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_DevType() int { + + return (int)(C.QWebEngineView_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QWebEngineView) OnDevType(slot func(super func() int) int) { + C.QWebEngineView_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_DevType +func miqt_exec_callback_QWebEngineView_DevType(self *C.QWebEngineView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QWebEngineView) callVirtualBase_SetVisible(visible bool) { + + C.QWebEngineView_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QWebEngineView) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QWebEngineView_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_SetVisible +func miqt_exec_callback_QWebEngineView_SetVisible(self *C.QWebEngineView, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_MinimumSizeHint() *qt.QSize { + + _ret := C.QWebEngineView_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWebEngineView) OnMinimumSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QWebEngineView_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_MinimumSizeHint +func miqt_exec_callback_QWebEngineView_MinimumSizeHint(self *C.QWebEngineView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_MinimumSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebEngineView) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QWebEngineView_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWebEngineView) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QWebEngineView_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_HeightForWidth +func miqt_exec_callback_QWebEngineView_HeightForWidth(self *C.QWebEngineView, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWebEngineView) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QWebEngineView_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QWebEngineView) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QWebEngineView_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_HasHeightForWidth +func miqt_exec_callback_QWebEngineView_HasHeightForWidth(self *C.QWebEngineView, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEngineView) callVirtualBase_PaintEngine() *qt.QPaintEngine { + + return qt.UnsafeNewQPaintEngine(unsafe.Pointer(C.QWebEngineView_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QWebEngineView) OnPaintEngine(slot func(super func() *qt.QPaintEngine) *qt.QPaintEngine) { + C.QWebEngineView_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_PaintEngine +func miqt_exec_callback_QWebEngineView_PaintEngine(self *C.QWebEngineView, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QPaintEngine) *qt.QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_PaintEngine) + + return (*C.QPaintEngine)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebEngineView) callVirtualBase_MousePressEvent(event *qt.QMouseEvent) { + + C.QWebEngineView_virtualbase_MousePressEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnMousePressEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.QWebEngineView_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_MousePressEvent +func miqt_exec_callback_QWebEngineView_MousePressEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_MouseReleaseEvent(event *qt.QMouseEvent) { + + C.QWebEngineView_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnMouseReleaseEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.QWebEngineView_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_MouseReleaseEvent +func miqt_exec_callback_QWebEngineView_MouseReleaseEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_MouseDoubleClickEvent(event *qt.QMouseEvent) { + + C.QWebEngineView_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnMouseDoubleClickEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.QWebEngineView_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_MouseDoubleClickEvent +func miqt_exec_callback_QWebEngineView_MouseDoubleClickEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_MouseMoveEvent(event *qt.QMouseEvent) { + + C.QWebEngineView_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnMouseMoveEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.QWebEngineView_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_MouseMoveEvent +func miqt_exec_callback_QWebEngineView_MouseMoveEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_WheelEvent(event *qt.QWheelEvent) { + + C.QWebEngineView_virtualbase_WheelEvent(unsafe.Pointer(this.h), (*C.QWheelEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnWheelEvent(slot func(super func(event *qt.QWheelEvent), event *qt.QWheelEvent)) { + C.QWebEngineView_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_WheelEvent +func miqt_exec_callback_QWebEngineView_WheelEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QWheelEvent), event *qt.QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_KeyPressEvent(event *qt.QKeyEvent) { + + C.QWebEngineView_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnKeyPressEvent(slot func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) { + C.QWebEngineView_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_KeyPressEvent +func miqt_exec_callback_QWebEngineView_KeyPressEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_KeyReleaseEvent(event *qt.QKeyEvent) { + + C.QWebEngineView_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnKeyReleaseEvent(slot func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) { + C.QWebEngineView_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_KeyReleaseEvent +func miqt_exec_callback_QWebEngineView_KeyReleaseEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_FocusInEvent(event *qt.QFocusEvent) { + + C.QWebEngineView_virtualbase_FocusInEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnFocusInEvent(slot func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) { + C.QWebEngineView_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_FocusInEvent +func miqt_exec_callback_QWebEngineView_FocusInEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_FocusOutEvent(event *qt.QFocusEvent) { + + C.QWebEngineView_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnFocusOutEvent(slot func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) { + C.QWebEngineView_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_FocusOutEvent +func miqt_exec_callback_QWebEngineView_FocusOutEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_EnterEvent(event *qt.QEvent) { + + C.QWebEngineView_virtualbase_EnterEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnEnterEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QWebEngineView_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_EnterEvent +func miqt_exec_callback_QWebEngineView_EnterEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_LeaveEvent(event *qt.QEvent) { + + C.QWebEngineView_virtualbase_LeaveEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnLeaveEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QWebEngineView_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_LeaveEvent +func miqt_exec_callback_QWebEngineView_LeaveEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_PaintEvent(event *qt.QPaintEvent) { + + C.QWebEngineView_virtualbase_PaintEvent(unsafe.Pointer(this.h), (*C.QPaintEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnPaintEvent(slot func(super func(event *qt.QPaintEvent), event *qt.QPaintEvent)) { + C.QWebEngineView_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_PaintEvent +func miqt_exec_callback_QWebEngineView_PaintEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QPaintEvent), event *qt.QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_MoveEvent(event *qt.QMoveEvent) { + + C.QWebEngineView_virtualbase_MoveEvent(unsafe.Pointer(this.h), (*C.QMoveEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnMoveEvent(slot func(super func(event *qt.QMoveEvent), event *qt.QMoveEvent)) { + C.QWebEngineView_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_MoveEvent +func miqt_exec_callback_QWebEngineView_MoveEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMoveEvent), event *qt.QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_ResizeEvent(event *qt.QResizeEvent) { + + C.QWebEngineView_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnResizeEvent(slot func(super func(event *qt.QResizeEvent), event *qt.QResizeEvent)) { + C.QWebEngineView_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_ResizeEvent +func miqt_exec_callback_QWebEngineView_ResizeEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QResizeEvent), event *qt.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_TabletEvent(event *qt.QTabletEvent) { + + C.QWebEngineView_virtualbase_TabletEvent(unsafe.Pointer(this.h), (*C.QTabletEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnTabletEvent(slot func(super func(event *qt.QTabletEvent), event *qt.QTabletEvent)) { + C.QWebEngineView_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_TabletEvent +func miqt_exec_callback_QWebEngineView_TabletEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTabletEvent), event *qt.QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_ActionEvent(event *qt.QActionEvent) { + + C.QWebEngineView_virtualbase_ActionEvent(unsafe.Pointer(this.h), (*C.QActionEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnActionEvent(slot func(super func(event *qt.QActionEvent), event *qt.QActionEvent)) { + C.QWebEngineView_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_ActionEvent +func miqt_exec_callback_QWebEngineView_ActionEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QActionEvent), event *qt.QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QWebEngineView_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QWebEngineView) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QWebEngineView_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_NativeEvent +func miqt_exec_callback_QWebEngineView_NativeEvent(self *C.QWebEngineView, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEngineView) callVirtualBase_ChangeEvent(param1 *qt.QEvent) { + + C.QWebEngineView_virtualbase_ChangeEvent(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer())) + +} +func (this *QWebEngineView) OnChangeEvent(slot func(super func(param1 *qt.QEvent), param1 *qt.QEvent)) { + C.QWebEngineView_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_ChangeEvent +func miqt_exec_callback_QWebEngineView_ChangeEvent(self *C.QWebEngineView, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QEvent), param1 *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_Metric(param1 qt.QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QWebEngineView_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWebEngineView) OnMetric(slot func(super func(param1 qt.QPaintDevice__PaintDeviceMetric) int, param1 qt.QPaintDevice__PaintDeviceMetric) int) { + C.QWebEngineView_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_Metric +func miqt_exec_callback_QWebEngineView_Metric(self *C.QWebEngineView, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt.QPaintDevice__PaintDeviceMetric) int, param1 qt.QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWebEngineView) callVirtualBase_InitPainter(painter *qt.QPainter) { + + C.QWebEngineView_virtualbase_InitPainter(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer())) + +} +func (this *QWebEngineView) OnInitPainter(slot func(super func(painter *qt.QPainter), painter *qt.QPainter)) { + C.QWebEngineView_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_InitPainter +func miqt_exec_callback_QWebEngineView_InitPainter(self *C.QWebEngineView, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt.QPainter), painter *qt.QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_Redirected(offset *qt.QPoint) *qt.QPaintDevice { + + return qt.UnsafeNewQPaintDevice(unsafe.Pointer(C.QWebEngineView_virtualbase_Redirected(unsafe.Pointer(this.h), (*C.QPoint)(offset.UnsafePointer())))) +} +func (this *QWebEngineView) OnRedirected(slot func(super func(offset *qt.QPoint) *qt.QPaintDevice, offset *qt.QPoint) *qt.QPaintDevice) { + C.QWebEngineView_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_Redirected +func miqt_exec_callback_QWebEngineView_Redirected(self *C.QWebEngineView, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *qt.QPoint) *qt.QPaintDevice, offset *qt.QPoint) *qt.QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_Redirected, slotval1) + + return (*C.QPaintDevice)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebEngineView) callVirtualBase_SharedPainter() *qt.QPainter { + + return qt.UnsafeNewQPainter(unsafe.Pointer(C.QWebEngineView_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QWebEngineView) OnSharedPainter(slot func(super func() *qt.QPainter) *qt.QPainter) { + C.QWebEngineView_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_SharedPainter +func miqt_exec_callback_QWebEngineView_SharedPainter(self *C.QWebEngineView, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QPainter) *qt.QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_SharedPainter) + + return (*C.QPainter)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebEngineView) callVirtualBase_InputMethodEvent(param1 *qt.QInputMethodEvent) { + + C.QWebEngineView_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), (*C.QInputMethodEvent)(param1.UnsafePointer())) + +} +func (this *QWebEngineView) OnInputMethodEvent(slot func(super func(param1 *qt.QInputMethodEvent), param1 *qt.QInputMethodEvent)) { + C.QWebEngineView_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_InputMethodEvent +func miqt_exec_callback_QWebEngineView_InputMethodEvent(self *C.QWebEngineView, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QInputMethodEvent), param1 *qt.QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_InputMethodQuery(param1 qt.InputMethodQuery) *qt.QVariant { + + _ret := C.QWebEngineView_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWebEngineView) OnInputMethodQuery(slot func(super func(param1 qt.InputMethodQuery) *qt.QVariant, param1 qt.InputMethodQuery) *qt.QVariant) { + C.QWebEngineView_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_InputMethodQuery +func miqt_exec_callback_QWebEngineView_InputMethodQuery(self *C.QWebEngineView, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt.InputMethodQuery) *qt.QVariant, param1 qt.InputMethodQuery) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.InputMethodQuery)(param1) + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebEngineView) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QWebEngineView_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QWebEngineView) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QWebEngineView_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_FocusNextPrevChild +func miqt_exec_callback_QWebEngineView_FocusNextPrevChild(self *C.QWebEngineView, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +// Delete this object from C++ memory. +func (this *QWebEngineView) Delete() { + C.QWebEngineView_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineView) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineView) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webengine/gen_qwebengineview.h b/qt/webengine/gen_qwebengineview.h new file mode 100644 index 00000000..082e785e --- /dev/null +++ b/qt/webengine/gen_qwebengineview.h @@ -0,0 +1,251 @@ +#pragma once +#ifndef MIQT_QT_WEBENGINE_GEN_QWEBENGINEVIEW_H +#define MIQT_QT_WEBENGINE_GEN_QWEBENGINEVIEW_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QAction; +class QActionEvent; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QIcon; +class QInputMethodEvent; +class QKeyEvent; +class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; +class QSize; +class QTabletEvent; +class QUrl; +class QVariant; +class QWebEngineHistory; +class QWebEngineHttpRequest; +class QWebEnginePage; +class QWebEngineSettings; +class QWebEngineView; +class QWheelEvent; +class QWidget; +#else +typedef struct QAction QAction; +typedef struct QActionEvent QActionEvent; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QIcon QIcon; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; +typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QUrl QUrl; +typedef struct QVariant QVariant; +typedef struct QWebEngineHistory QWebEngineHistory; +typedef struct QWebEngineHttpRequest QWebEngineHttpRequest; +typedef struct QWebEnginePage QWebEnginePage; +typedef struct QWebEngineSettings QWebEngineSettings; +typedef struct QWebEngineView QWebEngineView; +typedef struct QWheelEvent QWheelEvent; +typedef struct QWidget QWidget; +#endif + +void QWebEngineView_new(QWidget* parent, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QWebEngineView_new2(QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QMetaObject* QWebEngineView_MetaObject(const QWebEngineView* self); +void* QWebEngineView_Metacast(QWebEngineView* self, const char* param1); +struct miqt_string QWebEngineView_Tr(const char* s); +struct miqt_string QWebEngineView_TrUtf8(const char* s); +QWebEnginePage* QWebEngineView_Page(const QWebEngineView* self); +void QWebEngineView_SetPage(QWebEngineView* self, QWebEnginePage* page); +void QWebEngineView_Load(QWebEngineView* self, QUrl* url); +void QWebEngineView_LoadWithRequest(QWebEngineView* self, QWebEngineHttpRequest* request); +void QWebEngineView_SetHtml(QWebEngineView* self, struct miqt_string html); +void QWebEngineView_SetContent(QWebEngineView* self, struct miqt_string data); +QWebEngineHistory* QWebEngineView_History(const QWebEngineView* self); +struct miqt_string QWebEngineView_Title(const QWebEngineView* self); +void QWebEngineView_SetUrl(QWebEngineView* self, QUrl* url); +QUrl* QWebEngineView_Url(const QWebEngineView* self); +QUrl* QWebEngineView_IconUrl(const QWebEngineView* self); +QIcon* QWebEngineView_Icon(const QWebEngineView* self); +bool QWebEngineView_HasSelection(const QWebEngineView* self); +struct miqt_string QWebEngineView_SelectedText(const QWebEngineView* self); +QAction* QWebEngineView_PageAction(const QWebEngineView* self, int action); +void QWebEngineView_TriggerPageAction(QWebEngineView* self, int action); +double QWebEngineView_ZoomFactor(const QWebEngineView* self); +void QWebEngineView_SetZoomFactor(QWebEngineView* self, double factor); +void QWebEngineView_FindText(QWebEngineView* self, struct miqt_string subString); +QSize* QWebEngineView_SizeHint(const QWebEngineView* self); +QWebEngineSettings* QWebEngineView_Settings(const QWebEngineView* self); +void QWebEngineView_Stop(QWebEngineView* self); +void QWebEngineView_Back(QWebEngineView* self); +void QWebEngineView_Forward(QWebEngineView* self); +void QWebEngineView_Reload(QWebEngineView* self); +void QWebEngineView_LoadStarted(QWebEngineView* self); +void QWebEngineView_connect_LoadStarted(QWebEngineView* self, intptr_t slot); +void QWebEngineView_LoadProgress(QWebEngineView* self, int progress); +void QWebEngineView_connect_LoadProgress(QWebEngineView* self, intptr_t slot); +void QWebEngineView_LoadFinished(QWebEngineView* self, bool param1); +void QWebEngineView_connect_LoadFinished(QWebEngineView* self, intptr_t slot); +void QWebEngineView_TitleChanged(QWebEngineView* self, struct miqt_string title); +void QWebEngineView_connect_TitleChanged(QWebEngineView* self, intptr_t slot); +void QWebEngineView_SelectionChanged(QWebEngineView* self); +void QWebEngineView_connect_SelectionChanged(QWebEngineView* self, intptr_t slot); +void QWebEngineView_UrlChanged(QWebEngineView* self, QUrl* param1); +void QWebEngineView_connect_UrlChanged(QWebEngineView* self, intptr_t slot); +void QWebEngineView_IconUrlChanged(QWebEngineView* self, QUrl* param1); +void QWebEngineView_connect_IconUrlChanged(QWebEngineView* self, intptr_t slot); +void QWebEngineView_IconChanged(QWebEngineView* self, QIcon* param1); +void QWebEngineView_connect_IconChanged(QWebEngineView* self, intptr_t slot); +void QWebEngineView_RenderProcessTerminated(QWebEngineView* self, int terminationStatus, int exitCode); +void QWebEngineView_connect_RenderProcessTerminated(QWebEngineView* self, intptr_t slot); +QWebEngineView* QWebEngineView_CreateWindow(QWebEngineView* self, int typeVal); +void QWebEngineView_ContextMenuEvent(QWebEngineView* self, QContextMenuEvent* param1); +bool QWebEngineView_Event(QWebEngineView* self, QEvent* param1); +void QWebEngineView_ShowEvent(QWebEngineView* self, QShowEvent* param1); +void QWebEngineView_HideEvent(QWebEngineView* self, QHideEvent* param1); +void QWebEngineView_CloseEvent(QWebEngineView* self, QCloseEvent* param1); +void QWebEngineView_DragEnterEvent(QWebEngineView* self, QDragEnterEvent* e); +void QWebEngineView_DragLeaveEvent(QWebEngineView* self, QDragLeaveEvent* e); +void QWebEngineView_DragMoveEvent(QWebEngineView* self, QDragMoveEvent* e); +void QWebEngineView_DropEvent(QWebEngineView* self, QDropEvent* e); +struct miqt_string QWebEngineView_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineView_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebEngineView_TrUtf82(const char* s, const char* c); +struct miqt_string QWebEngineView_TrUtf83(const char* s, const char* c, int n); +void QWebEngineView_SetHtml2(QWebEngineView* self, struct miqt_string html, QUrl* baseUrl); +void QWebEngineView_SetContent2(QWebEngineView* self, struct miqt_string data, struct miqt_string mimeType); +void QWebEngineView_SetContent3(QWebEngineView* self, struct miqt_string data, struct miqt_string mimeType, QUrl* baseUrl); +void QWebEngineView_TriggerPageAction2(QWebEngineView* self, int action, bool checked); +void QWebEngineView_FindText2(QWebEngineView* self, struct miqt_string subString, int options); +void QWebEngineView_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QWebEngineView_virtualbase_SizeHint(const void* self); +void QWebEngineView_override_virtual_CreateWindow(void* self, intptr_t slot); +QWebEngineView* QWebEngineView_virtualbase_CreateWindow(void* self, int typeVal); +void QWebEngineView_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QWebEngineView_override_virtual_Event(void* self, intptr_t slot); +bool QWebEngineView_virtualbase_Event(void* self, QEvent* param1); +void QWebEngineView_override_virtual_ShowEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QWebEngineView_override_virtual_HideEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_HideEvent(void* self, QHideEvent* param1); +void QWebEngineView_override_virtual_CloseEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QWebEngineView_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e); +void QWebEngineView_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e); +void QWebEngineView_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e); +void QWebEngineView_override_virtual_DropEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_DropEvent(void* self, QDropEvent* e); +void QWebEngineView_override_virtual_DevType(void* self, intptr_t slot); +int QWebEngineView_virtualbase_DevType(const void* self); +void QWebEngineView_override_virtual_SetVisible(void* self, intptr_t slot); +void QWebEngineView_virtualbase_SetVisible(void* self, bool visible); +void QWebEngineView_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QWebEngineView_virtualbase_MinimumSizeHint(const void* self); +void QWebEngineView_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QWebEngineView_virtualbase_HeightForWidth(const void* self, int param1); +void QWebEngineView_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QWebEngineView_virtualbase_HasHeightForWidth(const void* self); +void QWebEngineView_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QWebEngineView_virtualbase_PaintEngine(const void* self); +void QWebEngineView_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QWebEngineView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QWebEngineView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QWebEngineView_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QWebEngineView_override_virtual_WheelEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QWebEngineView_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QWebEngineView_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QWebEngineView_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QWebEngineView_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QWebEngineView_override_virtual_EnterEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_EnterEvent(void* self, QEvent* event); +void QWebEngineView_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_LeaveEvent(void* self, QEvent* event); +void QWebEngineView_override_virtual_PaintEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QWebEngineView_override_virtual_MoveEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QWebEngineView_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QWebEngineView_override_virtual_TabletEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QWebEngineView_override_virtual_ActionEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QWebEngineView_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QWebEngineView_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QWebEngineView_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QWebEngineView_override_virtual_Metric(void* self, intptr_t slot); +int QWebEngineView_virtualbase_Metric(const void* self, int param1); +void QWebEngineView_override_virtual_InitPainter(void* self, intptr_t slot); +void QWebEngineView_virtualbase_InitPainter(const void* self, QPainter* painter); +void QWebEngineView_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QWebEngineView_virtualbase_Redirected(const void* self, QPoint* offset); +void QWebEngineView_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QWebEngineView_virtualbase_SharedPainter(const void* self); +void QWebEngineView_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QWebEngineView_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QWebEngineView_virtualbase_InputMethodQuery(const void* self, int param1); +void QWebEngineView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QWebEngineView_virtualbase_FocusNextPrevChild(void* self, bool next); +void QWebEngineView_Delete(QWebEngineView* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/network/cflags.go b/qt6/network/cflags.go index 43683141..902d8379 100644 --- a/qt6/network/cflags.go +++ b/qt6/network/cflags.go @@ -1,4 +1,4 @@ -package qt6 +package network /* #cgo pkg-config: Qt6Network diff --git a/qt6/network/gen_qnetworkinformation.go b/qt6/network/gen_qnetworkinformation.go index b5a1dc07..786a3068 100644 --- a/qt6/network/gen_qnetworkinformation.go +++ b/qt6/network/gen_qnetworkinformation.go @@ -37,10 +37,10 @@ const ( type QNetworkInformation__Feature int const ( - QNetworkInformation__Reachability QNetworkInformation__Feature = 1 - QNetworkInformation__CaptivePortal QNetworkInformation__Feature = 2 - QNetworkInformation__TransportMedium QNetworkInformation__Feature = 4 - QNetworkInformation__Metered QNetworkInformation__Feature = 8 + QNetworkInformation__Feature__Reachability QNetworkInformation__Feature = 1 + QNetworkInformation__Feature__CaptivePortal QNetworkInformation__Feature = 2 + QNetworkInformation__Feature__TransportMedium QNetworkInformation__Feature = 4 + QNetworkInformation__Feature__Metered QNetworkInformation__Feature = 8 ) type QNetworkInformation struct { diff --git a/qt6/webchannel/cflags.go b/qt6/webchannel/cflags.go new file mode 100644 index 00000000..3b90586d --- /dev/null +++ b/qt6/webchannel/cflags.go @@ -0,0 +1,6 @@ +package webchannel + +/* +#cgo pkg-config: Qt6WebChannel +*/ +import "C" diff --git a/qt6/webchannel/gen_qqmlwebchannel.cpp b/qt6/webchannel/gen_qqmlwebchannel.cpp new file mode 100644 index 00000000..3691f859 --- /dev/null +++ b/qt6/webchannel/gen_qqmlwebchannel.cpp @@ -0,0 +1,95 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qqmlwebchannel.h" +#include "_cgo_export.h" + +void QQmlWebChannel_new(QQmlWebChannel** outptr_QQmlWebChannel, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject) { + QQmlWebChannel* ret = new QQmlWebChannel(); + *outptr_QQmlWebChannel = ret; + *outptr_QWebChannel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QQmlWebChannel_new2(QObject* parent, QQmlWebChannel** outptr_QQmlWebChannel, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject) { + QQmlWebChannel* ret = new QQmlWebChannel(parent); + *outptr_QQmlWebChannel = ret; + *outptr_QWebChannel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QQmlWebChannel_MetaObject(const QQmlWebChannel* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QQmlWebChannel_Metacast(QQmlWebChannel* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QQmlWebChannel_Tr(const char* s) { + QString _ret = QQmlWebChannel::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QQmlWebChannel_RegisterObjects(QQmlWebChannel* self, struct miqt_map /* of struct miqt_string to QVariant* */ objects) { + QVariantMap objects_QMap; + struct miqt_string* objects_karr = static_cast(objects.keys); + QVariant** objects_varr = static_cast(objects.values); + for(size_t i = 0; i < objects.len; ++i) { + QString objects_karr_i_QString = QString::fromUtf8(objects_karr[i].data, objects_karr[i].len); + objects_QMap[objects_karr_i_QString] = *(objects_varr[i]); + } + self->registerObjects(objects_QMap); +} + +void QQmlWebChannel_ConnectTo(QQmlWebChannel* self, QObject* transport) { + self->connectTo(transport); +} + +void QQmlWebChannel_DisconnectFrom(QQmlWebChannel* self, QObject* transport) { + self->disconnectFrom(transport); +} + +struct miqt_string QQmlWebChannel_Tr2(const char* s, const char* c) { + QString _ret = QQmlWebChannel::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QQmlWebChannel_Tr3(const char* s, const char* c, int n) { + QString _ret = QQmlWebChannel::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QQmlWebChannel_Delete(QQmlWebChannel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webchannel/gen_qqmlwebchannel.go b/qt6/webchannel/gen_qqmlwebchannel.go new file mode 100644 index 00000000..e87667fd --- /dev/null +++ b/qt6/webchannel/gen_qqmlwebchannel.go @@ -0,0 +1,164 @@ +package webchannel + +/* + +#include "gen_qqmlwebchannel.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "unsafe" +) + +type QQmlWebChannel struct { + h *C.QQmlWebChannel + isSubclass bool + *QWebChannel +} + +func (this *QQmlWebChannel) cPointer() *C.QQmlWebChannel { + if this == nil { + return nil + } + return this.h +} + +func (this *QQmlWebChannel) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQQmlWebChannel constructs the type using only CGO pointers. +func newQQmlWebChannel(h *C.QQmlWebChannel, h_QWebChannel *C.QWebChannel, h_QObject *C.QObject) *QQmlWebChannel { + if h == nil { + return nil + } + return &QQmlWebChannel{h: h, + QWebChannel: newQWebChannel(h_QWebChannel, h_QObject)} +} + +// UnsafeNewQQmlWebChannel constructs the type using only unsafe pointers. +func UnsafeNewQQmlWebChannel(h unsafe.Pointer, h_QWebChannel unsafe.Pointer, h_QObject unsafe.Pointer) *QQmlWebChannel { + if h == nil { + return nil + } + + return &QQmlWebChannel{h: (*C.QQmlWebChannel)(h), + QWebChannel: UnsafeNewQWebChannel(h_QWebChannel, h_QObject)} +} + +// NewQQmlWebChannel constructs a new QQmlWebChannel object. +func NewQQmlWebChannel() *QQmlWebChannel { + var outptr_QQmlWebChannel *C.QQmlWebChannel = nil + var outptr_QWebChannel *C.QWebChannel = nil + var outptr_QObject *C.QObject = nil + + C.QQmlWebChannel_new(&outptr_QQmlWebChannel, &outptr_QWebChannel, &outptr_QObject) + ret := newQQmlWebChannel(outptr_QQmlWebChannel, outptr_QWebChannel, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQQmlWebChannel2 constructs a new QQmlWebChannel object. +func NewQQmlWebChannel2(parent *qt6.QObject) *QQmlWebChannel { + var outptr_QQmlWebChannel *C.QQmlWebChannel = nil + var outptr_QWebChannel *C.QWebChannel = nil + var outptr_QObject *C.QObject = nil + + C.QQmlWebChannel_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QQmlWebChannel, &outptr_QWebChannel, &outptr_QObject) + ret := newQQmlWebChannel(outptr_QQmlWebChannel, outptr_QWebChannel, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QQmlWebChannel) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QQmlWebChannel_MetaObject(this.h))) +} + +func (this *QQmlWebChannel) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QQmlWebChannel_Metacast(this.h, param1_Cstring)) +} + +func QQmlWebChannel_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QQmlWebChannel_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QQmlWebChannel) RegisterObjects(objects map[string]qt6.QVariant) { + objects_Keys_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(objects)))) + defer C.free(unsafe.Pointer(objects_Keys_CArray)) + objects_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(objects)))) + defer C.free(unsafe.Pointer(objects_Values_CArray)) + objects_ctr := 0 + for objects_k, objects_v := range objects { + objects_k_ms := C.struct_miqt_string{} + objects_k_ms.data = C.CString(objects_k) + objects_k_ms.len = C.size_t(len(objects_k)) + defer C.free(unsafe.Pointer(objects_k_ms.data)) + objects_Keys_CArray[objects_ctr] = objects_k_ms + objects_Values_CArray[objects_ctr] = (*C.QVariant)(objects_v.UnsafePointer()) + objects_ctr++ + } + objects_mm := C.struct_miqt_map{ + len: C.size_t(len(objects)), + keys: unsafe.Pointer(objects_Keys_CArray), + values: unsafe.Pointer(objects_Values_CArray), + } + C.QQmlWebChannel_RegisterObjects(this.h, objects_mm) +} + +func (this *QQmlWebChannel) ConnectTo(transport *qt6.QObject) { + C.QQmlWebChannel_ConnectTo(this.h, (*C.QObject)(transport.UnsafePointer())) +} + +func (this *QQmlWebChannel) DisconnectFrom(transport *qt6.QObject) { + C.QQmlWebChannel_DisconnectFrom(this.h, (*C.QObject)(transport.UnsafePointer())) +} + +func QQmlWebChannel_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QQmlWebChannel_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QQmlWebChannel_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QQmlWebChannel_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// Delete this object from C++ memory. +func (this *QQmlWebChannel) Delete() { + C.QQmlWebChannel_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QQmlWebChannel) GoGC() { + runtime.SetFinalizer(this, func(this *QQmlWebChannel) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webchannel/gen_qqmlwebchannel.h b/qt6/webchannel/gen_qqmlwebchannel.h new file mode 100644 index 00000000..87f238db --- /dev/null +++ b/qt6/webchannel/gen_qqmlwebchannel.h @@ -0,0 +1,47 @@ +#pragma once +#ifndef MIQT_QT6_WEBCHANNEL_GEN_QQMLWEBCHANNEL_H +#define MIQT_QT6_WEBCHANNEL_GEN_QQMLWEBCHANNEL_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QMetaObject; +class QObject; +class QQmlWebChannel; +class QVariant; +class QWebChannel; +#else +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QQmlWebChannel QQmlWebChannel; +typedef struct QVariant QVariant; +typedef struct QWebChannel QWebChannel; +#endif + +void QQmlWebChannel_new(QQmlWebChannel** outptr_QQmlWebChannel, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject); +void QQmlWebChannel_new2(QObject* parent, QQmlWebChannel** outptr_QQmlWebChannel, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject); +QMetaObject* QQmlWebChannel_MetaObject(const QQmlWebChannel* self); +void* QQmlWebChannel_Metacast(QQmlWebChannel* self, const char* param1); +struct miqt_string QQmlWebChannel_Tr(const char* s); +void QQmlWebChannel_RegisterObjects(QQmlWebChannel* self, struct miqt_map /* of struct miqt_string to QVariant* */ objects); +void QQmlWebChannel_ConnectTo(QQmlWebChannel* self, QObject* transport); +void QQmlWebChannel_DisconnectFrom(QQmlWebChannel* self, QObject* transport); +struct miqt_string QQmlWebChannel_Tr2(const char* s, const char* c); +struct miqt_string QQmlWebChannel_Tr3(const char* s, const char* c, int n); +void QQmlWebChannel_Delete(QQmlWebChannel* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webchannel/gen_qwebchannel.cpp b/qt6/webchannel/gen_qwebchannel.cpp new file mode 100644 index 00000000..8b9d5cb6 --- /dev/null +++ b/qt6/webchannel/gen_qwebchannel.cpp @@ -0,0 +1,395 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebchannel.h" +#include "_cgo_export.h" + +class MiqtVirtualQWebChannel : public virtual QWebChannel { +public: + + MiqtVirtualQWebChannel(): QWebChannel() {}; + MiqtVirtualQWebChannel(QObject* parent): QWebChannel(parent) {}; + + virtual ~MiqtVirtualQWebChannel() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QWebChannel::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QWebChannel_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QWebChannel::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QWebChannel::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QWebChannel_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QWebChannel::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QWebChannel::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QWebChannel_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QWebChannel::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QWebChannel::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QWebChannel_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QWebChannel::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QWebChannel::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebChannel_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QWebChannel::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QWebChannel::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebChannel_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QWebChannel::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QWebChannel::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebChannel_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QWebChannel::disconnectNotify(*signal); + + } + +}; + +void QWebChannel_new(QWebChannel** outptr_QWebChannel, QObject** outptr_QObject) { + MiqtVirtualQWebChannel* ret = new MiqtVirtualQWebChannel(); + *outptr_QWebChannel = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebChannel_new2(QObject* parent, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject) { + MiqtVirtualQWebChannel* ret = new MiqtVirtualQWebChannel(parent); + *outptr_QWebChannel = ret; + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QWebChannel_MetaObject(const QWebChannel* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebChannel_Metacast(QWebChannel* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebChannel_Tr(const char* s) { + QString _ret = QWebChannel::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebChannel_RegisterObjects(QWebChannel* self, struct miqt_map /* of struct miqt_string to QObject* */ objects) { + QHash objects_QMap; + objects_QMap.reserve(objects.len); + struct miqt_string* objects_karr = static_cast(objects.keys); + QObject** objects_varr = static_cast(objects.values); + for(size_t i = 0; i < objects.len; ++i) { + QString objects_karr_i_QString = QString::fromUtf8(objects_karr[i].data, objects_karr[i].len); + objects_QMap[objects_karr_i_QString] = objects_varr[i]; + } + self->registerObjects(objects_QMap); +} + +struct miqt_map /* of struct miqt_string to QObject* */ QWebChannel_RegisteredObjects(const QWebChannel* self) { + QHash _ret = self->registeredObjects(); + // Convert QMap<> from C++ memory to manually-managed C memory + struct miqt_string* _karr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + QObject** _varr = static_cast(malloc(sizeof(QObject*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + QString _hashkey_ret = _itr->first; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _hashkey_b = _hashkey_ret.toUtf8(); + struct miqt_string _hashkey_ms; + _hashkey_ms.len = _hashkey_b.length(); + _hashkey_ms.data = static_cast(malloc(_hashkey_ms.len)); + memcpy(_hashkey_ms.data, _hashkey_b.data(), _hashkey_ms.len); + _karr[_ctr] = _hashkey_ms; + _varr[_ctr] = _itr->second; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; +} + +void QWebChannel_RegisterObject(QWebChannel* self, struct miqt_string id, QObject* object) { + QString id_QString = QString::fromUtf8(id.data, id.len); + self->registerObject(id_QString, object); +} + +void QWebChannel_DeregisterObject(QWebChannel* self, QObject* object) { + self->deregisterObject(object); +} + +bool QWebChannel_BlockUpdates(const QWebChannel* self) { + return self->blockUpdates(); +} + +void QWebChannel_SetBlockUpdates(QWebChannel* self, bool block) { + self->setBlockUpdates(block); +} + +int QWebChannel_PropertyUpdateInterval(const QWebChannel* self) { + return self->propertyUpdateInterval(); +} + +void QWebChannel_SetPropertyUpdateInterval(QWebChannel* self, int ms) { + self->setPropertyUpdateInterval(static_cast(ms)); +} + +void QWebChannel_BlockUpdatesChanged(QWebChannel* self, bool block) { + self->blockUpdatesChanged(block); +} + +void QWebChannel_connect_BlockUpdatesChanged(QWebChannel* self, intptr_t slot) { + MiqtVirtualQWebChannel::connect(self, static_cast(&QWebChannel::blockUpdatesChanged), self, [=](bool block) { + bool sigval1 = block; + miqt_exec_callback_QWebChannel_BlockUpdatesChanged(slot, sigval1); + }); +} + +void QWebChannel_ConnectTo(QWebChannel* self, QWebChannelAbstractTransport* transport) { + self->connectTo(transport); +} + +void QWebChannel_DisconnectFrom(QWebChannel* self, QWebChannelAbstractTransport* transport) { + self->disconnectFrom(transport); +} + +struct miqt_string QWebChannel_Tr2(const char* s, const char* c) { + QString _ret = QWebChannel::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebChannel_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebChannel::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebChannel_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWebChannel*)(self) )->handle__Event = slot; +} + +bool QWebChannel_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQWebChannel*)(self) )->virtualbase_Event(event); +} + +void QWebChannel_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWebChannel*)(self) )->handle__EventFilter = slot; +} + +bool QWebChannel_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQWebChannel*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QWebChannel_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebChannel*)(self) )->handle__TimerEvent = slot; +} + +void QWebChannel_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQWebChannel*)(self) )->virtualbase_TimerEvent(event); +} + +void QWebChannel_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebChannel*)(self) )->handle__ChildEvent = slot; +} + +void QWebChannel_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQWebChannel*)(self) )->virtualbase_ChildEvent(event); +} + +void QWebChannel_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebChannel*)(self) )->handle__CustomEvent = slot; +} + +void QWebChannel_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebChannel*)(self) )->virtualbase_CustomEvent(event); +} + +void QWebChannel_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebChannel*)(self) )->handle__ConnectNotify = slot; +} + +void QWebChannel_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebChannel*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QWebChannel_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebChannel*)(self) )->handle__DisconnectNotify = slot; +} + +void QWebChannel_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebChannel*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QWebChannel_Delete(QWebChannel* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webchannel/gen_qwebchannel.go b/qt6/webchannel/gen_qwebchannel.go new file mode 100644 index 00000000..00a4b4ac --- /dev/null +++ b/qt6/webchannel/gen_qwebchannel.go @@ -0,0 +1,393 @@ +package webchannel + +/* + +#include "gen_qwebchannel.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebChannel struct { + h *C.QWebChannel + isSubclass bool + *qt6.QObject +} + +func (this *QWebChannel) cPointer() *C.QWebChannel { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebChannel) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebChannel constructs the type using only CGO pointers. +func newQWebChannel(h *C.QWebChannel, h_QObject *C.QObject) *QWebChannel { + if h == nil { + return nil + } + return &QWebChannel{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebChannel constructs the type using only unsafe pointers. +func UnsafeNewQWebChannel(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebChannel { + if h == nil { + return nil + } + + return &QWebChannel{h: (*C.QWebChannel)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} +} + +// NewQWebChannel constructs a new QWebChannel object. +func NewQWebChannel() *QWebChannel { + var outptr_QWebChannel *C.QWebChannel = nil + var outptr_QObject *C.QObject = nil + + C.QWebChannel_new(&outptr_QWebChannel, &outptr_QObject) + ret := newQWebChannel(outptr_QWebChannel, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebChannel2 constructs a new QWebChannel object. +func NewQWebChannel2(parent *qt6.QObject) *QWebChannel { + var outptr_QWebChannel *C.QWebChannel = nil + var outptr_QObject *C.QObject = nil + + C.QWebChannel_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QWebChannel, &outptr_QObject) + ret := newQWebChannel(outptr_QWebChannel, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QWebChannel) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebChannel_MetaObject(this.h))) +} + +func (this *QWebChannel) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebChannel_Metacast(this.h, param1_Cstring)) +} + +func QWebChannel_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebChannel_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebChannel) RegisterObjects(objects map[string]*qt6.QObject) { + objects_Keys_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(objects)))) + defer C.free(unsafe.Pointer(objects_Keys_CArray)) + objects_Values_CArray := (*[0xffff]*C.QObject)(C.malloc(C.size_t(8 * len(objects)))) + defer C.free(unsafe.Pointer(objects_Values_CArray)) + objects_ctr := 0 + for objects_k, objects_v := range objects { + objects_k_ms := C.struct_miqt_string{} + objects_k_ms.data = C.CString(objects_k) + objects_k_ms.len = C.size_t(len(objects_k)) + defer C.free(unsafe.Pointer(objects_k_ms.data)) + objects_Keys_CArray[objects_ctr] = objects_k_ms + objects_Values_CArray[objects_ctr] = (*C.QObject)(objects_v.UnsafePointer()) + objects_ctr++ + } + objects_mm := C.struct_miqt_map{ + len: C.size_t(len(objects)), + keys: unsafe.Pointer(objects_Keys_CArray), + values: unsafe.Pointer(objects_Values_CArray), + } + C.QWebChannel_RegisterObjects(this.h, objects_mm) +} + +func (this *QWebChannel) RegisteredObjects() map[string]*qt6.QObject { + var _mm C.struct_miqt_map = C.QWebChannel_RegisteredObjects(this.h) + _ret := make(map[string]*qt6.QObject, int(_mm.len)) + _Keys := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QObject)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + var _hashkey_ms C.struct_miqt_string = _Keys[i] + _hashkey_ret := C.GoStringN(_hashkey_ms.data, C.int(int64(_hashkey_ms.len))) + C.free(unsafe.Pointer(_hashkey_ms.data)) + _entry_Key := _hashkey_ret + _entry_Value := qt6.UnsafeNewQObject(unsafe.Pointer(_Values[i])) + _ret[_entry_Key] = _entry_Value + } + return _ret +} + +func (this *QWebChannel) RegisterObject(id string, object *qt6.QObject) { + id_ms := C.struct_miqt_string{} + id_ms.data = C.CString(id) + id_ms.len = C.size_t(len(id)) + defer C.free(unsafe.Pointer(id_ms.data)) + C.QWebChannel_RegisterObject(this.h, id_ms, (*C.QObject)(object.UnsafePointer())) +} + +func (this *QWebChannel) DeregisterObject(object *qt6.QObject) { + C.QWebChannel_DeregisterObject(this.h, (*C.QObject)(object.UnsafePointer())) +} + +func (this *QWebChannel) BlockUpdates() bool { + return (bool)(C.QWebChannel_BlockUpdates(this.h)) +} + +func (this *QWebChannel) SetBlockUpdates(block bool) { + C.QWebChannel_SetBlockUpdates(this.h, (C.bool)(block)) +} + +func (this *QWebChannel) PropertyUpdateInterval() int { + return (int)(C.QWebChannel_PropertyUpdateInterval(this.h)) +} + +func (this *QWebChannel) SetPropertyUpdateInterval(ms int) { + C.QWebChannel_SetPropertyUpdateInterval(this.h, (C.int)(ms)) +} + +func (this *QWebChannel) BlockUpdatesChanged(block bool) { + C.QWebChannel_BlockUpdatesChanged(this.h, (C.bool)(block)) +} +func (this *QWebChannel) OnBlockUpdatesChanged(slot func(block bool)) { + C.QWebChannel_connect_BlockUpdatesChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannel_BlockUpdatesChanged +func miqt_exec_callback_QWebChannel_BlockUpdatesChanged(cb C.intptr_t, block C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(block bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(block) + + gofunc(slotval1) +} + +func (this *QWebChannel) ConnectTo(transport *QWebChannelAbstractTransport) { + C.QWebChannel_ConnectTo(this.h, transport.cPointer()) +} + +func (this *QWebChannel) DisconnectFrom(transport *QWebChannelAbstractTransport) { + C.QWebChannel_DisconnectFrom(this.h, transport.cPointer()) +} + +func QWebChannel_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebChannel_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebChannel_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebChannel_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebChannel) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QWebChannel_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebChannel) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QWebChannel_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannel_Event +func miqt_exec_callback_QWebChannel_Event(self *C.QWebChannel, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebChannel{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebChannel) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QWebChannel_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebChannel) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QWebChannel_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannel_EventFilter +func miqt_exec_callback_QWebChannel_EventFilter(self *C.QWebChannel, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebChannel{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebChannel) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QWebChannel_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QWebChannel) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QWebChannel_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannel_TimerEvent +func miqt_exec_callback_QWebChannel_TimerEvent(self *C.QWebChannel, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebChannel{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QWebChannel) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QWebChannel_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QWebChannel) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QWebChannel_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannel_ChildEvent +func miqt_exec_callback_QWebChannel_ChildEvent(self *C.QWebChannel, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebChannel{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QWebChannel) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QWebChannel_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebChannel) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QWebChannel_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannel_CustomEvent +func miqt_exec_callback_QWebChannel_CustomEvent(self *C.QWebChannel, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWebChannel{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QWebChannel) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QWebChannel_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebChannel) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QWebChannel_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannel_ConnectNotify +func miqt_exec_callback_QWebChannel_ConnectNotify(self *C.QWebChannel, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebChannel{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QWebChannel) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QWebChannel_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebChannel) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QWebChannel_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannel_DisconnectNotify +func miqt_exec_callback_QWebChannel_DisconnectNotify(self *C.QWebChannel, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebChannel{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QWebChannel) Delete() { + C.QWebChannel_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebChannel) GoGC() { + runtime.SetFinalizer(this, func(this *QWebChannel) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webchannel/gen_qwebchannel.h b/qt6/webchannel/gen_qwebchannel.h new file mode 100644 index 00000000..6285a298 --- /dev/null +++ b/qt6/webchannel/gen_qwebchannel.h @@ -0,0 +1,76 @@ +#pragma once +#ifndef MIQT_QT6_WEBCHANNEL_GEN_QWEBCHANNEL_H +#define MIQT_QT6_WEBCHANNEL_GEN_QWEBCHANNEL_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; +class QMetaObject; +class QObject; +class QTimerEvent; +class QWebChannel; +class QWebChannelAbstractTransport; +#else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; +typedef struct QWebChannel QWebChannel; +typedef struct QWebChannelAbstractTransport QWebChannelAbstractTransport; +#endif + +void QWebChannel_new(QWebChannel** outptr_QWebChannel, QObject** outptr_QObject); +void QWebChannel_new2(QObject* parent, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject); +QMetaObject* QWebChannel_MetaObject(const QWebChannel* self); +void* QWebChannel_Metacast(QWebChannel* self, const char* param1); +struct miqt_string QWebChannel_Tr(const char* s); +void QWebChannel_RegisterObjects(QWebChannel* self, struct miqt_map /* of struct miqt_string to QObject* */ objects); +struct miqt_map /* of struct miqt_string to QObject* */ QWebChannel_RegisteredObjects(const QWebChannel* self); +void QWebChannel_RegisterObject(QWebChannel* self, struct miqt_string id, QObject* object); +void QWebChannel_DeregisterObject(QWebChannel* self, QObject* object); +bool QWebChannel_BlockUpdates(const QWebChannel* self); +void QWebChannel_SetBlockUpdates(QWebChannel* self, bool block); +int QWebChannel_PropertyUpdateInterval(const QWebChannel* self); +void QWebChannel_SetPropertyUpdateInterval(QWebChannel* self, int ms); +void QWebChannel_BlockUpdatesChanged(QWebChannel* self, bool block); +void QWebChannel_connect_BlockUpdatesChanged(QWebChannel* self, intptr_t slot); +void QWebChannel_ConnectTo(QWebChannel* self, QWebChannelAbstractTransport* transport); +void QWebChannel_DisconnectFrom(QWebChannel* self, QWebChannelAbstractTransport* transport); +struct miqt_string QWebChannel_Tr2(const char* s, const char* c); +struct miqt_string QWebChannel_Tr3(const char* s, const char* c, int n); +void QWebChannel_override_virtual_Event(void* self, intptr_t slot); +bool QWebChannel_virtualbase_Event(void* self, QEvent* event); +void QWebChannel_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWebChannel_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QWebChannel_override_virtual_TimerEvent(void* self, intptr_t slot); +void QWebChannel_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QWebChannel_override_virtual_ChildEvent(void* self, intptr_t slot); +void QWebChannel_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QWebChannel_override_virtual_CustomEvent(void* self, intptr_t slot); +void QWebChannel_virtualbase_CustomEvent(void* self, QEvent* event); +void QWebChannel_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QWebChannel_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QWebChannel_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QWebChannel_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QWebChannel_Delete(QWebChannel* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webchannel/gen_qwebchannelabstracttransport.cpp b/qt6/webchannel/gen_qwebchannelabstracttransport.cpp new file mode 100644 index 00000000..c8a9b92c --- /dev/null +++ b/qt6/webchannel/gen_qwebchannelabstracttransport.cpp @@ -0,0 +1,353 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebchannelabstracttransport.h" +#include "_cgo_export.h" + +class MiqtVirtualQWebChannelAbstractTransport : public virtual QWebChannelAbstractTransport { +public: + + MiqtVirtualQWebChannelAbstractTransport(): QWebChannelAbstractTransport() {}; + MiqtVirtualQWebChannelAbstractTransport(QObject* parent): QWebChannelAbstractTransport(parent) {}; + + virtual ~MiqtVirtualQWebChannelAbstractTransport() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SendMessage = 0; + + // Subclass to allow providing a Go implementation + virtual void sendMessage(const QJsonObject& message) override { + if (handle__SendMessage == 0) { + return; // Pure virtual, there is no base we can call + } + + const QJsonObject& message_ret = message; + // Cast returned reference into pointer + QJsonObject* sigval1 = const_cast(&message_ret); + + miqt_exec_callback_QWebChannelAbstractTransport_SendMessage(this, handle__SendMessage, sigval1); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QWebChannelAbstractTransport::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QWebChannelAbstractTransport_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QWebChannelAbstractTransport::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QWebChannelAbstractTransport::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QWebChannelAbstractTransport_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QWebChannelAbstractTransport::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QWebChannelAbstractTransport::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QWebChannelAbstractTransport_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QWebChannelAbstractTransport::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QWebChannelAbstractTransport::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QWebChannelAbstractTransport_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QWebChannelAbstractTransport::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QWebChannelAbstractTransport::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebChannelAbstractTransport_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QWebChannelAbstractTransport::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QWebChannelAbstractTransport::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebChannelAbstractTransport_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QWebChannelAbstractTransport::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QWebChannelAbstractTransport::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebChannelAbstractTransport_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QWebChannelAbstractTransport::disconnectNotify(*signal); + + } + +}; + +void QWebChannelAbstractTransport_new(QWebChannelAbstractTransport** outptr_QWebChannelAbstractTransport, QObject** outptr_QObject) { + MiqtVirtualQWebChannelAbstractTransport* ret = new MiqtVirtualQWebChannelAbstractTransport(); + *outptr_QWebChannelAbstractTransport = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebChannelAbstractTransport_new2(QObject* parent, QWebChannelAbstractTransport** outptr_QWebChannelAbstractTransport, QObject** outptr_QObject) { + MiqtVirtualQWebChannelAbstractTransport* ret = new MiqtVirtualQWebChannelAbstractTransport(parent); + *outptr_QWebChannelAbstractTransport = ret; + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QWebChannelAbstractTransport_MetaObject(const QWebChannelAbstractTransport* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebChannelAbstractTransport_Metacast(QWebChannelAbstractTransport* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebChannelAbstractTransport_Tr(const char* s) { + QString _ret = QWebChannelAbstractTransport::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebChannelAbstractTransport_SendMessage(QWebChannelAbstractTransport* self, QJsonObject* message) { + self->sendMessage(*message); +} + +void QWebChannelAbstractTransport_MessageReceived(QWebChannelAbstractTransport* self, QJsonObject* message, QWebChannelAbstractTransport* transport) { + self->messageReceived(*message, transport); +} + +void QWebChannelAbstractTransport_connect_MessageReceived(QWebChannelAbstractTransport* self, intptr_t slot) { + MiqtVirtualQWebChannelAbstractTransport::connect(self, static_cast(&QWebChannelAbstractTransport::messageReceived), self, [=](const QJsonObject& message, QWebChannelAbstractTransport* transport) { + const QJsonObject& message_ret = message; + // Cast returned reference into pointer + QJsonObject* sigval1 = const_cast(&message_ret); + QWebChannelAbstractTransport* sigval2 = transport; + miqt_exec_callback_QWebChannelAbstractTransport_MessageReceived(slot, sigval1, sigval2); + }); +} + +struct miqt_string QWebChannelAbstractTransport_Tr2(const char* s, const char* c) { + QString _ret = QWebChannelAbstractTransport::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebChannelAbstractTransport_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebChannelAbstractTransport::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebChannelAbstractTransport_override_virtual_SendMessage(void* self, intptr_t slot) { + dynamic_cast( (QWebChannelAbstractTransport*)(self) )->handle__SendMessage = slot; +} + +void QWebChannelAbstractTransport_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWebChannelAbstractTransport*)(self) )->handle__Event = slot; +} + +bool QWebChannelAbstractTransport_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQWebChannelAbstractTransport*)(self) )->virtualbase_Event(event); +} + +void QWebChannelAbstractTransport_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWebChannelAbstractTransport*)(self) )->handle__EventFilter = slot; +} + +bool QWebChannelAbstractTransport_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQWebChannelAbstractTransport*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QWebChannelAbstractTransport_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebChannelAbstractTransport*)(self) )->handle__TimerEvent = slot; +} + +void QWebChannelAbstractTransport_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQWebChannelAbstractTransport*)(self) )->virtualbase_TimerEvent(event); +} + +void QWebChannelAbstractTransport_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebChannelAbstractTransport*)(self) )->handle__ChildEvent = slot; +} + +void QWebChannelAbstractTransport_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQWebChannelAbstractTransport*)(self) )->virtualbase_ChildEvent(event); +} + +void QWebChannelAbstractTransport_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebChannelAbstractTransport*)(self) )->handle__CustomEvent = slot; +} + +void QWebChannelAbstractTransport_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebChannelAbstractTransport*)(self) )->virtualbase_CustomEvent(event); +} + +void QWebChannelAbstractTransport_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebChannelAbstractTransport*)(self) )->handle__ConnectNotify = slot; +} + +void QWebChannelAbstractTransport_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebChannelAbstractTransport*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QWebChannelAbstractTransport_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebChannelAbstractTransport*)(self) )->handle__DisconnectNotify = slot; +} + +void QWebChannelAbstractTransport_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebChannelAbstractTransport*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QWebChannelAbstractTransport_Delete(QWebChannelAbstractTransport* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webchannel/gen_qwebchannelabstracttransport.go b/qt6/webchannel/gen_qwebchannelabstracttransport.go new file mode 100644 index 00000000..09b651ee --- /dev/null +++ b/qt6/webchannel/gen_qwebchannelabstracttransport.go @@ -0,0 +1,340 @@ +package webchannel + +/* + +#include "gen_qwebchannelabstracttransport.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebChannelAbstractTransport struct { + h *C.QWebChannelAbstractTransport + isSubclass bool + *qt6.QObject +} + +func (this *QWebChannelAbstractTransport) cPointer() *C.QWebChannelAbstractTransport { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebChannelAbstractTransport) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebChannelAbstractTransport constructs the type using only CGO pointers. +func newQWebChannelAbstractTransport(h *C.QWebChannelAbstractTransport, h_QObject *C.QObject) *QWebChannelAbstractTransport { + if h == nil { + return nil + } + return &QWebChannelAbstractTransport{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebChannelAbstractTransport constructs the type using only unsafe pointers. +func UnsafeNewQWebChannelAbstractTransport(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebChannelAbstractTransport { + if h == nil { + return nil + } + + return &QWebChannelAbstractTransport{h: (*C.QWebChannelAbstractTransport)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} +} + +// NewQWebChannelAbstractTransport constructs a new QWebChannelAbstractTransport object. +func NewQWebChannelAbstractTransport() *QWebChannelAbstractTransport { + var outptr_QWebChannelAbstractTransport *C.QWebChannelAbstractTransport = nil + var outptr_QObject *C.QObject = nil + + C.QWebChannelAbstractTransport_new(&outptr_QWebChannelAbstractTransport, &outptr_QObject) + ret := newQWebChannelAbstractTransport(outptr_QWebChannelAbstractTransport, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebChannelAbstractTransport2 constructs a new QWebChannelAbstractTransport object. +func NewQWebChannelAbstractTransport2(parent *qt6.QObject) *QWebChannelAbstractTransport { + var outptr_QWebChannelAbstractTransport *C.QWebChannelAbstractTransport = nil + var outptr_QObject *C.QObject = nil + + C.QWebChannelAbstractTransport_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QWebChannelAbstractTransport, &outptr_QObject) + ret := newQWebChannelAbstractTransport(outptr_QWebChannelAbstractTransport, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QWebChannelAbstractTransport) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebChannelAbstractTransport_MetaObject(this.h))) +} + +func (this *QWebChannelAbstractTransport) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebChannelAbstractTransport_Metacast(this.h, param1_Cstring)) +} + +func QWebChannelAbstractTransport_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebChannelAbstractTransport_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebChannelAbstractTransport) SendMessage(message *qt6.QJsonObject) { + C.QWebChannelAbstractTransport_SendMessage(this.h, (*C.QJsonObject)(message.UnsafePointer())) +} + +func (this *QWebChannelAbstractTransport) MessageReceived(message *qt6.QJsonObject, transport *QWebChannelAbstractTransport) { + C.QWebChannelAbstractTransport_MessageReceived(this.h, (*C.QJsonObject)(message.UnsafePointer()), transport.cPointer()) +} +func (this *QWebChannelAbstractTransport) OnMessageReceived(slot func(message *qt6.QJsonObject, transport *QWebChannelAbstractTransport)) { + C.QWebChannelAbstractTransport_connect_MessageReceived(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannelAbstractTransport_MessageReceived +func miqt_exec_callback_QWebChannelAbstractTransport_MessageReceived(cb C.intptr_t, message *C.QJsonObject, transport *C.QWebChannelAbstractTransport) { + gofunc, ok := cgo.Handle(cb).Value().(func(message *qt6.QJsonObject, transport *QWebChannelAbstractTransport)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQJsonObject(unsafe.Pointer(message)) + slotval2 := UnsafeNewQWebChannelAbstractTransport(unsafe.Pointer(transport), nil) + + gofunc(slotval1, slotval2) +} + +func QWebChannelAbstractTransport_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebChannelAbstractTransport_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebChannelAbstractTransport_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebChannelAbstractTransport_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QWebChannelAbstractTransport) OnSendMessage(slot func(message *qt6.QJsonObject)) { + C.QWebChannelAbstractTransport_override_virtual_SendMessage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannelAbstractTransport_SendMessage +func miqt_exec_callback_QWebChannelAbstractTransport_SendMessage(self *C.QWebChannelAbstractTransport, cb C.intptr_t, message *C.QJsonObject) { + gofunc, ok := cgo.Handle(cb).Value().(func(message *qt6.QJsonObject)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQJsonObject(unsafe.Pointer(message)) + + gofunc(slotval1) + +} + +func (this *QWebChannelAbstractTransport) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QWebChannelAbstractTransport_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebChannelAbstractTransport) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QWebChannelAbstractTransport_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannelAbstractTransport_Event +func miqt_exec_callback_QWebChannelAbstractTransport_Event(self *C.QWebChannelAbstractTransport, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebChannelAbstractTransport{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebChannelAbstractTransport) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QWebChannelAbstractTransport_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebChannelAbstractTransport) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QWebChannelAbstractTransport_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannelAbstractTransport_EventFilter +func miqt_exec_callback_QWebChannelAbstractTransport_EventFilter(self *C.QWebChannelAbstractTransport, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebChannelAbstractTransport{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebChannelAbstractTransport) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QWebChannelAbstractTransport_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QWebChannelAbstractTransport) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QWebChannelAbstractTransport_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannelAbstractTransport_TimerEvent +func miqt_exec_callback_QWebChannelAbstractTransport_TimerEvent(self *C.QWebChannelAbstractTransport, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebChannelAbstractTransport{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QWebChannelAbstractTransport) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QWebChannelAbstractTransport_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QWebChannelAbstractTransport) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QWebChannelAbstractTransport_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannelAbstractTransport_ChildEvent +func miqt_exec_callback_QWebChannelAbstractTransport_ChildEvent(self *C.QWebChannelAbstractTransport, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebChannelAbstractTransport{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QWebChannelAbstractTransport) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QWebChannelAbstractTransport_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebChannelAbstractTransport) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QWebChannelAbstractTransport_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannelAbstractTransport_CustomEvent +func miqt_exec_callback_QWebChannelAbstractTransport_CustomEvent(self *C.QWebChannelAbstractTransport, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWebChannelAbstractTransport{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QWebChannelAbstractTransport) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QWebChannelAbstractTransport_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebChannelAbstractTransport) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QWebChannelAbstractTransport_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannelAbstractTransport_ConnectNotify +func miqt_exec_callback_QWebChannelAbstractTransport_ConnectNotify(self *C.QWebChannelAbstractTransport, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebChannelAbstractTransport{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QWebChannelAbstractTransport) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QWebChannelAbstractTransport_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebChannelAbstractTransport) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QWebChannelAbstractTransport_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebChannelAbstractTransport_DisconnectNotify +func miqt_exec_callback_QWebChannelAbstractTransport_DisconnectNotify(self *C.QWebChannelAbstractTransport, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebChannelAbstractTransport{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QWebChannelAbstractTransport) Delete() { + C.QWebChannelAbstractTransport_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebChannelAbstractTransport) GoGC() { + runtime.SetFinalizer(this, func(this *QWebChannelAbstractTransport) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webchannel/gen_qwebchannelabstracttransport.h b/qt6/webchannel/gen_qwebchannelabstracttransport.h new file mode 100644 index 00000000..ad7702ad --- /dev/null +++ b/qt6/webchannel/gen_qwebchannelabstracttransport.h @@ -0,0 +1,69 @@ +#pragma once +#ifndef MIQT_QT6_WEBCHANNEL_GEN_QWEBCHANNELABSTRACTTRANSPORT_H +#define MIQT_QT6_WEBCHANNEL_GEN_QWEBCHANNELABSTRACTTRANSPORT_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QChildEvent; +class QEvent; +class QJsonObject; +class QMetaMethod; +class QMetaObject; +class QObject; +class QTimerEvent; +class QWebChannelAbstractTransport; +#else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QJsonObject QJsonObject; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; +typedef struct QWebChannelAbstractTransport QWebChannelAbstractTransport; +#endif + +void QWebChannelAbstractTransport_new(QWebChannelAbstractTransport** outptr_QWebChannelAbstractTransport, QObject** outptr_QObject); +void QWebChannelAbstractTransport_new2(QObject* parent, QWebChannelAbstractTransport** outptr_QWebChannelAbstractTransport, QObject** outptr_QObject); +QMetaObject* QWebChannelAbstractTransport_MetaObject(const QWebChannelAbstractTransport* self); +void* QWebChannelAbstractTransport_Metacast(QWebChannelAbstractTransport* self, const char* param1); +struct miqt_string QWebChannelAbstractTransport_Tr(const char* s); +void QWebChannelAbstractTransport_SendMessage(QWebChannelAbstractTransport* self, QJsonObject* message); +void QWebChannelAbstractTransport_MessageReceived(QWebChannelAbstractTransport* self, QJsonObject* message, QWebChannelAbstractTransport* transport); +void QWebChannelAbstractTransport_connect_MessageReceived(QWebChannelAbstractTransport* self, intptr_t slot); +struct miqt_string QWebChannelAbstractTransport_Tr2(const char* s, const char* c); +struct miqt_string QWebChannelAbstractTransport_Tr3(const char* s, const char* c, int n); +void QWebChannelAbstractTransport_override_virtual_SendMessage(void* self, intptr_t slot); +void QWebChannelAbstractTransport_virtualbase_SendMessage(void* self, QJsonObject* message); +void QWebChannelAbstractTransport_override_virtual_Event(void* self, intptr_t slot); +bool QWebChannelAbstractTransport_virtualbase_Event(void* self, QEvent* event); +void QWebChannelAbstractTransport_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWebChannelAbstractTransport_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QWebChannelAbstractTransport_override_virtual_TimerEvent(void* self, intptr_t slot); +void QWebChannelAbstractTransport_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QWebChannelAbstractTransport_override_virtual_ChildEvent(void* self, intptr_t slot); +void QWebChannelAbstractTransport_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QWebChannelAbstractTransport_override_virtual_CustomEvent(void* self, intptr_t slot); +void QWebChannelAbstractTransport_virtualbase_CustomEvent(void* self, QEvent* event); +void QWebChannelAbstractTransport_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QWebChannelAbstractTransport_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QWebChannelAbstractTransport_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QWebChannelAbstractTransport_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QWebChannelAbstractTransport_Delete(QWebChannelAbstractTransport* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/cflags.go b/qt6/webengine/cflags.go new file mode 100644 index 00000000..cb165fd2 --- /dev/null +++ b/qt6/webengine/cflags.go @@ -0,0 +1,6 @@ +package webengine + +/* +#cgo pkg-config: Qt6WebEngineWidgets +*/ +import "C" diff --git a/qt6/webengine/gen_qwebenginecertificateerror.cpp b/qt6/webengine/gen_qwebenginecertificateerror.cpp new file mode 100644 index 00000000..445ee96b --- /dev/null +++ b/qt6/webengine/gen_qwebenginecertificateerror.cpp @@ -0,0 +1,77 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebenginecertificateerror.h" +#include "_cgo_export.h" + +void QWebEngineCertificateError_new(QWebEngineCertificateError* other, QWebEngineCertificateError** outptr_QWebEngineCertificateError) { + QWebEngineCertificateError* ret = new QWebEngineCertificateError(*other); + *outptr_QWebEngineCertificateError = ret; +} + +void QWebEngineCertificateError_OperatorAssign(QWebEngineCertificateError* self, QWebEngineCertificateError* other) { + self->operator=(*other); +} + +int QWebEngineCertificateError_Type(const QWebEngineCertificateError* self) { + QWebEngineCertificateError::Type _ret = self->type(); + return static_cast(_ret); +} + +QUrl* QWebEngineCertificateError_Url(const QWebEngineCertificateError* self) { + return new QUrl(self->url()); +} + +bool QWebEngineCertificateError_IsOverridable(const QWebEngineCertificateError* self) { + return self->isOverridable(); +} + +struct miqt_string QWebEngineCertificateError_Description(const QWebEngineCertificateError* self) { + QString _ret = self->description(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineCertificateError_Defer(QWebEngineCertificateError* self) { + self->defer(); +} + +void QWebEngineCertificateError_RejectCertificate(QWebEngineCertificateError* self) { + self->rejectCertificate(); +} + +void QWebEngineCertificateError_AcceptCertificate(QWebEngineCertificateError* self) { + self->acceptCertificate(); +} + +struct miqt_array /* of QSslCertificate* */ QWebEngineCertificateError_CertificateChain(const QWebEngineCertificateError* self) { + QList _ret = self->certificateChain(); + // Convert QList<> from C++ memory to manually-managed C memory + QSslCertificate** _arr = static_cast(malloc(sizeof(QSslCertificate*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QSslCertificate(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QWebEngineCertificateError_Delete(QWebEngineCertificateError* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebenginecertificateerror.go b/qt6/webengine/gen_qwebenginecertificateerror.go new file mode 100644 index 00000000..fb643e14 --- /dev/null +++ b/qt6/webengine/gen_qwebenginecertificateerror.go @@ -0,0 +1,150 @@ +package webengine + +/* + +#include "gen_qwebenginecertificateerror.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "github.com/mappu/miqt/qt6/network" + "runtime" + "unsafe" +) + +type QWebEngineCertificateError__Type int + +const ( + QWebEngineCertificateError__SslPinnedKeyNotInCertificateChain QWebEngineCertificateError__Type = -150 + QWebEngineCertificateError__CertificateCommonNameInvalid QWebEngineCertificateError__Type = -200 + QWebEngineCertificateError__CertificateDateInvalid QWebEngineCertificateError__Type = -201 + QWebEngineCertificateError__CertificateAuthorityInvalid QWebEngineCertificateError__Type = -202 + QWebEngineCertificateError__CertificateContainsErrors QWebEngineCertificateError__Type = -203 + QWebEngineCertificateError__CertificateNoRevocationMechanism QWebEngineCertificateError__Type = -204 + QWebEngineCertificateError__CertificateUnableToCheckRevocation QWebEngineCertificateError__Type = -205 + QWebEngineCertificateError__CertificateRevoked QWebEngineCertificateError__Type = -206 + QWebEngineCertificateError__CertificateInvalid QWebEngineCertificateError__Type = -207 + QWebEngineCertificateError__CertificateWeakSignatureAlgorithm QWebEngineCertificateError__Type = -208 + QWebEngineCertificateError__CertificateNonUniqueName QWebEngineCertificateError__Type = -210 + QWebEngineCertificateError__CertificateWeakKey QWebEngineCertificateError__Type = -211 + QWebEngineCertificateError__CertificateNameConstraintViolation QWebEngineCertificateError__Type = -212 + QWebEngineCertificateError__CertificateValidityTooLong QWebEngineCertificateError__Type = -213 + QWebEngineCertificateError__CertificateTransparencyRequired QWebEngineCertificateError__Type = -214 + QWebEngineCertificateError__CertificateSymantecLegacy QWebEngineCertificateError__Type = -215 + QWebEngineCertificateError__CertificateKnownInterceptionBlocked QWebEngineCertificateError__Type = -217 + QWebEngineCertificateError__SslObsoleteVersion QWebEngineCertificateError__Type = -218 +) + +type QWebEngineCertificateError struct { + h *C.QWebEngineCertificateError + isSubclass bool +} + +func (this *QWebEngineCertificateError) cPointer() *C.QWebEngineCertificateError { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineCertificateError) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineCertificateError constructs the type using only CGO pointers. +func newQWebEngineCertificateError(h *C.QWebEngineCertificateError) *QWebEngineCertificateError { + if h == nil { + return nil + } + return &QWebEngineCertificateError{h: h} +} + +// UnsafeNewQWebEngineCertificateError constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineCertificateError(h unsafe.Pointer) *QWebEngineCertificateError { + if h == nil { + return nil + } + + return &QWebEngineCertificateError{h: (*C.QWebEngineCertificateError)(h)} +} + +// NewQWebEngineCertificateError constructs a new QWebEngineCertificateError object. +func NewQWebEngineCertificateError(other *QWebEngineCertificateError) *QWebEngineCertificateError { + var outptr_QWebEngineCertificateError *C.QWebEngineCertificateError = nil + + C.QWebEngineCertificateError_new(other.cPointer(), &outptr_QWebEngineCertificateError) + ret := newQWebEngineCertificateError(outptr_QWebEngineCertificateError) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineCertificateError) OperatorAssign(other *QWebEngineCertificateError) { + C.QWebEngineCertificateError_OperatorAssign(this.h, other.cPointer()) +} + +func (this *QWebEngineCertificateError) Type() QWebEngineCertificateError__Type { + return (QWebEngineCertificateError__Type)(C.QWebEngineCertificateError_Type(this.h)) +} + +func (this *QWebEngineCertificateError) Url() *qt6.QUrl { + _ret := C.QWebEngineCertificateError_Url(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineCertificateError) IsOverridable() bool { + return (bool)(C.QWebEngineCertificateError_IsOverridable(this.h)) +} + +func (this *QWebEngineCertificateError) Description() string { + var _ms C.struct_miqt_string = C.QWebEngineCertificateError_Description(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineCertificateError) Defer() { + C.QWebEngineCertificateError_Defer(this.h) +} + +func (this *QWebEngineCertificateError) RejectCertificate() { + C.QWebEngineCertificateError_RejectCertificate(this.h) +} + +func (this *QWebEngineCertificateError) AcceptCertificate() { + C.QWebEngineCertificateError_AcceptCertificate(this.h) +} + +func (this *QWebEngineCertificateError) CertificateChain() []network.QSslCertificate { + var _ma C.struct_miqt_array = C.QWebEngineCertificateError_CertificateChain(this.h) + _ret := make([]network.QSslCertificate, int(_ma.len)) + _outCast := (*[0xffff]*C.QSslCertificate)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := network.UnsafeNewQSslCertificate(unsafe.Pointer(_lv_ret)) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebEngineCertificateError) Delete() { + C.QWebEngineCertificateError_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineCertificateError) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineCertificateError) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebenginecertificateerror.h b/qt6/webengine/gen_qwebenginecertificateerror.h new file mode 100644 index 00000000..b1faf211 --- /dev/null +++ b/qt6/webengine/gen_qwebenginecertificateerror.h @@ -0,0 +1,43 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINECERTIFICATEERROR_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINECERTIFICATEERROR_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QSslCertificate; +class QUrl; +class QWebEngineCertificateError; +#else +typedef struct QSslCertificate QSslCertificate; +typedef struct QUrl QUrl; +typedef struct QWebEngineCertificateError QWebEngineCertificateError; +#endif + +void QWebEngineCertificateError_new(QWebEngineCertificateError* other, QWebEngineCertificateError** outptr_QWebEngineCertificateError); +void QWebEngineCertificateError_OperatorAssign(QWebEngineCertificateError* self, QWebEngineCertificateError* other); +int QWebEngineCertificateError_Type(const QWebEngineCertificateError* self); +QUrl* QWebEngineCertificateError_Url(const QWebEngineCertificateError* self); +bool QWebEngineCertificateError_IsOverridable(const QWebEngineCertificateError* self); +struct miqt_string QWebEngineCertificateError_Description(const QWebEngineCertificateError* self); +void QWebEngineCertificateError_Defer(QWebEngineCertificateError* self); +void QWebEngineCertificateError_RejectCertificate(QWebEngineCertificateError* self); +void QWebEngineCertificateError_AcceptCertificate(QWebEngineCertificateError* self); +struct miqt_array /* of QSslCertificate* */ QWebEngineCertificateError_CertificateChain(const QWebEngineCertificateError* self); +void QWebEngineCertificateError_Delete(QWebEngineCertificateError* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebengineclientcertificateselection.cpp b/qt6/webengine/gen_qwebengineclientcertificateselection.cpp new file mode 100644 index 00000000..f2baceb0 --- /dev/null +++ b/qt6/webengine/gen_qwebengineclientcertificateselection.cpp @@ -0,0 +1,50 @@ +#include +#include +#include +#include +#include +#include "gen_qwebengineclientcertificateselection.h" +#include "_cgo_export.h" + +void QWebEngineClientCertificateSelection_new(QWebEngineClientCertificateSelection* param1, QWebEngineClientCertificateSelection** outptr_QWebEngineClientCertificateSelection) { + QWebEngineClientCertificateSelection* ret = new QWebEngineClientCertificateSelection(*param1); + *outptr_QWebEngineClientCertificateSelection = ret; +} + +void QWebEngineClientCertificateSelection_OperatorAssign(QWebEngineClientCertificateSelection* self, QWebEngineClientCertificateSelection* param1) { + self->operator=(*param1); +} + +QUrl* QWebEngineClientCertificateSelection_Host(const QWebEngineClientCertificateSelection* self) { + return new QUrl(self->host()); +} + +void QWebEngineClientCertificateSelection_Select(QWebEngineClientCertificateSelection* self, QSslCertificate* certificate) { + self->select(*certificate); +} + +void QWebEngineClientCertificateSelection_SelectNone(QWebEngineClientCertificateSelection* self) { + self->selectNone(); +} + +struct miqt_array /* of QSslCertificate* */ QWebEngineClientCertificateSelection_Certificates(const QWebEngineClientCertificateSelection* self) { + QList _ret = self->certificates(); + // Convert QList<> from C++ memory to manually-managed C memory + QSslCertificate** _arr = static_cast(malloc(sizeof(QSslCertificate*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QSslCertificate(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QWebEngineClientCertificateSelection_Delete(QWebEngineClientCertificateSelection* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebengineclientcertificateselection.go b/qt6/webengine/gen_qwebengineclientcertificateselection.go new file mode 100644 index 00000000..9b9aff5d --- /dev/null +++ b/qt6/webengine/gen_qwebengineclientcertificateselection.go @@ -0,0 +1,108 @@ +package webengine + +/* + +#include "gen_qwebengineclientcertificateselection.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "github.com/mappu/miqt/qt6/network" + "runtime" + "unsafe" +) + +type QWebEngineClientCertificateSelection struct { + h *C.QWebEngineClientCertificateSelection + isSubclass bool +} + +func (this *QWebEngineClientCertificateSelection) cPointer() *C.QWebEngineClientCertificateSelection { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineClientCertificateSelection) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineClientCertificateSelection constructs the type using only CGO pointers. +func newQWebEngineClientCertificateSelection(h *C.QWebEngineClientCertificateSelection) *QWebEngineClientCertificateSelection { + if h == nil { + return nil + } + return &QWebEngineClientCertificateSelection{h: h} +} + +// UnsafeNewQWebEngineClientCertificateSelection constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineClientCertificateSelection(h unsafe.Pointer) *QWebEngineClientCertificateSelection { + if h == nil { + return nil + } + + return &QWebEngineClientCertificateSelection{h: (*C.QWebEngineClientCertificateSelection)(h)} +} + +// NewQWebEngineClientCertificateSelection constructs a new QWebEngineClientCertificateSelection object. +func NewQWebEngineClientCertificateSelection(param1 *QWebEngineClientCertificateSelection) *QWebEngineClientCertificateSelection { + var outptr_QWebEngineClientCertificateSelection *C.QWebEngineClientCertificateSelection = nil + + C.QWebEngineClientCertificateSelection_new(param1.cPointer(), &outptr_QWebEngineClientCertificateSelection) + ret := newQWebEngineClientCertificateSelection(outptr_QWebEngineClientCertificateSelection) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineClientCertificateSelection) OperatorAssign(param1 *QWebEngineClientCertificateSelection) { + C.QWebEngineClientCertificateSelection_OperatorAssign(this.h, param1.cPointer()) +} + +func (this *QWebEngineClientCertificateSelection) Host() *qt6.QUrl { + _ret := C.QWebEngineClientCertificateSelection_Host(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineClientCertificateSelection) Select(certificate *network.QSslCertificate) { + C.QWebEngineClientCertificateSelection_Select(this.h, (*C.QSslCertificate)(certificate.UnsafePointer())) +} + +func (this *QWebEngineClientCertificateSelection) SelectNone() { + C.QWebEngineClientCertificateSelection_SelectNone(this.h) +} + +func (this *QWebEngineClientCertificateSelection) Certificates() []network.QSslCertificate { + var _ma C.struct_miqt_array = C.QWebEngineClientCertificateSelection_Certificates(this.h) + _ret := make([]network.QSslCertificate, int(_ma.len)) + _outCast := (*[0xffff]*C.QSslCertificate)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := network.UnsafeNewQSslCertificate(unsafe.Pointer(_lv_ret)) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebEngineClientCertificateSelection) Delete() { + C.QWebEngineClientCertificateSelection_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineClientCertificateSelection) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineClientCertificateSelection) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebengineclientcertificateselection.h b/qt6/webengine/gen_qwebengineclientcertificateselection.h new file mode 100644 index 00000000..829cb937 --- /dev/null +++ b/qt6/webengine/gen_qwebengineclientcertificateselection.h @@ -0,0 +1,39 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINECLIENTCERTIFICATESELECTION_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINECLIENTCERTIFICATESELECTION_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QSslCertificate; +class QUrl; +class QWebEngineClientCertificateSelection; +#else +typedef struct QSslCertificate QSslCertificate; +typedef struct QUrl QUrl; +typedef struct QWebEngineClientCertificateSelection QWebEngineClientCertificateSelection; +#endif + +void QWebEngineClientCertificateSelection_new(QWebEngineClientCertificateSelection* param1, QWebEngineClientCertificateSelection** outptr_QWebEngineClientCertificateSelection); +void QWebEngineClientCertificateSelection_OperatorAssign(QWebEngineClientCertificateSelection* self, QWebEngineClientCertificateSelection* param1); +QUrl* QWebEngineClientCertificateSelection_Host(const QWebEngineClientCertificateSelection* self); +void QWebEngineClientCertificateSelection_Select(QWebEngineClientCertificateSelection* self, QSslCertificate* certificate); +void QWebEngineClientCertificateSelection_SelectNone(QWebEngineClientCertificateSelection* self); +struct miqt_array /* of QSslCertificate* */ QWebEngineClientCertificateSelection_Certificates(const QWebEngineClientCertificateSelection* self); +void QWebEngineClientCertificateSelection_Delete(QWebEngineClientCertificateSelection* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebengineclientcertificatestore.cpp b/qt6/webengine/gen_qwebengineclientcertificatestore.cpp new file mode 100644 index 00000000..a06576ed --- /dev/null +++ b/qt6/webengine/gen_qwebengineclientcertificatestore.cpp @@ -0,0 +1,33 @@ +#include +#include +#include +#include +#include +#include "gen_qwebengineclientcertificatestore.h" +#include "_cgo_export.h" + +void QWebEngineClientCertificateStore_Add(QWebEngineClientCertificateStore* self, QSslCertificate* certificate, QSslKey* privateKey) { + self->add(*certificate, *privateKey); +} + +struct miqt_array /* of QSslCertificate* */ QWebEngineClientCertificateStore_Certificates(const QWebEngineClientCertificateStore* self) { + QList _ret = self->certificates(); + // Convert QList<> from C++ memory to manually-managed C memory + QSslCertificate** _arr = static_cast(malloc(sizeof(QSslCertificate*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QSslCertificate(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QWebEngineClientCertificateStore_Remove(QWebEngineClientCertificateStore* self, QSslCertificate* certificate) { + self->remove(*certificate); +} + +void QWebEngineClientCertificateStore_Clear(QWebEngineClientCertificateStore* self) { + self->clear(); +} + diff --git a/qt6/webengine/gen_qwebengineclientcertificatestore.go b/qt6/webengine/gen_qwebengineclientcertificatestore.go new file mode 100644 index 00000000..2bce859c --- /dev/null +++ b/qt6/webengine/gen_qwebengineclientcertificatestore.go @@ -0,0 +1,75 @@ +package webengine + +/* + +#include "gen_qwebengineclientcertificatestore.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6/network" + "unsafe" +) + +type QWebEngineClientCertificateStore struct { + h *C.QWebEngineClientCertificateStore + isSubclass bool +} + +func (this *QWebEngineClientCertificateStore) cPointer() *C.QWebEngineClientCertificateStore { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineClientCertificateStore) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineClientCertificateStore constructs the type using only CGO pointers. +func newQWebEngineClientCertificateStore(h *C.QWebEngineClientCertificateStore) *QWebEngineClientCertificateStore { + if h == nil { + return nil + } + return &QWebEngineClientCertificateStore{h: h} +} + +// UnsafeNewQWebEngineClientCertificateStore constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineClientCertificateStore(h unsafe.Pointer) *QWebEngineClientCertificateStore { + if h == nil { + return nil + } + + return &QWebEngineClientCertificateStore{h: (*C.QWebEngineClientCertificateStore)(h)} +} + +func (this *QWebEngineClientCertificateStore) Add(certificate *network.QSslCertificate, privateKey *network.QSslKey) { + C.QWebEngineClientCertificateStore_Add(this.h, (*C.QSslCertificate)(certificate.UnsafePointer()), (*C.QSslKey)(privateKey.UnsafePointer())) +} + +func (this *QWebEngineClientCertificateStore) Certificates() []network.QSslCertificate { + var _ma C.struct_miqt_array = C.QWebEngineClientCertificateStore_Certificates(this.h) + _ret := make([]network.QSslCertificate, int(_ma.len)) + _outCast := (*[0xffff]*C.QSslCertificate)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := network.UnsafeNewQSslCertificate(unsafe.Pointer(_lv_ret)) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret +} + +func (this *QWebEngineClientCertificateStore) Remove(certificate *network.QSslCertificate) { + C.QWebEngineClientCertificateStore_Remove(this.h, (*C.QSslCertificate)(certificate.UnsafePointer())) +} + +func (this *QWebEngineClientCertificateStore) Clear() { + C.QWebEngineClientCertificateStore_Clear(this.h) +} diff --git a/qt6/webengine/gen_qwebengineclientcertificatestore.h b/qt6/webengine/gen_qwebengineclientcertificatestore.h new file mode 100644 index 00000000..517ed9b8 --- /dev/null +++ b/qt6/webengine/gen_qwebengineclientcertificatestore.h @@ -0,0 +1,36 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINECLIENTCERTIFICATESTORE_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINECLIENTCERTIFICATESTORE_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QSslCertificate; +class QSslKey; +class QWebEngineClientCertificateStore; +#else +typedef struct QSslCertificate QSslCertificate; +typedef struct QSslKey QSslKey; +typedef struct QWebEngineClientCertificateStore QWebEngineClientCertificateStore; +#endif + +void QWebEngineClientCertificateStore_Add(QWebEngineClientCertificateStore* self, QSslCertificate* certificate, QSslKey* privateKey); +struct miqt_array /* of QSslCertificate* */ QWebEngineClientCertificateStore_Certificates(const QWebEngineClientCertificateStore* self); +void QWebEngineClientCertificateStore_Remove(QWebEngineClientCertificateStore* self, QSslCertificate* certificate); +void QWebEngineClientCertificateStore_Clear(QWebEngineClientCertificateStore* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebenginecontextmenurequest.cpp b/qt6/webengine/gen_qwebenginecontextmenurequest.cpp new file mode 100644 index 00000000..707ab8fe --- /dev/null +++ b/qt6/webengine/gen_qwebenginecontextmenurequest.cpp @@ -0,0 +1,154 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebenginecontextmenurequest.h" +#include "_cgo_export.h" + +QMetaObject* QWebEngineContextMenuRequest_MetaObject(const QWebEngineContextMenuRequest* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineContextMenuRequest_Metacast(QWebEngineContextMenuRequest* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineContextMenuRequest_Tr(const char* s) { + QString _ret = QWebEngineContextMenuRequest::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QPoint* QWebEngineContextMenuRequest_Position(const QWebEngineContextMenuRequest* self) { + return new QPoint(self->position()); +} + +struct miqt_string QWebEngineContextMenuRequest_SelectedText(const QWebEngineContextMenuRequest* self) { + QString _ret = self->selectedText(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineContextMenuRequest_LinkText(const QWebEngineContextMenuRequest* self) { + QString _ret = self->linkText(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QUrl* QWebEngineContextMenuRequest_LinkUrl(const QWebEngineContextMenuRequest* self) { + return new QUrl(self->linkUrl()); +} + +QUrl* QWebEngineContextMenuRequest_MediaUrl(const QWebEngineContextMenuRequest* self) { + return new QUrl(self->mediaUrl()); +} + +int QWebEngineContextMenuRequest_MediaType(const QWebEngineContextMenuRequest* self) { + QWebEngineContextMenuRequest::MediaType _ret = self->mediaType(); + return static_cast(_ret); +} + +bool QWebEngineContextMenuRequest_IsContentEditable(const QWebEngineContextMenuRequest* self) { + return self->isContentEditable(); +} + +struct miqt_string QWebEngineContextMenuRequest_MisspelledWord(const QWebEngineContextMenuRequest* self) { + QString _ret = self->misspelledWord(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_array /* of struct miqt_string */ QWebEngineContextMenuRequest_SpellCheckerSuggestions(const QWebEngineContextMenuRequest* self) { + QStringList _ret = self->spellCheckerSuggestions(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +bool QWebEngineContextMenuRequest_IsAccepted(const QWebEngineContextMenuRequest* self) { + return self->isAccepted(); +} + +void QWebEngineContextMenuRequest_SetAccepted(QWebEngineContextMenuRequest* self, bool accepted) { + self->setAccepted(accepted); +} + +int QWebEngineContextMenuRequest_MediaFlags(const QWebEngineContextMenuRequest* self) { + QWebEngineContextMenuRequest::MediaFlags _ret = self->mediaFlags(); + return static_cast(_ret); +} + +int QWebEngineContextMenuRequest_EditFlags(const QWebEngineContextMenuRequest* self) { + QWebEngineContextMenuRequest::EditFlags _ret = self->editFlags(); + return static_cast(_ret); +} + +struct miqt_string QWebEngineContextMenuRequest_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineContextMenuRequest::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineContextMenuRequest_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineContextMenuRequest::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineContextMenuRequest_Delete(QWebEngineContextMenuRequest* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebenginecontextmenurequest.go b/qt6/webengine/gen_qwebenginecontextmenurequest.go new file mode 100644 index 00000000..af1e0974 --- /dev/null +++ b/qt6/webengine/gen_qwebenginecontextmenurequest.go @@ -0,0 +1,244 @@ +package webengine + +/* + +#include "gen_qwebenginecontextmenurequest.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "unsafe" +) + +type QtWebEngineCore__ReferrerPolicy int + +const ( + QtWebEngineCore__Always QtWebEngineCore__ReferrerPolicy = 0 + QtWebEngineCore__Default QtWebEngineCore__ReferrerPolicy = 1 + QtWebEngineCore__NoReferrerWhenDowngrade QtWebEngineCore__ReferrerPolicy = 2 + QtWebEngineCore__Never QtWebEngineCore__ReferrerPolicy = 3 + QtWebEngineCore__Origin QtWebEngineCore__ReferrerPolicy = 4 + QtWebEngineCore__OriginWhenCrossOrigin QtWebEngineCore__ReferrerPolicy = 5 + QtWebEngineCore__NoReferrerWhenDowngradeOriginWhenCrossOrigin QtWebEngineCore__ReferrerPolicy = 6 + QtWebEngineCore__SameOrigin QtWebEngineCore__ReferrerPolicy = 7 + QtWebEngineCore__StrictOrigin QtWebEngineCore__ReferrerPolicy = 8 + QtWebEngineCore__Last QtWebEngineCore__ReferrerPolicy = 8 +) + +type QWebEngineContextMenuRequest__MediaType int + +const ( + QWebEngineContextMenuRequest__MediaTypeNone QWebEngineContextMenuRequest__MediaType = 0 + QWebEngineContextMenuRequest__MediaTypeImage QWebEngineContextMenuRequest__MediaType = 1 + QWebEngineContextMenuRequest__MediaTypeVideo QWebEngineContextMenuRequest__MediaType = 2 + QWebEngineContextMenuRequest__MediaTypeAudio QWebEngineContextMenuRequest__MediaType = 3 + QWebEngineContextMenuRequest__MediaTypeCanvas QWebEngineContextMenuRequest__MediaType = 4 + QWebEngineContextMenuRequest__MediaTypeFile QWebEngineContextMenuRequest__MediaType = 5 + QWebEngineContextMenuRequest__MediaTypePlugin QWebEngineContextMenuRequest__MediaType = 6 +) + +type QWebEngineContextMenuRequest__MediaFlag int + +const ( + QWebEngineContextMenuRequest__MediaInError QWebEngineContextMenuRequest__MediaFlag = 1 + QWebEngineContextMenuRequest__MediaPaused QWebEngineContextMenuRequest__MediaFlag = 2 + QWebEngineContextMenuRequest__MediaMuted QWebEngineContextMenuRequest__MediaFlag = 4 + QWebEngineContextMenuRequest__MediaLoop QWebEngineContextMenuRequest__MediaFlag = 8 + QWebEngineContextMenuRequest__MediaCanSave QWebEngineContextMenuRequest__MediaFlag = 16 + QWebEngineContextMenuRequest__MediaHasAudio QWebEngineContextMenuRequest__MediaFlag = 32 + QWebEngineContextMenuRequest__MediaCanToggleControls QWebEngineContextMenuRequest__MediaFlag = 64 + QWebEngineContextMenuRequest__MediaControls QWebEngineContextMenuRequest__MediaFlag = 128 + QWebEngineContextMenuRequest__MediaCanPrint QWebEngineContextMenuRequest__MediaFlag = 256 + QWebEngineContextMenuRequest__MediaCanRotate QWebEngineContextMenuRequest__MediaFlag = 512 +) + +type QWebEngineContextMenuRequest__EditFlag int + +const ( + QWebEngineContextMenuRequest__CanUndo QWebEngineContextMenuRequest__EditFlag = 1 + QWebEngineContextMenuRequest__CanRedo QWebEngineContextMenuRequest__EditFlag = 2 + QWebEngineContextMenuRequest__CanCut QWebEngineContextMenuRequest__EditFlag = 4 + QWebEngineContextMenuRequest__CanCopy QWebEngineContextMenuRequest__EditFlag = 8 + QWebEngineContextMenuRequest__CanPaste QWebEngineContextMenuRequest__EditFlag = 16 + QWebEngineContextMenuRequest__CanDelete QWebEngineContextMenuRequest__EditFlag = 32 + QWebEngineContextMenuRequest__CanSelectAll QWebEngineContextMenuRequest__EditFlag = 64 + QWebEngineContextMenuRequest__CanTranslate QWebEngineContextMenuRequest__EditFlag = 128 + QWebEngineContextMenuRequest__CanEditRichly QWebEngineContextMenuRequest__EditFlag = 256 +) + +type QWebEngineContextMenuRequest struct { + h *C.QWebEngineContextMenuRequest + isSubclass bool + *qt6.QObject +} + +func (this *QWebEngineContextMenuRequest) cPointer() *C.QWebEngineContextMenuRequest { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineContextMenuRequest) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineContextMenuRequest constructs the type using only CGO pointers. +func newQWebEngineContextMenuRequest(h *C.QWebEngineContextMenuRequest, h_QObject *C.QObject) *QWebEngineContextMenuRequest { + if h == nil { + return nil + } + return &QWebEngineContextMenuRequest{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEngineContextMenuRequest constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineContextMenuRequest(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineContextMenuRequest { + if h == nil { + return nil + } + + return &QWebEngineContextMenuRequest{h: (*C.QWebEngineContextMenuRequest)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} +} + +func (this *QWebEngineContextMenuRequest) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineContextMenuRequest_MetaObject(this.h))) +} + +func (this *QWebEngineContextMenuRequest) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineContextMenuRequest_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineContextMenuRequest_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineContextMenuRequest_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineContextMenuRequest) Position() *qt6.QPoint { + _ret := C.QWebEngineContextMenuRequest_Position(this.h) + _goptr := qt6.UnsafeNewQPoint(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineContextMenuRequest) SelectedText() string { + var _ms C.struct_miqt_string = C.QWebEngineContextMenuRequest_SelectedText(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineContextMenuRequest) LinkText() string { + var _ms C.struct_miqt_string = C.QWebEngineContextMenuRequest_LinkText(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineContextMenuRequest) LinkUrl() *qt6.QUrl { + _ret := C.QWebEngineContextMenuRequest_LinkUrl(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineContextMenuRequest) MediaUrl() *qt6.QUrl { + _ret := C.QWebEngineContextMenuRequest_MediaUrl(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineContextMenuRequest) MediaType() QWebEngineContextMenuRequest__MediaType { + return (QWebEngineContextMenuRequest__MediaType)(C.QWebEngineContextMenuRequest_MediaType(this.h)) +} + +func (this *QWebEngineContextMenuRequest) IsContentEditable() bool { + return (bool)(C.QWebEngineContextMenuRequest_IsContentEditable(this.h)) +} + +func (this *QWebEngineContextMenuRequest) MisspelledWord() string { + var _ms C.struct_miqt_string = C.QWebEngineContextMenuRequest_MisspelledWord(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineContextMenuRequest) SpellCheckerSuggestions() []string { + var _ma C.struct_miqt_array = C.QWebEngineContextMenuRequest_SpellCheckerSuggestions(this.h) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret +} + +func (this *QWebEngineContextMenuRequest) IsAccepted() bool { + return (bool)(C.QWebEngineContextMenuRequest_IsAccepted(this.h)) +} + +func (this *QWebEngineContextMenuRequest) SetAccepted(accepted bool) { + C.QWebEngineContextMenuRequest_SetAccepted(this.h, (C.bool)(accepted)) +} + +func (this *QWebEngineContextMenuRequest) MediaFlags() QWebEngineContextMenuRequest__MediaFlag { + return (QWebEngineContextMenuRequest__MediaFlag)(C.QWebEngineContextMenuRequest_MediaFlags(this.h)) +} + +func (this *QWebEngineContextMenuRequest) EditFlags() QWebEngineContextMenuRequest__EditFlag { + return (QWebEngineContextMenuRequest__EditFlag)(C.QWebEngineContextMenuRequest_EditFlags(this.h)) +} + +func QWebEngineContextMenuRequest_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineContextMenuRequest_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineContextMenuRequest_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineContextMenuRequest_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebEngineContextMenuRequest) Delete() { + C.QWebEngineContextMenuRequest_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineContextMenuRequest) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineContextMenuRequest) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebenginecontextmenurequest.h b/qt6/webengine/gen_qwebenginecontextmenurequest.h new file mode 100644 index 00000000..c26f4967 --- /dev/null +++ b/qt6/webengine/gen_qwebenginecontextmenurequest.h @@ -0,0 +1,55 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINECONTEXTMENUREQUEST_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINECONTEXTMENUREQUEST_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QMetaObject; +class QObject; +class QPoint; +class QUrl; +class QWebEngineContextMenuRequest; +#else +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPoint QPoint; +typedef struct QUrl QUrl; +typedef struct QWebEngineContextMenuRequest QWebEngineContextMenuRequest; +#endif + +QMetaObject* QWebEngineContextMenuRequest_MetaObject(const QWebEngineContextMenuRequest* self); +void* QWebEngineContextMenuRequest_Metacast(QWebEngineContextMenuRequest* self, const char* param1); +struct miqt_string QWebEngineContextMenuRequest_Tr(const char* s); +QPoint* QWebEngineContextMenuRequest_Position(const QWebEngineContextMenuRequest* self); +struct miqt_string QWebEngineContextMenuRequest_SelectedText(const QWebEngineContextMenuRequest* self); +struct miqt_string QWebEngineContextMenuRequest_LinkText(const QWebEngineContextMenuRequest* self); +QUrl* QWebEngineContextMenuRequest_LinkUrl(const QWebEngineContextMenuRequest* self); +QUrl* QWebEngineContextMenuRequest_MediaUrl(const QWebEngineContextMenuRequest* self); +int QWebEngineContextMenuRequest_MediaType(const QWebEngineContextMenuRequest* self); +bool QWebEngineContextMenuRequest_IsContentEditable(const QWebEngineContextMenuRequest* self); +struct miqt_string QWebEngineContextMenuRequest_MisspelledWord(const QWebEngineContextMenuRequest* self); +struct miqt_array /* of struct miqt_string */ QWebEngineContextMenuRequest_SpellCheckerSuggestions(const QWebEngineContextMenuRequest* self); +bool QWebEngineContextMenuRequest_IsAccepted(const QWebEngineContextMenuRequest* self); +void QWebEngineContextMenuRequest_SetAccepted(QWebEngineContextMenuRequest* self, bool accepted); +int QWebEngineContextMenuRequest_MediaFlags(const QWebEngineContextMenuRequest* self); +int QWebEngineContextMenuRequest_EditFlags(const QWebEngineContextMenuRequest* self); +struct miqt_string QWebEngineContextMenuRequest_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineContextMenuRequest_Tr3(const char* s, const char* c, int n); +void QWebEngineContextMenuRequest_Delete(QWebEngineContextMenuRequest* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebenginecookiestore.cpp b/qt6/webengine/gen_qwebenginecookiestore.cpp new file mode 100644 index 00000000..4992732e --- /dev/null +++ b/qt6/webengine/gen_qwebenginecookiestore.cpp @@ -0,0 +1,133 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#define WORKAROUND_INNER_CLASS_DEFINITION_QWebEngineCookieStore__FilterRequest +#include +#include "gen_qwebenginecookiestore.h" +#include "_cgo_export.h" + +QMetaObject* QWebEngineCookieStore_MetaObject(const QWebEngineCookieStore* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineCookieStore_Metacast(QWebEngineCookieStore* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineCookieStore_Tr(const char* s) { + QString _ret = QWebEngineCookieStore::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineCookieStore_SetCookie(QWebEngineCookieStore* self, QNetworkCookie* cookie) { + self->setCookie(*cookie); +} + +void QWebEngineCookieStore_DeleteCookie(QWebEngineCookieStore* self, QNetworkCookie* cookie) { + self->deleteCookie(*cookie); +} + +void QWebEngineCookieStore_DeleteSessionCookies(QWebEngineCookieStore* self) { + self->deleteSessionCookies(); +} + +void QWebEngineCookieStore_DeleteAllCookies(QWebEngineCookieStore* self) { + self->deleteAllCookies(); +} + +void QWebEngineCookieStore_LoadAllCookies(QWebEngineCookieStore* self) { + self->loadAllCookies(); +} + +void QWebEngineCookieStore_CookieAdded(QWebEngineCookieStore* self, QNetworkCookie* cookie) { + self->cookieAdded(*cookie); +} + +void QWebEngineCookieStore_connect_CookieAdded(QWebEngineCookieStore* self, intptr_t slot) { + QWebEngineCookieStore::connect(self, static_cast(&QWebEngineCookieStore::cookieAdded), self, [=](const QNetworkCookie& cookie) { + const QNetworkCookie& cookie_ret = cookie; + // Cast returned reference into pointer + QNetworkCookie* sigval1 = const_cast(&cookie_ret); + miqt_exec_callback_QWebEngineCookieStore_CookieAdded(slot, sigval1); + }); +} + +void QWebEngineCookieStore_CookieRemoved(QWebEngineCookieStore* self, QNetworkCookie* cookie) { + self->cookieRemoved(*cookie); +} + +void QWebEngineCookieStore_connect_CookieRemoved(QWebEngineCookieStore* self, intptr_t slot) { + QWebEngineCookieStore::connect(self, static_cast(&QWebEngineCookieStore::cookieRemoved), self, [=](const QNetworkCookie& cookie) { + const QNetworkCookie& cookie_ret = cookie; + // Cast returned reference into pointer + QNetworkCookie* sigval1 = const_cast(&cookie_ret); + miqt_exec_callback_QWebEngineCookieStore_CookieRemoved(slot, sigval1); + }); +} + +struct miqt_string QWebEngineCookieStore_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineCookieStore::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineCookieStore_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineCookieStore::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineCookieStore_SetCookie2(QWebEngineCookieStore* self, QNetworkCookie* cookie, QUrl* origin) { + self->setCookie(*cookie, *origin); +} + +void QWebEngineCookieStore_DeleteCookie2(QWebEngineCookieStore* self, QNetworkCookie* cookie, QUrl* origin) { + self->deleteCookie(*cookie, *origin); +} + +void QWebEngineCookieStore_Delete(QWebEngineCookieStore* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QWebEngineCookieStore__FilterRequest_new(QWebEngineCookieStore__FilterRequest* param1, QWebEngineCookieStore__FilterRequest** outptr_QWebEngineCookieStore__FilterRequest) { + QWebEngineCookieStore::FilterRequest* ret = new QWebEngineCookieStore::FilterRequest(*param1); + *outptr_QWebEngineCookieStore__FilterRequest = ret; +} + +void QWebEngineCookieStore__FilterRequest_OperatorAssign(QWebEngineCookieStore__FilterRequest* self, QWebEngineCookieStore__FilterRequest* param1) { + self->operator=(*param1); +} + +void QWebEngineCookieStore__FilterRequest_Delete(QWebEngineCookieStore__FilterRequest* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebenginecookiestore.go b/qt6/webengine/gen_qwebenginecookiestore.go new file mode 100644 index 00000000..becca30e --- /dev/null +++ b/qt6/webengine/gen_qwebenginecookiestore.go @@ -0,0 +1,243 @@ +package webengine + +/* + +#include "gen_qwebenginecookiestore.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "github.com/mappu/miqt/qt6/network" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebEngineCookieStore struct { + h *C.QWebEngineCookieStore + isSubclass bool + *qt6.QObject +} + +func (this *QWebEngineCookieStore) cPointer() *C.QWebEngineCookieStore { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineCookieStore) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineCookieStore constructs the type using only CGO pointers. +func newQWebEngineCookieStore(h *C.QWebEngineCookieStore, h_QObject *C.QObject) *QWebEngineCookieStore { + if h == nil { + return nil + } + return &QWebEngineCookieStore{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEngineCookieStore constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineCookieStore(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineCookieStore { + if h == nil { + return nil + } + + return &QWebEngineCookieStore{h: (*C.QWebEngineCookieStore)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} +} + +func (this *QWebEngineCookieStore) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineCookieStore_MetaObject(this.h))) +} + +func (this *QWebEngineCookieStore) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineCookieStore_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineCookieStore_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineCookieStore_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineCookieStore) SetCookie(cookie *network.QNetworkCookie) { + C.QWebEngineCookieStore_SetCookie(this.h, (*C.QNetworkCookie)(cookie.UnsafePointer())) +} + +func (this *QWebEngineCookieStore) DeleteCookie(cookie *network.QNetworkCookie) { + C.QWebEngineCookieStore_DeleteCookie(this.h, (*C.QNetworkCookie)(cookie.UnsafePointer())) +} + +func (this *QWebEngineCookieStore) DeleteSessionCookies() { + C.QWebEngineCookieStore_DeleteSessionCookies(this.h) +} + +func (this *QWebEngineCookieStore) DeleteAllCookies() { + C.QWebEngineCookieStore_DeleteAllCookies(this.h) +} + +func (this *QWebEngineCookieStore) LoadAllCookies() { + C.QWebEngineCookieStore_LoadAllCookies(this.h) +} + +func (this *QWebEngineCookieStore) CookieAdded(cookie *network.QNetworkCookie) { + C.QWebEngineCookieStore_CookieAdded(this.h, (*C.QNetworkCookie)(cookie.UnsafePointer())) +} +func (this *QWebEngineCookieStore) OnCookieAdded(slot func(cookie *network.QNetworkCookie)) { + C.QWebEngineCookieStore_connect_CookieAdded(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineCookieStore_CookieAdded +func miqt_exec_callback_QWebEngineCookieStore_CookieAdded(cb C.intptr_t, cookie *C.QNetworkCookie) { + gofunc, ok := cgo.Handle(cb).Value().(func(cookie *network.QNetworkCookie)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := network.UnsafeNewQNetworkCookie(unsafe.Pointer(cookie)) + + gofunc(slotval1) +} + +func (this *QWebEngineCookieStore) CookieRemoved(cookie *network.QNetworkCookie) { + C.QWebEngineCookieStore_CookieRemoved(this.h, (*C.QNetworkCookie)(cookie.UnsafePointer())) +} +func (this *QWebEngineCookieStore) OnCookieRemoved(slot func(cookie *network.QNetworkCookie)) { + C.QWebEngineCookieStore_connect_CookieRemoved(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineCookieStore_CookieRemoved +func miqt_exec_callback_QWebEngineCookieStore_CookieRemoved(cb C.intptr_t, cookie *C.QNetworkCookie) { + gofunc, ok := cgo.Handle(cb).Value().(func(cookie *network.QNetworkCookie)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := network.UnsafeNewQNetworkCookie(unsafe.Pointer(cookie)) + + gofunc(slotval1) +} + +func QWebEngineCookieStore_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineCookieStore_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineCookieStore_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineCookieStore_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineCookieStore) SetCookie2(cookie *network.QNetworkCookie, origin *qt6.QUrl) { + C.QWebEngineCookieStore_SetCookie2(this.h, (*C.QNetworkCookie)(cookie.UnsafePointer()), (*C.QUrl)(origin.UnsafePointer())) +} + +func (this *QWebEngineCookieStore) DeleteCookie2(cookie *network.QNetworkCookie, origin *qt6.QUrl) { + C.QWebEngineCookieStore_DeleteCookie2(this.h, (*C.QNetworkCookie)(cookie.UnsafePointer()), (*C.QUrl)(origin.UnsafePointer())) +} + +// Delete this object from C++ memory. +func (this *QWebEngineCookieStore) Delete() { + C.QWebEngineCookieStore_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineCookieStore) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineCookieStore) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebEngineCookieStore__FilterRequest struct { + h *C.QWebEngineCookieStore__FilterRequest + isSubclass bool +} + +func (this *QWebEngineCookieStore__FilterRequest) cPointer() *C.QWebEngineCookieStore__FilterRequest { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineCookieStore__FilterRequest) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineCookieStore__FilterRequest constructs the type using only CGO pointers. +func newQWebEngineCookieStore__FilterRequest(h *C.QWebEngineCookieStore__FilterRequest) *QWebEngineCookieStore__FilterRequest { + if h == nil { + return nil + } + return &QWebEngineCookieStore__FilterRequest{h: h} +} + +// UnsafeNewQWebEngineCookieStore__FilterRequest constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineCookieStore__FilterRequest(h unsafe.Pointer) *QWebEngineCookieStore__FilterRequest { + if h == nil { + return nil + } + + return &QWebEngineCookieStore__FilterRequest{h: (*C.QWebEngineCookieStore__FilterRequest)(h)} +} + +// NewQWebEngineCookieStore__FilterRequest constructs a new QWebEngineCookieStore::FilterRequest object. +func NewQWebEngineCookieStore__FilterRequest(param1 *QWebEngineCookieStore__FilterRequest) *QWebEngineCookieStore__FilterRequest { + var outptr_QWebEngineCookieStore__FilterRequest *C.QWebEngineCookieStore__FilterRequest = nil + + C.QWebEngineCookieStore__FilterRequest_new(param1.cPointer(), &outptr_QWebEngineCookieStore__FilterRequest) + ret := newQWebEngineCookieStore__FilterRequest(outptr_QWebEngineCookieStore__FilterRequest) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineCookieStore__FilterRequest) OperatorAssign(param1 *QWebEngineCookieStore__FilterRequest) { + C.QWebEngineCookieStore__FilterRequest_OperatorAssign(this.h, param1.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QWebEngineCookieStore__FilterRequest) Delete() { + C.QWebEngineCookieStore__FilterRequest_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineCookieStore__FilterRequest) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineCookieStore__FilterRequest) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebenginecookiestore.h b/qt6/webengine/gen_qwebenginecookiestore.h new file mode 100644 index 00000000..911748b8 --- /dev/null +++ b/qt6/webengine/gen_qwebenginecookiestore.h @@ -0,0 +1,63 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINECOOKIESTORE_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINECOOKIESTORE_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QMetaObject; +class QNetworkCookie; +class QObject; +class QUrl; +class QWebEngineCookieStore; +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebEngineCookieStore__FilterRequest) +typedef QWebEngineCookieStore::FilterRequest QWebEngineCookieStore__FilterRequest; +#else +class QWebEngineCookieStore__FilterRequest; +#endif +#else +typedef struct QMetaObject QMetaObject; +typedef struct QNetworkCookie QNetworkCookie; +typedef struct QObject QObject; +typedef struct QUrl QUrl; +typedef struct QWebEngineCookieStore QWebEngineCookieStore; +typedef struct QWebEngineCookieStore__FilterRequest QWebEngineCookieStore__FilterRequest; +#endif + +QMetaObject* QWebEngineCookieStore_MetaObject(const QWebEngineCookieStore* self); +void* QWebEngineCookieStore_Metacast(QWebEngineCookieStore* self, const char* param1); +struct miqt_string QWebEngineCookieStore_Tr(const char* s); +void QWebEngineCookieStore_SetCookie(QWebEngineCookieStore* self, QNetworkCookie* cookie); +void QWebEngineCookieStore_DeleteCookie(QWebEngineCookieStore* self, QNetworkCookie* cookie); +void QWebEngineCookieStore_DeleteSessionCookies(QWebEngineCookieStore* self); +void QWebEngineCookieStore_DeleteAllCookies(QWebEngineCookieStore* self); +void QWebEngineCookieStore_LoadAllCookies(QWebEngineCookieStore* self); +void QWebEngineCookieStore_CookieAdded(QWebEngineCookieStore* self, QNetworkCookie* cookie); +void QWebEngineCookieStore_connect_CookieAdded(QWebEngineCookieStore* self, intptr_t slot); +void QWebEngineCookieStore_CookieRemoved(QWebEngineCookieStore* self, QNetworkCookie* cookie); +void QWebEngineCookieStore_connect_CookieRemoved(QWebEngineCookieStore* self, intptr_t slot); +struct miqt_string QWebEngineCookieStore_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineCookieStore_Tr3(const char* s, const char* c, int n); +void QWebEngineCookieStore_SetCookie2(QWebEngineCookieStore* self, QNetworkCookie* cookie, QUrl* origin); +void QWebEngineCookieStore_DeleteCookie2(QWebEngineCookieStore* self, QNetworkCookie* cookie, QUrl* origin); +void QWebEngineCookieStore_Delete(QWebEngineCookieStore* self, bool isSubclass); + +void QWebEngineCookieStore__FilterRequest_new(QWebEngineCookieStore__FilterRequest* param1, QWebEngineCookieStore__FilterRequest** outptr_QWebEngineCookieStore__FilterRequest); +void QWebEngineCookieStore__FilterRequest_OperatorAssign(QWebEngineCookieStore__FilterRequest* self, QWebEngineCookieStore__FilterRequest* param1); +void QWebEngineCookieStore__FilterRequest_Delete(QWebEngineCookieStore__FilterRequest* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebenginedownloadrequest.cpp b/qt6/webengine/gen_qwebenginedownloadrequest.cpp new file mode 100644 index 00000000..9d0719ed --- /dev/null +++ b/qt6/webengine/gen_qwebenginedownloadrequest.cpp @@ -0,0 +1,288 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebenginedownloadrequest.h" +#include "_cgo_export.h" + +QMetaObject* QWebEngineDownloadRequest_MetaObject(const QWebEngineDownloadRequest* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineDownloadRequest_Metacast(QWebEngineDownloadRequest* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineDownloadRequest_Tr(const char* s) { + QString _ret = QWebEngineDownloadRequest::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +unsigned int QWebEngineDownloadRequest_Id(const QWebEngineDownloadRequest* self) { + quint32 _ret = self->id(); + return static_cast(_ret); +} + +int QWebEngineDownloadRequest_State(const QWebEngineDownloadRequest* self) { + QWebEngineDownloadRequest::DownloadState _ret = self->state(); + return static_cast(_ret); +} + +long long QWebEngineDownloadRequest_TotalBytes(const QWebEngineDownloadRequest* self) { + qint64 _ret = self->totalBytes(); + return static_cast(_ret); +} + +long long QWebEngineDownloadRequest_ReceivedBytes(const QWebEngineDownloadRequest* self) { + qint64 _ret = self->receivedBytes(); + return static_cast(_ret); +} + +QUrl* QWebEngineDownloadRequest_Url(const QWebEngineDownloadRequest* self) { + return new QUrl(self->url()); +} + +struct miqt_string QWebEngineDownloadRequest_MimeType(const QWebEngineDownloadRequest* self) { + QString _ret = self->mimeType(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QWebEngineDownloadRequest_IsFinished(const QWebEngineDownloadRequest* self) { + return self->isFinished(); +} + +bool QWebEngineDownloadRequest_IsPaused(const QWebEngineDownloadRequest* self) { + return self->isPaused(); +} + +int QWebEngineDownloadRequest_SavePageFormat(const QWebEngineDownloadRequest* self) { + QWebEngineDownloadRequest::SavePageFormat _ret = self->savePageFormat(); + return static_cast(_ret); +} + +void QWebEngineDownloadRequest_SetSavePageFormat(QWebEngineDownloadRequest* self, int format) { + self->setSavePageFormat(static_cast(format)); +} + +int QWebEngineDownloadRequest_InterruptReason(const QWebEngineDownloadRequest* self) { + QWebEngineDownloadRequest::DownloadInterruptReason _ret = self->interruptReason(); + return static_cast(_ret); +} + +struct miqt_string QWebEngineDownloadRequest_InterruptReasonString(const QWebEngineDownloadRequest* self) { + QString _ret = self->interruptReasonString(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QWebEngineDownloadRequest_IsSavePageDownload(const QWebEngineDownloadRequest* self) { + return self->isSavePageDownload(); +} + +struct miqt_string QWebEngineDownloadRequest_SuggestedFileName(const QWebEngineDownloadRequest* self) { + QString _ret = self->suggestedFileName(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineDownloadRequest_DownloadDirectory(const QWebEngineDownloadRequest* self) { + QString _ret = self->downloadDirectory(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineDownloadRequest_SetDownloadDirectory(QWebEngineDownloadRequest* self, struct miqt_string directory) { + QString directory_QString = QString::fromUtf8(directory.data, directory.len); + self->setDownloadDirectory(directory_QString); +} + +struct miqt_string QWebEngineDownloadRequest_DownloadFileName(const QWebEngineDownloadRequest* self) { + QString _ret = self->downloadFileName(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineDownloadRequest_SetDownloadFileName(QWebEngineDownloadRequest* self, struct miqt_string fileName) { + QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); + self->setDownloadFileName(fileName_QString); +} + +QWebEnginePage* QWebEngineDownloadRequest_Page(const QWebEngineDownloadRequest* self) { + return self->page(); +} + +void QWebEngineDownloadRequest_Accept(QWebEngineDownloadRequest* self) { + self->accept(); +} + +void QWebEngineDownloadRequest_Cancel(QWebEngineDownloadRequest* self) { + self->cancel(); +} + +void QWebEngineDownloadRequest_Pause(QWebEngineDownloadRequest* self) { + self->pause(); +} + +void QWebEngineDownloadRequest_Resume(QWebEngineDownloadRequest* self) { + self->resume(); +} + +void QWebEngineDownloadRequest_StateChanged(QWebEngineDownloadRequest* self, int state) { + self->stateChanged(static_cast(state)); +} + +void QWebEngineDownloadRequest_connect_StateChanged(QWebEngineDownloadRequest* self, intptr_t slot) { + QWebEngineDownloadRequest::connect(self, static_cast(&QWebEngineDownloadRequest::stateChanged), self, [=](QWebEngineDownloadRequest::DownloadState state) { + QWebEngineDownloadRequest::DownloadState state_ret = state; + int sigval1 = static_cast(state_ret); + miqt_exec_callback_QWebEngineDownloadRequest_StateChanged(slot, sigval1); + }); +} + +void QWebEngineDownloadRequest_SavePageFormatChanged(QWebEngineDownloadRequest* self) { + self->savePageFormatChanged(); +} + +void QWebEngineDownloadRequest_connect_SavePageFormatChanged(QWebEngineDownloadRequest* self, intptr_t slot) { + QWebEngineDownloadRequest::connect(self, static_cast(&QWebEngineDownloadRequest::savePageFormatChanged), self, [=]() { + miqt_exec_callback_QWebEngineDownloadRequest_SavePageFormatChanged(slot); + }); +} + +void QWebEngineDownloadRequest_ReceivedBytesChanged(QWebEngineDownloadRequest* self) { + self->receivedBytesChanged(); +} + +void QWebEngineDownloadRequest_connect_ReceivedBytesChanged(QWebEngineDownloadRequest* self, intptr_t slot) { + QWebEngineDownloadRequest::connect(self, static_cast(&QWebEngineDownloadRequest::receivedBytesChanged), self, [=]() { + miqt_exec_callback_QWebEngineDownloadRequest_ReceivedBytesChanged(slot); + }); +} + +void QWebEngineDownloadRequest_TotalBytesChanged(QWebEngineDownloadRequest* self) { + self->totalBytesChanged(); +} + +void QWebEngineDownloadRequest_connect_TotalBytesChanged(QWebEngineDownloadRequest* self, intptr_t slot) { + QWebEngineDownloadRequest::connect(self, static_cast(&QWebEngineDownloadRequest::totalBytesChanged), self, [=]() { + miqt_exec_callback_QWebEngineDownloadRequest_TotalBytesChanged(slot); + }); +} + +void QWebEngineDownloadRequest_InterruptReasonChanged(QWebEngineDownloadRequest* self) { + self->interruptReasonChanged(); +} + +void QWebEngineDownloadRequest_connect_InterruptReasonChanged(QWebEngineDownloadRequest* self, intptr_t slot) { + QWebEngineDownloadRequest::connect(self, static_cast(&QWebEngineDownloadRequest::interruptReasonChanged), self, [=]() { + miqt_exec_callback_QWebEngineDownloadRequest_InterruptReasonChanged(slot); + }); +} + +void QWebEngineDownloadRequest_IsFinishedChanged(QWebEngineDownloadRequest* self) { + self->isFinishedChanged(); +} + +void QWebEngineDownloadRequest_connect_IsFinishedChanged(QWebEngineDownloadRequest* self, intptr_t slot) { + QWebEngineDownloadRequest::connect(self, static_cast(&QWebEngineDownloadRequest::isFinishedChanged), self, [=]() { + miqt_exec_callback_QWebEngineDownloadRequest_IsFinishedChanged(slot); + }); +} + +void QWebEngineDownloadRequest_IsPausedChanged(QWebEngineDownloadRequest* self) { + self->isPausedChanged(); +} + +void QWebEngineDownloadRequest_connect_IsPausedChanged(QWebEngineDownloadRequest* self, intptr_t slot) { + QWebEngineDownloadRequest::connect(self, static_cast(&QWebEngineDownloadRequest::isPausedChanged), self, [=]() { + miqt_exec_callback_QWebEngineDownloadRequest_IsPausedChanged(slot); + }); +} + +void QWebEngineDownloadRequest_DownloadDirectoryChanged(QWebEngineDownloadRequest* self) { + self->downloadDirectoryChanged(); +} + +void QWebEngineDownloadRequest_connect_DownloadDirectoryChanged(QWebEngineDownloadRequest* self, intptr_t slot) { + QWebEngineDownloadRequest::connect(self, static_cast(&QWebEngineDownloadRequest::downloadDirectoryChanged), self, [=]() { + miqt_exec_callback_QWebEngineDownloadRequest_DownloadDirectoryChanged(slot); + }); +} + +void QWebEngineDownloadRequest_DownloadFileNameChanged(QWebEngineDownloadRequest* self) { + self->downloadFileNameChanged(); +} + +void QWebEngineDownloadRequest_connect_DownloadFileNameChanged(QWebEngineDownloadRequest* self, intptr_t slot) { + QWebEngineDownloadRequest::connect(self, static_cast(&QWebEngineDownloadRequest::downloadFileNameChanged), self, [=]() { + miqt_exec_callback_QWebEngineDownloadRequest_DownloadFileNameChanged(slot); + }); +} + +struct miqt_string QWebEngineDownloadRequest_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineDownloadRequest::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineDownloadRequest_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineDownloadRequest::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineDownloadRequest_Delete(QWebEngineDownloadRequest* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebenginedownloadrequest.go b/qt6/webengine/gen_qwebenginedownloadrequest.go new file mode 100644 index 00000000..75c8fd42 --- /dev/null +++ b/qt6/webengine/gen_qwebenginedownloadrequest.go @@ -0,0 +1,432 @@ +package webengine + +/* + +#include "gen_qwebenginedownloadrequest.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebEngineDownloadRequest__DownloadState int + +const ( + QWebEngineDownloadRequest__DownloadRequested QWebEngineDownloadRequest__DownloadState = 0 + QWebEngineDownloadRequest__DownloadInProgress QWebEngineDownloadRequest__DownloadState = 1 + QWebEngineDownloadRequest__DownloadCompleted QWebEngineDownloadRequest__DownloadState = 2 + QWebEngineDownloadRequest__DownloadCancelled QWebEngineDownloadRequest__DownloadState = 3 + QWebEngineDownloadRequest__DownloadInterrupted QWebEngineDownloadRequest__DownloadState = 4 +) + +type QWebEngineDownloadRequest__SavePageFormat int + +const ( + QWebEngineDownloadRequest__UnknownSaveFormat QWebEngineDownloadRequest__SavePageFormat = -1 + QWebEngineDownloadRequest__SingleHtmlSaveFormat QWebEngineDownloadRequest__SavePageFormat = 0 + QWebEngineDownloadRequest__CompleteHtmlSaveFormat QWebEngineDownloadRequest__SavePageFormat = 1 + QWebEngineDownloadRequest__MimeHtmlSaveFormat QWebEngineDownloadRequest__SavePageFormat = 2 +) + +type QWebEngineDownloadRequest__DownloadInterruptReason int + +const ( + QWebEngineDownloadRequest__NoReason QWebEngineDownloadRequest__DownloadInterruptReason = 0 + QWebEngineDownloadRequest__FileFailed QWebEngineDownloadRequest__DownloadInterruptReason = 1 + QWebEngineDownloadRequest__FileAccessDenied QWebEngineDownloadRequest__DownloadInterruptReason = 2 + QWebEngineDownloadRequest__FileNoSpace QWebEngineDownloadRequest__DownloadInterruptReason = 3 + QWebEngineDownloadRequest__FileNameTooLong QWebEngineDownloadRequest__DownloadInterruptReason = 5 + QWebEngineDownloadRequest__FileTooLarge QWebEngineDownloadRequest__DownloadInterruptReason = 6 + QWebEngineDownloadRequest__FileVirusInfected QWebEngineDownloadRequest__DownloadInterruptReason = 7 + QWebEngineDownloadRequest__FileTransientError QWebEngineDownloadRequest__DownloadInterruptReason = 10 + QWebEngineDownloadRequest__FileBlocked QWebEngineDownloadRequest__DownloadInterruptReason = 11 + QWebEngineDownloadRequest__FileSecurityCheckFailed QWebEngineDownloadRequest__DownloadInterruptReason = 12 + QWebEngineDownloadRequest__FileTooShort QWebEngineDownloadRequest__DownloadInterruptReason = 13 + QWebEngineDownloadRequest__FileHashMismatch QWebEngineDownloadRequest__DownloadInterruptReason = 14 + QWebEngineDownloadRequest__NetworkFailed QWebEngineDownloadRequest__DownloadInterruptReason = 20 + QWebEngineDownloadRequest__NetworkTimeout QWebEngineDownloadRequest__DownloadInterruptReason = 21 + QWebEngineDownloadRequest__NetworkDisconnected QWebEngineDownloadRequest__DownloadInterruptReason = 22 + QWebEngineDownloadRequest__NetworkServerDown QWebEngineDownloadRequest__DownloadInterruptReason = 23 + QWebEngineDownloadRequest__NetworkInvalidRequest QWebEngineDownloadRequest__DownloadInterruptReason = 24 + QWebEngineDownloadRequest__ServerFailed QWebEngineDownloadRequest__DownloadInterruptReason = 30 + QWebEngineDownloadRequest__ServerBadContent QWebEngineDownloadRequest__DownloadInterruptReason = 33 + QWebEngineDownloadRequest__ServerUnauthorized QWebEngineDownloadRequest__DownloadInterruptReason = 34 + QWebEngineDownloadRequest__ServerCertProblem QWebEngineDownloadRequest__DownloadInterruptReason = 35 + QWebEngineDownloadRequest__ServerForbidden QWebEngineDownloadRequest__DownloadInterruptReason = 36 + QWebEngineDownloadRequest__ServerUnreachable QWebEngineDownloadRequest__DownloadInterruptReason = 37 + QWebEngineDownloadRequest__UserCanceled QWebEngineDownloadRequest__DownloadInterruptReason = 40 +) + +type QWebEngineDownloadRequest struct { + h *C.QWebEngineDownloadRequest + isSubclass bool + *qt6.QObject +} + +func (this *QWebEngineDownloadRequest) cPointer() *C.QWebEngineDownloadRequest { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineDownloadRequest) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineDownloadRequest constructs the type using only CGO pointers. +func newQWebEngineDownloadRequest(h *C.QWebEngineDownloadRequest, h_QObject *C.QObject) *QWebEngineDownloadRequest { + if h == nil { + return nil + } + return &QWebEngineDownloadRequest{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEngineDownloadRequest constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineDownloadRequest(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineDownloadRequest { + if h == nil { + return nil + } + + return &QWebEngineDownloadRequest{h: (*C.QWebEngineDownloadRequest)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} +} + +func (this *QWebEngineDownloadRequest) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineDownloadRequest_MetaObject(this.h))) +} + +func (this *QWebEngineDownloadRequest) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineDownloadRequest_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineDownloadRequest_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineDownloadRequest_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineDownloadRequest) Id() uint { + return (uint)(C.QWebEngineDownloadRequest_Id(this.h)) +} + +func (this *QWebEngineDownloadRequest) State() QWebEngineDownloadRequest__DownloadState { + return (QWebEngineDownloadRequest__DownloadState)(C.QWebEngineDownloadRequest_State(this.h)) +} + +func (this *QWebEngineDownloadRequest) TotalBytes() int64 { + return (int64)(C.QWebEngineDownloadRequest_TotalBytes(this.h)) +} + +func (this *QWebEngineDownloadRequest) ReceivedBytes() int64 { + return (int64)(C.QWebEngineDownloadRequest_ReceivedBytes(this.h)) +} + +func (this *QWebEngineDownloadRequest) Url() *qt6.QUrl { + _ret := C.QWebEngineDownloadRequest_Url(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineDownloadRequest) MimeType() string { + var _ms C.struct_miqt_string = C.QWebEngineDownloadRequest_MimeType(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineDownloadRequest) IsFinished() bool { + return (bool)(C.QWebEngineDownloadRequest_IsFinished(this.h)) +} + +func (this *QWebEngineDownloadRequest) IsPaused() bool { + return (bool)(C.QWebEngineDownloadRequest_IsPaused(this.h)) +} + +func (this *QWebEngineDownloadRequest) SavePageFormat() QWebEngineDownloadRequest__SavePageFormat { + return (QWebEngineDownloadRequest__SavePageFormat)(C.QWebEngineDownloadRequest_SavePageFormat(this.h)) +} + +func (this *QWebEngineDownloadRequest) SetSavePageFormat(format QWebEngineDownloadRequest__SavePageFormat) { + C.QWebEngineDownloadRequest_SetSavePageFormat(this.h, (C.int)(format)) +} + +func (this *QWebEngineDownloadRequest) InterruptReason() QWebEngineDownloadRequest__DownloadInterruptReason { + return (QWebEngineDownloadRequest__DownloadInterruptReason)(C.QWebEngineDownloadRequest_InterruptReason(this.h)) +} + +func (this *QWebEngineDownloadRequest) InterruptReasonString() string { + var _ms C.struct_miqt_string = C.QWebEngineDownloadRequest_InterruptReasonString(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineDownloadRequest) IsSavePageDownload() bool { + return (bool)(C.QWebEngineDownloadRequest_IsSavePageDownload(this.h)) +} + +func (this *QWebEngineDownloadRequest) SuggestedFileName() string { + var _ms C.struct_miqt_string = C.QWebEngineDownloadRequest_SuggestedFileName(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineDownloadRequest) DownloadDirectory() string { + var _ms C.struct_miqt_string = C.QWebEngineDownloadRequest_DownloadDirectory(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineDownloadRequest) SetDownloadDirectory(directory string) { + directory_ms := C.struct_miqt_string{} + directory_ms.data = C.CString(directory) + directory_ms.len = C.size_t(len(directory)) + defer C.free(unsafe.Pointer(directory_ms.data)) + C.QWebEngineDownloadRequest_SetDownloadDirectory(this.h, directory_ms) +} + +func (this *QWebEngineDownloadRequest) DownloadFileName() string { + var _ms C.struct_miqt_string = C.QWebEngineDownloadRequest_DownloadFileName(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineDownloadRequest) SetDownloadFileName(fileName string) { + fileName_ms := C.struct_miqt_string{} + fileName_ms.data = C.CString(fileName) + fileName_ms.len = C.size_t(len(fileName)) + defer C.free(unsafe.Pointer(fileName_ms.data)) + C.QWebEngineDownloadRequest_SetDownloadFileName(this.h, fileName_ms) +} + +func (this *QWebEngineDownloadRequest) Page() *QWebEnginePage { + return UnsafeNewQWebEnginePage(unsafe.Pointer(C.QWebEngineDownloadRequest_Page(this.h)), nil) +} + +func (this *QWebEngineDownloadRequest) Accept() { + C.QWebEngineDownloadRequest_Accept(this.h) +} + +func (this *QWebEngineDownloadRequest) Cancel() { + C.QWebEngineDownloadRequest_Cancel(this.h) +} + +func (this *QWebEngineDownloadRequest) Pause() { + C.QWebEngineDownloadRequest_Pause(this.h) +} + +func (this *QWebEngineDownloadRequest) Resume() { + C.QWebEngineDownloadRequest_Resume(this.h) +} + +func (this *QWebEngineDownloadRequest) StateChanged(state QWebEngineDownloadRequest__DownloadState) { + C.QWebEngineDownloadRequest_StateChanged(this.h, (C.int)(state)) +} +func (this *QWebEngineDownloadRequest) OnStateChanged(slot func(state QWebEngineDownloadRequest__DownloadState)) { + C.QWebEngineDownloadRequest_connect_StateChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineDownloadRequest_StateChanged +func miqt_exec_callback_QWebEngineDownloadRequest_StateChanged(cb C.intptr_t, state C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(state QWebEngineDownloadRequest__DownloadState)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebEngineDownloadRequest__DownloadState)(state) + + gofunc(slotval1) +} + +func (this *QWebEngineDownloadRequest) SavePageFormatChanged() { + C.QWebEngineDownloadRequest_SavePageFormatChanged(this.h) +} +func (this *QWebEngineDownloadRequest) OnSavePageFormatChanged(slot func()) { + C.QWebEngineDownloadRequest_connect_SavePageFormatChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineDownloadRequest_SavePageFormatChanged +func miqt_exec_callback_QWebEngineDownloadRequest_SavePageFormatChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEngineDownloadRequest) ReceivedBytesChanged() { + C.QWebEngineDownloadRequest_ReceivedBytesChanged(this.h) +} +func (this *QWebEngineDownloadRequest) OnReceivedBytesChanged(slot func()) { + C.QWebEngineDownloadRequest_connect_ReceivedBytesChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineDownloadRequest_ReceivedBytesChanged +func miqt_exec_callback_QWebEngineDownloadRequest_ReceivedBytesChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEngineDownloadRequest) TotalBytesChanged() { + C.QWebEngineDownloadRequest_TotalBytesChanged(this.h) +} +func (this *QWebEngineDownloadRequest) OnTotalBytesChanged(slot func()) { + C.QWebEngineDownloadRequest_connect_TotalBytesChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineDownloadRequest_TotalBytesChanged +func miqt_exec_callback_QWebEngineDownloadRequest_TotalBytesChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEngineDownloadRequest) InterruptReasonChanged() { + C.QWebEngineDownloadRequest_InterruptReasonChanged(this.h) +} +func (this *QWebEngineDownloadRequest) OnInterruptReasonChanged(slot func()) { + C.QWebEngineDownloadRequest_connect_InterruptReasonChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineDownloadRequest_InterruptReasonChanged +func miqt_exec_callback_QWebEngineDownloadRequest_InterruptReasonChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEngineDownloadRequest) IsFinishedChanged() { + C.QWebEngineDownloadRequest_IsFinishedChanged(this.h) +} +func (this *QWebEngineDownloadRequest) OnIsFinishedChanged(slot func()) { + C.QWebEngineDownloadRequest_connect_IsFinishedChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineDownloadRequest_IsFinishedChanged +func miqt_exec_callback_QWebEngineDownloadRequest_IsFinishedChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEngineDownloadRequest) IsPausedChanged() { + C.QWebEngineDownloadRequest_IsPausedChanged(this.h) +} +func (this *QWebEngineDownloadRequest) OnIsPausedChanged(slot func()) { + C.QWebEngineDownloadRequest_connect_IsPausedChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineDownloadRequest_IsPausedChanged +func miqt_exec_callback_QWebEngineDownloadRequest_IsPausedChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEngineDownloadRequest) DownloadDirectoryChanged() { + C.QWebEngineDownloadRequest_DownloadDirectoryChanged(this.h) +} +func (this *QWebEngineDownloadRequest) OnDownloadDirectoryChanged(slot func()) { + C.QWebEngineDownloadRequest_connect_DownloadDirectoryChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineDownloadRequest_DownloadDirectoryChanged +func miqt_exec_callback_QWebEngineDownloadRequest_DownloadDirectoryChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEngineDownloadRequest) DownloadFileNameChanged() { + C.QWebEngineDownloadRequest_DownloadFileNameChanged(this.h) +} +func (this *QWebEngineDownloadRequest) OnDownloadFileNameChanged(slot func()) { + C.QWebEngineDownloadRequest_connect_DownloadFileNameChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineDownloadRequest_DownloadFileNameChanged +func miqt_exec_callback_QWebEngineDownloadRequest_DownloadFileNameChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func QWebEngineDownloadRequest_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineDownloadRequest_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineDownloadRequest_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineDownloadRequest_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebEngineDownloadRequest) Delete() { + C.QWebEngineDownloadRequest_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineDownloadRequest) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineDownloadRequest) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebenginedownloadrequest.h b/qt6/webengine/gen_qwebenginedownloadrequest.h new file mode 100644 index 00000000..d6b2438f --- /dev/null +++ b/qt6/webengine/gen_qwebenginedownloadrequest.h @@ -0,0 +1,83 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINEDOWNLOADREQUEST_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINEDOWNLOADREQUEST_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QMetaObject; +class QObject; +class QUrl; +class QWebEngineDownloadRequest; +class QWebEnginePage; +#else +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QUrl QUrl; +typedef struct QWebEngineDownloadRequest QWebEngineDownloadRequest; +typedef struct QWebEnginePage QWebEnginePage; +#endif + +QMetaObject* QWebEngineDownloadRequest_MetaObject(const QWebEngineDownloadRequest* self); +void* QWebEngineDownloadRequest_Metacast(QWebEngineDownloadRequest* self, const char* param1); +struct miqt_string QWebEngineDownloadRequest_Tr(const char* s); +unsigned int QWebEngineDownloadRequest_Id(const QWebEngineDownloadRequest* self); +int QWebEngineDownloadRequest_State(const QWebEngineDownloadRequest* self); +long long QWebEngineDownloadRequest_TotalBytes(const QWebEngineDownloadRequest* self); +long long QWebEngineDownloadRequest_ReceivedBytes(const QWebEngineDownloadRequest* self); +QUrl* QWebEngineDownloadRequest_Url(const QWebEngineDownloadRequest* self); +struct miqt_string QWebEngineDownloadRequest_MimeType(const QWebEngineDownloadRequest* self); +bool QWebEngineDownloadRequest_IsFinished(const QWebEngineDownloadRequest* self); +bool QWebEngineDownloadRequest_IsPaused(const QWebEngineDownloadRequest* self); +int QWebEngineDownloadRequest_SavePageFormat(const QWebEngineDownloadRequest* self); +void QWebEngineDownloadRequest_SetSavePageFormat(QWebEngineDownloadRequest* self, int format); +int QWebEngineDownloadRequest_InterruptReason(const QWebEngineDownloadRequest* self); +struct miqt_string QWebEngineDownloadRequest_InterruptReasonString(const QWebEngineDownloadRequest* self); +bool QWebEngineDownloadRequest_IsSavePageDownload(const QWebEngineDownloadRequest* self); +struct miqt_string QWebEngineDownloadRequest_SuggestedFileName(const QWebEngineDownloadRequest* self); +struct miqt_string QWebEngineDownloadRequest_DownloadDirectory(const QWebEngineDownloadRequest* self); +void QWebEngineDownloadRequest_SetDownloadDirectory(QWebEngineDownloadRequest* self, struct miqt_string directory); +struct miqt_string QWebEngineDownloadRequest_DownloadFileName(const QWebEngineDownloadRequest* self); +void QWebEngineDownloadRequest_SetDownloadFileName(QWebEngineDownloadRequest* self, struct miqt_string fileName); +QWebEnginePage* QWebEngineDownloadRequest_Page(const QWebEngineDownloadRequest* self); +void QWebEngineDownloadRequest_Accept(QWebEngineDownloadRequest* self); +void QWebEngineDownloadRequest_Cancel(QWebEngineDownloadRequest* self); +void QWebEngineDownloadRequest_Pause(QWebEngineDownloadRequest* self); +void QWebEngineDownloadRequest_Resume(QWebEngineDownloadRequest* self); +void QWebEngineDownloadRequest_StateChanged(QWebEngineDownloadRequest* self, int state); +void QWebEngineDownloadRequest_connect_StateChanged(QWebEngineDownloadRequest* self, intptr_t slot); +void QWebEngineDownloadRequest_SavePageFormatChanged(QWebEngineDownloadRequest* self); +void QWebEngineDownloadRequest_connect_SavePageFormatChanged(QWebEngineDownloadRequest* self, intptr_t slot); +void QWebEngineDownloadRequest_ReceivedBytesChanged(QWebEngineDownloadRequest* self); +void QWebEngineDownloadRequest_connect_ReceivedBytesChanged(QWebEngineDownloadRequest* self, intptr_t slot); +void QWebEngineDownloadRequest_TotalBytesChanged(QWebEngineDownloadRequest* self); +void QWebEngineDownloadRequest_connect_TotalBytesChanged(QWebEngineDownloadRequest* self, intptr_t slot); +void QWebEngineDownloadRequest_InterruptReasonChanged(QWebEngineDownloadRequest* self); +void QWebEngineDownloadRequest_connect_InterruptReasonChanged(QWebEngineDownloadRequest* self, intptr_t slot); +void QWebEngineDownloadRequest_IsFinishedChanged(QWebEngineDownloadRequest* self); +void QWebEngineDownloadRequest_connect_IsFinishedChanged(QWebEngineDownloadRequest* self, intptr_t slot); +void QWebEngineDownloadRequest_IsPausedChanged(QWebEngineDownloadRequest* self); +void QWebEngineDownloadRequest_connect_IsPausedChanged(QWebEngineDownloadRequest* self, intptr_t slot); +void QWebEngineDownloadRequest_DownloadDirectoryChanged(QWebEngineDownloadRequest* self); +void QWebEngineDownloadRequest_connect_DownloadDirectoryChanged(QWebEngineDownloadRequest* self, intptr_t slot); +void QWebEngineDownloadRequest_DownloadFileNameChanged(QWebEngineDownloadRequest* self); +void QWebEngineDownloadRequest_connect_DownloadFileNameChanged(QWebEngineDownloadRequest* self, intptr_t slot); +struct miqt_string QWebEngineDownloadRequest_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineDownloadRequest_Tr3(const char* s, const char* c, int n); +void QWebEngineDownloadRequest_Delete(QWebEngineDownloadRequest* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebenginefilesystemaccessrequest.cpp b/qt6/webengine/gen_qwebenginefilesystemaccessrequest.cpp new file mode 100644 index 00000000..39aaffd1 --- /dev/null +++ b/qt6/webengine/gen_qwebenginefilesystemaccessrequest.cpp @@ -0,0 +1,53 @@ +#include +#include +#include +#include "gen_qwebenginefilesystemaccessrequest.h" +#include "_cgo_export.h" + +void QWebEngineFileSystemAccessRequest_new(QWebEngineFileSystemAccessRequest* other, QWebEngineFileSystemAccessRequest** outptr_QWebEngineFileSystemAccessRequest) { + QWebEngineFileSystemAccessRequest* ret = new QWebEngineFileSystemAccessRequest(*other); + *outptr_QWebEngineFileSystemAccessRequest = ret; +} + +void QWebEngineFileSystemAccessRequest_OperatorAssign(QWebEngineFileSystemAccessRequest* self, QWebEngineFileSystemAccessRequest* other) { + self->operator=(*other); +} + +void QWebEngineFileSystemAccessRequest_Swap(QWebEngineFileSystemAccessRequest* self, QWebEngineFileSystemAccessRequest* other) { + self->swap(*other); +} + +void QWebEngineFileSystemAccessRequest_Accept(QWebEngineFileSystemAccessRequest* self) { + self->accept(); +} + +void QWebEngineFileSystemAccessRequest_Reject(QWebEngineFileSystemAccessRequest* self) { + self->reject(); +} + +QUrl* QWebEngineFileSystemAccessRequest_Origin(const QWebEngineFileSystemAccessRequest* self) { + return new QUrl(self->origin()); +} + +QUrl* QWebEngineFileSystemAccessRequest_FilePath(const QWebEngineFileSystemAccessRequest* self) { + return new QUrl(self->filePath()); +} + +int QWebEngineFileSystemAccessRequest_HandleType(const QWebEngineFileSystemAccessRequest* self) { + QWebEngineFileSystemAccessRequest::HandleType _ret = self->handleType(); + return static_cast(_ret); +} + +int QWebEngineFileSystemAccessRequest_AccessFlags(const QWebEngineFileSystemAccessRequest* self) { + QWebEngineFileSystemAccessRequest::AccessFlags _ret = self->accessFlags(); + return static_cast(_ret); +} + +void QWebEngineFileSystemAccessRequest_Delete(QWebEngineFileSystemAccessRequest* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebenginefilesystemaccessrequest.go b/qt6/webengine/gen_qwebenginefilesystemaccessrequest.go new file mode 100644 index 00000000..3e490d98 --- /dev/null +++ b/qt6/webengine/gen_qwebenginefilesystemaccessrequest.go @@ -0,0 +1,127 @@ +package webengine + +/* + +#include "gen_qwebenginefilesystemaccessrequest.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "unsafe" +) + +type QWebEngineFileSystemAccessRequest__HandleType int + +const ( + QWebEngineFileSystemAccessRequest__File QWebEngineFileSystemAccessRequest__HandleType = 0 + QWebEngineFileSystemAccessRequest__Directory QWebEngineFileSystemAccessRequest__HandleType = 1 +) + +type QWebEngineFileSystemAccessRequest__AccessFlag int + +const ( + QWebEngineFileSystemAccessRequest__Read QWebEngineFileSystemAccessRequest__AccessFlag = 1 + QWebEngineFileSystemAccessRequest__Write QWebEngineFileSystemAccessRequest__AccessFlag = 2 +) + +type QWebEngineFileSystemAccessRequest struct { + h *C.QWebEngineFileSystemAccessRequest + isSubclass bool +} + +func (this *QWebEngineFileSystemAccessRequest) cPointer() *C.QWebEngineFileSystemAccessRequest { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineFileSystemAccessRequest) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineFileSystemAccessRequest constructs the type using only CGO pointers. +func newQWebEngineFileSystemAccessRequest(h *C.QWebEngineFileSystemAccessRequest) *QWebEngineFileSystemAccessRequest { + if h == nil { + return nil + } + return &QWebEngineFileSystemAccessRequest{h: h} +} + +// UnsafeNewQWebEngineFileSystemAccessRequest constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineFileSystemAccessRequest(h unsafe.Pointer) *QWebEngineFileSystemAccessRequest { + if h == nil { + return nil + } + + return &QWebEngineFileSystemAccessRequest{h: (*C.QWebEngineFileSystemAccessRequest)(h)} +} + +// NewQWebEngineFileSystemAccessRequest constructs a new QWebEngineFileSystemAccessRequest object. +func NewQWebEngineFileSystemAccessRequest(other *QWebEngineFileSystemAccessRequest) *QWebEngineFileSystemAccessRequest { + var outptr_QWebEngineFileSystemAccessRequest *C.QWebEngineFileSystemAccessRequest = nil + + C.QWebEngineFileSystemAccessRequest_new(other.cPointer(), &outptr_QWebEngineFileSystemAccessRequest) + ret := newQWebEngineFileSystemAccessRequest(outptr_QWebEngineFileSystemAccessRequest) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineFileSystemAccessRequest) OperatorAssign(other *QWebEngineFileSystemAccessRequest) { + C.QWebEngineFileSystemAccessRequest_OperatorAssign(this.h, other.cPointer()) +} + +func (this *QWebEngineFileSystemAccessRequest) Swap(other *QWebEngineFileSystemAccessRequest) { + C.QWebEngineFileSystemAccessRequest_Swap(this.h, other.cPointer()) +} + +func (this *QWebEngineFileSystemAccessRequest) Accept() { + C.QWebEngineFileSystemAccessRequest_Accept(this.h) +} + +func (this *QWebEngineFileSystemAccessRequest) Reject() { + C.QWebEngineFileSystemAccessRequest_Reject(this.h) +} + +func (this *QWebEngineFileSystemAccessRequest) Origin() *qt6.QUrl { + _ret := C.QWebEngineFileSystemAccessRequest_Origin(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineFileSystemAccessRequest) FilePath() *qt6.QUrl { + _ret := C.QWebEngineFileSystemAccessRequest_FilePath(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineFileSystemAccessRequest) HandleType() QWebEngineFileSystemAccessRequest__HandleType { + return (QWebEngineFileSystemAccessRequest__HandleType)(C.QWebEngineFileSystemAccessRequest_HandleType(this.h)) +} + +func (this *QWebEngineFileSystemAccessRequest) AccessFlags() QWebEngineFileSystemAccessRequest__AccessFlag { + return (QWebEngineFileSystemAccessRequest__AccessFlag)(C.QWebEngineFileSystemAccessRequest_AccessFlags(this.h)) +} + +// Delete this object from C++ memory. +func (this *QWebEngineFileSystemAccessRequest) Delete() { + C.QWebEngineFileSystemAccessRequest_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineFileSystemAccessRequest) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineFileSystemAccessRequest) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebenginefilesystemaccessrequest.h b/qt6/webengine/gen_qwebenginefilesystemaccessrequest.h new file mode 100644 index 00000000..cede3862 --- /dev/null +++ b/qt6/webengine/gen_qwebenginefilesystemaccessrequest.h @@ -0,0 +1,40 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINEFILESYSTEMACCESSREQUEST_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINEFILESYSTEMACCESSREQUEST_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QUrl; +class QWebEngineFileSystemAccessRequest; +#else +typedef struct QUrl QUrl; +typedef struct QWebEngineFileSystemAccessRequest QWebEngineFileSystemAccessRequest; +#endif + +void QWebEngineFileSystemAccessRequest_new(QWebEngineFileSystemAccessRequest* other, QWebEngineFileSystemAccessRequest** outptr_QWebEngineFileSystemAccessRequest); +void QWebEngineFileSystemAccessRequest_OperatorAssign(QWebEngineFileSystemAccessRequest* self, QWebEngineFileSystemAccessRequest* other); +void QWebEngineFileSystemAccessRequest_Swap(QWebEngineFileSystemAccessRequest* self, QWebEngineFileSystemAccessRequest* other); +void QWebEngineFileSystemAccessRequest_Accept(QWebEngineFileSystemAccessRequest* self); +void QWebEngineFileSystemAccessRequest_Reject(QWebEngineFileSystemAccessRequest* self); +QUrl* QWebEngineFileSystemAccessRequest_Origin(const QWebEngineFileSystemAccessRequest* self); +QUrl* QWebEngineFileSystemAccessRequest_FilePath(const QWebEngineFileSystemAccessRequest* self); +int QWebEngineFileSystemAccessRequest_HandleType(const QWebEngineFileSystemAccessRequest* self); +int QWebEngineFileSystemAccessRequest_AccessFlags(const QWebEngineFileSystemAccessRequest* self); +void QWebEngineFileSystemAccessRequest_Delete(QWebEngineFileSystemAccessRequest* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebenginefindtextresult.cpp b/qt6/webengine/gen_qwebenginefindtextresult.cpp new file mode 100644 index 00000000..855ab8f3 --- /dev/null +++ b/qt6/webengine/gen_qwebenginefindtextresult.cpp @@ -0,0 +1,35 @@ +#include +#include +#include "gen_qwebenginefindtextresult.h" +#include "_cgo_export.h" + +void QWebEngineFindTextResult_new(QWebEngineFindTextResult** outptr_QWebEngineFindTextResult) { + QWebEngineFindTextResult* ret = new QWebEngineFindTextResult(); + *outptr_QWebEngineFindTextResult = ret; +} + +void QWebEngineFindTextResult_new2(QWebEngineFindTextResult* other, QWebEngineFindTextResult** outptr_QWebEngineFindTextResult) { + QWebEngineFindTextResult* ret = new QWebEngineFindTextResult(*other); + *outptr_QWebEngineFindTextResult = ret; +} + +int QWebEngineFindTextResult_NumberOfMatches(const QWebEngineFindTextResult* self) { + return self->numberOfMatches(); +} + +int QWebEngineFindTextResult_ActiveMatch(const QWebEngineFindTextResult* self) { + return self->activeMatch(); +} + +void QWebEngineFindTextResult_OperatorAssign(QWebEngineFindTextResult* self, QWebEngineFindTextResult* other) { + self->operator=(*other); +} + +void QWebEngineFindTextResult_Delete(QWebEngineFindTextResult* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebenginefindtextresult.go b/qt6/webengine/gen_qwebenginefindtextresult.go new file mode 100644 index 00000000..bff61d4a --- /dev/null +++ b/qt6/webengine/gen_qwebenginefindtextresult.go @@ -0,0 +1,96 @@ +package webengine + +/* + +#include "gen_qwebenginefindtextresult.h" +#include + +*/ +import "C" + +import ( + "runtime" + "unsafe" +) + +type QWebEngineFindTextResult struct { + h *C.QWebEngineFindTextResult + isSubclass bool +} + +func (this *QWebEngineFindTextResult) cPointer() *C.QWebEngineFindTextResult { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineFindTextResult) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineFindTextResult constructs the type using only CGO pointers. +func newQWebEngineFindTextResult(h *C.QWebEngineFindTextResult) *QWebEngineFindTextResult { + if h == nil { + return nil + } + return &QWebEngineFindTextResult{h: h} +} + +// UnsafeNewQWebEngineFindTextResult constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineFindTextResult(h unsafe.Pointer) *QWebEngineFindTextResult { + if h == nil { + return nil + } + + return &QWebEngineFindTextResult{h: (*C.QWebEngineFindTextResult)(h)} +} + +// NewQWebEngineFindTextResult constructs a new QWebEngineFindTextResult object. +func NewQWebEngineFindTextResult() *QWebEngineFindTextResult { + var outptr_QWebEngineFindTextResult *C.QWebEngineFindTextResult = nil + + C.QWebEngineFindTextResult_new(&outptr_QWebEngineFindTextResult) + ret := newQWebEngineFindTextResult(outptr_QWebEngineFindTextResult) + ret.isSubclass = true + return ret +} + +// NewQWebEngineFindTextResult2 constructs a new QWebEngineFindTextResult object. +func NewQWebEngineFindTextResult2(other *QWebEngineFindTextResult) *QWebEngineFindTextResult { + var outptr_QWebEngineFindTextResult *C.QWebEngineFindTextResult = nil + + C.QWebEngineFindTextResult_new2(other.cPointer(), &outptr_QWebEngineFindTextResult) + ret := newQWebEngineFindTextResult(outptr_QWebEngineFindTextResult) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineFindTextResult) NumberOfMatches() int { + return (int)(C.QWebEngineFindTextResult_NumberOfMatches(this.h)) +} + +func (this *QWebEngineFindTextResult) ActiveMatch() int { + return (int)(C.QWebEngineFindTextResult_ActiveMatch(this.h)) +} + +func (this *QWebEngineFindTextResult) OperatorAssign(other *QWebEngineFindTextResult) { + C.QWebEngineFindTextResult_OperatorAssign(this.h, other.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QWebEngineFindTextResult) Delete() { + C.QWebEngineFindTextResult_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineFindTextResult) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineFindTextResult) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebenginefindtextresult.h b/qt6/webengine/gen_qwebenginefindtextresult.h new file mode 100644 index 00000000..d7262e50 --- /dev/null +++ b/qt6/webengine/gen_qwebenginefindtextresult.h @@ -0,0 +1,34 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINEFINDTEXTRESULT_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINEFINDTEXTRESULT_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QWebEngineFindTextResult; +#else +typedef struct QWebEngineFindTextResult QWebEngineFindTextResult; +#endif + +void QWebEngineFindTextResult_new(QWebEngineFindTextResult** outptr_QWebEngineFindTextResult); +void QWebEngineFindTextResult_new2(QWebEngineFindTextResult* other, QWebEngineFindTextResult** outptr_QWebEngineFindTextResult); +int QWebEngineFindTextResult_NumberOfMatches(const QWebEngineFindTextResult* self); +int QWebEngineFindTextResult_ActiveMatch(const QWebEngineFindTextResult* self); +void QWebEngineFindTextResult_OperatorAssign(QWebEngineFindTextResult* self, QWebEngineFindTextResult* other); +void QWebEngineFindTextResult_Delete(QWebEngineFindTextResult* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebenginefullscreenrequest.cpp b/qt6/webengine/gen_qwebenginefullscreenrequest.cpp new file mode 100644 index 00000000..3236bc05 --- /dev/null +++ b/qt6/webengine/gen_qwebenginefullscreenrequest.cpp @@ -0,0 +1,39 @@ +#include +#include +#include +#include "gen_qwebenginefullscreenrequest.h" +#include "_cgo_export.h" + +void QWebEngineFullScreenRequest_new(QWebEngineFullScreenRequest* other, QWebEngineFullScreenRequest** outptr_QWebEngineFullScreenRequest) { + QWebEngineFullScreenRequest* ret = new QWebEngineFullScreenRequest(*other); + *outptr_QWebEngineFullScreenRequest = ret; +} + +void QWebEngineFullScreenRequest_OperatorAssign(QWebEngineFullScreenRequest* self, QWebEngineFullScreenRequest* other) { + self->operator=(*other); +} + +void QWebEngineFullScreenRequest_Reject(QWebEngineFullScreenRequest* self) { + self->reject(); +} + +void QWebEngineFullScreenRequest_Accept(QWebEngineFullScreenRequest* self) { + self->accept(); +} + +bool QWebEngineFullScreenRequest_ToggleOn(const QWebEngineFullScreenRequest* self) { + return self->toggleOn(); +} + +QUrl* QWebEngineFullScreenRequest_Origin(const QWebEngineFullScreenRequest* self) { + return new QUrl(self->origin()); +} + +void QWebEngineFullScreenRequest_Delete(QWebEngineFullScreenRequest* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebenginefullscreenrequest.go b/qt6/webengine/gen_qwebenginefullscreenrequest.go new file mode 100644 index 00000000..4ac2f8d8 --- /dev/null +++ b/qt6/webengine/gen_qwebenginefullscreenrequest.go @@ -0,0 +1,98 @@ +package webengine + +/* + +#include "gen_qwebenginefullscreenrequest.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "unsafe" +) + +type QWebEngineFullScreenRequest struct { + h *C.QWebEngineFullScreenRequest + isSubclass bool +} + +func (this *QWebEngineFullScreenRequest) cPointer() *C.QWebEngineFullScreenRequest { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineFullScreenRequest) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineFullScreenRequest constructs the type using only CGO pointers. +func newQWebEngineFullScreenRequest(h *C.QWebEngineFullScreenRequest) *QWebEngineFullScreenRequest { + if h == nil { + return nil + } + return &QWebEngineFullScreenRequest{h: h} +} + +// UnsafeNewQWebEngineFullScreenRequest constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineFullScreenRequest(h unsafe.Pointer) *QWebEngineFullScreenRequest { + if h == nil { + return nil + } + + return &QWebEngineFullScreenRequest{h: (*C.QWebEngineFullScreenRequest)(h)} +} + +// NewQWebEngineFullScreenRequest constructs a new QWebEngineFullScreenRequest object. +func NewQWebEngineFullScreenRequest(other *QWebEngineFullScreenRequest) *QWebEngineFullScreenRequest { + var outptr_QWebEngineFullScreenRequest *C.QWebEngineFullScreenRequest = nil + + C.QWebEngineFullScreenRequest_new(other.cPointer(), &outptr_QWebEngineFullScreenRequest) + ret := newQWebEngineFullScreenRequest(outptr_QWebEngineFullScreenRequest) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineFullScreenRequest) OperatorAssign(other *QWebEngineFullScreenRequest) { + C.QWebEngineFullScreenRequest_OperatorAssign(this.h, other.cPointer()) +} + +func (this *QWebEngineFullScreenRequest) Reject() { + C.QWebEngineFullScreenRequest_Reject(this.h) +} + +func (this *QWebEngineFullScreenRequest) Accept() { + C.QWebEngineFullScreenRequest_Accept(this.h) +} + +func (this *QWebEngineFullScreenRequest) ToggleOn() bool { + return (bool)(C.QWebEngineFullScreenRequest_ToggleOn(this.h)) +} + +func (this *QWebEngineFullScreenRequest) Origin() *qt6.QUrl { + _ret := C.QWebEngineFullScreenRequest_Origin(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +// Delete this object from C++ memory. +func (this *QWebEngineFullScreenRequest) Delete() { + C.QWebEngineFullScreenRequest_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineFullScreenRequest) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineFullScreenRequest) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebenginefullscreenrequest.h b/qt6/webengine/gen_qwebenginefullscreenrequest.h new file mode 100644 index 00000000..d54e1c9b --- /dev/null +++ b/qt6/webengine/gen_qwebenginefullscreenrequest.h @@ -0,0 +1,37 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINEFULLSCREENREQUEST_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINEFULLSCREENREQUEST_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QUrl; +class QWebEngineFullScreenRequest; +#else +typedef struct QUrl QUrl; +typedef struct QWebEngineFullScreenRequest QWebEngineFullScreenRequest; +#endif + +void QWebEngineFullScreenRequest_new(QWebEngineFullScreenRequest* other, QWebEngineFullScreenRequest** outptr_QWebEngineFullScreenRequest); +void QWebEngineFullScreenRequest_OperatorAssign(QWebEngineFullScreenRequest* self, QWebEngineFullScreenRequest* other); +void QWebEngineFullScreenRequest_Reject(QWebEngineFullScreenRequest* self); +void QWebEngineFullScreenRequest_Accept(QWebEngineFullScreenRequest* self); +bool QWebEngineFullScreenRequest_ToggleOn(const QWebEngineFullScreenRequest* self); +QUrl* QWebEngineFullScreenRequest_Origin(const QWebEngineFullScreenRequest* self); +void QWebEngineFullScreenRequest_Delete(QWebEngineFullScreenRequest* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebenginehistory.cpp b/qt6/webengine/gen_qwebenginehistory.cpp new file mode 100644 index 00000000..d2efb382 --- /dev/null +++ b/qt6/webengine/gen_qwebenginehistory.cpp @@ -0,0 +1,289 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebenginehistory.h" +#include "_cgo_export.h" + +void QWebEngineHistoryItem_new(QWebEngineHistoryItem* other, QWebEngineHistoryItem** outptr_QWebEngineHistoryItem) { + QWebEngineHistoryItem* ret = new QWebEngineHistoryItem(*other); + *outptr_QWebEngineHistoryItem = ret; +} + +void QWebEngineHistoryItem_OperatorAssign(QWebEngineHistoryItem* self, QWebEngineHistoryItem* other) { + self->operator=(*other); +} + +QUrl* QWebEngineHistoryItem_OriginalUrl(const QWebEngineHistoryItem* self) { + return new QUrl(self->originalUrl()); +} + +QUrl* QWebEngineHistoryItem_Url(const QWebEngineHistoryItem* self) { + return new QUrl(self->url()); +} + +struct miqt_string QWebEngineHistoryItem_Title(const QWebEngineHistoryItem* self) { + QString _ret = self->title(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QDateTime* QWebEngineHistoryItem_LastVisited(const QWebEngineHistoryItem* self) { + return new QDateTime(self->lastVisited()); +} + +QUrl* QWebEngineHistoryItem_IconUrl(const QWebEngineHistoryItem* self) { + return new QUrl(self->iconUrl()); +} + +bool QWebEngineHistoryItem_IsValid(const QWebEngineHistoryItem* self) { + return self->isValid(); +} + +void QWebEngineHistoryItem_Swap(QWebEngineHistoryItem* self, QWebEngineHistoryItem* other) { + self->swap(*other); +} + +void QWebEngineHistoryItem_Delete(QWebEngineHistoryItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +QMetaObject* QWebEngineHistoryModel_MetaObject(const QWebEngineHistoryModel* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineHistoryModel_Metacast(QWebEngineHistoryModel* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineHistoryModel_Tr(const char* s) { + QString _ret = QWebEngineHistoryModel::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QWebEngineHistoryModel_RowCount(const QWebEngineHistoryModel* self, QModelIndex* parent) { + return self->rowCount(*parent); +} + +QVariant* QWebEngineHistoryModel_Data(const QWebEngineHistoryModel* self, QModelIndex* index, int role) { + return new QVariant(self->data(*index, static_cast(role))); +} + +struct miqt_map /* of int to struct miqt_string */ QWebEngineHistoryModel_RoleNames(const QWebEngineHistoryModel* self) { + QHash _ret = self->roleNames(); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + QByteArray _hashval_qb = _itr->second; + struct miqt_string _hashval_ms; + _hashval_ms.len = _hashval_qb.length(); + _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); + memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); + _varr[_ctr] = _hashval_ms; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; +} + +void QWebEngineHistoryModel_Reset(QWebEngineHistoryModel* self) { + self->reset(); +} + +struct miqt_string QWebEngineHistoryModel_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineHistoryModel::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineHistoryModel_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineHistoryModel::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QMetaObject* QWebEngineHistory_MetaObject(const QWebEngineHistory* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineHistory_Metacast(QWebEngineHistory* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineHistory_Tr(const char* s) { + QString _ret = QWebEngineHistory::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineHistory_Clear(QWebEngineHistory* self) { + self->clear(); +} + +struct miqt_array /* of QWebEngineHistoryItem* */ QWebEngineHistory_Items(const QWebEngineHistory* self) { + QList _ret = self->items(); + // Convert QList<> from C++ memory to manually-managed C memory + QWebEngineHistoryItem** _arr = static_cast(malloc(sizeof(QWebEngineHistoryItem*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QWebEngineHistoryItem(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +struct miqt_array /* of QWebEngineHistoryItem* */ QWebEngineHistory_BackItems(const QWebEngineHistory* self, int maxItems) { + QList _ret = self->backItems(static_cast(maxItems)); + // Convert QList<> from C++ memory to manually-managed C memory + QWebEngineHistoryItem** _arr = static_cast(malloc(sizeof(QWebEngineHistoryItem*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QWebEngineHistoryItem(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +struct miqt_array /* of QWebEngineHistoryItem* */ QWebEngineHistory_ForwardItems(const QWebEngineHistory* self, int maxItems) { + QList _ret = self->forwardItems(static_cast(maxItems)); + // Convert QList<> from C++ memory to manually-managed C memory + QWebEngineHistoryItem** _arr = static_cast(malloc(sizeof(QWebEngineHistoryItem*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QWebEngineHistoryItem(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +bool QWebEngineHistory_CanGoBack(const QWebEngineHistory* self) { + return self->canGoBack(); +} + +bool QWebEngineHistory_CanGoForward(const QWebEngineHistory* self) { + return self->canGoForward(); +} + +void QWebEngineHistory_Back(QWebEngineHistory* self) { + self->back(); +} + +void QWebEngineHistory_Forward(QWebEngineHistory* self) { + self->forward(); +} + +void QWebEngineHistory_GoToItem(QWebEngineHistory* self, QWebEngineHistoryItem* item) { + self->goToItem(*item); +} + +QWebEngineHistoryItem* QWebEngineHistory_BackItem(const QWebEngineHistory* self) { + return new QWebEngineHistoryItem(self->backItem()); +} + +QWebEngineHistoryItem* QWebEngineHistory_CurrentItem(const QWebEngineHistory* self) { + return new QWebEngineHistoryItem(self->currentItem()); +} + +QWebEngineHistoryItem* QWebEngineHistory_ForwardItem(const QWebEngineHistory* self) { + return new QWebEngineHistoryItem(self->forwardItem()); +} + +QWebEngineHistoryItem* QWebEngineHistory_ItemAt(const QWebEngineHistory* self, int i) { + return new QWebEngineHistoryItem(self->itemAt(static_cast(i))); +} + +int QWebEngineHistory_CurrentItemIndex(const QWebEngineHistory* self) { + return self->currentItemIndex(); +} + +int QWebEngineHistory_Count(const QWebEngineHistory* self) { + return self->count(); +} + +QWebEngineHistoryModel* QWebEngineHistory_ItemsModel(const QWebEngineHistory* self) { + return self->itemsModel(); +} + +QWebEngineHistoryModel* QWebEngineHistory_BackItemsModel(const QWebEngineHistory* self) { + return self->backItemsModel(); +} + +QWebEngineHistoryModel* QWebEngineHistory_ForwardItemsModel(const QWebEngineHistory* self) { + return self->forwardItemsModel(); +} + +struct miqt_string QWebEngineHistory_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineHistory::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineHistory_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineHistory::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + diff --git a/qt6/webengine/gen_qwebenginehistory.go b/qt6/webengine/gen_qwebenginehistory.go new file mode 100644 index 00000000..c3965bba --- /dev/null +++ b/qt6/webengine/gen_qwebenginehistory.go @@ -0,0 +1,434 @@ +package webengine + +/* + +#include "gen_qwebenginehistory.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "unsafe" +) + +type QWebEngineHistoryModel__Roles int + +const ( + QWebEngineHistoryModel__UrlRole QWebEngineHistoryModel__Roles = 256 + QWebEngineHistoryModel__TitleRole QWebEngineHistoryModel__Roles = 257 + QWebEngineHistoryModel__OffsetRole QWebEngineHistoryModel__Roles = 258 + QWebEngineHistoryModel__IconUrlRole QWebEngineHistoryModel__Roles = 259 +) + +type QWebEngineHistoryItem struct { + h *C.QWebEngineHistoryItem + isSubclass bool +} + +func (this *QWebEngineHistoryItem) cPointer() *C.QWebEngineHistoryItem { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineHistoryItem) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineHistoryItem constructs the type using only CGO pointers. +func newQWebEngineHistoryItem(h *C.QWebEngineHistoryItem) *QWebEngineHistoryItem { + if h == nil { + return nil + } + return &QWebEngineHistoryItem{h: h} +} + +// UnsafeNewQWebEngineHistoryItem constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineHistoryItem(h unsafe.Pointer) *QWebEngineHistoryItem { + if h == nil { + return nil + } + + return &QWebEngineHistoryItem{h: (*C.QWebEngineHistoryItem)(h)} +} + +// NewQWebEngineHistoryItem constructs a new QWebEngineHistoryItem object. +func NewQWebEngineHistoryItem(other *QWebEngineHistoryItem) *QWebEngineHistoryItem { + var outptr_QWebEngineHistoryItem *C.QWebEngineHistoryItem = nil + + C.QWebEngineHistoryItem_new(other.cPointer(), &outptr_QWebEngineHistoryItem) + ret := newQWebEngineHistoryItem(outptr_QWebEngineHistoryItem) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineHistoryItem) OperatorAssign(other *QWebEngineHistoryItem) { + C.QWebEngineHistoryItem_OperatorAssign(this.h, other.cPointer()) +} + +func (this *QWebEngineHistoryItem) OriginalUrl() *qt6.QUrl { + _ret := C.QWebEngineHistoryItem_OriginalUrl(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHistoryItem) Url() *qt6.QUrl { + _ret := C.QWebEngineHistoryItem_Url(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHistoryItem) Title() string { + var _ms C.struct_miqt_string = C.QWebEngineHistoryItem_Title(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineHistoryItem) LastVisited() *qt6.QDateTime { + _ret := C.QWebEngineHistoryItem_LastVisited(this.h) + _goptr := qt6.UnsafeNewQDateTime(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHistoryItem) IconUrl() *qt6.QUrl { + _ret := C.QWebEngineHistoryItem_IconUrl(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHistoryItem) IsValid() bool { + return (bool)(C.QWebEngineHistoryItem_IsValid(this.h)) +} + +func (this *QWebEngineHistoryItem) Swap(other *QWebEngineHistoryItem) { + C.QWebEngineHistoryItem_Swap(this.h, other.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QWebEngineHistoryItem) Delete() { + C.QWebEngineHistoryItem_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineHistoryItem) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineHistoryItem) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebEngineHistoryModel struct { + h *C.QWebEngineHistoryModel + isSubclass bool + *qt6.QAbstractListModel +} + +func (this *QWebEngineHistoryModel) cPointer() *C.QWebEngineHistoryModel { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineHistoryModel) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineHistoryModel constructs the type using only CGO pointers. +func newQWebEngineHistoryModel(h *C.QWebEngineHistoryModel, h_QAbstractListModel *C.QAbstractListModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QWebEngineHistoryModel { + if h == nil { + return nil + } + return &QWebEngineHistoryModel{h: h, + QAbstractListModel: qt6.UnsafeNewQAbstractListModel(unsafe.Pointer(h_QAbstractListModel), unsafe.Pointer(h_QAbstractItemModel), unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEngineHistoryModel constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineHistoryModel(h unsafe.Pointer, h_QAbstractListModel unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineHistoryModel { + if h == nil { + return nil + } + + return &QWebEngineHistoryModel{h: (*C.QWebEngineHistoryModel)(h), + QAbstractListModel: qt6.UnsafeNewQAbstractListModel(h_QAbstractListModel, h_QAbstractItemModel, h_QObject)} +} + +func (this *QWebEngineHistoryModel) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineHistoryModel_MetaObject(this.h))) +} + +func (this *QWebEngineHistoryModel) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineHistoryModel_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineHistoryModel_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineHistoryModel_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineHistoryModel) RowCount(parent *qt6.QModelIndex) int { + return (int)(C.QWebEngineHistoryModel_RowCount(this.h, (*C.QModelIndex)(parent.UnsafePointer()))) +} + +func (this *QWebEngineHistoryModel) Data(index *qt6.QModelIndex, role int) *qt6.QVariant { + _ret := C.QWebEngineHistoryModel_Data(this.h, (*C.QModelIndex)(index.UnsafePointer()), (C.int)(role)) + _goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHistoryModel) RoleNames() map[int][]byte { + var _mm C.struct_miqt_map = C.QWebEngineHistoryModel_RoleNames(this.h) + _ret := make(map[int][]byte, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + var _hashval_bytearray C.struct_miqt_string = _Values[i] + _hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len))) + C.free(unsafe.Pointer(_hashval_bytearray.data)) + _entry_Value := _hashval_ret + _ret[_entry_Key] = _entry_Value + } + return _ret +} + +func (this *QWebEngineHistoryModel) Reset() { + C.QWebEngineHistoryModel_Reset(this.h) +} + +func QWebEngineHistoryModel_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineHistoryModel_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineHistoryModel_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineHistoryModel_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +type QWebEngineHistory struct { + h *C.QWebEngineHistory + isSubclass bool + *qt6.QObject +} + +func (this *QWebEngineHistory) cPointer() *C.QWebEngineHistory { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineHistory) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineHistory constructs the type using only CGO pointers. +func newQWebEngineHistory(h *C.QWebEngineHistory, h_QObject *C.QObject) *QWebEngineHistory { + if h == nil { + return nil + } + return &QWebEngineHistory{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEngineHistory constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineHistory(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineHistory { + if h == nil { + return nil + } + + return &QWebEngineHistory{h: (*C.QWebEngineHistory)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} +} + +func (this *QWebEngineHistory) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineHistory_MetaObject(this.h))) +} + +func (this *QWebEngineHistory) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineHistory_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineHistory_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineHistory_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineHistory) Clear() { + C.QWebEngineHistory_Clear(this.h) +} + +func (this *QWebEngineHistory) Items() []QWebEngineHistoryItem { + var _ma C.struct_miqt_array = C.QWebEngineHistory_Items(this.h) + _ret := make([]QWebEngineHistoryItem, int(_ma.len)) + _outCast := (*[0xffff]*C.QWebEngineHistoryItem)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQWebEngineHistoryItem(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret +} + +func (this *QWebEngineHistory) BackItems(maxItems int) []QWebEngineHistoryItem { + var _ma C.struct_miqt_array = C.QWebEngineHistory_BackItems(this.h, (C.int)(maxItems)) + _ret := make([]QWebEngineHistoryItem, int(_ma.len)) + _outCast := (*[0xffff]*C.QWebEngineHistoryItem)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQWebEngineHistoryItem(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret +} + +func (this *QWebEngineHistory) ForwardItems(maxItems int) []QWebEngineHistoryItem { + var _ma C.struct_miqt_array = C.QWebEngineHistory_ForwardItems(this.h, (C.int)(maxItems)) + _ret := make([]QWebEngineHistoryItem, int(_ma.len)) + _outCast := (*[0xffff]*C.QWebEngineHistoryItem)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQWebEngineHistoryItem(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret +} + +func (this *QWebEngineHistory) CanGoBack() bool { + return (bool)(C.QWebEngineHistory_CanGoBack(this.h)) +} + +func (this *QWebEngineHistory) CanGoForward() bool { + return (bool)(C.QWebEngineHistory_CanGoForward(this.h)) +} + +func (this *QWebEngineHistory) Back() { + C.QWebEngineHistory_Back(this.h) +} + +func (this *QWebEngineHistory) Forward() { + C.QWebEngineHistory_Forward(this.h) +} + +func (this *QWebEngineHistory) GoToItem(item *QWebEngineHistoryItem) { + C.QWebEngineHistory_GoToItem(this.h, item.cPointer()) +} + +func (this *QWebEngineHistory) BackItem() *QWebEngineHistoryItem { + _ret := C.QWebEngineHistory_BackItem(this.h) + _goptr := newQWebEngineHistoryItem(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHistory) CurrentItem() *QWebEngineHistoryItem { + _ret := C.QWebEngineHistory_CurrentItem(this.h) + _goptr := newQWebEngineHistoryItem(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHistory) ForwardItem() *QWebEngineHistoryItem { + _ret := C.QWebEngineHistory_ForwardItem(this.h) + _goptr := newQWebEngineHistoryItem(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHistory) ItemAt(i int) *QWebEngineHistoryItem { + _ret := C.QWebEngineHistory_ItemAt(this.h, (C.int)(i)) + _goptr := newQWebEngineHistoryItem(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHistory) CurrentItemIndex() int { + return (int)(C.QWebEngineHistory_CurrentItemIndex(this.h)) +} + +func (this *QWebEngineHistory) Count() int { + return (int)(C.QWebEngineHistory_Count(this.h)) +} + +func (this *QWebEngineHistory) ItemsModel() *QWebEngineHistoryModel { + return UnsafeNewQWebEngineHistoryModel(unsafe.Pointer(C.QWebEngineHistory_ItemsModel(this.h)), nil, nil, nil) +} + +func (this *QWebEngineHistory) BackItemsModel() *QWebEngineHistoryModel { + return UnsafeNewQWebEngineHistoryModel(unsafe.Pointer(C.QWebEngineHistory_BackItemsModel(this.h)), nil, nil, nil) +} + +func (this *QWebEngineHistory) ForwardItemsModel() *QWebEngineHistoryModel { + return UnsafeNewQWebEngineHistoryModel(unsafe.Pointer(C.QWebEngineHistory_ForwardItemsModel(this.h)), nil, nil, nil) +} + +func QWebEngineHistory_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineHistory_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineHistory_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineHistory_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} diff --git a/qt6/webengine/gen_qwebenginehistory.h b/qt6/webengine/gen_qwebenginehistory.h new file mode 100644 index 00000000..fd5d0e23 --- /dev/null +++ b/qt6/webengine/gen_qwebenginehistory.h @@ -0,0 +1,92 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINEHISTORY_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINEHISTORY_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QAbstractItemModel; +class QAbstractListModel; +class QDateTime; +class QMetaObject; +class QModelIndex; +class QObject; +class QUrl; +class QVariant; +class QWebEngineHistory; +class QWebEngineHistoryItem; +class QWebEngineHistoryModel; +#else +typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractListModel QAbstractListModel; +typedef struct QDateTime QDateTime; +typedef struct QMetaObject QMetaObject; +typedef struct QModelIndex QModelIndex; +typedef struct QObject QObject; +typedef struct QUrl QUrl; +typedef struct QVariant QVariant; +typedef struct QWebEngineHistory QWebEngineHistory; +typedef struct QWebEngineHistoryItem QWebEngineHistoryItem; +typedef struct QWebEngineHistoryModel QWebEngineHistoryModel; +#endif + +void QWebEngineHistoryItem_new(QWebEngineHistoryItem* other, QWebEngineHistoryItem** outptr_QWebEngineHistoryItem); +void QWebEngineHistoryItem_OperatorAssign(QWebEngineHistoryItem* self, QWebEngineHistoryItem* other); +QUrl* QWebEngineHistoryItem_OriginalUrl(const QWebEngineHistoryItem* self); +QUrl* QWebEngineHistoryItem_Url(const QWebEngineHistoryItem* self); +struct miqt_string QWebEngineHistoryItem_Title(const QWebEngineHistoryItem* self); +QDateTime* QWebEngineHistoryItem_LastVisited(const QWebEngineHistoryItem* self); +QUrl* QWebEngineHistoryItem_IconUrl(const QWebEngineHistoryItem* self); +bool QWebEngineHistoryItem_IsValid(const QWebEngineHistoryItem* self); +void QWebEngineHistoryItem_Swap(QWebEngineHistoryItem* self, QWebEngineHistoryItem* other); +void QWebEngineHistoryItem_Delete(QWebEngineHistoryItem* self, bool isSubclass); + +QMetaObject* QWebEngineHistoryModel_MetaObject(const QWebEngineHistoryModel* self); +void* QWebEngineHistoryModel_Metacast(QWebEngineHistoryModel* self, const char* param1); +struct miqt_string QWebEngineHistoryModel_Tr(const char* s); +int QWebEngineHistoryModel_RowCount(const QWebEngineHistoryModel* self, QModelIndex* parent); +QVariant* QWebEngineHistoryModel_Data(const QWebEngineHistoryModel* self, QModelIndex* index, int role); +struct miqt_map /* of int to struct miqt_string */ QWebEngineHistoryModel_RoleNames(const QWebEngineHistoryModel* self); +void QWebEngineHistoryModel_Reset(QWebEngineHistoryModel* self); +struct miqt_string QWebEngineHistoryModel_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineHistoryModel_Tr3(const char* s, const char* c, int n); + +QMetaObject* QWebEngineHistory_MetaObject(const QWebEngineHistory* self); +void* QWebEngineHistory_Metacast(QWebEngineHistory* self, const char* param1); +struct miqt_string QWebEngineHistory_Tr(const char* s); +void QWebEngineHistory_Clear(QWebEngineHistory* self); +struct miqt_array /* of QWebEngineHistoryItem* */ QWebEngineHistory_Items(const QWebEngineHistory* self); +struct miqt_array /* of QWebEngineHistoryItem* */ QWebEngineHistory_BackItems(const QWebEngineHistory* self, int maxItems); +struct miqt_array /* of QWebEngineHistoryItem* */ QWebEngineHistory_ForwardItems(const QWebEngineHistory* self, int maxItems); +bool QWebEngineHistory_CanGoBack(const QWebEngineHistory* self); +bool QWebEngineHistory_CanGoForward(const QWebEngineHistory* self); +void QWebEngineHistory_Back(QWebEngineHistory* self); +void QWebEngineHistory_Forward(QWebEngineHistory* self); +void QWebEngineHistory_GoToItem(QWebEngineHistory* self, QWebEngineHistoryItem* item); +QWebEngineHistoryItem* QWebEngineHistory_BackItem(const QWebEngineHistory* self); +QWebEngineHistoryItem* QWebEngineHistory_CurrentItem(const QWebEngineHistory* self); +QWebEngineHistoryItem* QWebEngineHistory_ForwardItem(const QWebEngineHistory* self); +QWebEngineHistoryItem* QWebEngineHistory_ItemAt(const QWebEngineHistory* self, int i); +int QWebEngineHistory_CurrentItemIndex(const QWebEngineHistory* self); +int QWebEngineHistory_Count(const QWebEngineHistory* self); +QWebEngineHistoryModel* QWebEngineHistory_ItemsModel(const QWebEngineHistory* self); +QWebEngineHistoryModel* QWebEngineHistory_BackItemsModel(const QWebEngineHistory* self); +QWebEngineHistoryModel* QWebEngineHistory_ForwardItemsModel(const QWebEngineHistory* self); +struct miqt_string QWebEngineHistory_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineHistory_Tr3(const char* s, const char* c, int n); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebenginehttprequest.cpp b/qt6/webengine/gen_qwebenginehttprequest.cpp new file mode 100644 index 00000000..edf277cf --- /dev/null +++ b/qt6/webengine/gen_qwebenginehttprequest.cpp @@ -0,0 +1,143 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebenginehttprequest.h" +#include "_cgo_export.h" + +void QWebEngineHttpRequest_new(QWebEngineHttpRequest** outptr_QWebEngineHttpRequest) { + QWebEngineHttpRequest* ret = new QWebEngineHttpRequest(); + *outptr_QWebEngineHttpRequest = ret; +} + +void QWebEngineHttpRequest_new2(QWebEngineHttpRequest* other, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest) { + QWebEngineHttpRequest* ret = new QWebEngineHttpRequest(*other); + *outptr_QWebEngineHttpRequest = ret; +} + +void QWebEngineHttpRequest_new3(QUrl* url, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest) { + QWebEngineHttpRequest* ret = new QWebEngineHttpRequest(*url); + *outptr_QWebEngineHttpRequest = ret; +} + +void QWebEngineHttpRequest_new4(QUrl* url, int* method, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest) { + QWebEngineHttpRequest* ret = new QWebEngineHttpRequest(*url, (const QWebEngineHttpRequest::Method&)(*method)); + *outptr_QWebEngineHttpRequest = ret; +} + +void QWebEngineHttpRequest_OperatorAssign(QWebEngineHttpRequest* self, QWebEngineHttpRequest* other) { + self->operator=(*other); +} + +QWebEngineHttpRequest* QWebEngineHttpRequest_PostRequest(QUrl* url, struct miqt_map /* of struct miqt_string to struct miqt_string */ postData) { + QMap postData_QMap; + struct miqt_string* postData_karr = static_cast(postData.keys); + struct miqt_string* postData_varr = static_cast(postData.values); + for(size_t i = 0; i < postData.len; ++i) { + QString postData_karr_i_QString = QString::fromUtf8(postData_karr[i].data, postData_karr[i].len); + QString postData_varr_i_QString = QString::fromUtf8(postData_varr[i].data, postData_varr[i].len); + postData_QMap[postData_karr_i_QString] = postData_varr_i_QString; + } + return new QWebEngineHttpRequest(QWebEngineHttpRequest::postRequest(*url, postData_QMap)); +} + +void QWebEngineHttpRequest_Swap(QWebEngineHttpRequest* self, QWebEngineHttpRequest* other) { + self->swap(*other); +} + +bool QWebEngineHttpRequest_OperatorEqual(const QWebEngineHttpRequest* self, QWebEngineHttpRequest* other) { + return (*self == *other); +} + +bool QWebEngineHttpRequest_OperatorNotEqual(const QWebEngineHttpRequest* self, QWebEngineHttpRequest* other) { + return (*self != *other); +} + +int QWebEngineHttpRequest_Method(const QWebEngineHttpRequest* self) { + QWebEngineHttpRequest::Method _ret = self->method(); + return static_cast(_ret); +} + +void QWebEngineHttpRequest_SetMethod(QWebEngineHttpRequest* self, int method) { + self->setMethod(static_cast(method)); +} + +QUrl* QWebEngineHttpRequest_Url(const QWebEngineHttpRequest* self) { + return new QUrl(self->url()); +} + +void QWebEngineHttpRequest_SetUrl(QWebEngineHttpRequest* self, QUrl* url) { + self->setUrl(*url); +} + +struct miqt_string QWebEngineHttpRequest_PostData(const QWebEngineHttpRequest* self) { + QByteArray _qb = self->postData(); + struct miqt_string _ms; + _ms.len = _qb.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _qb.data(), _ms.len); + return _ms; +} + +void QWebEngineHttpRequest_SetPostData(QWebEngineHttpRequest* self, struct miqt_string postData) { + QByteArray postData_QByteArray(postData.data, postData.len); + self->setPostData(postData_QByteArray); +} + +bool QWebEngineHttpRequest_HasHeader(const QWebEngineHttpRequest* self, struct miqt_string headerName) { + QByteArray headerName_QByteArray(headerName.data, headerName.len); + return self->hasHeader(headerName_QByteArray); +} + +struct miqt_array /* of struct miqt_string */ QWebEngineHttpRequest_Headers(const QWebEngineHttpRequest* self) { + QList _ret = self->headers(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QByteArray _lv_qb = _ret[i]; + struct miqt_string _lv_ms; + _lv_ms.len = _lv_qb.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_qb.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +struct miqt_string QWebEngineHttpRequest_Header(const QWebEngineHttpRequest* self, struct miqt_string headerName) { + QByteArray headerName_QByteArray(headerName.data, headerName.len); + QByteArray _qb = self->header(headerName_QByteArray); + struct miqt_string _ms; + _ms.len = _qb.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _qb.data(), _ms.len); + return _ms; +} + +void QWebEngineHttpRequest_SetHeader(QWebEngineHttpRequest* self, struct miqt_string headerName, struct miqt_string value) { + QByteArray headerName_QByteArray(headerName.data, headerName.len); + QByteArray value_QByteArray(value.data, value.len); + self->setHeader(headerName_QByteArray, value_QByteArray); +} + +void QWebEngineHttpRequest_UnsetHeader(QWebEngineHttpRequest* self, struct miqt_string headerName) { + QByteArray headerName_QByteArray(headerName.data, headerName.len); + self->unsetHeader(headerName_QByteArray); +} + +void QWebEngineHttpRequest_Delete(QWebEngineHttpRequest* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebenginehttprequest.go b/qt6/webengine/gen_qwebenginehttprequest.go new file mode 100644 index 00000000..601c5534 --- /dev/null +++ b/qt6/webengine/gen_qwebenginehttprequest.go @@ -0,0 +1,238 @@ +package webengine + +/* + +#include "gen_qwebenginehttprequest.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "unsafe" +) + +type QWebEngineHttpRequest__Method int + +const ( + QWebEngineHttpRequest__Get QWebEngineHttpRequest__Method = 0 + QWebEngineHttpRequest__Post QWebEngineHttpRequest__Method = 1 +) + +type QWebEngineHttpRequest struct { + h *C.QWebEngineHttpRequest + isSubclass bool +} + +func (this *QWebEngineHttpRequest) cPointer() *C.QWebEngineHttpRequest { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineHttpRequest) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineHttpRequest constructs the type using only CGO pointers. +func newQWebEngineHttpRequest(h *C.QWebEngineHttpRequest) *QWebEngineHttpRequest { + if h == nil { + return nil + } + return &QWebEngineHttpRequest{h: h} +} + +// UnsafeNewQWebEngineHttpRequest constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineHttpRequest(h unsafe.Pointer) *QWebEngineHttpRequest { + if h == nil { + return nil + } + + return &QWebEngineHttpRequest{h: (*C.QWebEngineHttpRequest)(h)} +} + +// NewQWebEngineHttpRequest constructs a new QWebEngineHttpRequest object. +func NewQWebEngineHttpRequest() *QWebEngineHttpRequest { + var outptr_QWebEngineHttpRequest *C.QWebEngineHttpRequest = nil + + C.QWebEngineHttpRequest_new(&outptr_QWebEngineHttpRequest) + ret := newQWebEngineHttpRequest(outptr_QWebEngineHttpRequest) + ret.isSubclass = true + return ret +} + +// NewQWebEngineHttpRequest2 constructs a new QWebEngineHttpRequest object. +func NewQWebEngineHttpRequest2(other *QWebEngineHttpRequest) *QWebEngineHttpRequest { + var outptr_QWebEngineHttpRequest *C.QWebEngineHttpRequest = nil + + C.QWebEngineHttpRequest_new2(other.cPointer(), &outptr_QWebEngineHttpRequest) + ret := newQWebEngineHttpRequest(outptr_QWebEngineHttpRequest) + ret.isSubclass = true + return ret +} + +// NewQWebEngineHttpRequest3 constructs a new QWebEngineHttpRequest object. +func NewQWebEngineHttpRequest3(url *qt6.QUrl) *QWebEngineHttpRequest { + var outptr_QWebEngineHttpRequest *C.QWebEngineHttpRequest = nil + + C.QWebEngineHttpRequest_new3((*C.QUrl)(url.UnsafePointer()), &outptr_QWebEngineHttpRequest) + ret := newQWebEngineHttpRequest(outptr_QWebEngineHttpRequest) + ret.isSubclass = true + return ret +} + +// NewQWebEngineHttpRequest4 constructs a new QWebEngineHttpRequest object. +func NewQWebEngineHttpRequest4(url *qt6.QUrl, method *QWebEngineHttpRequest__Method) *QWebEngineHttpRequest { + var outptr_QWebEngineHttpRequest *C.QWebEngineHttpRequest = nil + + C.QWebEngineHttpRequest_new4((*C.QUrl)(url.UnsafePointer()), (*C.int)(unsafe.Pointer(method)), &outptr_QWebEngineHttpRequest) + ret := newQWebEngineHttpRequest(outptr_QWebEngineHttpRequest) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineHttpRequest) OperatorAssign(other *QWebEngineHttpRequest) { + C.QWebEngineHttpRequest_OperatorAssign(this.h, other.cPointer()) +} + +func QWebEngineHttpRequest_PostRequest(url *qt6.QUrl, postData map[string]string) *QWebEngineHttpRequest { + postData_Keys_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(postData)))) + defer C.free(unsafe.Pointer(postData_Keys_CArray)) + postData_Values_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(postData)))) + defer C.free(unsafe.Pointer(postData_Values_CArray)) + postData_ctr := 0 + for postData_k, postData_v := range postData { + postData_k_ms := C.struct_miqt_string{} + postData_k_ms.data = C.CString(postData_k) + postData_k_ms.len = C.size_t(len(postData_k)) + defer C.free(unsafe.Pointer(postData_k_ms.data)) + postData_Keys_CArray[postData_ctr] = postData_k_ms + postData_v_ms := C.struct_miqt_string{} + postData_v_ms.data = C.CString(postData_v) + postData_v_ms.len = C.size_t(len(postData_v)) + defer C.free(unsafe.Pointer(postData_v_ms.data)) + postData_Values_CArray[postData_ctr] = postData_v_ms + postData_ctr++ + } + postData_mm := C.struct_miqt_map{ + len: C.size_t(len(postData)), + keys: unsafe.Pointer(postData_Keys_CArray), + values: unsafe.Pointer(postData_Values_CArray), + } + _ret := C.QWebEngineHttpRequest_PostRequest((*C.QUrl)(url.UnsafePointer()), postData_mm) + _goptr := newQWebEngineHttpRequest(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHttpRequest) Swap(other *QWebEngineHttpRequest) { + C.QWebEngineHttpRequest_Swap(this.h, other.cPointer()) +} + +func (this *QWebEngineHttpRequest) OperatorEqual(other *QWebEngineHttpRequest) bool { + return (bool)(C.QWebEngineHttpRequest_OperatorEqual(this.h, other.cPointer())) +} + +func (this *QWebEngineHttpRequest) OperatorNotEqual(other *QWebEngineHttpRequest) bool { + return (bool)(C.QWebEngineHttpRequest_OperatorNotEqual(this.h, other.cPointer())) +} + +func (this *QWebEngineHttpRequest) Method() QWebEngineHttpRequest__Method { + return (QWebEngineHttpRequest__Method)(C.QWebEngineHttpRequest_Method(this.h)) +} + +func (this *QWebEngineHttpRequest) SetMethod(method QWebEngineHttpRequest__Method) { + C.QWebEngineHttpRequest_SetMethod(this.h, (C.int)(method)) +} + +func (this *QWebEngineHttpRequest) Url() *qt6.QUrl { + _ret := C.QWebEngineHttpRequest_Url(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineHttpRequest) SetUrl(url *qt6.QUrl) { + C.QWebEngineHttpRequest_SetUrl(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QWebEngineHttpRequest) PostData() []byte { + var _bytearray C.struct_miqt_string = C.QWebEngineHttpRequest_PostData(this.h) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *QWebEngineHttpRequest) SetPostData(postData []byte) { + postData_alias := C.struct_miqt_string{} + postData_alias.data = (*C.char)(unsafe.Pointer(&postData[0])) + postData_alias.len = C.size_t(len(postData)) + C.QWebEngineHttpRequest_SetPostData(this.h, postData_alias) +} + +func (this *QWebEngineHttpRequest) HasHeader(headerName []byte) bool { + headerName_alias := C.struct_miqt_string{} + headerName_alias.data = (*C.char)(unsafe.Pointer(&headerName[0])) + headerName_alias.len = C.size_t(len(headerName)) + return (bool)(C.QWebEngineHttpRequest_HasHeader(this.h, headerName_alias)) +} + +func (this *QWebEngineHttpRequest) Headers() [][]byte { + var _ma C.struct_miqt_array = C.QWebEngineHttpRequest_Headers(this.h) + _ret := make([][]byte, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_bytearray C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoBytes(unsafe.Pointer(_lv_bytearray.data), C.int(int64(_lv_bytearray.len))) + C.free(unsafe.Pointer(_lv_bytearray.data)) + _ret[i] = _lv_ret + } + return _ret +} + +func (this *QWebEngineHttpRequest) Header(headerName []byte) []byte { + headerName_alias := C.struct_miqt_string{} + headerName_alias.data = (*C.char)(unsafe.Pointer(&headerName[0])) + headerName_alias.len = C.size_t(len(headerName)) + var _bytearray C.struct_miqt_string = C.QWebEngineHttpRequest_Header(this.h, headerName_alias) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *QWebEngineHttpRequest) SetHeader(headerName []byte, value []byte) { + headerName_alias := C.struct_miqt_string{} + headerName_alias.data = (*C.char)(unsafe.Pointer(&headerName[0])) + headerName_alias.len = C.size_t(len(headerName)) + value_alias := C.struct_miqt_string{} + value_alias.data = (*C.char)(unsafe.Pointer(&value[0])) + value_alias.len = C.size_t(len(value)) + C.QWebEngineHttpRequest_SetHeader(this.h, headerName_alias, value_alias) +} + +func (this *QWebEngineHttpRequest) UnsetHeader(headerName []byte) { + headerName_alias := C.struct_miqt_string{} + headerName_alias.data = (*C.char)(unsafe.Pointer(&headerName[0])) + headerName_alias.len = C.size_t(len(headerName)) + C.QWebEngineHttpRequest_UnsetHeader(this.h, headerName_alias) +} + +// Delete this object from C++ memory. +func (this *QWebEngineHttpRequest) Delete() { + C.QWebEngineHttpRequest_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineHttpRequest) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineHttpRequest) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebenginehttprequest.h b/qt6/webengine/gen_qwebenginehttprequest.h new file mode 100644 index 00000000..99677c98 --- /dev/null +++ b/qt6/webengine/gen_qwebenginehttprequest.h @@ -0,0 +1,51 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINEHTTPREQUEST_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINEHTTPREQUEST_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QUrl; +class QWebEngineHttpRequest; +#else +typedef struct QUrl QUrl; +typedef struct QWebEngineHttpRequest QWebEngineHttpRequest; +#endif + +void QWebEngineHttpRequest_new(QWebEngineHttpRequest** outptr_QWebEngineHttpRequest); +void QWebEngineHttpRequest_new2(QWebEngineHttpRequest* other, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest); +void QWebEngineHttpRequest_new3(QUrl* url, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest); +void QWebEngineHttpRequest_new4(QUrl* url, int* method, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest); +void QWebEngineHttpRequest_OperatorAssign(QWebEngineHttpRequest* self, QWebEngineHttpRequest* other); +QWebEngineHttpRequest* QWebEngineHttpRequest_PostRequest(QUrl* url, struct miqt_map /* of struct miqt_string to struct miqt_string */ postData); +void QWebEngineHttpRequest_Swap(QWebEngineHttpRequest* self, QWebEngineHttpRequest* other); +bool QWebEngineHttpRequest_OperatorEqual(const QWebEngineHttpRequest* self, QWebEngineHttpRequest* other); +bool QWebEngineHttpRequest_OperatorNotEqual(const QWebEngineHttpRequest* self, QWebEngineHttpRequest* other); +int QWebEngineHttpRequest_Method(const QWebEngineHttpRequest* self); +void QWebEngineHttpRequest_SetMethod(QWebEngineHttpRequest* self, int method); +QUrl* QWebEngineHttpRequest_Url(const QWebEngineHttpRequest* self); +void QWebEngineHttpRequest_SetUrl(QWebEngineHttpRequest* self, QUrl* url); +struct miqt_string QWebEngineHttpRequest_PostData(const QWebEngineHttpRequest* self); +void QWebEngineHttpRequest_SetPostData(QWebEngineHttpRequest* self, struct miqt_string postData); +bool QWebEngineHttpRequest_HasHeader(const QWebEngineHttpRequest* self, struct miqt_string headerName); +struct miqt_array /* of struct miqt_string */ QWebEngineHttpRequest_Headers(const QWebEngineHttpRequest* self); +struct miqt_string QWebEngineHttpRequest_Header(const QWebEngineHttpRequest* self, struct miqt_string headerName); +void QWebEngineHttpRequest_SetHeader(QWebEngineHttpRequest* self, struct miqt_string headerName, struct miqt_string value); +void QWebEngineHttpRequest_UnsetHeader(QWebEngineHttpRequest* self, struct miqt_string headerName); +void QWebEngineHttpRequest_Delete(QWebEngineHttpRequest* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebengineloadinginfo.cpp b/qt6/webengine/gen_qwebengineloadinginfo.cpp new file mode 100644 index 00000000..36a5d337 --- /dev/null +++ b/qt6/webengine/gen_qwebengineloadinginfo.cpp @@ -0,0 +1,59 @@ +#include +#include +#include +#include +#include +#include +#include "gen_qwebengineloadinginfo.h" +#include "_cgo_export.h" + +void QWebEngineLoadingInfo_new(QWebEngineLoadingInfo* other, QWebEngineLoadingInfo** outptr_QWebEngineLoadingInfo) { + QWebEngineLoadingInfo* ret = new QWebEngineLoadingInfo(*other); + *outptr_QWebEngineLoadingInfo = ret; +} + +void QWebEngineLoadingInfo_OperatorAssign(QWebEngineLoadingInfo* self, QWebEngineLoadingInfo* other) { + self->operator=(*other); +} + +QUrl* QWebEngineLoadingInfo_Url(const QWebEngineLoadingInfo* self) { + return new QUrl(self->url()); +} + +bool QWebEngineLoadingInfo_IsErrorPage(const QWebEngineLoadingInfo* self) { + return self->isErrorPage(); +} + +int QWebEngineLoadingInfo_Status(const QWebEngineLoadingInfo* self) { + QWebEngineLoadingInfo::LoadStatus _ret = self->status(); + return static_cast(_ret); +} + +struct miqt_string QWebEngineLoadingInfo_ErrorString(const QWebEngineLoadingInfo* self) { + QString _ret = self->errorString(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QWebEngineLoadingInfo_ErrorDomain(const QWebEngineLoadingInfo* self) { + QWebEngineLoadingInfo::ErrorDomain _ret = self->errorDomain(); + return static_cast(_ret); +} + +int QWebEngineLoadingInfo_ErrorCode(const QWebEngineLoadingInfo* self) { + return self->errorCode(); +} + +void QWebEngineLoadingInfo_Delete(QWebEngineLoadingInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebengineloadinginfo.go b/qt6/webengine/gen_qwebengineloadinginfo.go new file mode 100644 index 00000000..540ec28b --- /dev/null +++ b/qt6/webengine/gen_qwebengineloadinginfo.go @@ -0,0 +1,131 @@ +package webengine + +/* + +#include "gen_qwebengineloadinginfo.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "unsafe" +) + +type QWebEngineLoadingInfo__LoadStatus int + +const ( + QWebEngineLoadingInfo__LoadStartedStatus QWebEngineLoadingInfo__LoadStatus = 0 + QWebEngineLoadingInfo__LoadStoppedStatus QWebEngineLoadingInfo__LoadStatus = 1 + QWebEngineLoadingInfo__LoadSucceededStatus QWebEngineLoadingInfo__LoadStatus = 2 + QWebEngineLoadingInfo__LoadFailedStatus QWebEngineLoadingInfo__LoadStatus = 3 +) + +type QWebEngineLoadingInfo__ErrorDomain int + +const ( + QWebEngineLoadingInfo__NoErrorDomain QWebEngineLoadingInfo__ErrorDomain = 0 + QWebEngineLoadingInfo__InternalErrorDomain QWebEngineLoadingInfo__ErrorDomain = 1 + QWebEngineLoadingInfo__ConnectionErrorDomain QWebEngineLoadingInfo__ErrorDomain = 2 + QWebEngineLoadingInfo__CertificateErrorDomain QWebEngineLoadingInfo__ErrorDomain = 3 + QWebEngineLoadingInfo__HttpErrorDomain QWebEngineLoadingInfo__ErrorDomain = 4 + QWebEngineLoadingInfo__FtpErrorDomain QWebEngineLoadingInfo__ErrorDomain = 5 + QWebEngineLoadingInfo__DnsErrorDomain QWebEngineLoadingInfo__ErrorDomain = 6 + QWebEngineLoadingInfo__HttpStatusCodeDomain QWebEngineLoadingInfo__ErrorDomain = 7 +) + +type QWebEngineLoadingInfo struct { + h *C.QWebEngineLoadingInfo + isSubclass bool +} + +func (this *QWebEngineLoadingInfo) cPointer() *C.QWebEngineLoadingInfo { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineLoadingInfo) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineLoadingInfo constructs the type using only CGO pointers. +func newQWebEngineLoadingInfo(h *C.QWebEngineLoadingInfo) *QWebEngineLoadingInfo { + if h == nil { + return nil + } + return &QWebEngineLoadingInfo{h: h} +} + +// UnsafeNewQWebEngineLoadingInfo constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineLoadingInfo(h unsafe.Pointer) *QWebEngineLoadingInfo { + if h == nil { + return nil + } + + return &QWebEngineLoadingInfo{h: (*C.QWebEngineLoadingInfo)(h)} +} + +// NewQWebEngineLoadingInfo constructs a new QWebEngineLoadingInfo object. +func NewQWebEngineLoadingInfo(other *QWebEngineLoadingInfo) *QWebEngineLoadingInfo { + var outptr_QWebEngineLoadingInfo *C.QWebEngineLoadingInfo = nil + + C.QWebEngineLoadingInfo_new(other.cPointer(), &outptr_QWebEngineLoadingInfo) + ret := newQWebEngineLoadingInfo(outptr_QWebEngineLoadingInfo) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineLoadingInfo) OperatorAssign(other *QWebEngineLoadingInfo) { + C.QWebEngineLoadingInfo_OperatorAssign(this.h, other.cPointer()) +} + +func (this *QWebEngineLoadingInfo) Url() *qt6.QUrl { + _ret := C.QWebEngineLoadingInfo_Url(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineLoadingInfo) IsErrorPage() bool { + return (bool)(C.QWebEngineLoadingInfo_IsErrorPage(this.h)) +} + +func (this *QWebEngineLoadingInfo) Status() QWebEngineLoadingInfo__LoadStatus { + return (QWebEngineLoadingInfo__LoadStatus)(C.QWebEngineLoadingInfo_Status(this.h)) +} + +func (this *QWebEngineLoadingInfo) ErrorString() string { + var _ms C.struct_miqt_string = C.QWebEngineLoadingInfo_ErrorString(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineLoadingInfo) ErrorDomain() QWebEngineLoadingInfo__ErrorDomain { + return (QWebEngineLoadingInfo__ErrorDomain)(C.QWebEngineLoadingInfo_ErrorDomain(this.h)) +} + +func (this *QWebEngineLoadingInfo) ErrorCode() int { + return (int)(C.QWebEngineLoadingInfo_ErrorCode(this.h)) +} + +// Delete this object from C++ memory. +func (this *QWebEngineLoadingInfo) Delete() { + C.QWebEngineLoadingInfo_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineLoadingInfo) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineLoadingInfo) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebengineloadinginfo.h b/qt6/webengine/gen_qwebengineloadinginfo.h new file mode 100644 index 00000000..7dd13fe2 --- /dev/null +++ b/qt6/webengine/gen_qwebengineloadinginfo.h @@ -0,0 +1,39 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINELOADINGINFO_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINELOADINGINFO_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QUrl; +class QWebEngineLoadingInfo; +#else +typedef struct QUrl QUrl; +typedef struct QWebEngineLoadingInfo QWebEngineLoadingInfo; +#endif + +void QWebEngineLoadingInfo_new(QWebEngineLoadingInfo* other, QWebEngineLoadingInfo** outptr_QWebEngineLoadingInfo); +void QWebEngineLoadingInfo_OperatorAssign(QWebEngineLoadingInfo* self, QWebEngineLoadingInfo* other); +QUrl* QWebEngineLoadingInfo_Url(const QWebEngineLoadingInfo* self); +bool QWebEngineLoadingInfo_IsErrorPage(const QWebEngineLoadingInfo* self); +int QWebEngineLoadingInfo_Status(const QWebEngineLoadingInfo* self); +struct miqt_string QWebEngineLoadingInfo_ErrorString(const QWebEngineLoadingInfo* self); +int QWebEngineLoadingInfo_ErrorDomain(const QWebEngineLoadingInfo* self); +int QWebEngineLoadingInfo_ErrorCode(const QWebEngineLoadingInfo* self); +void QWebEngineLoadingInfo_Delete(QWebEngineLoadingInfo* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebenginenavigationrequest.cpp b/qt6/webengine/gen_qwebenginenavigationrequest.cpp new file mode 100644 index 00000000..ad558718 --- /dev/null +++ b/qt6/webengine/gen_qwebenginenavigationrequest.cpp @@ -0,0 +1,91 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebenginenavigationrequest.h" +#include "_cgo_export.h" + +QMetaObject* QWebEngineNavigationRequest_MetaObject(const QWebEngineNavigationRequest* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineNavigationRequest_Metacast(QWebEngineNavigationRequest* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineNavigationRequest_Tr(const char* s) { + QString _ret = QWebEngineNavigationRequest::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QUrl* QWebEngineNavigationRequest_Url(const QWebEngineNavigationRequest* self) { + return new QUrl(self->url()); +} + +bool QWebEngineNavigationRequest_IsMainFrame(const QWebEngineNavigationRequest* self) { + return self->isMainFrame(); +} + +int QWebEngineNavigationRequest_NavigationType(const QWebEngineNavigationRequest* self) { + QWebEngineNavigationRequest::NavigationType _ret = self->navigationType(); + return static_cast(_ret); +} + +void QWebEngineNavigationRequest_Accept(QWebEngineNavigationRequest* self) { + self->accept(); +} + +void QWebEngineNavigationRequest_Reject(QWebEngineNavigationRequest* self) { + self->reject(); +} + +void QWebEngineNavigationRequest_ActionChanged(QWebEngineNavigationRequest* self) { + self->actionChanged(); +} + +void QWebEngineNavigationRequest_connect_ActionChanged(QWebEngineNavigationRequest* self, intptr_t slot) { + QWebEngineNavigationRequest::connect(self, static_cast(&QWebEngineNavigationRequest::actionChanged), self, [=]() { + miqt_exec_callback_QWebEngineNavigationRequest_ActionChanged(slot); + }); +} + +struct miqt_string QWebEngineNavigationRequest_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineNavigationRequest::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineNavigationRequest_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineNavigationRequest::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineNavigationRequest_Delete(QWebEngineNavigationRequest* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebenginenavigationrequest.go b/qt6/webengine/gen_qwebenginenavigationrequest.go new file mode 100644 index 00000000..88f5f0c5 --- /dev/null +++ b/qt6/webengine/gen_qwebenginenavigationrequest.go @@ -0,0 +1,169 @@ +package webengine + +/* + +#include "gen_qwebenginenavigationrequest.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebEngineNavigationRequest__NavigationType int + +const ( + QWebEngineNavigationRequest__LinkClickedNavigation QWebEngineNavigationRequest__NavigationType = 0 + QWebEngineNavigationRequest__TypedNavigation QWebEngineNavigationRequest__NavigationType = 1 + QWebEngineNavigationRequest__FormSubmittedNavigation QWebEngineNavigationRequest__NavigationType = 2 + QWebEngineNavigationRequest__BackForwardNavigation QWebEngineNavigationRequest__NavigationType = 3 + QWebEngineNavigationRequest__ReloadNavigation QWebEngineNavigationRequest__NavigationType = 4 + QWebEngineNavigationRequest__OtherNavigation QWebEngineNavigationRequest__NavigationType = 5 + QWebEngineNavigationRequest__RedirectNavigation QWebEngineNavigationRequest__NavigationType = 6 +) + +type QWebEngineNavigationRequest__NavigationRequestAction int + +const ( + QWebEngineNavigationRequest__AcceptRequest QWebEngineNavigationRequest__NavigationRequestAction = 0 + QWebEngineNavigationRequest__IgnoreRequest QWebEngineNavigationRequest__NavigationRequestAction = 255 +) + +type QWebEngineNavigationRequest struct { + h *C.QWebEngineNavigationRequest + isSubclass bool + *qt6.QObject +} + +func (this *QWebEngineNavigationRequest) cPointer() *C.QWebEngineNavigationRequest { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineNavigationRequest) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineNavigationRequest constructs the type using only CGO pointers. +func newQWebEngineNavigationRequest(h *C.QWebEngineNavigationRequest, h_QObject *C.QObject) *QWebEngineNavigationRequest { + if h == nil { + return nil + } + return &QWebEngineNavigationRequest{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEngineNavigationRequest constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineNavigationRequest(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineNavigationRequest { + if h == nil { + return nil + } + + return &QWebEngineNavigationRequest{h: (*C.QWebEngineNavigationRequest)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} +} + +func (this *QWebEngineNavigationRequest) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineNavigationRequest_MetaObject(this.h))) +} + +func (this *QWebEngineNavigationRequest) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineNavigationRequest_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineNavigationRequest_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineNavigationRequest_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineNavigationRequest) Url() *qt6.QUrl { + _ret := C.QWebEngineNavigationRequest_Url(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineNavigationRequest) IsMainFrame() bool { + return (bool)(C.QWebEngineNavigationRequest_IsMainFrame(this.h)) +} + +func (this *QWebEngineNavigationRequest) NavigationType() QWebEngineNavigationRequest__NavigationType { + return (QWebEngineNavigationRequest__NavigationType)(C.QWebEngineNavigationRequest_NavigationType(this.h)) +} + +func (this *QWebEngineNavigationRequest) Accept() { + C.QWebEngineNavigationRequest_Accept(this.h) +} + +func (this *QWebEngineNavigationRequest) Reject() { + C.QWebEngineNavigationRequest_Reject(this.h) +} + +func (this *QWebEngineNavigationRequest) ActionChanged() { + C.QWebEngineNavigationRequest_ActionChanged(this.h) +} +func (this *QWebEngineNavigationRequest) OnActionChanged(slot func()) { + C.QWebEngineNavigationRequest_connect_ActionChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineNavigationRequest_ActionChanged +func miqt_exec_callback_QWebEngineNavigationRequest_ActionChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func QWebEngineNavigationRequest_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineNavigationRequest_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineNavigationRequest_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineNavigationRequest_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebEngineNavigationRequest) Delete() { + C.QWebEngineNavigationRequest_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineNavigationRequest) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineNavigationRequest) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebenginenavigationrequest.h b/qt6/webengine/gen_qwebenginenavigationrequest.h new file mode 100644 index 00000000..282ff59c --- /dev/null +++ b/qt6/webengine/gen_qwebenginenavigationrequest.h @@ -0,0 +1,47 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINENAVIGATIONREQUEST_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINENAVIGATIONREQUEST_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QMetaObject; +class QObject; +class QUrl; +class QWebEngineNavigationRequest; +#else +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QUrl QUrl; +typedef struct QWebEngineNavigationRequest QWebEngineNavigationRequest; +#endif + +QMetaObject* QWebEngineNavigationRequest_MetaObject(const QWebEngineNavigationRequest* self); +void* QWebEngineNavigationRequest_Metacast(QWebEngineNavigationRequest* self, const char* param1); +struct miqt_string QWebEngineNavigationRequest_Tr(const char* s); +QUrl* QWebEngineNavigationRequest_Url(const QWebEngineNavigationRequest* self); +bool QWebEngineNavigationRequest_IsMainFrame(const QWebEngineNavigationRequest* self); +int QWebEngineNavigationRequest_NavigationType(const QWebEngineNavigationRequest* self); +void QWebEngineNavigationRequest_Accept(QWebEngineNavigationRequest* self); +void QWebEngineNavigationRequest_Reject(QWebEngineNavigationRequest* self); +void QWebEngineNavigationRequest_ActionChanged(QWebEngineNavigationRequest* self); +void QWebEngineNavigationRequest_connect_ActionChanged(QWebEngineNavigationRequest* self, intptr_t slot); +struct miqt_string QWebEngineNavigationRequest_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineNavigationRequest_Tr3(const char* s, const char* c, int n); +void QWebEngineNavigationRequest_Delete(QWebEngineNavigationRequest* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebenginenewwindowrequest.cpp b/qt6/webengine/gen_qwebenginenewwindowrequest.cpp new file mode 100644 index 00000000..ee883077 --- /dev/null +++ b/qt6/webengine/gen_qwebenginenewwindowrequest.cpp @@ -0,0 +1,83 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebenginenewwindowrequest.h" +#include "_cgo_export.h" + +QMetaObject* QWebEngineNewWindowRequest_MetaObject(const QWebEngineNewWindowRequest* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineNewWindowRequest_Metacast(QWebEngineNewWindowRequest* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineNewWindowRequest_Tr(const char* s) { + QString _ret = QWebEngineNewWindowRequest::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QWebEngineNewWindowRequest_Destination(const QWebEngineNewWindowRequest* self) { + QWebEngineNewWindowRequest::DestinationType _ret = self->destination(); + return static_cast(_ret); +} + +QUrl* QWebEngineNewWindowRequest_RequestedUrl(const QWebEngineNewWindowRequest* self) { + return new QUrl(self->requestedUrl()); +} + +QRect* QWebEngineNewWindowRequest_RequestedGeometry(const QWebEngineNewWindowRequest* self) { + return new QRect(self->requestedGeometry()); +} + +bool QWebEngineNewWindowRequest_IsUserInitiated(const QWebEngineNewWindowRequest* self) { + return self->isUserInitiated(); +} + +void QWebEngineNewWindowRequest_OpenIn(QWebEngineNewWindowRequest* self, QWebEnginePage* param1) { + self->openIn(param1); +} + +struct miqt_string QWebEngineNewWindowRequest_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineNewWindowRequest::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineNewWindowRequest_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineNewWindowRequest::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineNewWindowRequest_Delete(QWebEngineNewWindowRequest* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebenginenewwindowrequest.go b/qt6/webengine/gen_qwebenginenewwindowrequest.go new file mode 100644 index 00000000..9810c5ea --- /dev/null +++ b/qt6/webengine/gen_qwebenginenewwindowrequest.go @@ -0,0 +1,144 @@ +package webengine + +/* + +#include "gen_qwebenginenewwindowrequest.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "unsafe" +) + +type QWebEngineNewWindowRequest__DestinationType int + +const ( + QWebEngineNewWindowRequest__InNewWindow QWebEngineNewWindowRequest__DestinationType = 0 + QWebEngineNewWindowRequest__InNewTab QWebEngineNewWindowRequest__DestinationType = 1 + QWebEngineNewWindowRequest__InNewDialog QWebEngineNewWindowRequest__DestinationType = 2 + QWebEngineNewWindowRequest__InNewBackgroundTab QWebEngineNewWindowRequest__DestinationType = 3 +) + +type QWebEngineNewWindowRequest struct { + h *C.QWebEngineNewWindowRequest + isSubclass bool + *qt6.QObject +} + +func (this *QWebEngineNewWindowRequest) cPointer() *C.QWebEngineNewWindowRequest { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineNewWindowRequest) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineNewWindowRequest constructs the type using only CGO pointers. +func newQWebEngineNewWindowRequest(h *C.QWebEngineNewWindowRequest, h_QObject *C.QObject) *QWebEngineNewWindowRequest { + if h == nil { + return nil + } + return &QWebEngineNewWindowRequest{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEngineNewWindowRequest constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineNewWindowRequest(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineNewWindowRequest { + if h == nil { + return nil + } + + return &QWebEngineNewWindowRequest{h: (*C.QWebEngineNewWindowRequest)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} +} + +func (this *QWebEngineNewWindowRequest) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineNewWindowRequest_MetaObject(this.h))) +} + +func (this *QWebEngineNewWindowRequest) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineNewWindowRequest_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineNewWindowRequest_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineNewWindowRequest_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineNewWindowRequest) Destination() QWebEngineNewWindowRequest__DestinationType { + return (QWebEngineNewWindowRequest__DestinationType)(C.QWebEngineNewWindowRequest_Destination(this.h)) +} + +func (this *QWebEngineNewWindowRequest) RequestedUrl() *qt6.QUrl { + _ret := C.QWebEngineNewWindowRequest_RequestedUrl(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineNewWindowRequest) RequestedGeometry() *qt6.QRect { + _ret := C.QWebEngineNewWindowRequest_RequestedGeometry(this.h) + _goptr := qt6.UnsafeNewQRect(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineNewWindowRequest) IsUserInitiated() bool { + return (bool)(C.QWebEngineNewWindowRequest_IsUserInitiated(this.h)) +} + +func (this *QWebEngineNewWindowRequest) OpenIn(param1 *QWebEnginePage) { + C.QWebEngineNewWindowRequest_OpenIn(this.h, param1.cPointer()) +} + +func QWebEngineNewWindowRequest_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineNewWindowRequest_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineNewWindowRequest_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineNewWindowRequest_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebEngineNewWindowRequest) Delete() { + C.QWebEngineNewWindowRequest_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineNewWindowRequest) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineNewWindowRequest) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebenginenewwindowrequest.h b/qt6/webengine/gen_qwebenginenewwindowrequest.h new file mode 100644 index 00000000..1c9c4ed7 --- /dev/null +++ b/qt6/webengine/gen_qwebenginenewwindowrequest.h @@ -0,0 +1,49 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINENEWWINDOWREQUEST_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINENEWWINDOWREQUEST_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QMetaObject; +class QObject; +class QRect; +class QUrl; +class QWebEngineNewWindowRequest; +class QWebEnginePage; +#else +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QRect QRect; +typedef struct QUrl QUrl; +typedef struct QWebEngineNewWindowRequest QWebEngineNewWindowRequest; +typedef struct QWebEnginePage QWebEnginePage; +#endif + +QMetaObject* QWebEngineNewWindowRequest_MetaObject(const QWebEngineNewWindowRequest* self); +void* QWebEngineNewWindowRequest_Metacast(QWebEngineNewWindowRequest* self, const char* param1); +struct miqt_string QWebEngineNewWindowRequest_Tr(const char* s); +int QWebEngineNewWindowRequest_Destination(const QWebEngineNewWindowRequest* self); +QUrl* QWebEngineNewWindowRequest_RequestedUrl(const QWebEngineNewWindowRequest* self); +QRect* QWebEngineNewWindowRequest_RequestedGeometry(const QWebEngineNewWindowRequest* self); +bool QWebEngineNewWindowRequest_IsUserInitiated(const QWebEngineNewWindowRequest* self); +void QWebEngineNewWindowRequest_OpenIn(QWebEngineNewWindowRequest* self, QWebEnginePage* param1); +struct miqt_string QWebEngineNewWindowRequest_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineNewWindowRequest_Tr3(const char* s, const char* c, int n); +void QWebEngineNewWindowRequest_Delete(QWebEngineNewWindowRequest* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebenginenotification.cpp b/qt6/webengine/gen_qwebenginenotification.cpp new file mode 100644 index 00000000..a9790c40 --- /dev/null +++ b/qt6/webengine/gen_qwebenginenotification.cpp @@ -0,0 +1,144 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebenginenotification.h" +#include "_cgo_export.h" + +QMetaObject* QWebEngineNotification_MetaObject(const QWebEngineNotification* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineNotification_Metacast(QWebEngineNotification* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineNotification_Tr(const char* s) { + QString _ret = QWebEngineNotification::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QWebEngineNotification_Matches(const QWebEngineNotification* self, QWebEngineNotification* other) { + return self->matches(other); +} + +QUrl* QWebEngineNotification_Origin(const QWebEngineNotification* self) { + return new QUrl(self->origin()); +} + +QImage* QWebEngineNotification_Icon(const QWebEngineNotification* self) { + return new QImage(self->icon()); +} + +struct miqt_string QWebEngineNotification_Title(const QWebEngineNotification* self) { + QString _ret = self->title(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineNotification_Message(const QWebEngineNotification* self) { + QString _ret = self->message(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineNotification_Tag(const QWebEngineNotification* self) { + QString _ret = self->tag(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineNotification_Language(const QWebEngineNotification* self) { + QString _ret = self->language(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QWebEngineNotification_Direction(const QWebEngineNotification* self) { + Qt::LayoutDirection _ret = self->direction(); + return static_cast(_ret); +} + +void QWebEngineNotification_Show(const QWebEngineNotification* self) { + self->show(); +} + +void QWebEngineNotification_Click(const QWebEngineNotification* self) { + self->click(); +} + +void QWebEngineNotification_Close(const QWebEngineNotification* self) { + self->close(); +} + +void QWebEngineNotification_Closed(QWebEngineNotification* self) { + self->closed(); +} + +void QWebEngineNotification_connect_Closed(QWebEngineNotification* self, intptr_t slot) { + QWebEngineNotification::connect(self, static_cast(&QWebEngineNotification::closed), self, [=]() { + miqt_exec_callback_QWebEngineNotification_Closed(slot); + }); +} + +struct miqt_string QWebEngineNotification_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineNotification::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineNotification_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineNotification::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineNotification_Delete(QWebEngineNotification* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebenginenotification.go b/qt6/webengine/gen_qwebenginenotification.go new file mode 100644 index 00000000..8e478a54 --- /dev/null +++ b/qt6/webengine/gen_qwebenginenotification.go @@ -0,0 +1,189 @@ +package webengine + +/* + +#include "gen_qwebenginenotification.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebEngineNotification struct { + h *C.QWebEngineNotification + isSubclass bool + *qt6.QObject +} + +func (this *QWebEngineNotification) cPointer() *C.QWebEngineNotification { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineNotification) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineNotification constructs the type using only CGO pointers. +func newQWebEngineNotification(h *C.QWebEngineNotification, h_QObject *C.QObject) *QWebEngineNotification { + if h == nil { + return nil + } + return &QWebEngineNotification{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEngineNotification constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineNotification(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineNotification { + if h == nil { + return nil + } + + return &QWebEngineNotification{h: (*C.QWebEngineNotification)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} +} + +func (this *QWebEngineNotification) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineNotification_MetaObject(this.h))) +} + +func (this *QWebEngineNotification) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineNotification_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineNotification_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineNotification_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineNotification) Matches(other *QWebEngineNotification) bool { + return (bool)(C.QWebEngineNotification_Matches(this.h, other.cPointer())) +} + +func (this *QWebEngineNotification) Origin() *qt6.QUrl { + _ret := C.QWebEngineNotification_Origin(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineNotification) Icon() *qt6.QImage { + _ret := C.QWebEngineNotification_Icon(this.h) + _goptr := qt6.UnsafeNewQImage(unsafe.Pointer(_ret), nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineNotification) Title() string { + var _ms C.struct_miqt_string = C.QWebEngineNotification_Title(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineNotification) Message() string { + var _ms C.struct_miqt_string = C.QWebEngineNotification_Message(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineNotification) Tag() string { + var _ms C.struct_miqt_string = C.QWebEngineNotification_Tag(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineNotification) Language() string { + var _ms C.struct_miqt_string = C.QWebEngineNotification_Language(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineNotification) Direction() qt6.LayoutDirection { + return (qt6.LayoutDirection)(C.QWebEngineNotification_Direction(this.h)) +} + +func (this *QWebEngineNotification) Show() { + C.QWebEngineNotification_Show(this.h) +} + +func (this *QWebEngineNotification) Click() { + C.QWebEngineNotification_Click(this.h) +} + +func (this *QWebEngineNotification) Close() { + C.QWebEngineNotification_Close(this.h) +} + +func (this *QWebEngineNotification) Closed() { + C.QWebEngineNotification_Closed(this.h) +} +func (this *QWebEngineNotification) OnClosed(slot func()) { + C.QWebEngineNotification_connect_Closed(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineNotification_Closed +func miqt_exec_callback_QWebEngineNotification_Closed(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func QWebEngineNotification_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineNotification_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineNotification_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineNotification_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebEngineNotification) Delete() { + C.QWebEngineNotification_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineNotification) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineNotification) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebenginenotification.h b/qt6/webengine/gen_qwebenginenotification.h new file mode 100644 index 00000000..b467aa51 --- /dev/null +++ b/qt6/webengine/gen_qwebenginenotification.h @@ -0,0 +1,55 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINENOTIFICATION_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINENOTIFICATION_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QImage; +class QMetaObject; +class QObject; +class QUrl; +class QWebEngineNotification; +#else +typedef struct QImage QImage; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QUrl QUrl; +typedef struct QWebEngineNotification QWebEngineNotification; +#endif + +QMetaObject* QWebEngineNotification_MetaObject(const QWebEngineNotification* self); +void* QWebEngineNotification_Metacast(QWebEngineNotification* self, const char* param1); +struct miqt_string QWebEngineNotification_Tr(const char* s); +bool QWebEngineNotification_Matches(const QWebEngineNotification* self, QWebEngineNotification* other); +QUrl* QWebEngineNotification_Origin(const QWebEngineNotification* self); +QImage* QWebEngineNotification_Icon(const QWebEngineNotification* self); +struct miqt_string QWebEngineNotification_Title(const QWebEngineNotification* self); +struct miqt_string QWebEngineNotification_Message(const QWebEngineNotification* self); +struct miqt_string QWebEngineNotification_Tag(const QWebEngineNotification* self); +struct miqt_string QWebEngineNotification_Language(const QWebEngineNotification* self); +int QWebEngineNotification_Direction(const QWebEngineNotification* self); +void QWebEngineNotification_Show(const QWebEngineNotification* self); +void QWebEngineNotification_Click(const QWebEngineNotification* self); +void QWebEngineNotification_Close(const QWebEngineNotification* self); +void QWebEngineNotification_Closed(QWebEngineNotification* self); +void QWebEngineNotification_connect_Closed(QWebEngineNotification* self, intptr_t slot); +struct miqt_string QWebEngineNotification_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineNotification_Tr3(const char* s, const char* c, int n); +void QWebEngineNotification_Delete(QWebEngineNotification* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebenginepage.cpp b/qt6/webengine/gen_qwebenginepage.cpp new file mode 100644 index 00000000..7c7371c7 --- /dev/null +++ b/qt6/webengine/gen_qwebenginepage.cpp @@ -0,0 +1,1432 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebenginepage.h" +#include "_cgo_export.h" + +class MiqtVirtualQWebEnginePage : public virtual QWebEnginePage { +public: + + MiqtVirtualQWebEnginePage(): QWebEnginePage() {}; + MiqtVirtualQWebEnginePage(QWebEngineProfile* profile): QWebEnginePage(profile) {}; + MiqtVirtualQWebEnginePage(QObject* parent): QWebEnginePage(parent) {}; + MiqtVirtualQWebEnginePage(QWebEngineProfile* profile, QObject* parent): QWebEnginePage(profile, parent) {}; + + virtual ~MiqtVirtualQWebEnginePage() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__TriggerAction = 0; + + // Subclass to allow providing a Go implementation + virtual void triggerAction(QWebEnginePage::WebAction action, bool checked) override { + if (handle__TriggerAction == 0) { + QWebEnginePage::triggerAction(action, checked); + return; + } + + QWebEnginePage::WebAction action_ret = action; + int sigval1 = static_cast(action_ret); + bool sigval2 = checked; + + miqt_exec_callback_QWebEnginePage_TriggerAction(this, handle__TriggerAction, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TriggerAction(int action, bool checked) { + + QWebEnginePage::triggerAction(static_cast(action), checked); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QWebEnginePage::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QWebEnginePage_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QWebEnginePage::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateWindow = 0; + + // Subclass to allow providing a Go implementation + virtual QWebEnginePage* createWindow(QWebEnginePage::WebWindowType typeVal) override { + if (handle__CreateWindow == 0) { + return QWebEnginePage::createWindow(typeVal); + } + + QWebEnginePage::WebWindowType typeVal_ret = typeVal; + int sigval1 = static_cast(typeVal_ret); + + QWebEnginePage* callback_return_value = miqt_exec_callback_QWebEnginePage_CreateWindow(this, handle__CreateWindow, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWebEnginePage* virtualbase_CreateWindow(int typeVal) { + + return QWebEnginePage::createWindow(static_cast(typeVal)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChooseFiles = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList chooseFiles(QWebEnginePage::FileSelectionMode mode, const QStringList& oldFiles, const QStringList& acceptedMimeTypes) override { + if (handle__ChooseFiles == 0) { + return QWebEnginePage::chooseFiles(mode, oldFiles, acceptedMimeTypes); + } + + QWebEnginePage::FileSelectionMode mode_ret = mode; + int sigval1 = static_cast(mode_ret); + const QStringList& oldFiles_ret = oldFiles; + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* oldFiles_arr = static_cast(malloc(sizeof(struct miqt_string) * oldFiles_ret.length())); + for (size_t i = 0, e = oldFiles_ret.length(); i < e; ++i) { + QString oldFiles_lv_ret = oldFiles_ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray oldFiles_lv_b = oldFiles_lv_ret.toUtf8(); + struct miqt_string oldFiles_lv_ms; + oldFiles_lv_ms.len = oldFiles_lv_b.length(); + oldFiles_lv_ms.data = static_cast(malloc(oldFiles_lv_ms.len)); + memcpy(oldFiles_lv_ms.data, oldFiles_lv_b.data(), oldFiles_lv_ms.len); + oldFiles_arr[i] = oldFiles_lv_ms; + } + struct miqt_array oldFiles_out; + oldFiles_out.len = oldFiles_ret.length(); + oldFiles_out.data = static_cast(oldFiles_arr); + struct miqt_array /* of struct miqt_string */ sigval2 = oldFiles_out; + const QStringList& acceptedMimeTypes_ret = acceptedMimeTypes; + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* acceptedMimeTypes_arr = static_cast(malloc(sizeof(struct miqt_string) * acceptedMimeTypes_ret.length())); + for (size_t i = 0, e = acceptedMimeTypes_ret.length(); i < e; ++i) { + QString acceptedMimeTypes_lv_ret = acceptedMimeTypes_ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray acceptedMimeTypes_lv_b = acceptedMimeTypes_lv_ret.toUtf8(); + struct miqt_string acceptedMimeTypes_lv_ms; + acceptedMimeTypes_lv_ms.len = acceptedMimeTypes_lv_b.length(); + acceptedMimeTypes_lv_ms.data = static_cast(malloc(acceptedMimeTypes_lv_ms.len)); + memcpy(acceptedMimeTypes_lv_ms.data, acceptedMimeTypes_lv_b.data(), acceptedMimeTypes_lv_ms.len); + acceptedMimeTypes_arr[i] = acceptedMimeTypes_lv_ms; + } + struct miqt_array acceptedMimeTypes_out; + acceptedMimeTypes_out.len = acceptedMimeTypes_ret.length(); + acceptedMimeTypes_out.data = static_cast(acceptedMimeTypes_arr); + struct miqt_array /* of struct miqt_string */ sigval3 = acceptedMimeTypes_out; + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QWebEnginePage_ChooseFiles(this, handle__ChooseFiles, sigval1, sigval2, sigval3); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + // Wrapper to allow calling protected method + struct miqt_array /* of struct miqt_string */ virtualbase_ChooseFiles(int mode, struct miqt_array /* of struct miqt_string */ oldFiles, struct miqt_array /* of struct miqt_string */ acceptedMimeTypes) { + QStringList oldFiles_QList; + oldFiles_QList.reserve(oldFiles.len); + struct miqt_string* oldFiles_arr = static_cast(oldFiles.data); + for(size_t i = 0; i < oldFiles.len; ++i) { + QString oldFiles_arr_i_QString = QString::fromUtf8(oldFiles_arr[i].data, oldFiles_arr[i].len); + oldFiles_QList.push_back(oldFiles_arr_i_QString); + } + QStringList acceptedMimeTypes_QList; + acceptedMimeTypes_QList.reserve(acceptedMimeTypes.len); + struct miqt_string* acceptedMimeTypes_arr = static_cast(acceptedMimeTypes.data); + for(size_t i = 0; i < acceptedMimeTypes.len; ++i) { + QString acceptedMimeTypes_arr_i_QString = QString::fromUtf8(acceptedMimeTypes_arr[i].data, acceptedMimeTypes_arr[i].len); + acceptedMimeTypes_QList.push_back(acceptedMimeTypes_arr_i_QString); + } + + QStringList _ret = QWebEnginePage::chooseFiles(static_cast(mode), oldFiles_QList, acceptedMimeTypes_QList); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__JavaScriptAlert = 0; + + // Subclass to allow providing a Go implementation + virtual void javaScriptAlert(const QUrl& securityOrigin, const QString& msg) override { + if (handle__JavaScriptAlert == 0) { + QWebEnginePage::javaScriptAlert(securityOrigin, msg); + return; + } + + const QUrl& securityOrigin_ret = securityOrigin; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&securityOrigin_ret); + const QString msg_ret = msg; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray msg_b = msg_ret.toUtf8(); + struct miqt_string msg_ms; + msg_ms.len = msg_b.length(); + msg_ms.data = static_cast(malloc(msg_ms.len)); + memcpy(msg_ms.data, msg_b.data(), msg_ms.len); + struct miqt_string sigval2 = msg_ms; + + miqt_exec_callback_QWebEnginePage_JavaScriptAlert(this, handle__JavaScriptAlert, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_JavaScriptAlert(QUrl* securityOrigin, struct miqt_string msg) { + QString msg_QString = QString::fromUtf8(msg.data, msg.len); + + QWebEnginePage::javaScriptAlert(*securityOrigin, msg_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__JavaScriptConfirm = 0; + + // Subclass to allow providing a Go implementation + virtual bool javaScriptConfirm(const QUrl& securityOrigin, const QString& msg) override { + if (handle__JavaScriptConfirm == 0) { + return QWebEnginePage::javaScriptConfirm(securityOrigin, msg); + } + + const QUrl& securityOrigin_ret = securityOrigin; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&securityOrigin_ret); + const QString msg_ret = msg; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray msg_b = msg_ret.toUtf8(); + struct miqt_string msg_ms; + msg_ms.len = msg_b.length(); + msg_ms.data = static_cast(malloc(msg_ms.len)); + memcpy(msg_ms.data, msg_b.data(), msg_ms.len); + struct miqt_string sigval2 = msg_ms; + + bool callback_return_value = miqt_exec_callback_QWebEnginePage_JavaScriptConfirm(this, handle__JavaScriptConfirm, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_JavaScriptConfirm(QUrl* securityOrigin, struct miqt_string msg) { + QString msg_QString = QString::fromUtf8(msg.data, msg.len); + + return QWebEnginePage::javaScriptConfirm(*securityOrigin, msg_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__JavaScriptConsoleMessage = 0; + + // Subclass to allow providing a Go implementation + virtual void javaScriptConsoleMessage(QWebEnginePage::JavaScriptConsoleMessageLevel level, const QString& message, int lineNumber, const QString& sourceID) override { + if (handle__JavaScriptConsoleMessage == 0) { + QWebEnginePage::javaScriptConsoleMessage(level, message, lineNumber, sourceID); + return; + } + + QWebEnginePage::JavaScriptConsoleMessageLevel level_ret = level; + int sigval1 = static_cast(level_ret); + const QString message_ret = message; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray message_b = message_ret.toUtf8(); + struct miqt_string message_ms; + message_ms.len = message_b.length(); + message_ms.data = static_cast(malloc(message_ms.len)); + memcpy(message_ms.data, message_b.data(), message_ms.len); + struct miqt_string sigval2 = message_ms; + int sigval3 = lineNumber; + const QString sourceID_ret = sourceID; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray sourceID_b = sourceID_ret.toUtf8(); + struct miqt_string sourceID_ms; + sourceID_ms.len = sourceID_b.length(); + sourceID_ms.data = static_cast(malloc(sourceID_ms.len)); + memcpy(sourceID_ms.data, sourceID_b.data(), sourceID_ms.len); + struct miqt_string sigval4 = sourceID_ms; + + miqt_exec_callback_QWebEnginePage_JavaScriptConsoleMessage(this, handle__JavaScriptConsoleMessage, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_JavaScriptConsoleMessage(int level, struct miqt_string message, int lineNumber, struct miqt_string sourceID) { + QString message_QString = QString::fromUtf8(message.data, message.len); + QString sourceID_QString = QString::fromUtf8(sourceID.data, sourceID.len); + + QWebEnginePage::javaScriptConsoleMessage(static_cast(level), message_QString, static_cast(lineNumber), sourceID_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AcceptNavigationRequest = 0; + + // Subclass to allow providing a Go implementation + virtual bool acceptNavigationRequest(const QUrl& url, QWebEnginePage::NavigationType typeVal, bool isMainFrame) override { + if (handle__AcceptNavigationRequest == 0) { + return QWebEnginePage::acceptNavigationRequest(url, typeVal, isMainFrame); + } + + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&url_ret); + QWebEnginePage::NavigationType typeVal_ret = typeVal; + int sigval2 = static_cast(typeVal_ret); + bool sigval3 = isMainFrame; + + bool callback_return_value = miqt_exec_callback_QWebEnginePage_AcceptNavigationRequest(this, handle__AcceptNavigationRequest, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AcceptNavigationRequest(QUrl* url, int typeVal, bool isMainFrame) { + + return QWebEnginePage::acceptNavigationRequest(*url, static_cast(typeVal), isMainFrame); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QWebEnginePage::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QWebEnginePage_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QWebEnginePage::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QWebEnginePage::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QWebEnginePage_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QWebEnginePage::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QWebEnginePage::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QWebEnginePage_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QWebEnginePage::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QWebEnginePage::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebEnginePage_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QWebEnginePage::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QWebEnginePage::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebEnginePage_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QWebEnginePage::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QWebEnginePage::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebEnginePage_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QWebEnginePage::disconnectNotify(*signal); + + } + +}; + +void QWebEnginePage_new(QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject) { + MiqtVirtualQWebEnginePage* ret = new MiqtVirtualQWebEnginePage(); + *outptr_QWebEnginePage = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebEnginePage_new2(QWebEngineProfile* profile, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject) { + MiqtVirtualQWebEnginePage* ret = new MiqtVirtualQWebEnginePage(profile); + *outptr_QWebEnginePage = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebEnginePage_new3(QObject* parent, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject) { + MiqtVirtualQWebEnginePage* ret = new MiqtVirtualQWebEnginePage(parent); + *outptr_QWebEnginePage = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebEnginePage_new4(QWebEngineProfile* profile, QObject* parent, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject) { + MiqtVirtualQWebEnginePage* ret = new MiqtVirtualQWebEnginePage(profile, parent); + *outptr_QWebEnginePage = ret; + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QWebEnginePage_MetaObject(const QWebEnginePage* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEnginePage_Metacast(QWebEnginePage* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEnginePage_Tr(const char* s) { + QString _ret = QWebEnginePage::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QWebEngineHistory* QWebEnginePage_History(const QWebEnginePage* self) { + return self->history(); +} + +bool QWebEnginePage_HasSelection(const QWebEnginePage* self) { + return self->hasSelection(); +} + +struct miqt_string QWebEnginePage_SelectedText(const QWebEnginePage* self) { + QString _ret = self->selectedText(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QWebEngineProfile* QWebEnginePage_Profile(const QWebEnginePage* self) { + return self->profile(); +} + +QAction* QWebEnginePage_Action(const QWebEnginePage* self, int action) { + return self->action(static_cast(action)); +} + +void QWebEnginePage_TriggerAction(QWebEnginePage* self, int action, bool checked) { + self->triggerAction(static_cast(action), checked); +} + +void QWebEnginePage_ReplaceMisspelledWord(QWebEnginePage* self, struct miqt_string replacement) { + QString replacement_QString = QString::fromUtf8(replacement.data, replacement.len); + self->replaceMisspelledWord(replacement_QString); +} + +bool QWebEnginePage_Event(QWebEnginePage* self, QEvent* param1) { + return self->event(param1); +} + +void QWebEnginePage_SetFeaturePermission(QWebEnginePage* self, QUrl* securityOrigin, int feature, int policy) { + self->setFeaturePermission(*securityOrigin, static_cast(feature), static_cast(policy)); +} + +bool QWebEnginePage_IsLoading(const QWebEnginePage* self) { + return self->isLoading(); +} + +void QWebEnginePage_Load(QWebEnginePage* self, QUrl* url) { + self->load(*url); +} + +void QWebEnginePage_LoadWithRequest(QWebEnginePage* self, QWebEngineHttpRequest* request) { + self->load(*request); +} + +void QWebEnginePage_Download(QWebEnginePage* self, QUrl* url) { + self->download(*url); +} + +void QWebEnginePage_SetHtml(QWebEnginePage* self, struct miqt_string html) { + QString html_QString = QString::fromUtf8(html.data, html.len); + self->setHtml(html_QString); +} + +void QWebEnginePage_SetContent(QWebEnginePage* self, struct miqt_string data) { + QByteArray data_QByteArray(data.data, data.len); + self->setContent(data_QByteArray); +} + +struct miqt_string QWebEnginePage_Title(const QWebEnginePage* self) { + QString _ret = self->title(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEnginePage_SetUrl(QWebEnginePage* self, QUrl* url) { + self->setUrl(*url); +} + +QUrl* QWebEnginePage_Url(const QWebEnginePage* self) { + return new QUrl(self->url()); +} + +QUrl* QWebEnginePage_RequestedUrl(const QWebEnginePage* self) { + return new QUrl(self->requestedUrl()); +} + +QUrl* QWebEnginePage_IconUrl(const QWebEnginePage* self) { + return new QUrl(self->iconUrl()); +} + +QIcon* QWebEnginePage_Icon(const QWebEnginePage* self) { + return new QIcon(self->icon()); +} + +double QWebEnginePage_ZoomFactor(const QWebEnginePage* self) { + qreal _ret = self->zoomFactor(); + return static_cast(_ret); +} + +void QWebEnginePage_SetZoomFactor(QWebEnginePage* self, double factor) { + self->setZoomFactor(static_cast(factor)); +} + +QPointF* QWebEnginePage_ScrollPosition(const QWebEnginePage* self) { + return new QPointF(self->scrollPosition()); +} + +QSizeF* QWebEnginePage_ContentsSize(const QWebEnginePage* self) { + return new QSizeF(self->contentsSize()); +} + +QWebEngineScriptCollection* QWebEnginePage_Scripts(QWebEnginePage* self) { + QWebEngineScriptCollection& _ret = self->scripts(); + // Cast returned reference into pointer + return &_ret; +} + +QWebEngineSettings* QWebEnginePage_Settings(const QWebEnginePage* self) { + return self->settings(); +} + +QWebChannel* QWebEnginePage_WebChannel(const QWebEnginePage* self) { + return self->webChannel(); +} + +void QWebEnginePage_SetWebChannel(QWebEnginePage* self, QWebChannel* param1) { + self->setWebChannel(param1); +} + +QColor* QWebEnginePage_BackgroundColor(const QWebEnginePage* self) { + return new QColor(self->backgroundColor()); +} + +void QWebEnginePage_SetBackgroundColor(QWebEnginePage* self, QColor* color) { + self->setBackgroundColor(*color); +} + +void QWebEnginePage_Save(const QWebEnginePage* self, struct miqt_string filePath) { + QString filePath_QString = QString::fromUtf8(filePath.data, filePath.len); + self->save(filePath_QString); +} + +bool QWebEnginePage_IsAudioMuted(const QWebEnginePage* self) { + return self->isAudioMuted(); +} + +void QWebEnginePage_SetAudioMuted(QWebEnginePage* self, bool muted) { + self->setAudioMuted(muted); +} + +bool QWebEnginePage_RecentlyAudible(const QWebEnginePage* self) { + return self->recentlyAudible(); +} + +long long QWebEnginePage_RenderProcessPid(const QWebEnginePage* self) { + qint64 _ret = self->renderProcessPid(); + return static_cast(_ret); +} + +void QWebEnginePage_PrintToPdf(QWebEnginePage* self, struct miqt_string filePath) { + QString filePath_QString = QString::fromUtf8(filePath.data, filePath.len); + self->printToPdf(filePath_QString); +} + +void QWebEnginePage_SetInspectedPage(QWebEnginePage* self, QWebEnginePage* page) { + self->setInspectedPage(page); +} + +QWebEnginePage* QWebEnginePage_InspectedPage(const QWebEnginePage* self) { + return self->inspectedPage(); +} + +void QWebEnginePage_SetDevToolsPage(QWebEnginePage* self, QWebEnginePage* page) { + self->setDevToolsPage(page); +} + +QWebEnginePage* QWebEnginePage_DevToolsPage(const QWebEnginePage* self) { + return self->devToolsPage(); +} + +void QWebEnginePage_SetUrlRequestInterceptor(QWebEnginePage* self, QWebEngineUrlRequestInterceptor* interceptor) { + self->setUrlRequestInterceptor(interceptor); +} + +int QWebEnginePage_LifecycleState(const QWebEnginePage* self) { + QWebEnginePage::LifecycleState _ret = self->lifecycleState(); + return static_cast(_ret); +} + +void QWebEnginePage_SetLifecycleState(QWebEnginePage* self, int state) { + self->setLifecycleState(static_cast(state)); +} + +int QWebEnginePage_RecommendedState(const QWebEnginePage* self) { + QWebEnginePage::LifecycleState _ret = self->recommendedState(); + return static_cast(_ret); +} + +bool QWebEnginePage_IsVisible(const QWebEnginePage* self) { + return self->isVisible(); +} + +void QWebEnginePage_SetVisible(QWebEnginePage* self, bool visible) { + self->setVisible(visible); +} + +void QWebEnginePage_AcceptAsNewWindow(QWebEnginePage* self, QWebEngineNewWindowRequest* request) { + self->acceptAsNewWindow(*request); +} + +void QWebEnginePage_LoadStarted(QWebEnginePage* self) { + self->loadStarted(); +} + +void QWebEnginePage_connect_LoadStarted(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::loadStarted), self, [=]() { + miqt_exec_callback_QWebEnginePage_LoadStarted(slot); + }); +} + +void QWebEnginePage_LoadProgress(QWebEnginePage* self, int progress) { + self->loadProgress(static_cast(progress)); +} + +void QWebEnginePage_connect_LoadProgress(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::loadProgress), self, [=](int progress) { + int sigval1 = progress; + miqt_exec_callback_QWebEnginePage_LoadProgress(slot, sigval1); + }); +} + +void QWebEnginePage_LoadFinished(QWebEnginePage* self, bool ok) { + self->loadFinished(ok); +} + +void QWebEnginePage_connect_LoadFinished(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::loadFinished), self, [=](bool ok) { + bool sigval1 = ok; + miqt_exec_callback_QWebEnginePage_LoadFinished(slot, sigval1); + }); +} + +void QWebEnginePage_LoadingChanged(QWebEnginePage* self, QWebEngineLoadingInfo* loadingInfo) { + self->loadingChanged(*loadingInfo); +} + +void QWebEnginePage_connect_LoadingChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::loadingChanged), self, [=](const QWebEngineLoadingInfo& loadingInfo) { + const QWebEngineLoadingInfo& loadingInfo_ret = loadingInfo; + // Cast returned reference into pointer + QWebEngineLoadingInfo* sigval1 = const_cast(&loadingInfo_ret); + miqt_exec_callback_QWebEnginePage_LoadingChanged(slot, sigval1); + }); +} + +void QWebEnginePage_LinkHovered(QWebEnginePage* self, struct miqt_string url) { + QString url_QString = QString::fromUtf8(url.data, url.len); + self->linkHovered(url_QString); +} + +void QWebEnginePage_connect_LinkHovered(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::linkHovered), self, [=](const QString& url) { + const QString url_ret = url; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray url_b = url_ret.toUtf8(); + struct miqt_string url_ms; + url_ms.len = url_b.length(); + url_ms.data = static_cast(malloc(url_ms.len)); + memcpy(url_ms.data, url_b.data(), url_ms.len); + struct miqt_string sigval1 = url_ms; + miqt_exec_callback_QWebEnginePage_LinkHovered(slot, sigval1); + }); +} + +void QWebEnginePage_SelectionChanged(QWebEnginePage* self) { + self->selectionChanged(); +} + +void QWebEnginePage_connect_SelectionChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::selectionChanged), self, [=]() { + miqt_exec_callback_QWebEnginePage_SelectionChanged(slot); + }); +} + +void QWebEnginePage_GeometryChangeRequested(QWebEnginePage* self, QRect* geom) { + self->geometryChangeRequested(*geom); +} + +void QWebEnginePage_connect_GeometryChangeRequested(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::geometryChangeRequested), self, [=](const QRect& geom) { + const QRect& geom_ret = geom; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geom_ret); + miqt_exec_callback_QWebEnginePage_GeometryChangeRequested(slot, sigval1); + }); +} + +void QWebEnginePage_WindowCloseRequested(QWebEnginePage* self) { + self->windowCloseRequested(); +} + +void QWebEnginePage_connect_WindowCloseRequested(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::windowCloseRequested), self, [=]() { + miqt_exec_callback_QWebEnginePage_WindowCloseRequested(slot); + }); +} + +void QWebEnginePage_FeaturePermissionRequested(QWebEnginePage* self, QUrl* securityOrigin, int feature) { + self->featurePermissionRequested(*securityOrigin, static_cast(feature)); +} + +void QWebEnginePage_connect_FeaturePermissionRequested(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::featurePermissionRequested), self, [=](const QUrl& securityOrigin, QWebEnginePage::Feature feature) { + const QUrl& securityOrigin_ret = securityOrigin; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&securityOrigin_ret); + QWebEnginePage::Feature feature_ret = feature; + int sigval2 = static_cast(feature_ret); + miqt_exec_callback_QWebEnginePage_FeaturePermissionRequested(slot, sigval1, sigval2); + }); +} + +void QWebEnginePage_FeaturePermissionRequestCanceled(QWebEnginePage* self, QUrl* securityOrigin, int feature) { + self->featurePermissionRequestCanceled(*securityOrigin, static_cast(feature)); +} + +void QWebEnginePage_connect_FeaturePermissionRequestCanceled(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::featurePermissionRequestCanceled), self, [=](const QUrl& securityOrigin, QWebEnginePage::Feature feature) { + const QUrl& securityOrigin_ret = securityOrigin; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&securityOrigin_ret); + QWebEnginePage::Feature feature_ret = feature; + int sigval2 = static_cast(feature_ret); + miqt_exec_callback_QWebEnginePage_FeaturePermissionRequestCanceled(slot, sigval1, sigval2); + }); +} + +void QWebEnginePage_FullScreenRequested(QWebEnginePage* self, QWebEngineFullScreenRequest* fullScreenRequest) { + self->fullScreenRequested(*fullScreenRequest); +} + +void QWebEnginePage_connect_FullScreenRequested(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::fullScreenRequested), self, [=](QWebEngineFullScreenRequest fullScreenRequest) { + QWebEngineFullScreenRequest* sigval1 = new QWebEngineFullScreenRequest(fullScreenRequest); + miqt_exec_callback_QWebEnginePage_FullScreenRequested(slot, sigval1); + }); +} + +void QWebEnginePage_QuotaRequested(QWebEnginePage* self, QWebEngineQuotaRequest* quotaRequest) { + self->quotaRequested(*quotaRequest); +} + +void QWebEnginePage_connect_QuotaRequested(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::quotaRequested), self, [=](QWebEngineQuotaRequest quotaRequest) { + QWebEngineQuotaRequest* sigval1 = new QWebEngineQuotaRequest(quotaRequest); + miqt_exec_callback_QWebEnginePage_QuotaRequested(slot, sigval1); + }); +} + +void QWebEnginePage_RegisterProtocolHandlerRequested(QWebEnginePage* self, QWebEngineRegisterProtocolHandlerRequest* request) { + self->registerProtocolHandlerRequested(*request); +} + +void QWebEnginePage_connect_RegisterProtocolHandlerRequested(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::registerProtocolHandlerRequested), self, [=](QWebEngineRegisterProtocolHandlerRequest request) { + QWebEngineRegisterProtocolHandlerRequest* sigval1 = new QWebEngineRegisterProtocolHandlerRequest(request); + miqt_exec_callback_QWebEnginePage_RegisterProtocolHandlerRequested(slot, sigval1); + }); +} + +void QWebEnginePage_FileSystemAccessRequested(QWebEnginePage* self, QWebEngineFileSystemAccessRequest* request) { + self->fileSystemAccessRequested(*request); +} + +void QWebEnginePage_connect_FileSystemAccessRequested(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::fileSystemAccessRequested), self, [=](QWebEngineFileSystemAccessRequest request) { + QWebEngineFileSystemAccessRequest* sigval1 = new QWebEngineFileSystemAccessRequest(request); + miqt_exec_callback_QWebEnginePage_FileSystemAccessRequested(slot, sigval1); + }); +} + +void QWebEnginePage_SelectClientCertificate(QWebEnginePage* self, QWebEngineClientCertificateSelection* clientCertSelection) { + self->selectClientCertificate(*clientCertSelection); +} + +void QWebEnginePage_connect_SelectClientCertificate(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::selectClientCertificate), self, [=](QWebEngineClientCertificateSelection clientCertSelection) { + QWebEngineClientCertificateSelection* sigval1 = new QWebEngineClientCertificateSelection(clientCertSelection); + miqt_exec_callback_QWebEnginePage_SelectClientCertificate(slot, sigval1); + }); +} + +void QWebEnginePage_AuthenticationRequired(QWebEnginePage* self, QUrl* requestUrl, QAuthenticator* authenticator) { + self->authenticationRequired(*requestUrl, authenticator); +} + +void QWebEnginePage_connect_AuthenticationRequired(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::authenticationRequired), self, [=](const QUrl& requestUrl, QAuthenticator* authenticator) { + const QUrl& requestUrl_ret = requestUrl; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&requestUrl_ret); + QAuthenticator* sigval2 = authenticator; + miqt_exec_callback_QWebEnginePage_AuthenticationRequired(slot, sigval1, sigval2); + }); +} + +void QWebEnginePage_ProxyAuthenticationRequired(QWebEnginePage* self, QUrl* requestUrl, QAuthenticator* authenticator, struct miqt_string proxyHost) { + QString proxyHost_QString = QString::fromUtf8(proxyHost.data, proxyHost.len); + self->proxyAuthenticationRequired(*requestUrl, authenticator, proxyHost_QString); +} + +void QWebEnginePage_connect_ProxyAuthenticationRequired(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::proxyAuthenticationRequired), self, [=](const QUrl& requestUrl, QAuthenticator* authenticator, const QString& proxyHost) { + const QUrl& requestUrl_ret = requestUrl; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&requestUrl_ret); + QAuthenticator* sigval2 = authenticator; + const QString proxyHost_ret = proxyHost; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray proxyHost_b = proxyHost_ret.toUtf8(); + struct miqt_string proxyHost_ms; + proxyHost_ms.len = proxyHost_b.length(); + proxyHost_ms.data = static_cast(malloc(proxyHost_ms.len)); + memcpy(proxyHost_ms.data, proxyHost_b.data(), proxyHost_ms.len); + struct miqt_string sigval3 = proxyHost_ms; + miqt_exec_callback_QWebEnginePage_ProxyAuthenticationRequired(slot, sigval1, sigval2, sigval3); + }); +} + +void QWebEnginePage_RenderProcessTerminated(QWebEnginePage* self, int terminationStatus, int exitCode) { + self->renderProcessTerminated(static_cast(terminationStatus), static_cast(exitCode)); +} + +void QWebEnginePage_connect_RenderProcessTerminated(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::renderProcessTerminated), self, [=](QWebEnginePage::RenderProcessTerminationStatus terminationStatus, int exitCode) { + QWebEnginePage::RenderProcessTerminationStatus terminationStatus_ret = terminationStatus; + int sigval1 = static_cast(terminationStatus_ret); + int sigval2 = exitCode; + miqt_exec_callback_QWebEnginePage_RenderProcessTerminated(slot, sigval1, sigval2); + }); +} + +void QWebEnginePage_CertificateError(QWebEnginePage* self, QWebEngineCertificateError* certificateError) { + self->certificateError(*certificateError); +} + +void QWebEnginePage_connect_CertificateError(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::certificateError), self, [=](const QWebEngineCertificateError& certificateError) { + const QWebEngineCertificateError& certificateError_ret = certificateError; + // Cast returned reference into pointer + QWebEngineCertificateError* sigval1 = const_cast(&certificateError_ret); + miqt_exec_callback_QWebEnginePage_CertificateError(slot, sigval1); + }); +} + +void QWebEnginePage_NavigationRequested(QWebEnginePage* self, QWebEngineNavigationRequest* request) { + self->navigationRequested(*request); +} + +void QWebEnginePage_connect_NavigationRequested(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::navigationRequested), self, [=](QWebEngineNavigationRequest& request) { + QWebEngineNavigationRequest& request_ret = request; + // Cast returned reference into pointer + QWebEngineNavigationRequest* sigval1 = &request_ret; + miqt_exec_callback_QWebEnginePage_NavigationRequested(slot, sigval1); + }); +} + +void QWebEnginePage_NewWindowRequested(QWebEnginePage* self, QWebEngineNewWindowRequest* request) { + self->newWindowRequested(*request); +} + +void QWebEnginePage_connect_NewWindowRequested(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::newWindowRequested), self, [=](QWebEngineNewWindowRequest& request) { + QWebEngineNewWindowRequest& request_ret = request; + // Cast returned reference into pointer + QWebEngineNewWindowRequest* sigval1 = &request_ret; + miqt_exec_callback_QWebEnginePage_NewWindowRequested(slot, sigval1); + }); +} + +void QWebEnginePage_TitleChanged(QWebEnginePage* self, struct miqt_string title) { + QString title_QString = QString::fromUtf8(title.data, title.len); + self->titleChanged(title_QString); +} + +void QWebEnginePage_connect_TitleChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::titleChanged), self, [=](const QString& title) { + const QString title_ret = title; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray title_b = title_ret.toUtf8(); + struct miqt_string title_ms; + title_ms.len = title_b.length(); + title_ms.data = static_cast(malloc(title_ms.len)); + memcpy(title_ms.data, title_b.data(), title_ms.len); + struct miqt_string sigval1 = title_ms; + miqt_exec_callback_QWebEnginePage_TitleChanged(slot, sigval1); + }); +} + +void QWebEnginePage_UrlChanged(QWebEnginePage* self, QUrl* url) { + self->urlChanged(*url); +} + +void QWebEnginePage_connect_UrlChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::urlChanged), self, [=](const QUrl& url) { + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&url_ret); + miqt_exec_callback_QWebEnginePage_UrlChanged(slot, sigval1); + }); +} + +void QWebEnginePage_IconUrlChanged(QWebEnginePage* self, QUrl* url) { + self->iconUrlChanged(*url); +} + +void QWebEnginePage_connect_IconUrlChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::iconUrlChanged), self, [=](const QUrl& url) { + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&url_ret); + miqt_exec_callback_QWebEnginePage_IconUrlChanged(slot, sigval1); + }); +} + +void QWebEnginePage_IconChanged(QWebEnginePage* self, QIcon* icon) { + self->iconChanged(*icon); +} + +void QWebEnginePage_connect_IconChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::iconChanged), self, [=](const QIcon& icon) { + const QIcon& icon_ret = icon; + // Cast returned reference into pointer + QIcon* sigval1 = const_cast(&icon_ret); + miqt_exec_callback_QWebEnginePage_IconChanged(slot, sigval1); + }); +} + +void QWebEnginePage_ScrollPositionChanged(QWebEnginePage* self, QPointF* position) { + self->scrollPositionChanged(*position); +} + +void QWebEnginePage_connect_ScrollPositionChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::scrollPositionChanged), self, [=](const QPointF& position) { + const QPointF& position_ret = position; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&position_ret); + miqt_exec_callback_QWebEnginePage_ScrollPositionChanged(slot, sigval1); + }); +} + +void QWebEnginePage_ContentsSizeChanged(QWebEnginePage* self, QSizeF* size) { + self->contentsSizeChanged(*size); +} + +void QWebEnginePage_connect_ContentsSizeChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::contentsSizeChanged), self, [=](const QSizeF& size) { + const QSizeF& size_ret = size; + // Cast returned reference into pointer + QSizeF* sigval1 = const_cast(&size_ret); + miqt_exec_callback_QWebEnginePage_ContentsSizeChanged(slot, sigval1); + }); +} + +void QWebEnginePage_AudioMutedChanged(QWebEnginePage* self, bool muted) { + self->audioMutedChanged(muted); +} + +void QWebEnginePage_connect_AudioMutedChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::audioMutedChanged), self, [=](bool muted) { + bool sigval1 = muted; + miqt_exec_callback_QWebEnginePage_AudioMutedChanged(slot, sigval1); + }); +} + +void QWebEnginePage_RecentlyAudibleChanged(QWebEnginePage* self, bool recentlyAudible) { + self->recentlyAudibleChanged(recentlyAudible); +} + +void QWebEnginePage_connect_RecentlyAudibleChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::recentlyAudibleChanged), self, [=](bool recentlyAudible) { + bool sigval1 = recentlyAudible; + miqt_exec_callback_QWebEnginePage_RecentlyAudibleChanged(slot, sigval1); + }); +} + +void QWebEnginePage_RenderProcessPidChanged(QWebEnginePage* self, long long pid) { + self->renderProcessPidChanged(static_cast(pid)); +} + +void QWebEnginePage_connect_RenderProcessPidChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::renderProcessPidChanged), self, [=](qint64 pid) { + qint64 pid_ret = pid; + long long sigval1 = static_cast(pid_ret); + miqt_exec_callback_QWebEnginePage_RenderProcessPidChanged(slot, sigval1); + }); +} + +void QWebEnginePage_PdfPrintingFinished(QWebEnginePage* self, struct miqt_string filePath, bool success) { + QString filePath_QString = QString::fromUtf8(filePath.data, filePath.len); + self->pdfPrintingFinished(filePath_QString, success); +} + +void QWebEnginePage_connect_PdfPrintingFinished(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::pdfPrintingFinished), self, [=](const QString& filePath, bool success) { + const QString filePath_ret = filePath; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray filePath_b = filePath_ret.toUtf8(); + struct miqt_string filePath_ms; + filePath_ms.len = filePath_b.length(); + filePath_ms.data = static_cast(malloc(filePath_ms.len)); + memcpy(filePath_ms.data, filePath_b.data(), filePath_ms.len); + struct miqt_string sigval1 = filePath_ms; + bool sigval2 = success; + miqt_exec_callback_QWebEnginePage_PdfPrintingFinished(slot, sigval1, sigval2); + }); +} + +void QWebEnginePage_PrintRequested(QWebEnginePage* self) { + self->printRequested(); +} + +void QWebEnginePage_connect_PrintRequested(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::printRequested), self, [=]() { + miqt_exec_callback_QWebEnginePage_PrintRequested(slot); + }); +} + +void QWebEnginePage_VisibleChanged(QWebEnginePage* self, bool visible) { + self->visibleChanged(visible); +} + +void QWebEnginePage_connect_VisibleChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::visibleChanged), self, [=](bool visible) { + bool sigval1 = visible; + miqt_exec_callback_QWebEnginePage_VisibleChanged(slot, sigval1); + }); +} + +void QWebEnginePage_LifecycleStateChanged(QWebEnginePage* self, int state) { + self->lifecycleStateChanged(static_cast(state)); +} + +void QWebEnginePage_connect_LifecycleStateChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::lifecycleStateChanged), self, [=](QWebEnginePage::LifecycleState state) { + QWebEnginePage::LifecycleState state_ret = state; + int sigval1 = static_cast(state_ret); + miqt_exec_callback_QWebEnginePage_LifecycleStateChanged(slot, sigval1); + }); +} + +void QWebEnginePage_RecommendedStateChanged(QWebEnginePage* self, int state) { + self->recommendedStateChanged(static_cast(state)); +} + +void QWebEnginePage_connect_RecommendedStateChanged(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::recommendedStateChanged), self, [=](QWebEnginePage::LifecycleState state) { + QWebEnginePage::LifecycleState state_ret = state; + int sigval1 = static_cast(state_ret); + miqt_exec_callback_QWebEnginePage_RecommendedStateChanged(slot, sigval1); + }); +} + +void QWebEnginePage_FindTextFinished(QWebEnginePage* self, QWebEngineFindTextResult* result) { + self->findTextFinished(*result); +} + +void QWebEnginePage_connect_FindTextFinished(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::findTextFinished), self, [=](const QWebEngineFindTextResult& result) { + const QWebEngineFindTextResult& result_ret = result; + // Cast returned reference into pointer + QWebEngineFindTextResult* sigval1 = const_cast(&result_ret); + miqt_exec_callback_QWebEnginePage_FindTextFinished(slot, sigval1); + }); +} + +void QWebEnginePage_QAboutToDelete(QWebEnginePage* self) { + self->_q_aboutToDelete(); +} + +void QWebEnginePage_connect_QAboutToDelete(QWebEnginePage* self, intptr_t slot) { + MiqtVirtualQWebEnginePage::connect(self, static_cast(&QWebEnginePage::_q_aboutToDelete), self, [=]() { + miqt_exec_callback_QWebEnginePage_QAboutToDelete(slot); + }); +} + +struct miqt_string QWebEnginePage_Tr2(const char* s, const char* c) { + QString _ret = QWebEnginePage::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEnginePage_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEnginePage::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEnginePage_Download2(QWebEnginePage* self, QUrl* url, struct miqt_string filename) { + QString filename_QString = QString::fromUtf8(filename.data, filename.len); + self->download(*url, filename_QString); +} + +void QWebEnginePage_SetHtml2(QWebEnginePage* self, struct miqt_string html, QUrl* baseUrl) { + QString html_QString = QString::fromUtf8(html.data, html.len); + self->setHtml(html_QString, *baseUrl); +} + +void QWebEnginePage_SetContent2(QWebEnginePage* self, struct miqt_string data, struct miqt_string mimeType) { + QByteArray data_QByteArray(data.data, data.len); + QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); + self->setContent(data_QByteArray, mimeType_QString); +} + +void QWebEnginePage_SetContent3(QWebEnginePage* self, struct miqt_string data, struct miqt_string mimeType, QUrl* baseUrl) { + QByteArray data_QByteArray(data.data, data.len); + QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); + self->setContent(data_QByteArray, mimeType_QString, *baseUrl); +} + +void QWebEnginePage_SetWebChannel2(QWebEnginePage* self, QWebChannel* param1, unsigned int worldId) { + self->setWebChannel(param1, static_cast(worldId)); +} + +void QWebEnginePage_Save2(const QWebEnginePage* self, struct miqt_string filePath, int format) { + QString filePath_QString = QString::fromUtf8(filePath.data, filePath.len); + self->save(filePath_QString, static_cast(format)); +} + +void QWebEnginePage_PrintToPdf2(QWebEnginePage* self, struct miqt_string filePath, QPageLayout* layout) { + QString filePath_QString = QString::fromUtf8(filePath.data, filePath.len); + self->printToPdf(filePath_QString, *layout); +} + +void QWebEnginePage_PrintToPdf3(QWebEnginePage* self, struct miqt_string filePath, QPageLayout* layout, QPageRanges* ranges) { + QString filePath_QString = QString::fromUtf8(filePath.data, filePath.len); + self->printToPdf(filePath_QString, *layout, *ranges); +} + +void QWebEnginePage_override_virtual_TriggerAction(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__TriggerAction = slot; +} + +void QWebEnginePage_virtualbase_TriggerAction(void* self, int action, bool checked) { + ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_TriggerAction(action, checked); +} + +void QWebEnginePage_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__Event = slot; +} + +bool QWebEnginePage_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_Event(param1); +} + +void QWebEnginePage_override_virtual_CreateWindow(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__CreateWindow = slot; +} + +QWebEnginePage* QWebEnginePage_virtualbase_CreateWindow(void* self, int typeVal) { + return ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_CreateWindow(typeVal); +} + +void QWebEnginePage_override_virtual_ChooseFiles(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__ChooseFiles = slot; +} + +struct miqt_array /* of struct miqt_string */ QWebEnginePage_virtualbase_ChooseFiles(void* self, int mode, struct miqt_array /* of struct miqt_string */ oldFiles, struct miqt_array /* of struct miqt_string */ acceptedMimeTypes) { + return ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_ChooseFiles(mode, oldFiles, acceptedMimeTypes); +} + +void QWebEnginePage_override_virtual_JavaScriptAlert(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__JavaScriptAlert = slot; +} + +void QWebEnginePage_virtualbase_JavaScriptAlert(void* self, QUrl* securityOrigin, struct miqt_string msg) { + ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_JavaScriptAlert(securityOrigin, msg); +} + +void QWebEnginePage_override_virtual_JavaScriptConfirm(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__JavaScriptConfirm = slot; +} + +bool QWebEnginePage_virtualbase_JavaScriptConfirm(void* self, QUrl* securityOrigin, struct miqt_string msg) { + return ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_JavaScriptConfirm(securityOrigin, msg); +} + +void QWebEnginePage_override_virtual_JavaScriptConsoleMessage(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__JavaScriptConsoleMessage = slot; +} + +void QWebEnginePage_virtualbase_JavaScriptConsoleMessage(void* self, int level, struct miqt_string message, int lineNumber, struct miqt_string sourceID) { + ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_JavaScriptConsoleMessage(level, message, lineNumber, sourceID); +} + +void QWebEnginePage_override_virtual_AcceptNavigationRequest(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__AcceptNavigationRequest = slot; +} + +bool QWebEnginePage_virtualbase_AcceptNavigationRequest(void* self, QUrl* url, int typeVal, bool isMainFrame) { + return ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_AcceptNavigationRequest(url, typeVal, isMainFrame); +} + +void QWebEnginePage_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__EventFilter = slot; +} + +bool QWebEnginePage_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QWebEnginePage_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__TimerEvent = slot; +} + +void QWebEnginePage_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_TimerEvent(event); +} + +void QWebEnginePage_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__ChildEvent = slot; +} + +void QWebEnginePage_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_ChildEvent(event); +} + +void QWebEnginePage_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__CustomEvent = slot; +} + +void QWebEnginePage_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_CustomEvent(event); +} + +void QWebEnginePage_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__ConnectNotify = slot; +} + +void QWebEnginePage_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QWebEnginePage_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebEnginePage*)(self) )->handle__DisconnectNotify = slot; +} + +void QWebEnginePage_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebEnginePage*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QWebEnginePage_Delete(QWebEnginePage* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebenginepage.go b/qt6/webengine/gen_qwebenginepage.go new file mode 100644 index 00000000..952131e1 --- /dev/null +++ b/qt6/webengine/gen_qwebenginepage.go @@ -0,0 +1,1806 @@ +package webengine + +/* + +#include "gen_qwebenginepage.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "github.com/mappu/miqt/qt6/network" + "github.com/mappu/miqt/qt6/webchannel" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebEnginePage__WebAction int + +const ( + QWebEnginePage__NoWebAction QWebEnginePage__WebAction = -1 + QWebEnginePage__Back QWebEnginePage__WebAction = 0 + QWebEnginePage__Forward QWebEnginePage__WebAction = 1 + QWebEnginePage__Stop QWebEnginePage__WebAction = 2 + QWebEnginePage__Reload QWebEnginePage__WebAction = 3 + QWebEnginePage__Cut QWebEnginePage__WebAction = 4 + QWebEnginePage__Copy QWebEnginePage__WebAction = 5 + QWebEnginePage__Paste QWebEnginePage__WebAction = 6 + QWebEnginePage__Undo QWebEnginePage__WebAction = 7 + QWebEnginePage__Redo QWebEnginePage__WebAction = 8 + QWebEnginePage__SelectAll QWebEnginePage__WebAction = 9 + QWebEnginePage__ReloadAndBypassCache QWebEnginePage__WebAction = 10 + QWebEnginePage__PasteAndMatchStyle QWebEnginePage__WebAction = 11 + QWebEnginePage__OpenLinkInThisWindow QWebEnginePage__WebAction = 12 + QWebEnginePage__OpenLinkInNewWindow QWebEnginePage__WebAction = 13 + QWebEnginePage__OpenLinkInNewTab QWebEnginePage__WebAction = 14 + QWebEnginePage__CopyLinkToClipboard QWebEnginePage__WebAction = 15 + QWebEnginePage__DownloadLinkToDisk QWebEnginePage__WebAction = 16 + QWebEnginePage__CopyImageToClipboard QWebEnginePage__WebAction = 17 + QWebEnginePage__CopyImageUrlToClipboard QWebEnginePage__WebAction = 18 + QWebEnginePage__DownloadImageToDisk QWebEnginePage__WebAction = 19 + QWebEnginePage__CopyMediaUrlToClipboard QWebEnginePage__WebAction = 20 + QWebEnginePage__ToggleMediaControls QWebEnginePage__WebAction = 21 + QWebEnginePage__ToggleMediaLoop QWebEnginePage__WebAction = 22 + QWebEnginePage__ToggleMediaPlayPause QWebEnginePage__WebAction = 23 + QWebEnginePage__ToggleMediaMute QWebEnginePage__WebAction = 24 + QWebEnginePage__DownloadMediaToDisk QWebEnginePage__WebAction = 25 + QWebEnginePage__InspectElement QWebEnginePage__WebAction = 26 + QWebEnginePage__ExitFullScreen QWebEnginePage__WebAction = 27 + QWebEnginePage__RequestClose QWebEnginePage__WebAction = 28 + QWebEnginePage__Unselect QWebEnginePage__WebAction = 29 + QWebEnginePage__SavePage QWebEnginePage__WebAction = 30 + QWebEnginePage__OpenLinkInNewBackgroundTab QWebEnginePage__WebAction = 31 + QWebEnginePage__ViewSource QWebEnginePage__WebAction = 32 + QWebEnginePage__ToggleBold QWebEnginePage__WebAction = 33 + QWebEnginePage__ToggleItalic QWebEnginePage__WebAction = 34 + QWebEnginePage__ToggleUnderline QWebEnginePage__WebAction = 35 + QWebEnginePage__ToggleStrikethrough QWebEnginePage__WebAction = 36 + QWebEnginePage__AlignLeft QWebEnginePage__WebAction = 37 + QWebEnginePage__AlignCenter QWebEnginePage__WebAction = 38 + QWebEnginePage__AlignRight QWebEnginePage__WebAction = 39 + QWebEnginePage__AlignJustified QWebEnginePage__WebAction = 40 + QWebEnginePage__Indent QWebEnginePage__WebAction = 41 + QWebEnginePage__Outdent QWebEnginePage__WebAction = 42 + QWebEnginePage__InsertOrderedList QWebEnginePage__WebAction = 43 + QWebEnginePage__InsertUnorderedList QWebEnginePage__WebAction = 44 + QWebEnginePage__WebActionCount QWebEnginePage__WebAction = 45 +) + +type QWebEnginePage__FindFlag int + +const ( + QWebEnginePage__FindBackward QWebEnginePage__FindFlag = 1 + QWebEnginePage__FindCaseSensitively QWebEnginePage__FindFlag = 2 +) + +type QWebEnginePage__WebWindowType int + +const ( + QWebEnginePage__WebBrowserWindow QWebEnginePage__WebWindowType = 0 + QWebEnginePage__WebBrowserTab QWebEnginePage__WebWindowType = 1 + QWebEnginePage__WebDialog QWebEnginePage__WebWindowType = 2 + QWebEnginePage__WebBrowserBackgroundTab QWebEnginePage__WebWindowType = 3 +) + +type QWebEnginePage__PermissionPolicy int + +const ( + QWebEnginePage__PermissionUnknown QWebEnginePage__PermissionPolicy = 0 + QWebEnginePage__PermissionGrantedByUser QWebEnginePage__PermissionPolicy = 1 + QWebEnginePage__PermissionDeniedByUser QWebEnginePage__PermissionPolicy = 2 +) + +type QWebEnginePage__NavigationType int + +const ( + QWebEnginePage__NavigationTypeLinkClicked QWebEnginePage__NavigationType = 0 + QWebEnginePage__NavigationTypeTyped QWebEnginePage__NavigationType = 1 + QWebEnginePage__NavigationTypeFormSubmitted QWebEnginePage__NavigationType = 2 + QWebEnginePage__NavigationTypeBackForward QWebEnginePage__NavigationType = 3 + QWebEnginePage__NavigationTypeReload QWebEnginePage__NavigationType = 4 + QWebEnginePage__NavigationTypeOther QWebEnginePage__NavigationType = 5 + QWebEnginePage__NavigationTypeRedirect QWebEnginePage__NavigationType = 6 +) + +type QWebEnginePage__Feature int + +const ( + QWebEnginePage__Notifications QWebEnginePage__Feature = 0 + QWebEnginePage__Geolocation QWebEnginePage__Feature = 1 + QWebEnginePage__MediaAudioCapture QWebEnginePage__Feature = 2 + QWebEnginePage__MediaVideoCapture QWebEnginePage__Feature = 3 + QWebEnginePage__MediaAudioVideoCapture QWebEnginePage__Feature = 4 + QWebEnginePage__MouseLock QWebEnginePage__Feature = 5 + QWebEnginePage__DesktopVideoCapture QWebEnginePage__Feature = 6 + QWebEnginePage__DesktopAudioVideoCapture QWebEnginePage__Feature = 7 +) + +type QWebEnginePage__FileSelectionMode int + +const ( + QWebEnginePage__FileSelectOpen QWebEnginePage__FileSelectionMode = 0 + QWebEnginePage__FileSelectOpenMultiple QWebEnginePage__FileSelectionMode = 1 + QWebEnginePage__FileSelectUploadFolder QWebEnginePage__FileSelectionMode = 2 + QWebEnginePage__FileSelectSave QWebEnginePage__FileSelectionMode = 3 +) + +type QWebEnginePage__JavaScriptConsoleMessageLevel int + +const ( + QWebEnginePage__InfoMessageLevel QWebEnginePage__JavaScriptConsoleMessageLevel = 0 + QWebEnginePage__WarningMessageLevel QWebEnginePage__JavaScriptConsoleMessageLevel = 1 + QWebEnginePage__ErrorMessageLevel QWebEnginePage__JavaScriptConsoleMessageLevel = 2 +) + +type QWebEnginePage__RenderProcessTerminationStatus int + +const ( + QWebEnginePage__NormalTerminationStatus QWebEnginePage__RenderProcessTerminationStatus = 0 + QWebEnginePage__AbnormalTerminationStatus QWebEnginePage__RenderProcessTerminationStatus = 1 + QWebEnginePage__CrashedTerminationStatus QWebEnginePage__RenderProcessTerminationStatus = 2 + QWebEnginePage__KilledTerminationStatus QWebEnginePage__RenderProcessTerminationStatus = 3 +) + +type QWebEnginePage__LifecycleState int + +const ( + QWebEnginePage__Active QWebEnginePage__LifecycleState = 0 + QWebEnginePage__Frozen QWebEnginePage__LifecycleState = 1 + QWebEnginePage__Discarded QWebEnginePage__LifecycleState = 2 +) + +type QWebEnginePage struct { + h *C.QWebEnginePage + isSubclass bool + *qt6.QObject +} + +func (this *QWebEnginePage) cPointer() *C.QWebEnginePage { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEnginePage) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEnginePage constructs the type using only CGO pointers. +func newQWebEnginePage(h *C.QWebEnginePage, h_QObject *C.QObject) *QWebEnginePage { + if h == nil { + return nil + } + return &QWebEnginePage{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEnginePage constructs the type using only unsafe pointers. +func UnsafeNewQWebEnginePage(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEnginePage { + if h == nil { + return nil + } + + return &QWebEnginePage{h: (*C.QWebEnginePage)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} +} + +// NewQWebEnginePage constructs a new QWebEnginePage object. +func NewQWebEnginePage() *QWebEnginePage { + var outptr_QWebEnginePage *C.QWebEnginePage = nil + var outptr_QObject *C.QObject = nil + + C.QWebEnginePage_new(&outptr_QWebEnginePage, &outptr_QObject) + ret := newQWebEnginePage(outptr_QWebEnginePage, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebEnginePage2 constructs a new QWebEnginePage object. +func NewQWebEnginePage2(profile *QWebEngineProfile) *QWebEnginePage { + var outptr_QWebEnginePage *C.QWebEnginePage = nil + var outptr_QObject *C.QObject = nil + + C.QWebEnginePage_new2(profile.cPointer(), &outptr_QWebEnginePage, &outptr_QObject) + ret := newQWebEnginePage(outptr_QWebEnginePage, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebEnginePage3 constructs a new QWebEnginePage object. +func NewQWebEnginePage3(parent *qt6.QObject) *QWebEnginePage { + var outptr_QWebEnginePage *C.QWebEnginePage = nil + var outptr_QObject *C.QObject = nil + + C.QWebEnginePage_new3((*C.QObject)(parent.UnsafePointer()), &outptr_QWebEnginePage, &outptr_QObject) + ret := newQWebEnginePage(outptr_QWebEnginePage, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebEnginePage4 constructs a new QWebEnginePage object. +func NewQWebEnginePage4(profile *QWebEngineProfile, parent *qt6.QObject) *QWebEnginePage { + var outptr_QWebEnginePage *C.QWebEnginePage = nil + var outptr_QObject *C.QObject = nil + + C.QWebEnginePage_new4(profile.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QWebEnginePage, &outptr_QObject) + ret := newQWebEnginePage(outptr_QWebEnginePage, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QWebEnginePage) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEnginePage_MetaObject(this.h))) +} + +func (this *QWebEnginePage) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEnginePage_Metacast(this.h, param1_Cstring)) +} + +func QWebEnginePage_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEnginePage_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEnginePage) History() *QWebEngineHistory { + return UnsafeNewQWebEngineHistory(unsafe.Pointer(C.QWebEnginePage_History(this.h)), nil) +} + +func (this *QWebEnginePage) HasSelection() bool { + return (bool)(C.QWebEnginePage_HasSelection(this.h)) +} + +func (this *QWebEnginePage) SelectedText() string { + var _ms C.struct_miqt_string = C.QWebEnginePage_SelectedText(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEnginePage) Profile() *QWebEngineProfile { + return UnsafeNewQWebEngineProfile(unsafe.Pointer(C.QWebEnginePage_Profile(this.h)), nil) +} + +func (this *QWebEnginePage) Action(action QWebEnginePage__WebAction) *qt6.QAction { + return qt6.UnsafeNewQAction(unsafe.Pointer(C.QWebEnginePage_Action(this.h, (C.int)(action))), nil) +} + +func (this *QWebEnginePage) TriggerAction(action QWebEnginePage__WebAction, checked bool) { + C.QWebEnginePage_TriggerAction(this.h, (C.int)(action), (C.bool)(checked)) +} + +func (this *QWebEnginePage) ReplaceMisspelledWord(replacement string) { + replacement_ms := C.struct_miqt_string{} + replacement_ms.data = C.CString(replacement) + replacement_ms.len = C.size_t(len(replacement)) + defer C.free(unsafe.Pointer(replacement_ms.data)) + C.QWebEnginePage_ReplaceMisspelledWord(this.h, replacement_ms) +} + +func (this *QWebEnginePage) Event(param1 *qt6.QEvent) bool { + return (bool)(C.QWebEnginePage_Event(this.h, (*C.QEvent)(param1.UnsafePointer()))) +} + +func (this *QWebEnginePage) SetFeaturePermission(securityOrigin *qt6.QUrl, feature QWebEnginePage__Feature, policy QWebEnginePage__PermissionPolicy) { + C.QWebEnginePage_SetFeaturePermission(this.h, (*C.QUrl)(securityOrigin.UnsafePointer()), (C.int)(feature), (C.int)(policy)) +} + +func (this *QWebEnginePage) IsLoading() bool { + return (bool)(C.QWebEnginePage_IsLoading(this.h)) +} + +func (this *QWebEnginePage) Load(url *qt6.QUrl) { + C.QWebEnginePage_Load(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QWebEnginePage) LoadWithRequest(request *QWebEngineHttpRequest) { + C.QWebEnginePage_LoadWithRequest(this.h, request.cPointer()) +} + +func (this *QWebEnginePage) Download(url *qt6.QUrl) { + C.QWebEnginePage_Download(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QWebEnginePage) SetHtml(html string) { + html_ms := C.struct_miqt_string{} + html_ms.data = C.CString(html) + html_ms.len = C.size_t(len(html)) + defer C.free(unsafe.Pointer(html_ms.data)) + C.QWebEnginePage_SetHtml(this.h, html_ms) +} + +func (this *QWebEnginePage) SetContent(data []byte) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + C.QWebEnginePage_SetContent(this.h, data_alias) +} + +func (this *QWebEnginePage) Title() string { + var _ms C.struct_miqt_string = C.QWebEnginePage_Title(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEnginePage) SetUrl(url *qt6.QUrl) { + C.QWebEnginePage_SetUrl(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QWebEnginePage) Url() *qt6.QUrl { + _ret := C.QWebEnginePage_Url(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEnginePage) RequestedUrl() *qt6.QUrl { + _ret := C.QWebEnginePage_RequestedUrl(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEnginePage) IconUrl() *qt6.QUrl { + _ret := C.QWebEnginePage_IconUrl(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEnginePage) Icon() *qt6.QIcon { + _ret := C.QWebEnginePage_Icon(this.h) + _goptr := qt6.UnsafeNewQIcon(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEnginePage) ZoomFactor() float64 { + return (float64)(C.QWebEnginePage_ZoomFactor(this.h)) +} + +func (this *QWebEnginePage) SetZoomFactor(factor float64) { + C.QWebEnginePage_SetZoomFactor(this.h, (C.double)(factor)) +} + +func (this *QWebEnginePage) ScrollPosition() *qt6.QPointF { + _ret := C.QWebEnginePage_ScrollPosition(this.h) + _goptr := qt6.UnsafeNewQPointF(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEnginePage) ContentsSize() *qt6.QSizeF { + _ret := C.QWebEnginePage_ContentsSize(this.h) + _goptr := qt6.UnsafeNewQSizeF(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEnginePage) Scripts() *QWebEngineScriptCollection { + return UnsafeNewQWebEngineScriptCollection(unsafe.Pointer(C.QWebEnginePage_Scripts(this.h))) +} + +func (this *QWebEnginePage) Settings() *QWebEngineSettings { + return UnsafeNewQWebEngineSettings(unsafe.Pointer(C.QWebEnginePage_Settings(this.h))) +} + +func (this *QWebEnginePage) WebChannel() *webchannel.QWebChannel { + return webchannel.UnsafeNewQWebChannel(unsafe.Pointer(C.QWebEnginePage_WebChannel(this.h)), nil) +} + +func (this *QWebEnginePage) SetWebChannel(param1 *webchannel.QWebChannel) { + C.QWebEnginePage_SetWebChannel(this.h, (*C.QWebChannel)(param1.UnsafePointer())) +} + +func (this *QWebEnginePage) BackgroundColor() *qt6.QColor { + _ret := C.QWebEnginePage_BackgroundColor(this.h) + _goptr := qt6.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEnginePage) SetBackgroundColor(color *qt6.QColor) { + C.QWebEnginePage_SetBackgroundColor(this.h, (*C.QColor)(color.UnsafePointer())) +} + +func (this *QWebEnginePage) Save(filePath string) { + filePath_ms := C.struct_miqt_string{} + filePath_ms.data = C.CString(filePath) + filePath_ms.len = C.size_t(len(filePath)) + defer C.free(unsafe.Pointer(filePath_ms.data)) + C.QWebEnginePage_Save(this.h, filePath_ms) +} + +func (this *QWebEnginePage) IsAudioMuted() bool { + return (bool)(C.QWebEnginePage_IsAudioMuted(this.h)) +} + +func (this *QWebEnginePage) SetAudioMuted(muted bool) { + C.QWebEnginePage_SetAudioMuted(this.h, (C.bool)(muted)) +} + +func (this *QWebEnginePage) RecentlyAudible() bool { + return (bool)(C.QWebEnginePage_RecentlyAudible(this.h)) +} + +func (this *QWebEnginePage) RenderProcessPid() int64 { + return (int64)(C.QWebEnginePage_RenderProcessPid(this.h)) +} + +func (this *QWebEnginePage) PrintToPdf(filePath string) { + filePath_ms := C.struct_miqt_string{} + filePath_ms.data = C.CString(filePath) + filePath_ms.len = C.size_t(len(filePath)) + defer C.free(unsafe.Pointer(filePath_ms.data)) + C.QWebEnginePage_PrintToPdf(this.h, filePath_ms) +} + +func (this *QWebEnginePage) SetInspectedPage(page *QWebEnginePage) { + C.QWebEnginePage_SetInspectedPage(this.h, page.cPointer()) +} + +func (this *QWebEnginePage) InspectedPage() *QWebEnginePage { + return UnsafeNewQWebEnginePage(unsafe.Pointer(C.QWebEnginePage_InspectedPage(this.h)), nil) +} + +func (this *QWebEnginePage) SetDevToolsPage(page *QWebEnginePage) { + C.QWebEnginePage_SetDevToolsPage(this.h, page.cPointer()) +} + +func (this *QWebEnginePage) DevToolsPage() *QWebEnginePage { + return UnsafeNewQWebEnginePage(unsafe.Pointer(C.QWebEnginePage_DevToolsPage(this.h)), nil) +} + +func (this *QWebEnginePage) SetUrlRequestInterceptor(interceptor *QWebEngineUrlRequestInterceptor) { + C.QWebEnginePage_SetUrlRequestInterceptor(this.h, interceptor.cPointer()) +} + +func (this *QWebEnginePage) LifecycleState() QWebEnginePage__LifecycleState { + return (QWebEnginePage__LifecycleState)(C.QWebEnginePage_LifecycleState(this.h)) +} + +func (this *QWebEnginePage) SetLifecycleState(state QWebEnginePage__LifecycleState) { + C.QWebEnginePage_SetLifecycleState(this.h, (C.int)(state)) +} + +func (this *QWebEnginePage) RecommendedState() QWebEnginePage__LifecycleState { + return (QWebEnginePage__LifecycleState)(C.QWebEnginePage_RecommendedState(this.h)) +} + +func (this *QWebEnginePage) IsVisible() bool { + return (bool)(C.QWebEnginePage_IsVisible(this.h)) +} + +func (this *QWebEnginePage) SetVisible(visible bool) { + C.QWebEnginePage_SetVisible(this.h, (C.bool)(visible)) +} + +func (this *QWebEnginePage) AcceptAsNewWindow(request *QWebEngineNewWindowRequest) { + C.QWebEnginePage_AcceptAsNewWindow(this.h, request.cPointer()) +} + +func (this *QWebEnginePage) LoadStarted() { + C.QWebEnginePage_LoadStarted(this.h) +} +func (this *QWebEnginePage) OnLoadStarted(slot func()) { + C.QWebEnginePage_connect_LoadStarted(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_LoadStarted +func miqt_exec_callback_QWebEnginePage_LoadStarted(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEnginePage) LoadProgress(progress int) { + C.QWebEnginePage_LoadProgress(this.h, (C.int)(progress)) +} +func (this *QWebEnginePage) OnLoadProgress(slot func(progress int)) { + C.QWebEnginePage_connect_LoadProgress(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_LoadProgress +func miqt_exec_callback_QWebEnginePage_LoadProgress(cb C.intptr_t, progress C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(progress int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(progress) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) LoadFinished(ok bool) { + C.QWebEnginePage_LoadFinished(this.h, (C.bool)(ok)) +} +func (this *QWebEnginePage) OnLoadFinished(slot func(ok bool)) { + C.QWebEnginePage_connect_LoadFinished(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_LoadFinished +func miqt_exec_callback_QWebEnginePage_LoadFinished(cb C.intptr_t, ok C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(ok bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(ok) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) LoadingChanged(loadingInfo *QWebEngineLoadingInfo) { + C.QWebEnginePage_LoadingChanged(this.h, loadingInfo.cPointer()) +} +func (this *QWebEnginePage) OnLoadingChanged(slot func(loadingInfo *QWebEngineLoadingInfo)) { + C.QWebEnginePage_connect_LoadingChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_LoadingChanged +func miqt_exec_callback_QWebEnginePage_LoadingChanged(cb C.intptr_t, loadingInfo *C.QWebEngineLoadingInfo) { + gofunc, ok := cgo.Handle(cb).Value().(func(loadingInfo *QWebEngineLoadingInfo)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebEngineLoadingInfo(unsafe.Pointer(loadingInfo)) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) LinkHovered(url string) { + url_ms := C.struct_miqt_string{} + url_ms.data = C.CString(url) + url_ms.len = C.size_t(len(url)) + defer C.free(unsafe.Pointer(url_ms.data)) + C.QWebEnginePage_LinkHovered(this.h, url_ms) +} +func (this *QWebEnginePage) OnLinkHovered(slot func(url string)) { + C.QWebEnginePage_connect_LinkHovered(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_LinkHovered +func miqt_exec_callback_QWebEnginePage_LinkHovered(cb C.intptr_t, url C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(url string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var url_ms C.struct_miqt_string = url + url_ret := C.GoStringN(url_ms.data, C.int(int64(url_ms.len))) + C.free(unsafe.Pointer(url_ms.data)) + slotval1 := url_ret + + gofunc(slotval1) +} + +func (this *QWebEnginePage) SelectionChanged() { + C.QWebEnginePage_SelectionChanged(this.h) +} +func (this *QWebEnginePage) OnSelectionChanged(slot func()) { + C.QWebEnginePage_connect_SelectionChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_SelectionChanged +func miqt_exec_callback_QWebEnginePage_SelectionChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEnginePage) GeometryChangeRequested(geom *qt6.QRect) { + C.QWebEnginePage_GeometryChangeRequested(this.h, (*C.QRect)(geom.UnsafePointer())) +} +func (this *QWebEnginePage) OnGeometryChangeRequested(slot func(geom *qt6.QRect)) { + C.QWebEnginePage_connect_GeometryChangeRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_GeometryChangeRequested +func miqt_exec_callback_QWebEnginePage_GeometryChangeRequested(cb C.intptr_t, geom *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(geom *qt6.QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQRect(unsafe.Pointer(geom)) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) WindowCloseRequested() { + C.QWebEnginePage_WindowCloseRequested(this.h) +} +func (this *QWebEnginePage) OnWindowCloseRequested(slot func()) { + C.QWebEnginePage_connect_WindowCloseRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_WindowCloseRequested +func miqt_exec_callback_QWebEnginePage_WindowCloseRequested(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEnginePage) FeaturePermissionRequested(securityOrigin *qt6.QUrl, feature QWebEnginePage__Feature) { + C.QWebEnginePage_FeaturePermissionRequested(this.h, (*C.QUrl)(securityOrigin.UnsafePointer()), (C.int)(feature)) +} +func (this *QWebEnginePage) OnFeaturePermissionRequested(slot func(securityOrigin *qt6.QUrl, feature QWebEnginePage__Feature)) { + C.QWebEnginePage_connect_FeaturePermissionRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_FeaturePermissionRequested +func miqt_exec_callback_QWebEnginePage_FeaturePermissionRequested(cb C.intptr_t, securityOrigin *C.QUrl, feature C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(securityOrigin *qt6.QUrl, feature QWebEnginePage__Feature)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQUrl(unsafe.Pointer(securityOrigin)) + slotval2 := (QWebEnginePage__Feature)(feature) + + gofunc(slotval1, slotval2) +} + +func (this *QWebEnginePage) FeaturePermissionRequestCanceled(securityOrigin *qt6.QUrl, feature QWebEnginePage__Feature) { + C.QWebEnginePage_FeaturePermissionRequestCanceled(this.h, (*C.QUrl)(securityOrigin.UnsafePointer()), (C.int)(feature)) +} +func (this *QWebEnginePage) OnFeaturePermissionRequestCanceled(slot func(securityOrigin *qt6.QUrl, feature QWebEnginePage__Feature)) { + C.QWebEnginePage_connect_FeaturePermissionRequestCanceled(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_FeaturePermissionRequestCanceled +func miqt_exec_callback_QWebEnginePage_FeaturePermissionRequestCanceled(cb C.intptr_t, securityOrigin *C.QUrl, feature C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(securityOrigin *qt6.QUrl, feature QWebEnginePage__Feature)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQUrl(unsafe.Pointer(securityOrigin)) + slotval2 := (QWebEnginePage__Feature)(feature) + + gofunc(slotval1, slotval2) +} + +func (this *QWebEnginePage) FullScreenRequested(fullScreenRequest QWebEngineFullScreenRequest) { + C.QWebEnginePage_FullScreenRequested(this.h, fullScreenRequest.cPointer()) +} +func (this *QWebEnginePage) OnFullScreenRequested(slot func(fullScreenRequest QWebEngineFullScreenRequest)) { + C.QWebEnginePage_connect_FullScreenRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_FullScreenRequested +func miqt_exec_callback_QWebEnginePage_FullScreenRequested(cb C.intptr_t, fullScreenRequest *C.QWebEngineFullScreenRequest) { + gofunc, ok := cgo.Handle(cb).Value().(func(fullScreenRequest QWebEngineFullScreenRequest)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + fullScreenRequest_ret := fullScreenRequest + fullScreenRequest_goptr := newQWebEngineFullScreenRequest(fullScreenRequest_ret) + fullScreenRequest_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *fullScreenRequest_goptr + + gofunc(slotval1) +} + +func (this *QWebEnginePage) QuotaRequested(quotaRequest QWebEngineQuotaRequest) { + C.QWebEnginePage_QuotaRequested(this.h, quotaRequest.cPointer()) +} +func (this *QWebEnginePage) OnQuotaRequested(slot func(quotaRequest QWebEngineQuotaRequest)) { + C.QWebEnginePage_connect_QuotaRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_QuotaRequested +func miqt_exec_callback_QWebEnginePage_QuotaRequested(cb C.intptr_t, quotaRequest *C.QWebEngineQuotaRequest) { + gofunc, ok := cgo.Handle(cb).Value().(func(quotaRequest QWebEngineQuotaRequest)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + quotaRequest_ret := quotaRequest + quotaRequest_goptr := newQWebEngineQuotaRequest(quotaRequest_ret) + quotaRequest_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *quotaRequest_goptr + + gofunc(slotval1) +} + +func (this *QWebEnginePage) RegisterProtocolHandlerRequested(request QWebEngineRegisterProtocolHandlerRequest) { + C.QWebEnginePage_RegisterProtocolHandlerRequested(this.h, request.cPointer()) +} +func (this *QWebEnginePage) OnRegisterProtocolHandlerRequested(slot func(request QWebEngineRegisterProtocolHandlerRequest)) { + C.QWebEnginePage_connect_RegisterProtocolHandlerRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_RegisterProtocolHandlerRequested +func miqt_exec_callback_QWebEnginePage_RegisterProtocolHandlerRequested(cb C.intptr_t, request *C.QWebEngineRegisterProtocolHandlerRequest) { + gofunc, ok := cgo.Handle(cb).Value().(func(request QWebEngineRegisterProtocolHandlerRequest)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + request_ret := request + request_goptr := newQWebEngineRegisterProtocolHandlerRequest(request_ret) + request_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *request_goptr + + gofunc(slotval1) +} + +func (this *QWebEnginePage) FileSystemAccessRequested(request QWebEngineFileSystemAccessRequest) { + C.QWebEnginePage_FileSystemAccessRequested(this.h, request.cPointer()) +} +func (this *QWebEnginePage) OnFileSystemAccessRequested(slot func(request QWebEngineFileSystemAccessRequest)) { + C.QWebEnginePage_connect_FileSystemAccessRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_FileSystemAccessRequested +func miqt_exec_callback_QWebEnginePage_FileSystemAccessRequested(cb C.intptr_t, request *C.QWebEngineFileSystemAccessRequest) { + gofunc, ok := cgo.Handle(cb).Value().(func(request QWebEngineFileSystemAccessRequest)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + request_ret := request + request_goptr := newQWebEngineFileSystemAccessRequest(request_ret) + request_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *request_goptr + + gofunc(slotval1) +} + +func (this *QWebEnginePage) SelectClientCertificate(clientCertSelection QWebEngineClientCertificateSelection) { + C.QWebEnginePage_SelectClientCertificate(this.h, clientCertSelection.cPointer()) +} +func (this *QWebEnginePage) OnSelectClientCertificate(slot func(clientCertSelection QWebEngineClientCertificateSelection)) { + C.QWebEnginePage_connect_SelectClientCertificate(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_SelectClientCertificate +func miqt_exec_callback_QWebEnginePage_SelectClientCertificate(cb C.intptr_t, clientCertSelection *C.QWebEngineClientCertificateSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(clientCertSelection QWebEngineClientCertificateSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + clientCertSelection_ret := clientCertSelection + clientCertSelection_goptr := newQWebEngineClientCertificateSelection(clientCertSelection_ret) + clientCertSelection_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *clientCertSelection_goptr + + gofunc(slotval1) +} + +func (this *QWebEnginePage) AuthenticationRequired(requestUrl *qt6.QUrl, authenticator *network.QAuthenticator) { + C.QWebEnginePage_AuthenticationRequired(this.h, (*C.QUrl)(requestUrl.UnsafePointer()), (*C.QAuthenticator)(authenticator.UnsafePointer())) +} +func (this *QWebEnginePage) OnAuthenticationRequired(slot func(requestUrl *qt6.QUrl, authenticator *network.QAuthenticator)) { + C.QWebEnginePage_connect_AuthenticationRequired(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_AuthenticationRequired +func miqt_exec_callback_QWebEnginePage_AuthenticationRequired(cb C.intptr_t, requestUrl *C.QUrl, authenticator *C.QAuthenticator) { + gofunc, ok := cgo.Handle(cb).Value().(func(requestUrl *qt6.QUrl, authenticator *network.QAuthenticator)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQUrl(unsafe.Pointer(requestUrl)) + slotval2 := network.UnsafeNewQAuthenticator(unsafe.Pointer(authenticator)) + + gofunc(slotval1, slotval2) +} + +func (this *QWebEnginePage) ProxyAuthenticationRequired(requestUrl *qt6.QUrl, authenticator *network.QAuthenticator, proxyHost string) { + proxyHost_ms := C.struct_miqt_string{} + proxyHost_ms.data = C.CString(proxyHost) + proxyHost_ms.len = C.size_t(len(proxyHost)) + defer C.free(unsafe.Pointer(proxyHost_ms.data)) + C.QWebEnginePage_ProxyAuthenticationRequired(this.h, (*C.QUrl)(requestUrl.UnsafePointer()), (*C.QAuthenticator)(authenticator.UnsafePointer()), proxyHost_ms) +} +func (this *QWebEnginePage) OnProxyAuthenticationRequired(slot func(requestUrl *qt6.QUrl, authenticator *network.QAuthenticator, proxyHost string)) { + C.QWebEnginePage_connect_ProxyAuthenticationRequired(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_ProxyAuthenticationRequired +func miqt_exec_callback_QWebEnginePage_ProxyAuthenticationRequired(cb C.intptr_t, requestUrl *C.QUrl, authenticator *C.QAuthenticator, proxyHost C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(requestUrl *qt6.QUrl, authenticator *network.QAuthenticator, proxyHost string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQUrl(unsafe.Pointer(requestUrl)) + slotval2 := network.UnsafeNewQAuthenticator(unsafe.Pointer(authenticator)) + var proxyHost_ms C.struct_miqt_string = proxyHost + proxyHost_ret := C.GoStringN(proxyHost_ms.data, C.int(int64(proxyHost_ms.len))) + C.free(unsafe.Pointer(proxyHost_ms.data)) + slotval3 := proxyHost_ret + + gofunc(slotval1, slotval2, slotval3) +} + +func (this *QWebEnginePage) RenderProcessTerminated(terminationStatus QWebEnginePage__RenderProcessTerminationStatus, exitCode int) { + C.QWebEnginePage_RenderProcessTerminated(this.h, (C.int)(terminationStatus), (C.int)(exitCode)) +} +func (this *QWebEnginePage) OnRenderProcessTerminated(slot func(terminationStatus QWebEnginePage__RenderProcessTerminationStatus, exitCode int)) { + C.QWebEnginePage_connect_RenderProcessTerminated(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_RenderProcessTerminated +func miqt_exec_callback_QWebEnginePage_RenderProcessTerminated(cb C.intptr_t, terminationStatus C.int, exitCode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(terminationStatus QWebEnginePage__RenderProcessTerminationStatus, exitCode int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebEnginePage__RenderProcessTerminationStatus)(terminationStatus) + + slotval2 := (int)(exitCode) + + gofunc(slotval1, slotval2) +} + +func (this *QWebEnginePage) CertificateError(certificateError *QWebEngineCertificateError) { + C.QWebEnginePage_CertificateError(this.h, certificateError.cPointer()) +} +func (this *QWebEnginePage) OnCertificateError(slot func(certificateError *QWebEngineCertificateError)) { + C.QWebEnginePage_connect_CertificateError(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_CertificateError +func miqt_exec_callback_QWebEnginePage_CertificateError(cb C.intptr_t, certificateError *C.QWebEngineCertificateError) { + gofunc, ok := cgo.Handle(cb).Value().(func(certificateError *QWebEngineCertificateError)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebEngineCertificateError(unsafe.Pointer(certificateError)) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) NavigationRequested(request *QWebEngineNavigationRequest) { + C.QWebEnginePage_NavigationRequested(this.h, request.cPointer()) +} +func (this *QWebEnginePage) OnNavigationRequested(slot func(request *QWebEngineNavigationRequest)) { + C.QWebEnginePage_connect_NavigationRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_NavigationRequested +func miqt_exec_callback_QWebEnginePage_NavigationRequested(cb C.intptr_t, request *C.QWebEngineNavigationRequest) { + gofunc, ok := cgo.Handle(cb).Value().(func(request *QWebEngineNavigationRequest)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebEngineNavigationRequest(unsafe.Pointer(request), nil) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) NewWindowRequested(request *QWebEngineNewWindowRequest) { + C.QWebEnginePage_NewWindowRequested(this.h, request.cPointer()) +} +func (this *QWebEnginePage) OnNewWindowRequested(slot func(request *QWebEngineNewWindowRequest)) { + C.QWebEnginePage_connect_NewWindowRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_NewWindowRequested +func miqt_exec_callback_QWebEnginePage_NewWindowRequested(cb C.intptr_t, request *C.QWebEngineNewWindowRequest) { + gofunc, ok := cgo.Handle(cb).Value().(func(request *QWebEngineNewWindowRequest)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebEngineNewWindowRequest(unsafe.Pointer(request), nil) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) TitleChanged(title string) { + title_ms := C.struct_miqt_string{} + title_ms.data = C.CString(title) + title_ms.len = C.size_t(len(title)) + defer C.free(unsafe.Pointer(title_ms.data)) + C.QWebEnginePage_TitleChanged(this.h, title_ms) +} +func (this *QWebEnginePage) OnTitleChanged(slot func(title string)) { + C.QWebEnginePage_connect_TitleChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_TitleChanged +func miqt_exec_callback_QWebEnginePage_TitleChanged(cb C.intptr_t, title C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(title string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var title_ms C.struct_miqt_string = title + title_ret := C.GoStringN(title_ms.data, C.int(int64(title_ms.len))) + C.free(unsafe.Pointer(title_ms.data)) + slotval1 := title_ret + + gofunc(slotval1) +} + +func (this *QWebEnginePage) UrlChanged(url *qt6.QUrl) { + C.QWebEnginePage_UrlChanged(this.h, (*C.QUrl)(url.UnsafePointer())) +} +func (this *QWebEnginePage) OnUrlChanged(slot func(url *qt6.QUrl)) { + C.QWebEnginePage_connect_UrlChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_UrlChanged +func miqt_exec_callback_QWebEnginePage_UrlChanged(cb C.intptr_t, url *C.QUrl) { + gofunc, ok := cgo.Handle(cb).Value().(func(url *qt6.QUrl)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQUrl(unsafe.Pointer(url)) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) IconUrlChanged(url *qt6.QUrl) { + C.QWebEnginePage_IconUrlChanged(this.h, (*C.QUrl)(url.UnsafePointer())) +} +func (this *QWebEnginePage) OnIconUrlChanged(slot func(url *qt6.QUrl)) { + C.QWebEnginePage_connect_IconUrlChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_IconUrlChanged +func miqt_exec_callback_QWebEnginePage_IconUrlChanged(cb C.intptr_t, url *C.QUrl) { + gofunc, ok := cgo.Handle(cb).Value().(func(url *qt6.QUrl)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQUrl(unsafe.Pointer(url)) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) IconChanged(icon *qt6.QIcon) { + C.QWebEnginePage_IconChanged(this.h, (*C.QIcon)(icon.UnsafePointer())) +} +func (this *QWebEnginePage) OnIconChanged(slot func(icon *qt6.QIcon)) { + C.QWebEnginePage_connect_IconChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_IconChanged +func miqt_exec_callback_QWebEnginePage_IconChanged(cb C.intptr_t, icon *C.QIcon) { + gofunc, ok := cgo.Handle(cb).Value().(func(icon *qt6.QIcon)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQIcon(unsafe.Pointer(icon)) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) ScrollPositionChanged(position *qt6.QPointF) { + C.QWebEnginePage_ScrollPositionChanged(this.h, (*C.QPointF)(position.UnsafePointer())) +} +func (this *QWebEnginePage) OnScrollPositionChanged(slot func(position *qt6.QPointF)) { + C.QWebEnginePage_connect_ScrollPositionChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_ScrollPositionChanged +func miqt_exec_callback_QWebEnginePage_ScrollPositionChanged(cb C.intptr_t, position *C.QPointF) { + gofunc, ok := cgo.Handle(cb).Value().(func(position *qt6.QPointF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPointF(unsafe.Pointer(position)) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) ContentsSizeChanged(size *qt6.QSizeF) { + C.QWebEnginePage_ContentsSizeChanged(this.h, (*C.QSizeF)(size.UnsafePointer())) +} +func (this *QWebEnginePage) OnContentsSizeChanged(slot func(size *qt6.QSizeF)) { + C.QWebEnginePage_connect_ContentsSizeChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_ContentsSizeChanged +func miqt_exec_callback_QWebEnginePage_ContentsSizeChanged(cb C.intptr_t, size *C.QSizeF) { + gofunc, ok := cgo.Handle(cb).Value().(func(size *qt6.QSizeF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQSizeF(unsafe.Pointer(size)) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) AudioMutedChanged(muted bool) { + C.QWebEnginePage_AudioMutedChanged(this.h, (C.bool)(muted)) +} +func (this *QWebEnginePage) OnAudioMutedChanged(slot func(muted bool)) { + C.QWebEnginePage_connect_AudioMutedChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_AudioMutedChanged +func miqt_exec_callback_QWebEnginePage_AudioMutedChanged(cb C.intptr_t, muted C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(muted bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(muted) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) RecentlyAudibleChanged(recentlyAudible bool) { + C.QWebEnginePage_RecentlyAudibleChanged(this.h, (C.bool)(recentlyAudible)) +} +func (this *QWebEnginePage) OnRecentlyAudibleChanged(slot func(recentlyAudible bool)) { + C.QWebEnginePage_connect_RecentlyAudibleChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_RecentlyAudibleChanged +func miqt_exec_callback_QWebEnginePage_RecentlyAudibleChanged(cb C.intptr_t, recentlyAudible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(recentlyAudible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(recentlyAudible) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) RenderProcessPidChanged(pid int64) { + C.QWebEnginePage_RenderProcessPidChanged(this.h, (C.longlong)(pid)) +} +func (this *QWebEnginePage) OnRenderProcessPidChanged(slot func(pid int64)) { + C.QWebEnginePage_connect_RenderProcessPidChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_RenderProcessPidChanged +func miqt_exec_callback_QWebEnginePage_RenderProcessPidChanged(cb C.intptr_t, pid C.longlong) { + gofunc, ok := cgo.Handle(cb).Value().(func(pid int64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(pid) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) PdfPrintingFinished(filePath string, success bool) { + filePath_ms := C.struct_miqt_string{} + filePath_ms.data = C.CString(filePath) + filePath_ms.len = C.size_t(len(filePath)) + defer C.free(unsafe.Pointer(filePath_ms.data)) + C.QWebEnginePage_PdfPrintingFinished(this.h, filePath_ms, (C.bool)(success)) +} +func (this *QWebEnginePage) OnPdfPrintingFinished(slot func(filePath string, success bool)) { + C.QWebEnginePage_connect_PdfPrintingFinished(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_PdfPrintingFinished +func miqt_exec_callback_QWebEnginePage_PdfPrintingFinished(cb C.intptr_t, filePath C.struct_miqt_string, success C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(filePath string, success bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var filePath_ms C.struct_miqt_string = filePath + filePath_ret := C.GoStringN(filePath_ms.data, C.int(int64(filePath_ms.len))) + C.free(unsafe.Pointer(filePath_ms.data)) + slotval1 := filePath_ret + slotval2 := (bool)(success) + + gofunc(slotval1, slotval2) +} + +func (this *QWebEnginePage) PrintRequested() { + C.QWebEnginePage_PrintRequested(this.h) +} +func (this *QWebEnginePage) OnPrintRequested(slot func()) { + C.QWebEnginePage_connect_PrintRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_PrintRequested +func miqt_exec_callback_QWebEnginePage_PrintRequested(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEnginePage) VisibleChanged(visible bool) { + C.QWebEnginePage_VisibleChanged(this.h, (C.bool)(visible)) +} +func (this *QWebEnginePage) OnVisibleChanged(slot func(visible bool)) { + C.QWebEnginePage_connect_VisibleChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_VisibleChanged +func miqt_exec_callback_QWebEnginePage_VisibleChanged(cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) LifecycleStateChanged(state QWebEnginePage__LifecycleState) { + C.QWebEnginePage_LifecycleStateChanged(this.h, (C.int)(state)) +} +func (this *QWebEnginePage) OnLifecycleStateChanged(slot func(state QWebEnginePage__LifecycleState)) { + C.QWebEnginePage_connect_LifecycleStateChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_LifecycleStateChanged +func miqt_exec_callback_QWebEnginePage_LifecycleStateChanged(cb C.intptr_t, state C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(state QWebEnginePage__LifecycleState)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebEnginePage__LifecycleState)(state) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) RecommendedStateChanged(state QWebEnginePage__LifecycleState) { + C.QWebEnginePage_RecommendedStateChanged(this.h, (C.int)(state)) +} +func (this *QWebEnginePage) OnRecommendedStateChanged(slot func(state QWebEnginePage__LifecycleState)) { + C.QWebEnginePage_connect_RecommendedStateChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_RecommendedStateChanged +func miqt_exec_callback_QWebEnginePage_RecommendedStateChanged(cb C.intptr_t, state C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(state QWebEnginePage__LifecycleState)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebEnginePage__LifecycleState)(state) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) FindTextFinished(result *QWebEngineFindTextResult) { + C.QWebEnginePage_FindTextFinished(this.h, result.cPointer()) +} +func (this *QWebEnginePage) OnFindTextFinished(slot func(result *QWebEngineFindTextResult)) { + C.QWebEnginePage_connect_FindTextFinished(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_FindTextFinished +func miqt_exec_callback_QWebEnginePage_FindTextFinished(cb C.intptr_t, result *C.QWebEngineFindTextResult) { + gofunc, ok := cgo.Handle(cb).Value().(func(result *QWebEngineFindTextResult)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebEngineFindTextResult(unsafe.Pointer(result)) + + gofunc(slotval1) +} + +func (this *QWebEnginePage) QAboutToDelete() { + C.QWebEnginePage_QAboutToDelete(this.h) +} +func (this *QWebEnginePage) OnQAboutToDelete(slot func()) { + C.QWebEnginePage_connect_QAboutToDelete(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_QAboutToDelete +func miqt_exec_callback_QWebEnginePage_QAboutToDelete(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func QWebEnginePage_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEnginePage_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEnginePage_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEnginePage_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEnginePage) Download2(url *qt6.QUrl, filename string) { + filename_ms := C.struct_miqt_string{} + filename_ms.data = C.CString(filename) + filename_ms.len = C.size_t(len(filename)) + defer C.free(unsafe.Pointer(filename_ms.data)) + C.QWebEnginePage_Download2(this.h, (*C.QUrl)(url.UnsafePointer()), filename_ms) +} + +func (this *QWebEnginePage) SetHtml2(html string, baseUrl *qt6.QUrl) { + html_ms := C.struct_miqt_string{} + html_ms.data = C.CString(html) + html_ms.len = C.size_t(len(html)) + defer C.free(unsafe.Pointer(html_ms.data)) + C.QWebEnginePage_SetHtml2(this.h, html_ms, (*C.QUrl)(baseUrl.UnsafePointer())) +} + +func (this *QWebEnginePage) SetContent2(data []byte, mimeType string) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + mimeType_ms := C.struct_miqt_string{} + mimeType_ms.data = C.CString(mimeType) + mimeType_ms.len = C.size_t(len(mimeType)) + defer C.free(unsafe.Pointer(mimeType_ms.data)) + C.QWebEnginePage_SetContent2(this.h, data_alias, mimeType_ms) +} + +func (this *QWebEnginePage) SetContent3(data []byte, mimeType string, baseUrl *qt6.QUrl) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + mimeType_ms := C.struct_miqt_string{} + mimeType_ms.data = C.CString(mimeType) + mimeType_ms.len = C.size_t(len(mimeType)) + defer C.free(unsafe.Pointer(mimeType_ms.data)) + C.QWebEnginePage_SetContent3(this.h, data_alias, mimeType_ms, (*C.QUrl)(baseUrl.UnsafePointer())) +} + +func (this *QWebEnginePage) SetWebChannel2(param1 *webchannel.QWebChannel, worldId uint) { + C.QWebEnginePage_SetWebChannel2(this.h, (*C.QWebChannel)(param1.UnsafePointer()), (C.uint)(worldId)) +} + +func (this *QWebEnginePage) Save2(filePath string, format QWebEngineDownloadRequest__SavePageFormat) { + filePath_ms := C.struct_miqt_string{} + filePath_ms.data = C.CString(filePath) + filePath_ms.len = C.size_t(len(filePath)) + defer C.free(unsafe.Pointer(filePath_ms.data)) + C.QWebEnginePage_Save2(this.h, filePath_ms, (C.int)(format)) +} + +func (this *QWebEnginePage) PrintToPdf2(filePath string, layout *qt6.QPageLayout) { + filePath_ms := C.struct_miqt_string{} + filePath_ms.data = C.CString(filePath) + filePath_ms.len = C.size_t(len(filePath)) + defer C.free(unsafe.Pointer(filePath_ms.data)) + C.QWebEnginePage_PrintToPdf2(this.h, filePath_ms, (*C.QPageLayout)(layout.UnsafePointer())) +} + +func (this *QWebEnginePage) PrintToPdf3(filePath string, layout *qt6.QPageLayout, ranges *qt6.QPageRanges) { + filePath_ms := C.struct_miqt_string{} + filePath_ms.data = C.CString(filePath) + filePath_ms.len = C.size_t(len(filePath)) + defer C.free(unsafe.Pointer(filePath_ms.data)) + C.QWebEnginePage_PrintToPdf3(this.h, filePath_ms, (*C.QPageLayout)(layout.UnsafePointer()), (*C.QPageRanges)(ranges.UnsafePointer())) +} + +func (this *QWebEnginePage) callVirtualBase_TriggerAction(action QWebEnginePage__WebAction, checked bool) { + + C.QWebEnginePage_virtualbase_TriggerAction(unsafe.Pointer(this.h), (C.int)(action), (C.bool)(checked)) + +} +func (this *QWebEnginePage) OnTriggerAction(slot func(super func(action QWebEnginePage__WebAction, checked bool), action QWebEnginePage__WebAction, checked bool)) { + C.QWebEnginePage_override_virtual_TriggerAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_TriggerAction +func miqt_exec_callback_QWebEnginePage_TriggerAction(self *C.QWebEnginePage, cb C.intptr_t, action C.int, checked C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action QWebEnginePage__WebAction, checked bool), action QWebEnginePage__WebAction, checked bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebEnginePage__WebAction)(action) + + slotval2 := (bool)(checked) + + gofunc((&QWebEnginePage{h: self}).callVirtualBase_TriggerAction, slotval1, slotval2) + +} + +func (this *QWebEnginePage) callVirtualBase_Event(param1 *qt6.QEvent) bool { + + return (bool)(C.QWebEnginePage_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer()))) + +} +func (this *QWebEnginePage) OnEvent(slot func(super func(param1 *qt6.QEvent) bool, param1 *qt6.QEvent) bool) { + C.QWebEnginePage_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_Event +func miqt_exec_callback_QWebEnginePage_Event(self *C.QWebEnginePage, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QEvent) bool, param1 *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QWebEnginePage{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEnginePage) callVirtualBase_CreateWindow(typeVal QWebEnginePage__WebWindowType) *QWebEnginePage { + + return UnsafeNewQWebEnginePage(unsafe.Pointer(C.QWebEnginePage_virtualbase_CreateWindow(unsafe.Pointer(this.h), (C.int)(typeVal))), nil) +} +func (this *QWebEnginePage) OnCreateWindow(slot func(super func(typeVal QWebEnginePage__WebWindowType) *QWebEnginePage, typeVal QWebEnginePage__WebWindowType) *QWebEnginePage) { + C.QWebEnginePage_override_virtual_CreateWindow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_CreateWindow +func miqt_exec_callback_QWebEnginePage_CreateWindow(self *C.QWebEnginePage, cb C.intptr_t, typeVal C.int) *C.QWebEnginePage { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(typeVal QWebEnginePage__WebWindowType) *QWebEnginePage, typeVal QWebEnginePage__WebWindowType) *QWebEnginePage) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebEnginePage__WebWindowType)(typeVal) + + virtualReturn := gofunc((&QWebEnginePage{h: self}).callVirtualBase_CreateWindow, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QWebEnginePage) callVirtualBase_ChooseFiles(mode QWebEnginePage__FileSelectionMode, oldFiles []string, acceptedMimeTypes []string) []string { + oldFiles_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(oldFiles)))) + defer C.free(unsafe.Pointer(oldFiles_CArray)) + for i := range oldFiles { + oldFiles_i_ms := C.struct_miqt_string{} + oldFiles_i_ms.data = C.CString(oldFiles[i]) + oldFiles_i_ms.len = C.size_t(len(oldFiles[i])) + defer C.free(unsafe.Pointer(oldFiles_i_ms.data)) + oldFiles_CArray[i] = oldFiles_i_ms + } + oldFiles_ma := C.struct_miqt_array{len: C.size_t(len(oldFiles)), data: unsafe.Pointer(oldFiles_CArray)} + acceptedMimeTypes_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(acceptedMimeTypes)))) + defer C.free(unsafe.Pointer(acceptedMimeTypes_CArray)) + for i := range acceptedMimeTypes { + acceptedMimeTypes_i_ms := C.struct_miqt_string{} + acceptedMimeTypes_i_ms.data = C.CString(acceptedMimeTypes[i]) + acceptedMimeTypes_i_ms.len = C.size_t(len(acceptedMimeTypes[i])) + defer C.free(unsafe.Pointer(acceptedMimeTypes_i_ms.data)) + acceptedMimeTypes_CArray[i] = acceptedMimeTypes_i_ms + } + acceptedMimeTypes_ma := C.struct_miqt_array{len: C.size_t(len(acceptedMimeTypes)), data: unsafe.Pointer(acceptedMimeTypes_CArray)} + + var _ma C.struct_miqt_array = C.QWebEnginePage_virtualbase_ChooseFiles(unsafe.Pointer(this.h), (C.int)(mode), oldFiles_ma, acceptedMimeTypes_ma) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QWebEnginePage) OnChooseFiles(slot func(super func(mode QWebEnginePage__FileSelectionMode, oldFiles []string, acceptedMimeTypes []string) []string, mode QWebEnginePage__FileSelectionMode, oldFiles []string, acceptedMimeTypes []string) []string) { + C.QWebEnginePage_override_virtual_ChooseFiles(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_ChooseFiles +func miqt_exec_callback_QWebEnginePage_ChooseFiles(self *C.QWebEnginePage, cb C.intptr_t, mode C.int, oldFiles C.struct_miqt_array, acceptedMimeTypes C.struct_miqt_array) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mode QWebEnginePage__FileSelectionMode, oldFiles []string, acceptedMimeTypes []string) []string, mode QWebEnginePage__FileSelectionMode, oldFiles []string, acceptedMimeTypes []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebEnginePage__FileSelectionMode)(mode) + + var oldFiles_ma C.struct_miqt_array = oldFiles + oldFiles_ret := make([]string, int(oldFiles_ma.len)) + oldFiles_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(oldFiles_ma.data)) // hey ya + for i := 0; i < int(oldFiles_ma.len); i++ { + var oldFiles_lv_ms C.struct_miqt_string = oldFiles_outCast[i] + oldFiles_lv_ret := C.GoStringN(oldFiles_lv_ms.data, C.int(int64(oldFiles_lv_ms.len))) + C.free(unsafe.Pointer(oldFiles_lv_ms.data)) + oldFiles_ret[i] = oldFiles_lv_ret + } + slotval2 := oldFiles_ret + + var acceptedMimeTypes_ma C.struct_miqt_array = acceptedMimeTypes + acceptedMimeTypes_ret := make([]string, int(acceptedMimeTypes_ma.len)) + acceptedMimeTypes_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(acceptedMimeTypes_ma.data)) // hey ya + for i := 0; i < int(acceptedMimeTypes_ma.len); i++ { + var acceptedMimeTypes_lv_ms C.struct_miqt_string = acceptedMimeTypes_outCast[i] + acceptedMimeTypes_lv_ret := C.GoStringN(acceptedMimeTypes_lv_ms.data, C.int(int64(acceptedMimeTypes_lv_ms.len))) + C.free(unsafe.Pointer(acceptedMimeTypes_lv_ms.data)) + acceptedMimeTypes_ret[i] = acceptedMimeTypes_lv_ret + } + slotval3 := acceptedMimeTypes_ret + + virtualReturn := gofunc((&QWebEnginePage{h: self}).callVirtualBase_ChooseFiles, slotval1, slotval2, slotval3) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QWebEnginePage) callVirtualBase_JavaScriptAlert(securityOrigin *qt6.QUrl, msg string) { + msg_ms := C.struct_miqt_string{} + msg_ms.data = C.CString(msg) + msg_ms.len = C.size_t(len(msg)) + defer C.free(unsafe.Pointer(msg_ms.data)) + + C.QWebEnginePage_virtualbase_JavaScriptAlert(unsafe.Pointer(this.h), (*C.QUrl)(securityOrigin.UnsafePointer()), msg_ms) + +} +func (this *QWebEnginePage) OnJavaScriptAlert(slot func(super func(securityOrigin *qt6.QUrl, msg string), securityOrigin *qt6.QUrl, msg string)) { + C.QWebEnginePage_override_virtual_JavaScriptAlert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_JavaScriptAlert +func miqt_exec_callback_QWebEnginePage_JavaScriptAlert(self *C.QWebEnginePage, cb C.intptr_t, securityOrigin *C.QUrl, msg C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(securityOrigin *qt6.QUrl, msg string), securityOrigin *qt6.QUrl, msg string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQUrl(unsafe.Pointer(securityOrigin)) + var msg_ms C.struct_miqt_string = msg + msg_ret := C.GoStringN(msg_ms.data, C.int(int64(msg_ms.len))) + C.free(unsafe.Pointer(msg_ms.data)) + slotval2 := msg_ret + + gofunc((&QWebEnginePage{h: self}).callVirtualBase_JavaScriptAlert, slotval1, slotval2) + +} + +func (this *QWebEnginePage) callVirtualBase_JavaScriptConfirm(securityOrigin *qt6.QUrl, msg string) bool { + msg_ms := C.struct_miqt_string{} + msg_ms.data = C.CString(msg) + msg_ms.len = C.size_t(len(msg)) + defer C.free(unsafe.Pointer(msg_ms.data)) + + return (bool)(C.QWebEnginePage_virtualbase_JavaScriptConfirm(unsafe.Pointer(this.h), (*C.QUrl)(securityOrigin.UnsafePointer()), msg_ms)) + +} +func (this *QWebEnginePage) OnJavaScriptConfirm(slot func(super func(securityOrigin *qt6.QUrl, msg string) bool, securityOrigin *qt6.QUrl, msg string) bool) { + C.QWebEnginePage_override_virtual_JavaScriptConfirm(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_JavaScriptConfirm +func miqt_exec_callback_QWebEnginePage_JavaScriptConfirm(self *C.QWebEnginePage, cb C.intptr_t, securityOrigin *C.QUrl, msg C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(securityOrigin *qt6.QUrl, msg string) bool, securityOrigin *qt6.QUrl, msg string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQUrl(unsafe.Pointer(securityOrigin)) + var msg_ms C.struct_miqt_string = msg + msg_ret := C.GoStringN(msg_ms.data, C.int(int64(msg_ms.len))) + C.free(unsafe.Pointer(msg_ms.data)) + slotval2 := msg_ret + + virtualReturn := gofunc((&QWebEnginePage{h: self}).callVirtualBase_JavaScriptConfirm, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEnginePage) callVirtualBase_JavaScriptConsoleMessage(level QWebEnginePage__JavaScriptConsoleMessageLevel, message string, lineNumber int, sourceID string) { + message_ms := C.struct_miqt_string{} + message_ms.data = C.CString(message) + message_ms.len = C.size_t(len(message)) + defer C.free(unsafe.Pointer(message_ms.data)) + sourceID_ms := C.struct_miqt_string{} + sourceID_ms.data = C.CString(sourceID) + sourceID_ms.len = C.size_t(len(sourceID)) + defer C.free(unsafe.Pointer(sourceID_ms.data)) + + C.QWebEnginePage_virtualbase_JavaScriptConsoleMessage(unsafe.Pointer(this.h), (C.int)(level), message_ms, (C.int)(lineNumber), sourceID_ms) + +} +func (this *QWebEnginePage) OnJavaScriptConsoleMessage(slot func(super func(level QWebEnginePage__JavaScriptConsoleMessageLevel, message string, lineNumber int, sourceID string), level QWebEnginePage__JavaScriptConsoleMessageLevel, message string, lineNumber int, sourceID string)) { + C.QWebEnginePage_override_virtual_JavaScriptConsoleMessage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_JavaScriptConsoleMessage +func miqt_exec_callback_QWebEnginePage_JavaScriptConsoleMessage(self *C.QWebEnginePage, cb C.intptr_t, level C.int, message C.struct_miqt_string, lineNumber C.int, sourceID C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(level QWebEnginePage__JavaScriptConsoleMessageLevel, message string, lineNumber int, sourceID string), level QWebEnginePage__JavaScriptConsoleMessageLevel, message string, lineNumber int, sourceID string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebEnginePage__JavaScriptConsoleMessageLevel)(level) + + var message_ms C.struct_miqt_string = message + message_ret := C.GoStringN(message_ms.data, C.int(int64(message_ms.len))) + C.free(unsafe.Pointer(message_ms.data)) + slotval2 := message_ret + slotval3 := (int)(lineNumber) + + var sourceID_ms C.struct_miqt_string = sourceID + sourceID_ret := C.GoStringN(sourceID_ms.data, C.int(int64(sourceID_ms.len))) + C.free(unsafe.Pointer(sourceID_ms.data)) + slotval4 := sourceID_ret + + gofunc((&QWebEnginePage{h: self}).callVirtualBase_JavaScriptConsoleMessage, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QWebEnginePage) callVirtualBase_AcceptNavigationRequest(url *qt6.QUrl, typeVal QWebEnginePage__NavigationType, isMainFrame bool) bool { + + return (bool)(C.QWebEnginePage_virtualbase_AcceptNavigationRequest(unsafe.Pointer(this.h), (*C.QUrl)(url.UnsafePointer()), (C.int)(typeVal), (C.bool)(isMainFrame))) + +} +func (this *QWebEnginePage) OnAcceptNavigationRequest(slot func(super func(url *qt6.QUrl, typeVal QWebEnginePage__NavigationType, isMainFrame bool) bool, url *qt6.QUrl, typeVal QWebEnginePage__NavigationType, isMainFrame bool) bool) { + C.QWebEnginePage_override_virtual_AcceptNavigationRequest(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_AcceptNavigationRequest +func miqt_exec_callback_QWebEnginePage_AcceptNavigationRequest(self *C.QWebEnginePage, cb C.intptr_t, url *C.QUrl, typeVal C.int, isMainFrame C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(url *qt6.QUrl, typeVal QWebEnginePage__NavigationType, isMainFrame bool) bool, url *qt6.QUrl, typeVal QWebEnginePage__NavigationType, isMainFrame bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQUrl(unsafe.Pointer(url)) + slotval2 := (QWebEnginePage__NavigationType)(typeVal) + + slotval3 := (bool)(isMainFrame) + + virtualReturn := gofunc((&QWebEnginePage{h: self}).callVirtualBase_AcceptNavigationRequest, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEnginePage) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QWebEnginePage_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebEnginePage) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QWebEnginePage_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_EventFilter +func miqt_exec_callback_QWebEnginePage_EventFilter(self *C.QWebEnginePage, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebEnginePage{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEnginePage) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QWebEnginePage_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QWebEnginePage) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QWebEnginePage_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_TimerEvent +func miqt_exec_callback_QWebEnginePage_TimerEvent(self *C.QWebEnginePage, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEnginePage{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QWebEnginePage) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QWebEnginePage_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QWebEnginePage) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QWebEnginePage_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_ChildEvent +func miqt_exec_callback_QWebEnginePage_ChildEvent(self *C.QWebEnginePage, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEnginePage{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QWebEnginePage) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QWebEnginePage_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebEnginePage) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QWebEnginePage_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_CustomEvent +func miqt_exec_callback_QWebEnginePage_CustomEvent(self *C.QWebEnginePage, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWebEnginePage{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QWebEnginePage) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QWebEnginePage_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebEnginePage) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QWebEnginePage_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_ConnectNotify +func miqt_exec_callback_QWebEnginePage_ConnectNotify(self *C.QWebEnginePage, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebEnginePage{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QWebEnginePage) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QWebEnginePage_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebEnginePage) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QWebEnginePage_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEnginePage_DisconnectNotify +func miqt_exec_callback_QWebEnginePage_DisconnectNotify(self *C.QWebEnginePage, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebEnginePage{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QWebEnginePage) Delete() { + C.QWebEnginePage_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEnginePage) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEnginePage) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebenginepage.h b/qt6/webengine/gen_qwebenginepage.h new file mode 100644 index 00000000..cc273e21 --- /dev/null +++ b/qt6/webengine/gen_qwebenginepage.h @@ -0,0 +1,268 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINEPAGE_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINEPAGE_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QAction; +class QAuthenticator; +class QChildEvent; +class QColor; +class QEvent; +class QIcon; +class QMetaMethod; +class QMetaObject; +class QObject; +class QPageLayout; +class QPageRanges; +class QPointF; +class QRect; +class QSizeF; +class QTimerEvent; +class QUrl; +class QWebChannel; +class QWebEngineCertificateError; +class QWebEngineClientCertificateSelection; +class QWebEngineFileSystemAccessRequest; +class QWebEngineFindTextResult; +class QWebEngineFullScreenRequest; +class QWebEngineHistory; +class QWebEngineHttpRequest; +class QWebEngineLoadingInfo; +class QWebEngineNavigationRequest; +class QWebEngineNewWindowRequest; +class QWebEnginePage; +class QWebEngineProfile; +class QWebEngineQuotaRequest; +class QWebEngineRegisterProtocolHandlerRequest; +class QWebEngineScriptCollection; +class QWebEngineSettings; +class QWebEngineUrlRequestInterceptor; +#else +typedef struct QAction QAction; +typedef struct QAuthenticator QAuthenticator; +typedef struct QChildEvent QChildEvent; +typedef struct QColor QColor; +typedef struct QEvent QEvent; +typedef struct QIcon QIcon; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPageLayout QPageLayout; +typedef struct QPageRanges QPageRanges; +typedef struct QPointF QPointF; +typedef struct QRect QRect; +typedef struct QSizeF QSizeF; +typedef struct QTimerEvent QTimerEvent; +typedef struct QUrl QUrl; +typedef struct QWebChannel QWebChannel; +typedef struct QWebEngineCertificateError QWebEngineCertificateError; +typedef struct QWebEngineClientCertificateSelection QWebEngineClientCertificateSelection; +typedef struct QWebEngineFileSystemAccessRequest QWebEngineFileSystemAccessRequest; +typedef struct QWebEngineFindTextResult QWebEngineFindTextResult; +typedef struct QWebEngineFullScreenRequest QWebEngineFullScreenRequest; +typedef struct QWebEngineHistory QWebEngineHistory; +typedef struct QWebEngineHttpRequest QWebEngineHttpRequest; +typedef struct QWebEngineLoadingInfo QWebEngineLoadingInfo; +typedef struct QWebEngineNavigationRequest QWebEngineNavigationRequest; +typedef struct QWebEngineNewWindowRequest QWebEngineNewWindowRequest; +typedef struct QWebEnginePage QWebEnginePage; +typedef struct QWebEngineProfile QWebEngineProfile; +typedef struct QWebEngineQuotaRequest QWebEngineQuotaRequest; +typedef struct QWebEngineRegisterProtocolHandlerRequest QWebEngineRegisterProtocolHandlerRequest; +typedef struct QWebEngineScriptCollection QWebEngineScriptCollection; +typedef struct QWebEngineSettings QWebEngineSettings; +typedef struct QWebEngineUrlRequestInterceptor QWebEngineUrlRequestInterceptor; +#endif + +void QWebEnginePage_new(QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject); +void QWebEnginePage_new2(QWebEngineProfile* profile, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject); +void QWebEnginePage_new3(QObject* parent, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject); +void QWebEnginePage_new4(QWebEngineProfile* profile, QObject* parent, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject); +QMetaObject* QWebEnginePage_MetaObject(const QWebEnginePage* self); +void* QWebEnginePage_Metacast(QWebEnginePage* self, const char* param1); +struct miqt_string QWebEnginePage_Tr(const char* s); +QWebEngineHistory* QWebEnginePage_History(const QWebEnginePage* self); +bool QWebEnginePage_HasSelection(const QWebEnginePage* self); +struct miqt_string QWebEnginePage_SelectedText(const QWebEnginePage* self); +QWebEngineProfile* QWebEnginePage_Profile(const QWebEnginePage* self); +QAction* QWebEnginePage_Action(const QWebEnginePage* self, int action); +void QWebEnginePage_TriggerAction(QWebEnginePage* self, int action, bool checked); +void QWebEnginePage_ReplaceMisspelledWord(QWebEnginePage* self, struct miqt_string replacement); +bool QWebEnginePage_Event(QWebEnginePage* self, QEvent* param1); +void QWebEnginePage_SetFeaturePermission(QWebEnginePage* self, QUrl* securityOrigin, int feature, int policy); +bool QWebEnginePage_IsLoading(const QWebEnginePage* self); +void QWebEnginePage_Load(QWebEnginePage* self, QUrl* url); +void QWebEnginePage_LoadWithRequest(QWebEnginePage* self, QWebEngineHttpRequest* request); +void QWebEnginePage_Download(QWebEnginePage* self, QUrl* url); +void QWebEnginePage_SetHtml(QWebEnginePage* self, struct miqt_string html); +void QWebEnginePage_SetContent(QWebEnginePage* self, struct miqt_string data); +struct miqt_string QWebEnginePage_Title(const QWebEnginePage* self); +void QWebEnginePage_SetUrl(QWebEnginePage* self, QUrl* url); +QUrl* QWebEnginePage_Url(const QWebEnginePage* self); +QUrl* QWebEnginePage_RequestedUrl(const QWebEnginePage* self); +QUrl* QWebEnginePage_IconUrl(const QWebEnginePage* self); +QIcon* QWebEnginePage_Icon(const QWebEnginePage* self); +double QWebEnginePage_ZoomFactor(const QWebEnginePage* self); +void QWebEnginePage_SetZoomFactor(QWebEnginePage* self, double factor); +QPointF* QWebEnginePage_ScrollPosition(const QWebEnginePage* self); +QSizeF* QWebEnginePage_ContentsSize(const QWebEnginePage* self); +QWebEngineScriptCollection* QWebEnginePage_Scripts(QWebEnginePage* self); +QWebEngineSettings* QWebEnginePage_Settings(const QWebEnginePage* self); +QWebChannel* QWebEnginePage_WebChannel(const QWebEnginePage* self); +void QWebEnginePage_SetWebChannel(QWebEnginePage* self, QWebChannel* param1); +QColor* QWebEnginePage_BackgroundColor(const QWebEnginePage* self); +void QWebEnginePage_SetBackgroundColor(QWebEnginePage* self, QColor* color); +void QWebEnginePage_Save(const QWebEnginePage* self, struct miqt_string filePath); +bool QWebEnginePage_IsAudioMuted(const QWebEnginePage* self); +void QWebEnginePage_SetAudioMuted(QWebEnginePage* self, bool muted); +bool QWebEnginePage_RecentlyAudible(const QWebEnginePage* self); +long long QWebEnginePage_RenderProcessPid(const QWebEnginePage* self); +void QWebEnginePage_PrintToPdf(QWebEnginePage* self, struct miqt_string filePath); +void QWebEnginePage_SetInspectedPage(QWebEnginePage* self, QWebEnginePage* page); +QWebEnginePage* QWebEnginePage_InspectedPage(const QWebEnginePage* self); +void QWebEnginePage_SetDevToolsPage(QWebEnginePage* self, QWebEnginePage* page); +QWebEnginePage* QWebEnginePage_DevToolsPage(const QWebEnginePage* self); +void QWebEnginePage_SetUrlRequestInterceptor(QWebEnginePage* self, QWebEngineUrlRequestInterceptor* interceptor); +int QWebEnginePage_LifecycleState(const QWebEnginePage* self); +void QWebEnginePage_SetLifecycleState(QWebEnginePage* self, int state); +int QWebEnginePage_RecommendedState(const QWebEnginePage* self); +bool QWebEnginePage_IsVisible(const QWebEnginePage* self); +void QWebEnginePage_SetVisible(QWebEnginePage* self, bool visible); +void QWebEnginePage_AcceptAsNewWindow(QWebEnginePage* self, QWebEngineNewWindowRequest* request); +void QWebEnginePage_LoadStarted(QWebEnginePage* self); +void QWebEnginePage_connect_LoadStarted(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_LoadProgress(QWebEnginePage* self, int progress); +void QWebEnginePage_connect_LoadProgress(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_LoadFinished(QWebEnginePage* self, bool ok); +void QWebEnginePage_connect_LoadFinished(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_LoadingChanged(QWebEnginePage* self, QWebEngineLoadingInfo* loadingInfo); +void QWebEnginePage_connect_LoadingChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_LinkHovered(QWebEnginePage* self, struct miqt_string url); +void QWebEnginePage_connect_LinkHovered(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_SelectionChanged(QWebEnginePage* self); +void QWebEnginePage_connect_SelectionChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_GeometryChangeRequested(QWebEnginePage* self, QRect* geom); +void QWebEnginePage_connect_GeometryChangeRequested(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_WindowCloseRequested(QWebEnginePage* self); +void QWebEnginePage_connect_WindowCloseRequested(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_FeaturePermissionRequested(QWebEnginePage* self, QUrl* securityOrigin, int feature); +void QWebEnginePage_connect_FeaturePermissionRequested(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_FeaturePermissionRequestCanceled(QWebEnginePage* self, QUrl* securityOrigin, int feature); +void QWebEnginePage_connect_FeaturePermissionRequestCanceled(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_FullScreenRequested(QWebEnginePage* self, QWebEngineFullScreenRequest* fullScreenRequest); +void QWebEnginePage_connect_FullScreenRequested(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_QuotaRequested(QWebEnginePage* self, QWebEngineQuotaRequest* quotaRequest); +void QWebEnginePage_connect_QuotaRequested(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_RegisterProtocolHandlerRequested(QWebEnginePage* self, QWebEngineRegisterProtocolHandlerRequest* request); +void QWebEnginePage_connect_RegisterProtocolHandlerRequested(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_FileSystemAccessRequested(QWebEnginePage* self, QWebEngineFileSystemAccessRequest* request); +void QWebEnginePage_connect_FileSystemAccessRequested(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_SelectClientCertificate(QWebEnginePage* self, QWebEngineClientCertificateSelection* clientCertSelection); +void QWebEnginePage_connect_SelectClientCertificate(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_AuthenticationRequired(QWebEnginePage* self, QUrl* requestUrl, QAuthenticator* authenticator); +void QWebEnginePage_connect_AuthenticationRequired(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_ProxyAuthenticationRequired(QWebEnginePage* self, QUrl* requestUrl, QAuthenticator* authenticator, struct miqt_string proxyHost); +void QWebEnginePage_connect_ProxyAuthenticationRequired(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_RenderProcessTerminated(QWebEnginePage* self, int terminationStatus, int exitCode); +void QWebEnginePage_connect_RenderProcessTerminated(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_CertificateError(QWebEnginePage* self, QWebEngineCertificateError* certificateError); +void QWebEnginePage_connect_CertificateError(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_NavigationRequested(QWebEnginePage* self, QWebEngineNavigationRequest* request); +void QWebEnginePage_connect_NavigationRequested(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_NewWindowRequested(QWebEnginePage* self, QWebEngineNewWindowRequest* request); +void QWebEnginePage_connect_NewWindowRequested(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_TitleChanged(QWebEnginePage* self, struct miqt_string title); +void QWebEnginePage_connect_TitleChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_UrlChanged(QWebEnginePage* self, QUrl* url); +void QWebEnginePage_connect_UrlChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_IconUrlChanged(QWebEnginePage* self, QUrl* url); +void QWebEnginePage_connect_IconUrlChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_IconChanged(QWebEnginePage* self, QIcon* icon); +void QWebEnginePage_connect_IconChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_ScrollPositionChanged(QWebEnginePage* self, QPointF* position); +void QWebEnginePage_connect_ScrollPositionChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_ContentsSizeChanged(QWebEnginePage* self, QSizeF* size); +void QWebEnginePage_connect_ContentsSizeChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_AudioMutedChanged(QWebEnginePage* self, bool muted); +void QWebEnginePage_connect_AudioMutedChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_RecentlyAudibleChanged(QWebEnginePage* self, bool recentlyAudible); +void QWebEnginePage_connect_RecentlyAudibleChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_RenderProcessPidChanged(QWebEnginePage* self, long long pid); +void QWebEnginePage_connect_RenderProcessPidChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_PdfPrintingFinished(QWebEnginePage* self, struct miqt_string filePath, bool success); +void QWebEnginePage_connect_PdfPrintingFinished(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_PrintRequested(QWebEnginePage* self); +void QWebEnginePage_connect_PrintRequested(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_VisibleChanged(QWebEnginePage* self, bool visible); +void QWebEnginePage_connect_VisibleChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_LifecycleStateChanged(QWebEnginePage* self, int state); +void QWebEnginePage_connect_LifecycleStateChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_RecommendedStateChanged(QWebEnginePage* self, int state); +void QWebEnginePage_connect_RecommendedStateChanged(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_FindTextFinished(QWebEnginePage* self, QWebEngineFindTextResult* result); +void QWebEnginePage_connect_FindTextFinished(QWebEnginePage* self, intptr_t slot); +void QWebEnginePage_QAboutToDelete(QWebEnginePage* self); +void QWebEnginePage_connect_QAboutToDelete(QWebEnginePage* self, intptr_t slot); +QWebEnginePage* QWebEnginePage_CreateWindow(QWebEnginePage* self, int typeVal); +struct miqt_array /* of struct miqt_string */ QWebEnginePage_ChooseFiles(QWebEnginePage* self, int mode, struct miqt_array /* of struct miqt_string */ oldFiles, struct miqt_array /* of struct miqt_string */ acceptedMimeTypes); +void QWebEnginePage_JavaScriptAlert(QWebEnginePage* self, QUrl* securityOrigin, struct miqt_string msg); +bool QWebEnginePage_JavaScriptConfirm(QWebEnginePage* self, QUrl* securityOrigin, struct miqt_string msg); +void QWebEnginePage_JavaScriptConsoleMessage(QWebEnginePage* self, int level, struct miqt_string message, int lineNumber, struct miqt_string sourceID); +bool QWebEnginePage_AcceptNavigationRequest(QWebEnginePage* self, QUrl* url, int typeVal, bool isMainFrame); +struct miqt_string QWebEnginePage_Tr2(const char* s, const char* c); +struct miqt_string QWebEnginePage_Tr3(const char* s, const char* c, int n); +void QWebEnginePage_Download2(QWebEnginePage* self, QUrl* url, struct miqt_string filename); +void QWebEnginePage_SetHtml2(QWebEnginePage* self, struct miqt_string html, QUrl* baseUrl); +void QWebEnginePage_SetContent2(QWebEnginePage* self, struct miqt_string data, struct miqt_string mimeType); +void QWebEnginePage_SetContent3(QWebEnginePage* self, struct miqt_string data, struct miqt_string mimeType, QUrl* baseUrl); +void QWebEnginePage_SetWebChannel2(QWebEnginePage* self, QWebChannel* param1, unsigned int worldId); +void QWebEnginePage_Save2(const QWebEnginePage* self, struct miqt_string filePath, int format); +void QWebEnginePage_PrintToPdf2(QWebEnginePage* self, struct miqt_string filePath, QPageLayout* layout); +void QWebEnginePage_PrintToPdf3(QWebEnginePage* self, struct miqt_string filePath, QPageLayout* layout, QPageRanges* ranges); +void QWebEnginePage_override_virtual_TriggerAction(void* self, intptr_t slot); +void QWebEnginePage_virtualbase_TriggerAction(void* self, int action, bool checked); +void QWebEnginePage_override_virtual_Event(void* self, intptr_t slot); +bool QWebEnginePage_virtualbase_Event(void* self, QEvent* param1); +void QWebEnginePage_override_virtual_CreateWindow(void* self, intptr_t slot); +QWebEnginePage* QWebEnginePage_virtualbase_CreateWindow(void* self, int typeVal); +void QWebEnginePage_override_virtual_ChooseFiles(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QWebEnginePage_virtualbase_ChooseFiles(void* self, int mode, struct miqt_array /* of struct miqt_string */ oldFiles, struct miqt_array /* of struct miqt_string */ acceptedMimeTypes); +void QWebEnginePage_override_virtual_JavaScriptAlert(void* self, intptr_t slot); +void QWebEnginePage_virtualbase_JavaScriptAlert(void* self, QUrl* securityOrigin, struct miqt_string msg); +void QWebEnginePage_override_virtual_JavaScriptConfirm(void* self, intptr_t slot); +bool QWebEnginePage_virtualbase_JavaScriptConfirm(void* self, QUrl* securityOrigin, struct miqt_string msg); +void QWebEnginePage_override_virtual_JavaScriptConsoleMessage(void* self, intptr_t slot); +void QWebEnginePage_virtualbase_JavaScriptConsoleMessage(void* self, int level, struct miqt_string message, int lineNumber, struct miqt_string sourceID); +void QWebEnginePage_override_virtual_AcceptNavigationRequest(void* self, intptr_t slot); +bool QWebEnginePage_virtualbase_AcceptNavigationRequest(void* self, QUrl* url, int typeVal, bool isMainFrame); +void QWebEnginePage_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWebEnginePage_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QWebEnginePage_override_virtual_TimerEvent(void* self, intptr_t slot); +void QWebEnginePage_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QWebEnginePage_override_virtual_ChildEvent(void* self, intptr_t slot); +void QWebEnginePage_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QWebEnginePage_override_virtual_CustomEvent(void* self, intptr_t slot); +void QWebEnginePage_virtualbase_CustomEvent(void* self, QEvent* event); +void QWebEnginePage_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QWebEnginePage_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QWebEnginePage_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QWebEnginePage_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QWebEnginePage_Delete(QWebEnginePage* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebengineprofile.cpp b/qt6/webengine/gen_qwebengineprofile.cpp new file mode 100644 index 00000000..c59c4a59 --- /dev/null +++ b/qt6/webengine/gen_qwebengineprofile.cpp @@ -0,0 +1,578 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebengineprofile.h" +#include "_cgo_export.h" + +class MiqtVirtualQWebEngineProfile : public virtual QWebEngineProfile { +public: + + MiqtVirtualQWebEngineProfile(): QWebEngineProfile() {}; + MiqtVirtualQWebEngineProfile(const QString& name): QWebEngineProfile(name) {}; + MiqtVirtualQWebEngineProfile(QObject* parent): QWebEngineProfile(parent) {}; + MiqtVirtualQWebEngineProfile(const QString& name, QObject* parent): QWebEngineProfile(name, parent) {}; + + virtual ~MiqtVirtualQWebEngineProfile() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QWebEngineProfile::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QWebEngineProfile_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QWebEngineProfile::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QWebEngineProfile::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QWebEngineProfile_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QWebEngineProfile::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QWebEngineProfile::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineProfile_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QWebEngineProfile::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QWebEngineProfile::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineProfile_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QWebEngineProfile::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QWebEngineProfile::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineProfile_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QWebEngineProfile::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QWebEngineProfile::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebEngineProfile_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QWebEngineProfile::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QWebEngineProfile::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebEngineProfile_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QWebEngineProfile::disconnectNotify(*signal); + + } + +}; + +void QWebEngineProfile_new(QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject) { + MiqtVirtualQWebEngineProfile* ret = new MiqtVirtualQWebEngineProfile(); + *outptr_QWebEngineProfile = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebEngineProfile_new2(struct miqt_string name, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject) { + QString name_QString = QString::fromUtf8(name.data, name.len); + MiqtVirtualQWebEngineProfile* ret = new MiqtVirtualQWebEngineProfile(name_QString); + *outptr_QWebEngineProfile = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebEngineProfile_new3(QObject* parent, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject) { + MiqtVirtualQWebEngineProfile* ret = new MiqtVirtualQWebEngineProfile(parent); + *outptr_QWebEngineProfile = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebEngineProfile_new4(struct miqt_string name, QObject* parent, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject) { + QString name_QString = QString::fromUtf8(name.data, name.len); + MiqtVirtualQWebEngineProfile* ret = new MiqtVirtualQWebEngineProfile(name_QString, parent); + *outptr_QWebEngineProfile = ret; + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QWebEngineProfile_MetaObject(const QWebEngineProfile* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineProfile_Metacast(QWebEngineProfile* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineProfile_Tr(const char* s) { + QString _ret = QWebEngineProfile::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineProfile_StorageName(const QWebEngineProfile* self) { + QString _ret = self->storageName(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QWebEngineProfile_IsOffTheRecord(const QWebEngineProfile* self) { + return self->isOffTheRecord(); +} + +struct miqt_string QWebEngineProfile_PersistentStoragePath(const QWebEngineProfile* self) { + QString _ret = self->persistentStoragePath(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineProfile_SetPersistentStoragePath(QWebEngineProfile* self, struct miqt_string path) { + QString path_QString = QString::fromUtf8(path.data, path.len); + self->setPersistentStoragePath(path_QString); +} + +struct miqt_string QWebEngineProfile_CachePath(const QWebEngineProfile* self) { + QString _ret = self->cachePath(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineProfile_SetCachePath(QWebEngineProfile* self, struct miqt_string path) { + QString path_QString = QString::fromUtf8(path.data, path.len); + self->setCachePath(path_QString); +} + +struct miqt_string QWebEngineProfile_HttpUserAgent(const QWebEngineProfile* self) { + QString _ret = self->httpUserAgent(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineProfile_SetHttpUserAgent(QWebEngineProfile* self, struct miqt_string userAgent) { + QString userAgent_QString = QString::fromUtf8(userAgent.data, userAgent.len); + self->setHttpUserAgent(userAgent_QString); +} + +int QWebEngineProfile_HttpCacheType(const QWebEngineProfile* self) { + QWebEngineProfile::HttpCacheType _ret = self->httpCacheType(); + return static_cast(_ret); +} + +void QWebEngineProfile_SetHttpCacheType(QWebEngineProfile* self, int httpCacheType) { + self->setHttpCacheType(static_cast(httpCacheType)); +} + +void QWebEngineProfile_SetHttpAcceptLanguage(QWebEngineProfile* self, struct miqt_string httpAcceptLanguage) { + QString httpAcceptLanguage_QString = QString::fromUtf8(httpAcceptLanguage.data, httpAcceptLanguage.len); + self->setHttpAcceptLanguage(httpAcceptLanguage_QString); +} + +struct miqt_string QWebEngineProfile_HttpAcceptLanguage(const QWebEngineProfile* self) { + QString _ret = self->httpAcceptLanguage(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QWebEngineProfile_PersistentCookiesPolicy(const QWebEngineProfile* self) { + QWebEngineProfile::PersistentCookiesPolicy _ret = self->persistentCookiesPolicy(); + return static_cast(_ret); +} + +void QWebEngineProfile_SetPersistentCookiesPolicy(QWebEngineProfile* self, int persistentCookiesPolicy) { + self->setPersistentCookiesPolicy(static_cast(persistentCookiesPolicy)); +} + +int QWebEngineProfile_HttpCacheMaximumSize(const QWebEngineProfile* self) { + return self->httpCacheMaximumSize(); +} + +void QWebEngineProfile_SetHttpCacheMaximumSize(QWebEngineProfile* self, int maxSize) { + self->setHttpCacheMaximumSize(static_cast(maxSize)); +} + +QWebEngineCookieStore* QWebEngineProfile_CookieStore(QWebEngineProfile* self) { + return self->cookieStore(); +} + +void QWebEngineProfile_SetUrlRequestInterceptor(QWebEngineProfile* self, QWebEngineUrlRequestInterceptor* interceptor) { + self->setUrlRequestInterceptor(interceptor); +} + +void QWebEngineProfile_ClearAllVisitedLinks(QWebEngineProfile* self) { + self->clearAllVisitedLinks(); +} + +void QWebEngineProfile_ClearVisitedLinks(QWebEngineProfile* self, struct miqt_array /* of QUrl* */ urls) { + QList urls_QList; + urls_QList.reserve(urls.len); + QUrl** urls_arr = static_cast(urls.data); + for(size_t i = 0; i < urls.len; ++i) { + urls_QList.push_back(*(urls_arr[i])); + } + self->clearVisitedLinks(urls_QList); +} + +bool QWebEngineProfile_VisitedLinksContainsUrl(const QWebEngineProfile* self, QUrl* url) { + return self->visitedLinksContainsUrl(*url); +} + +QWebEngineSettings* QWebEngineProfile_Settings(const QWebEngineProfile* self) { + return self->settings(); +} + +QWebEngineScriptCollection* QWebEngineProfile_Scripts(const QWebEngineProfile* self) { + return self->scripts(); +} + +QWebEngineUrlSchemeHandler* QWebEngineProfile_UrlSchemeHandler(const QWebEngineProfile* self, struct miqt_string param1) { + QByteArray param1_QByteArray(param1.data, param1.len); + return (QWebEngineUrlSchemeHandler*) self->urlSchemeHandler(param1_QByteArray); +} + +void QWebEngineProfile_InstallUrlSchemeHandler(QWebEngineProfile* self, struct miqt_string scheme, QWebEngineUrlSchemeHandler* param2) { + QByteArray scheme_QByteArray(scheme.data, scheme.len); + self->installUrlSchemeHandler(scheme_QByteArray, param2); +} + +void QWebEngineProfile_RemoveUrlScheme(QWebEngineProfile* self, struct miqt_string scheme) { + QByteArray scheme_QByteArray(scheme.data, scheme.len); + self->removeUrlScheme(scheme_QByteArray); +} + +void QWebEngineProfile_RemoveUrlSchemeHandler(QWebEngineProfile* self, QWebEngineUrlSchemeHandler* param1) { + self->removeUrlSchemeHandler(param1); +} + +void QWebEngineProfile_RemoveAllUrlSchemeHandlers(QWebEngineProfile* self) { + self->removeAllUrlSchemeHandlers(); +} + +void QWebEngineProfile_ClearHttpCache(QWebEngineProfile* self) { + self->clearHttpCache(); +} + +void QWebEngineProfile_SetSpellCheckLanguages(QWebEngineProfile* self, struct miqt_array /* of struct miqt_string */ languages) { + QStringList languages_QList; + languages_QList.reserve(languages.len); + struct miqt_string* languages_arr = static_cast(languages.data); + for(size_t i = 0; i < languages.len; ++i) { + QString languages_arr_i_QString = QString::fromUtf8(languages_arr[i].data, languages_arr[i].len); + languages_QList.push_back(languages_arr_i_QString); + } + self->setSpellCheckLanguages(languages_QList); +} + +struct miqt_array /* of struct miqt_string */ QWebEngineProfile_SpellCheckLanguages(const QWebEngineProfile* self) { + QStringList _ret = self->spellCheckLanguages(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QWebEngineProfile_SetSpellCheckEnabled(QWebEngineProfile* self, bool enabled) { + self->setSpellCheckEnabled(enabled); +} + +bool QWebEngineProfile_IsSpellCheckEnabled(const QWebEngineProfile* self) { + return self->isSpellCheckEnabled(); +} + +struct miqt_string QWebEngineProfile_DownloadPath(const QWebEngineProfile* self) { + QString _ret = self->downloadPath(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineProfile_SetDownloadPath(QWebEngineProfile* self, struct miqt_string path) { + QString path_QString = QString::fromUtf8(path.data, path.len); + self->setDownloadPath(path_QString); +} + +QWebEngineClientCertificateStore* QWebEngineProfile_ClientCertificateStore(QWebEngineProfile* self) { + return self->clientCertificateStore(); +} + +QWebEngineProfile* QWebEngineProfile_DefaultProfile() { + return QWebEngineProfile::defaultProfile(); +} + +void QWebEngineProfile_DownloadRequested(QWebEngineProfile* self, QWebEngineDownloadRequest* download) { + self->downloadRequested(download); +} + +void QWebEngineProfile_connect_DownloadRequested(QWebEngineProfile* self, intptr_t slot) { + MiqtVirtualQWebEngineProfile::connect(self, static_cast(&QWebEngineProfile::downloadRequested), self, [=](QWebEngineDownloadRequest* download) { + QWebEngineDownloadRequest* sigval1 = download; + miqt_exec_callback_QWebEngineProfile_DownloadRequested(slot, sigval1); + }); +} + +struct miqt_string QWebEngineProfile_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineProfile::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineProfile_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineProfile::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineProfile_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineProfile*)(self) )->handle__Event = slot; +} + +bool QWebEngineProfile_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQWebEngineProfile*)(self) )->virtualbase_Event(event); +} + +void QWebEngineProfile_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineProfile*)(self) )->handle__EventFilter = slot; +} + +bool QWebEngineProfile_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQWebEngineProfile*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QWebEngineProfile_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineProfile*)(self) )->handle__TimerEvent = slot; +} + +void QWebEngineProfile_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQWebEngineProfile*)(self) )->virtualbase_TimerEvent(event); +} + +void QWebEngineProfile_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineProfile*)(self) )->handle__ChildEvent = slot; +} + +void QWebEngineProfile_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQWebEngineProfile*)(self) )->virtualbase_ChildEvent(event); +} + +void QWebEngineProfile_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineProfile*)(self) )->handle__CustomEvent = slot; +} + +void QWebEngineProfile_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebEngineProfile*)(self) )->virtualbase_CustomEvent(event); +} + +void QWebEngineProfile_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineProfile*)(self) )->handle__ConnectNotify = slot; +} + +void QWebEngineProfile_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebEngineProfile*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QWebEngineProfile_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineProfile*)(self) )->handle__DisconnectNotify = slot; +} + +void QWebEngineProfile_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebEngineProfile*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QWebEngineProfile_Delete(QWebEngineProfile* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebengineprofile.go b/qt6/webengine/gen_qwebengineprofile.go new file mode 100644 index 00000000..699dbe53 --- /dev/null +++ b/qt6/webengine/gen_qwebengineprofile.go @@ -0,0 +1,584 @@ +package webengine + +/* + +#include "gen_qwebengineprofile.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebEngineProfile__HttpCacheType int + +const ( + QWebEngineProfile__MemoryHttpCache QWebEngineProfile__HttpCacheType = 0 + QWebEngineProfile__DiskHttpCache QWebEngineProfile__HttpCacheType = 1 + QWebEngineProfile__NoCache QWebEngineProfile__HttpCacheType = 2 +) + +type QWebEngineProfile__PersistentCookiesPolicy int + +const ( + QWebEngineProfile__NoPersistentCookies QWebEngineProfile__PersistentCookiesPolicy = 0 + QWebEngineProfile__AllowPersistentCookies QWebEngineProfile__PersistentCookiesPolicy = 1 + QWebEngineProfile__ForcePersistentCookies QWebEngineProfile__PersistentCookiesPolicy = 2 +) + +type QWebEngineProfile struct { + h *C.QWebEngineProfile + isSubclass bool + *qt6.QObject +} + +func (this *QWebEngineProfile) cPointer() *C.QWebEngineProfile { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineProfile) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineProfile constructs the type using only CGO pointers. +func newQWebEngineProfile(h *C.QWebEngineProfile, h_QObject *C.QObject) *QWebEngineProfile { + if h == nil { + return nil + } + return &QWebEngineProfile{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEngineProfile constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineProfile(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineProfile { + if h == nil { + return nil + } + + return &QWebEngineProfile{h: (*C.QWebEngineProfile)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} +} + +// NewQWebEngineProfile constructs a new QWebEngineProfile object. +func NewQWebEngineProfile() *QWebEngineProfile { + var outptr_QWebEngineProfile *C.QWebEngineProfile = nil + var outptr_QObject *C.QObject = nil + + C.QWebEngineProfile_new(&outptr_QWebEngineProfile, &outptr_QObject) + ret := newQWebEngineProfile(outptr_QWebEngineProfile, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebEngineProfile2 constructs a new QWebEngineProfile object. +func NewQWebEngineProfile2(name string) *QWebEngineProfile { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + var outptr_QWebEngineProfile *C.QWebEngineProfile = nil + var outptr_QObject *C.QObject = nil + + C.QWebEngineProfile_new2(name_ms, &outptr_QWebEngineProfile, &outptr_QObject) + ret := newQWebEngineProfile(outptr_QWebEngineProfile, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebEngineProfile3 constructs a new QWebEngineProfile object. +func NewQWebEngineProfile3(parent *qt6.QObject) *QWebEngineProfile { + var outptr_QWebEngineProfile *C.QWebEngineProfile = nil + var outptr_QObject *C.QObject = nil + + C.QWebEngineProfile_new3((*C.QObject)(parent.UnsafePointer()), &outptr_QWebEngineProfile, &outptr_QObject) + ret := newQWebEngineProfile(outptr_QWebEngineProfile, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebEngineProfile4 constructs a new QWebEngineProfile object. +func NewQWebEngineProfile4(name string, parent *qt6.QObject) *QWebEngineProfile { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + var outptr_QWebEngineProfile *C.QWebEngineProfile = nil + var outptr_QObject *C.QObject = nil + + C.QWebEngineProfile_new4(name_ms, (*C.QObject)(parent.UnsafePointer()), &outptr_QWebEngineProfile, &outptr_QObject) + ret := newQWebEngineProfile(outptr_QWebEngineProfile, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineProfile) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineProfile_MetaObject(this.h))) +} + +func (this *QWebEngineProfile) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineProfile_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineProfile_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineProfile_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineProfile) StorageName() string { + var _ms C.struct_miqt_string = C.QWebEngineProfile_StorageName(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineProfile) IsOffTheRecord() bool { + return (bool)(C.QWebEngineProfile_IsOffTheRecord(this.h)) +} + +func (this *QWebEngineProfile) PersistentStoragePath() string { + var _ms C.struct_miqt_string = C.QWebEngineProfile_PersistentStoragePath(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineProfile) SetPersistentStoragePath(path string) { + path_ms := C.struct_miqt_string{} + path_ms.data = C.CString(path) + path_ms.len = C.size_t(len(path)) + defer C.free(unsafe.Pointer(path_ms.data)) + C.QWebEngineProfile_SetPersistentStoragePath(this.h, path_ms) +} + +func (this *QWebEngineProfile) CachePath() string { + var _ms C.struct_miqt_string = C.QWebEngineProfile_CachePath(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineProfile) SetCachePath(path string) { + path_ms := C.struct_miqt_string{} + path_ms.data = C.CString(path) + path_ms.len = C.size_t(len(path)) + defer C.free(unsafe.Pointer(path_ms.data)) + C.QWebEngineProfile_SetCachePath(this.h, path_ms) +} + +func (this *QWebEngineProfile) HttpUserAgent() string { + var _ms C.struct_miqt_string = C.QWebEngineProfile_HttpUserAgent(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineProfile) SetHttpUserAgent(userAgent string) { + userAgent_ms := C.struct_miqt_string{} + userAgent_ms.data = C.CString(userAgent) + userAgent_ms.len = C.size_t(len(userAgent)) + defer C.free(unsafe.Pointer(userAgent_ms.data)) + C.QWebEngineProfile_SetHttpUserAgent(this.h, userAgent_ms) +} + +func (this *QWebEngineProfile) HttpCacheType() QWebEngineProfile__HttpCacheType { + return (QWebEngineProfile__HttpCacheType)(C.QWebEngineProfile_HttpCacheType(this.h)) +} + +func (this *QWebEngineProfile) SetHttpCacheType(httpCacheType QWebEngineProfile__HttpCacheType) { + C.QWebEngineProfile_SetHttpCacheType(this.h, (C.int)(httpCacheType)) +} + +func (this *QWebEngineProfile) SetHttpAcceptLanguage(httpAcceptLanguage string) { + httpAcceptLanguage_ms := C.struct_miqt_string{} + httpAcceptLanguage_ms.data = C.CString(httpAcceptLanguage) + httpAcceptLanguage_ms.len = C.size_t(len(httpAcceptLanguage)) + defer C.free(unsafe.Pointer(httpAcceptLanguage_ms.data)) + C.QWebEngineProfile_SetHttpAcceptLanguage(this.h, httpAcceptLanguage_ms) +} + +func (this *QWebEngineProfile) HttpAcceptLanguage() string { + var _ms C.struct_miqt_string = C.QWebEngineProfile_HttpAcceptLanguage(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineProfile) PersistentCookiesPolicy() QWebEngineProfile__PersistentCookiesPolicy { + return (QWebEngineProfile__PersistentCookiesPolicy)(C.QWebEngineProfile_PersistentCookiesPolicy(this.h)) +} + +func (this *QWebEngineProfile) SetPersistentCookiesPolicy(persistentCookiesPolicy QWebEngineProfile__PersistentCookiesPolicy) { + C.QWebEngineProfile_SetPersistentCookiesPolicy(this.h, (C.int)(persistentCookiesPolicy)) +} + +func (this *QWebEngineProfile) HttpCacheMaximumSize() int { + return (int)(C.QWebEngineProfile_HttpCacheMaximumSize(this.h)) +} + +func (this *QWebEngineProfile) SetHttpCacheMaximumSize(maxSize int) { + C.QWebEngineProfile_SetHttpCacheMaximumSize(this.h, (C.int)(maxSize)) +} + +func (this *QWebEngineProfile) CookieStore() *QWebEngineCookieStore { + return UnsafeNewQWebEngineCookieStore(unsafe.Pointer(C.QWebEngineProfile_CookieStore(this.h)), nil) +} + +func (this *QWebEngineProfile) SetUrlRequestInterceptor(interceptor *QWebEngineUrlRequestInterceptor) { + C.QWebEngineProfile_SetUrlRequestInterceptor(this.h, interceptor.cPointer()) +} + +func (this *QWebEngineProfile) ClearAllVisitedLinks() { + C.QWebEngineProfile_ClearAllVisitedLinks(this.h) +} + +func (this *QWebEngineProfile) ClearVisitedLinks(urls []qt6.QUrl) { + urls_CArray := (*[0xffff]*C.QUrl)(C.malloc(C.size_t(8 * len(urls)))) + defer C.free(unsafe.Pointer(urls_CArray)) + for i := range urls { + urls_CArray[i] = (*C.QUrl)(urls[i].UnsafePointer()) + } + urls_ma := C.struct_miqt_array{len: C.size_t(len(urls)), data: unsafe.Pointer(urls_CArray)} + C.QWebEngineProfile_ClearVisitedLinks(this.h, urls_ma) +} + +func (this *QWebEngineProfile) VisitedLinksContainsUrl(url *qt6.QUrl) bool { + return (bool)(C.QWebEngineProfile_VisitedLinksContainsUrl(this.h, (*C.QUrl)(url.UnsafePointer()))) +} + +func (this *QWebEngineProfile) Settings() *QWebEngineSettings { + return UnsafeNewQWebEngineSettings(unsafe.Pointer(C.QWebEngineProfile_Settings(this.h))) +} + +func (this *QWebEngineProfile) Scripts() *QWebEngineScriptCollection { + return UnsafeNewQWebEngineScriptCollection(unsafe.Pointer(C.QWebEngineProfile_Scripts(this.h))) +} + +func (this *QWebEngineProfile) UrlSchemeHandler(param1 []byte) *QWebEngineUrlSchemeHandler { + param1_alias := C.struct_miqt_string{} + param1_alias.data = (*C.char)(unsafe.Pointer(¶m1[0])) + param1_alias.len = C.size_t(len(param1)) + return UnsafeNewQWebEngineUrlSchemeHandler(unsafe.Pointer(C.QWebEngineProfile_UrlSchemeHandler(this.h, param1_alias)), nil) +} + +func (this *QWebEngineProfile) InstallUrlSchemeHandler(scheme []byte, param2 *QWebEngineUrlSchemeHandler) { + scheme_alias := C.struct_miqt_string{} + scheme_alias.data = (*C.char)(unsafe.Pointer(&scheme[0])) + scheme_alias.len = C.size_t(len(scheme)) + C.QWebEngineProfile_InstallUrlSchemeHandler(this.h, scheme_alias, param2.cPointer()) +} + +func (this *QWebEngineProfile) RemoveUrlScheme(scheme []byte) { + scheme_alias := C.struct_miqt_string{} + scheme_alias.data = (*C.char)(unsafe.Pointer(&scheme[0])) + scheme_alias.len = C.size_t(len(scheme)) + C.QWebEngineProfile_RemoveUrlScheme(this.h, scheme_alias) +} + +func (this *QWebEngineProfile) RemoveUrlSchemeHandler(param1 *QWebEngineUrlSchemeHandler) { + C.QWebEngineProfile_RemoveUrlSchemeHandler(this.h, param1.cPointer()) +} + +func (this *QWebEngineProfile) RemoveAllUrlSchemeHandlers() { + C.QWebEngineProfile_RemoveAllUrlSchemeHandlers(this.h) +} + +func (this *QWebEngineProfile) ClearHttpCache() { + C.QWebEngineProfile_ClearHttpCache(this.h) +} + +func (this *QWebEngineProfile) SetSpellCheckLanguages(languages []string) { + languages_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(languages)))) + defer C.free(unsafe.Pointer(languages_CArray)) + for i := range languages { + languages_i_ms := C.struct_miqt_string{} + languages_i_ms.data = C.CString(languages[i]) + languages_i_ms.len = C.size_t(len(languages[i])) + defer C.free(unsafe.Pointer(languages_i_ms.data)) + languages_CArray[i] = languages_i_ms + } + languages_ma := C.struct_miqt_array{len: C.size_t(len(languages)), data: unsafe.Pointer(languages_CArray)} + C.QWebEngineProfile_SetSpellCheckLanguages(this.h, languages_ma) +} + +func (this *QWebEngineProfile) SpellCheckLanguages() []string { + var _ma C.struct_miqt_array = C.QWebEngineProfile_SpellCheckLanguages(this.h) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret +} + +func (this *QWebEngineProfile) SetSpellCheckEnabled(enabled bool) { + C.QWebEngineProfile_SetSpellCheckEnabled(this.h, (C.bool)(enabled)) +} + +func (this *QWebEngineProfile) IsSpellCheckEnabled() bool { + return (bool)(C.QWebEngineProfile_IsSpellCheckEnabled(this.h)) +} + +func (this *QWebEngineProfile) DownloadPath() string { + var _ms C.struct_miqt_string = C.QWebEngineProfile_DownloadPath(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineProfile) SetDownloadPath(path string) { + path_ms := C.struct_miqt_string{} + path_ms.data = C.CString(path) + path_ms.len = C.size_t(len(path)) + defer C.free(unsafe.Pointer(path_ms.data)) + C.QWebEngineProfile_SetDownloadPath(this.h, path_ms) +} + +func (this *QWebEngineProfile) ClientCertificateStore() *QWebEngineClientCertificateStore { + return UnsafeNewQWebEngineClientCertificateStore(unsafe.Pointer(C.QWebEngineProfile_ClientCertificateStore(this.h))) +} + +func QWebEngineProfile_DefaultProfile() *QWebEngineProfile { + return UnsafeNewQWebEngineProfile(unsafe.Pointer(C.QWebEngineProfile_DefaultProfile()), nil) +} + +func (this *QWebEngineProfile) DownloadRequested(download *QWebEngineDownloadRequest) { + C.QWebEngineProfile_DownloadRequested(this.h, download.cPointer()) +} +func (this *QWebEngineProfile) OnDownloadRequested(slot func(download *QWebEngineDownloadRequest)) { + C.QWebEngineProfile_connect_DownloadRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineProfile_DownloadRequested +func miqt_exec_callback_QWebEngineProfile_DownloadRequested(cb C.intptr_t, download *C.QWebEngineDownloadRequest) { + gofunc, ok := cgo.Handle(cb).Value().(func(download *QWebEngineDownloadRequest)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebEngineDownloadRequest(unsafe.Pointer(download), nil) + + gofunc(slotval1) +} + +func QWebEngineProfile_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineProfile_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineProfile_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineProfile_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineProfile) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QWebEngineProfile_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebEngineProfile) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QWebEngineProfile_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineProfile_Event +func miqt_exec_callback_QWebEngineProfile_Event(self *C.QWebEngineProfile, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebEngineProfile{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEngineProfile) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QWebEngineProfile_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebEngineProfile) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QWebEngineProfile_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineProfile_EventFilter +func miqt_exec_callback_QWebEngineProfile_EventFilter(self *C.QWebEngineProfile, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebEngineProfile{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEngineProfile) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QWebEngineProfile_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineProfile) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QWebEngineProfile_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineProfile_TimerEvent +func miqt_exec_callback_QWebEngineProfile_TimerEvent(self *C.QWebEngineProfile, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineProfile{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QWebEngineProfile) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QWebEngineProfile_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineProfile) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QWebEngineProfile_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineProfile_ChildEvent +func miqt_exec_callback_QWebEngineProfile_ChildEvent(self *C.QWebEngineProfile, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineProfile{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QWebEngineProfile) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QWebEngineProfile_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineProfile) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QWebEngineProfile_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineProfile_CustomEvent +func miqt_exec_callback_QWebEngineProfile_CustomEvent(self *C.QWebEngineProfile, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWebEngineProfile{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QWebEngineProfile) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QWebEngineProfile_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebEngineProfile) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QWebEngineProfile_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineProfile_ConnectNotify +func miqt_exec_callback_QWebEngineProfile_ConnectNotify(self *C.QWebEngineProfile, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebEngineProfile{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QWebEngineProfile) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QWebEngineProfile_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebEngineProfile) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QWebEngineProfile_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineProfile_DisconnectNotify +func miqt_exec_callback_QWebEngineProfile_DisconnectNotify(self *C.QWebEngineProfile, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebEngineProfile{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QWebEngineProfile) Delete() { + C.QWebEngineProfile_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineProfile) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineProfile) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebengineprofile.h b/qt6/webengine/gen_qwebengineprofile.h new file mode 100644 index 00000000..b90d00c0 --- /dev/null +++ b/qt6/webengine/gen_qwebengineprofile.h @@ -0,0 +1,119 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINEPROFILE_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINEPROFILE_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; +class QMetaObject; +class QObject; +class QTimerEvent; +class QUrl; +class QWebEngineClientCertificateStore; +class QWebEngineCookieStore; +class QWebEngineDownloadRequest; +class QWebEngineProfile; +class QWebEngineScriptCollection; +class QWebEngineSettings; +class QWebEngineUrlRequestInterceptor; +class QWebEngineUrlSchemeHandler; +#else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; +typedef struct QUrl QUrl; +typedef struct QWebEngineClientCertificateStore QWebEngineClientCertificateStore; +typedef struct QWebEngineCookieStore QWebEngineCookieStore; +typedef struct QWebEngineDownloadRequest QWebEngineDownloadRequest; +typedef struct QWebEngineProfile QWebEngineProfile; +typedef struct QWebEngineScriptCollection QWebEngineScriptCollection; +typedef struct QWebEngineSettings QWebEngineSettings; +typedef struct QWebEngineUrlRequestInterceptor QWebEngineUrlRequestInterceptor; +typedef struct QWebEngineUrlSchemeHandler QWebEngineUrlSchemeHandler; +#endif + +void QWebEngineProfile_new(QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject); +void QWebEngineProfile_new2(struct miqt_string name, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject); +void QWebEngineProfile_new3(QObject* parent, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject); +void QWebEngineProfile_new4(struct miqt_string name, QObject* parent, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject); +QMetaObject* QWebEngineProfile_MetaObject(const QWebEngineProfile* self); +void* QWebEngineProfile_Metacast(QWebEngineProfile* self, const char* param1); +struct miqt_string QWebEngineProfile_Tr(const char* s); +struct miqt_string QWebEngineProfile_StorageName(const QWebEngineProfile* self); +bool QWebEngineProfile_IsOffTheRecord(const QWebEngineProfile* self); +struct miqt_string QWebEngineProfile_PersistentStoragePath(const QWebEngineProfile* self); +void QWebEngineProfile_SetPersistentStoragePath(QWebEngineProfile* self, struct miqt_string path); +struct miqt_string QWebEngineProfile_CachePath(const QWebEngineProfile* self); +void QWebEngineProfile_SetCachePath(QWebEngineProfile* self, struct miqt_string path); +struct miqt_string QWebEngineProfile_HttpUserAgent(const QWebEngineProfile* self); +void QWebEngineProfile_SetHttpUserAgent(QWebEngineProfile* self, struct miqt_string userAgent); +int QWebEngineProfile_HttpCacheType(const QWebEngineProfile* self); +void QWebEngineProfile_SetHttpCacheType(QWebEngineProfile* self, int httpCacheType); +void QWebEngineProfile_SetHttpAcceptLanguage(QWebEngineProfile* self, struct miqt_string httpAcceptLanguage); +struct miqt_string QWebEngineProfile_HttpAcceptLanguage(const QWebEngineProfile* self); +int QWebEngineProfile_PersistentCookiesPolicy(const QWebEngineProfile* self); +void QWebEngineProfile_SetPersistentCookiesPolicy(QWebEngineProfile* self, int persistentCookiesPolicy); +int QWebEngineProfile_HttpCacheMaximumSize(const QWebEngineProfile* self); +void QWebEngineProfile_SetHttpCacheMaximumSize(QWebEngineProfile* self, int maxSize); +QWebEngineCookieStore* QWebEngineProfile_CookieStore(QWebEngineProfile* self); +void QWebEngineProfile_SetUrlRequestInterceptor(QWebEngineProfile* self, QWebEngineUrlRequestInterceptor* interceptor); +void QWebEngineProfile_ClearAllVisitedLinks(QWebEngineProfile* self); +void QWebEngineProfile_ClearVisitedLinks(QWebEngineProfile* self, struct miqt_array /* of QUrl* */ urls); +bool QWebEngineProfile_VisitedLinksContainsUrl(const QWebEngineProfile* self, QUrl* url); +QWebEngineSettings* QWebEngineProfile_Settings(const QWebEngineProfile* self); +QWebEngineScriptCollection* QWebEngineProfile_Scripts(const QWebEngineProfile* self); +QWebEngineUrlSchemeHandler* QWebEngineProfile_UrlSchemeHandler(const QWebEngineProfile* self, struct miqt_string param1); +void QWebEngineProfile_InstallUrlSchemeHandler(QWebEngineProfile* self, struct miqt_string scheme, QWebEngineUrlSchemeHandler* param2); +void QWebEngineProfile_RemoveUrlScheme(QWebEngineProfile* self, struct miqt_string scheme); +void QWebEngineProfile_RemoveUrlSchemeHandler(QWebEngineProfile* self, QWebEngineUrlSchemeHandler* param1); +void QWebEngineProfile_RemoveAllUrlSchemeHandlers(QWebEngineProfile* self); +void QWebEngineProfile_ClearHttpCache(QWebEngineProfile* self); +void QWebEngineProfile_SetSpellCheckLanguages(QWebEngineProfile* self, struct miqt_array /* of struct miqt_string */ languages); +struct miqt_array /* of struct miqt_string */ QWebEngineProfile_SpellCheckLanguages(const QWebEngineProfile* self); +void QWebEngineProfile_SetSpellCheckEnabled(QWebEngineProfile* self, bool enabled); +bool QWebEngineProfile_IsSpellCheckEnabled(const QWebEngineProfile* self); +struct miqt_string QWebEngineProfile_DownloadPath(const QWebEngineProfile* self); +void QWebEngineProfile_SetDownloadPath(QWebEngineProfile* self, struct miqt_string path); +QWebEngineClientCertificateStore* QWebEngineProfile_ClientCertificateStore(QWebEngineProfile* self); +QWebEngineProfile* QWebEngineProfile_DefaultProfile(); +void QWebEngineProfile_DownloadRequested(QWebEngineProfile* self, QWebEngineDownloadRequest* download); +void QWebEngineProfile_connect_DownloadRequested(QWebEngineProfile* self, intptr_t slot); +struct miqt_string QWebEngineProfile_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineProfile_Tr3(const char* s, const char* c, int n); +void QWebEngineProfile_override_virtual_Event(void* self, intptr_t slot); +bool QWebEngineProfile_virtualbase_Event(void* self, QEvent* event); +void QWebEngineProfile_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWebEngineProfile_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QWebEngineProfile_override_virtual_TimerEvent(void* self, intptr_t slot); +void QWebEngineProfile_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QWebEngineProfile_override_virtual_ChildEvent(void* self, intptr_t slot); +void QWebEngineProfile_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QWebEngineProfile_override_virtual_CustomEvent(void* self, intptr_t slot); +void QWebEngineProfile_virtualbase_CustomEvent(void* self, QEvent* event); +void QWebEngineProfile_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QWebEngineProfile_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QWebEngineProfile_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QWebEngineProfile_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QWebEngineProfile_Delete(QWebEngineProfile* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebenginequotarequest.cpp b/qt6/webengine/gen_qwebenginequotarequest.cpp new file mode 100644 index 00000000..6f249c33 --- /dev/null +++ b/qt6/webengine/gen_qwebenginequotarequest.cpp @@ -0,0 +1,49 @@ +#include +#include +#include +#include "gen_qwebenginequotarequest.h" +#include "_cgo_export.h" + +void QWebEngineQuotaRequest_new(QWebEngineQuotaRequest** outptr_QWebEngineQuotaRequest) { + QWebEngineQuotaRequest* ret = new QWebEngineQuotaRequest(); + *outptr_QWebEngineQuotaRequest = ret; +} + +void QWebEngineQuotaRequest_new2(QWebEngineQuotaRequest* param1, QWebEngineQuotaRequest** outptr_QWebEngineQuotaRequest) { + QWebEngineQuotaRequest* ret = new QWebEngineQuotaRequest(*param1); + *outptr_QWebEngineQuotaRequest = ret; +} + +void QWebEngineQuotaRequest_Accept(QWebEngineQuotaRequest* self) { + self->accept(); +} + +void QWebEngineQuotaRequest_Reject(QWebEngineQuotaRequest* self) { + self->reject(); +} + +QUrl* QWebEngineQuotaRequest_Origin(const QWebEngineQuotaRequest* self) { + return new QUrl(self->origin()); +} + +long long QWebEngineQuotaRequest_RequestedSize(const QWebEngineQuotaRequest* self) { + qint64 _ret = self->requestedSize(); + return static_cast(_ret); +} + +bool QWebEngineQuotaRequest_OperatorEqual(const QWebEngineQuotaRequest* self, QWebEngineQuotaRequest* that) { + return (*self == *that); +} + +bool QWebEngineQuotaRequest_OperatorNotEqual(const QWebEngineQuotaRequest* self, QWebEngineQuotaRequest* that) { + return (*self != *that); +} + +void QWebEngineQuotaRequest_Delete(QWebEngineQuotaRequest* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebenginequotarequest.go b/qt6/webengine/gen_qwebenginequotarequest.go new file mode 100644 index 00000000..41f0c0e4 --- /dev/null +++ b/qt6/webengine/gen_qwebenginequotarequest.go @@ -0,0 +1,112 @@ +package webengine + +/* + +#include "gen_qwebenginequotarequest.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "unsafe" +) + +type QWebEngineQuotaRequest struct { + h *C.QWebEngineQuotaRequest + isSubclass bool +} + +func (this *QWebEngineQuotaRequest) cPointer() *C.QWebEngineQuotaRequest { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineQuotaRequest) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineQuotaRequest constructs the type using only CGO pointers. +func newQWebEngineQuotaRequest(h *C.QWebEngineQuotaRequest) *QWebEngineQuotaRequest { + if h == nil { + return nil + } + return &QWebEngineQuotaRequest{h: h} +} + +// UnsafeNewQWebEngineQuotaRequest constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineQuotaRequest(h unsafe.Pointer) *QWebEngineQuotaRequest { + if h == nil { + return nil + } + + return &QWebEngineQuotaRequest{h: (*C.QWebEngineQuotaRequest)(h)} +} + +// NewQWebEngineQuotaRequest constructs a new QWebEngineQuotaRequest object. +func NewQWebEngineQuotaRequest() *QWebEngineQuotaRequest { + var outptr_QWebEngineQuotaRequest *C.QWebEngineQuotaRequest = nil + + C.QWebEngineQuotaRequest_new(&outptr_QWebEngineQuotaRequest) + ret := newQWebEngineQuotaRequest(outptr_QWebEngineQuotaRequest) + ret.isSubclass = true + return ret +} + +// NewQWebEngineQuotaRequest2 constructs a new QWebEngineQuotaRequest object. +func NewQWebEngineQuotaRequest2(param1 *QWebEngineQuotaRequest) *QWebEngineQuotaRequest { + var outptr_QWebEngineQuotaRequest *C.QWebEngineQuotaRequest = nil + + C.QWebEngineQuotaRequest_new2(param1.cPointer(), &outptr_QWebEngineQuotaRequest) + ret := newQWebEngineQuotaRequest(outptr_QWebEngineQuotaRequest) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineQuotaRequest) Accept() { + C.QWebEngineQuotaRequest_Accept(this.h) +} + +func (this *QWebEngineQuotaRequest) Reject() { + C.QWebEngineQuotaRequest_Reject(this.h) +} + +func (this *QWebEngineQuotaRequest) Origin() *qt6.QUrl { + _ret := C.QWebEngineQuotaRequest_Origin(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineQuotaRequest) RequestedSize() int64 { + return (int64)(C.QWebEngineQuotaRequest_RequestedSize(this.h)) +} + +func (this *QWebEngineQuotaRequest) OperatorEqual(that *QWebEngineQuotaRequest) bool { + return (bool)(C.QWebEngineQuotaRequest_OperatorEqual(this.h, that.cPointer())) +} + +func (this *QWebEngineQuotaRequest) OperatorNotEqual(that *QWebEngineQuotaRequest) bool { + return (bool)(C.QWebEngineQuotaRequest_OperatorNotEqual(this.h, that.cPointer())) +} + +// Delete this object from C++ memory. +func (this *QWebEngineQuotaRequest) Delete() { + C.QWebEngineQuotaRequest_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineQuotaRequest) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineQuotaRequest) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebenginequotarequest.h b/qt6/webengine/gen_qwebenginequotarequest.h new file mode 100644 index 00000000..772e6abc --- /dev/null +++ b/qt6/webengine/gen_qwebenginequotarequest.h @@ -0,0 +1,39 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINEQUOTAREQUEST_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINEQUOTAREQUEST_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QUrl; +class QWebEngineQuotaRequest; +#else +typedef struct QUrl QUrl; +typedef struct QWebEngineQuotaRequest QWebEngineQuotaRequest; +#endif + +void QWebEngineQuotaRequest_new(QWebEngineQuotaRequest** outptr_QWebEngineQuotaRequest); +void QWebEngineQuotaRequest_new2(QWebEngineQuotaRequest* param1, QWebEngineQuotaRequest** outptr_QWebEngineQuotaRequest); +void QWebEngineQuotaRequest_Accept(QWebEngineQuotaRequest* self); +void QWebEngineQuotaRequest_Reject(QWebEngineQuotaRequest* self); +QUrl* QWebEngineQuotaRequest_Origin(const QWebEngineQuotaRequest* self); +long long QWebEngineQuotaRequest_RequestedSize(const QWebEngineQuotaRequest* self); +bool QWebEngineQuotaRequest_OperatorEqual(const QWebEngineQuotaRequest* self, QWebEngineQuotaRequest* that); +bool QWebEngineQuotaRequest_OperatorNotEqual(const QWebEngineQuotaRequest* self, QWebEngineQuotaRequest* that); +void QWebEngineQuotaRequest_Delete(QWebEngineQuotaRequest* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.cpp b/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.cpp new file mode 100644 index 00000000..b4fe6cd3 --- /dev/null +++ b/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.cpp @@ -0,0 +1,58 @@ +#include +#include +#include +#include +#include +#include +#include "gen_qwebengineregisterprotocolhandlerrequest.h" +#include "_cgo_export.h" + +void QWebEngineRegisterProtocolHandlerRequest_new(QWebEngineRegisterProtocolHandlerRequest** outptr_QWebEngineRegisterProtocolHandlerRequest) { + QWebEngineRegisterProtocolHandlerRequest* ret = new QWebEngineRegisterProtocolHandlerRequest(); + *outptr_QWebEngineRegisterProtocolHandlerRequest = ret; +} + +void QWebEngineRegisterProtocolHandlerRequest_new2(QWebEngineRegisterProtocolHandlerRequest* param1, QWebEngineRegisterProtocolHandlerRequest** outptr_QWebEngineRegisterProtocolHandlerRequest) { + QWebEngineRegisterProtocolHandlerRequest* ret = new QWebEngineRegisterProtocolHandlerRequest(*param1); + *outptr_QWebEngineRegisterProtocolHandlerRequest = ret; +} + +void QWebEngineRegisterProtocolHandlerRequest_Accept(QWebEngineRegisterProtocolHandlerRequest* self) { + self->accept(); +} + +void QWebEngineRegisterProtocolHandlerRequest_Reject(QWebEngineRegisterProtocolHandlerRequest* self) { + self->reject(); +} + +QUrl* QWebEngineRegisterProtocolHandlerRequest_Origin(const QWebEngineRegisterProtocolHandlerRequest* self) { + return new QUrl(self->origin()); +} + +struct miqt_string QWebEngineRegisterProtocolHandlerRequest_Scheme(const QWebEngineRegisterProtocolHandlerRequest* self) { + QString _ret = self->scheme(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QWebEngineRegisterProtocolHandlerRequest_OperatorEqual(const QWebEngineRegisterProtocolHandlerRequest* self, QWebEngineRegisterProtocolHandlerRequest* that) { + return (*self == *that); +} + +bool QWebEngineRegisterProtocolHandlerRequest_OperatorNotEqual(const QWebEngineRegisterProtocolHandlerRequest* self, QWebEngineRegisterProtocolHandlerRequest* that) { + return (*self != *that); +} + +void QWebEngineRegisterProtocolHandlerRequest_Delete(QWebEngineRegisterProtocolHandlerRequest* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.go b/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.go new file mode 100644 index 00000000..a30e6a61 --- /dev/null +++ b/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.go @@ -0,0 +1,115 @@ +package webengine + +/* + +#include "gen_qwebengineregisterprotocolhandlerrequest.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "unsafe" +) + +type QWebEngineRegisterProtocolHandlerRequest struct { + h *C.QWebEngineRegisterProtocolHandlerRequest + isSubclass bool +} + +func (this *QWebEngineRegisterProtocolHandlerRequest) cPointer() *C.QWebEngineRegisterProtocolHandlerRequest { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineRegisterProtocolHandlerRequest) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineRegisterProtocolHandlerRequest constructs the type using only CGO pointers. +func newQWebEngineRegisterProtocolHandlerRequest(h *C.QWebEngineRegisterProtocolHandlerRequest) *QWebEngineRegisterProtocolHandlerRequest { + if h == nil { + return nil + } + return &QWebEngineRegisterProtocolHandlerRequest{h: h} +} + +// UnsafeNewQWebEngineRegisterProtocolHandlerRequest constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineRegisterProtocolHandlerRequest(h unsafe.Pointer) *QWebEngineRegisterProtocolHandlerRequest { + if h == nil { + return nil + } + + return &QWebEngineRegisterProtocolHandlerRequest{h: (*C.QWebEngineRegisterProtocolHandlerRequest)(h)} +} + +// NewQWebEngineRegisterProtocolHandlerRequest constructs a new QWebEngineRegisterProtocolHandlerRequest object. +func NewQWebEngineRegisterProtocolHandlerRequest() *QWebEngineRegisterProtocolHandlerRequest { + var outptr_QWebEngineRegisterProtocolHandlerRequest *C.QWebEngineRegisterProtocolHandlerRequest = nil + + C.QWebEngineRegisterProtocolHandlerRequest_new(&outptr_QWebEngineRegisterProtocolHandlerRequest) + ret := newQWebEngineRegisterProtocolHandlerRequest(outptr_QWebEngineRegisterProtocolHandlerRequest) + ret.isSubclass = true + return ret +} + +// NewQWebEngineRegisterProtocolHandlerRequest2 constructs a new QWebEngineRegisterProtocolHandlerRequest object. +func NewQWebEngineRegisterProtocolHandlerRequest2(param1 *QWebEngineRegisterProtocolHandlerRequest) *QWebEngineRegisterProtocolHandlerRequest { + var outptr_QWebEngineRegisterProtocolHandlerRequest *C.QWebEngineRegisterProtocolHandlerRequest = nil + + C.QWebEngineRegisterProtocolHandlerRequest_new2(param1.cPointer(), &outptr_QWebEngineRegisterProtocolHandlerRequest) + ret := newQWebEngineRegisterProtocolHandlerRequest(outptr_QWebEngineRegisterProtocolHandlerRequest) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineRegisterProtocolHandlerRequest) Accept() { + C.QWebEngineRegisterProtocolHandlerRequest_Accept(this.h) +} + +func (this *QWebEngineRegisterProtocolHandlerRequest) Reject() { + C.QWebEngineRegisterProtocolHandlerRequest_Reject(this.h) +} + +func (this *QWebEngineRegisterProtocolHandlerRequest) Origin() *qt6.QUrl { + _ret := C.QWebEngineRegisterProtocolHandlerRequest_Origin(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineRegisterProtocolHandlerRequest) Scheme() string { + var _ms C.struct_miqt_string = C.QWebEngineRegisterProtocolHandlerRequest_Scheme(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineRegisterProtocolHandlerRequest) OperatorEqual(that *QWebEngineRegisterProtocolHandlerRequest) bool { + return (bool)(C.QWebEngineRegisterProtocolHandlerRequest_OperatorEqual(this.h, that.cPointer())) +} + +func (this *QWebEngineRegisterProtocolHandlerRequest) OperatorNotEqual(that *QWebEngineRegisterProtocolHandlerRequest) bool { + return (bool)(C.QWebEngineRegisterProtocolHandlerRequest_OperatorNotEqual(this.h, that.cPointer())) +} + +// Delete this object from C++ memory. +func (this *QWebEngineRegisterProtocolHandlerRequest) Delete() { + C.QWebEngineRegisterProtocolHandlerRequest_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineRegisterProtocolHandlerRequest) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineRegisterProtocolHandlerRequest) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.h b/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.h new file mode 100644 index 00000000..7fa8a2e3 --- /dev/null +++ b/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.h @@ -0,0 +1,39 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINEREGISTERPROTOCOLHANDLERREQUEST_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINEREGISTERPROTOCOLHANDLERREQUEST_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QUrl; +class QWebEngineRegisterProtocolHandlerRequest; +#else +typedef struct QUrl QUrl; +typedef struct QWebEngineRegisterProtocolHandlerRequest QWebEngineRegisterProtocolHandlerRequest; +#endif + +void QWebEngineRegisterProtocolHandlerRequest_new(QWebEngineRegisterProtocolHandlerRequest** outptr_QWebEngineRegisterProtocolHandlerRequest); +void QWebEngineRegisterProtocolHandlerRequest_new2(QWebEngineRegisterProtocolHandlerRequest* param1, QWebEngineRegisterProtocolHandlerRequest** outptr_QWebEngineRegisterProtocolHandlerRequest); +void QWebEngineRegisterProtocolHandlerRequest_Accept(QWebEngineRegisterProtocolHandlerRequest* self); +void QWebEngineRegisterProtocolHandlerRequest_Reject(QWebEngineRegisterProtocolHandlerRequest* self); +QUrl* QWebEngineRegisterProtocolHandlerRequest_Origin(const QWebEngineRegisterProtocolHandlerRequest* self); +struct miqt_string QWebEngineRegisterProtocolHandlerRequest_Scheme(const QWebEngineRegisterProtocolHandlerRequest* self); +bool QWebEngineRegisterProtocolHandlerRequest_OperatorEqual(const QWebEngineRegisterProtocolHandlerRequest* self, QWebEngineRegisterProtocolHandlerRequest* that); +bool QWebEngineRegisterProtocolHandlerRequest_OperatorNotEqual(const QWebEngineRegisterProtocolHandlerRequest* self, QWebEngineRegisterProtocolHandlerRequest* that); +void QWebEngineRegisterProtocolHandlerRequest_Delete(QWebEngineRegisterProtocolHandlerRequest* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebenginescript.cpp b/qt6/webengine/gen_qwebenginescript.cpp new file mode 100644 index 00000000..012c0797 --- /dev/null +++ b/qt6/webengine/gen_qwebenginescript.cpp @@ -0,0 +1,109 @@ +#include +#include +#include +#include +#include +#include +#include "gen_qwebenginescript.h" +#include "_cgo_export.h" + +void QWebEngineScript_new(QWebEngineScript** outptr_QWebEngineScript) { + QWebEngineScript* ret = new QWebEngineScript(); + *outptr_QWebEngineScript = ret; +} + +void QWebEngineScript_new2(QWebEngineScript* other, QWebEngineScript** outptr_QWebEngineScript) { + QWebEngineScript* ret = new QWebEngineScript(*other); + *outptr_QWebEngineScript = ret; +} + +void QWebEngineScript_OperatorAssign(QWebEngineScript* self, QWebEngineScript* other) { + self->operator=(*other); +} + +struct miqt_string QWebEngineScript_Name(const QWebEngineScript* self) { + QString _ret = self->name(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineScript_SetName(QWebEngineScript* self, struct miqt_string name) { + QString name_QString = QString::fromUtf8(name.data, name.len); + self->setName(name_QString); +} + +QUrl* QWebEngineScript_SourceUrl(const QWebEngineScript* self) { + return new QUrl(self->sourceUrl()); +} + +void QWebEngineScript_SetSourceUrl(QWebEngineScript* self, QUrl* url) { + self->setSourceUrl(*url); +} + +struct miqt_string QWebEngineScript_SourceCode(const QWebEngineScript* self) { + QString _ret = self->sourceCode(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineScript_SetSourceCode(QWebEngineScript* self, struct miqt_string sourceCode) { + QString sourceCode_QString = QString::fromUtf8(sourceCode.data, sourceCode.len); + self->setSourceCode(sourceCode_QString); +} + +int QWebEngineScript_InjectionPoint(const QWebEngineScript* self) { + QWebEngineScript::InjectionPoint _ret = self->injectionPoint(); + return static_cast(_ret); +} + +void QWebEngineScript_SetInjectionPoint(QWebEngineScript* self, int injectionPoint) { + self->setInjectionPoint(static_cast(injectionPoint)); +} + +unsigned int QWebEngineScript_WorldId(const QWebEngineScript* self) { + quint32 _ret = self->worldId(); + return static_cast(_ret); +} + +void QWebEngineScript_SetWorldId(QWebEngineScript* self, unsigned int worldId) { + self->setWorldId(static_cast(worldId)); +} + +bool QWebEngineScript_RunsOnSubFrames(const QWebEngineScript* self) { + return self->runsOnSubFrames(); +} + +void QWebEngineScript_SetRunsOnSubFrames(QWebEngineScript* self, bool on) { + self->setRunsOnSubFrames(on); +} + +bool QWebEngineScript_OperatorEqual(const QWebEngineScript* self, QWebEngineScript* other) { + return (*self == *other); +} + +bool QWebEngineScript_OperatorNotEqual(const QWebEngineScript* self, QWebEngineScript* other) { + return (*self != *other); +} + +void QWebEngineScript_Swap(QWebEngineScript* self, QWebEngineScript* other) { + self->swap(*other); +} + +void QWebEngineScript_Delete(QWebEngineScript* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebenginescript.go b/qt6/webengine/gen_qwebenginescript.go new file mode 100644 index 00000000..b8c92cc3 --- /dev/null +++ b/qt6/webengine/gen_qwebenginescript.go @@ -0,0 +1,182 @@ +package webengine + +/* + +#include "gen_qwebenginescript.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "unsafe" +) + +type QWebEngineScript__InjectionPoint int + +const ( + QWebEngineScript__Deferred QWebEngineScript__InjectionPoint = 0 + QWebEngineScript__DocumentReady QWebEngineScript__InjectionPoint = 1 + QWebEngineScript__DocumentCreation QWebEngineScript__InjectionPoint = 2 +) + +type QWebEngineScript__ScriptWorldId int + +const ( + QWebEngineScript__MainWorld QWebEngineScript__ScriptWorldId = 0 + QWebEngineScript__ApplicationWorld QWebEngineScript__ScriptWorldId = 1 + QWebEngineScript__UserWorld QWebEngineScript__ScriptWorldId = 2 +) + +type QWebEngineScript struct { + h *C.QWebEngineScript + isSubclass bool +} + +func (this *QWebEngineScript) cPointer() *C.QWebEngineScript { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineScript) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineScript constructs the type using only CGO pointers. +func newQWebEngineScript(h *C.QWebEngineScript) *QWebEngineScript { + if h == nil { + return nil + } + return &QWebEngineScript{h: h} +} + +// UnsafeNewQWebEngineScript constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineScript(h unsafe.Pointer) *QWebEngineScript { + if h == nil { + return nil + } + + return &QWebEngineScript{h: (*C.QWebEngineScript)(h)} +} + +// NewQWebEngineScript constructs a new QWebEngineScript object. +func NewQWebEngineScript() *QWebEngineScript { + var outptr_QWebEngineScript *C.QWebEngineScript = nil + + C.QWebEngineScript_new(&outptr_QWebEngineScript) + ret := newQWebEngineScript(outptr_QWebEngineScript) + ret.isSubclass = true + return ret +} + +// NewQWebEngineScript2 constructs a new QWebEngineScript object. +func NewQWebEngineScript2(other *QWebEngineScript) *QWebEngineScript { + var outptr_QWebEngineScript *C.QWebEngineScript = nil + + C.QWebEngineScript_new2(other.cPointer(), &outptr_QWebEngineScript) + ret := newQWebEngineScript(outptr_QWebEngineScript) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineScript) OperatorAssign(other *QWebEngineScript) { + C.QWebEngineScript_OperatorAssign(this.h, other.cPointer()) +} + +func (this *QWebEngineScript) Name() string { + var _ms C.struct_miqt_string = C.QWebEngineScript_Name(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineScript) SetName(name string) { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + C.QWebEngineScript_SetName(this.h, name_ms) +} + +func (this *QWebEngineScript) SourceUrl() *qt6.QUrl { + _ret := C.QWebEngineScript_SourceUrl(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineScript) SetSourceUrl(url *qt6.QUrl) { + C.QWebEngineScript_SetSourceUrl(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QWebEngineScript) SourceCode() string { + var _ms C.struct_miqt_string = C.QWebEngineScript_SourceCode(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineScript) SetSourceCode(sourceCode string) { + sourceCode_ms := C.struct_miqt_string{} + sourceCode_ms.data = C.CString(sourceCode) + sourceCode_ms.len = C.size_t(len(sourceCode)) + defer C.free(unsafe.Pointer(sourceCode_ms.data)) + C.QWebEngineScript_SetSourceCode(this.h, sourceCode_ms) +} + +func (this *QWebEngineScript) InjectionPoint() QWebEngineScript__InjectionPoint { + return (QWebEngineScript__InjectionPoint)(C.QWebEngineScript_InjectionPoint(this.h)) +} + +func (this *QWebEngineScript) SetInjectionPoint(injectionPoint QWebEngineScript__InjectionPoint) { + C.QWebEngineScript_SetInjectionPoint(this.h, (C.int)(injectionPoint)) +} + +func (this *QWebEngineScript) WorldId() uint { + return (uint)(C.QWebEngineScript_WorldId(this.h)) +} + +func (this *QWebEngineScript) SetWorldId(worldId uint) { + C.QWebEngineScript_SetWorldId(this.h, (C.uint)(worldId)) +} + +func (this *QWebEngineScript) RunsOnSubFrames() bool { + return (bool)(C.QWebEngineScript_RunsOnSubFrames(this.h)) +} + +func (this *QWebEngineScript) SetRunsOnSubFrames(on bool) { + C.QWebEngineScript_SetRunsOnSubFrames(this.h, (C.bool)(on)) +} + +func (this *QWebEngineScript) OperatorEqual(other *QWebEngineScript) bool { + return (bool)(C.QWebEngineScript_OperatorEqual(this.h, other.cPointer())) +} + +func (this *QWebEngineScript) OperatorNotEqual(other *QWebEngineScript) bool { + return (bool)(C.QWebEngineScript_OperatorNotEqual(this.h, other.cPointer())) +} + +func (this *QWebEngineScript) Swap(other *QWebEngineScript) { + C.QWebEngineScript_Swap(this.h, other.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QWebEngineScript) Delete() { + C.QWebEngineScript_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineScript) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineScript) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebenginescript.h b/qt6/webengine/gen_qwebenginescript.h new file mode 100644 index 00000000..53cf3aea --- /dev/null +++ b/qt6/webengine/gen_qwebenginescript.h @@ -0,0 +1,49 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINESCRIPT_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINESCRIPT_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QUrl; +class QWebEngineScript; +#else +typedef struct QUrl QUrl; +typedef struct QWebEngineScript QWebEngineScript; +#endif + +void QWebEngineScript_new(QWebEngineScript** outptr_QWebEngineScript); +void QWebEngineScript_new2(QWebEngineScript* other, QWebEngineScript** outptr_QWebEngineScript); +void QWebEngineScript_OperatorAssign(QWebEngineScript* self, QWebEngineScript* other); +struct miqt_string QWebEngineScript_Name(const QWebEngineScript* self); +void QWebEngineScript_SetName(QWebEngineScript* self, struct miqt_string name); +QUrl* QWebEngineScript_SourceUrl(const QWebEngineScript* self); +void QWebEngineScript_SetSourceUrl(QWebEngineScript* self, QUrl* url); +struct miqt_string QWebEngineScript_SourceCode(const QWebEngineScript* self); +void QWebEngineScript_SetSourceCode(QWebEngineScript* self, struct miqt_string sourceCode); +int QWebEngineScript_InjectionPoint(const QWebEngineScript* self); +void QWebEngineScript_SetInjectionPoint(QWebEngineScript* self, int injectionPoint); +unsigned int QWebEngineScript_WorldId(const QWebEngineScript* self); +void QWebEngineScript_SetWorldId(QWebEngineScript* self, unsigned int worldId); +bool QWebEngineScript_RunsOnSubFrames(const QWebEngineScript* self); +void QWebEngineScript_SetRunsOnSubFrames(QWebEngineScript* self, bool on); +bool QWebEngineScript_OperatorEqual(const QWebEngineScript* self, QWebEngineScript* other); +bool QWebEngineScript_OperatorNotEqual(const QWebEngineScript* self, QWebEngineScript* other); +void QWebEngineScript_Swap(QWebEngineScript* self, QWebEngineScript* other); +void QWebEngineScript_Delete(QWebEngineScript* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebenginescriptcollection.cpp b/qt6/webengine/gen_qwebenginescriptcollection.cpp new file mode 100644 index 00000000..11b00300 --- /dev/null +++ b/qt6/webengine/gen_qwebenginescriptcollection.cpp @@ -0,0 +1,79 @@ +#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(); +} + +bool QWebEngineScriptCollection_Contains(const QWebEngineScriptCollection* self, QWebEngineScript* value) { + return self->contains(*value); +} + +struct miqt_array /* of QWebEngineScript* */ QWebEngineScriptCollection_Find(const QWebEngineScriptCollection* self, struct miqt_string name) { + QString name_QString = QString::fromUtf8(name.data, name.len); + QList _ret = self->find(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; + } +} + diff --git a/qt6/webengine/gen_qwebenginescriptcollection.go b/qt6/webengine/gen_qwebenginescriptcollection.go new file mode 100644 index 00000000..69a19813 --- /dev/null +++ b/qt6/webengine/gen_qwebenginescriptcollection.go @@ -0,0 +1,128 @@ +package webengine + +/* + +#include "gen_qwebenginescriptcollection.h" +#include + +*/ +import "C" + +import ( + "runtime" + "unsafe" +) + +type QWebEngineScriptCollection struct { + h *C.QWebEngineScriptCollection + isSubclass bool +} + +func (this *QWebEngineScriptCollection) cPointer() *C.QWebEngineScriptCollection { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineScriptCollection) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineScriptCollection constructs the type using only CGO pointers. +func newQWebEngineScriptCollection(h *C.QWebEngineScriptCollection) *QWebEngineScriptCollection { + if h == nil { + return nil + } + return &QWebEngineScriptCollection{h: h} +} + +// UnsafeNewQWebEngineScriptCollection constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineScriptCollection(h unsafe.Pointer) *QWebEngineScriptCollection { + if h == nil { + return nil + } + + return &QWebEngineScriptCollection{h: (*C.QWebEngineScriptCollection)(h)} +} + +func (this *QWebEngineScriptCollection) IsEmpty() bool { + return (bool)(C.QWebEngineScriptCollection_IsEmpty(this.h)) +} + +func (this *QWebEngineScriptCollection) Count() int { + return (int)(C.QWebEngineScriptCollection_Count(this.h)) +} + +func (this *QWebEngineScriptCollection) Contains(value *QWebEngineScript) bool { + return (bool)(C.QWebEngineScriptCollection_Contains(this.h, value.cPointer())) +} + +func (this *QWebEngineScriptCollection) Find(name string) []QWebEngineScript { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + var _ma C.struct_miqt_array = C.QWebEngineScriptCollection_Find(this.h, name_ms) + _ret := make([]QWebEngineScript, int(_ma.len)) + _outCast := (*[0xffff]*C.QWebEngineScript)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQWebEngineScript(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret +} + +func (this *QWebEngineScriptCollection) Insert(param1 *QWebEngineScript) { + C.QWebEngineScriptCollection_Insert(this.h, param1.cPointer()) +} + +func (this *QWebEngineScriptCollection) InsertWithList(list []QWebEngineScript) { + list_CArray := (*[0xffff]*C.QWebEngineScript)(C.malloc(C.size_t(8 * len(list)))) + defer C.free(unsafe.Pointer(list_CArray)) + for i := range list { + list_CArray[i] = list[i].cPointer() + } + list_ma := C.struct_miqt_array{len: C.size_t(len(list)), data: unsafe.Pointer(list_CArray)} + C.QWebEngineScriptCollection_InsertWithList(this.h, list_ma) +} + +func (this *QWebEngineScriptCollection) Remove(param1 *QWebEngineScript) bool { + return (bool)(C.QWebEngineScriptCollection_Remove(this.h, param1.cPointer())) +} + +func (this *QWebEngineScriptCollection) Clear() { + C.QWebEngineScriptCollection_Clear(this.h) +} + +func (this *QWebEngineScriptCollection) ToList() []QWebEngineScript { + var _ma C.struct_miqt_array = C.QWebEngineScriptCollection_ToList(this.h) + _ret := make([]QWebEngineScript, int(_ma.len)) + _outCast := (*[0xffff]*C.QWebEngineScript)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQWebEngineScript(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebEngineScriptCollection) Delete() { + C.QWebEngineScriptCollection_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineScriptCollection) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineScriptCollection) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebenginescriptcollection.h b/qt6/webengine/gen_qwebenginescriptcollection.h new file mode 100644 index 00000000..51f8cc7c --- /dev/null +++ b/qt6/webengine/gen_qwebenginescriptcollection.h @@ -0,0 +1,40 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINESCRIPTCOLLECTION_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINESCRIPTCOLLECTION_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QWebEngineScript; +class QWebEngineScriptCollection; +#else +typedef struct QWebEngineScript QWebEngineScript; +typedef struct QWebEngineScriptCollection QWebEngineScriptCollection; +#endif + +bool QWebEngineScriptCollection_IsEmpty(const QWebEngineScriptCollection* self); +int QWebEngineScriptCollection_Count(const QWebEngineScriptCollection* self); +bool QWebEngineScriptCollection_Contains(const QWebEngineScriptCollection* self, QWebEngineScript* value); +struct miqt_array /* of QWebEngineScript* */ QWebEngineScriptCollection_Find(const QWebEngineScriptCollection* self, struct miqt_string name); +void QWebEngineScriptCollection_Insert(QWebEngineScriptCollection* self, QWebEngineScript* param1); +void QWebEngineScriptCollection_InsertWithList(QWebEngineScriptCollection* self, struct miqt_array /* of QWebEngineScript* */ list); +bool QWebEngineScriptCollection_Remove(QWebEngineScriptCollection* self, QWebEngineScript* param1); +void QWebEngineScriptCollection_Clear(QWebEngineScriptCollection* self); +struct miqt_array /* of QWebEngineScript* */ QWebEngineScriptCollection_ToList(const QWebEngineScriptCollection* self); +void QWebEngineScriptCollection_Delete(QWebEngineScriptCollection* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebenginesettings.cpp b/qt6/webengine/gen_qwebenginesettings.cpp new file mode 100644 index 00000000..96b6a4a9 --- /dev/null +++ b/qt6/webengine/gen_qwebenginesettings.cpp @@ -0,0 +1,89 @@ +#include +#include +#include +#include +#include +#include "gen_qwebenginesettings.h" +#include "_cgo_export.h" + +void QWebEngineSettings_SetFontFamily(QWebEngineSettings* self, int which, struct miqt_string family) { + QString family_QString = QString::fromUtf8(family.data, family.len); + self->setFontFamily(static_cast(which), family_QString); +} + +struct miqt_string QWebEngineSettings_FontFamily(const QWebEngineSettings* self, int which) { + QString _ret = self->fontFamily(static_cast(which)); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineSettings_ResetFontFamily(QWebEngineSettings* self, int which) { + self->resetFontFamily(static_cast(which)); +} + +void QWebEngineSettings_SetFontSize(QWebEngineSettings* self, int typeVal, int size) { + self->setFontSize(static_cast(typeVal), static_cast(size)); +} + +int QWebEngineSettings_FontSize(const QWebEngineSettings* self, int typeVal) { + return self->fontSize(static_cast(typeVal)); +} + +void QWebEngineSettings_ResetFontSize(QWebEngineSettings* self, int typeVal) { + self->resetFontSize(static_cast(typeVal)); +} + +void QWebEngineSettings_SetAttribute(QWebEngineSettings* self, int attr, bool on) { + self->setAttribute(static_cast(attr), on); +} + +bool QWebEngineSettings_TestAttribute(const QWebEngineSettings* self, int attr) { + return self->testAttribute(static_cast(attr)); +} + +void QWebEngineSettings_ResetAttribute(QWebEngineSettings* self, int attr) { + self->resetAttribute(static_cast(attr)); +} + +void QWebEngineSettings_SetDefaultTextEncoding(QWebEngineSettings* self, struct miqt_string encoding) { + QString encoding_QString = QString::fromUtf8(encoding.data, encoding.len); + self->setDefaultTextEncoding(encoding_QString); +} + +struct miqt_string QWebEngineSettings_DefaultTextEncoding(const QWebEngineSettings* self) { + QString _ret = self->defaultTextEncoding(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QWebEngineSettings_UnknownUrlSchemePolicy(const QWebEngineSettings* self) { + QWebEngineSettings::UnknownUrlSchemePolicy _ret = self->unknownUrlSchemePolicy(); + return static_cast(_ret); +} + +void QWebEngineSettings_SetUnknownUrlSchemePolicy(QWebEngineSettings* self, int policy) { + self->setUnknownUrlSchemePolicy(static_cast(policy)); +} + +void QWebEngineSettings_ResetUnknownUrlSchemePolicy(QWebEngineSettings* self) { + self->resetUnknownUrlSchemePolicy(); +} + +void QWebEngineSettings_Delete(QWebEngineSettings* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebenginesettings.go b/qt6/webengine/gen_qwebenginesettings.go new file mode 100644 index 00000000..e4428216 --- /dev/null +++ b/qt6/webengine/gen_qwebenginesettings.go @@ -0,0 +1,201 @@ +package webengine + +/* + +#include "gen_qwebenginesettings.h" +#include + +*/ +import "C" + +import ( + "runtime" + "unsafe" +) + +type QWebEngineSettings__FontFamily int + +const ( + QWebEngineSettings__StandardFont QWebEngineSettings__FontFamily = 0 + QWebEngineSettings__FixedFont QWebEngineSettings__FontFamily = 1 + QWebEngineSettings__SerifFont QWebEngineSettings__FontFamily = 2 + QWebEngineSettings__SansSerifFont QWebEngineSettings__FontFamily = 3 + QWebEngineSettings__CursiveFont QWebEngineSettings__FontFamily = 4 + QWebEngineSettings__FantasyFont QWebEngineSettings__FontFamily = 5 + QWebEngineSettings__PictographFont QWebEngineSettings__FontFamily = 6 +) + +type QWebEngineSettings__WebAttribute int + +const ( + QWebEngineSettings__AutoLoadImages QWebEngineSettings__WebAttribute = 0 + QWebEngineSettings__JavascriptEnabled QWebEngineSettings__WebAttribute = 1 + QWebEngineSettings__JavascriptCanOpenWindows QWebEngineSettings__WebAttribute = 2 + QWebEngineSettings__JavascriptCanAccessClipboard QWebEngineSettings__WebAttribute = 3 + QWebEngineSettings__LinksIncludedInFocusChain QWebEngineSettings__WebAttribute = 4 + QWebEngineSettings__LocalStorageEnabled QWebEngineSettings__WebAttribute = 5 + QWebEngineSettings__LocalContentCanAccessRemoteUrls QWebEngineSettings__WebAttribute = 6 + QWebEngineSettings__XSSAuditingEnabled QWebEngineSettings__WebAttribute = 7 + QWebEngineSettings__SpatialNavigationEnabled QWebEngineSettings__WebAttribute = 8 + QWebEngineSettings__LocalContentCanAccessFileUrls QWebEngineSettings__WebAttribute = 9 + QWebEngineSettings__HyperlinkAuditingEnabled QWebEngineSettings__WebAttribute = 10 + QWebEngineSettings__ScrollAnimatorEnabled QWebEngineSettings__WebAttribute = 11 + QWebEngineSettings__ErrorPageEnabled QWebEngineSettings__WebAttribute = 12 + QWebEngineSettings__PluginsEnabled QWebEngineSettings__WebAttribute = 13 + QWebEngineSettings__FullScreenSupportEnabled QWebEngineSettings__WebAttribute = 14 + QWebEngineSettings__ScreenCaptureEnabled QWebEngineSettings__WebAttribute = 15 + QWebEngineSettings__WebGLEnabled QWebEngineSettings__WebAttribute = 16 + QWebEngineSettings__Accelerated2dCanvasEnabled QWebEngineSettings__WebAttribute = 17 + QWebEngineSettings__AutoLoadIconsForPage QWebEngineSettings__WebAttribute = 18 + QWebEngineSettings__TouchIconsEnabled QWebEngineSettings__WebAttribute = 19 + QWebEngineSettings__FocusOnNavigationEnabled QWebEngineSettings__WebAttribute = 20 + QWebEngineSettings__PrintElementBackgrounds QWebEngineSettings__WebAttribute = 21 + QWebEngineSettings__AllowRunningInsecureContent QWebEngineSettings__WebAttribute = 22 + QWebEngineSettings__AllowGeolocationOnInsecureOrigins QWebEngineSettings__WebAttribute = 23 + QWebEngineSettings__AllowWindowActivationFromJavaScript QWebEngineSettings__WebAttribute = 24 + QWebEngineSettings__ShowScrollBars QWebEngineSettings__WebAttribute = 25 + QWebEngineSettings__PlaybackRequiresUserGesture QWebEngineSettings__WebAttribute = 26 + QWebEngineSettings__WebRTCPublicInterfacesOnly QWebEngineSettings__WebAttribute = 27 + QWebEngineSettings__JavascriptCanPaste QWebEngineSettings__WebAttribute = 28 + QWebEngineSettings__DnsPrefetchEnabled QWebEngineSettings__WebAttribute = 29 + QWebEngineSettings__PdfViewerEnabled QWebEngineSettings__WebAttribute = 30 + QWebEngineSettings__NavigateOnDropEnabled QWebEngineSettings__WebAttribute = 31 +) + +type QWebEngineSettings__FontSize int + +const ( + QWebEngineSettings__MinimumFontSize QWebEngineSettings__FontSize = 0 + QWebEngineSettings__MinimumLogicalFontSize QWebEngineSettings__FontSize = 1 + QWebEngineSettings__DefaultFontSize QWebEngineSettings__FontSize = 2 + QWebEngineSettings__DefaultFixedFontSize QWebEngineSettings__FontSize = 3 +) + +type QWebEngineSettings__UnknownUrlSchemePolicy int + +const ( + QWebEngineSettings__InheritedUnknownUrlSchemePolicy QWebEngineSettings__UnknownUrlSchemePolicy = 0 + QWebEngineSettings__DisallowUnknownUrlSchemes QWebEngineSettings__UnknownUrlSchemePolicy = 1 + QWebEngineSettings__AllowUnknownUrlSchemesFromUserInteraction QWebEngineSettings__UnknownUrlSchemePolicy = 2 + QWebEngineSettings__AllowAllUnknownUrlSchemes QWebEngineSettings__UnknownUrlSchemePolicy = 3 +) + +type QWebEngineSettings struct { + h *C.QWebEngineSettings + isSubclass bool +} + +func (this *QWebEngineSettings) cPointer() *C.QWebEngineSettings { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineSettings) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineSettings constructs the type using only CGO pointers. +func newQWebEngineSettings(h *C.QWebEngineSettings) *QWebEngineSettings { + if h == nil { + return nil + } + return &QWebEngineSettings{h: h} +} + +// UnsafeNewQWebEngineSettings constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineSettings(h unsafe.Pointer) *QWebEngineSettings { + if h == nil { + return nil + } + + return &QWebEngineSettings{h: (*C.QWebEngineSettings)(h)} +} + +func (this *QWebEngineSettings) SetFontFamily(which QWebEngineSettings__FontFamily, family string) { + family_ms := C.struct_miqt_string{} + family_ms.data = C.CString(family) + family_ms.len = C.size_t(len(family)) + defer C.free(unsafe.Pointer(family_ms.data)) + C.QWebEngineSettings_SetFontFamily(this.h, (C.int)(which), family_ms) +} + +func (this *QWebEngineSettings) FontFamily(which QWebEngineSettings__FontFamily) string { + var _ms C.struct_miqt_string = C.QWebEngineSettings_FontFamily(this.h, (C.int)(which)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineSettings) ResetFontFamily(which QWebEngineSettings__FontFamily) { + C.QWebEngineSettings_ResetFontFamily(this.h, (C.int)(which)) +} + +func (this *QWebEngineSettings) SetFontSize(typeVal QWebEngineSettings__FontSize, size int) { + C.QWebEngineSettings_SetFontSize(this.h, (C.int)(typeVal), (C.int)(size)) +} + +func (this *QWebEngineSettings) FontSize(typeVal QWebEngineSettings__FontSize) int { + return (int)(C.QWebEngineSettings_FontSize(this.h, (C.int)(typeVal))) +} + +func (this *QWebEngineSettings) ResetFontSize(typeVal QWebEngineSettings__FontSize) { + C.QWebEngineSettings_ResetFontSize(this.h, (C.int)(typeVal)) +} + +func (this *QWebEngineSettings) SetAttribute(attr QWebEngineSettings__WebAttribute, on bool) { + C.QWebEngineSettings_SetAttribute(this.h, (C.int)(attr), (C.bool)(on)) +} + +func (this *QWebEngineSettings) TestAttribute(attr QWebEngineSettings__WebAttribute) bool { + return (bool)(C.QWebEngineSettings_TestAttribute(this.h, (C.int)(attr))) +} + +func (this *QWebEngineSettings) ResetAttribute(attr QWebEngineSettings__WebAttribute) { + C.QWebEngineSettings_ResetAttribute(this.h, (C.int)(attr)) +} + +func (this *QWebEngineSettings) SetDefaultTextEncoding(encoding string) { + encoding_ms := C.struct_miqt_string{} + encoding_ms.data = C.CString(encoding) + encoding_ms.len = C.size_t(len(encoding)) + defer C.free(unsafe.Pointer(encoding_ms.data)) + C.QWebEngineSettings_SetDefaultTextEncoding(this.h, encoding_ms) +} + +func (this *QWebEngineSettings) DefaultTextEncoding() string { + var _ms C.struct_miqt_string = C.QWebEngineSettings_DefaultTextEncoding(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineSettings) UnknownUrlSchemePolicy() QWebEngineSettings__UnknownUrlSchemePolicy { + return (QWebEngineSettings__UnknownUrlSchemePolicy)(C.QWebEngineSettings_UnknownUrlSchemePolicy(this.h)) +} + +func (this *QWebEngineSettings) SetUnknownUrlSchemePolicy(policy QWebEngineSettings__UnknownUrlSchemePolicy) { + C.QWebEngineSettings_SetUnknownUrlSchemePolicy(this.h, (C.int)(policy)) +} + +func (this *QWebEngineSettings) ResetUnknownUrlSchemePolicy() { + C.QWebEngineSettings_ResetUnknownUrlSchemePolicy(this.h) +} + +// Delete this object from C++ memory. +func (this *QWebEngineSettings) Delete() { + C.QWebEngineSettings_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineSettings) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineSettings) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebenginesettings.h b/qt6/webengine/gen_qwebenginesettings.h new file mode 100644 index 00000000..8d1c75ac --- /dev/null +++ b/qt6/webengine/gen_qwebenginesettings.h @@ -0,0 +1,43 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINESETTINGS_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINESETTINGS_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QWebEngineSettings; +#else +typedef struct QWebEngineSettings QWebEngineSettings; +#endif + +void QWebEngineSettings_SetFontFamily(QWebEngineSettings* self, int which, struct miqt_string family); +struct miqt_string QWebEngineSettings_FontFamily(const QWebEngineSettings* self, int which); +void QWebEngineSettings_ResetFontFamily(QWebEngineSettings* self, int which); +void QWebEngineSettings_SetFontSize(QWebEngineSettings* self, int typeVal, int size); +int QWebEngineSettings_FontSize(const QWebEngineSettings* self, int typeVal); +void QWebEngineSettings_ResetFontSize(QWebEngineSettings* self, int typeVal); +void QWebEngineSettings_SetAttribute(QWebEngineSettings* self, int attr, bool on); +bool QWebEngineSettings_TestAttribute(const QWebEngineSettings* self, int attr); +void QWebEngineSettings_ResetAttribute(QWebEngineSettings* self, int attr); +void QWebEngineSettings_SetDefaultTextEncoding(QWebEngineSettings* self, struct miqt_string encoding); +struct miqt_string QWebEngineSettings_DefaultTextEncoding(const QWebEngineSettings* self); +int QWebEngineSettings_UnknownUrlSchemePolicy(const QWebEngineSettings* self); +void QWebEngineSettings_SetUnknownUrlSchemePolicy(QWebEngineSettings* self, int policy); +void QWebEngineSettings_ResetUnknownUrlSchemePolicy(QWebEngineSettings* self); +void QWebEngineSettings_Delete(QWebEngineSettings* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebengineurlrequestinfo.cpp b/qt6/webengine/gen_qwebengineurlrequestinfo.cpp new file mode 100644 index 00000000..215fabe6 --- /dev/null +++ b/qt6/webengine/gen_qwebengineurlrequestinfo.cpp @@ -0,0 +1,56 @@ +#include +#include +#include +#include +#include "gen_qwebengineurlrequestinfo.h" +#include "_cgo_export.h" + +int QWebEngineUrlRequestInfo_ResourceType(const QWebEngineUrlRequestInfo* self) { + QWebEngineUrlRequestInfo::ResourceType _ret = self->resourceType(); + return static_cast(_ret); +} + +int QWebEngineUrlRequestInfo_NavigationType(const QWebEngineUrlRequestInfo* self) { + QWebEngineUrlRequestInfo::NavigationType _ret = self->navigationType(); + return static_cast(_ret); +} + +QUrl* QWebEngineUrlRequestInfo_RequestUrl(const QWebEngineUrlRequestInfo* self) { + return new QUrl(self->requestUrl()); +} + +QUrl* QWebEngineUrlRequestInfo_FirstPartyUrl(const QWebEngineUrlRequestInfo* self) { + return new QUrl(self->firstPartyUrl()); +} + +QUrl* QWebEngineUrlRequestInfo_Initiator(const QWebEngineUrlRequestInfo* self) { + return new QUrl(self->initiator()); +} + +struct miqt_string QWebEngineUrlRequestInfo_RequestMethod(const QWebEngineUrlRequestInfo* self) { + QByteArray _qb = self->requestMethod(); + struct miqt_string _ms; + _ms.len = _qb.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _qb.data(), _ms.len); + return _ms; +} + +bool QWebEngineUrlRequestInfo_Changed(const QWebEngineUrlRequestInfo* self) { + return self->changed(); +} + +void QWebEngineUrlRequestInfo_Block(QWebEngineUrlRequestInfo* self, bool shouldBlock) { + self->block(shouldBlock); +} + +void QWebEngineUrlRequestInfo_Redirect(QWebEngineUrlRequestInfo* self, QUrl* url) { + self->redirect(*url); +} + +void QWebEngineUrlRequestInfo_SetHttpHeader(QWebEngineUrlRequestInfo* self, struct miqt_string name, struct miqt_string value) { + QByteArray name_QByteArray(name.data, name.len); + QByteArray value_QByteArray(value.data, value.len); + self->setHttpHeader(name_QByteArray, value_QByteArray); +} + diff --git a/qt6/webengine/gen_qwebengineurlrequestinfo.go b/qt6/webengine/gen_qwebengineurlrequestinfo.go new file mode 100644 index 00000000..ab62d3c7 --- /dev/null +++ b/qt6/webengine/gen_qwebengineurlrequestinfo.go @@ -0,0 +1,148 @@ +package webengine + +/* + +#include "gen_qwebengineurlrequestinfo.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "unsafe" +) + +type QWebEngineUrlRequestInfo__ResourceType int + +const ( + QWebEngineUrlRequestInfo__ResourceTypeMainFrame QWebEngineUrlRequestInfo__ResourceType = 0 + QWebEngineUrlRequestInfo__ResourceTypeSubFrame QWebEngineUrlRequestInfo__ResourceType = 1 + QWebEngineUrlRequestInfo__ResourceTypeStylesheet QWebEngineUrlRequestInfo__ResourceType = 2 + QWebEngineUrlRequestInfo__ResourceTypeScript QWebEngineUrlRequestInfo__ResourceType = 3 + QWebEngineUrlRequestInfo__ResourceTypeImage QWebEngineUrlRequestInfo__ResourceType = 4 + QWebEngineUrlRequestInfo__ResourceTypeFontResource QWebEngineUrlRequestInfo__ResourceType = 5 + QWebEngineUrlRequestInfo__ResourceTypeSubResource QWebEngineUrlRequestInfo__ResourceType = 6 + QWebEngineUrlRequestInfo__ResourceTypeObject QWebEngineUrlRequestInfo__ResourceType = 7 + QWebEngineUrlRequestInfo__ResourceTypeMedia QWebEngineUrlRequestInfo__ResourceType = 8 + QWebEngineUrlRequestInfo__ResourceTypeWorker QWebEngineUrlRequestInfo__ResourceType = 9 + QWebEngineUrlRequestInfo__ResourceTypeSharedWorker QWebEngineUrlRequestInfo__ResourceType = 10 + QWebEngineUrlRequestInfo__ResourceTypePrefetch QWebEngineUrlRequestInfo__ResourceType = 11 + QWebEngineUrlRequestInfo__ResourceTypeFavicon QWebEngineUrlRequestInfo__ResourceType = 12 + QWebEngineUrlRequestInfo__ResourceTypeXhr QWebEngineUrlRequestInfo__ResourceType = 13 + QWebEngineUrlRequestInfo__ResourceTypePing QWebEngineUrlRequestInfo__ResourceType = 14 + QWebEngineUrlRequestInfo__ResourceTypeServiceWorker QWebEngineUrlRequestInfo__ResourceType = 15 + QWebEngineUrlRequestInfo__ResourceTypeCspReport QWebEngineUrlRequestInfo__ResourceType = 16 + QWebEngineUrlRequestInfo__ResourceTypePluginResource QWebEngineUrlRequestInfo__ResourceType = 17 + QWebEngineUrlRequestInfo__ResourceTypeNavigationPreloadMainFrame QWebEngineUrlRequestInfo__ResourceType = 19 + QWebEngineUrlRequestInfo__ResourceTypeNavigationPreloadSubFrame QWebEngineUrlRequestInfo__ResourceType = 20 + QWebEngineUrlRequestInfo__ResourceTypeLast QWebEngineUrlRequestInfo__ResourceType = 20 + QWebEngineUrlRequestInfo__ResourceTypeWebSocket QWebEngineUrlRequestInfo__ResourceType = 254 + QWebEngineUrlRequestInfo__ResourceTypeUnknown QWebEngineUrlRequestInfo__ResourceType = 255 +) + +type QWebEngineUrlRequestInfo__NavigationType int + +const ( + QWebEngineUrlRequestInfo__NavigationTypeLink QWebEngineUrlRequestInfo__NavigationType = 0 + QWebEngineUrlRequestInfo__NavigationTypeTyped QWebEngineUrlRequestInfo__NavigationType = 1 + QWebEngineUrlRequestInfo__NavigationTypeFormSubmitted QWebEngineUrlRequestInfo__NavigationType = 2 + QWebEngineUrlRequestInfo__NavigationTypeBackForward QWebEngineUrlRequestInfo__NavigationType = 3 + QWebEngineUrlRequestInfo__NavigationTypeReload QWebEngineUrlRequestInfo__NavigationType = 4 + QWebEngineUrlRequestInfo__NavigationTypeOther QWebEngineUrlRequestInfo__NavigationType = 5 + QWebEngineUrlRequestInfo__NavigationTypeRedirect QWebEngineUrlRequestInfo__NavigationType = 6 +) + +type QWebEngineUrlRequestInfo struct { + h *C.QWebEngineUrlRequestInfo + isSubclass bool +} + +func (this *QWebEngineUrlRequestInfo) cPointer() *C.QWebEngineUrlRequestInfo { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineUrlRequestInfo) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineUrlRequestInfo constructs the type using only CGO pointers. +func newQWebEngineUrlRequestInfo(h *C.QWebEngineUrlRequestInfo) *QWebEngineUrlRequestInfo { + if h == nil { + return nil + } + return &QWebEngineUrlRequestInfo{h: h} +} + +// UnsafeNewQWebEngineUrlRequestInfo constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineUrlRequestInfo(h unsafe.Pointer) *QWebEngineUrlRequestInfo { + if h == nil { + return nil + } + + return &QWebEngineUrlRequestInfo{h: (*C.QWebEngineUrlRequestInfo)(h)} +} + +func (this *QWebEngineUrlRequestInfo) ResourceType() QWebEngineUrlRequestInfo__ResourceType { + return (QWebEngineUrlRequestInfo__ResourceType)(C.QWebEngineUrlRequestInfo_ResourceType(this.h)) +} + +func (this *QWebEngineUrlRequestInfo) NavigationType() QWebEngineUrlRequestInfo__NavigationType { + return (QWebEngineUrlRequestInfo__NavigationType)(C.QWebEngineUrlRequestInfo_NavigationType(this.h)) +} + +func (this *QWebEngineUrlRequestInfo) RequestUrl() *qt6.QUrl { + _ret := C.QWebEngineUrlRequestInfo_RequestUrl(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineUrlRequestInfo) FirstPartyUrl() *qt6.QUrl { + _ret := C.QWebEngineUrlRequestInfo_FirstPartyUrl(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineUrlRequestInfo) Initiator() *qt6.QUrl { + _ret := C.QWebEngineUrlRequestInfo_Initiator(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineUrlRequestInfo) RequestMethod() []byte { + var _bytearray C.struct_miqt_string = C.QWebEngineUrlRequestInfo_RequestMethod(this.h) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *QWebEngineUrlRequestInfo) Changed() bool { + return (bool)(C.QWebEngineUrlRequestInfo_Changed(this.h)) +} + +func (this *QWebEngineUrlRequestInfo) Block(shouldBlock bool) { + C.QWebEngineUrlRequestInfo_Block(this.h, (C.bool)(shouldBlock)) +} + +func (this *QWebEngineUrlRequestInfo) Redirect(url *qt6.QUrl) { + C.QWebEngineUrlRequestInfo_Redirect(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QWebEngineUrlRequestInfo) SetHttpHeader(name []byte, value []byte) { + name_alias := C.struct_miqt_string{} + name_alias.data = (*C.char)(unsafe.Pointer(&name[0])) + name_alias.len = C.size_t(len(name)) + value_alias := C.struct_miqt_string{} + value_alias.data = (*C.char)(unsafe.Pointer(&value[0])) + value_alias.len = C.size_t(len(value)) + C.QWebEngineUrlRequestInfo_SetHttpHeader(this.h, name_alias, value_alias) +} diff --git a/qt6/webengine/gen_qwebengineurlrequestinfo.h b/qt6/webengine/gen_qwebengineurlrequestinfo.h new file mode 100644 index 00000000..a6d5369d --- /dev/null +++ b/qt6/webengine/gen_qwebengineurlrequestinfo.h @@ -0,0 +1,40 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINEURLREQUESTINFO_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINEURLREQUESTINFO_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QUrl; +class QWebEngineUrlRequestInfo; +#else +typedef struct QUrl QUrl; +typedef struct QWebEngineUrlRequestInfo QWebEngineUrlRequestInfo; +#endif + +int QWebEngineUrlRequestInfo_ResourceType(const QWebEngineUrlRequestInfo* self); +int QWebEngineUrlRequestInfo_NavigationType(const QWebEngineUrlRequestInfo* self); +QUrl* QWebEngineUrlRequestInfo_RequestUrl(const QWebEngineUrlRequestInfo* self); +QUrl* QWebEngineUrlRequestInfo_FirstPartyUrl(const QWebEngineUrlRequestInfo* self); +QUrl* QWebEngineUrlRequestInfo_Initiator(const QWebEngineUrlRequestInfo* self); +struct miqt_string QWebEngineUrlRequestInfo_RequestMethod(const QWebEngineUrlRequestInfo* self); +bool QWebEngineUrlRequestInfo_Changed(const QWebEngineUrlRequestInfo* self); +void QWebEngineUrlRequestInfo_Block(QWebEngineUrlRequestInfo* self, bool shouldBlock); +void QWebEngineUrlRequestInfo_Redirect(QWebEngineUrlRequestInfo* self, QUrl* url); +void QWebEngineUrlRequestInfo_SetHttpHeader(QWebEngineUrlRequestInfo* self, struct miqt_string name, struct miqt_string value); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebengineurlrequestinterceptor.cpp b/qt6/webengine/gen_qwebengineurlrequestinterceptor.cpp new file mode 100644 index 00000000..53dc3048 --- /dev/null +++ b/qt6/webengine/gen_qwebengineurlrequestinterceptor.cpp @@ -0,0 +1,339 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebengineurlrequestinterceptor.h" +#include "_cgo_export.h" + +class MiqtVirtualQWebEngineUrlRequestInterceptor : public virtual QWebEngineUrlRequestInterceptor { +public: + + MiqtVirtualQWebEngineUrlRequestInterceptor(): QWebEngineUrlRequestInterceptor() {}; + MiqtVirtualQWebEngineUrlRequestInterceptor(QObject* p): QWebEngineUrlRequestInterceptor(p) {}; + + virtual ~MiqtVirtualQWebEngineUrlRequestInterceptor() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__InterceptRequest = 0; + + // Subclass to allow providing a Go implementation + virtual void interceptRequest(QWebEngineUrlRequestInfo& info) override { + if (handle__InterceptRequest == 0) { + return; // Pure virtual, there is no base we can call + } + + QWebEngineUrlRequestInfo& info_ret = info; + // Cast returned reference into pointer + QWebEngineUrlRequestInfo* sigval1 = &info_ret; + + miqt_exec_callback_QWebEngineUrlRequestInterceptor_InterceptRequest(this, handle__InterceptRequest, sigval1); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QWebEngineUrlRequestInterceptor::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QWebEngineUrlRequestInterceptor_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QWebEngineUrlRequestInterceptor::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QWebEngineUrlRequestInterceptor::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QWebEngineUrlRequestInterceptor_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QWebEngineUrlRequestInterceptor::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QWebEngineUrlRequestInterceptor::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineUrlRequestInterceptor_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QWebEngineUrlRequestInterceptor::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QWebEngineUrlRequestInterceptor::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineUrlRequestInterceptor_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QWebEngineUrlRequestInterceptor::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QWebEngineUrlRequestInterceptor::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineUrlRequestInterceptor_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QWebEngineUrlRequestInterceptor::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QWebEngineUrlRequestInterceptor::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebEngineUrlRequestInterceptor_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QWebEngineUrlRequestInterceptor::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QWebEngineUrlRequestInterceptor::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebEngineUrlRequestInterceptor_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QWebEngineUrlRequestInterceptor::disconnectNotify(*signal); + + } + +}; + +void QWebEngineUrlRequestInterceptor_new(QWebEngineUrlRequestInterceptor** outptr_QWebEngineUrlRequestInterceptor, QObject** outptr_QObject) { + MiqtVirtualQWebEngineUrlRequestInterceptor* ret = new MiqtVirtualQWebEngineUrlRequestInterceptor(); + *outptr_QWebEngineUrlRequestInterceptor = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebEngineUrlRequestInterceptor_new2(QObject* p, QWebEngineUrlRequestInterceptor** outptr_QWebEngineUrlRequestInterceptor, QObject** outptr_QObject) { + MiqtVirtualQWebEngineUrlRequestInterceptor* ret = new MiqtVirtualQWebEngineUrlRequestInterceptor(p); + *outptr_QWebEngineUrlRequestInterceptor = ret; + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QWebEngineUrlRequestInterceptor_MetaObject(const QWebEngineUrlRequestInterceptor* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineUrlRequestInterceptor_Metacast(QWebEngineUrlRequestInterceptor* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineUrlRequestInterceptor_Tr(const char* s) { + QString _ret = QWebEngineUrlRequestInterceptor::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineUrlRequestInterceptor_InterceptRequest(QWebEngineUrlRequestInterceptor* self, QWebEngineUrlRequestInfo* info) { + self->interceptRequest(*info); +} + +struct miqt_string QWebEngineUrlRequestInterceptor_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineUrlRequestInterceptor::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineUrlRequestInterceptor_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineUrlRequestInterceptor::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineUrlRequestInterceptor_override_virtual_InterceptRequest(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlRequestInterceptor*)(self) )->handle__InterceptRequest = slot; +} + +void QWebEngineUrlRequestInterceptor_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlRequestInterceptor*)(self) )->handle__Event = slot; +} + +bool QWebEngineUrlRequestInterceptor_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQWebEngineUrlRequestInterceptor*)(self) )->virtualbase_Event(event); +} + +void QWebEngineUrlRequestInterceptor_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlRequestInterceptor*)(self) )->handle__EventFilter = slot; +} + +bool QWebEngineUrlRequestInterceptor_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQWebEngineUrlRequestInterceptor*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QWebEngineUrlRequestInterceptor_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlRequestInterceptor*)(self) )->handle__TimerEvent = slot; +} + +void QWebEngineUrlRequestInterceptor_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQWebEngineUrlRequestInterceptor*)(self) )->virtualbase_TimerEvent(event); +} + +void QWebEngineUrlRequestInterceptor_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlRequestInterceptor*)(self) )->handle__ChildEvent = slot; +} + +void QWebEngineUrlRequestInterceptor_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQWebEngineUrlRequestInterceptor*)(self) )->virtualbase_ChildEvent(event); +} + +void QWebEngineUrlRequestInterceptor_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlRequestInterceptor*)(self) )->handle__CustomEvent = slot; +} + +void QWebEngineUrlRequestInterceptor_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebEngineUrlRequestInterceptor*)(self) )->virtualbase_CustomEvent(event); +} + +void QWebEngineUrlRequestInterceptor_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlRequestInterceptor*)(self) )->handle__ConnectNotify = slot; +} + +void QWebEngineUrlRequestInterceptor_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebEngineUrlRequestInterceptor*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QWebEngineUrlRequestInterceptor_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlRequestInterceptor*)(self) )->handle__DisconnectNotify = slot; +} + +void QWebEngineUrlRequestInterceptor_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebEngineUrlRequestInterceptor*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QWebEngineUrlRequestInterceptor_Delete(QWebEngineUrlRequestInterceptor* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebengineurlrequestinterceptor.go b/qt6/webengine/gen_qwebengineurlrequestinterceptor.go new file mode 100644 index 00000000..03977499 --- /dev/null +++ b/qt6/webengine/gen_qwebengineurlrequestinterceptor.go @@ -0,0 +1,319 @@ +package webengine + +/* + +#include "gen_qwebengineurlrequestinterceptor.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebEngineUrlRequestInterceptor struct { + h *C.QWebEngineUrlRequestInterceptor + isSubclass bool + *qt6.QObject +} + +func (this *QWebEngineUrlRequestInterceptor) cPointer() *C.QWebEngineUrlRequestInterceptor { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineUrlRequestInterceptor) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineUrlRequestInterceptor constructs the type using only CGO pointers. +func newQWebEngineUrlRequestInterceptor(h *C.QWebEngineUrlRequestInterceptor, h_QObject *C.QObject) *QWebEngineUrlRequestInterceptor { + if h == nil { + return nil + } + return &QWebEngineUrlRequestInterceptor{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEngineUrlRequestInterceptor constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineUrlRequestInterceptor(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineUrlRequestInterceptor { + if h == nil { + return nil + } + + return &QWebEngineUrlRequestInterceptor{h: (*C.QWebEngineUrlRequestInterceptor)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} +} + +// NewQWebEngineUrlRequestInterceptor constructs a new QWebEngineUrlRequestInterceptor object. +func NewQWebEngineUrlRequestInterceptor() *QWebEngineUrlRequestInterceptor { + var outptr_QWebEngineUrlRequestInterceptor *C.QWebEngineUrlRequestInterceptor = nil + var outptr_QObject *C.QObject = nil + + C.QWebEngineUrlRequestInterceptor_new(&outptr_QWebEngineUrlRequestInterceptor, &outptr_QObject) + ret := newQWebEngineUrlRequestInterceptor(outptr_QWebEngineUrlRequestInterceptor, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebEngineUrlRequestInterceptor2 constructs a new QWebEngineUrlRequestInterceptor object. +func NewQWebEngineUrlRequestInterceptor2(p *qt6.QObject) *QWebEngineUrlRequestInterceptor { + var outptr_QWebEngineUrlRequestInterceptor *C.QWebEngineUrlRequestInterceptor = nil + var outptr_QObject *C.QObject = nil + + C.QWebEngineUrlRequestInterceptor_new2((*C.QObject)(p.UnsafePointer()), &outptr_QWebEngineUrlRequestInterceptor, &outptr_QObject) + ret := newQWebEngineUrlRequestInterceptor(outptr_QWebEngineUrlRequestInterceptor, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineUrlRequestInterceptor) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineUrlRequestInterceptor_MetaObject(this.h))) +} + +func (this *QWebEngineUrlRequestInterceptor) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineUrlRequestInterceptor_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineUrlRequestInterceptor_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlRequestInterceptor_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineUrlRequestInterceptor) InterceptRequest(info *QWebEngineUrlRequestInfo) { + C.QWebEngineUrlRequestInterceptor_InterceptRequest(this.h, info.cPointer()) +} + +func QWebEngineUrlRequestInterceptor_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlRequestInterceptor_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineUrlRequestInterceptor_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlRequestInterceptor_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QWebEngineUrlRequestInterceptor) OnInterceptRequest(slot func(info *QWebEngineUrlRequestInfo)) { + C.QWebEngineUrlRequestInterceptor_override_virtual_InterceptRequest(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlRequestInterceptor_InterceptRequest +func miqt_exec_callback_QWebEngineUrlRequestInterceptor_InterceptRequest(self *C.QWebEngineUrlRequestInterceptor, cb C.intptr_t, info *C.QWebEngineUrlRequestInfo) { + gofunc, ok := cgo.Handle(cb).Value().(func(info *QWebEngineUrlRequestInfo)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebEngineUrlRequestInfo(unsafe.Pointer(info)) + + gofunc(slotval1) + +} + +func (this *QWebEngineUrlRequestInterceptor) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QWebEngineUrlRequestInterceptor_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebEngineUrlRequestInterceptor) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QWebEngineUrlRequestInterceptor_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlRequestInterceptor_Event +func miqt_exec_callback_QWebEngineUrlRequestInterceptor_Event(self *C.QWebEngineUrlRequestInterceptor, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebEngineUrlRequestInterceptor{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEngineUrlRequestInterceptor) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QWebEngineUrlRequestInterceptor_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebEngineUrlRequestInterceptor) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QWebEngineUrlRequestInterceptor_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlRequestInterceptor_EventFilter +func miqt_exec_callback_QWebEngineUrlRequestInterceptor_EventFilter(self *C.QWebEngineUrlRequestInterceptor, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebEngineUrlRequestInterceptor{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEngineUrlRequestInterceptor) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QWebEngineUrlRequestInterceptor_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineUrlRequestInterceptor) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QWebEngineUrlRequestInterceptor_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlRequestInterceptor_TimerEvent +func miqt_exec_callback_QWebEngineUrlRequestInterceptor_TimerEvent(self *C.QWebEngineUrlRequestInterceptor, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineUrlRequestInterceptor{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QWebEngineUrlRequestInterceptor) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QWebEngineUrlRequestInterceptor_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineUrlRequestInterceptor) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QWebEngineUrlRequestInterceptor_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlRequestInterceptor_ChildEvent +func miqt_exec_callback_QWebEngineUrlRequestInterceptor_ChildEvent(self *C.QWebEngineUrlRequestInterceptor, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineUrlRequestInterceptor{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QWebEngineUrlRequestInterceptor) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QWebEngineUrlRequestInterceptor_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineUrlRequestInterceptor) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QWebEngineUrlRequestInterceptor_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlRequestInterceptor_CustomEvent +func miqt_exec_callback_QWebEngineUrlRequestInterceptor_CustomEvent(self *C.QWebEngineUrlRequestInterceptor, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWebEngineUrlRequestInterceptor{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QWebEngineUrlRequestInterceptor) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QWebEngineUrlRequestInterceptor_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebEngineUrlRequestInterceptor) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QWebEngineUrlRequestInterceptor_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlRequestInterceptor_ConnectNotify +func miqt_exec_callback_QWebEngineUrlRequestInterceptor_ConnectNotify(self *C.QWebEngineUrlRequestInterceptor, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebEngineUrlRequestInterceptor{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QWebEngineUrlRequestInterceptor) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QWebEngineUrlRequestInterceptor_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebEngineUrlRequestInterceptor) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QWebEngineUrlRequestInterceptor_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlRequestInterceptor_DisconnectNotify +func miqt_exec_callback_QWebEngineUrlRequestInterceptor_DisconnectNotify(self *C.QWebEngineUrlRequestInterceptor, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebEngineUrlRequestInterceptor{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QWebEngineUrlRequestInterceptor) Delete() { + C.QWebEngineUrlRequestInterceptor_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineUrlRequestInterceptor) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineUrlRequestInterceptor) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebengineurlrequestinterceptor.h b/qt6/webengine/gen_qwebengineurlrequestinterceptor.h new file mode 100644 index 00000000..1a9cd6d0 --- /dev/null +++ b/qt6/webengine/gen_qwebengineurlrequestinterceptor.h @@ -0,0 +1,67 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINEURLREQUESTINTERCEPTOR_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINEURLREQUESTINTERCEPTOR_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; +class QMetaObject; +class QObject; +class QTimerEvent; +class QWebEngineUrlRequestInfo; +class QWebEngineUrlRequestInterceptor; +#else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; +typedef struct QWebEngineUrlRequestInfo QWebEngineUrlRequestInfo; +typedef struct QWebEngineUrlRequestInterceptor QWebEngineUrlRequestInterceptor; +#endif + +void QWebEngineUrlRequestInterceptor_new(QWebEngineUrlRequestInterceptor** outptr_QWebEngineUrlRequestInterceptor, QObject** outptr_QObject); +void QWebEngineUrlRequestInterceptor_new2(QObject* p, QWebEngineUrlRequestInterceptor** outptr_QWebEngineUrlRequestInterceptor, QObject** outptr_QObject); +QMetaObject* QWebEngineUrlRequestInterceptor_MetaObject(const QWebEngineUrlRequestInterceptor* self); +void* QWebEngineUrlRequestInterceptor_Metacast(QWebEngineUrlRequestInterceptor* self, const char* param1); +struct miqt_string QWebEngineUrlRequestInterceptor_Tr(const char* s); +void QWebEngineUrlRequestInterceptor_InterceptRequest(QWebEngineUrlRequestInterceptor* self, QWebEngineUrlRequestInfo* info); +struct miqt_string QWebEngineUrlRequestInterceptor_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineUrlRequestInterceptor_Tr3(const char* s, const char* c, int n); +void QWebEngineUrlRequestInterceptor_override_virtual_InterceptRequest(void* self, intptr_t slot); +void QWebEngineUrlRequestInterceptor_virtualbase_InterceptRequest(void* self, QWebEngineUrlRequestInfo* info); +void QWebEngineUrlRequestInterceptor_override_virtual_Event(void* self, intptr_t slot); +bool QWebEngineUrlRequestInterceptor_virtualbase_Event(void* self, QEvent* event); +void QWebEngineUrlRequestInterceptor_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWebEngineUrlRequestInterceptor_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QWebEngineUrlRequestInterceptor_override_virtual_TimerEvent(void* self, intptr_t slot); +void QWebEngineUrlRequestInterceptor_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QWebEngineUrlRequestInterceptor_override_virtual_ChildEvent(void* self, intptr_t slot); +void QWebEngineUrlRequestInterceptor_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QWebEngineUrlRequestInterceptor_override_virtual_CustomEvent(void* self, intptr_t slot); +void QWebEngineUrlRequestInterceptor_virtualbase_CustomEvent(void* self, QEvent* event); +void QWebEngineUrlRequestInterceptor_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QWebEngineUrlRequestInterceptor_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QWebEngineUrlRequestInterceptor_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QWebEngineUrlRequestInterceptor_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QWebEngineUrlRequestInterceptor_Delete(QWebEngineUrlRequestInterceptor* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebengineurlrequestjob.cpp b/qt6/webengine/gen_qwebengineurlrequestjob.cpp new file mode 100644 index 00000000..1b3d9650 --- /dev/null +++ b/qt6/webengine/gen_qwebengineurlrequestjob.cpp @@ -0,0 +1,92 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebengineurlrequestjob.h" +#include "_cgo_export.h" + +QMetaObject* QWebEngineUrlRequestJob_MetaObject(const QWebEngineUrlRequestJob* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineUrlRequestJob_Metacast(QWebEngineUrlRequestJob* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineUrlRequestJob_Tr(const char* s) { + QString _ret = QWebEngineUrlRequestJob::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QUrl* QWebEngineUrlRequestJob_RequestUrl(const QWebEngineUrlRequestJob* self) { + return new QUrl(self->requestUrl()); +} + +struct miqt_string QWebEngineUrlRequestJob_RequestMethod(const QWebEngineUrlRequestJob* self) { + QByteArray _qb = self->requestMethod(); + struct miqt_string _ms; + _ms.len = _qb.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _qb.data(), _ms.len); + return _ms; +} + +QUrl* QWebEngineUrlRequestJob_Initiator(const QWebEngineUrlRequestJob* self) { + return new QUrl(self->initiator()); +} + +void QWebEngineUrlRequestJob_Reply(QWebEngineUrlRequestJob* self, struct miqt_string contentType, QIODevice* device) { + QByteArray contentType_QByteArray(contentType.data, contentType.len); + self->reply(contentType_QByteArray, device); +} + +void QWebEngineUrlRequestJob_Fail(QWebEngineUrlRequestJob* self, int error) { + self->fail(static_cast(error)); +} + +void QWebEngineUrlRequestJob_Redirect(QWebEngineUrlRequestJob* self, QUrl* url) { + self->redirect(*url); +} + +struct miqt_string QWebEngineUrlRequestJob_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineUrlRequestJob::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineUrlRequestJob_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineUrlRequestJob::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineUrlRequestJob_Delete(QWebEngineUrlRequestJob* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebengineurlrequestjob.go b/qt6/webengine/gen_qwebengineurlrequestjob.go new file mode 100644 index 00000000..78f0b32a --- /dev/null +++ b/qt6/webengine/gen_qwebengineurlrequestjob.go @@ -0,0 +1,156 @@ +package webengine + +/* + +#include "gen_qwebengineurlrequestjob.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "unsafe" +) + +type QWebEngineUrlRequestJob__Error int + +const ( + QWebEngineUrlRequestJob__NoError QWebEngineUrlRequestJob__Error = 0 + QWebEngineUrlRequestJob__UrlNotFound QWebEngineUrlRequestJob__Error = 1 + QWebEngineUrlRequestJob__UrlInvalid QWebEngineUrlRequestJob__Error = 2 + QWebEngineUrlRequestJob__RequestAborted QWebEngineUrlRequestJob__Error = 3 + QWebEngineUrlRequestJob__RequestDenied QWebEngineUrlRequestJob__Error = 4 + QWebEngineUrlRequestJob__RequestFailed QWebEngineUrlRequestJob__Error = 5 +) + +type QWebEngineUrlRequestJob struct { + h *C.QWebEngineUrlRequestJob + isSubclass bool + *qt6.QObject +} + +func (this *QWebEngineUrlRequestJob) cPointer() *C.QWebEngineUrlRequestJob { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineUrlRequestJob) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineUrlRequestJob constructs the type using only CGO pointers. +func newQWebEngineUrlRequestJob(h *C.QWebEngineUrlRequestJob, h_QObject *C.QObject) *QWebEngineUrlRequestJob { + if h == nil { + return nil + } + return &QWebEngineUrlRequestJob{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEngineUrlRequestJob constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineUrlRequestJob(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineUrlRequestJob { + if h == nil { + return nil + } + + return &QWebEngineUrlRequestJob{h: (*C.QWebEngineUrlRequestJob)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} +} + +func (this *QWebEngineUrlRequestJob) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineUrlRequestJob_MetaObject(this.h))) +} + +func (this *QWebEngineUrlRequestJob) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineUrlRequestJob_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineUrlRequestJob_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlRequestJob_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineUrlRequestJob) RequestUrl() *qt6.QUrl { + _ret := C.QWebEngineUrlRequestJob_RequestUrl(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineUrlRequestJob) RequestMethod() []byte { + var _bytearray C.struct_miqt_string = C.QWebEngineUrlRequestJob_RequestMethod(this.h) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *QWebEngineUrlRequestJob) Initiator() *qt6.QUrl { + _ret := C.QWebEngineUrlRequestJob_Initiator(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineUrlRequestJob) Reply(contentType []byte, device *qt6.QIODevice) { + contentType_alias := C.struct_miqt_string{} + contentType_alias.data = (*C.char)(unsafe.Pointer(&contentType[0])) + contentType_alias.len = C.size_t(len(contentType)) + C.QWebEngineUrlRequestJob_Reply(this.h, contentType_alias, (*C.QIODevice)(device.UnsafePointer())) +} + +func (this *QWebEngineUrlRequestJob) Fail(error QWebEngineUrlRequestJob__Error) { + C.QWebEngineUrlRequestJob_Fail(this.h, (C.int)(error)) +} + +func (this *QWebEngineUrlRequestJob) Redirect(url *qt6.QUrl) { + C.QWebEngineUrlRequestJob_Redirect(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func QWebEngineUrlRequestJob_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlRequestJob_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineUrlRequestJob_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlRequestJob_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebEngineUrlRequestJob) Delete() { + C.QWebEngineUrlRequestJob_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineUrlRequestJob) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineUrlRequestJob) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebengineurlrequestjob.h b/qt6/webengine/gen_qwebengineurlrequestjob.h new file mode 100644 index 00000000..f1b916de --- /dev/null +++ b/qt6/webengine/gen_qwebengineurlrequestjob.h @@ -0,0 +1,48 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINEURLREQUESTJOB_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINEURLREQUESTJOB_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QIODevice; +class QMetaObject; +class QObject; +class QUrl; +class QWebEngineUrlRequestJob; +#else +typedef struct QIODevice QIODevice; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QUrl QUrl; +typedef struct QWebEngineUrlRequestJob QWebEngineUrlRequestJob; +#endif + +QMetaObject* QWebEngineUrlRequestJob_MetaObject(const QWebEngineUrlRequestJob* self); +void* QWebEngineUrlRequestJob_Metacast(QWebEngineUrlRequestJob* self, const char* param1); +struct miqt_string QWebEngineUrlRequestJob_Tr(const char* s); +QUrl* QWebEngineUrlRequestJob_RequestUrl(const QWebEngineUrlRequestJob* self); +struct miqt_string QWebEngineUrlRequestJob_RequestMethod(const QWebEngineUrlRequestJob* self); +QUrl* QWebEngineUrlRequestJob_Initiator(const QWebEngineUrlRequestJob* self); +void QWebEngineUrlRequestJob_Reply(QWebEngineUrlRequestJob* self, struct miqt_string contentType, QIODevice* device); +void QWebEngineUrlRequestJob_Fail(QWebEngineUrlRequestJob* self, int error); +void QWebEngineUrlRequestJob_Redirect(QWebEngineUrlRequestJob* self, QUrl* url); +struct miqt_string QWebEngineUrlRequestJob_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineUrlRequestJob_Tr3(const char* s, const char* c, int n); +void QWebEngineUrlRequestJob_Delete(QWebEngineUrlRequestJob* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebengineurlscheme.cpp b/qt6/webengine/gen_qwebengineurlscheme.cpp new file mode 100644 index 00000000..1d5852d8 --- /dev/null +++ b/qt6/webengine/gen_qwebengineurlscheme.cpp @@ -0,0 +1,91 @@ +#include +#include +#include +#include "gen_qwebengineurlscheme.h" +#include "_cgo_export.h" + +void QWebEngineUrlScheme_new(QWebEngineUrlScheme** outptr_QWebEngineUrlScheme) { + QWebEngineUrlScheme* ret = new QWebEngineUrlScheme(); + *outptr_QWebEngineUrlScheme = ret; +} + +void QWebEngineUrlScheme_new2(struct miqt_string name, QWebEngineUrlScheme** outptr_QWebEngineUrlScheme) { + QByteArray name_QByteArray(name.data, name.len); + QWebEngineUrlScheme* ret = new QWebEngineUrlScheme(name_QByteArray); + *outptr_QWebEngineUrlScheme = ret; +} + +void QWebEngineUrlScheme_new3(QWebEngineUrlScheme* that, QWebEngineUrlScheme** outptr_QWebEngineUrlScheme) { + QWebEngineUrlScheme* ret = new QWebEngineUrlScheme(*that); + *outptr_QWebEngineUrlScheme = ret; +} + +void QWebEngineUrlScheme_OperatorAssign(QWebEngineUrlScheme* self, QWebEngineUrlScheme* that) { + self->operator=(*that); +} + +bool QWebEngineUrlScheme_OperatorEqual(const QWebEngineUrlScheme* self, QWebEngineUrlScheme* that) { + return (*self == *that); +} + +bool QWebEngineUrlScheme_OperatorNotEqual(const QWebEngineUrlScheme* self, QWebEngineUrlScheme* that) { + return (*self != *that); +} + +struct miqt_string QWebEngineUrlScheme_Name(const QWebEngineUrlScheme* self) { + QByteArray _qb = self->name(); + struct miqt_string _ms; + _ms.len = _qb.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _qb.data(), _ms.len); + return _ms; +} + +void QWebEngineUrlScheme_SetName(QWebEngineUrlScheme* self, struct miqt_string newValue) { + QByteArray newValue_QByteArray(newValue.data, newValue.len); + self->setName(newValue_QByteArray); +} + +int QWebEngineUrlScheme_Syntax(const QWebEngineUrlScheme* self) { + QWebEngineUrlScheme::Syntax _ret = self->syntax(); + return static_cast(_ret); +} + +void QWebEngineUrlScheme_SetSyntax(QWebEngineUrlScheme* self, int newValue) { + self->setSyntax(static_cast(newValue)); +} + +int QWebEngineUrlScheme_DefaultPort(const QWebEngineUrlScheme* self) { + return self->defaultPort(); +} + +void QWebEngineUrlScheme_SetDefaultPort(QWebEngineUrlScheme* self, int newValue) { + self->setDefaultPort(static_cast(newValue)); +} + +int QWebEngineUrlScheme_Flags(const QWebEngineUrlScheme* self) { + QWebEngineUrlScheme::Flags _ret = self->flags(); + return static_cast(_ret); +} + +void QWebEngineUrlScheme_SetFlags(QWebEngineUrlScheme* self, int newValue) { + self->setFlags(static_cast(newValue)); +} + +void QWebEngineUrlScheme_RegisterScheme(QWebEngineUrlScheme* scheme) { + QWebEngineUrlScheme::registerScheme(*scheme); +} + +QWebEngineUrlScheme* QWebEngineUrlScheme_SchemeByName(struct miqt_string name) { + QByteArray name_QByteArray(name.data, name.len); + return new QWebEngineUrlScheme(QWebEngineUrlScheme::schemeByName(name_QByteArray)); +} + +void QWebEngineUrlScheme_Delete(QWebEngineUrlScheme* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebengineurlscheme.go b/qt6/webengine/gen_qwebengineurlscheme.go new file mode 100644 index 00000000..f42e34ae --- /dev/null +++ b/qt6/webengine/gen_qwebengineurlscheme.go @@ -0,0 +1,189 @@ +package webengine + +/* + +#include "gen_qwebengineurlscheme.h" +#include + +*/ +import "C" + +import ( + "runtime" + "unsafe" +) + +type QWebEngineUrlScheme__Syntax int + +const ( + QWebEngineUrlScheme__HostPortAndUserInformation QWebEngineUrlScheme__Syntax = 0 + QWebEngineUrlScheme__HostAndPort QWebEngineUrlScheme__Syntax = 1 + QWebEngineUrlScheme__Host QWebEngineUrlScheme__Syntax = 2 + QWebEngineUrlScheme__Path QWebEngineUrlScheme__Syntax = 3 +) + +type QWebEngineUrlScheme__SpecialPort int + +const ( + QWebEngineUrlScheme__PortUnspecified QWebEngineUrlScheme__SpecialPort = -1 +) + +type QWebEngineUrlScheme__Flag int + +const ( + QWebEngineUrlScheme__SecureScheme QWebEngineUrlScheme__Flag = 1 + QWebEngineUrlScheme__LocalScheme QWebEngineUrlScheme__Flag = 2 + QWebEngineUrlScheme__LocalAccessAllowed QWebEngineUrlScheme__Flag = 4 + QWebEngineUrlScheme__NoAccessAllowed QWebEngineUrlScheme__Flag = 8 + QWebEngineUrlScheme__ServiceWorkersAllowed QWebEngineUrlScheme__Flag = 16 + QWebEngineUrlScheme__ViewSourceAllowed QWebEngineUrlScheme__Flag = 32 + QWebEngineUrlScheme__ContentSecurityPolicyIgnored QWebEngineUrlScheme__Flag = 64 + QWebEngineUrlScheme__CorsEnabled QWebEngineUrlScheme__Flag = 128 +) + +type QWebEngineUrlScheme struct { + h *C.QWebEngineUrlScheme + isSubclass bool +} + +func (this *QWebEngineUrlScheme) cPointer() *C.QWebEngineUrlScheme { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineUrlScheme) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineUrlScheme constructs the type using only CGO pointers. +func newQWebEngineUrlScheme(h *C.QWebEngineUrlScheme) *QWebEngineUrlScheme { + if h == nil { + return nil + } + return &QWebEngineUrlScheme{h: h} +} + +// UnsafeNewQWebEngineUrlScheme constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineUrlScheme(h unsafe.Pointer) *QWebEngineUrlScheme { + if h == nil { + return nil + } + + return &QWebEngineUrlScheme{h: (*C.QWebEngineUrlScheme)(h)} +} + +// NewQWebEngineUrlScheme constructs a new QWebEngineUrlScheme object. +func NewQWebEngineUrlScheme() *QWebEngineUrlScheme { + var outptr_QWebEngineUrlScheme *C.QWebEngineUrlScheme = nil + + C.QWebEngineUrlScheme_new(&outptr_QWebEngineUrlScheme) + ret := newQWebEngineUrlScheme(outptr_QWebEngineUrlScheme) + ret.isSubclass = true + return ret +} + +// NewQWebEngineUrlScheme2 constructs a new QWebEngineUrlScheme object. +func NewQWebEngineUrlScheme2(name []byte) *QWebEngineUrlScheme { + name_alias := C.struct_miqt_string{} + name_alias.data = (*C.char)(unsafe.Pointer(&name[0])) + name_alias.len = C.size_t(len(name)) + var outptr_QWebEngineUrlScheme *C.QWebEngineUrlScheme = nil + + C.QWebEngineUrlScheme_new2(name_alias, &outptr_QWebEngineUrlScheme) + ret := newQWebEngineUrlScheme(outptr_QWebEngineUrlScheme) + ret.isSubclass = true + return ret +} + +// NewQWebEngineUrlScheme3 constructs a new QWebEngineUrlScheme object. +func NewQWebEngineUrlScheme3(that *QWebEngineUrlScheme) *QWebEngineUrlScheme { + var outptr_QWebEngineUrlScheme *C.QWebEngineUrlScheme = nil + + C.QWebEngineUrlScheme_new3(that.cPointer(), &outptr_QWebEngineUrlScheme) + ret := newQWebEngineUrlScheme(outptr_QWebEngineUrlScheme) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineUrlScheme) OperatorAssign(that *QWebEngineUrlScheme) { + C.QWebEngineUrlScheme_OperatorAssign(this.h, that.cPointer()) +} + +func (this *QWebEngineUrlScheme) OperatorEqual(that *QWebEngineUrlScheme) bool { + return (bool)(C.QWebEngineUrlScheme_OperatorEqual(this.h, that.cPointer())) +} + +func (this *QWebEngineUrlScheme) OperatorNotEqual(that *QWebEngineUrlScheme) bool { + return (bool)(C.QWebEngineUrlScheme_OperatorNotEqual(this.h, that.cPointer())) +} + +func (this *QWebEngineUrlScheme) Name() []byte { + var _bytearray C.struct_miqt_string = C.QWebEngineUrlScheme_Name(this.h) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} + +func (this *QWebEngineUrlScheme) SetName(newValue []byte) { + newValue_alias := C.struct_miqt_string{} + newValue_alias.data = (*C.char)(unsafe.Pointer(&newValue[0])) + newValue_alias.len = C.size_t(len(newValue)) + C.QWebEngineUrlScheme_SetName(this.h, newValue_alias) +} + +func (this *QWebEngineUrlScheme) Syntax() QWebEngineUrlScheme__Syntax { + return (QWebEngineUrlScheme__Syntax)(C.QWebEngineUrlScheme_Syntax(this.h)) +} + +func (this *QWebEngineUrlScheme) SetSyntax(newValue QWebEngineUrlScheme__Syntax) { + C.QWebEngineUrlScheme_SetSyntax(this.h, (C.int)(newValue)) +} + +func (this *QWebEngineUrlScheme) DefaultPort() int { + return (int)(C.QWebEngineUrlScheme_DefaultPort(this.h)) +} + +func (this *QWebEngineUrlScheme) SetDefaultPort(newValue int) { + C.QWebEngineUrlScheme_SetDefaultPort(this.h, (C.int)(newValue)) +} + +func (this *QWebEngineUrlScheme) Flags() QWebEngineUrlScheme__Flag { + return (QWebEngineUrlScheme__Flag)(C.QWebEngineUrlScheme_Flags(this.h)) +} + +func (this *QWebEngineUrlScheme) SetFlags(newValue QWebEngineUrlScheme__Flag) { + C.QWebEngineUrlScheme_SetFlags(this.h, (C.int)(newValue)) +} + +func QWebEngineUrlScheme_RegisterScheme(scheme *QWebEngineUrlScheme) { + C.QWebEngineUrlScheme_RegisterScheme(scheme.cPointer()) +} + +func QWebEngineUrlScheme_SchemeByName(name []byte) *QWebEngineUrlScheme { + name_alias := C.struct_miqt_string{} + name_alias.data = (*C.char)(unsafe.Pointer(&name[0])) + name_alias.len = C.size_t(len(name)) + _ret := C.QWebEngineUrlScheme_SchemeByName(name_alias) + _goptr := newQWebEngineUrlScheme(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +// Delete this object from C++ memory. +func (this *QWebEngineUrlScheme) Delete() { + C.QWebEngineUrlScheme_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineUrlScheme) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineUrlScheme) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebengineurlscheme.h b/qt6/webengine/gen_qwebengineurlscheme.h new file mode 100644 index 00000000..e981e95f --- /dev/null +++ b/qt6/webengine/gen_qwebengineurlscheme.h @@ -0,0 +1,45 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINEURLSCHEME_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINEURLSCHEME_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QWebEngineUrlScheme; +#else +typedef struct QWebEngineUrlScheme QWebEngineUrlScheme; +#endif + +void QWebEngineUrlScheme_new(QWebEngineUrlScheme** outptr_QWebEngineUrlScheme); +void QWebEngineUrlScheme_new2(struct miqt_string name, QWebEngineUrlScheme** outptr_QWebEngineUrlScheme); +void QWebEngineUrlScheme_new3(QWebEngineUrlScheme* that, QWebEngineUrlScheme** outptr_QWebEngineUrlScheme); +void QWebEngineUrlScheme_OperatorAssign(QWebEngineUrlScheme* self, QWebEngineUrlScheme* that); +bool QWebEngineUrlScheme_OperatorEqual(const QWebEngineUrlScheme* self, QWebEngineUrlScheme* that); +bool QWebEngineUrlScheme_OperatorNotEqual(const QWebEngineUrlScheme* self, QWebEngineUrlScheme* that); +struct miqt_string QWebEngineUrlScheme_Name(const QWebEngineUrlScheme* self); +void QWebEngineUrlScheme_SetName(QWebEngineUrlScheme* self, struct miqt_string newValue); +int QWebEngineUrlScheme_Syntax(const QWebEngineUrlScheme* self); +void QWebEngineUrlScheme_SetSyntax(QWebEngineUrlScheme* self, int newValue); +int QWebEngineUrlScheme_DefaultPort(const QWebEngineUrlScheme* self); +void QWebEngineUrlScheme_SetDefaultPort(QWebEngineUrlScheme* self, int newValue); +int QWebEngineUrlScheme_Flags(const QWebEngineUrlScheme* self); +void QWebEngineUrlScheme_SetFlags(QWebEngineUrlScheme* self, int newValue); +void QWebEngineUrlScheme_RegisterScheme(QWebEngineUrlScheme* scheme); +QWebEngineUrlScheme* QWebEngineUrlScheme_SchemeByName(struct miqt_string name); +void QWebEngineUrlScheme_Delete(QWebEngineUrlScheme* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebengineurlschemehandler.cpp b/qt6/webengine/gen_qwebengineurlschemehandler.cpp new file mode 100644 index 00000000..388cbd8f --- /dev/null +++ b/qt6/webengine/gen_qwebengineurlschemehandler.cpp @@ -0,0 +1,337 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebengineurlschemehandler.h" +#include "_cgo_export.h" + +class MiqtVirtualQWebEngineUrlSchemeHandler : public virtual QWebEngineUrlSchemeHandler { +public: + + MiqtVirtualQWebEngineUrlSchemeHandler(): QWebEngineUrlSchemeHandler() {}; + MiqtVirtualQWebEngineUrlSchemeHandler(QObject* parent): QWebEngineUrlSchemeHandler(parent) {}; + + virtual ~MiqtVirtualQWebEngineUrlSchemeHandler() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__RequestStarted = 0; + + // Subclass to allow providing a Go implementation + virtual void requestStarted(QWebEngineUrlRequestJob* param1) override { + if (handle__RequestStarted == 0) { + return; // Pure virtual, there is no base we can call + } + + QWebEngineUrlRequestJob* sigval1 = param1; + + miqt_exec_callback_QWebEngineUrlSchemeHandler_RequestStarted(this, handle__RequestStarted, sigval1); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QWebEngineUrlSchemeHandler::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QWebEngineUrlSchemeHandler_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QWebEngineUrlSchemeHandler::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QWebEngineUrlSchemeHandler::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QWebEngineUrlSchemeHandler_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QWebEngineUrlSchemeHandler::eventFilter(watched, event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TimerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__TimerEvent == 0) { + QWebEngineUrlSchemeHandler::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineUrlSchemeHandler_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QWebEngineUrlSchemeHandler::timerEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChildEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__ChildEvent == 0) { + QWebEngineUrlSchemeHandler::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineUrlSchemeHandler_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QWebEngineUrlSchemeHandler::childEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CustomEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__CustomEvent == 0) { + QWebEngineUrlSchemeHandler::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineUrlSchemeHandler_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QWebEngineUrlSchemeHandler::customEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ConnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__ConnectNotify == 0) { + QWebEngineUrlSchemeHandler::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebEngineUrlSchemeHandler_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QWebEngineUrlSchemeHandler::connectNotify(*signal); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DisconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__DisconnectNotify == 0) { + QWebEngineUrlSchemeHandler::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebEngineUrlSchemeHandler_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QWebEngineUrlSchemeHandler::disconnectNotify(*signal); + + } + +}; + +void QWebEngineUrlSchemeHandler_new(QWebEngineUrlSchemeHandler** outptr_QWebEngineUrlSchemeHandler, QObject** outptr_QObject) { + MiqtVirtualQWebEngineUrlSchemeHandler* ret = new MiqtVirtualQWebEngineUrlSchemeHandler(); + *outptr_QWebEngineUrlSchemeHandler = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebEngineUrlSchemeHandler_new2(QObject* parent, QWebEngineUrlSchemeHandler** outptr_QWebEngineUrlSchemeHandler, QObject** outptr_QObject) { + MiqtVirtualQWebEngineUrlSchemeHandler* ret = new MiqtVirtualQWebEngineUrlSchemeHandler(parent); + *outptr_QWebEngineUrlSchemeHandler = ret; + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QWebEngineUrlSchemeHandler_MetaObject(const QWebEngineUrlSchemeHandler* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineUrlSchemeHandler_Metacast(QWebEngineUrlSchemeHandler* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineUrlSchemeHandler_Tr(const char* s) { + QString _ret = QWebEngineUrlSchemeHandler::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineUrlSchemeHandler_RequestStarted(QWebEngineUrlSchemeHandler* self, QWebEngineUrlRequestJob* param1) { + self->requestStarted(param1); +} + +struct miqt_string QWebEngineUrlSchemeHandler_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineUrlSchemeHandler::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineUrlSchemeHandler_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineUrlSchemeHandler::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineUrlSchemeHandler_override_virtual_RequestStarted(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlSchemeHandler*)(self) )->handle__RequestStarted = slot; +} + +void QWebEngineUrlSchemeHandler_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlSchemeHandler*)(self) )->handle__Event = slot; +} + +bool QWebEngineUrlSchemeHandler_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQWebEngineUrlSchemeHandler*)(self) )->virtualbase_Event(event); +} + +void QWebEngineUrlSchemeHandler_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlSchemeHandler*)(self) )->handle__EventFilter = slot; +} + +bool QWebEngineUrlSchemeHandler_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQWebEngineUrlSchemeHandler*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QWebEngineUrlSchemeHandler_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlSchemeHandler*)(self) )->handle__TimerEvent = slot; +} + +void QWebEngineUrlSchemeHandler_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQWebEngineUrlSchemeHandler*)(self) )->virtualbase_TimerEvent(event); +} + +void QWebEngineUrlSchemeHandler_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlSchemeHandler*)(self) )->handle__ChildEvent = slot; +} + +void QWebEngineUrlSchemeHandler_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQWebEngineUrlSchemeHandler*)(self) )->virtualbase_ChildEvent(event); +} + +void QWebEngineUrlSchemeHandler_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlSchemeHandler*)(self) )->handle__CustomEvent = slot; +} + +void QWebEngineUrlSchemeHandler_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebEngineUrlSchemeHandler*)(self) )->virtualbase_CustomEvent(event); +} + +void QWebEngineUrlSchemeHandler_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlSchemeHandler*)(self) )->handle__ConnectNotify = slot; +} + +void QWebEngineUrlSchemeHandler_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebEngineUrlSchemeHandler*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QWebEngineUrlSchemeHandler_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineUrlSchemeHandler*)(self) )->handle__DisconnectNotify = slot; +} + +void QWebEngineUrlSchemeHandler_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebEngineUrlSchemeHandler*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QWebEngineUrlSchemeHandler_Delete(QWebEngineUrlSchemeHandler* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebengineurlschemehandler.go b/qt6/webengine/gen_qwebengineurlschemehandler.go new file mode 100644 index 00000000..19d80340 --- /dev/null +++ b/qt6/webengine/gen_qwebengineurlschemehandler.go @@ -0,0 +1,319 @@ +package webengine + +/* + +#include "gen_qwebengineurlschemehandler.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebEngineUrlSchemeHandler struct { + h *C.QWebEngineUrlSchemeHandler + isSubclass bool + *qt6.QObject +} + +func (this *QWebEngineUrlSchemeHandler) cPointer() *C.QWebEngineUrlSchemeHandler { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineUrlSchemeHandler) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineUrlSchemeHandler constructs the type using only CGO pointers. +func newQWebEngineUrlSchemeHandler(h *C.QWebEngineUrlSchemeHandler, h_QObject *C.QObject) *QWebEngineUrlSchemeHandler { + if h == nil { + return nil + } + return &QWebEngineUrlSchemeHandler{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebEngineUrlSchemeHandler constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineUrlSchemeHandler(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineUrlSchemeHandler { + if h == nil { + return nil + } + + return &QWebEngineUrlSchemeHandler{h: (*C.QWebEngineUrlSchemeHandler)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} +} + +// NewQWebEngineUrlSchemeHandler constructs a new QWebEngineUrlSchemeHandler object. +func NewQWebEngineUrlSchemeHandler() *QWebEngineUrlSchemeHandler { + var outptr_QWebEngineUrlSchemeHandler *C.QWebEngineUrlSchemeHandler = nil + var outptr_QObject *C.QObject = nil + + C.QWebEngineUrlSchemeHandler_new(&outptr_QWebEngineUrlSchemeHandler, &outptr_QObject) + ret := newQWebEngineUrlSchemeHandler(outptr_QWebEngineUrlSchemeHandler, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebEngineUrlSchemeHandler2 constructs a new QWebEngineUrlSchemeHandler object. +func NewQWebEngineUrlSchemeHandler2(parent *qt6.QObject) *QWebEngineUrlSchemeHandler { + var outptr_QWebEngineUrlSchemeHandler *C.QWebEngineUrlSchemeHandler = nil + var outptr_QObject *C.QObject = nil + + C.QWebEngineUrlSchemeHandler_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QWebEngineUrlSchemeHandler, &outptr_QObject) + ret := newQWebEngineUrlSchemeHandler(outptr_QWebEngineUrlSchemeHandler, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineUrlSchemeHandler) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineUrlSchemeHandler_MetaObject(this.h))) +} + +func (this *QWebEngineUrlSchemeHandler) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineUrlSchemeHandler_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineUrlSchemeHandler_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlSchemeHandler_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineUrlSchemeHandler) RequestStarted(param1 *QWebEngineUrlRequestJob) { + C.QWebEngineUrlSchemeHandler_RequestStarted(this.h, param1.cPointer()) +} + +func QWebEngineUrlSchemeHandler_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlSchemeHandler_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineUrlSchemeHandler_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineUrlSchemeHandler_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QWebEngineUrlSchemeHandler) OnRequestStarted(slot func(param1 *QWebEngineUrlRequestJob)) { + C.QWebEngineUrlSchemeHandler_override_virtual_RequestStarted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlSchemeHandler_RequestStarted +func miqt_exec_callback_QWebEngineUrlSchemeHandler_RequestStarted(self *C.QWebEngineUrlSchemeHandler, cb C.intptr_t, param1 *C.QWebEngineUrlRequestJob) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 *QWebEngineUrlRequestJob)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebEngineUrlRequestJob(unsafe.Pointer(param1), nil) + + gofunc(slotval1) + +} + +func (this *QWebEngineUrlSchemeHandler) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QWebEngineUrlSchemeHandler_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebEngineUrlSchemeHandler) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QWebEngineUrlSchemeHandler_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlSchemeHandler_Event +func miqt_exec_callback_QWebEngineUrlSchemeHandler_Event(self *C.QWebEngineUrlSchemeHandler, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebEngineUrlSchemeHandler{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEngineUrlSchemeHandler) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QWebEngineUrlSchemeHandler_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebEngineUrlSchemeHandler) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QWebEngineUrlSchemeHandler_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlSchemeHandler_EventFilter +func miqt_exec_callback_QWebEngineUrlSchemeHandler_EventFilter(self *C.QWebEngineUrlSchemeHandler, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QWebEngineUrlSchemeHandler{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEngineUrlSchemeHandler) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QWebEngineUrlSchemeHandler_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineUrlSchemeHandler) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QWebEngineUrlSchemeHandler_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlSchemeHandler_TimerEvent +func miqt_exec_callback_QWebEngineUrlSchemeHandler_TimerEvent(self *C.QWebEngineUrlSchemeHandler, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineUrlSchemeHandler{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QWebEngineUrlSchemeHandler) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QWebEngineUrlSchemeHandler_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineUrlSchemeHandler) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QWebEngineUrlSchemeHandler_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlSchemeHandler_ChildEvent +func miqt_exec_callback_QWebEngineUrlSchemeHandler_ChildEvent(self *C.QWebEngineUrlSchemeHandler, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineUrlSchemeHandler{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QWebEngineUrlSchemeHandler) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QWebEngineUrlSchemeHandler_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineUrlSchemeHandler) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QWebEngineUrlSchemeHandler_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlSchemeHandler_CustomEvent +func miqt_exec_callback_QWebEngineUrlSchemeHandler_CustomEvent(self *C.QWebEngineUrlSchemeHandler, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWebEngineUrlSchemeHandler{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QWebEngineUrlSchemeHandler) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QWebEngineUrlSchemeHandler_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebEngineUrlSchemeHandler) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QWebEngineUrlSchemeHandler_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlSchemeHandler_ConnectNotify +func miqt_exec_callback_QWebEngineUrlSchemeHandler_ConnectNotify(self *C.QWebEngineUrlSchemeHandler, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebEngineUrlSchemeHandler{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QWebEngineUrlSchemeHandler) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QWebEngineUrlSchemeHandler_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebEngineUrlSchemeHandler) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QWebEngineUrlSchemeHandler_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineUrlSchemeHandler_DisconnectNotify +func miqt_exec_callback_QWebEngineUrlSchemeHandler_DisconnectNotify(self *C.QWebEngineUrlSchemeHandler, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QWebEngineUrlSchemeHandler{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QWebEngineUrlSchemeHandler) Delete() { + C.QWebEngineUrlSchemeHandler_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineUrlSchemeHandler) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineUrlSchemeHandler) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebengineurlschemehandler.h b/qt6/webengine/gen_qwebengineurlschemehandler.h new file mode 100644 index 00000000..05af19bf --- /dev/null +++ b/qt6/webengine/gen_qwebengineurlschemehandler.h @@ -0,0 +1,67 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINEURLSCHEMEHANDLER_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINEURLSCHEMEHANDLER_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; +class QMetaObject; +class QObject; +class QTimerEvent; +class QWebEngineUrlRequestJob; +class QWebEngineUrlSchemeHandler; +#else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; +typedef struct QWebEngineUrlRequestJob QWebEngineUrlRequestJob; +typedef struct QWebEngineUrlSchemeHandler QWebEngineUrlSchemeHandler; +#endif + +void QWebEngineUrlSchemeHandler_new(QWebEngineUrlSchemeHandler** outptr_QWebEngineUrlSchemeHandler, QObject** outptr_QObject); +void QWebEngineUrlSchemeHandler_new2(QObject* parent, QWebEngineUrlSchemeHandler** outptr_QWebEngineUrlSchemeHandler, QObject** outptr_QObject); +QMetaObject* QWebEngineUrlSchemeHandler_MetaObject(const QWebEngineUrlSchemeHandler* self); +void* QWebEngineUrlSchemeHandler_Metacast(QWebEngineUrlSchemeHandler* self, const char* param1); +struct miqt_string QWebEngineUrlSchemeHandler_Tr(const char* s); +void QWebEngineUrlSchemeHandler_RequestStarted(QWebEngineUrlSchemeHandler* self, QWebEngineUrlRequestJob* param1); +struct miqt_string QWebEngineUrlSchemeHandler_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineUrlSchemeHandler_Tr3(const char* s, const char* c, int n); +void QWebEngineUrlSchemeHandler_override_virtual_RequestStarted(void* self, intptr_t slot); +void QWebEngineUrlSchemeHandler_virtualbase_RequestStarted(void* self, QWebEngineUrlRequestJob* param1); +void QWebEngineUrlSchemeHandler_override_virtual_Event(void* self, intptr_t slot); +bool QWebEngineUrlSchemeHandler_virtualbase_Event(void* self, QEvent* event); +void QWebEngineUrlSchemeHandler_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWebEngineUrlSchemeHandler_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QWebEngineUrlSchemeHandler_override_virtual_TimerEvent(void* self, intptr_t slot); +void QWebEngineUrlSchemeHandler_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QWebEngineUrlSchemeHandler_override_virtual_ChildEvent(void* self, intptr_t slot); +void QWebEngineUrlSchemeHandler_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QWebEngineUrlSchemeHandler_override_virtual_CustomEvent(void* self, intptr_t slot); +void QWebEngineUrlSchemeHandler_virtualbase_CustomEvent(void* self, QEvent* event); +void QWebEngineUrlSchemeHandler_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QWebEngineUrlSchemeHandler_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QWebEngineUrlSchemeHandler_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QWebEngineUrlSchemeHandler_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QWebEngineUrlSchemeHandler_Delete(QWebEngineUrlSchemeHandler* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/webengine/gen_qwebengineview.cpp b/qt6/webengine/gen_qwebengineview.cpp new file mode 100644 index 00000000..77cd41cc --- /dev/null +++ b/qt6/webengine/gen_qwebengineview.cpp @@ -0,0 +1,1817 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebengineview.h" +#include "_cgo_export.h" + +class MiqtVirtualQWebEngineView : public virtual QWebEngineView { +public: + + MiqtVirtualQWebEngineView(QWidget* parent): QWebEngineView(parent) {}; + MiqtVirtualQWebEngineView(): QWebEngineView() {}; + MiqtVirtualQWebEngineView(QWebEngineProfile* profile): QWebEngineView(profile) {}; + MiqtVirtualQWebEngineView(QWebEnginePage* page): QWebEngineView(page) {}; + MiqtVirtualQWebEngineView(QWebEngineProfile* profile, QWidget* parent): QWebEngineView(profile, parent) {}; + MiqtVirtualQWebEngineView(QWebEnginePage* page, QWidget* parent): QWebEngineView(page, parent) {}; + + virtual ~MiqtVirtualQWebEngineView() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__SizeHint == 0) { + return QWebEngineView::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWebEngineView_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QWebEngineView::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateWindow = 0; + + // Subclass to allow providing a Go implementation + virtual QWebEngineView* createWindow(QWebEnginePage::WebWindowType typeVal) override { + if (handle__CreateWindow == 0) { + return QWebEngineView::createWindow(typeVal); + } + + QWebEnginePage::WebWindowType typeVal_ret = typeVal; + int sigval1 = static_cast(typeVal_ret); + + QWebEngineView* callback_return_value = miqt_exec_callback_QWebEngineView_CreateWindow(this, handle__CreateWindow, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWebEngineView* virtualbase_CreateWindow(int typeVal) { + + return QWebEngineView::createWindow(static_cast(typeVal)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QWebEngineView::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QWebEngineView_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QWebEngineView::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QWebEngineView::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QWebEngineView_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QWebEngineView::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* param1) override { + if (handle__ShowEvent == 0) { + QWebEngineView::showEvent(param1); + return; + } + + QShowEvent* sigval1 = param1; + + miqt_exec_callback_QWebEngineView_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* param1) { + + QWebEngineView::showEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* param1) override { + if (handle__HideEvent == 0) { + QWebEngineView::hideEvent(param1); + return; + } + + QHideEvent* sigval1 = param1; + + miqt_exec_callback_QWebEngineView_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* param1) { + + QWebEngineView::hideEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* param1) override { + if (handle__CloseEvent == 0) { + QWebEngineView::closeEvent(param1); + return; + } + + QCloseEvent* sigval1 = param1; + + miqt_exec_callback_QWebEngineView_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* param1) { + + QWebEngineView::closeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* e) override { + if (handle__DragEnterEvent == 0) { + QWebEngineView::dragEnterEvent(e); + return; + } + + QDragEnterEvent* sigval1 = e; + + miqt_exec_callback_QWebEngineView_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* e) { + + QWebEngineView::dragEnterEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* e) override { + if (handle__DragLeaveEvent == 0) { + QWebEngineView::dragLeaveEvent(e); + return; + } + + QDragLeaveEvent* sigval1 = e; + + miqt_exec_callback_QWebEngineView_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* e) { + + QWebEngineView::dragLeaveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* e) override { + if (handle__DragMoveEvent == 0) { + QWebEngineView::dragMoveEvent(e); + return; + } + + QDragMoveEvent* sigval1 = e; + + miqt_exec_callback_QWebEngineView_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* e) { + + QWebEngineView::dragMoveEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* e) override { + if (handle__DropEvent == 0) { + QWebEngineView::dropEvent(e); + return; + } + + QDropEvent* sigval1 = e; + + miqt_exec_callback_QWebEngineView_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* e) { + + QWebEngineView::dropEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QWebEngineView::devType(); + } + + + int callback_return_value = miqt_exec_callback_QWebEngineView_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QWebEngineView::devType(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__SetVisible == 0) { + QWebEngineView::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QWebEngineView_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QWebEngineView::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QWebEngineView::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWebEngineView_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QWebEngineView::minimumSizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__HeightForWidth == 0) { + return QWebEngineView::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QWebEngineView_HeightForWidth(const_cast(this), handle__HeightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_HeightForWidth(int param1) const { + + return QWebEngineView::heightForWidth(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__HasHeightForWidth == 0) { + return QWebEngineView::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QWebEngineView_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QWebEngineView::hasHeightForWidth(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__PaintEngine == 0) { + return QWebEngineView::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QWebEngineView_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QWebEngineView::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QWebEngineView::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QWebEngineView::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QWebEngineView::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QWebEngineView::mouseReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* event) override { + if (handle__MouseDoubleClickEvent == 0) { + QWebEngineView::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QWebEngineView::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QWebEngineView::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QWebEngineView::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QWebEngineView::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QWebEngineView::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QWebEngineView::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QWebEngineView::keyPressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__KeyReleaseEvent == 0) { + QWebEngineView::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QWebEngineView::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QWebEngineView::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QWebEngineView::focusInEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__FocusOutEvent == 0) { + QWebEngineView::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QWebEngineView::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QWebEngineView::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QWebEngineView::enterEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__LeaveEvent == 0) { + QWebEngineView::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QWebEngineView::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QWebEngineView::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QWebEngineView::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QWebEngineView::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QWebEngineView::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QWebEngineView::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QWebEngineView::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QWebEngineView::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QWebEngineView::tabletEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__ActionEvent == 0) { + QWebEngineView::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QWebEngineView_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QWebEngineView::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEvent == 0) { + return QWebEngineView::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = (intptr_t*)(result_ret); + + bool callback_return_value = miqt_exec_callback_QWebEngineView_NativeEvent(this, handle__NativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_NativeEvent(struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return QWebEngineView::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QWebEngineView::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QWebEngineView_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QWebEngineView::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QWebEngineView::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QWebEngineView_Metric(const_cast(this), handle__Metric, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Metric(int param1) const { + + return QWebEngineView::metric(static_cast(param1)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__InitPainter == 0) { + QWebEngineView::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QWebEngineView_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QWebEngineView::initPainter(painter); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__Redirected == 0) { + return QWebEngineView::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QWebEngineView_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QWebEngineView::redirected(offset); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__SharedPainter == 0) { + return QWebEngineView::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QWebEngineView_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QWebEngineView::sharedPainter(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QWebEngineView::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QWebEngineView_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QWebEngineView::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__InputMethodQuery == 0) { + return QWebEngineView::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QWebEngineView_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int param1) const { + + return new QVariant(QWebEngineView::inputMethodQuery(static_cast(param1))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QWebEngineView::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QWebEngineView_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QWebEngineView::focusNextPrevChild(next); + + } + +}; + +void QWebEngineView_new(QWidget* parent, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWebEngineView* ret = new MiqtVirtualQWebEngineView(parent); + *outptr_QWebEngineView = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QWebEngineView_new2(QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWebEngineView* ret = new MiqtVirtualQWebEngineView(); + *outptr_QWebEngineView = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QWebEngineView_new3(QWebEngineProfile* profile, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWebEngineView* ret = new MiqtVirtualQWebEngineView(profile); + *outptr_QWebEngineView = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QWebEngineView_new4(QWebEnginePage* page, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWebEngineView* ret = new MiqtVirtualQWebEngineView(page); + *outptr_QWebEngineView = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QWebEngineView_new5(QWebEngineProfile* profile, QWidget* parent, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWebEngineView* ret = new MiqtVirtualQWebEngineView(profile, parent); + *outptr_QWebEngineView = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QWebEngineView_new6(QWebEnginePage* page, QWidget* parent, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWebEngineView* ret = new MiqtVirtualQWebEngineView(page, parent); + *outptr_QWebEngineView = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QWebEngineView_MetaObject(const QWebEngineView* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebEngineView_Metacast(QWebEngineView* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebEngineView_Tr(const char* s) { + QString _ret = QWebEngineView::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QWebEngineView* QWebEngineView_ForPage(QWebEnginePage* page) { + return QWebEngineView::forPage(page); +} + +QWebEnginePage* QWebEngineView_Page(const QWebEngineView* self) { + return self->page(); +} + +void QWebEngineView_SetPage(QWebEngineView* self, QWebEnginePage* page) { + self->setPage(page); +} + +void QWebEngineView_Load(QWebEngineView* self, QUrl* url) { + self->load(*url); +} + +void QWebEngineView_LoadWithRequest(QWebEngineView* self, QWebEngineHttpRequest* request) { + self->load(*request); +} + +void QWebEngineView_SetHtml(QWebEngineView* self, struct miqt_string html) { + QString html_QString = QString::fromUtf8(html.data, html.len); + self->setHtml(html_QString); +} + +void QWebEngineView_SetContent(QWebEngineView* self, struct miqt_string data) { + QByteArray data_QByteArray(data.data, data.len); + self->setContent(data_QByteArray); +} + +QWebEngineHistory* QWebEngineView_History(const QWebEngineView* self) { + return self->history(); +} + +struct miqt_string QWebEngineView_Title(const QWebEngineView* self) { + QString _ret = self->title(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineView_SetUrl(QWebEngineView* self, QUrl* url) { + self->setUrl(*url); +} + +QUrl* QWebEngineView_Url(const QWebEngineView* self) { + return new QUrl(self->url()); +} + +QUrl* QWebEngineView_IconUrl(const QWebEngineView* self) { + return new QUrl(self->iconUrl()); +} + +QIcon* QWebEngineView_Icon(const QWebEngineView* self) { + return new QIcon(self->icon()); +} + +bool QWebEngineView_HasSelection(const QWebEngineView* self) { + return self->hasSelection(); +} + +struct miqt_string QWebEngineView_SelectedText(const QWebEngineView* self) { + QString _ret = self->selectedText(); + // 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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QAction* QWebEngineView_PageAction(const QWebEngineView* self, int action) { + return self->pageAction(static_cast(action)); +} + +void QWebEngineView_TriggerPageAction(QWebEngineView* self, int action) { + self->triggerPageAction(static_cast(action)); +} + +double QWebEngineView_ZoomFactor(const QWebEngineView* self) { + qreal _ret = self->zoomFactor(); + return static_cast(_ret); +} + +void QWebEngineView_SetZoomFactor(QWebEngineView* self, double factor) { + self->setZoomFactor(static_cast(factor)); +} + +QSize* QWebEngineView_SizeHint(const QWebEngineView* self) { + return new QSize(self->sizeHint()); +} + +QWebEngineSettings* QWebEngineView_Settings(const QWebEngineView* self) { + return self->settings(); +} + +QMenu* QWebEngineView_CreateStandardContextMenu(QWebEngineView* self) { + return self->createStandardContextMenu(); +} + +QWebEngineContextMenuRequest* QWebEngineView_LastContextMenuRequest(const QWebEngineView* self) { + return self->lastContextMenuRequest(); +} + +void QWebEngineView_PrintToPdf(QWebEngineView* self, struct miqt_string filePath) { + QString filePath_QString = QString::fromUtf8(filePath.data, filePath.len); + self->printToPdf(filePath_QString); +} + +void QWebEngineView_Print(QWebEngineView* self, QPrinter* printer) { + self->print(printer); +} + +void QWebEngineView_Stop(QWebEngineView* self) { + self->stop(); +} + +void QWebEngineView_Back(QWebEngineView* self) { + self->back(); +} + +void QWebEngineView_Forward(QWebEngineView* self) { + self->forward(); +} + +void QWebEngineView_Reload(QWebEngineView* self) { + self->reload(); +} + +void QWebEngineView_LoadStarted(QWebEngineView* self) { + self->loadStarted(); +} + +void QWebEngineView_connect_LoadStarted(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::loadStarted), self, [=]() { + miqt_exec_callback_QWebEngineView_LoadStarted(slot); + }); +} + +void QWebEngineView_LoadProgress(QWebEngineView* self, int progress) { + self->loadProgress(static_cast(progress)); +} + +void QWebEngineView_connect_LoadProgress(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::loadProgress), self, [=](int progress) { + int sigval1 = progress; + miqt_exec_callback_QWebEngineView_LoadProgress(slot, sigval1); + }); +} + +void QWebEngineView_LoadFinished(QWebEngineView* self, bool param1) { + self->loadFinished(param1); +} + +void QWebEngineView_connect_LoadFinished(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::loadFinished), self, [=](bool param1) { + bool sigval1 = param1; + miqt_exec_callback_QWebEngineView_LoadFinished(slot, sigval1); + }); +} + +void QWebEngineView_TitleChanged(QWebEngineView* self, struct miqt_string title) { + QString title_QString = QString::fromUtf8(title.data, title.len); + self->titleChanged(title_QString); +} + +void QWebEngineView_connect_TitleChanged(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::titleChanged), self, [=](const QString& title) { + const QString title_ret = title; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray title_b = title_ret.toUtf8(); + struct miqt_string title_ms; + title_ms.len = title_b.length(); + title_ms.data = static_cast(malloc(title_ms.len)); + memcpy(title_ms.data, title_b.data(), title_ms.len); + struct miqt_string sigval1 = title_ms; + miqt_exec_callback_QWebEngineView_TitleChanged(slot, sigval1); + }); +} + +void QWebEngineView_SelectionChanged(QWebEngineView* self) { + self->selectionChanged(); +} + +void QWebEngineView_connect_SelectionChanged(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::selectionChanged), self, [=]() { + miqt_exec_callback_QWebEngineView_SelectionChanged(slot); + }); +} + +void QWebEngineView_UrlChanged(QWebEngineView* self, QUrl* param1) { + self->urlChanged(*param1); +} + +void QWebEngineView_connect_UrlChanged(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::urlChanged), self, [=](const QUrl& param1) { + const QUrl& param1_ret = param1; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(¶m1_ret); + miqt_exec_callback_QWebEngineView_UrlChanged(slot, sigval1); + }); +} + +void QWebEngineView_IconUrlChanged(QWebEngineView* self, QUrl* param1) { + self->iconUrlChanged(*param1); +} + +void QWebEngineView_connect_IconUrlChanged(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::iconUrlChanged), self, [=](const QUrl& param1) { + const QUrl& param1_ret = param1; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(¶m1_ret); + miqt_exec_callback_QWebEngineView_IconUrlChanged(slot, sigval1); + }); +} + +void QWebEngineView_IconChanged(QWebEngineView* self, QIcon* param1) { + self->iconChanged(*param1); +} + +void QWebEngineView_connect_IconChanged(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::iconChanged), self, [=](const QIcon& param1) { + const QIcon& param1_ret = param1; + // Cast returned reference into pointer + QIcon* sigval1 = const_cast(¶m1_ret); + miqt_exec_callback_QWebEngineView_IconChanged(slot, sigval1); + }); +} + +void QWebEngineView_RenderProcessTerminated(QWebEngineView* self, int terminationStatus, int exitCode) { + self->renderProcessTerminated(static_cast(terminationStatus), static_cast(exitCode)); +} + +void QWebEngineView_connect_RenderProcessTerminated(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::renderProcessTerminated), self, [=](QWebEnginePage::RenderProcessTerminationStatus terminationStatus, int exitCode) { + QWebEnginePage::RenderProcessTerminationStatus terminationStatus_ret = terminationStatus; + int sigval1 = static_cast(terminationStatus_ret); + int sigval2 = exitCode; + miqt_exec_callback_QWebEngineView_RenderProcessTerminated(slot, sigval1, sigval2); + }); +} + +void QWebEngineView_PdfPrintingFinished(QWebEngineView* self, struct miqt_string filePath, bool success) { + QString filePath_QString = QString::fromUtf8(filePath.data, filePath.len); + self->pdfPrintingFinished(filePath_QString, success); +} + +void QWebEngineView_connect_PdfPrintingFinished(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::pdfPrintingFinished), self, [=](const QString& filePath, bool success) { + const QString filePath_ret = filePath; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray filePath_b = filePath_ret.toUtf8(); + struct miqt_string filePath_ms; + filePath_ms.len = filePath_b.length(); + filePath_ms.data = static_cast(malloc(filePath_ms.len)); + memcpy(filePath_ms.data, filePath_b.data(), filePath_ms.len); + struct miqt_string sigval1 = filePath_ms; + bool sigval2 = success; + miqt_exec_callback_QWebEngineView_PdfPrintingFinished(slot, sigval1, sigval2); + }); +} + +void QWebEngineView_PrintRequested(QWebEngineView* self) { + self->printRequested(); +} + +void QWebEngineView_connect_PrintRequested(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::printRequested), self, [=]() { + miqt_exec_callback_QWebEngineView_PrintRequested(slot); + }); +} + +void QWebEngineView_PrintFinished(QWebEngineView* self, bool success) { + self->printFinished(success); +} + +void QWebEngineView_connect_PrintFinished(QWebEngineView* self, intptr_t slot) { + MiqtVirtualQWebEngineView::connect(self, static_cast(&QWebEngineView::printFinished), self, [=](bool success) { + bool sigval1 = success; + miqt_exec_callback_QWebEngineView_PrintFinished(slot, sigval1); + }); +} + +struct miqt_string QWebEngineView_Tr2(const char* s, const char* c) { + QString _ret = QWebEngineView::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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebEngineView_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebEngineView::tr(s, c, static_cast(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(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebEngineView_SetHtml2(QWebEngineView* self, struct miqt_string html, QUrl* baseUrl) { + QString html_QString = QString::fromUtf8(html.data, html.len); + self->setHtml(html_QString, *baseUrl); +} + +void QWebEngineView_SetContent2(QWebEngineView* self, struct miqt_string data, struct miqt_string mimeType) { + QByteArray data_QByteArray(data.data, data.len); + QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); + self->setContent(data_QByteArray, mimeType_QString); +} + +void QWebEngineView_SetContent3(QWebEngineView* self, struct miqt_string data, struct miqt_string mimeType, QUrl* baseUrl) { + QByteArray data_QByteArray(data.data, data.len); + QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); + self->setContent(data_QByteArray, mimeType_QString, *baseUrl); +} + +void QWebEngineView_TriggerPageAction2(QWebEngineView* self, int action, bool checked) { + self->triggerPageAction(static_cast(action), checked); +} + +void QWebEngineView_PrintToPdf2(QWebEngineView* self, struct miqt_string filePath, QPageLayout* layout) { + QString filePath_QString = QString::fromUtf8(filePath.data, filePath.len); + self->printToPdf(filePath_QString, *layout); +} + +void QWebEngineView_PrintToPdf3(QWebEngineView* self, struct miqt_string filePath, QPageLayout* layout, QPageRanges* ranges) { + QString filePath_QString = QString::fromUtf8(filePath.data, filePath.len); + self->printToPdf(filePath_QString, *layout, *ranges); +} + +void QWebEngineView_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__SizeHint = slot; +} + +QSize* QWebEngineView_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_SizeHint(); +} + +void QWebEngineView_override_virtual_CreateWindow(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__CreateWindow = slot; +} + +QWebEngineView* QWebEngineView_virtualbase_CreateWindow(void* self, int typeVal) { + return ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_CreateWindow(typeVal); +} + +void QWebEngineView_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__ContextMenuEvent = slot; +} + +void QWebEngineView_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QWebEngineView_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__Event = slot; +} + +bool QWebEngineView_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_Event(param1); +} + +void QWebEngineView_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__ShowEvent = slot; +} + +void QWebEngineView_virtualbase_ShowEvent(void* self, QShowEvent* param1) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_ShowEvent(param1); +} + +void QWebEngineView_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__HideEvent = slot; +} + +void QWebEngineView_virtualbase_HideEvent(void* self, QHideEvent* param1) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_HideEvent(param1); +} + +void QWebEngineView_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__CloseEvent = slot; +} + +void QWebEngineView_virtualbase_CloseEvent(void* self, QCloseEvent* param1) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_CloseEvent(param1); +} + +void QWebEngineView_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__DragEnterEvent = slot; +} + +void QWebEngineView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_DragEnterEvent(e); +} + +void QWebEngineView_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__DragLeaveEvent = slot; +} + +void QWebEngineView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_DragLeaveEvent(e); +} + +void QWebEngineView_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__DragMoveEvent = slot; +} + +void QWebEngineView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_DragMoveEvent(e); +} + +void QWebEngineView_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__DropEvent = slot; +} + +void QWebEngineView_virtualbase_DropEvent(void* self, QDropEvent* e) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_DropEvent(e); +} + +void QWebEngineView_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__DevType = slot; +} + +int QWebEngineView_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_DevType(); +} + +void QWebEngineView_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__SetVisible = slot; +} + +void QWebEngineView_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_SetVisible(visible); +} + +void QWebEngineView_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QWebEngineView_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QWebEngineView_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__HeightForWidth = slot; +} + +int QWebEngineView_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QWebEngineView_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QWebEngineView_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QWebEngineView_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QWebEngineView_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_PaintEngine(); +} + +void QWebEngineView_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__MousePressEvent = slot; +} + +void QWebEngineView_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_MousePressEvent(event); +} + +void QWebEngineView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QWebEngineView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QWebEngineView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QWebEngineView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QWebEngineView_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__MouseMoveEvent = slot; +} + +void QWebEngineView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QWebEngineView_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__WheelEvent = slot; +} + +void QWebEngineView_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_WheelEvent(event); +} + +void QWebEngineView_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__KeyPressEvent = slot; +} + +void QWebEngineView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QWebEngineView_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QWebEngineView_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QWebEngineView_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__FocusInEvent = slot; +} + +void QWebEngineView_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_FocusInEvent(event); +} + +void QWebEngineView_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__FocusOutEvent = slot; +} + +void QWebEngineView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QWebEngineView_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__EnterEvent = slot; +} + +void QWebEngineView_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_EnterEvent(event); +} + +void QWebEngineView_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__LeaveEvent = slot; +} + +void QWebEngineView_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_LeaveEvent(event); +} + +void QWebEngineView_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__PaintEvent = slot; +} + +void QWebEngineView_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_PaintEvent(event); +} + +void QWebEngineView_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__MoveEvent = slot; +} + +void QWebEngineView_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_MoveEvent(event); +} + +void QWebEngineView_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__ResizeEvent = slot; +} + +void QWebEngineView_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_ResizeEvent(event); +} + +void QWebEngineView_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__TabletEvent = slot; +} + +void QWebEngineView_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_TabletEvent(event); +} + +void QWebEngineView_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__ActionEvent = slot; +} + +void QWebEngineView_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_ActionEvent(event); +} + +void QWebEngineView_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__NativeEvent = slot; +} + +bool QWebEngineView_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QWebEngineView_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__ChangeEvent = slot; +} + +void QWebEngineView_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QWebEngineView_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__Metric = slot; +} + +int QWebEngineView_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_Metric(param1); +} + +void QWebEngineView_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__InitPainter = slot; +} + +void QWebEngineView_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_InitPainter(painter); +} + +void QWebEngineView_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QWebEngineView_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_Redirected(offset); +} + +void QWebEngineView_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QWebEngineView_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_SharedPainter(); +} + +void QWebEngineView_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__InputMethodEvent = slot; +} + +void QWebEngineView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QWebEngineView_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QWebEngineView_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQWebEngineView*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QWebEngineView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QWebEngineView*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QWebEngineView_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQWebEngineView*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QWebEngineView_Delete(QWebEngineView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/webengine/gen_qwebengineview.go b/qt6/webengine/gen_qwebengineview.go new file mode 100644 index 00000000..299ac33e --- /dev/null +++ b/qt6/webengine/gen_qwebengineview.go @@ -0,0 +1,1622 @@ +package webengine + +/* + +#include "gen_qwebengineview.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "github.com/mappu/miqt/qt6/printsupport" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebEngineView struct { + h *C.QWebEngineView + isSubclass bool + *qt6.QWidget +} + +func (this *QWebEngineView) cPointer() *C.QWebEngineView { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebEngineView) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebEngineView constructs the type using only CGO pointers. +func newQWebEngineView(h *C.QWebEngineView, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QWebEngineView { + if h == nil { + return nil + } + return &QWebEngineView{h: h, + QWidget: qt6.UnsafeNewQWidget(unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} +} + +// UnsafeNewQWebEngineView constructs the type using only unsafe pointers. +func UnsafeNewQWebEngineView(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QWebEngineView { + if h == nil { + return nil + } + + return &QWebEngineView{h: (*C.QWebEngineView)(h), + QWidget: qt6.UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +} + +// NewQWebEngineView constructs a new QWebEngineView object. +func NewQWebEngineView(parent *qt6.QWidget) *QWebEngineView { + var outptr_QWebEngineView *C.QWebEngineView = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWebEngineView_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QWebEngineView, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWebEngineView(outptr_QWebEngineView, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQWebEngineView2 constructs a new QWebEngineView object. +func NewQWebEngineView2() *QWebEngineView { + var outptr_QWebEngineView *C.QWebEngineView = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWebEngineView_new2(&outptr_QWebEngineView, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWebEngineView(outptr_QWebEngineView, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQWebEngineView3 constructs a new QWebEngineView object. +func NewQWebEngineView3(profile *QWebEngineProfile) *QWebEngineView { + var outptr_QWebEngineView *C.QWebEngineView = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWebEngineView_new3(profile.cPointer(), &outptr_QWebEngineView, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWebEngineView(outptr_QWebEngineView, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQWebEngineView4 constructs a new QWebEngineView object. +func NewQWebEngineView4(page *QWebEnginePage) *QWebEngineView { + var outptr_QWebEngineView *C.QWebEngineView = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWebEngineView_new4(page.cPointer(), &outptr_QWebEngineView, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWebEngineView(outptr_QWebEngineView, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQWebEngineView5 constructs a new QWebEngineView object. +func NewQWebEngineView5(profile *QWebEngineProfile, parent *qt6.QWidget) *QWebEngineView { + var outptr_QWebEngineView *C.QWebEngineView = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWebEngineView_new5(profile.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QWebEngineView, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWebEngineView(outptr_QWebEngineView, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQWebEngineView6 constructs a new QWebEngineView object. +func NewQWebEngineView6(page *QWebEnginePage, parent *qt6.QWidget) *QWebEngineView { + var outptr_QWebEngineView *C.QWebEngineView = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWebEngineView_new6(page.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QWebEngineView, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWebEngineView(outptr_QWebEngineView, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +func (this *QWebEngineView) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebEngineView_MetaObject(this.h))) +} + +func (this *QWebEngineView) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebEngineView_Metacast(this.h, param1_Cstring)) +} + +func QWebEngineView_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineView_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineView_ForPage(page *QWebEnginePage) *QWebEngineView { + return UnsafeNewQWebEngineView(unsafe.Pointer(C.QWebEngineView_ForPage(page.cPointer())), nil, nil, nil) +} + +func (this *QWebEngineView) Page() *QWebEnginePage { + return UnsafeNewQWebEnginePage(unsafe.Pointer(C.QWebEngineView_Page(this.h)), nil) +} + +func (this *QWebEngineView) SetPage(page *QWebEnginePage) { + C.QWebEngineView_SetPage(this.h, page.cPointer()) +} + +func (this *QWebEngineView) Load(url *qt6.QUrl) { + C.QWebEngineView_Load(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QWebEngineView) LoadWithRequest(request *QWebEngineHttpRequest) { + C.QWebEngineView_LoadWithRequest(this.h, request.cPointer()) +} + +func (this *QWebEngineView) SetHtml(html string) { + html_ms := C.struct_miqt_string{} + html_ms.data = C.CString(html) + html_ms.len = C.size_t(len(html)) + defer C.free(unsafe.Pointer(html_ms.data)) + C.QWebEngineView_SetHtml(this.h, html_ms) +} + +func (this *QWebEngineView) SetContent(data []byte) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + C.QWebEngineView_SetContent(this.h, data_alias) +} + +func (this *QWebEngineView) History() *QWebEngineHistory { + return UnsafeNewQWebEngineHistory(unsafe.Pointer(C.QWebEngineView_History(this.h)), nil) +} + +func (this *QWebEngineView) Title() string { + var _ms C.struct_miqt_string = C.QWebEngineView_Title(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineView) SetUrl(url *qt6.QUrl) { + C.QWebEngineView_SetUrl(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QWebEngineView) Url() *qt6.QUrl { + _ret := C.QWebEngineView_Url(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineView) IconUrl() *qt6.QUrl { + _ret := C.QWebEngineView_IconUrl(this.h) + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineView) Icon() *qt6.QIcon { + _ret := C.QWebEngineView_Icon(this.h) + _goptr := qt6.UnsafeNewQIcon(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineView) HasSelection() bool { + return (bool)(C.QWebEngineView_HasSelection(this.h)) +} + +func (this *QWebEngineView) SelectedText() string { + var _ms C.struct_miqt_string = C.QWebEngineView_SelectedText(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineView) PageAction(action QWebEnginePage__WebAction) *qt6.QAction { + return qt6.UnsafeNewQAction(unsafe.Pointer(C.QWebEngineView_PageAction(this.h, (C.int)(action))), nil) +} + +func (this *QWebEngineView) TriggerPageAction(action QWebEnginePage__WebAction) { + C.QWebEngineView_TriggerPageAction(this.h, (C.int)(action)) +} + +func (this *QWebEngineView) ZoomFactor() float64 { + return (float64)(C.QWebEngineView_ZoomFactor(this.h)) +} + +func (this *QWebEngineView) SetZoomFactor(factor float64) { + C.QWebEngineView_SetZoomFactor(this.h, (C.double)(factor)) +} + +func (this *QWebEngineView) SizeHint() *qt6.QSize { + _ret := C.QWebEngineView_SizeHint(this.h) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebEngineView) Settings() *QWebEngineSettings { + return UnsafeNewQWebEngineSettings(unsafe.Pointer(C.QWebEngineView_Settings(this.h))) +} + +func (this *QWebEngineView) CreateStandardContextMenu() *qt6.QMenu { + return qt6.UnsafeNewQMenu(unsafe.Pointer(C.QWebEngineView_CreateStandardContextMenu(this.h)), nil, nil, nil) +} + +func (this *QWebEngineView) LastContextMenuRequest() *QWebEngineContextMenuRequest { + return UnsafeNewQWebEngineContextMenuRequest(unsafe.Pointer(C.QWebEngineView_LastContextMenuRequest(this.h)), nil) +} + +func (this *QWebEngineView) PrintToPdf(filePath string) { + filePath_ms := C.struct_miqt_string{} + filePath_ms.data = C.CString(filePath) + filePath_ms.len = C.size_t(len(filePath)) + defer C.free(unsafe.Pointer(filePath_ms.data)) + C.QWebEngineView_PrintToPdf(this.h, filePath_ms) +} + +func (this *QWebEngineView) Print(printer *printsupport.QPrinter) { + C.QWebEngineView_Print(this.h, (*C.QPrinter)(printer.UnsafePointer())) +} + +func (this *QWebEngineView) Stop() { + C.QWebEngineView_Stop(this.h) +} + +func (this *QWebEngineView) Back() { + C.QWebEngineView_Back(this.h) +} + +func (this *QWebEngineView) Forward() { + C.QWebEngineView_Forward(this.h) +} + +func (this *QWebEngineView) Reload() { + C.QWebEngineView_Reload(this.h) +} + +func (this *QWebEngineView) LoadStarted() { + C.QWebEngineView_LoadStarted(this.h) +} +func (this *QWebEngineView) OnLoadStarted(slot func()) { + C.QWebEngineView_connect_LoadStarted(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_LoadStarted +func miqt_exec_callback_QWebEngineView_LoadStarted(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEngineView) LoadProgress(progress int) { + C.QWebEngineView_LoadProgress(this.h, (C.int)(progress)) +} +func (this *QWebEngineView) OnLoadProgress(slot func(progress int)) { + C.QWebEngineView_connect_LoadProgress(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_LoadProgress +func miqt_exec_callback_QWebEngineView_LoadProgress(cb C.intptr_t, progress C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(progress int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(progress) + + gofunc(slotval1) +} + +func (this *QWebEngineView) LoadFinished(param1 bool) { + C.QWebEngineView_LoadFinished(this.h, (C.bool)(param1)) +} +func (this *QWebEngineView) OnLoadFinished(slot func(param1 bool)) { + C.QWebEngineView_connect_LoadFinished(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_LoadFinished +func miqt_exec_callback_QWebEngineView_LoadFinished(cb C.intptr_t, param1 C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(param1) + + gofunc(slotval1) +} + +func (this *QWebEngineView) TitleChanged(title string) { + title_ms := C.struct_miqt_string{} + title_ms.data = C.CString(title) + title_ms.len = C.size_t(len(title)) + defer C.free(unsafe.Pointer(title_ms.data)) + C.QWebEngineView_TitleChanged(this.h, title_ms) +} +func (this *QWebEngineView) OnTitleChanged(slot func(title string)) { + C.QWebEngineView_connect_TitleChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_TitleChanged +func miqt_exec_callback_QWebEngineView_TitleChanged(cb C.intptr_t, title C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(title string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var title_ms C.struct_miqt_string = title + title_ret := C.GoStringN(title_ms.data, C.int(int64(title_ms.len))) + C.free(unsafe.Pointer(title_ms.data)) + slotval1 := title_ret + + gofunc(slotval1) +} + +func (this *QWebEngineView) SelectionChanged() { + C.QWebEngineView_SelectionChanged(this.h) +} +func (this *QWebEngineView) OnSelectionChanged(slot func()) { + C.QWebEngineView_connect_SelectionChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_SelectionChanged +func miqt_exec_callback_QWebEngineView_SelectionChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEngineView) UrlChanged(param1 *qt6.QUrl) { + C.QWebEngineView_UrlChanged(this.h, (*C.QUrl)(param1.UnsafePointer())) +} +func (this *QWebEngineView) OnUrlChanged(slot func(param1 *qt6.QUrl)) { + C.QWebEngineView_connect_UrlChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_UrlChanged +func miqt_exec_callback_QWebEngineView_UrlChanged(cb C.intptr_t, param1 *C.QUrl) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 *qt6.QUrl)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQUrl(unsafe.Pointer(param1)) + + gofunc(slotval1) +} + +func (this *QWebEngineView) IconUrlChanged(param1 *qt6.QUrl) { + C.QWebEngineView_IconUrlChanged(this.h, (*C.QUrl)(param1.UnsafePointer())) +} +func (this *QWebEngineView) OnIconUrlChanged(slot func(param1 *qt6.QUrl)) { + C.QWebEngineView_connect_IconUrlChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_IconUrlChanged +func miqt_exec_callback_QWebEngineView_IconUrlChanged(cb C.intptr_t, param1 *C.QUrl) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 *qt6.QUrl)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQUrl(unsafe.Pointer(param1)) + + gofunc(slotval1) +} + +func (this *QWebEngineView) IconChanged(param1 *qt6.QIcon) { + C.QWebEngineView_IconChanged(this.h, (*C.QIcon)(param1.UnsafePointer())) +} +func (this *QWebEngineView) OnIconChanged(slot func(param1 *qt6.QIcon)) { + C.QWebEngineView_connect_IconChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_IconChanged +func miqt_exec_callback_QWebEngineView_IconChanged(cb C.intptr_t, param1 *C.QIcon) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 *qt6.QIcon)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQIcon(unsafe.Pointer(param1)) + + gofunc(slotval1) +} + +func (this *QWebEngineView) RenderProcessTerminated(terminationStatus QWebEnginePage__RenderProcessTerminationStatus, exitCode int) { + C.QWebEngineView_RenderProcessTerminated(this.h, (C.int)(terminationStatus), (C.int)(exitCode)) +} +func (this *QWebEngineView) OnRenderProcessTerminated(slot func(terminationStatus QWebEnginePage__RenderProcessTerminationStatus, exitCode int)) { + C.QWebEngineView_connect_RenderProcessTerminated(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_RenderProcessTerminated +func miqt_exec_callback_QWebEngineView_RenderProcessTerminated(cb C.intptr_t, terminationStatus C.int, exitCode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(terminationStatus QWebEnginePage__RenderProcessTerminationStatus, exitCode int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebEnginePage__RenderProcessTerminationStatus)(terminationStatus) + + slotval2 := (int)(exitCode) + + gofunc(slotval1, slotval2) +} + +func (this *QWebEngineView) PdfPrintingFinished(filePath string, success bool) { + filePath_ms := C.struct_miqt_string{} + filePath_ms.data = C.CString(filePath) + filePath_ms.len = C.size_t(len(filePath)) + defer C.free(unsafe.Pointer(filePath_ms.data)) + C.QWebEngineView_PdfPrintingFinished(this.h, filePath_ms, (C.bool)(success)) +} +func (this *QWebEngineView) OnPdfPrintingFinished(slot func(filePath string, success bool)) { + C.QWebEngineView_connect_PdfPrintingFinished(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_PdfPrintingFinished +func miqt_exec_callback_QWebEngineView_PdfPrintingFinished(cb C.intptr_t, filePath C.struct_miqt_string, success C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(filePath string, success bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var filePath_ms C.struct_miqt_string = filePath + filePath_ret := C.GoStringN(filePath_ms.data, C.int(int64(filePath_ms.len))) + C.free(unsafe.Pointer(filePath_ms.data)) + slotval1 := filePath_ret + slotval2 := (bool)(success) + + gofunc(slotval1, slotval2) +} + +func (this *QWebEngineView) PrintRequested() { + C.QWebEngineView_PrintRequested(this.h) +} +func (this *QWebEngineView) OnPrintRequested(slot func()) { + C.QWebEngineView_connect_PrintRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_PrintRequested +func miqt_exec_callback_QWebEngineView_PrintRequested(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QWebEngineView) PrintFinished(success bool) { + C.QWebEngineView_PrintFinished(this.h, (C.bool)(success)) +} +func (this *QWebEngineView) OnPrintFinished(slot func(success bool)) { + C.QWebEngineView_connect_PrintFinished(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_PrintFinished +func miqt_exec_callback_QWebEngineView_PrintFinished(cb C.intptr_t, success C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(success bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(success) + + gofunc(slotval1) +} + +func QWebEngineView_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineView_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebEngineView_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebEngineView_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebEngineView) SetHtml2(html string, baseUrl *qt6.QUrl) { + html_ms := C.struct_miqt_string{} + html_ms.data = C.CString(html) + html_ms.len = C.size_t(len(html)) + defer C.free(unsafe.Pointer(html_ms.data)) + C.QWebEngineView_SetHtml2(this.h, html_ms, (*C.QUrl)(baseUrl.UnsafePointer())) +} + +func (this *QWebEngineView) SetContent2(data []byte, mimeType string) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + mimeType_ms := C.struct_miqt_string{} + mimeType_ms.data = C.CString(mimeType) + mimeType_ms.len = C.size_t(len(mimeType)) + defer C.free(unsafe.Pointer(mimeType_ms.data)) + C.QWebEngineView_SetContent2(this.h, data_alias, mimeType_ms) +} + +func (this *QWebEngineView) SetContent3(data []byte, mimeType string, baseUrl *qt6.QUrl) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + mimeType_ms := C.struct_miqt_string{} + mimeType_ms.data = C.CString(mimeType) + mimeType_ms.len = C.size_t(len(mimeType)) + defer C.free(unsafe.Pointer(mimeType_ms.data)) + C.QWebEngineView_SetContent3(this.h, data_alias, mimeType_ms, (*C.QUrl)(baseUrl.UnsafePointer())) +} + +func (this *QWebEngineView) TriggerPageAction2(action QWebEnginePage__WebAction, checked bool) { + C.QWebEngineView_TriggerPageAction2(this.h, (C.int)(action), (C.bool)(checked)) +} + +func (this *QWebEngineView) PrintToPdf2(filePath string, layout *qt6.QPageLayout) { + filePath_ms := C.struct_miqt_string{} + filePath_ms.data = C.CString(filePath) + filePath_ms.len = C.size_t(len(filePath)) + defer C.free(unsafe.Pointer(filePath_ms.data)) + C.QWebEngineView_PrintToPdf2(this.h, filePath_ms, (*C.QPageLayout)(layout.UnsafePointer())) +} + +func (this *QWebEngineView) PrintToPdf3(filePath string, layout *qt6.QPageLayout, ranges *qt6.QPageRanges) { + filePath_ms := C.struct_miqt_string{} + filePath_ms.data = C.CString(filePath) + filePath_ms.len = C.size_t(len(filePath)) + defer C.free(unsafe.Pointer(filePath_ms.data)) + C.QWebEngineView_PrintToPdf3(this.h, filePath_ms, (*C.QPageLayout)(layout.UnsafePointer()), (*C.QPageRanges)(ranges.UnsafePointer())) +} + +func (this *QWebEngineView) callVirtualBase_SizeHint() *qt6.QSize { + + _ret := C.QWebEngineView_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWebEngineView) OnSizeHint(slot func(super func() *qt6.QSize) *qt6.QSize) { + C.QWebEngineView_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_SizeHint +func miqt_exec_callback_QWebEngineView_SizeHint(self *C.QWebEngineView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QSize) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebEngineView) callVirtualBase_CreateWindow(typeVal QWebEnginePage__WebWindowType) *QWebEngineView { + + return UnsafeNewQWebEngineView(unsafe.Pointer(C.QWebEngineView_virtualbase_CreateWindow(unsafe.Pointer(this.h), (C.int)(typeVal))), nil, nil, nil) +} +func (this *QWebEngineView) OnCreateWindow(slot func(super func(typeVal QWebEnginePage__WebWindowType) *QWebEngineView, typeVal QWebEnginePage__WebWindowType) *QWebEngineView) { + C.QWebEngineView_override_virtual_CreateWindow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_CreateWindow +func miqt_exec_callback_QWebEngineView_CreateWindow(self *C.QWebEngineView, cb C.intptr_t, typeVal C.int) *C.QWebEngineView { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(typeVal QWebEnginePage__WebWindowType) *QWebEngineView, typeVal QWebEnginePage__WebWindowType) *QWebEngineView) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebEnginePage__WebWindowType)(typeVal) + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_CreateWindow, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QWebEngineView) callVirtualBase_ContextMenuEvent(param1 *qt6.QContextMenuEvent) { + + C.QWebEngineView_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(param1.UnsafePointer())) + +} +func (this *QWebEngineView) OnContextMenuEvent(slot func(super func(param1 *qt6.QContextMenuEvent), param1 *qt6.QContextMenuEvent)) { + C.QWebEngineView_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_ContextMenuEvent +func miqt_exec_callback_QWebEngineView_ContextMenuEvent(self *C.QWebEngineView, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QContextMenuEvent), param1 *qt6.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_Event(param1 *qt6.QEvent) bool { + + return (bool)(C.QWebEngineView_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer()))) + +} +func (this *QWebEngineView) OnEvent(slot func(super func(param1 *qt6.QEvent) bool, param1 *qt6.QEvent) bool) { + C.QWebEngineView_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_Event +func miqt_exec_callback_QWebEngineView_Event(self *C.QWebEngineView, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QEvent) bool, param1 *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEngineView) callVirtualBase_ShowEvent(param1 *qt6.QShowEvent) { + + C.QWebEngineView_virtualbase_ShowEvent(unsafe.Pointer(this.h), (*C.QShowEvent)(param1.UnsafePointer())) + +} +func (this *QWebEngineView) OnShowEvent(slot func(super func(param1 *qt6.QShowEvent), param1 *qt6.QShowEvent)) { + C.QWebEngineView_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_ShowEvent +func miqt_exec_callback_QWebEngineView_ShowEvent(self *C.QWebEngineView, cb C.intptr_t, param1 *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QShowEvent), param1 *qt6.QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_HideEvent(param1 *qt6.QHideEvent) { + + C.QWebEngineView_virtualbase_HideEvent(unsafe.Pointer(this.h), (*C.QHideEvent)(param1.UnsafePointer())) + +} +func (this *QWebEngineView) OnHideEvent(slot func(super func(param1 *qt6.QHideEvent), param1 *qt6.QHideEvent)) { + C.QWebEngineView_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_HideEvent +func miqt_exec_callback_QWebEngineView_HideEvent(self *C.QWebEngineView, cb C.intptr_t, param1 *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QHideEvent), param1 *qt6.QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQHideEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_CloseEvent(param1 *qt6.QCloseEvent) { + + C.QWebEngineView_virtualbase_CloseEvent(unsafe.Pointer(this.h), (*C.QCloseEvent)(param1.UnsafePointer())) + +} +func (this *QWebEngineView) OnCloseEvent(slot func(super func(param1 *qt6.QCloseEvent), param1 *qt6.QCloseEvent)) { + C.QWebEngineView_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_CloseEvent +func miqt_exec_callback_QWebEngineView_CloseEvent(self *C.QWebEngineView, cb C.intptr_t, param1 *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QCloseEvent), param1 *qt6.QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_DragEnterEvent(e *qt6.QDragEnterEvent) { + + C.QWebEngineView_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), (*C.QDragEnterEvent)(e.UnsafePointer())) + +} +func (this *QWebEngineView) OnDragEnterEvent(slot func(super func(e *qt6.QDragEnterEvent), e *qt6.QDragEnterEvent)) { + C.QWebEngineView_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_DragEnterEvent +func miqt_exec_callback_QWebEngineView_DragEnterEvent(self *C.QWebEngineView, cb C.intptr_t, e *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QDragEnterEvent), e *qt6.QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragEnterEvent(unsafe.Pointer(e), nil, nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_DragLeaveEvent(e *qt6.QDragLeaveEvent) { + + C.QWebEngineView_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), (*C.QDragLeaveEvent)(e.UnsafePointer())) + +} +func (this *QWebEngineView) OnDragLeaveEvent(slot func(super func(e *qt6.QDragLeaveEvent), e *qt6.QDragLeaveEvent)) { + C.QWebEngineView_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_DragLeaveEvent +func miqt_exec_callback_QWebEngineView_DragLeaveEvent(self *C.QWebEngineView, cb C.intptr_t, e *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QDragLeaveEvent), e *qt6.QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_DragMoveEvent(e *qt6.QDragMoveEvent) { + + C.QWebEngineView_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), (*C.QDragMoveEvent)(e.UnsafePointer())) + +} +func (this *QWebEngineView) OnDragMoveEvent(slot func(super func(e *qt6.QDragMoveEvent), e *qt6.QDragMoveEvent)) { + C.QWebEngineView_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_DragMoveEvent +func miqt_exec_callback_QWebEngineView_DragMoveEvent(self *C.QWebEngineView, cb C.intptr_t, e *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QDragMoveEvent), e *qt6.QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_DropEvent(e *qt6.QDropEvent) { + + C.QWebEngineView_virtualbase_DropEvent(unsafe.Pointer(this.h), (*C.QDropEvent)(e.UnsafePointer())) + +} +func (this *QWebEngineView) OnDropEvent(slot func(super func(e *qt6.QDropEvent), e *qt6.QDropEvent)) { + C.QWebEngineView_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_DropEvent +func miqt_exec_callback_QWebEngineView_DropEvent(self *C.QWebEngineView, cb C.intptr_t, e *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt6.QDropEvent), e *qt6.QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_DevType() int { + + return (int)(C.QWebEngineView_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QWebEngineView) OnDevType(slot func(super func() int) int) { + C.QWebEngineView_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_DevType +func miqt_exec_callback_QWebEngineView_DevType(self *C.QWebEngineView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QWebEngineView) callVirtualBase_SetVisible(visible bool) { + + C.QWebEngineView_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QWebEngineView) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QWebEngineView_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_SetVisible +func miqt_exec_callback_QWebEngineView_SetVisible(self *C.QWebEngineView, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_MinimumSizeHint() *qt6.QSize { + + _ret := C.QWebEngineView_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWebEngineView) OnMinimumSizeHint(slot func(super func() *qt6.QSize) *qt6.QSize) { + C.QWebEngineView_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_MinimumSizeHint +func miqt_exec_callback_QWebEngineView_MinimumSizeHint(self *C.QWebEngineView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QSize) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_MinimumSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebEngineView) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QWebEngineView_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWebEngineView) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QWebEngineView_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_HeightForWidth +func miqt_exec_callback_QWebEngineView_HeightForWidth(self *C.QWebEngineView, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWebEngineView) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QWebEngineView_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QWebEngineView) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QWebEngineView_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_HasHeightForWidth +func miqt_exec_callback_QWebEngineView_HasHeightForWidth(self *C.QWebEngineView, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEngineView) callVirtualBase_PaintEngine() *qt6.QPaintEngine { + + return qt6.UnsafeNewQPaintEngine(unsafe.Pointer(C.QWebEngineView_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QWebEngineView) OnPaintEngine(slot func(super func() *qt6.QPaintEngine) *qt6.QPaintEngine) { + C.QWebEngineView_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_PaintEngine +func miqt_exec_callback_QWebEngineView_PaintEngine(self *C.QWebEngineView, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QPaintEngine) *qt6.QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_PaintEngine) + + return (*C.QPaintEngine)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebEngineView) callVirtualBase_MousePressEvent(event *qt6.QMouseEvent) { + + C.QWebEngineView_virtualbase_MousePressEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnMousePressEvent(slot func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) { + C.QWebEngineView_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_MousePressEvent +func miqt_exec_callback_QWebEngineView_MousePressEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_MouseReleaseEvent(event *qt6.QMouseEvent) { + + C.QWebEngineView_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnMouseReleaseEvent(slot func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) { + C.QWebEngineView_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_MouseReleaseEvent +func miqt_exec_callback_QWebEngineView_MouseReleaseEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_MouseDoubleClickEvent(event *qt6.QMouseEvent) { + + C.QWebEngineView_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnMouseDoubleClickEvent(slot func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) { + C.QWebEngineView_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_MouseDoubleClickEvent +func miqt_exec_callback_QWebEngineView_MouseDoubleClickEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_MouseMoveEvent(event *qt6.QMouseEvent) { + + C.QWebEngineView_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnMouseMoveEvent(slot func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) { + C.QWebEngineView_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_MouseMoveEvent +func miqt_exec_callback_QWebEngineView_MouseMoveEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_WheelEvent(event *qt6.QWheelEvent) { + + C.QWebEngineView_virtualbase_WheelEvent(unsafe.Pointer(this.h), (*C.QWheelEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnWheelEvent(slot func(super func(event *qt6.QWheelEvent), event *qt6.QWheelEvent)) { + C.QWebEngineView_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_WheelEvent +func miqt_exec_callback_QWebEngineView_WheelEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QWheelEvent), event *qt6.QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_KeyPressEvent(event *qt6.QKeyEvent) { + + C.QWebEngineView_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnKeyPressEvent(slot func(super func(event *qt6.QKeyEvent), event *qt6.QKeyEvent)) { + C.QWebEngineView_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_KeyPressEvent +func miqt_exec_callback_QWebEngineView_KeyPressEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QKeyEvent), event *qt6.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_KeyReleaseEvent(event *qt6.QKeyEvent) { + + C.QWebEngineView_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnKeyReleaseEvent(slot func(super func(event *qt6.QKeyEvent), event *qt6.QKeyEvent)) { + C.QWebEngineView_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_KeyReleaseEvent +func miqt_exec_callback_QWebEngineView_KeyReleaseEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QKeyEvent), event *qt6.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_FocusInEvent(event *qt6.QFocusEvent) { + + C.QWebEngineView_virtualbase_FocusInEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnFocusInEvent(slot func(super func(event *qt6.QFocusEvent), event *qt6.QFocusEvent)) { + C.QWebEngineView_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_FocusInEvent +func miqt_exec_callback_QWebEngineView_FocusInEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QFocusEvent), event *qt6.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_FocusOutEvent(event *qt6.QFocusEvent) { + + C.QWebEngineView_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnFocusOutEvent(slot func(super func(event *qt6.QFocusEvent), event *qt6.QFocusEvent)) { + C.QWebEngineView_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_FocusOutEvent +func miqt_exec_callback_QWebEngineView_FocusOutEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QFocusEvent), event *qt6.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_EnterEvent(event *qt6.QEnterEvent) { + + C.QWebEngineView_virtualbase_EnterEvent(unsafe.Pointer(this.h), (*C.QEnterEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnEnterEvent(slot func(super func(event *qt6.QEnterEvent), event *qt6.QEnterEvent)) { + C.QWebEngineView_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_EnterEvent +func miqt_exec_callback_QWebEngineView_EnterEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEnterEvent), event *qt6.QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_LeaveEvent(event *qt6.QEvent) { + + C.QWebEngineView_virtualbase_LeaveEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnLeaveEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QWebEngineView_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_LeaveEvent +func miqt_exec_callback_QWebEngineView_LeaveEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_PaintEvent(event *qt6.QPaintEvent) { + + C.QWebEngineView_virtualbase_PaintEvent(unsafe.Pointer(this.h), (*C.QPaintEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnPaintEvent(slot func(super func(event *qt6.QPaintEvent), event *qt6.QPaintEvent)) { + C.QWebEngineView_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_PaintEvent +func miqt_exec_callback_QWebEngineView_PaintEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QPaintEvent), event *qt6.QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_MoveEvent(event *qt6.QMoveEvent) { + + C.QWebEngineView_virtualbase_MoveEvent(unsafe.Pointer(this.h), (*C.QMoveEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnMoveEvent(slot func(super func(event *qt6.QMoveEvent), event *qt6.QMoveEvent)) { + C.QWebEngineView_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_MoveEvent +func miqt_exec_callback_QWebEngineView_MoveEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMoveEvent), event *qt6.QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_ResizeEvent(event *qt6.QResizeEvent) { + + C.QWebEngineView_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnResizeEvent(slot func(super func(event *qt6.QResizeEvent), event *qt6.QResizeEvent)) { + C.QWebEngineView_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_ResizeEvent +func miqt_exec_callback_QWebEngineView_ResizeEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QResizeEvent), event *qt6.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_TabletEvent(event *qt6.QTabletEvent) { + + C.QWebEngineView_virtualbase_TabletEvent(unsafe.Pointer(this.h), (*C.QTabletEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnTabletEvent(slot func(super func(event *qt6.QTabletEvent), event *qt6.QTabletEvent)) { + C.QWebEngineView_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_TabletEvent +func miqt_exec_callback_QWebEngineView_TabletEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTabletEvent), event *qt6.QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_ActionEvent(event *qt6.QActionEvent) { + + C.QWebEngineView_virtualbase_ActionEvent(unsafe.Pointer(this.h), (*C.QActionEvent)(event.UnsafePointer())) + +} +func (this *QWebEngineView) OnActionEvent(slot func(super func(event *qt6.QActionEvent), event *qt6.QActionEvent)) { + C.QWebEngineView_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_ActionEvent +func miqt_exec_callback_QWebEngineView_ActionEvent(self *C.QWebEngineView, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QActionEvent), event *qt6.QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QWebEngineView_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QWebEngineView) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QWebEngineView_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_NativeEvent +func miqt_exec_callback_QWebEngineView_NativeEvent(self *C.QWebEngineView, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebEngineView) callVirtualBase_ChangeEvent(param1 *qt6.QEvent) { + + C.QWebEngineView_virtualbase_ChangeEvent(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer())) + +} +func (this *QWebEngineView) OnChangeEvent(slot func(super func(param1 *qt6.QEvent), param1 *qt6.QEvent)) { + C.QWebEngineView_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_ChangeEvent +func miqt_exec_callback_QWebEngineView_ChangeEvent(self *C.QWebEngineView, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QEvent), param1 *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_Metric(param1 qt6.QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QWebEngineView_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWebEngineView) OnMetric(slot func(super func(param1 qt6.QPaintDevice__PaintDeviceMetric) int, param1 qt6.QPaintDevice__PaintDeviceMetric) int) { + C.QWebEngineView_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_Metric +func miqt_exec_callback_QWebEngineView_Metric(self *C.QWebEngineView, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt6.QPaintDevice__PaintDeviceMetric) int, param1 qt6.QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt6.QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWebEngineView) callVirtualBase_InitPainter(painter *qt6.QPainter) { + + C.QWebEngineView_virtualbase_InitPainter(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer())) + +} +func (this *QWebEngineView) OnInitPainter(slot func(super func(painter *qt6.QPainter), painter *qt6.QPainter)) { + C.QWebEngineView_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_InitPainter +func miqt_exec_callback_QWebEngineView_InitPainter(self *C.QWebEngineView, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt6.QPainter), painter *qt6.QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_Redirected(offset *qt6.QPoint) *qt6.QPaintDevice { + + return qt6.UnsafeNewQPaintDevice(unsafe.Pointer(C.QWebEngineView_virtualbase_Redirected(unsafe.Pointer(this.h), (*C.QPoint)(offset.UnsafePointer())))) +} +func (this *QWebEngineView) OnRedirected(slot func(super func(offset *qt6.QPoint) *qt6.QPaintDevice, offset *qt6.QPoint) *qt6.QPaintDevice) { + C.QWebEngineView_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_Redirected +func miqt_exec_callback_QWebEngineView_Redirected(self *C.QWebEngineView, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *qt6.QPoint) *qt6.QPaintDevice, offset *qt6.QPoint) *qt6.QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_Redirected, slotval1) + + return (*C.QPaintDevice)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebEngineView) callVirtualBase_SharedPainter() *qt6.QPainter { + + return qt6.UnsafeNewQPainter(unsafe.Pointer(C.QWebEngineView_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QWebEngineView) OnSharedPainter(slot func(super func() *qt6.QPainter) *qt6.QPainter) { + C.QWebEngineView_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_SharedPainter +func miqt_exec_callback_QWebEngineView_SharedPainter(self *C.QWebEngineView, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QPainter) *qt6.QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_SharedPainter) + + return (*C.QPainter)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebEngineView) callVirtualBase_InputMethodEvent(param1 *qt6.QInputMethodEvent) { + + C.QWebEngineView_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), (*C.QInputMethodEvent)(param1.UnsafePointer())) + +} +func (this *QWebEngineView) OnInputMethodEvent(slot func(super func(param1 *qt6.QInputMethodEvent), param1 *qt6.QInputMethodEvent)) { + C.QWebEngineView_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_InputMethodEvent +func miqt_exec_callback_QWebEngineView_InputMethodEvent(self *C.QWebEngineView, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QInputMethodEvent), param1 *qt6.QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWebEngineView{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QWebEngineView) callVirtualBase_InputMethodQuery(param1 qt6.InputMethodQuery) *qt6.QVariant { + + _ret := C.QWebEngineView_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWebEngineView) OnInputMethodQuery(slot func(super func(param1 qt6.InputMethodQuery) *qt6.QVariant, param1 qt6.InputMethodQuery) *qt6.QVariant) { + C.QWebEngineView_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_InputMethodQuery +func miqt_exec_callback_QWebEngineView_InputMethodQuery(self *C.QWebEngineView, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt6.InputMethodQuery) *qt6.QVariant, param1 qt6.InputMethodQuery) *qt6.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt6.InputMethodQuery)(param1) + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebEngineView) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QWebEngineView_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QWebEngineView) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QWebEngineView_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebEngineView_FocusNextPrevChild +func miqt_exec_callback_QWebEngineView_FocusNextPrevChild(self *C.QWebEngineView, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QWebEngineView{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +// Delete this object from C++ memory. +func (this *QWebEngineView) Delete() { + C.QWebEngineView_Delete(this.h, C.bool(this.isSubclass)) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QWebEngineView) GoGC() { + runtime.SetFinalizer(this, func(this *QWebEngineView) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/webengine/gen_qwebengineview.h b/qt6/webengine/gen_qwebengineview.h new file mode 100644 index 00000000..68036381 --- /dev/null +++ b/qt6/webengine/gen_qwebengineview.h @@ -0,0 +1,277 @@ +#pragma once +#ifndef MIQT_QT6_WEBENGINE_GEN_QWEBENGINEVIEW_H +#define MIQT_QT6_WEBENGINE_GEN_QWEBENGINEVIEW_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QAction; +class QActionEvent; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QIcon; +class QInputMethodEvent; +class QKeyEvent; +class QMenu; +class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPageLayout; +class QPageRanges; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QPrinter; +class QResizeEvent; +class QShowEvent; +class QSize; +class QTabletEvent; +class QUrl; +class QVariant; +class QWebEngineContextMenuRequest; +class QWebEngineHistory; +class QWebEngineHttpRequest; +class QWebEnginePage; +class QWebEngineProfile; +class QWebEngineSettings; +class QWebEngineView; +class QWheelEvent; +class QWidget; +#else +typedef struct QAction QAction; +typedef struct QActionEvent QActionEvent; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QIcon QIcon; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; +typedef struct QMenu QMenu; +typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPageLayout QPageLayout; +typedef struct QPageRanges QPageRanges; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QPrinter QPrinter; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QUrl QUrl; +typedef struct QVariant QVariant; +typedef struct QWebEngineContextMenuRequest QWebEngineContextMenuRequest; +typedef struct QWebEngineHistory QWebEngineHistory; +typedef struct QWebEngineHttpRequest QWebEngineHttpRequest; +typedef struct QWebEnginePage QWebEnginePage; +typedef struct QWebEngineProfile QWebEngineProfile; +typedef struct QWebEngineSettings QWebEngineSettings; +typedef struct QWebEngineView QWebEngineView; +typedef struct QWheelEvent QWheelEvent; +typedef struct QWidget QWidget; +#endif + +void QWebEngineView_new(QWidget* parent, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QWebEngineView_new2(QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QWebEngineView_new3(QWebEngineProfile* profile, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QWebEngineView_new4(QWebEnginePage* page, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QWebEngineView_new5(QWebEngineProfile* profile, QWidget* parent, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QWebEngineView_new6(QWebEnginePage* page, QWidget* parent, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QMetaObject* QWebEngineView_MetaObject(const QWebEngineView* self); +void* QWebEngineView_Metacast(QWebEngineView* self, const char* param1); +struct miqt_string QWebEngineView_Tr(const char* s); +QWebEngineView* QWebEngineView_ForPage(QWebEnginePage* page); +QWebEnginePage* QWebEngineView_Page(const QWebEngineView* self); +void QWebEngineView_SetPage(QWebEngineView* self, QWebEnginePage* page); +void QWebEngineView_Load(QWebEngineView* self, QUrl* url); +void QWebEngineView_LoadWithRequest(QWebEngineView* self, QWebEngineHttpRequest* request); +void QWebEngineView_SetHtml(QWebEngineView* self, struct miqt_string html); +void QWebEngineView_SetContent(QWebEngineView* self, struct miqt_string data); +QWebEngineHistory* QWebEngineView_History(const QWebEngineView* self); +struct miqt_string QWebEngineView_Title(const QWebEngineView* self); +void QWebEngineView_SetUrl(QWebEngineView* self, QUrl* url); +QUrl* QWebEngineView_Url(const QWebEngineView* self); +QUrl* QWebEngineView_IconUrl(const QWebEngineView* self); +QIcon* QWebEngineView_Icon(const QWebEngineView* self); +bool QWebEngineView_HasSelection(const QWebEngineView* self); +struct miqt_string QWebEngineView_SelectedText(const QWebEngineView* self); +QAction* QWebEngineView_PageAction(const QWebEngineView* self, int action); +void QWebEngineView_TriggerPageAction(QWebEngineView* self, int action); +double QWebEngineView_ZoomFactor(const QWebEngineView* self); +void QWebEngineView_SetZoomFactor(QWebEngineView* self, double factor); +QSize* QWebEngineView_SizeHint(const QWebEngineView* self); +QWebEngineSettings* QWebEngineView_Settings(const QWebEngineView* self); +QMenu* QWebEngineView_CreateStandardContextMenu(QWebEngineView* self); +QWebEngineContextMenuRequest* QWebEngineView_LastContextMenuRequest(const QWebEngineView* self); +void QWebEngineView_PrintToPdf(QWebEngineView* self, struct miqt_string filePath); +void QWebEngineView_Print(QWebEngineView* self, QPrinter* printer); +void QWebEngineView_Stop(QWebEngineView* self); +void QWebEngineView_Back(QWebEngineView* self); +void QWebEngineView_Forward(QWebEngineView* self); +void QWebEngineView_Reload(QWebEngineView* self); +void QWebEngineView_LoadStarted(QWebEngineView* self); +void QWebEngineView_connect_LoadStarted(QWebEngineView* self, intptr_t slot); +void QWebEngineView_LoadProgress(QWebEngineView* self, int progress); +void QWebEngineView_connect_LoadProgress(QWebEngineView* self, intptr_t slot); +void QWebEngineView_LoadFinished(QWebEngineView* self, bool param1); +void QWebEngineView_connect_LoadFinished(QWebEngineView* self, intptr_t slot); +void QWebEngineView_TitleChanged(QWebEngineView* self, struct miqt_string title); +void QWebEngineView_connect_TitleChanged(QWebEngineView* self, intptr_t slot); +void QWebEngineView_SelectionChanged(QWebEngineView* self); +void QWebEngineView_connect_SelectionChanged(QWebEngineView* self, intptr_t slot); +void QWebEngineView_UrlChanged(QWebEngineView* self, QUrl* param1); +void QWebEngineView_connect_UrlChanged(QWebEngineView* self, intptr_t slot); +void QWebEngineView_IconUrlChanged(QWebEngineView* self, QUrl* param1); +void QWebEngineView_connect_IconUrlChanged(QWebEngineView* self, intptr_t slot); +void QWebEngineView_IconChanged(QWebEngineView* self, QIcon* param1); +void QWebEngineView_connect_IconChanged(QWebEngineView* self, intptr_t slot); +void QWebEngineView_RenderProcessTerminated(QWebEngineView* self, int terminationStatus, int exitCode); +void QWebEngineView_connect_RenderProcessTerminated(QWebEngineView* self, intptr_t slot); +void QWebEngineView_PdfPrintingFinished(QWebEngineView* self, struct miqt_string filePath, bool success); +void QWebEngineView_connect_PdfPrintingFinished(QWebEngineView* self, intptr_t slot); +void QWebEngineView_PrintRequested(QWebEngineView* self); +void QWebEngineView_connect_PrintRequested(QWebEngineView* self, intptr_t slot); +void QWebEngineView_PrintFinished(QWebEngineView* self, bool success); +void QWebEngineView_connect_PrintFinished(QWebEngineView* self, intptr_t slot); +QWebEngineView* QWebEngineView_CreateWindow(QWebEngineView* self, int typeVal); +void QWebEngineView_ContextMenuEvent(QWebEngineView* self, QContextMenuEvent* param1); +bool QWebEngineView_Event(QWebEngineView* self, QEvent* param1); +void QWebEngineView_ShowEvent(QWebEngineView* self, QShowEvent* param1); +void QWebEngineView_HideEvent(QWebEngineView* self, QHideEvent* param1); +void QWebEngineView_CloseEvent(QWebEngineView* self, QCloseEvent* param1); +void QWebEngineView_DragEnterEvent(QWebEngineView* self, QDragEnterEvent* e); +void QWebEngineView_DragLeaveEvent(QWebEngineView* self, QDragLeaveEvent* e); +void QWebEngineView_DragMoveEvent(QWebEngineView* self, QDragMoveEvent* e); +void QWebEngineView_DropEvent(QWebEngineView* self, QDropEvent* e); +struct miqt_string QWebEngineView_Tr2(const char* s, const char* c); +struct miqt_string QWebEngineView_Tr3(const char* s, const char* c, int n); +void QWebEngineView_SetHtml2(QWebEngineView* self, struct miqt_string html, QUrl* baseUrl); +void QWebEngineView_SetContent2(QWebEngineView* self, struct miqt_string data, struct miqt_string mimeType); +void QWebEngineView_SetContent3(QWebEngineView* self, struct miqt_string data, struct miqt_string mimeType, QUrl* baseUrl); +void QWebEngineView_TriggerPageAction2(QWebEngineView* self, int action, bool checked); +void QWebEngineView_PrintToPdf2(QWebEngineView* self, struct miqt_string filePath, QPageLayout* layout); +void QWebEngineView_PrintToPdf3(QWebEngineView* self, struct miqt_string filePath, QPageLayout* layout, QPageRanges* ranges); +void QWebEngineView_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QWebEngineView_virtualbase_SizeHint(const void* self); +void QWebEngineView_override_virtual_CreateWindow(void* self, intptr_t slot); +QWebEngineView* QWebEngineView_virtualbase_CreateWindow(void* self, int typeVal); +void QWebEngineView_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QWebEngineView_override_virtual_Event(void* self, intptr_t slot); +bool QWebEngineView_virtualbase_Event(void* self, QEvent* param1); +void QWebEngineView_override_virtual_ShowEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_ShowEvent(void* self, QShowEvent* param1); +void QWebEngineView_override_virtual_HideEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_HideEvent(void* self, QHideEvent* param1); +void QWebEngineView_override_virtual_CloseEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_CloseEvent(void* self, QCloseEvent* param1); +void QWebEngineView_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* e); +void QWebEngineView_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* e); +void QWebEngineView_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* e); +void QWebEngineView_override_virtual_DropEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_DropEvent(void* self, QDropEvent* e); +void QWebEngineView_override_virtual_DevType(void* self, intptr_t slot); +int QWebEngineView_virtualbase_DevType(const void* self); +void QWebEngineView_override_virtual_SetVisible(void* self, intptr_t slot); +void QWebEngineView_virtualbase_SetVisible(void* self, bool visible); +void QWebEngineView_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QWebEngineView_virtualbase_MinimumSizeHint(const void* self); +void QWebEngineView_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QWebEngineView_virtualbase_HeightForWidth(const void* self, int param1); +void QWebEngineView_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QWebEngineView_virtualbase_HasHeightForWidth(const void* self); +void QWebEngineView_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QWebEngineView_virtualbase_PaintEngine(const void* self); +void QWebEngineView_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QWebEngineView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QWebEngineView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QWebEngineView_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QWebEngineView_override_virtual_WheelEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QWebEngineView_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QWebEngineView_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QWebEngineView_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QWebEngineView_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QWebEngineView_override_virtual_EnterEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QWebEngineView_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_LeaveEvent(void* self, QEvent* event); +void QWebEngineView_override_virtual_PaintEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QWebEngineView_override_virtual_MoveEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QWebEngineView_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QWebEngineView_override_virtual_TabletEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QWebEngineView_override_virtual_ActionEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QWebEngineView_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QWebEngineView_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QWebEngineView_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QWebEngineView_override_virtual_Metric(void* self, intptr_t slot); +int QWebEngineView_virtualbase_Metric(const void* self, int param1); +void QWebEngineView_override_virtual_InitPainter(void* self, intptr_t slot); +void QWebEngineView_virtualbase_InitPainter(const void* self, QPainter* painter); +void QWebEngineView_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QWebEngineView_virtualbase_Redirected(const void* self, QPoint* offset); +void QWebEngineView_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QWebEngineView_virtualbase_SharedPainter(const void* self); +void QWebEngineView_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QWebEngineView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QWebEngineView_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QWebEngineView_virtualbase_InputMethodQuery(const void* self, int param1); +void QWebEngineView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QWebEngineView_virtualbase_FocusNextPrevChild(void* self, bool next); +void QWebEngineView_Delete(QWebEngineView* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif